igniteui-react-core
Version:
Ignite UI React Core.
227 lines (226 loc) • 8.34 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 { 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
*/
export let CodeGenerationLibraryItemContentConfiguration = /*@__PURE__*/ (() => {
class CodeGenerationLibraryItemContentConfiguration extends Base {
constructor() {
super(...arguments);
this._platform = 0;
this._location = 0;
}
get platform() {
return this._platform;
}
set platform(a) {
this._platform = a;
}
get location() {
return this._location;
}
set location(a) {
this._location = a;
}
static a(a) {
let b = typeCast(JsonDictionaryObject.$, a);
if (b == null) {
return null;
}
let c = new CodeGenerationLibraryItemContentConfiguration();
c.platform = 10;
if (b.g("platform")) {
let d = b.item("platform");
c.platform = CodeGenerationLibraryItemContent.c(d);
}
c.location = 0;
if (b.g("location")) {
let e = b.item("location");
c.location = CodeGenerationLibraryItemContentConfiguration.c(e);
}
return c;
}
static c(a) {
let b = a.value;
let c;
if (((() => { let d = EnumUtil.tryParse$1(CodeGenerationLibraryItemContentLocation_$type, b, true, c); c = d.p2; return d.ret; })())) {
return c;
}
return 0;
}
e() {
let a = new JsonDictionaryObject();
a.item("platform", ((() => {
let $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = EnumUtil.getName(CodeGenerationLibraryItemPlatform_$type, this.platform);
return $ret;
})()));
a.item("location", ((() => {
let $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = EnumUtil.getName(CodeGenerationLibraryItemContentLocation_$type, this.location);
return $ret;
})()));
return a;
}
}
CodeGenerationLibraryItemContentConfiguration.$t = /*@__PURE__*/ markType(CodeGenerationLibraryItemContentConfiguration, 'CodeGenerationLibraryItemContentConfiguration');
return CodeGenerationLibraryItemContentConfiguration;
})();
/**
* @hidden
*/
export let CodeGenerationLibraryItemContent = /*@__PURE__*/ (() => {
class CodeGenerationLibraryItemContent extends Base {
constructor() {
super(...arguments);
this._platform = 0;
this._content = null;
this._isJson = false;
this._isAsync = false;
this._isJSContent = false;
this._configs = null;
}
get platform() {
return this._platform;
}
set platform(a) {
this._platform = a;
}
get content() {
return this._content;
}
set content(a) {
this._content = a;
}
get isJson() {
return this._isJson;
}
set isJson(a) {
this._isJson = a;
}
get isAsync() {
return this._isAsync;
}
set isAsync(a) {
this._isAsync = a;
}
get isJSContent() {
return this._isJSContent;
}
set isJSContent(a) {
this._isJSContent = a;
}
get configs() {
return this._configs;
}
set configs(a) {
this._configs = a;
}
static b(a) {
let b = new CodeGenerationLibraryItemContent();
if (typeCast(JsonDictionaryObject.$, a) !== null) {
let c = a;
if (c.g("platform")) {
let d = c.item("platform");
b.platform = CodeGenerationLibraryItemContent.c(d);
}
if (c.g("content")) {
let e = c.item("content");
b.content = e.value;
}
if (c.g("isJson")) {
let f = c.item("isJson");
b.isJson = f.value;
}
if (c.g("isJSContent")) {
let g = c.item("isJSContent");
b.isJSContent = g.value;
}
if (c.g("isAsync")) {
let h = c.item("isAsync");
b.isAsync = h.value;
}
if (c.g("configs")) {
let i = c.item("configs");
if (i != null && i.items != null && i.items.length > 0) {
let j = new Array(i.items.length);
for (let k = 0; k < i.items.length; k++) {
let l = i.items[k];
if (l != null) {
let m = CodeGenerationLibraryItemContentConfiguration.a(l);
j[k] = m;
}
}
b.configs = j;
}
}
}
return b;
}
e() {
let a = new JsonDictionaryObject();
a.item("platform", ((() => {
let $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = EnumUtil.getName(CodeGenerationLibraryItemPlatform_$type, this.platform);
return $ret;
})()));
a.item("content", ((() => {
let $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = this.content;
return $ret;
})()));
a.item("isJson", ((() => {
let $ret = new JsonDictionaryValue();
$ret.e = 1;
$ret.value = this.isJson;
return $ret;
})()));
a.item("isJSContent", ((() => {
let $ret = new JsonDictionaryValue();
$ret.e = 1;
$ret.value = this.isJSContent;
return $ret;
})()));
a.item("isAsync", ((() => {
let $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());
let b = new Array(this.configs.length);
for (let c = 0; c < this.configs.length; c++) {
let d = this.configs[c].e();
b[c] = d;
}
a.item("configs").items = b;
}
return a;
}
static c(a) {
let b = a.value;
let c;
if (((() => { let d = EnumUtil.tryParse$1(CodeGenerationLibraryItemPlatform_$type, b, true, c); c = d.p2; return d.ret; })())) {
return c;
}
return 12;
}
}
CodeGenerationLibraryItemContent.$t = /*@__PURE__*/ markType(CodeGenerationLibraryItemContent, 'CodeGenerationLibraryItemContent');
return CodeGenerationLibraryItemContent;
})();