UNPKG

igniteui-react-core

Version:
765 lines (764 loc) 23.9 kB
/* 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, fromEnum, markType, EnumUtil } from "./type"; import { List$1 } from "./List$1"; import { JsonDictionaryObject } from "./JsonDictionaryObject"; import { JsonDictionaryArray } from "./JsonDictionaryArray"; import { JsonDictionaryValue } from "./JsonDictionaryValue"; import { TypeDescriptionWellKnownType_$type } from "./TypeDescriptionWellKnownType"; /** * @hidden */ export let ComponentRendererMethodHelperBuilder = /*@__PURE__*/ (() => { class ComponentRendererMethodHelperBuilder extends Base { constructor(a, b) { super(); this.e = null; this.f = null; this.d = new List$1(ComponentRendererMethodHelperArgumentBuilder.$, 0); this.b = null; this.e = a; this.f = b; } argument() { let a = new ComponentRendererMethodHelperArgumentBuilder(this); this.d.add(a); return a; } $return() { let a = new ComponentRendererMethodHelperReturnBuilder(this); this.b = a; return a; } build() { let a = new JsonDictionaryObject(); let b = new JsonDictionaryArray(); a.item("args", b); let c = new Array(this.d.count); let d = 0; for (let e of fromEnum(this.d)) { c[d] = e.y(); d++; } b.items = c; if (this.f != null) { a.item("targetRef", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.f; return $ret; })())); } a.item("methodName", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.e; return $ret; })())); if (this.b == null) { this.$return().asVoid(); } a.item("return", this.b.x()); return a.b(); } } ComponentRendererMethodHelperBuilder.$t = /*@__PURE__*/ markType(ComponentRendererMethodHelperBuilder, 'ComponentRendererMethodHelperBuilder'); return ComponentRendererMethodHelperBuilder; })(); /** * @hidden */ export let ComponentRendererMethodHelperArgumentBuilder = /*@__PURE__*/ (() => { class ComponentRendererMethodHelperArgumentBuilder extends Base { constructor(a) { super(); this.v = null; this.z = 0; this.ac = null; this.ab = null; this.aa = null; this.x = null; this.v = a; } argument() { return this.v.argument(); } $return() { return this.v.$return(); } build() { return this.v.build(); } asInt(a) { this.z = 1; this.ac = null; this.ab = "int"; this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a; return $ret; })()); return this; } asIntArray(a) { this.z = 10; this.ac = null; this.ab = "int"; if (a == null) { this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 3; $ret.value = null; return $ret; })()); } else { let b = new JsonDictionaryArray(); b.items = new Array(a.length); for (let c = 0; c < a.length; c++) { b.items[c] = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a[c]; return $ret; })()); } this.x = b; } return this; } asDouble(a) { this.z = 1; this.ac = null; this.ab = "double"; this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a; return $ret; })()); return this; } asDoubleArray(a) { this.z = 10; this.ac = null; this.ab = "double"; if (a == null) { this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 3; $ret.value = null; return $ret; })()); } else { let b = new JsonDictionaryArray(); b.items = new Array(a.length); for (let c = 0; c < a.length; c++) { b.items[c] = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a[c]; return $ret; })()); } this.x = b; } return this; } asShort(a) { this.z = 1; this.ac = null; this.ab = "short"; this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a; return $ret; })()); return this; } asShortArray(a) { this.z = 10; this.ac = null; this.ab = "short"; if (a == null) { this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 3; $ret.value = null; return $ret; })()); } else { let b = new JsonDictionaryArray(); b.items = new Array(a.length); for (let c = 0; c < a.length; c++) { b.items[c] = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a[c]; return $ret; })()); } this.x = b; } return this; } asLong(a) { this.z = 1; this.ac = null; this.ab = "long"; this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a; return $ret; })()); return this; } asLongArray(a) { this.z = 10; this.ac = null; this.ab = "long"; if (a == null) { this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 3; $ret.value = null; return $ret; })()); } else { let b = new JsonDictionaryArray(); b.items = new Array(a.length); for (let c = 0; c < a.length; c++) { b.items[c] = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a[c]; return $ret; })()); } this.x = b; } return this; } asFloat(a) { this.z = 1; this.ac = null; this.ab = "float"; this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a; return $ret; })()); return this; } asFloatArray(a) { this.z = 10; this.ac = null; this.ab = "float"; if (a == null) { this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 3; $ret.value = null; return $ret; })()); } else { let b = new JsonDictionaryArray(); b.items = new Array(a.length); for (let c = 0; c < a.length; c++) { b.items[c] = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a[c]; return $ret; })()); } this.x = b; } return this; } asEnum(a, b) { this.z = 8; this.ac = a.typeName; this.ab = "string"; if (b == null) { this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 3; $ret.value = null; return $ret; })()); } else { this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = b.toString(); return $ret; })()); } return this; } asString(a) { this.z = 2; this.ac = null; this.ab = "string"; if (a == null) { this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 3; $ret.value = null; return $ret; })()); } else { this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = a; return $ret; })()); } return this; } asStringArray(a) { this.z = 10; this.ac = null; this.ab = "string"; if (a == null) { this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 3; $ret.value = null; return $ret; })()); } else { let b = new JsonDictionaryArray(); b.items = new Array(a.length); for (let c = 0; c < a.length; c++) { b.items[c] = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = a[c]; return $ret; })()); } this.x = b; } return this; } asPublicTypeRef(a, b) { this.z = 8; this.ac = a; this.ab = a; if (b == null) { this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 3; $ret.value = null; return $ret; })()); } else { let c = new JsonDictionaryObject(); c.item("refType", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = "name"; return $ret; })())); c.item("id", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = b.name; return $ret; })())); this.x = c; } return this; } asPoint(a) { this.z = 11; this.ac = null; this.ab = null; let b = new JsonDictionaryObject(); b.item("x", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a.x; return $ret; })())); b.item("y", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a.y; return $ret; })())); this.x = b; return this; } asSize(a) { this.z = 12; this.ac = null; this.ab = null; let b = new JsonDictionaryObject(); b.item("width", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a.width; return $ret; })())); b.item("height", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a.height; return $ret; })())); this.x = b; return this; } asRect(a) { this.z = 14; this.ac = null; this.ab = null; let b = new JsonDictionaryObject(); b.item("left", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a.left; return $ret; })())); b.item("top", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a.top; return $ret; })())); b.item("width", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a.width; return $ret; })())); b.item("height", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 0; $ret.value = a.height; return $ret; })())); this.x = b; return this; } asMethodRef(a) { this.z = 18; this.ac = null; this.ab = null; let b = new JsonDictionaryObject(); b.item("refType", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = "name"; return $ret; })())); b.item("id", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = a; return $ret; })())); this.x = b; return this; } asBool(a) { this.z = 2; this.ac = null; this.ab = "boolean"; this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 1; $ret.value = a; return $ret; })()); return this; } asBoolArray(a) { this.z = 10; this.ac = null; this.ab = "boolean"; if (a == null) { this.x = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 3; $ret.value = null; return $ret; })()); } else { let b = new JsonDictionaryArray(); b.items = new Array(a.length); for (let c = 0; c < a.length; c++) { b.items[c] = ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 1; $ret.value = a[c]; return $ret; })()); } this.x = b; } return this; } y() { let a = new JsonDictionaryObject(); a.item("knownType", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = EnumUtil.getName(TypeDescriptionWellKnownType_$type, this.z); return $ret; })())); if (this.ac != null) { a.item("specificType", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.ac; return $ret; })())); } if (this.ab != null) { a.item("specificExternalType", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.ab; return $ret; })())); } if (this.aa != null) { a.item("collectionElementType", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.aa; return $ret; })())); } if (this.x != null) { a.item("value", this.x); } else { a.item("value", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 3; return $ret; })())); } return a; } } ComponentRendererMethodHelperArgumentBuilder.$t = /*@__PURE__*/ markType(ComponentRendererMethodHelperArgumentBuilder, 'ComponentRendererMethodHelperArgumentBuilder'); return ComponentRendererMethodHelperArgumentBuilder; })(); /** * @hidden */ export let ComponentRendererMethodHelperReturnBuilder = /*@__PURE__*/ (() => { class ComponentRendererMethodHelperReturnBuilder extends Base { constructor(a) { super(); this.b = null; this.y = 0; this.ab = null; this.aa = null; this.z = null; this.b = a; } argument() { return this.b.argument(); } $return() { return this.b.$return(); } build() { return this.b.build(); } asInt() { this.y = 1; this.ab = null; this.aa = "int"; return this; } asIntArray() { this.y = 10; this.ab = null; this.aa = "int"; return this; } asDouble() { this.y = 1; this.ab = null; this.aa = "double"; return this; } asDoubleArray() { this.y = 10; this.ab = null; this.aa = "double"; return this; } asShort() { this.y = 1; this.ab = null; this.aa = "short"; return this; } asShortArray() { this.y = 10; this.ab = null; this.aa = "short"; return this; } asLong() { this.y = 1; this.ab = null; this.aa = "long"; return this; } asLongArray() { this.y = 10; this.ab = null; this.aa = "long"; return this; } asFlout() { this.y = 1; this.ab = null; this.aa = "float"; return this; } asFloatArray() { this.y = 10; this.ab = null; this.aa = "float"; return this; } asEnum(a) { this.y = 8; this.ab = a.typeName; this.aa = "string"; return this; } asString() { this.y = 2; this.ab = null; this.aa = "string"; return this; } asStringArray() { this.y = 10; this.ab = null; this.aa = "string"; return this; } asPublicTypeRef(a) { this.y = 8; this.ab = a; this.aa = a; let b = new JsonDictionaryObject(); b.item("refType", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = "name"; return $ret; })())); b.item("id", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = "name"; return $ret; })())); return this; } asPoint() { this.y = 11; this.ab = null; this.aa = null; return this; } asSize() { this.y = 12; this.ab = null; this.aa = null; return this; } asRect() { this.y = 14; this.ab = null; this.aa = null; return this; } asMethodRef() { this.y = 18; this.ab = null; this.aa = null; return this; } asBool() { this.y = 7; this.ab = null; this.aa = "boolean"; return this; } x() { let a = new JsonDictionaryObject(); a.item("knownType", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = EnumUtil.getName(TypeDescriptionWellKnownType_$type, this.y); return $ret; })())); if (this.ab != null) { a.item("specificType", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.ab; return $ret; })())); } if (this.aa != null) { a.item("specificExternalType", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.aa; return $ret; })())); } if (this.z != null) { a.item("collectionElementType", ((() => { let $ret = new JsonDictionaryValue(); $ret.e = 2; $ret.value = this.z; return $ret; })())); } return a; } asVoid() { this.y = 0; this.ab = null; this.aa = null; return this; } } ComponentRendererMethodHelperReturnBuilder.$t = /*@__PURE__*/ markType(ComponentRendererMethodHelperReturnBuilder, 'ComponentRendererMethodHelperReturnBuilder'); return ComponentRendererMethodHelperReturnBuilder; })();