UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

1,270 lines (1,269 loc) 160 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, IEnumerable_$type, fromEnum, typeCast, Date_$type, Boolean_$type, Array_$type, String_$type, typeGetValue, Delegate_$type, runOn, Number_$type, EnumUtil, fromEn, markType, getInstanceType } from "./type"; import { TypeDescriptionContext } from "./TypeDescriptionContext"; import { Dictionary$2 } from "./Dictionary$2"; import { List$1 } from "./List$1"; import { DateColumnCache } from "./DateColumnCache"; import { ComponentRendererReferenceResolverEventArgs } from "./ComponentRendererReferenceResolverEventArgs"; import { Description } from "./Description"; import { DescriptionTreeNode } from "./DescriptionTreeNode"; import { Queue$1 } from "./Queue$1"; import { DescriptionTreeAction } from "./DescriptionTreeAction"; import { DescriptionRef } from "./DescriptionRef"; import { TypeDescriptionPropretyTransforms } from "./TypeDescriptionPropretyTransforms"; import { DescriptionSerializerBuilder } from "./DescriptionSerializerBuilder"; import { DescriptionSerializer } from "./DescriptionSerializer"; import { DataSourceLocalDataProvider } from "./DataSourceLocalDataProvider"; import { JsonDictionaryParser } from "./JsonDictionaryParser"; import { DescriptionTreeBuilder } from "./DescriptionTreeBuilder"; import { JsonDictionaryObject } from "./JsonDictionaryObject"; import { JsonDictionaryValue } from "./JsonDictionaryValue"; import { JsonDictionaryArray } from "./JsonDictionaryArray"; import { NotImplementedException } from "./NotImplementedException"; import { ComponentRendererMethodHelper } from "./ComponentRendererMethodHelper"; import { EmbeddedRefDescription } from "./EmbeddedRefDescription"; import { Guid } from "./Guid"; import { TypeDescriptionMetadata } from "./TypeDescriptionMetadata"; import { Convert } from "./Convert"; import { DescriptionTreeReconciler } from "./DescriptionTreeReconciler"; import { HashSet$1 } from "./HashSet$1"; import { GlobalAnimationState } from "./GlobalAnimationState"; import { TypeDescriptionWellKnownType_$type } from "./TypeDescriptionWellKnownType"; import { FastReflectionHelper } from "./FastReflectionHelper"; import { CSSColorUtil } from "./CSSColorUtil"; import { StringDescription } from "./StringDescription"; import { NumberDescription } from "./NumberDescription"; import { PlatformAPIHelper } from "./PlatformAPIHelper"; import { PointDescription } from "./PointDescription"; import { SizeDescription } from "./SizeDescription"; import { RectDescription } from "./RectDescription"; import { BrushDescription } from "./BrushDescription"; import { ColorDescription } from "./ColorDescription"; import { TypeDescriptionPropretyTransformsMultipleSets } from "./TypeDescriptionPropretyTransformsMultipleSets"; import { Tuple$2 } from "./Tuple$2"; import { DescriptionRefTargetInfo } from "./DescriptionRefTargetInfo"; import { FontRegistry } from "./FontRegistry"; import { truncate } from "./number"; import { ComponentRendererAdapter } from "./ComponentRendererAdapter"; import { stringIsNullOrEmpty, stringStartsWith, stringEndsWith, stringReplace } from "./string"; import { dateTryParse, dateParse } from "./dateExtended"; /** * @hidden */ export let ComponentRenderer = /*@__PURE__*/ (() => { class ComponentRenderer extends Base { constructor() { super(); this._adapter = null; this._context = null; this._isProceedOnErrorEnabled = false; this.t = null; this.u = null; this._preserveKeyOrder = false; this._allowNullForRemove = false; this._cleanupUnusedOnRender = false; this._skipSystemRefsClean = 0; this.by = new List$1(String_$type, 0); this.bf = new Dictionary$2(String_$type, DateColumnCache.$, 0); this.bh = new Dictionary$2(String_$type, Dictionary$2.$.specialize(String_$type, Base.$), 0); this.br = new Dictionary$2(String_$type, Dictionary$2.$.specialize(Base.$, String_$type), 0); this.b0 = new List$1(Delegate_$type, 0); this.b2 = new List$1(Delegate_$type, 0); this.bl = new Dictionary$2(Base.$, Description.$, 0); this.bm = new Dictionary$2(Base.$, Boolean_$type, 0); this.bn = new Dictionary$2(Base.$, Boolean_$type, 0); this.bk = new Dictionary$2(Base.$, Boolean_$type, 0); this.bi = new Dictionary$2(Base.$, String_$type, 0); this.bj = new Dictionary$2(Base.$, Number_$type, 0); this.be = new Dictionary$2(Base.$, DescriptionTreeNode.$, 0); this.bs = new Dictionary$2(Base.$, ContainerState.$, 0); this.bo = new Dictionary$2(Base.$, Queue$1.$.specialize(Queue$1.$.specialize(DescriptionTreeAction.$)), 0); this.bg = new Dictionary$2(Base.$, List$1.$.specialize(Delegate_$type), 0); this.bc = new Dictionary$2(Base.$, Boolean_$type, 0); this.bq = new Dictionary$2(String_$type, DescriptionRef.$, 0); this.bt = new Dictionary$2(String_$type, Base.$, 0); this.bv = new Dictionary$2(String_$type, Base.$, 0); this.bp = new Dictionary$2(Base.$, String_$type, 0); this.bd = new Dictionary$2(String_$type, Delegate_$type, 0); this.cc = null; this.b4 = new List$1(Delegate_$type, 0); this.bu = new Dictionary$2(String_$type, List$1.$.specialize(Delegate_$type), 0); this.bz = new List$1(Delegate_$type, 0); this.b3 = new List$1(Delegate_$type, 0); this.b1 = new List$1(Delegate_$type, 0); this.bx = null; this.o = null; this._shouldNamespaceSystemRefValues = false; this.x = false; let a = this.s(); this.adapter = a; let adapter_ = this.adapter; let b = (adapter_._platform); if (b == "Igc") { ComponentRenderer.platform = 4; } else if (b == "Igr") { ComponentRenderer.platform = 2; } this.context = new TypeDescriptionContext(this.adapter, ComponentRenderer.platform); this.t = new TypeDescriptionPropretyTransforms(); this.u = new TypeDescriptionCleanups(this); } static get defaultInstance() { return ComponentRenderer._defaultInstance; } static set defaultInstance(a) { ComponentRenderer._defaultInstance = a; } get adapter() { return this._adapter; } set adapter(a) { this._adapter = a; } get context() { return this._context; } set context(a) { this._context = a; } get isProceedOnErrorEnabled() { return this._isProceedOnErrorEnabled; } set isProceedOnErrorEnabled(a) { this._isProceedOnErrorEnabled = a; } s() { return (new ComponentRendererAdapter()); } toJson(a) { let b = new DescriptionSerializerBuilder(); let c = new DescriptionSerializer(); b.f("{"); b.i(); b.f("\"descriptions\": {"); b.i(); let d = true; for (let e of fromEnum(this.be.keys)) { if (d) { d = false; } else { b.f(","); } let f = e; let g = this.be.item(e); let h = "root"; h = a(f); if (stringIsNullOrEmpty(h)) { h = "root"; } b.e("\"" + h + "\""); b.e(": "); c.y(this.context, g, b); } b.f(""); b.h(); b.e("}"); if (this.bv.count > 0) { b.e(","); } b.f(""); if (this.bv.count > 0) { d = true; b.f("refs: {"); b.i(); for (let i of fromEnum(this.bv.keys)) { if (!this.ab(i, this.bv.item(i))) { continue; } if (d) { d = false; } else { b.f(","); } this.gi(b, i, this.bv.item(i)); } b.f(""); b.h(); b.f("}"); } b.h(); b.f("}"); return b.toString(); } gi(a, b, c) { a.e("\"" + b + "\": "); this.gj(a, c); } gj(a, b) { if (this.ao(b)) { if (typeof b === 'string') { a.e(b == null ? "null" : "\"" + b.toString() + "\""); } else if (typeof b === 'number') { a.e(b == null ? "null" : b.toString()); } else if (typeof b === 'number') { a.e(b == null ? "null" : b.toString()); } else if (typeof b === 'number') { a.e(b == null ? "null" : b.toString()); } else if (typeof b === 'number') { a.e(b == null ? "null" : b.toString()); } else if (typeof b === 'number') { a.e(b == null ? "null" : b.toString()); } else if (typeof b === 'number') { a.e(b == null ? "null" : b.toString()); } else if (typeof b === 'number') { a.e(b == null ? "null" : b.toString()); } else if (typeCast(Date_$type, b) !== null) { let v_ = b; a.e("\"" + (v_.toJSON()) + "\""); } else if (typeCast(Boolean_$type, b) !== null) { a.e(b == null ? "null" : b.toString().toLowerCase()); } else { a.e("null"); } } else { if (b == null) { a.e("null"); return; } if (this.al(b)) { a.f("["); a.i(); let c = new DataSourceLocalDataProvider(); c.dataSource = b; for (let d = 0; d < c.actualCount; d++) { if (d > 0) { a.f(","); } this.gh(a, c, d); } a.f(""); a.h(); a.e("]"); } else { let e = [b]; let f = new DataSourceLocalDataProvider(); f.dataSource = e; this.gh(a, f, 0); } } } gh(a, b, c) { a.f("{"); a.i(); let d = b.actualSchema; for (let e = 0; e < d.propertyNames.length; e++) { if (e > 0) { a.f(","); } let f = d.propertyNames[e]; if (stringStartsWith(f, "[")) { f = f.substr(1, f.length - 2); } a.e("\"" + f + "\""); a.e(": "); let g = b.getItemValue(b.getItemAtIndex(c), d.propertyNames[e]); switch (d.propertyTypes[e]) { case 0: a.e(g == null ? "null" : "\"" + g.toString() + "\""); break; case 2: a.e(g == null ? "null" : "\"" + g.toString() + "\""); break; case 10: case 6: case 5: case 1: case 3: case 4: case 7: a.e(g == null ? "null" : g.toString()); break; case 8: let v_ = g; a.e("\"" + (v_.toJSON()) + "\""); break; case 11: this.gj(a, g); break; } } a.h(); a.f("}"); } ab(a, b) { if (b == null) { return true; } let v_ = b; if ((typeof v_ === 'function')) { return false; } return true; } createObjectFromJson(a, b) { let c = new JsonDictionaryParser(); let d = c.parse(a); let e = new DescriptionSerializer(); let f = false; let g = e.d(this.context, d, f, null, false); if (g.result == null) { return null; } let h = DescriptionTreeBuilder.createTree(this.context, g.result); let i = this.bs.item(b); if (h.c("Type")) { let j = h.a("Type").b; return this.c4(j, h, b, i, true, -1, null); } else { return this.c0(typeCast(JsonDictionaryObject.$, d), null, null); } } ao(a) { if (typeof a === 'string') { return true; } if (typeof a === 'number' || typeof a === 'number' || typeof a === 'number' || typeof a === 'number' || typeof a === 'number' || typeof a === 'number' || typeof a === 'number') { return true; } if (typeCast(Date_$type, a) !== null) { return true; } if (typeCast(Boolean_$type, a) !== null) { return true; } return false; } al(a) { if (typeCast(Array_$type, a) !== null) { return true; } if (typeCast(IEnumerable_$type, a) !== null) { return true; } return false; } loadJson(a, b) { this.fa(a, b, null, false, false, false); } loadJsonOverlay(a, b, c) { this.fa(a, b, c, true, false, true); } loadJsonDelta(a, b, c) { this.fa(a, b, null, true, c, false); } get preserveKeyOrder() { return this._preserveKeyOrder; } set preserveKeyOrder(a) { this._preserveKeyOrder = a; } a8() { return false; } fj(a) { } get allowNullForRemove() { return this._allowNullForRemove; } set allowNullForRemove(a) { this._allowNullForRemove = a; } get cleanupUnusedOnRender() { return this._cleanupUnusedOnRender; } set cleanupUnusedOnRender(a) { this._cleanupUnusedOnRender = a; } get skipSystemRefsClean() { return this._skipSystemRefsClean; } set skipSystemRefsClean(a) { this._skipSystemRefsClean = a; } fc(a) { this.by.add(a); } hasErrors() { return this.by.count > 0; } getErrors() { return this.by.toArray(); } clearErrors() { this.by.clear(); } fa(a, b, c, d, e, f) { let g = new JsonDictionaryParser(); let h = g.parse(a); let i = new DescriptionSerializer(); i.i = this.isProceedOnErrorEnabled; i.g = this.a8(); let j = null; if (typeCast(JsonDictionaryObject.$, h) !== null) { let k = h; if (k.g("skipAlterDataCasing")) { let l = k.item("skipAlterDataCasing"); if (l.value) { this.fj(true); } } else { this.fj(false); } let m = null; if (k.g("animationIdleRef") || k.g("hasAnimations")) { m = "AnimationIdleHandler"; if (k.g("animationIdleRef")) { m = k.item("animationIdleRef").value; } } let n = 0; if (k.g("animationIdleTimeout")) { n = truncate(k.item("animationIdleTimeout").value); } if (k.g("descriptions")) { let o = k.item("descriptions"); if (typeCast(JsonDictionaryObject.$, o) !== null) { let p = o; let q = p.e(); for (let r = 0; r < q.length; r++) { let s = q[r]; let t = p.item(s); let u = b(s); if (u == null) { continue; } j = u; let v = false; let w = this.ca(); if (w != null) { v = true; } let x = null; if (this.isProceedOnErrorEnabled) { try { x = i.d(this.context, t, v, w, false); } catch (y) { this.fc("error deserializing item: " + y.toString()); return; } } else { x = i.d(this.context, t, v, w, false); } if (x.result == null && !this.allowNullForRemove) { continue; } if (f) { if (!this.bw.containsKey(u)) { let z = null; if (this.isProceedOnErrorEnabled) { try { z = i.d(this.context, t, v, w, true); } catch (aa) { this.fc("error deserializing item: " + aa.toString()); return; } } else { z = i.d(this.context, t, v, w, true); } this.gb(z.result, u, d, true, this.cleanupUnusedOnRender, m, n); m = null; let ab = c(s); let ac = this.bw.item(u); this.e1(this.be.item(u), ab, ac, u); } } this.gb(x.result, u, d, e, this.cleanupUnusedOnRender, m, n); m = null; } } } if (k.g("refs") && j != null) { let ad = k.item("refs"); let ae = this.ay(ad); if (!ae && typeCast(JsonDictionaryObject.$, ad) !== null) { let af = ad; let ag = af.e(); for (let ah = 0; ah < ag.length; ah++) { let ai = ag[ah]; let aj = af.item(ai); if (typeCast(JsonDictionaryValue.$, aj) !== null) { let ak = aj; this.provideRefValue(j, ai, ak.value); } else if (typeCast(JsonDictionaryArray.$, aj) !== null) { let al = aj; let am = this.a(al, null, null); this.provideRefValue(j, ai, am); } else { let an = this.c0(aj, null, null); this.provideRefValue(j, ai, an); } } } } if (k.g("refMessages") && j != null) { let ao = k.item("refMessages"); let ap = this.ay(ao); if (!ap && typeCast(JsonDictionaryArray.$, ao) !== null) { let aq = ao; if (aq.items != null && aq.items.length > 0) { for (let ar = 0; ar < aq.items.length; ar++) { let as = j; let at = aq.items[ar]; if (typeCast(JsonDictionaryObject.$, at) !== null && at.g("descriptionKey")) { as = b(at.item("descriptionKey").value.toString()); } this.fo(as, at); } } } } if (k.g("modules") && j != null) { let au = k.item("modules"); this.au(au); } if (k.g("strings") && j != null) { let av = k.item("strings"); this.a2(av); } if (k.g("onInit") && j != null) { let aw = k.item("onInit"); this.av(aw); } if (k.g("onViewInit") && j != null) { let ax = k.item("onViewInit"); this.aw(ax); } } } fo(a, b) { if (typeCast(JsonDictionaryObject.$, b) !== null) { let c = b; if (c.g("type")) { let d = c.item("type").value; switch (d) { case "refChanged": this.fd(a, c); break; case "refClearItems": this.fe(a, c); break; case "refNotifyInsertItem": this.ff(a, c); break; case "refNotifyRemoveItem": this.fg(a, c); break; case "refNotifySetItem": this.fh(a, c); break; case "refNotifyUpdateItem": this.fi(a, c); break; } } } } fi(a, b) { throw new NotImplementedException(0); } fh(a, b) { if (!b.g("refName")) { return; } let c = b.item("refName"); if (!(typeCast(JsonDictionaryValue.$, c) !== null)) { return; } let d = c.value; let e = -1; if (b.g("index")) { let f = b.item("index"); if (typeCast(JsonDictionaryValue.$, f) !== null) { if (typeof f.value === 'number') { e = typeGetValue(f.value); } if (typeof f.value === 'number') { e = truncate(Math.round(f.value)); } } } if (e == -1) { return; } let g = null; let h = null; let i = this.h(b, d); if (b.g("oldItem")) { g = this.c0(b.item("oldItem"), i, null); } if (b.g("newItem")) { h = this.c0(b.item("newItem"), i, null); } let j = null; let k = null; if (g != null) { j = this.d4(g); } if (h != null) { k = this.d4(h); } let l = this.dh(a, d); if (l == null) { return; } if (this.bh.containsKey(d)) { let m = this.bh.item(d); if (k != null) { m.item(k, h); } } if (this.br.containsKey(d)) { let n = this.br.item(d); if (k != null && h != null) { n.item(h, k); } } this.gk(l, e, h); if (this.ah) { if (this.d8(a) == "DataGrid") { let o = ComponentRendererMethodHelper.call("notifySetItem").argument().asInt(e).argument().asEmbeddedRef(((() => { let $ret = new EmbeddedRefDescription(); $ret.refType = "uuid"; $ret.value = j; return $ret; })())).argument().asEmbeddedRef(((() => { let $ret = new EmbeddedRefDescription(); $ret.refType = "uuid"; $ret.value = k; return $ret; })())).$return().asVoid().build(); this.executeMethod(a, o, (p) => { }); } else { let p = ComponentRendererMethodHelper.call("notifySetItem").argument().asEmbeddedRef(((() => { let $ret = new EmbeddedRefDescription(); $ret.refType = "name"; $ret.value = d; return $ret; })())).argument().asInt(e).argument().asEmbeddedRef(((() => { let $ret = new EmbeddedRefDescription(); $ret.refType = "uuid"; $ret.value = j; return $ret; })())).argument().asEmbeddedRef(((() => { let $ret = new EmbeddedRefDescription(); $ret.refType = "uuid"; $ret.value = k; return $ret; })())).$return().asVoid().build(); this.executeMethod(a, p, (q) => { }); } } if (this.bh.containsKey(d)) { let q = this.bh.item(d); let r = this.br.item(d); let s = null; if (j != null && q.containsKey(j)) { s = q.item(j); } if (s != null && r.containsKey(s)) { r.removeItem(s); } if (j != null && q.containsKey(j)) { q.removeItem(j); } } } fg(a, b) { if (!b.g("refName")) { return; } let c = b.item("refName"); if (!(typeCast(JsonDictionaryValue.$, c) !== null)) { return; } let d = c.value; let e = -1; if (b.g("index")) { let f = b.item("index"); if (typeCast(JsonDictionaryValue.$, f) !== null) { if (typeof f.value === 'number') { e = typeGetValue(f.value); } if (typeof f.value === 'number') { e = truncate(Math.round(f.value)); } } } if (e == -1) { return; } let g = null; let h = this.h(b, d); if (b.g("oldItem")) { g = this.c0(b.item("oldItem"), h, null); } let i = null; let j = null; if (g != null) { i = this.d4(g); } let k = this.dh(a, d); if (k == null) { return; } this.fv(k, e); if (this.ah) { if (this.d8(a) == "DataGrid") { let l = ComponentRendererMethodHelper.call("notifyRemoveItem").argument().asInt(e).argument().asEmbeddedRef(((() => { let $ret = new EmbeddedRefDescription(); $ret.refType = "uuid"; $ret.value = i; return $ret; })())).$return().asVoid().build(); this.executeMethod(a, l, (m) => { }); } else { let m = ComponentRendererMethodHelper.call("notifyRemoveItem").argument().asEmbeddedRef(((() => { let $ret = new EmbeddedRefDescription(); $ret.refType = "name"; $ret.value = d; return $ret; })())).argument().asInt(e).argument().asEmbeddedRef(((() => { let $ret = new EmbeddedRefDescription(); $ret.refType = "uuid"; $ret.value = i; return $ret; })())).$return().asVoid().build(); this.executeMethod(a, m, (n) => { }); } } if (this.bh.containsKey(d)) { let n = this.bh.item(d); let o = this.br.item(d); let p = null; if (i != null && n.containsKey(i)) { p = n.item(i); } if (p != null && o.containsKey(p)) { o.removeItem(p); } if (i != null && n.containsKey(i)) { n.removeItem(i); } } } ff(a, b) { if (!b.g("refName")) { return; } let c = b.item("refName"); if (!(typeCast(JsonDictionaryValue.$, c) !== null)) { return; } let d = c.value; let e = -1; if (b.g("index")) { let f = b.item("index"); if (typeCast(JsonDictionaryValue.$, f) !== null) { if (typeof f.value === 'number') { e = typeGetValue(f.value); } if (typeof f.value === 'number') { e = truncate(Math.round(f.value)); } } } if (e == -1) { return; } let g = null; let h = this.h(b, d); if (b.g("newItem")) { g = this.c0(b.item("newItem"), h, null); } let i = null; if (g != null) { i = this.d4(g); } let j = this.dh(a, d); if (j == null) { return; } if (this.bh.containsKey(d)) { let k = this.bh.item(d); if (i != null) { k.item(i, g); } } if (this.br.containsKey(d)) { let l = this.br.item(d); if (g != null && i != null) { l.item(g, i); } } this.e7(j, e, g); if (this.ah) { if (this.d8(a) == "DataGrid") { let m = ComponentRendererMethodHelper.call("notifyInsertItem").argument().asInt(e).argument().asEmbeddedRef(((() => { let $ret = new EmbeddedRefDescription(); $ret.refType = "uuid"; $ret.value = i; return $ret; })())).$return().asVoid().build(); this.executeMethod(a, m, (n) => { }); } else { let n = ComponentRendererMethodHelper.call("notifyInsertItem").argument().asEmbeddedRef(((() => { let $ret = new EmbeddedRefDescription(); $ret.refType = "name"; $ret.value = d; return $ret; })())).argument().asInt(e).argument().asEmbeddedRef(((() => { let $ret = new EmbeddedRefDescription(); $ret.refType = "uuid"; $ret.value = i; return $ret; })())).$return().asVoid().build(); this.executeMethod(a, n, (o) => { }); } } } get ah() { return true; } d4(a) { if (a == null) { return null; } if (this.af(a, "___id")) { return this.da(a, "___id").toString(); } let b = Guid.newGuid().toString(); this.gl(a, "___id", b); return b; } h(a, b) { if (this.bf.containsKey(b)) { return this.bf.item(b); } if (a.g("dateCache")) { let c = a.item("dateCache"); if (typeCast(JsonDictionaryArray.$, c) !== null) { let d = c; if (d.items != null && d.items.length > 0) { let e = new DateColumnCache(); this.bf.item(b, e); this.e6(d, e); return e; } } } return null; } e6(a, b) { for (let c = 0; c < a.items.length; c++) { let d = a.items[c]; if (typeCast(JsonDictionaryValue.$, d) !== null) { if (typeof d.value === 'string') { b.f(d.value); } } else if (typeCast(JsonDictionaryArray.$, d) !== null) { let e = b.a(c); this.e6(d, e); } } } fe(a, b) { if (!b.g("refName")) { return; } let c = b.item("refName"); if (!(typeCast(JsonDictionaryValue.$, c) !== null)) { return; } let d = c.value; let e = b.item("refValue"); this.bh.item(d, new Dictionary$2(String_$type, Base.$, 0)); this.br.item(d, new Dictionary$2(Base.$, String_$type, 0)); let f = this.bh.item(d); let g = this.br.item(d); let h = null; if (b.g("dateCache")) { h = this.h(b, d); } let i = null; let j = null; if (typeCast(JsonDictionaryArray.$, e) !== null) { j = e; if (j.items != null && j.items.length > 0) { let k = this.a(e, null, h); i = k; for (let l = 0; l < j.items.length; l++) { let m = k[l]; let n = j.items[l]; if (typeCast(JsonDictionaryObject.$, n) !== null && n.g("___id")) { let o = n; let p = o.item("___id"); if (typeCast(JsonDictionaryValue.$, p) !== null) { f.item(p.value, m); if (m != null) { g.item(m, p.value); } } } } } } if (b.g("dataIntents")) { this.fn(b.item("dataIntents"), d, e, j); } let q = this.dh(a, d); if (q != null) { this.gd(q, j.items.length); for (let r = 0; r < j.items.length; r++) { let s = this.c9(i, r); this.gk(q, r, s); } } if (this.ah) { if (this.d8(a) == "DataGrid") { let t = ComponentRendererMethodHelper.call("notifyClearItems").$return().asVoid().build(); this.executeMethod(a, t, (u) => { }); } else { let u = ComponentRendererMethodHelper.call("notifyClearItems").argument().asEmbeddedRef(((() => { let $ret = new EmbeddedRefDescription(); $ret.refType = "name"; $ret.value = d; return $ret; })())).$return().asVoid().build(); this.executeMethod(a, u, (v) => { }); } } } fd(a, b) { if (!b.g("refName")) { return; } let c = b.item("refName"); if (!(typeCast(JsonDictionaryValue.$, c) !== null)) { return; } let d = c.value; let e = b.item("refValue"); this.bh.item(d, new Dictionary$2(String_$type, Base.$, 0)); this.br.item(d, new Dictionary$2(Base.$, String_$type, 0)); let f = this.bh.item(d); let g = this.br.item(d); let h = null; if (b.g("dateCache")) { h = this.h(b, d); } let i = null; let j = null; if (typeCast(JsonDictionaryArray.$, e) !== null) { j = e; i = this.c7(d, j, f, g, h); } i = this.d2(i); if (b.g("dataIntents")) { this.fn(b.item("dataIntents"), d, i, j); } if (i != null) { this.x = true; } this.provideRefValue(a, d, i); if (i != null) { this.x = false; } } c7(a, b, c, d, e) { let f = null; if (b.items != null && b.items.length > 0) { let g = this.a(b, null, e); f = g; this.eo(a, b, g, c, d); } return f; } eo(a, b, c, d, e) { for (let f = 0; f < b.items.length; f++) { let g = c[f]; let h = b.items[f]; if (typeCast(JsonDictionaryArray.$, h) !== null) { this.eo(a, h, g, d, e); } else { let i = this.d4(g); if (i != null) { d.item(i, g); if (g != null) { e.item(g, i); } } } } } fn(a, b, c, d) { if (a != null && a.g("subProps") && a.item("subProps").value) { if (d.items != null && d.items.length > 0 && d.items[0] != null) { if (typeCast(JsonDictionaryArray.$, d.items[0]) !== null) { for (let e = 0; e < d.items.length; e++) { this.fn(a.item("subIntents"), b, this.c9(c, 0), d.items[e]); } } else { this.fn(a.item("subIntents"), b, this.c9(c, 0), d.items[0]); } } return; } let f = new Dictionary$2(String_$type, Array_$type, 0); let i = a.e(); for (let h = 0; h < i.length; h++) { let g = i[h]; if (a.g(g) && a.item(g).g("subProps") && a.item(g).item("subProps").value) { if (d.items != null && d.items.length > 0 && d.items[0].g(g)) { this.fn(a.item("subIntents"), b, this.da(this.c9(c, 0), g), d.items[0].item(g)); } } else { let j = a.item(g); let k = null; if (j != null && j.items != null && j.items.length > 0) { k = new Array(j.items.length); for (let l = 0; l < j.items.length; l++) { k[l] = j.items[l].value.toString(); } } f.item(g, k); } } } provideRefValueFromJson(a, b, c) { let d = b; let e = new JsonDictionaryParser(); let f = e.parse(c); if (typeCast(JsonDictionaryValue.$, f) !== null) { let g = f; this.provideRefValue(a, d, g.value); } else if (typeCast(JsonDictionaryArray.$, f) !== null) { let h = f; let i = this.a(h, null, null); this.provideRefValue(a, d, i); } else { let j = this.c0(f, null, null); this.provideRefValue(a, d, j); } } addMemberPathTransformer(a) { this.b0.add(a); } removeMemberPathTransformer(a) { this.b0.remove(a); } addReferenceResolver(a) { this.b2.add(a); } removeReferenceResolver(a) { this.b2.remove(a); } f(a) { if (this.b2.count == 0) { return null; } let b = new ComponentRendererReferenceResolverEventArgs(); for (let c = 0; c < this.b2.count; c++) { this.b2._inner[c](a, b); } return b; } ca() { if (this.b0.count > 0) { return (a) => { let b = a; for (let c = 0; c < this.b0.count; c++) { b = this.b0._inner[c](b); } return b; }; } return null; } ay(a) { return false; } ax(a) { return false; } au(a) { return false; } a2(a) { return false; } av(a) { return false; } aw(a) { return false; } d6(a, b, c) { let d = a; if (c != null) { d = c.k(b); } else { if (TypeDescriptionMetadata.shouldCamelize(b)) { d = TypeDescriptionMetadata.camelize(d); } } if (stringEndsWith(d, "Ref")) { d = d.substr(0, d.length - ("Ref").length); } return d; } e1(a, b, c, d) { if (!c.b(b)) { c.k(d, this.be.item(d).g, b, this.be.item(d), runOn(this, this.fq), -1); } for (let e of fromEnum(a.f())) { this.e2(this.d6(e.c, ComponentRenderer.platform, e.a), e.b, b, c, d, a.g); } } e2(a, b, c, d, e, f) { if (typeCast(DescriptionTreeNode.$, b) !== null) { let g = b; let h = this.adapter.getPropertyValue(c, a); if (!d.b(h) && !d.a(g.g)) { d.k(e, g.g, h, g, runOn(this, this.fq), f); } for (let i of fromEnum(g.f())) { this.e2(a + "." + this.d6(i.c, ComponentRenderer.platform, i.a), i.b, c, d, e, g.g); } } if (typeCast(Array_$type, b) !== null) { let j = new Dictionary$2(Number_$type, DescriptionTreeNode.$, 0); let k = 0; let l = b.length; let m = b; for (let o = 0; o < m.length; o++) { let n = m[o]; if (typeCast(DescriptionTreeNode.$, n) !== null) { let p = n; j.item(k, p); } k++; } let q = this.adapter.getPropertyValue(c, a); k = 0; this.adapter.forPropertyValueItem(c, a, (r) => { if (j.containsKey(k)) { let s = j.item(k); if (!d.b(r) && !d.a(s.g)) { d.k(e, s.g, r, s, runOn(this, this.fq), f); } for (let t of fromEnum(s.f())) { this.e2(a + "." + t.c, t.b, c, d, e, s.g); } } k++; }); if (l > 0 && k == 0) { let r = this.ec(a); this.adapter.forPropertyValueItem(c, r, (s) => { if (j.containsKey(k)) { let t = j.item(k); if (!d.b(s) && !d.a(t.g)) { d.k(e, t.g, s, t, runOn(this, this.fq), f); } for (let u of fromEnum(t.f())) { this.e2(r + "." + u.c, u.b, c, d, e, t.g); } } k++; }); } } } ec(a) { let b = a.lastIndexOf('.'); let c = null; let d = a; if (b > 0) { c = a.substr(0, b); d = a.substr(b + 1); } d = "actual" + this.d9(d); if (c != null) { return c + "." + d; } return d; } d9(a) { return a.substr(0, 1).toUpperCase() + a.substr(1); } a(a, b, c) { let d = new Array(a.items.length); let e = c; if (a.items.length > 0 && e == null) { let f = a.items[0]; if (f != null && typeCast(JsonDictionaryObject.$, f) !== null) { let g = f; if (g.g("___dateColumnsCache")) { let h = g.item("___dateColumnsCache"); if (typeCast(JsonDictionaryArray.$, h) !== null) { let i = h; if (i.items != null && i.items.length > 0) { e = new DateColumnCache(); for (let j = 0; j < i.items.length; j++) { e.f(i.items[j].value.toString()); } } } } } } for (let k = 0; k < a.items.length; k++) { if (typeCast(JsonDictionaryArray.$, a.items[k]) !== null) { let l = e;