igniteui-angular-core
Version:
Ignite UI Angular Core logic used in multiple UI components.
1,413 lines (1,412 loc) • 47.6 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, __values } from "tslib";
import { Base, fromEnum, markType, typeGetValue, typeCast, Array_$type, Boolean_$type, 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";
import { EmbeddedRefDescription } from "./EmbeddedRefDescription";
import { dateToStringFormat } from "./dateExtended";
import { isInfinity, isPositiveInfinity, isNaN_ } from "./number";
/**
* @hidden
*/
var ComponentRendererMethodHelperBuilder = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ComponentRendererMethodHelperBuilder, _super);
function ComponentRendererMethodHelperBuilder(a, b) {
var _this = _super.call(this) || this;
_this.k = null;
_this.l = null;
_this.i = new List$1(ComponentRendererMethodHelperArgumentBuilder.$, 0);
_this.c = null;
_this.f = false;
_this.k = a;
_this.l = b;
return _this;
}
Object.defineProperty(ComponentRendererMethodHelperBuilder.prototype, "methodName", {
get: function () {
return this.k;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ComponentRendererMethodHelperBuilder.prototype, "targetRef", {
get: function () {
return this.l;
},
enumerable: false,
configurable: true
});
ComponentRendererMethodHelperBuilder.prototype.getArgumentCount = function () {
return this.i.count;
};
ComponentRendererMethodHelperBuilder.prototype.getArgument = function (a) {
return this.i._inner[a];
};
ComponentRendererMethodHelperBuilder.prototype.hasReturn = function () {
return this.c != null;
};
ComponentRendererMethodHelperBuilder.prototype.getReturn = function () {
return this.c;
};
Object.defineProperty(ComponentRendererMethodHelperBuilder.prototype, "reusable", {
get: function () {
return this.f;
},
set: function (a) {
this.f = a;
},
enumerable: false,
configurable: true
});
ComponentRendererMethodHelperBuilder.prototype.destroy = function () {
var e_1, _a;
try {
for (var _b = __values(fromEnum(this.i)), _c = _b.next(); !_c.done; _c = _b.next()) {
var a = _c.value;
a.aw();
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
if (this.c != null) {
this.c.aq();
}
};
ComponentRendererMethodHelperBuilder.prototype.argument = function () {
var a = new ComponentRendererMethodHelperArgumentBuilder(this);
this.i.add(a);
return a;
};
ComponentRendererMethodHelperBuilder.prototype.$return = function () {
var a = new ComponentRendererMethodHelperReturnBuilder(this);
this.c = a;
return a;
};
ComponentRendererMethodHelperBuilder.prototype.build = function () {
var e_2, _a;
var _this = this;
var a = new JsonDictionaryObject();
var b = new JsonDictionaryArray();
a.item("args", b);
var c = new Array(this.i.count);
var d = 0;
try {
for (var _b = __values(fromEnum(this.i)), _c = _b.next(); !_c.done; _c = _b.next()) {
var e = _c.value;
c[d] = e.aj();
d++;
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_2)
throw e_2.error;
}
}
b.items = c;
if (this.l != null) {
a.item("targetRef", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = _this.l;
return $ret;
})()));
}
a.item("methodName", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = _this.k;
return $ret;
})()));
if (this.c == null) {
this.$return().asVoid();
}
a.item("return", this.c.af());
var f = a.b();
if (!this.f) {
this.destroy();
}
return f;
};
ComponentRendererMethodHelperBuilder.$t = markType(ComponentRendererMethodHelperBuilder, 'ComponentRendererMethodHelperBuilder');
return ComponentRendererMethodHelperBuilder;
}(Base));
export { ComponentRendererMethodHelperBuilder };
/**
* @hidden
*/
var ComponentRendererMethodHelperArgumentBuilder = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ComponentRendererMethodHelperArgumentBuilder, _super);
function ComponentRendererMethodHelperArgumentBuilder(a) {
var _this = _super.call(this) || this;
_this.ag = null;
_this.am = 0;
_this.aq = null;
_this.ap = null;
_this.ao = null;
_this.ai = null;
_this.ag = a;
return _this;
}
ComponentRendererMethodHelperArgumentBuilder.prototype.destroy = function () {
if (this.ag != null) {
this.ag.destroy();
}
};
ComponentRendererMethodHelperArgumentBuilder.prototype.aw = function () {
this.ag = null;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.argument = function () {
return this.ag.argument();
};
ComponentRendererMethodHelperArgumentBuilder.prototype.$return = function () {
return this.ag.$return();
};
ComponentRendererMethodHelperArgumentBuilder.prototype.build = function () {
return this.ag.build();
};
Object.defineProperty(ComponentRendererMethodHelperArgumentBuilder.prototype, "an", {
get: function () {
return this.am;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ComponentRendererMethodHelperArgumentBuilder.prototype, "at", {
get: function () {
return this.ap;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ComponentRendererMethodHelperArgumentBuilder.prototype, "au", {
get: function () {
return this.aq;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ComponentRendererMethodHelperArgumentBuilder.prototype, "as", {
get: function () {
return this.ao;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ComponentRendererMethodHelperArgumentBuilder.prototype, "ak", {
get: function () {
return this.ai;
},
enumerable: false,
configurable: true
});
ComponentRendererMethodHelperArgumentBuilder.prototype.asInt = function (a) {
this.am = 1;
this.aq = null;
this.ap = "int";
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a;
return $ret;
})());
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asIntArray = function (a) {
this.am = 10;
this.aq = null;
this.ap = "int";
if (a == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
var b = new JsonDictionaryArray();
b.items = new Array(a.length);
var _loop_1 = function (c) {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a[c];
return $ret;
})());
};
for (var c = 0; c < a.length; c++) {
_loop_1(c);
}
this.ai = b;
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asDouble = function (a) {
this.am = 1;
this.aq = null;
this.ap = "double";
this.ai = this.al(a);
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asPixel = function (a) {
this.am = 24;
this.aq = null;
this.ap = "double";
this.ai = this.al(a);
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asDate = function (a) {
this.am = 3;
this.aq = null;
this.ap = null;
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = dateToStringFormat(a, "o");
return $ret;
})());
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asDateArray = function (a) {
this.am = 10;
this.aq = null;
this.ap = "DateTime";
if (a == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
var b = new JsonDictionaryArray();
b.items = new Array(a.length);
var _loop_2 = function (c) {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = dateToStringFormat(a[c], "o");
return $ret;
})());
};
for (var c = 0; c < a.length; c++) {
_loop_2(c);
}
this.ai = b;
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asDoubleArray = function (a) {
this.am = 10;
this.aq = null;
this.ap = "double";
if (a == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
var b = new JsonDictionaryArray();
b.items = new Array(a.length);
var _loop_3 = function (c) {
if (isInfinity(a[c])) {
if (isPositiveInfinity(a[c])) {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = "@dbl:INFINITY";
return $ret;
})());
}
else {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = "@dbl:-INFINITY";
return $ret;
})());
}
}
else {
if (isNaN_(a[c])) {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a[c];
return $ret;
})());
}
}
};
for (var c = 0; c < a.length; c++) {
_loop_3(c);
}
this.ai = b;
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asShort = function (a) {
this.am = 1;
this.aq = null;
this.ap = "short";
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a;
return $ret;
})());
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asShortArray = function (a) {
this.am = 10;
this.aq = null;
this.ap = "short";
if (a == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
var b = new JsonDictionaryArray();
b.items = new Array(a.length);
var _loop_4 = function (c) {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a[c];
return $ret;
})());
};
for (var c = 0; c < a.length; c++) {
_loop_4(c);
}
this.ai = b;
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asLong = function (a) {
this.am = 1;
this.aq = null;
this.ap = "long";
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a;
return $ret;
})());
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asLongArray = function (a) {
this.am = 10;
this.aq = null;
this.ap = "long";
if (a == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
var b = new JsonDictionaryArray();
b.items = new Array(a.length);
var _loop_5 = function (c) {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a[c];
return $ret;
})());
};
for (var c = 0; c < a.length; c++) {
_loop_5(c);
}
this.ai = b;
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asFloat = function (a) {
this.am = 1;
this.aq = null;
this.ap = "float";
if (isInfinity(a)) {
if (isPositiveInfinity(a)) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = "@flt:INFINITY";
return $ret;
})());
}
else {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = "@flt:-INFINITY";
return $ret;
})());
}
}
else {
if (isNaN_(a)) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a;
return $ret;
})());
}
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asFloatArray = function (a) {
this.am = 10;
this.aq = null;
this.ap = "float";
if (a == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
var b = new JsonDictionaryArray();
b.items = new Array(a.length);
var _loop_6 = function (c) {
if (isInfinity(a[c])) {
if (isPositiveInfinity(a[c])) {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = "@dbl:INFINITY";
return $ret;
})());
}
else {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = "@dbl:-INFINITY";
return $ret;
})());
}
}
else {
if (isNaN_(a[c])) {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a[c];
return $ret;
})());
}
}
};
for (var c = 0; c < a.length; c++) {
_loop_6(c);
}
this.ai = b;
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asEnum1 = function (a, b) {
this.am = 8;
this.aq = "string";
this.ap = a.typeName;
if (b == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = b.toString();
return $ret;
})());
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asEnum = function (a, b) {
this.am = 8;
this.aq = "string";
this.ap = a;
if (b == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = b.toString();
return $ret;
})());
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asString = function (a) {
this.am = 2;
this.aq = null;
this.ap = "string";
if (a == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = a;
return $ret;
})());
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asStringArray = function (a) {
this.am = 10;
this.aq = null;
this.ap = "string";
if (a == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
var b = new JsonDictionaryArray();
b.items = new Array(a.length);
var _loop_7 = function (c) {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = a[c];
return $ret;
})());
};
for (var c = 0; c < a.length; c++) {
_loop_7(c);
}
this.ai = b;
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asEmbeddedRefArray = function (a) {
this.am = 10;
this.aq = null;
this.ap = null;
if (a == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
var b = new JsonDictionaryArray();
b.items = new Array(a.length);
var _loop_8 = function (c) {
var d = a[c];
var e = new JsonDictionaryObject();
e.item("refType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = d.refType;
return $ret;
})()));
e.item("id", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = d.value;
return $ret;
})()));
b.items[c] = e;
};
for (var c = 0; c < a.length; c++) {
_loop_8(c);
}
this.ai = b;
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asPublicTypeRef = function (a, b) {
this.am = 8;
this.aq = a;
this.ap = a;
if (b == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
var c = new JsonDictionaryObject();
c.item("refType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = "name";
return $ret;
})()));
c.item("id", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = b.value;
return $ret;
})()));
this.ai = c;
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asEmbeddedRef = function (a) {
this.am = 8;
this.aq = null;
this.ap = null;
if (a == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
var b = new JsonDictionaryObject();
b.item("refType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = a.refType;
return $ret;
})()));
b.item("id", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = a.value;
return $ret;
})()));
this.ai = b;
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.al = function (a) {
if (isInfinity(a)) {
if (isPositiveInfinity(a)) {
return ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = "@dbl:INFINITY";
return $ret;
})());
}
else {
return ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = "@dbl:-INFINITY";
return $ret;
})());
}
}
return ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = isNaN_(a) ? 3 : 0;
$ret.value = isNaN_(a) ? null : a;
return $ret;
})());
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asPoint = function (a) {
this.am = 11;
this.aq = null;
this.ap = null;
var b = new JsonDictionaryObject();
b.item("x", this.al(a.x));
b.item("y", this.al(a.y));
this.ai = b;
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asPixelPoint = function (a) {
this.am = 25;
this.aq = null;
this.ap = null;
var b = new JsonDictionaryObject();
b.item("x", this.al(a.x));
b.item("y", this.al(a.y));
this.ai = b;
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asSize = function (a) {
this.am = 12;
this.aq = null;
this.ap = null;
var b = new JsonDictionaryObject();
b.item("width", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a.width;
return $ret;
})()));
b.item("height", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a.height;
return $ret;
})()));
this.ai = b;
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asPixelSize = function (a) {
this.am = 27;
this.aq = null;
this.ap = null;
var b = new JsonDictionaryObject();
b.item("width", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a.width;
return $ret;
})()));
b.item("height", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a.height;
return $ret;
})()));
this.ai = b;
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asRect = function (a) {
this.am = 14;
this.aq = null;
this.ap = null;
var b = new JsonDictionaryObject();
b.item("left", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a.left;
return $ret;
})()));
b.item("top", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a.top;
return $ret;
})()));
b.item("width", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a.width;
return $ret;
})()));
b.item("height", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a.height;
return $ret;
})()));
this.ai = b;
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asPixelRect = function (a) {
this.am = 26;
this.aq = null;
this.ap = null;
var b = new JsonDictionaryObject();
b.item("left", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a.left;
return $ret;
})()));
b.item("top", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a.top;
return $ret;
})()));
b.item("width", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a.width;
return $ret;
})()));
b.item("height", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 0;
$ret.value = a.height;
return $ret;
})()));
this.ai = b;
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asMethodRef = function (a) {
this.am = 18;
this.aq = null;
this.ap = null;
var b = new JsonDictionaryObject();
b.item("refType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = "name";
return $ret;
})()));
b.item("id", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = a;
return $ret;
})()));
this.ai = b;
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asBool = function (a) {
this.am = 2;
this.aq = null;
this.ap = "boolean";
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 1;
$ret.value = a;
return $ret;
})());
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asPrimitive = function (a) {
if (a == null) {
this.am = 17;
this.aq = null;
this.ap = null;
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
if (typeof a === 'number') {
return this.asDouble(a);
}
if (typeof a === 'number') {
return this.asInt(typeGetValue(a));
}
if (typeof a === 'number') {
return this.asLong(typeGetValue(a));
}
if (typeof a === 'number') {
return this.asFloat(a);
}
if (typeof a === 'number') {
return this.asShort(typeGetValue(a));
}
if (typeof a === 'number') {
return this.asDouble(a);
}
if (typeCast(Array_$type, a) !== null) {
if (a.length > 0) {
var b = a[0];
if (typeof b === 'number') {
return this.asDoubleArray(a);
}
}
}
if (typeof a === 'string') {
return this.asString(a);
}
if (typeCast(Array_$type, a) !== null) {
if (a.length > 0) {
var c = a[0];
if (typeof c === 'string') {
return this.asStringArray(a);
}
}
}
if (typeCast(Boolean_$type, a) !== null) {
return this.asBool(a);
}
if (typeCast(EmbeddedRefDescription.$, a) !== null) {
return this.asEmbeddedRef(a);
}
return this.asString(a);
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asPrimitiveArray = function (a) {
if (a == null) {
this.am = 17;
this.aq = null;
this.ap = null;
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
if (typeCast(Array_$type, a) !== null) {
if (a.length > 0) {
var b = a[0];
if (typeof b === 'number') {
return this.asDoubleArray(a);
}
}
}
if (typeCast(Array_$type, a) !== null) {
if (a.length > 0) {
var c = a[0];
if (typeof c === 'string') {
return this.asStringArray(a);
}
}
}
if (typeCast(Array_$type, a) !== null) {
if (a.length > 0) {
var d = a[0];
if (typeCast(Boolean_$type, d) !== null) {
return this.asBoolArray(a);
}
}
}
if (typeCast(Array_$type, a) !== null) {
if (a.length > 0) {
var e = a[0];
if (typeCast(EmbeddedRefDescription.$, e) !== null) {
return this.asEmbeddedRefArray(a);
}
}
}
return this.asStringArray(a);
};
ComponentRendererMethodHelperArgumentBuilder.prototype.asBoolArray = function (a) {
this.am = 10;
this.aq = null;
this.ap = "boolean";
if (a == null) {
this.ai = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
$ret.value = null;
return $ret;
})());
}
else {
var b = new JsonDictionaryArray();
b.items = new Array(a.length);
var _loop_9 = function (c) {
b.items[c] = ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 1;
$ret.value = a[c];
return $ret;
})());
};
for (var c = 0; c < a.length; c++) {
_loop_9(c);
}
this.ai = b;
}
return this;
};
ComponentRendererMethodHelperArgumentBuilder.prototype.aj = function () {
var _this = this;
var a = new JsonDictionaryObject();
a.item("knownType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = EnumUtil.getName(TypeDescriptionWellKnownType_$type, _this.am);
return $ret;
})()));
if (this.aq != null) {
a.item("specificType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = _this.aq;
return $ret;
})()));
}
if (this.ap != null) {
a.item("specificExternalType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = _this.ap;
return $ret;
})()));
}
if (this.ao != null) {
a.item("collectionElementType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = _this.ao;
return $ret;
})()));
}
if (this.ai != null) {
a.item("value", this.ai);
}
else {
a.item("value", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 3;
return $ret;
})()));
}
return a;
};
ComponentRendererMethodHelperArgumentBuilder.$t = markType(ComponentRendererMethodHelperArgumentBuilder, 'ComponentRendererMethodHelperArgumentBuilder');
return ComponentRendererMethodHelperArgumentBuilder;
}(Base));
export { ComponentRendererMethodHelperArgumentBuilder };
/**
* @hidden
*/
var ComponentRendererMethodHelperReturnBuilder = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ComponentRendererMethodHelperReturnBuilder, _super);
function ComponentRendererMethodHelperReturnBuilder(a) {
var _this = _super.call(this) || this;
_this.b = null;
_this.ag = 0;
_this.ak = null;
_this.aj = null;
_this.ai = null;
_this.b = a;
return _this;
}
ComponentRendererMethodHelperReturnBuilder.prototype.destroy = function () {
if (this.b != null) {
this.b.destroy();
}
};
ComponentRendererMethodHelperReturnBuilder.prototype.aq = function () {
this.b = null;
};
ComponentRendererMethodHelperReturnBuilder.prototype.argument = function () {
return this.b.argument();
};
ComponentRendererMethodHelperReturnBuilder.prototype.$return = function () {
return this.b.$return();
};
ComponentRendererMethodHelperReturnBuilder.prototype.build = function () {
var a = this.b.build();
return a;
};
Object.defineProperty(ComponentRendererMethodHelperReturnBuilder.prototype, "ah", {
get: function () {
return this.ag;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ComponentRendererMethodHelperReturnBuilder.prototype, "an", {
get: function () {
return this.aj;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ComponentRendererMethodHelperReturnBuilder.prototype, "ao", {
get: function () {
return this.ak;
},
enumerable: false,
configurable: true
});
Object.defineProperty(ComponentRendererMethodHelperReturnBuilder.prototype, "am", {
get: function () {
return this.ai;
},
enumerable: false,
configurable: true
});
ComponentRendererMethodHelperReturnBuilder.prototype.asInt = function () {
this.ag = 1;
this.ak = null;
this.aj = "int";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asPrimitive = function () {
this.ag = 17;
this.ak = null;
this.aj = null;
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asIntArray = function () {
this.ag = 10;
this.ak = null;
this.aj = "int";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asDouble = function () {
this.ag = 1;
this.ak = null;
this.aj = "double";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asPixel = function () {
this.ag = 24;
this.ak = null;
this.aj = "double";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asDoubleArray = function () {
this.ag = 10;
this.ak = null;
this.aj = "double";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asDate = function () {
this.ag = 3;
this.ak = null;
this.aj = null;
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asShort = function () {
this.ag = 1;
this.ak = null;
this.aj = "short";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asShortArray = function () {
this.ag = 10;
this.ak = null;
this.aj = "short";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asLong = function () {
this.ag = 1;
this.ak = null;
this.aj = "long";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asLongArray = function () {
this.ag = 10;
this.ak = null;
this.aj = "long";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asPrimitiveArray = function () {
this.ag = 10;
this.ak = null;
this.aj = null;
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asPublicTypeRefArray = function (a) {
this.ag = 10;
this.ak = null;
this.aj = a;
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asFloat = function () {
this.ag = 1;
this.ak = null;
this.aj = "float";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asFloatArray = function () {
this.ag = 10;
this.ak = null;
this.aj = "float";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asEnum = function (a) {
this.ag = 8;
this.ak = a.typeName;
this.aj = "string";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asString = function () {
this.ag = 2;
this.ak = null;
this.aj = "string";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asStringArray = function () {
this.ag = 10;
this.ak = null;
this.aj = "string";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asPublicTypeRef = function (a) {
this.ag = 8;
this.ak = a;
this.aj = a;
var b = new JsonDictionaryObject();
b.item("refType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = "name";
return $ret;
})()));
b.item("id", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = "name";
return $ret;
})()));
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asPoint = function () {
this.ag = 11;
this.ak = null;
this.aj = null;
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asPixelPoint = function () {
this.ag = 25;
this.ak = null;
this.aj = null;
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asPIxelSize = function () {
this.ag = 27;
this.ak = null;
this.aj = null;
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asSize = function () {
this.ag = 12;
this.ak = null;
this.aj = null;
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asPixelRect = function () {
this.ag = 26;
this.ak = null;
this.aj = null;
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asRect = function () {
this.ag = 14;
this.ak = null;
this.aj = null;
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asMethodRef = function () {
this.ag = 18;
this.ak = null;
this.aj = null;
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asBool = function () {
this.ag = 7;
this.ak = null;
this.aj = "boolean";
return this;
};
ComponentRendererMethodHelperReturnBuilder.prototype.af = function () {
var _this = this;
var a = new JsonDictionaryObject();
a.item("knownType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = EnumUtil.getName(TypeDescriptionWellKnownType_$type, _this.ag);
return $ret;
})()));
if (this.ak != null) {
a.item("specificType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = _this.ak;
return $ret;
})()));
}
if (this.aj != null) {
a.item("specificExternalType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = _this.aj;
return $ret;
})()));
}
if (this.ai != null) {
a.item("collectionElementType", ((function () {
var $ret = new JsonDictionaryValue();
$ret.e = 2;
$ret.value = _this.ai;
return $ret;
})()));
}
return a;
};
ComponentRendererMethodHelperReturnBuilder.prototype.asVoid = function () {
this.ag = 0;
this.ak = null;
this.aj = null;
return this;
};
ComponentRendererMethodHelperReturnBuilder.$t = markType(ComponentRendererMethodHelperReturnBuilder, 'ComponentRendererMethodHelperReturnBuilder');
return ComponentRendererMethodHelperReturnBuilder;
}(Base));
export { ComponentRendererMethodHelperReturnBuilder };