UNPKG

igniteui-react-core

Version:
330 lines (329 loc) 12.3 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, 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 */ export let CodeGeneratingComponentRendererDataEmitter = /*@__PURE__*/ (() => { class CodeGeneratingComponentRendererDataEmitter extends Base { get p() { return this.o; } get n() { return this.m; } x(a, b = false) { return a; } w(a) { return a; } constructor(a, b) { super(); this.o = null; this.m = null; this.e = null; this.d = null; this.i = ((() => { let $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); } get h() { return this.e; } get g() { return this.d; } get k() { return this.i; } get l() { return this.j; } set l(a) { this.j = a; } get f() { return this.c; } set f(a) { this.c = a; } u(a, b) { return null; } get_t() { return ""; } get t() { return this.get_t(); } get_v() { return ".json"; } get v() { return this.get_v(); } get_r() { return false; } get r() { return this.get_r(); } ac(a) { if (a != null) { let b = a; let c = b.e(); for (let d = 0; d < c.length; d++) { let e = c[d]; let f = b.item(e); if (typeCast(JsonDictionaryValue.$, f) !== null) { let g = f; this.ai(e, g); } else if (typeCast(JsonDictionaryArray.$, f) !== null) { let h = 0; let i = f; this.ag(h, e, i, this.h, this.k); this.ah(e, 0, null); } else { let j = f; let k = this.a(j); let l = this.b(j); let m = this.s(this.x(e, true), this.x(e), k, l); for (let n of fromEnum(m)) { this.ad(n, this.h, this.k); } this.aj(e, k, l, j); } } } let o = new HashSet$1(String_$type, 0); for (let p = 0; p < this.m.t.count; p++) { let 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); let r = this.o.library.getItem(q.a.e); let s = this.t; if (r.type == 0) { let t = new CodeGeneratingCodeWriter(this.o); let u = new CodeGeneratingImportManager(); let v = r.name; let w = r.getContentForPlatform(this.m.platform); if (w.isJson) { let x = r.getConfigForPlatform(this.m.platform); let y = 0; if (x != null) { y = x.location; } switch (y) { case 0: let z = new JsonDictionaryParser(); let 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) { let ab = new JsonDictionaryParser(); let 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); let ad = w.content; s = this.v; this.aa(v, v + s, u); t.j(ad); break; } } else { let 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()); } ae(a) { } af(a) { } ab(a, b) { } z(a, b) { } aa(a, b, c) { } aj(a, b, c, d) { } ah(a, b, c) { } ai(a, b) { } ag(a, b, c, d, e) { if (typeCast(JsonDictionaryArray.$, c) !== null) { let f = c; if (f.items != null && f.items.length > 0) { let g = this.q(f.items); if (g != null) { let h = this.a(g); let i = this.b(g); if (h != null) { this.al(a, b, h, i, d, e); for (let 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); } } } } } ak(a, b, c, d, e) { } ad(a, b, c) { } s(a, b, c, d) { let e = new List$1(CodeGeneratingComponentRendererDataEmitterItemType.$, 0); let f = new CodeGeneratingComponentRendererDataEmitterItemType(); f.d = a; f.c = b; f.a = c; f.b = d; e.add(f); for (let g = 0; g < c.length; g++) { let h = c[g]; let i = d[g]; if (i.f) { let j = this.s(this.x(a) + "_" + h, b, i.a, i.b); e.o(j); } else if (i.d) { let k = this.s(this.x(a) + "_" + h + "Item", b, i.a, i.b); e.o(k); } } return e; } y(a, b, c, d, e, f, g) { } al(a, b, c, d, e, f) { } b(a) { let b = new List$1(CodeGeneratingComponentRendererDataEmitterPropertyType.$, 0); if (typeCast(JsonDictionaryObject.$, a) !== null) { let c = a; let d = c.e(); for (let f = 0; f < d.length; f++) { let e = d[f]; let g = c.item(e); let h = new CodeGeneratingComponentRendererDataEmitterPropertyType(); if (typeCast(JsonDictionaryObject.$, g) !== null) { h.f = true; let i = this.a(g); let j = this.b(g); h.a = i; h.b = j; } else if (typeCast(JsonDictionaryArray.$, g) !== null) { h.d = true; let k = g; if (k.items != null && k.items.length > 0) { let l = this.q(k.items); let m = this.a(l); let n = this.b(l); h.a = m; h.b = n; } } else { let o = g; h.c = o.e; } b.add(h); } return b.toArray(); } return null; } a(a) { if (typeCast(JsonDictionaryObject.$, a) !== null) { let b = a; return b.e(); } return null; } q(a) { for (let b = 0; b < a.length; b++) { if (a[b] != null) { let c = this.b(a[b]); if (c == null) { continue; } let d = true; for (let e = 0; e < c.length; e++) { if (!c[e].e()) { d = false; } } if (!d) { continue; } return a[b]; } } return null; } } CodeGeneratingComponentRendererDataEmitter.$t = /*@__PURE__*/ markType(CodeGeneratingComponentRendererDataEmitter, 'CodeGeneratingComponentRendererDataEmitter'); return CodeGeneratingComponentRendererDataEmitter; })();