igniteui-react-core
Version:
Ignite UI React Core.
264 lines (263 loc) • 9.78 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends } from "tslib";
import { Base, typeCast, EnumUtil, markType } from "./type";
import { CodeGenerationLibraryItemPlatform_$type } from "./CodeGenerationLibraryItemPlatform";
import { CodeGenerationLibraryItemContentLocation_$type } from "./CodeGenerationLibraryItemContentLocation";
import { JsonDictionaryObject } from "./JsonDictionaryObject";
import { JsonDictionaryValue } from "./JsonDictionaryValue";
import { JsonDictionaryArray } from "./JsonDictionaryArray";
/**
* @hidden
*/
var CodeGenerationLibraryItemContentConfiguration = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(CodeGenerationLibraryItemContentConfiguration, _super);
function CodeGenerationLibraryItemContentConfiguration() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._platform = 0;
_this._location = 0;
return _this;
}
Object.defineProperty(CodeGenerationLibraryItemContentConfiguration.prototype, "platform", {
get: function () {
return this._platform;
},
set: function (a) {
this._platform = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(CodeGenerationLibraryItemContentConfiguration.prototype, "location", {
get: function () {
return this._location;
},
set: function (a) {
this._location = a;
},
enumerable: false,
configurable: true
});
CodeGenerationLibraryItemContentConfiguration.a = function (a) {
var b = typeCast(JsonDictionaryObject.$, a);
if (b == null) {
return null;
}
var c = new CodeGenerationLibraryItemContentConfiguration();
c.platform = 10;
if (b.g("platform")) {
var d = b.item("platform");
c.platform = CodeGenerationLibraryItemContent.c(d);
}
c.location = 0;
if (b.g("location")) {
var e = b.item("location");
c.location = CodeGenerationLibraryItemContentConfiguration.c(e);
}
return c;
};
CodeGenerationLibraryItemContentConfiguration.c = function (a) {
var b = a.value;
var c;
if (((function () { var d = EnumUtil.tryParse$1(CodeGenerationLibraryItemContentLocation_$type, b, true, c); c = d.p2; return d.ret; })())) {
return c;
}
return 0;
};
CodeGenerationLibraryItemContentConfiguration.prototype.e = function () {
var _this = this;
var a = new JsonDictionaryObject();
a.item("platform", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = EnumUtil.getName(CodeGenerationLibraryItemPlatform_$type, _this.platform);
return $ret;
})()));
a.item("location", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = EnumUtil.getName(CodeGenerationLibraryItemContentLocation_$type, _this.location);
return $ret;
})()));
return a;
};
CodeGenerationLibraryItemContentConfiguration.$t = markType(CodeGenerationLibraryItemContentConfiguration, 'CodeGenerationLibraryItemContentConfiguration');
return CodeGenerationLibraryItemContentConfiguration;
}(Base));
export { CodeGenerationLibraryItemContentConfiguration };
/**
* @hidden
*/
var CodeGenerationLibraryItemContent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(CodeGenerationLibraryItemContent, _super);
function CodeGenerationLibraryItemContent() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._platform = 0;
_this._content = null;
_this._isJson = false;
_this._isAsync = false;
_this._isJSContent = false;
_this._configs = null;
return _this;
}
Object.defineProperty(CodeGenerationLibraryItemContent.prototype, "platform", {
get: function () {
return this._platform;
},
set: function (a) {
this._platform = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(CodeGenerationLibraryItemContent.prototype, "content", {
get: function () {
return this._content;
},
set: function (a) {
this._content = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(CodeGenerationLibraryItemContent.prototype, "isJson", {
get: function () {
return this._isJson;
},
set: function (a) {
this._isJson = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(CodeGenerationLibraryItemContent.prototype, "isAsync", {
get: function () {
return this._isAsync;
},
set: function (a) {
this._isAsync = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(CodeGenerationLibraryItemContent.prototype, "isJSContent", {
get: function () {
return this._isJSContent;
},
set: function (a) {
this._isJSContent = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(CodeGenerationLibraryItemContent.prototype, "configs", {
get: function () {
return this._configs;
},
set: function (a) {
this._configs = a;
},
enumerable: false,
configurable: true
});
CodeGenerationLibraryItemContent.b = function (a) {
var b = new CodeGenerationLibraryItemContent();
if (typeCast(JsonDictionaryObject.$, a) !== null) {
var c = a;
if (c.g("platform")) {
var d = c.item("platform");
b.platform = CodeGenerationLibraryItemContent.c(d);
}
if (c.g("content")) {
var e = c.item("content");
b.content = e.value;
}
if (c.g("isJson")) {
var f = c.item("isJson");
b.isJson = f.value;
}
if (c.g("isJSContent")) {
var g = c.item("isJSContent");
b.isJSContent = g.value;
}
if (c.g("isAsync")) {
var h = c.item("isAsync");
b.isAsync = h.value;
}
if (c.g("configs")) {
var i = c.item("configs");
if (i != null && i.items != null && i.items.length > 0) {
var j = new Array(i.items.length);
for (var k = 0; k < i.items.length; k++) {
var l = i.items[k];
if (l != null) {
var m = CodeGenerationLibraryItemContentConfiguration.a(l);
j[k] = m;
}
}
b.configs = j;
}
}
}
return b;
};
CodeGenerationLibraryItemContent.prototype.e = function () {
var _this = this;
var a = new JsonDictionaryObject();
a.item("platform", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = EnumUtil.getName(CodeGenerationLibraryItemPlatform_$type, _this.platform);
return $ret;
})()));
a.item("content", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = _this.content;
return $ret;
})()));
a.item("isJson", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 1;
$ret.value = _this.isJson;
return $ret;
})()));
a.item("isJSContent", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 1;
$ret.value = _this.isJSContent;
return $ret;
})()));
a.item("isAsync", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 1;
$ret.value = _this.isAsync;
return $ret;
})()));
if (this.configs != null && this.configs.length > 0) {
a.item("configs", new JsonDictionaryArray());
var b = new Array(this.configs.length);
for (var c = 0; c < this.configs.length; c++) {
var d = this.configs[c].e();
b[c] = d;
}
a.item("configs").items = b;
}
return a;
};
CodeGenerationLibraryItemContent.c = function (a) {
var b = a.value;
var c;
if (((function () { var d = EnumUtil.tryParse$1(CodeGenerationLibraryItemPlatform_$type, b, true, c); c = d.p2; return d.ret; })())) {
return c;
}
return 12;
};
CodeGenerationLibraryItemContent.$t = markType(CodeGenerationLibraryItemContent, 'CodeGenerationLibraryItemContent');
return CodeGenerationLibraryItemContent;
}(Base));
export { CodeGenerationLibraryItemContent };