UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

1,275 lines 158 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 { __extends, __values } from "tslib"; import { Base, IList_$type, NotSupportedException, String_$type, typeCast, fromEnum, Array_$type, Boolean_$type, markType, EnumUtil, fromEn, Number_$type, runOn } from "./type"; import { CodeGenerationTargetPlatforms_$type } from "./CodeGenerationTargetPlatforms"; import { CodeGeneratingRendererResult } from "./CodeGeneratingRendererResult"; import { CodeGeneratingCodeWriter } from "./CodeGeneratingCodeWriter"; import { Stack$1 } from "./Stack$1"; import { CodeGenerationItemBuilderPropertyInfo } from "./CodeGenerationItemBuilderPropertyInfo"; import { List$1 } from "./List$1"; import { TypeDescriptionContext } from "./TypeDescriptionContext"; import { TypeDescriptionMetadata } from "./TypeDescriptionMetadata"; import { CodeGenerationSpecialValue } from "./CodeGenerationSpecialValue"; import { ColorUtil } from "./ColorUtil"; import { StringBuilder } from "./StringBuilder"; import { CodeGeneratingImportManager } from "./CodeGeneratingImportManager"; import { stringIsNullOrEmpty, stringReplace, stringStartsWith, stringEndsWith, stringContains } from "./string"; import { HashSet$1 } from "./HashSet$1"; import { WebImportsHalper } from "./WebImportsHalper"; import { CodeGeneratingComponentRendererHandlerEmitter } from "./CodeGeneratingComponentRendererHandlerEmitter"; import { CodeGeneratingRegexHelper } from "./CodeGeneratingRegexHelper"; import { CodeGeneratingComponentRendererDataEmitter } from "./CodeGeneratingComponentRendererDataEmitter"; import { Dictionary$2 } from "./Dictionary$2"; import { JsonDictionaryValue } from "./JsonDictionaryValue"; import { JsonDictionaryObject } from "./JsonDictionaryObject"; import { JsonDictionaryArray } from "./JsonDictionaryArray"; import { ComponentRenderer } from "./ComponentRenderer"; import { DotNetCodeGeneratingComponentRendererHandlerEmitter } from "./DotNetCodeGeneratingComponentRendererHandlerEmitter"; import { TSCodeGeneratingComponentRendererTemplateEmitter } from "./TSCodeGeneratingComponentRendererTemplateEmitter"; import { DotNetCodeGeneratingComponentRendererTemplateEmitter } from "./DotNetCodeGeneratingComponentRendererTemplateEmitter"; import { TSCodeGeneratingComponentRendererModuleEmitter } from "./TSCodeGeneratingComponentRendererModuleEmitter"; import { DotNetCodeGeneratingComponentRendererModuleEmitter } from "./DotNetCodeGeneratingComponentRendererModuleEmitter"; import { BlazorCodeGeneratingComponentRendererModuleEmitter } from "./BlazorCodeGeneratingComponentRendererModuleEmitter"; import { CodeGenerationTransformer } from "./CodeGenerationTransformer"; import { LinearGradientBrush } from "./LinearGradientBrush"; import { IComponentRendererAdapter_$type } from "./IComponentRendererAdapter"; /** * @hidden */ var CodeGeneratingComponentRendererCodeEmitter = /** @class */ /*@__PURE__*/ (function (_super) { __extends(CodeGeneratingComponentRendererCodeEmitter, _super); function CodeGeneratingComponentRendererCodeEmitter(a, b) { var _this = _super.call(this) || this; _this.l = null; _this.j = null; _this.y = new List$1(CodeGenerationItemBuilderPropertyInfo.$, 0); _this.d = null; _this.a = null; _this.c = null; _this.b = null; _this.z = new List$1(String_$type, 0); _this.ac = new Stack$1(String_$type); _this.aa = new Stack$1(String_$type); _this.ab = new Stack$1(Boolean_$type); _this.ay = null; _this.ax = null; _this.l = a; _this.j = b; _this.d = new CodeGeneratingCodeWriter(_this.l); _this.a = new CodeGeneratingCodeWriter(_this.l); _this.c = new CodeGeneratingCodeWriter(_this.l); _this.b = new CodeGeneratingCodeWriter(_this.l); return _this; } Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "az", { get: function () { switch (this.j.platform) { case 1: return "angular"; case 2: return "react"; case 3: return "webcomponents"; } return ""; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "m", { get: function () { return this.l; }, enumerable: false, configurable: true }); CodeGeneratingComponentRendererCodeEmitter.prototype.bj = function (a) { this.j.af(a); }; Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "k", { get: function () { return this.j; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "h", { get: function () { return this.d; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "e", { get: function () { return this.a; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "g", { get: function () { return this.c; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "f", { get: function () { return this.b; }, enumerable: false, configurable: true }); CodeGeneratingComponentRendererCodeEmitter.prototype.a3 = function (a) { if (a == null || a == "any") { return; } this.z.add(a); }; CodeGeneratingComponentRendererCodeEmitter.prototype.v = function (a, b) { if (this.r) { return false; } if (a.hasMustSetInCodePlatforms(b.b.owningType, b.b.propertyName)) { var c = a.getMustSetInCodePlatforms(b.b.owningType, b.b.propertyName); var _loop_1 = function (e) { var d = c[e]; var f; if (((function () { var g = EnumUtil.tryParse$1(CodeGenerationTargetPlatforms_$type, d, true, f); f = g.p2; return g.ret; })())) { if (f == this_1.j.platform) { return { value: true }; } } }; var this_1 = this; for (var e = 0; e < c.length; e++) { var state_1 = _loop_1(e); if (typeof state_1 === "object") return state_1.value; } } return false; }; CodeGeneratingComponentRendererCodeEmitter.prototype.q = function (a, b) { if (b.b != null && (b.b.knownType == 20 || b.b.knownType == 19 || b.b.knownType == 22 || b.b.knownType == 18)) { if (b.a != null) { return true; } } if (b.b != null && (b.b.knownType == 8 || b.b.knownType == 9)) { if (this.v(a, b)) { return true; } } return false; }; CodeGeneratingComponentRendererCodeEmitter.prototype.t = function (a) { if (a.b != null && (a.b.knownType == 19)) { if (a.a != null) { return true; } } return false; }; Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "ak", { get: function () { return this.ac.d(); }, enumerable: false, configurable: true }); CodeGeneratingComponentRendererCodeEmitter.prototype.a4 = function (a) { this.ac.h(a); }; CodeGeneratingComponentRendererCodeEmitter.prototype.bi = function () { }; CodeGeneratingComponentRendererCodeEmitter.prototype.bc = function (a) { }; CodeGeneratingComponentRendererCodeEmitter.prototype.bd = function (a) { this.ac.e(); }; CodeGeneratingComponentRendererCodeEmitter.prototype.ba = function (a, b, c, d) { }; CodeGeneratingComponentRendererCodeEmitter.prototype.bb = function (a, b, c, d) { this.ba(a, b, c, d); }; CodeGeneratingComponentRendererCodeEmitter.prototype.toString = function () { return this.d.toString(); }; CodeGeneratingComponentRendererCodeEmitter.prototype.at = function () { return "null"; }; CodeGeneratingComponentRendererCodeEmitter.prototype.aw = function (a, b, c) { if (b.b == null) { return b.c; } if (typeCast(CodeGenerationSpecialValue.$, b.c) !== null) { b.c = this.ad(b); } switch (b.b.knownType) { case 10: return this.am(a, b); case 7: return b.c ? "true" : "false"; case 4: return this.af(b); case 6: { var d = ""; var e = b.c; for (var f = 0; f < e.count; f++) { if (f >= 1) { d += " "; } d += this.ae(e.item(f)); } return d; } break; case 9: if (this.v(a, b)) { return this.ai(a, b); } throw new NotSupportedException(1, "shouldn't get here"); case 5: return this.ah(b); case 16: { var g = ""; var h = b.c; for (var i = 0; i < h.count; i++) { if (i >= 1) { g += " "; } g += this.ag(h.item(i)); } return g; } break; case 20: if (b.a != null) { return this.av(b); } if (b.c == null) { return this.at(); } break; case 22: if (b.a != null) { return this.av(b); } if (b.c == null) { return this.at(); } break; case 15: throw new NotSupportedException(1, "need to figure this out"); case 3: throw new NotSupportedException(1, "need to figure this out"); case 19: if (b.a != null) { return this.aq(b); } else { return this.at(); } break; case 8: if (b.b.specificExternalType == "string") { return this.ap(b); } if (b.a != null) { return this.ar(b); } if (this.v(a, b)) { return this.ai(a, b); } throw new NotSupportedException(1, "shouldn't get here"); case 13: throw new NotSupportedException(1, "shouldn't get here"); case 18: if (b.a != null) { return this.as(b); } else { return this.at(); } break; case 1: return b.c.toString(); case 11: { var j = b.c; return j.x + ", " + j.y; } case 14: { var k = b.c; return k.left + ", " + k.top + ", " + k.width + ", " + k.height; } case 12: { var l = b.c; return l.width + ", " + l.height; } case 2: return b.c != null ? b.c.toString() : this.at(); case 21: return b.c.toString(); case 17: if (b.c == null) { return "null"; } if (typeof b.c === 'string') { return b.c.toString(); } return b.c.toString(); case 0: throw new NotSupportedException(1, "shouldn't get here"); } return ""; }; CodeGeneratingComponentRendererCodeEmitter.prototype.ai = function (a, b) { var e_1, _a; var c = this.a1(a, b); if (b.c != null) { var d = this.i(this.l, this.j); if (typeCast(CodeGenerationItemBuilder.$, b.c) !== null) { var e = b.c; e.r = c; e.s(d, true); var f = d.toString(); try { for (var _b = __values(fromEnum(d.z)), _c = _b.next(); !_c.done; _c = _b.next()) { var g = _c.value; this.z.add(g); } } 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; } } c = this.al(a, e, f, c); } } return c; }; CodeGeneratingComponentRendererCodeEmitter.prototype.al = function (a, b, c, d) { return d; }; CodeGeneratingComponentRendererCodeEmitter.prototype.a1 = function (a, b) { if (b.c == null) { return this.at(); } if (typeCast(CodeGenerationItemBuilder.$, b.c) !== null) { var c = b.c.n(); if (c != null) { return c; } var d = b.c.m(); var e = this.an(d); return e; } else if (typeCast(IList_$type, b.c) !== null) { var f = b.c; if (f.count > 0 && typeCast(CodeGenerationItemBuilder.$, f.item(0)) !== null) { var g = b.c.n(); if (g != null) { return g; } var h = b.c.m(); var i = this.an(h); return i; } return this.an(b.b.propertyName); } else if (typeCast(Array_$type, b.c) !== null) { var j = b.c; if (j.length > 0 && typeCast(CodeGenerationItemBuilder.$, j[0]) !== null) { var k = b.c.n(); if (k != null) { return k; } var l = b.c.m(); var m = this.an(l); return m; } return this.an(b.b.propertyName); } return this.at(); }; CodeGeneratingComponentRendererCodeEmitter.prototype.am = function (a, b) { return ""; }; CodeGeneratingComponentRendererCodeEmitter.prototype.ad = function (a) { return a.c; }; CodeGeneratingComponentRendererCodeEmitter.prototype.av = function (a) { if (!stringIsNullOrEmpty(a.a.e)) { if (a.a.a) { return this.ao(a); } else { return this.au(a); } } return this.at(); }; CodeGeneratingComponentRendererCodeEmitter.prototype.s = function (a) { if (a.a != null && !stringIsNullOrEmpty(a.a.e)) { if (a.a.a) { return true; } } return false; }; CodeGeneratingComponentRendererCodeEmitter.prototype.au = function (a) { return ""; }; CodeGeneratingComponentRendererCodeEmitter.prototype.ao = function (a) { return ""; }; CodeGeneratingComponentRendererCodeEmitter.prototype.ar = function (a) { if (!stringIsNullOrEmpty(a.a.e)) { return a.a.e; } return this.at(); }; CodeGeneratingComponentRendererCodeEmitter.prototype.ap = function (a) { return a.c != null ? a.c.toString() : ""; }; CodeGeneratingComponentRendererCodeEmitter.prototype.as = function (a) { return this.aq(a); }; CodeGeneratingComponentRendererCodeEmitter.prototype.aq = function (a) { if (!stringIsNullOrEmpty(a.a.e)) { this.bj(a); return a.a.e; } return this.at(); }; CodeGeneratingComponentRendererCodeEmitter.prototype.get_w = function () { return false; }; Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "w", { get: function () { return this.get_w(); }, enumerable: false, configurable: true }); CodeGeneratingComponentRendererCodeEmitter.prototype.ah = function (a) { var b = a.c; return ColorUtil.i(b, this.w); }; CodeGeneratingComponentRendererCodeEmitter.prototype.ag = function (a) { var b = a; return ColorUtil.i(b, this.w); }; CodeGeneratingComponentRendererCodeEmitter.prototype.af = function (a) { if (a.c == null) { return ""; } var b = a.c; return ColorUtil.i(b.color, this.w); }; CodeGeneratingComponentRendererCodeEmitter.prototype.ae = function (a) { if (a == null) { return ""; } var b = a; return ColorUtil.i(b.color, this.w); }; CodeGeneratingComponentRendererCodeEmitter.prototype.bh = function (a) { this.aa.h(a); this.ab.h(false); }; CodeGeneratingComponentRendererCodeEmitter.prototype.bg = function (a) { var b = this.an(a); this.aa.h(b); this.ab.h(true); }; CodeGeneratingComponentRendererCodeEmitter.prototype.an = function (a) { var b = stringReplace(stringReplace(a, this.a0, ""), "Component", ""); b = CodeGeneratingComponentRenderer.d2(b); return this.j.v(b); }; CodeGeneratingComponentRendererCodeEmitter.prototype.be = function () { this.ax = this.aa.e(); this.ab.e(); }; CodeGeneratingComponentRendererCodeEmitter.prototype.get_a0 = function () { return ""; }; Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "a0", { get: function () { return this.get_a0(); }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "aj", { get: function () { if (this.aa.f > 0) { return this.aa.d(); } var a = stringReplace(stringReplace(this.ak, this.a0, ""), "Component", ""); return CodeGeneratingComponentRenderer.d2(a); }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "u", { get: function () { return this.ac.f == 1; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "o", { get: function () { if (this.ab.f == 0) { return false; } return this.ab.d(); }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "p", { get: function () { if (this.aa.f > 0) { return true; } return false; }, enumerable: false, configurable: true }); CodeGeneratingComponentRendererCodeEmitter.prototype.get_x = function () { return true; }; Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "x", { get: function () { return this.get_x(); }, enumerable: false, configurable: true }); CodeGeneratingComponentRendererCodeEmitter.prototype.get_n = function () { return this.r; }; Object.defineProperty(CodeGeneratingComponentRendererCodeEmitter.prototype, "n", { get: function () { return this.get_n(); }, enumerable: false, configurable: true }); CodeGeneratingComponentRendererCodeEmitter.prototype.bf = function () { this.ax = this.aa.e(); }; CodeGeneratingComponentRendererCodeEmitter.prototype.a6 = function (a) { var b = this.f.toString(); if (b.length > 0) { a.l(b); } }; CodeGeneratingComponentRendererCodeEmitter.prototype.a9 = function (a) { var b = this.g.toString(); if (b.length > 0) { a.l(b); } }; CodeGeneratingComponentRendererCodeEmitter.prototype.a5 = function (a) { var b = this.e.toString(); if (b.length > 0) { a.l(b); } }; CodeGeneratingComponentRendererCodeEmitter.prototype.a7 = function (a, b) { if (this.z.count > 0) { this.a8(a, this.z, b); } }; CodeGeneratingComponentRendererCodeEmitter.prototype.a8 = function (a, b, c) { }; CodeGeneratingComponentRendererCodeEmitter.$t = markType(CodeGeneratingComponentRendererCodeEmitter, 'CodeGeneratingComponentRendererCodeEmitter'); return CodeGeneratingComponentRendererCodeEmitter; }(Base)); export { CodeGeneratingComponentRendererCodeEmitter }; /** * @hidden */ var BlazorRazorCodeGeneratingComponentRendererCodeEmitter = /** @class */ /*@__PURE__*/ (function (_super) { __extends(BlazorRazorCodeGeneratingComponentRendererCodeEmitter, _super); function BlazorRazorCodeGeneratingComponentRendererCodeEmitter(a, b) { var _this = _super.call(this, a, b) || this; _this.bm = 0; _this.bk = new HashSet$1(String_$type, 0); _this.bl = new HashSet$1(String_$type, 0); return _this; } BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.get_r = function () { return false; }; Object.defineProperty(BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype, "r", { get: function () { return this.get_r(); }, enumerable: false, configurable: true }); BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.al = function (a, b, c, d) { d = _super.prototype.al.call(this, a, b, c, d); this.f.l("private " + b.m() + " _" + CodeGeneratingComponentRenderer.d2(d) + " = null;"); this.f.l("public " + b.m() + " " + CodeGeneratingComponentRenderer.d3(d)); this.f.l("{"); this.f.h(); this.f.l("get"); this.f.l("{"); this.f.h(); this.f.l("if (this._" + CodeGeneratingComponentRenderer.d2(d) + " == null)"); this.f.l("{"); this.f.h(); this.f.k(c); this.f.l("this._" + CodeGeneratingComponentRenderer.d2(d) + " = " + d + ";"); this.f.f(); this.f.l("}"); this.f.l("return this._" + CodeGeneratingComponentRenderer.d2(d) + ";"); this.f.f(); this.f.l("}"); this.f.f(); this.f.l("}"); return CodeGeneratingComponentRenderer.d3(d); }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.i = function (a, b) { return new BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter(a, b); }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.get_x = function () { return false; }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.bn = function (a, b, c) { if (c.c == null) { return "null"; } var d = c.c; var e = b; var f = new CodeGenerationItemBuilderPropertyInfo(); f.b = ((function () { var $ret = new TypeDescriptionMetadata(); $ret.propertyName = c.b.propertyName; $ret.specificType = b; $ret.specificExternalType = b; return $ret; })()); f.b.knownType = 8; f.b.owningType = c.b.owningType; if (f.b.specificType == "string") { f.b.knownType = 2; } if (f.b.specificType == "int") { f.b.knownType = 1; } if (f.b.specificType == "double") { f.b.knownType = 1; } if (f.b.knownType == 8) { e = this.a0 + e; } var g = "@(new " + e + "[] { "; for (var h = 0; h < d.length; h++) { if (h > 0) { g += ", "; } f.c = d[h]; if (f.b.knownType == 2) { g += "\"" + this.aw(a, f, true) + "\""; } else { g += this.aw(a, f, true); } } g += " })"; return g; }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.am = function (a, b) { var c = b.b.specificType; if (c == null) { c = b.b.specificExternalType; } return this.bn(a, c, b); }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.a4 = function (a) { _super.prototype.a4.call(this, a); this.h.l("<" + a + ""); if (!this.bk.contains(this.aj)) { this.bk.add_1(this.aj); if (!this.bl.contains(this.ak)) { this.bl.add_1(this.ak); this.a3(this.ak); } this.f.l("private " + this.ak + " " + CodeGeneratingComponentRenderer.d2(this.aj) + ";"); if (!this.p) { if (this.u) { this.g.l("var " + CodeGeneratingComponentRenderer.d2(this.aj) + " = this." + CodeGeneratingComponentRenderer.d2(this.aj) + ";"); } } else { this.g.l("var " + CodeGeneratingComponentRenderer.d2(this.aj) + " = this." + CodeGeneratingComponentRenderer.d2(this.aj) + ";"); } } }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.bi = function () { this.h.l(">"); this.h.h(); }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.bd = function (a) { this.h.f(); this.h.l("</" + a + ">"); this.h.l(""); _super.prototype.bd.call(this, a); }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.ba = function (a, b, c, d) { if (c.b != null && d.hasNameBinding(c.b.owningType, CodeGeneratingComponentRenderer.d3(c.b.propertyName)) && this.q(d, c)) { this.bj(c); if (a > 0) { this.h.l(""); } if (c.a == null || c.a.e == null) { this.h.j(b + "Name=\"@null\""); } else { this.h.j(b + "Name=\"" + c.a.e + "\""); } return; } if (this.s(c)) { this.bj(c); if (!this.bk.contains(this.aj)) { this.bk.add_1(this.aj); if (!this.bl.contains(this.ak)) { this.bl.add_1(this.ak); this.a3(this.ak); } this.f.l("private " + this.ak + " " + CodeGeneratingComponentRenderer.d2(this.aj) + ";"); if (!this.p) { if (this.u) { this.g.l("var " + CodeGeneratingComponentRenderer.d2(this.aj) + " = this." + CodeGeneratingComponentRenderer.d2(this.aj) + ";"); } } else { this.g.l("var " + CodeGeneratingComponentRenderer.d2(this.aj) + " = this." + CodeGeneratingComponentRenderer.d2(this.aj) + ";"); } } var e = CodeGeneratingComponentRenderer.d2(this.aw(d, c, true)); var f = e; if (f != "null" && !stringStartsWith(f, "this.")) { f = "this." + f; } this.e.l(CodeGeneratingComponentRenderer.d2(this.aj) + "." + b + " = " + f + ";"); return; } if (a > 0) { this.h.l(""); } var g = false; if (b == "ComponentRenderer" && (c.b.owningType == "PropertyEditor" || c.b.owningType == "PropertyEditorPanel")) { g = true; } if (!g) { if (c.a != null && c.a.e != null) { if (this.m != null) { if (this.m.library != null) { if (this.m.library.hasItem(c.a.e)) { var h = this.m.library.getItem(c.a.e); var i = h.getContentForPlatform(5); if (i != null && i.isJSContent) { b = b + "Script"; } } } } } this.h.j(b); this.h.j("="); this.h.j("\""); this.h.j(this.aw(d, c, true)); this.h.j("\""); } if (b == "Name") { this.h.l(""); this.h.j("@ref=\"" + CodeGeneratingComponentRenderer.d2(this.aw(d, c, true)) + "\""); } }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.ap = function (a) { var b = a.b != null ? a.b.specificType + "." : ""; return b + (a.c != null ? a.c.toString() : ""); }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.aw = function (a, b, c) { if (b.b == null) { return b.c; } if (typeCast(CodeGenerationSpecialValue.$, b.c) !== null) { b.c = this.ad(b); } switch (b.b.knownType) { case 11: { var d = b.c; return "@(new Point(" + d.x + ", " + d.y + "))"; } case 14: { var e = b.c; return "@(new Rect(" + e.left + ", " + e.top + ", " + e.width + ", " + e.height + "))"; } case 12: { var f = b.c; return "@(new Size(" + f.width + ", " + f.height + "))"; } case 17: if (b.c == null) { return "null"; } if (typeof b.c === 'string') { return "@(\"" + b.c.toString() + "\")"; } if (typeCast(Boolean_$type, b.c) !== null) { return b.c ? "true" : "false"; } return b.c.toString(); } return _super.prototype.aw.call(this, a, b, c); }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.ad = function (a) { var b = a.c; switch (b.a) { case 3: return b.b; case 0: return b.b; case 1: return b.b; case 2: return b.b; } return b.b; }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.at = function () { return "@null"; }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.ao = function (a) { return CodeGeneratingComponentRenderer.d2(CodeGeneratingComponentRenderer.d2(a.a.e)); }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.bo = function (a) { a = stringReplace(a, "-", "_"); return CodeGeneratingComponentRenderer.d3(a); }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.au = function (a) { this.bj(a); return CodeGeneratingComponentRenderer.d3(a.a.e); }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.bb = function (a, b, c, d) { var e_2, _a; if (c.b.knownType == 9) { var e = typeCast(IList_$type, c.c); if (e != null) { try { for (var _b = __values(fromEn(e)), _c = _b.next(); !_c.done; _c = _b.next()) { var f = _c.value; if (typeCast(CodeGenerationItemBuilder.$, f) !== null) { var g = f; g.s(this, false); } } } 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; } } } } else { if (typeCast(CodeGenerationItemBuilder.$, c.c) !== null) { var h = c.c; h.s(this, false); } } }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.prototype.get_a0 = function () { return "Igb"; }; BlazorRazorCodeGeneratingComponentRendererCodeEmitter.$t = markType(BlazorRazorCodeGeneratingComponentRendererCodeEmitter, 'BlazorRazorCodeGeneratingComponentRendererCodeEmitter', CodeGeneratingComponentRendererCodeEmitter.$); return BlazorRazorCodeGeneratingComponentRendererCodeEmitter; }(CodeGeneratingComponentRendererCodeEmitter)); export { BlazorRazorCodeGeneratingComponentRendererCodeEmitter }; /** * @hidden */ var BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter = /** @class */ /*@__PURE__*/ (function (_super) { __extends(BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter, _super); function BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter(a, b) { var _this = _super.call(this, a, b) || this; _this.bm = 0; _this.bk = new HashSet$1(String_$type, 0); _this.bl = new HashSet$1(String_$type, 0); return _this; } BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.get_r = function () { return true; }; Object.defineProperty(BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype, "r", { get: function () { return this.get_r(); }, enumerable: false, configurable: true }); BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.i = function (a, b) { return new BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter(a, b); }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.get_x = function () { return false; }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.bn = function (a, b) { if (b.c == null) { return "null"; } var c = b.c; var d = "new " + a + "[] { "; for (var e = 0; e < c.length; e++) { if (e > 0) { d += ", "; } d += "\"" + c[e] + "\""; } d += " }"; return d; }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.am = function (a, b) { if (b.b.specificExternalType == "string") { return this.bn(b.b.specificExternalType, b); } if (b.c == null) { return "null"; } var c = b.c; var d = ""; for (var e = 0; e < c.length; e++) { if (e > 0) { d += ", "; } d += c[e]; } return d; }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.a4 = function (a) { _super.prototype.a4.call(this, a); if (this.u) { this.h.l("var " + this.aj + " = new " + a + "();"); } else { this.h.l("var " + this.aj + " = new " + a + "();"); } if (!this.bk.contains(this.aj)) { this.bk.add_1(this.aj); if (!this.bl.contains(this.ak)) { this.bl.add_1(this.ak); this.a3(this.ak); } this.f.l("private " + this.ak + " " + CodeGeneratingComponentRenderer.d2(this.aj) + ";"); if (!this.p) { if (this.u) { this.g.l("var " + CodeGeneratingComponentRenderer.d2(this.aj) + " = this." + CodeGeneratingComponentRenderer.d2(this.aj) + ";"); } } else { this.g.l("var " + CodeGeneratingComponentRenderer.d2(this.aj) + " = this." + CodeGeneratingComponentRenderer.d2(this.aj) + ";"); } } }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.bi = function () { }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.bd = function (a) { _super.prototype.bd.call(this, a); }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.ba = function (a, b, c, d) { if (c.b != null && d.hasNameBinding(c.b.owningType, CodeGeneratingComponentRenderer.d3(c.b.propertyName)) && this.q(d, c)) { this.bj(c); if (a > 0) { this.h.l(""); } if (c.a == null || c.a.e == null) { this.h.j(this.aj + "." + b + "Name = null;"); } else { this.h.j(this.aj + "." + b + "Name = " + c.a.e + ";"); } return; } if (this.s(c)) { this.bj(c); if (!this.bk.contains(this.aj)) { this.bk.add_1(this.aj); if (!this.bl.contains(this.ak)) { this.bl.add_1(this.ak); this.a3(this.ak); } this.f.l("private " + this.ak + " " + CodeGeneratingComponentRenderer.d2(this.aj) + ";"); if (!this.p) { if (this.u) { this.g.l("var " + CodeGeneratingComponentRenderer.d2(this.aj) + " = this." + CodeGeneratingComponentRenderer.d2(this.aj) + ";"); } } else { this.g.l("var " + CodeGeneratingComponentRenderer.d2(this.aj) + " = this." + CodeGeneratingComponentRenderer.d2(this.aj) + ";"); } } var e = CodeGeneratingComponentRenderer.d2(this.aw(d, c, true)); var f = e; if (f != "null" && !stringStartsWith(f, "this.")) { f = "this." + f; } this.e.l(CodeGeneratingComponentRenderer.d2(this.aj) + "." + b + " = " + f + ";"); return; } if (a > 0) { this.h.l(""); } var g = false; if (b == "ComponentRenderer" && (c.b.owningType == "PropertyEditor" || c.b.owningType == "PropertyEditorPanel")) { g = true; } if (!g) { var h = false; if (c.a != null && c.a.e != null) { if (this.m != null) { if (this.m.library != null) { if (this.m.library.hasItem(c.a.e)) { var i = this.m.library.getItem(c.a.e); var j = i.getContentForPlatform(5); if (j != null && j.isJSContent) { b = b + "Script"; h = true; } } } } } this.h.j(this.aj + "."); this.h.j(b); this.h.j(" = "); if (h) { this.h.j("\"" + this.aw(d, c, true) + "\""); } else { this.h.j(this.aw(d, c, true)); } this.h.j(";"); } }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.ap = function (a) { var b = a.b != null ? a.b.specificType + "." : ""; return b + (a.c != null ? a.c.toString() : ""); }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.aw = function (a, b, c) { if (b.b == null) { return "\"" + b.c + "\""; } if (typeCast(CodeGenerationSpecialValue.$, b.c) !== null) { b.c = this.ad(b); } switch (b.b.knownType) { case 11: { var d = b.c; return "new Point(" + d.x + ", " + d.y + ")"; } case 14: { var e = b.c; return "new Rect(" + e.left + ", " + e.top + ", " + e.width + ", " + e.height + ")"; } case 12: { var f = b.c; return "new Size(" + f.width + ", " + f.height + ")"; } case 17: if (b.c == null) { return "null"; } if (typeof b.c === 'string') { return "\"" + b.c.toString() + "\""; } if (typeCast(Boolean_$type, b.c) !== null) { return b.c ? "true" : "false"; } return b.c.toString(); case 5: case 6: case 16: case 2: return "\"" + _super.prototype.aw.call(this, a, b, c) + "\""; case 9: throw new NotSupportedException(1, "shouldn't get here"); } return _super.prototype.aw.call(this, a, b, c); }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.ad = function (a) { var b = a.c; switch (b.a) { case 3: return b.b; case 0: return b.b; case 1: return b.b; case 2: return b.b; } return b.b; }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.at = function () { return "null"; }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.ao = function (a) { return CodeGeneratingComponentRenderer.d2(CodeGeneratingComponentRenderer.d2(a.a.e)); }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.bo = function (a) { a = stringReplace(a, "-", "_"); return CodeGeneratingComponentRenderer.d3(a); }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.au = function (a) { this.bj(a); return CodeGeneratingComponentRenderer.d3(a.a.e); }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.bb = function (a, b, c, d) { var e_3, _a; if (c.b.knownType == 9) { var e = typeCast(IList_$type, c.c); if (e != null) { try { for (var _b = __values(fromEn(e)), _c = _b.next(); !_c.done; _c = _b.next()) { var f = _c.value; if (typeCast(CodeGenerationItemBuilder.$, f) !== null) { var g = f; g.s(this, false); this.h.l(this.aj + "." + b + ".Add(" + this.ax + ");"); } } } catch (e_3_1) { e_3 = { error: e_3_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_3) throw e_3.error; } } } } else { if (typeCast(CodeGenerationItemBuilder.$, c.c) !== null) { var h = c.c; h.s(this, false); this.h.l(this.aj + "." + b + " = " + this.ax + ";"); } } }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.prototype.get_a0 = function () { return "Igb"; }; BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter.$t = markType(BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter, 'BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter', CodeGeneratingComponentRendererCodeEmitter.$); return BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter; }(CodeGeneratingComponentRendererCodeEmitter)); export { BlazorCodeBehindCodeGeneratingComponentRendererCodeEmitter }; /** * @hidden */ var ReactMarkupCodeGeneratingComponentRendererCodeEmitter = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ReactMarkupCodeGeneratingComponentRendererCodeEmitter, _super); function ReactMarkupCodeGeneratingComponentRendererCodeEmitter(a, b) { var _this = _super.call(this, a, b) || this; _this.bk = new HashSet$1(String_$type, 0); _this.bl = new HashSet$1(String_$type, 0); return _this; } ReactMarkupCodeGeneratingComponentRendererCodeEmitter.prototype.get_r = function () { return false; }; Object.defineProperty(ReactMarkupCodeGeneratingComponentRendererCodeEmitter.prototype, "r", { get: function () { return this.get_r(); }, enumerable: false, configurable: true }); ReactMarkupCodeGeneratingComponentRendererCodeEmitter.prototype.al = function (a, b, c, d) { d = _super.prototype.al.call(this, a, b, c, d); var e = b.p(); this.f.l("private " + " _" + CodeGeneratingComponentRenderer.d2(d) + ": " + e + " | null = null;"); this.f.l("public get " + CodeGeneratingComponentRenderer.d2(d) + "(): " + e + " {"); this.f.h(); this.f.l("if (this._" + CodeGeneratingComponentRenderer.d2(d) + " == null)"); this.f.l("{"); this.f.h(); this.f.k(c); this.f.l("this._" + CodeGeneratingComponentRenderer.d2(d) + " = " + d + ";"); this.f.f(); this.f.l("}"); this.f.l("return this._" + CodeGeneratingComponentRenderer.d2(d) + ";"); this.f.f(); this.f.l("}"); return CodeGeneratingComponentRenderer.d3(d); }; ReactMarkupCodeGeneratingComponentRendererCodeEmitter.prototype.i = function (a, b) { return new ReactCodeBehindCodeGeneratingComponentRendererCodeEmitter(a, b); }; ReactMarkupCodeGeneratingComponentRendererCodeEmitter.prototype.am = function (a, b) { if (b.c == null) { return "{null}"; } var c = b.c; var d = "["; for (var e = 0; e < c.length; e++) { if (e > 0) { d += ", "; } d += "\"" + c[e].toString() + "\""; } d += "]"; return d; }; ReactMarkupCodeGeneratingComponentRendererCodeEmitter.prototype.get_w = function () { return true; }; ReactMarkupCodeGeneratingComponentRendererCodeEmitter.prototype.get_a0 = function () { return "Igr"; }; ReactMarkupCodeGeneratingComponentRendererCodeEmitter.prototype.a4 = function (a) { _super.prototype.a4.call(this, a); this.h.l("<" + this.bn(a) + ""); this.h.h(); if (!this.bl.contains(this.ak)) { this.bl.add_1(this.ak); this.a3(this.ak); } if (!this.bk.contains(this.aj)) { this.bk.add_1(this.aj); this.f.l("private " + CodeGeneratingComponentRenderer.d2(this.aj) + ": " + this.ak); if (this.u) { this.f.l("private " + CodeGeneratingComponentRenderer.d2(this.aj) + "Ref(r: " + this.ak + ") {"); this.f.h(); this.f.l("this." + CodeGeneratingComponentRenderer.d2(this.aj) + " = r;"); this.f.l("this.setState({});"); this.f.f(); this.f.l("}"); this.g.l("this." + CodeGeneratingComponentRenderer.d2(this.aj) + "Ref