UNPKG

igniteui-react-core

Version:
392 lines (391 loc) 15.4 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, typeCast, fromEnum, String_$type, markType } from "./type"; import { CodeGeneratingCodeWriter } from "./CodeGeneratingCodeWriter"; import { CodeGeneratingImportManager } from "./CodeGeneratingImportManager"; import { CodeGeneratingComponentRendererDataEmitterPropertyType } from "./CodeGeneratingComponentRendererDataEmitterPropertyType"; import { JsonDictionaryValue } from "./JsonDictionaryValue"; import { HashSet$1 } from "./HashSet$1"; import { JsonDictionaryObject } from "./JsonDictionaryObject"; import { JsonDictionaryArray } from "./JsonDictionaryArray"; import { List$1 } from "./List$1"; import { CodeGeneratingComponentRendererDataEmitterItemType } from "./CodeGeneratingComponentRendererDataEmitterItemType"; import { JsonDictionaryParser } from "./JsonDictionaryParser"; /** * @hidden */ var CodeGeneratingComponentRendererDataEmitter = /** @class */ /*@__PURE__*/ (function (_super) { __extends(CodeGeneratingComponentRendererDataEmitter, _super); function CodeGeneratingComponentRendererDataEmitter(a, b) { var _this = _super.call(this) || this; _this.o = null; _this.m = null; _this.e = null; _this.d = null; _this.i = ((function () { var $ret = new CodeGeneratingImportManager(); $ret.packageOverride = "./SampleData"; return $ret; })()); _this.j = new CodeGeneratingImportManager(); _this.c = null; _this.o = a; _this.m = b; _this.e = new CodeGeneratingCodeWriter(_this.o); _this.d = new CodeGeneratingCodeWriter(_this.o); _this.c = new CodeGeneratingCodeWriter(_this.o); return _this; } Object.defineProperty(CodeGeneratingComponentRendererDataEmitter.prototype, "p", { get: function () { return this.o; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererDataEmitter.prototype, "n", { get: function () { return this.m; }, enumerable: false, configurable: true }); CodeGeneratingComponentRendererDataEmitter.prototype.x = function (a, b) { if (b === void 0) { b = false; } return a; }; CodeGeneratingComponentRendererDataEmitter.prototype.w = function (a) { return a; }; Object.defineProperty(CodeGeneratingComponentRendererDataEmitter.prototype, "h", { get: function () { return this.e; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererDataEmitter.prototype, "g", { get: function () { return this.d; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererDataEmitter.prototype, "k", { get: function () { return this.i; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererDataEmitter.prototype, "l", { get: function () { return this.j; }, set: function (a) { this.j = a; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingComponentRendererDataEmitter.prototype, "f", { get: function () { return this.c; }, set: function (a) { this.c = a; }, enumerable: false, configurable: true }); CodeGeneratingComponentRendererDataEmitter.prototype.u = function (a, b) { return null; }; CodeGeneratingComponentRendererDataEmitter.prototype.get_t = function () { return ""; }; Object.defineProperty(CodeGeneratingComponentRendererDataEmitter.prototype, "t", { get: function () { return this.get_t(); }, enumerable: false, configurable: true }); CodeGeneratingComponentRendererDataEmitter.prototype.get_v = function () { return ".json"; }; Object.defineProperty(CodeGeneratingComponentRendererDataEmitter.prototype, "v", { get: function () { return this.get_v(); }, enumerable: false, configurable: true }); CodeGeneratingComponentRendererDataEmitter.prototype.get_r = function () { return false; }; Object.defineProperty(CodeGeneratingComponentRendererDataEmitter.prototype, "r", { get: function () { return this.get_r(); }, enumerable: false, configurable: true }); CodeGeneratingComponentRendererDataEmitter.prototype.ac = function (a) { var e_1, _a; if (a != null) { var b = a; var c = b.e(); for (var d = 0; d < c.length; d++) { var e = c[d]; var f = b.item(e); if (typeCast(JsonDictionaryValue.$, f) !== null) { var g = f; this.ai(e, g); } else if (typeCast(JsonDictionaryArray.$, f) !== null) { var h = 0; var i = f; this.ag(h, e, i, this.h, this.k); this.ah(e, 0, null); } else { var j = f; var k = this.a(j); var l = this.b(j); var m = this.s(this.x(e, true), this.x(e), k, l); try { for (var _b = (e_1 = void 0, __values(fromEnum(m))), _c = _b.next(); !_c.done; _c = _b.next()) { var n = _c.value; this.ad(n, this.h, this.k); } } 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; } } this.aj(e, k, l, j); } } } var o = new HashSet$1(String_$type, 0); for (var p = 0; p < this.m.t.count; p++) { var q = this.m.t._inner[p]; if (q.a != null && q.c == null) { if (this.o.library != null && this.o.library.hasItem(q.a.e)) { if (o.contains(q.a.e)) { continue; } o.add_1(q.a.e); var r = this.o.library.getItem(q.a.e); var s = this.t; if (r.type == 0) { var t = new CodeGeneratingCodeWriter(this.o); var u = new CodeGeneratingImportManager(); var v = r.name; var w = r.getContentForPlatform(this.m.platform); if (w.isJson) { var x = r.getConfigForPlatform(this.m.platform); var y = 0; if (x != null) { y = x.location; } switch (y) { case 0: var z = new JsonDictionaryParser(); var aa = z.parse(w.content); this.af(t); this.ag(y, v, aa, t, u); this.ae(t); this.ah(v, y, w); break; case 3: this.ah(v, y, w); break; case 2: if (this.r) { var ab = new JsonDictionaryParser(); var ac = ab.parse(w.content); this.af(t); this.ag(y, v, ac, t, u); this.ae(t); } this.ah(v, y, w); break; case 1: this.ah(v, y, w); var ad = w.content; s = this.v; this.aa(v, v + s, u); t.j(ad); break; } } else { var ae = w.content; this.z(v, u); t.j(ae); this.ah(v, 0, w); } this.ab(v, u); this.m.addContainerNewFileResult(v + s, t.toString()); } } } } this.m.addContainerResult("vmProperties", this.g.toString()); this.m.addImportResult("vmImports", this.k); this.m.addImportResult("vmLibraryImports", this.l); this.m.addContainerResult("vmLibraryProjectFiles", this.f.toString()); this.m.addContainerResult("vmData", this.h.toString()); }; CodeGeneratingComponentRendererDataEmitter.prototype.ae = function (a) { }; CodeGeneratingComponentRendererDataEmitter.prototype.af = function (a) { }; CodeGeneratingComponentRendererDataEmitter.prototype.ab = function (a, b) { }; CodeGeneratingComponentRendererDataEmitter.prototype.z = function (a, b) { }; CodeGeneratingComponentRendererDataEmitter.prototype.aa = function (a, b, c) { }; CodeGeneratingComponentRendererDataEmitter.prototype.aj = function (a, b, c, d) { }; CodeGeneratingComponentRendererDataEmitter.prototype.ah = function (a, b, c) { }; CodeGeneratingComponentRendererDataEmitter.prototype.ai = function (a, b) { }; CodeGeneratingComponentRendererDataEmitter.prototype.ag = function (a, b, c, d, e) { if (typeCast(JsonDictionaryArray.$, c) !== null) { var f = c; if (f.items != null && f.items.length > 0) { var g = this.q(f.items); if (g != null) { var h = this.a(g); var i = this.b(g); if (h != null) { this.al(a, b, h, i, d, e); for (var j = 0; j < f.items.length; j++) { this.y(a, b, h, i, f.items[j], j, d); } this.ak(a, b, h, i, d); } } } } }; CodeGeneratingComponentRendererDataEmitter.prototype.ak = function (a, b, c, d, e) { }; CodeGeneratingComponentRendererDataEmitter.prototype.ad = function (a, b, c) { }; CodeGeneratingComponentRendererDataEmitter.prototype.s = function (a, b, c, d) { var e = new List$1(CodeGeneratingComponentRendererDataEmitterItemType.$, 0); var f = new CodeGeneratingComponentRendererDataEmitterItemType(); f.d = a; f.c = b; f.a = c; f.b = d; e.add(f); for (var g = 0; g < c.length; g++) { var h = c[g]; var i = d[g]; if (i.f) { var j = this.s(this.x(a) + "_" + h, b, i.a, i.b); e.o(j); } else if (i.d) { var k = this.s(this.x(a) + "_" + h + "Item", b, i.a, i.b); e.o(k); } } return e; }; CodeGeneratingComponentRendererDataEmitter.prototype.y = function (a, b, c, d, e, f, g) { }; CodeGeneratingComponentRendererDataEmitter.prototype.al = function (a, b, c, d, e, f) { }; CodeGeneratingComponentRendererDataEmitter.prototype.b = function (a) { var b = new List$1(CodeGeneratingComponentRendererDataEmitterPropertyType.$, 0); if (typeCast(JsonDictionaryObject.$, a) !== null) { var c = a; var d = c.e(); for (var f = 0; f < d.length; f++) { var e = d[f]; var g = c.item(e); var h = new CodeGeneratingComponentRendererDataEmitterPropertyType(); if (typeCast(JsonDictionaryObject.$, g) !== null) { h.f = true; var i = this.a(g); var j = this.b(g); h.a = i; h.b = j; } else if (typeCast(JsonDictionaryArray.$, g) !== null) { h.d = true; var k = g; if (k.items != null && k.items.length > 0) { var l = this.q(k.items); var m = this.a(l); var n = this.b(l); h.a = m; h.b = n; } } else { var o = g; h.c = o.e; } b.add(h); } return b.toArray(); } return null; }; CodeGeneratingComponentRendererDataEmitter.prototype.a = function (a) { if (typeCast(JsonDictionaryObject.$, a) !== null) { var b = a; return b.e(); } return null; }; CodeGeneratingComponentRendererDataEmitter.prototype.q = function (a) { for (var b = 0; b < a.length; b++) { if (a[b] != null) { var c = this.b(a[b]); if (c == null) { continue; } var d = true; for (var e = 0; e < c.length; e++) { if (!c[e].e()) { d = false; } } if (!d) { continue; } return a[b]; } } return null; }; CodeGeneratingComponentRendererDataEmitter.$t = markType(CodeGeneratingComponentRendererDataEmitter, 'CodeGeneratingComponentRendererDataEmitter'); return CodeGeneratingComponentRendererDataEmitter; }(Base)); export { CodeGeneratingComponentRendererDataEmitter };