UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

1,471 lines (1,470 loc) 55 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, markType, INotifyPropertyChanged_$type, PropertyChangedEventArgs, runOn, delegateCombine, typeCast, delegateRemove, fromEn, enumGetBox, fromEnum, Number_$type, String_$type } from "igniteui-react-core"; import { RenderingContext } from "igniteui-react-core"; import { FontInfo } from "igniteui-react-core"; import { CanvasViewRenderer } from "igniteui-react-core"; import { Size } from "igniteui-react-core"; import { NativeUI } from "igniteui-react-core"; import { FontUtil } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { SRProvider } from "igniteui-react-core"; import { PropertyEditorPropertyDescriptionCollection } from "igniteui-react-layouts"; import { InputGroupDisplayType_$type } from "igniteui-react-inputs"; import { BaseControlTheme_$type } from "igniteui-react-core"; import { ControlDisplayDensity_$type } from "igniteui-react-core"; import { Dictionary$2 } from "igniteui-react-core"; import { DataGridColumn } from "./DataGridColumn"; import { FilterFactory } from "igniteui-react-core"; import { PropertyEditorPropertyDescription } from "igniteui-react-layouts"; import { HorizontalPropertyEditorDataSource } from "./HorizontalPropertyEditorDataSource"; import { PropertyEditorDataSource } from "igniteui-react-layouts"; import { TextColumn } from "./TextColumn"; import { TemplateColumn } from "./TemplateColumn"; import { Thickness } from "igniteui-react-core"; import { ColumnWidth } from "./ColumnWidth"; import { PropertyEditorValueType_$type } from "igniteui-react-layouts"; import { DropDownDataListItem } from "./DropDownDataListItem"; import { PropertyEditorTreeTransformer } from "igniteui-react-layouts"; import { BrushUtil } from "igniteui-react-core"; import { truncate, tryParseNumber } from "igniteui-react-core"; import { stringIsNullOrEmpty, stringContains, stringReplace } from "igniteui-react-core"; import { stringSplit } from "igniteui-react-core"; /** * @hidden */ export let PropertyEditorView = /*@__PURE__*/ (() => { class PropertyEditorView extends Base { constructor() { super(); this.o = null; this.n = null; this.b = null; this.j = null; this.m = null; this.f = null; this.l = null; this.c = ((() => { let $ret = new FontInfo(); $ret.q = "Verdana"; $ret.f = 13; $ret.t = "Normal"; $ret.v = "Normal"; $ret.r = "Normal"; return $ret; })()); this.af = new Size(); this.d = null; this._gridExternal = null; this.a = null; this.g = false; this.k = null; } z() { } x(a) { if (a == null) { this.j = null; return; } this.j = a; this.m = this.j.createElement("canvas"); this.f = new RenderingContext(new CanvasViewRenderer(), this.j.get2DCanvasContext(this.m)); this.l = this.j.createElement("div"); this.ad(); this.j.getPortal(this.j.rootWrapper, "DataGrid", (b) => { this._gridExternal = b.componentRef; this.a = (this._gridExternal.i); this._gridExternal.height = '100%'; this.b.dk(this.a, null); this.ab(); }, false); let b = Math.round(a.rootWrapper.width()); let c = Math.round(a.rootWrapper.height()); this.j.rootWrapper.setStyleProperty("position", "relative"); } ad() { } ab() { if (this.j != null) { } } w() { if (this.j == null) { return; } let a = this.j.rootWrapper.width(); let b = this.j.rootWrapper.height(); this.af = new Size(1, a, b); if (this.b.l != null) { this.b.d5(); } } ae() { let a = this.j; if (null == a) { return; } let b = a.rootWrapper; if (null != b) { NativeUI.q(b, this.b.ec); NativeUI.m(b, this.b.d8); } } e() { return this.c; } y() { } aa() { } v() { let a = this.b.ed(); if (a.height > 0) { this.j.rootWrapper.setStyleProperty("min-height", a.height + "px"); } } h() { return this.af.width; } i(a) { this.d = this.b.ae(); return FontUtil.measureStringWidth(a, this.d, this.f); } t(a, b) { let cnt_ = a.content; let c = cnt_.element.getChildCount() > 0 ? cnt_.element.getChildAt(0) : null; let d = false; if (c == null) { this.j.getPortal(cnt_.element, "XInputGroup", (e) => { let contenti_ = cnt_.element.getChildCount() > 0 ? cnt_.element.getChildAt(0) : null; d = true; let inputExternal_ = e.componentRef; let inputInternal_ = (inputExternal_.i); let f = inputInternal_.view.s; cnt_.__int = inputInternal_; inputExternal_.width = '100%'; inputExternal_.height = '100%'; cnt_.element.setStyleProperty("line-height", "0"); this.j.getPortal(f, "XInput", (g) => { let iExternal_ = g.componentRef; let iInternal_ = (iExternal_.i); inputInternal_.inputs.add(iInternal_); b(inputInternal_, d); }, false); }, false); } else { let content_ = c; let impl_ = cnt_.__int; let e = (impl_ == null || impl_ == undefined); if (e) { return; } b(impl_, d); } } s(a, b) { let cnt_ = a.content; let c = cnt_.element.getChildCount() > 0 ? cnt_.element.getChildAt(0) : null; let d = false; if (c == null) { this.j.getPortal(cnt_.element, "MultiColumnComboBox", (e) => { let contenti_ = cnt_.element.getChildCount() > 0 ? cnt_.element.getChildAt(0) : null; d = true; let inputExternal_ = e.componentRef; let inputInternal_ = (inputExternal_.i); cnt_.__int = inputInternal_; inputExternal_.width = '100%'; inputExternal_.height = '100%'; cnt_.element.setStyleProperty("line-height", "0"); b(inputInternal_, d); }, false); } else { let content_ = c; let impl_ = cnt_.__int; let e = (impl_ == null || impl_ == undefined); if (e) { return; } b(impl_, d); } } r(a, b) { let cnt_ = a.content; let c = cnt_.element.getChildCount() > 0 ? cnt_.element.getChildAt(0) : null; let d = false; if (c == null) { cnt_.element.setStyleProperty("height", "100%"); let e = this.j.createElement("div"); e.setStyleProperty("width", "100%"); e.setStyleProperty("height", "100%"); e.setStyleProperty("display", "flex"); e.setStyleProperty("flex-direction", "column"); e.setStyleProperty("justify-content", "center"); cnt_.element.append(e); this.j.getPortal(e, "XCheckbox", (f) => { d = true; let inputExternal_ = f.componentRef; let inputInternal_ = (inputExternal_.i); cnt_.__int = inputInternal_; inputExternal_.width = '100%'; inputExternal_.height = '100%'; e.setStyleProperty("line-height", "0"); b(inputInternal_, d); }, false); } else { let content_ = c.getChildAt(0); let impl_ = cnt_.__int; let f = (impl_ == null || impl_ == undefined); if (f) { return; } b(impl_, d); } } q(a, b) { let cnt_ = a.content; let c = cnt_.element.getChildCount() > 0 ? cnt_.element.getChildAt(0) : null; let d = false; if (c == null) { cnt_.element.setStyleProperty("height", "100%"); let e = this.j.createElement("div"); e.setStyleProperty("width", "100%"); e.setStyleProperty("height", "100%"); e.setStyleProperty("display", "flex"); e.setStyleProperty("flex-direction", "column"); e.setStyleProperty("justify-content", "center"); cnt_.element.append(e); this.j.getPortal(e, "XButton", (f) => { d = true; let buttonExternal_ = f.componentRef; let buttonInternal_ = (buttonExternal_.i); cnt_.__int = buttonInternal_; buttonExternal_.width = '100%'; buttonExternal_.height = '100%'; e.setStyleProperty("line-height", "0"); b(buttonInternal_, d); }, false); } else { let content_ = c.getChildAt(0); let impl_ = cnt_.__int; let f = (impl_ == null || impl_ == undefined); if (f) { return; } b(impl_, d); } } u(a, b) { if (this.k == null) { this.k = this.j.createElement("div"); } b(this.k.getNativeElement()); } ac(ig_, a) { let b = null; let c = ig_.__span ? ig_.__span : null; if (c != null) { b = c; } else { b = this.j.createElement("span"); let set_ = b; ig_.__span = set_; ig_.appendButtonContent(b); } b.setRawText(a); } } PropertyEditorView.$t = /*@__PURE__*/ markType(PropertyEditorView, 'PropertyEditorView'); return PropertyEditorView; })(); /** * @hidden */ export let PropertyEditor = /*@__PURE__*/ (() => { class PropertyEditor extends Base { get e() { if (this.l == null) { return null; } return this.l.actualDataSource; } get ag() { if (this.af == null) { this.af = new SRProvider(this.m.j); this.af.cb("DataGrid"); } return this.af; } constructor() { super(); this.m = null; this.l = null; this.ab = null; this.d = null; this.ah = false; this.c = null; this.n = null; this.o = null; this.ai = false; this.af = null; this.propertyChanged = null; this.an = false; this.t = null; this.u = new PropertyEditorPropertyDescriptionCollection(); this.bx = null; this.p = 3; this.bn = -1; this.ac = null; this.x = 1; this.z = 2; this.bv = null; this.am = true; this.au = new Dictionary$2(DataGridColumn.$, Number_$type, 0); this.h = null; this.i = null; this.f = null; this.bt = null; this.bw = null; this.aj = false; this.al = false; this.ak = false; this.d6 = PropertyEditor.d9; this.d7 = PropertyEditor.ea; this.br = 0; this.bo = -1; this.r = null; this.d = new FilterFactory(); let a = new PropertyEditorView(); a.b = this; let b = this.properties; b.collectionChanged = delegateCombine(b.collectionChanged, runOn(this, this.dz)); this.m = a; this.m.z(); } dz(a, b) { if (b.oldItems != null) { for (let c of fromEn(b.oldItems)) { if (typeCast(INotifyPropertyChanged_$type, c) !== null) { let d = c; d.propertyChanged = delegateRemove(d.propertyChanged, runOn(this, this.dn)); } } } if (b.newItems != null) { for (let e of fromEn(b.newItems)) { if (typeCast(INotifyPropertyChanged_$type, e) !== null) { let f = e; f.propertyChanged = delegateCombine(f.propertyChanged, runOn(this, this.dn)); } } } this.ar(); if (this.properties.count > 0 && this.actualProperties != this.properties) { this.actualProperties = this.properties; } if (this.l != null) { this.l.notifyClearItems(); } } dn(a, b) { if (!this.an) { this.ar(); if (this.l != null) { this.d5(); } } } notifySizeChanged() { this.m.w(); } dk(a, b) { this.l = a; if (null != this.l) { this.l.headerHeight = 0; this.l.rowSeparatorHeight = 0; this.l.autoGenerateColumns = false; this.l.activationMode = 0; this.l.editMode = 0; let c = this.l; c.cellClicked = delegateCombine(c.cellClicked, runOn(this, this.dj)); if (this.actualProperties != null) { this.l.itemsSource = this.actualProperties; this.cn(); } if (this.actualProperties != null) { this.d5(); } } } destroy() { if (this.l != null) { let a = this.l; a.cellClicked = delegateRemove(a.cellClicked, runOn(this, this.dj)); } if (this.n != null) { let b = this.n; b.change = delegateRemove(b.change, runOn(this, this.dm)); } this.provideContainer(null); } provideContainer(a) { this.m.x(a); } dj(a, b) { } dv(a) { } get actualProperties() { return this.t; } set actualProperties(a) { let b = this.t; this.t = a; if (b != this.t) { this.dw("ActualProperties", b, this.t); } } get properties() { return this.u; } set properties(a) { let b = this.u; this.u = a; if (b != this.u) { this.dw("Properties", b, this.u); } } get b9() { return this.bx; } set b9(a) { let b = this.bx; this.bx = a; if (b != this.bx) { this.dw("FilterPlaceholderText", b, this.bx); } } get q() { return this.p; } set q(a) { let b = this.p; this.p = a; if (b != this.p) { this.dw("SearchInputType", enumGetBox(InputGroupDisplayType_$type, b), enumGetBox(InputGroupDisplayType_$type, this.p)); } } get bs() { return this.bn; } set bs(a) { let b = this.bn; this.bn = a; if (b != this.bn) { this.dw("RowHeight", b, this.bn); } } get ad() { return this.ac; } set ad(a) { let b = this.ac; this.ac = a; if (b != this.ac) { this.dw("CellTextStyle", b, this.ac); } } ae() { if (this.ad == null) { return this.m.e(); } return this.ad; } get y() { return this.x; } set y(a) { let b = this.x; this.x = a; if (b != this.x) { this.dw("BaseTheme", enumGetBox(BaseControlTheme_$type, b), enumGetBox(BaseControlTheme_$type, this.x)); } } get aa() { return this.z; } set aa(a) { let b = this.z; this.z = a; if (b != this.z) { this.dw("Density", enumGetBox(ControlDisplayDensity_$type, b), enumGetBox(ControlDisplayDensity_$type, this.z)); } } dw(a, b, c) { if (this.propertyChanged != null) { this.propertyChanged(this, new PropertyChangedEventArgs(a)); } this.d0(a, b, c); } d0(a, b, c) { switch (a) { case "DescriptionType": if (this.b7 == null) { if (this.properties == null) { this.actualProperties = null; } } if (this.b7 != null) { if (this.r == null) { this.r = new PropertyEditorDataSource(); } this.r.n = this.b7; } if (this.properties == null || this.properties.count == 0) { if (this.r.h != null) { this.actualProperties = this.r.h; } } else { if (this.properties != null && this.properties.count > 0) { this.ar(); } } break; case "ComponentRenderer": if (b != null) { b.removeTargetPropertyUpdatingListener(runOn(this, this.at)); } if (b != c) { this.am = true; } if (this.g == null) { this.j = this.k; } else { this.j = this.g.context; } break; case "Target": break; case "DescriptionContext": if (this.g == null) { this.j = c; } break; case "ActualContext": if (this.j == null) { if (this.properties == null) { this.actualProperties = null; } } if (this.j != null) { if (this.r == null) { this.r = new PropertyEditorDataSource(); } this.r.b = this.j; } if (this.properties == null || this.properties.count == 0) { if (this.r.h != null) { this.actualProperties = this.r.h; } } else { if (this.properties != null && this.properties.count > 0) { this.ar(); } } break; case "Properties": this.actualProperties = this.properties; break; case "IsWrappingEnabled": this.d5(); break; case "IsHorizontal": if (this.ao) { if (this.actualProperties != null && !(typeCast(HorizontalPropertyEditorDataSource.$, this.actualProperties) !== null)) { this.actualProperties = new HorizontalPropertyEditorDataSource(this.actualProperties); } } else { if (typeCast(HorizontalPropertyEditorDataSource.$, this.actualProperties) !== null) { let d = this.actualProperties; this.actualProperties = d.ae; } } break; case "ActualProperties": if (this.ao) { if (this.actualProperties != null && !(typeCast(HorizontalPropertyEditorDataSource.$, this.actualProperties) !== null)) { this.actualProperties = new HorizontalPropertyEditorDataSource(this.actualProperties); } } else { if (typeCast(HorizontalPropertyEditorDataSource.$, this.actualProperties) !== null) { let e = this.actualProperties; this.actualProperties = e.ae; } } if (this.l != null) { if (c != null) { this.l.groupDescriptions.n(); this.l.sortDescriptions.n(); this.l.filterExpressions.clear(); this.l.summaryDescriptions.n(); } if (this.l.actualDataSource != null) { let f = this.l.actualDataSource; f.schemaChanged = delegateRemove(f.schemaChanged, runOn(this, this.dy)); } let g = this.l.itemsSource != this.actualProperties; let h = this.actualProperties; h = this.actualProperties.toArray(); this.l.itemsSource = h; this.cn(); if (this.l.actualDataSource != null) { let i = this.l.actualDataSource; i.schemaChanged = delegateCombine(i.schemaChanged, runOn(this, this.dy)); } if (g) { this.d5(); } } break; case "FilterPlaceholderText": if (this.n != null) { this.n.cg = this.b9; } break; case "SearchInputType": if (this.o != null) { this.o.d = this.q; } break; case "RowHeight": if (this.l != null) { this.l.rowHeight = this.bs; } break; case "CellTextStyle": if (this.l != null) { this.l.cellTextStyle = this.ad; } break; case "BackgroundColor": case "TextColor": let j = this.l; if (null != j) { j.cellTextColor = this.ec; j.cellBackground = this.d8; } this.m.ae(); break; case "BaseTheme": this.d4(); break; case "Density": this.d3(); break; } } ar() { let a = this.an; this.an = true; let b = false; for (let c of fromEnum(this.properties)) { let d = c.a3; if (this.r != null) { let e = this.r.e(d, false); if (e != null) { if (c.z(e)) { b = true; } } } } if (b) { this.d5(); } else if (this.l != null) { this.l.notifyClearItems(); } this.an = a; return b; } d3() { if (this.l != null) { this.l.density = this.aa; } if (this.o != null) { this.o.t = this.aa; } this.m.y(); } d4() { if (this.o != null) { this.o.p = this.y; } this.m.aa(); } dy(a, b) { this.ai = true; this.cn(); this.ai = false; } d5() { if (this.l == null) { return; } this.au.clear(); this.l.actualColumns.clear(); this.l.isGroupRowSticky = false; this.l.rowHeight = this.bs == -1 ? 38 : this.bs; this.l.cellBackground = this.d8; this.l.cellSelectedBackground = this.d8; this.l.density = this.aa; this.l.borderWidth = new Thickness(0, 0); if (this.ad != null) { this.l.cellTextStyle = this.ad; } if (this.ao) { this.cp(); } else { let a = new TextColumn(); a.kk = 10; a.kl = 5; a.lo = "PropertyPath"; a.dataBinding = delegateCombine(a.dataBinding, runOn(this, this.dp)); this.l.columns.add(a); let b = new TemplateColumn(); b.lo = "ValueType"; b.kk = 5; b.kl = 5; b.dataBinding = delegateCombine(b.dataBinding, runOn(this, this.cu)); b.cellStyleKeyRequested = delegateCombine(b.cellStyleKeyRequested, runOn(this, this.cs)); b.cellUpdating = delegateCombine(b.cellUpdating, runOn(this, this.ct)); this.l.columns.add(b); } } cp() { if (this.actualProperties == null) { return; } let a = this.actualProperties.ae; let b = a.count; let c = new List$1(DataGridColumn.$, 0); let d = this.bp(a, b, c, 0x7FFFFFFF); for (let e = 0; e < c.count; e++) { this.l.columns.add(c._inner[e]); } this.br = d; let f = this.actualProperties; let g = f.count; f.clear(); for (let h = 0; h < this.br; h++) { f.add(new PropertyEditorPropertyDescription()); } if (f.count != g) { let i = f.toArray(); this.l.itemsSource = i; this.m.v(); } } ed() { if (this.ao && this.l != null && this.l.itemsSource != null) { let a = this.l.actualRowHeight; let b = this.l.itemsSource; return new Size(1, 0, b.count * a); } else { return new Size(1, 0, 0); } } bp(a, b, c, d) { let e = 0; let f = 0; let g = 0; let h = this.m.h(); h -= 5; if (!this.aq) { h = 1.7976931348623157E+308; } let i = 0; let j = h; for (let k = 0; k < b; k++) { let l = a.item(k); let m = this.be(l); let n = this.ba(l); if ((i + m + n > h && g > 0) || g >= d) { if (f != 0 && g < d && d > 2) { let o = c._inner[g]; let p = c._inner[g + 1]; o.width.f = m; p.width.f = n; this.d2(h, c); if (c.count == 0) { return 0; } return this.bp(a, b, c, c.count); } d = Math.max(Math.min(d, g), 2); f++; let q = h - i; if (q < j) { j = q; } i = 0; g = 0; } let r = this.cc(l); if (c.count <= g) { let s = new TextColumn(); s.kk = 10; s.kl = 5; s.width = ((() => { let $ret = new ColumnWidth(); $ret.c = false; $ret.f = m; return $ret; })()); s.dataBinding = delegateCombine(s.dataBinding, runOn(this, this.dp)); s.mf = "PropertyName_" + k; s.lo = "PropertyName"; c.add(s); this.au.item(s, c.count - 1); g++; } else { let t = c._inner[g]; if (m > t.width.f) { let u = m - t.width.f; t.width = ((() => { let $ret = new ColumnWidth(); $ret.c = false; $ret.f = m; return $ret; })()); if (u > j && d > 2) { this.d2(h, c); if (c.count == 0) { return 0; } return this.bp(a, b, c, c.count); } else { j -= u; if (j < 0) { j = 0; } g++; } } else { m = t.width.f; g++; } } if (c.count <= g) { let v = new TemplateColumn(); v.mf = "ValueType_" + k; v.lo = "ValueType"; v.kk = 5; v.kl = 5; v.dataBinding = delegateCombine(v.dataBinding, runOn(this, this.cu)); v.width = ((() => { let $ret = new ColumnWidth(); $ret.c = false; $ret.f = n; return $ret; })()); v.cellStyleKeyRequested = delegateCombine(v.cellStyleKeyRequested, runOn(this, this.cs)); v.cellUpdating = delegateCombine(v.cellUpdating, runOn(this, this.ct)); c.add(v); this.au.item(v, c.count - 1); g++; } else { let w = c._inner[g]; if (n > w.width.f) { let x = n - w.width.f; w.width = ((() => { let $ret = new ColumnWidth(); $ret.c = false; $ret.f = n; return $ret; })()); if (x > j && d > 2) { this.d2(h, c); if (c.count == 0) { return 0; } return this.bp(a, b, c, c.count); } else { j -= x; if (j < 0) { j = 0; } g++; } } else { n = w.width.f; g++; } } i += m + n; } return f + 1; } d2(a, b) { let c = 0; for (let d of fromEnum(b)) { c += d.width.f; } while (c > a) { if (b.count < 1) { return; } if (typeCast(TemplateColumn.$, b._inner[b.count - 1]) !== null) { c -= b._inner[b.count - 1].width.f; c -= b._inner[b.count - 2].width.f; b.removeAt(b.count - 1); b.removeAt(b.count - 1); } else { c -= b._inner[b.count - 1].width.f; b.removeAt(b.count - 1); } } } cu(a, b) { let c = a; let d = this.s(c, b.cellInfo.fb, b.rowObject); b.resolvedValue = enumGetBox(PropertyEditorValueType_$type, d != null ? d.w : 0); } dp(a, b) { let c = a; let d = this.s(c, b.cellInfo.fb, b.rowObject); if (d == null) { b.resolvedValue = null; return; } b.resolvedValue = d.az != null ? d.az : d.a3; } ba(a) { switch (a.w) { case 10: return this.aw(a); case 7: return this.ax(a); case 4: return this.az(a); case 6: return this.ay(a); case 23: return this.a8(a); case 9: return this.a2(a); case 5: return this.a4(a); case 14: return this.a3(a); case 18: return this.a5(a); case 3: return this.a6(a); case 15: return this.bb(a); case 17: return this.bc(a); case 16: return this.bf(a); case 1: return this.bg(a); case 11: return this.bh(a); case 13: return this.bi(a); case 12: return this.bj(a); case 2: return this.bk(a); case 8: return this.bl(a); case 19: return this.bm(a); case 0: return this.bd(a); case 20: return this.a0(a); } return 100; } bm(a) { return this.bd(a); } bd(a) { return 175; } a0(a) { return 80; } bl(a) { return this.a0(a); } bk(a) { return this.bd(a); } bj(a) { return this.bd(a); } bi(a) { return this.bd(a); } bh(a) { return this.bd(a); } bg(a) { return this.bd(a); } bf(a) { return this.a0(a); } bc(a) { return this.a0(a); } bb(a) { return this.a9(a); } a9(a) { return this.bd(a); } a6(a) { return this.a7(a); } a7(a) { return this.bd(a); } a5(a) { return this.a0(a); } a3(a) { return this.a0(a); } a4(a) { return this.bd(a); } a2(a) { return this.a0(a); } ay(a) { return this.a0(a); } a8(a) { return this.bd(a); } az(a) { return this.bd(a); } ax(a) { return this.a1(a); } a1(a) { return 50; } aw(a) { return this.a0(a); } be(a) { return this.m.i(this.cc(a)) + 17; } cc(a) { return a.az != null ? a.az : a.a3; } ct(a, b) { let c = a; let d = this.s(c, b.cellInfo.fb, b.cellInfo.hn); let e = d != null ? d.w : 0; switch (e) { case 10: this.cv(c, b); break; case 7: this.cw(c, b); break; case 4: this.cy(c, b); break; case 6: this.cx(c, b); break; case 23: this.c6(c, b); break; case 9: this.c0(c, b); break; case 5: this.c2(c, b); break; case 14: this.c1(c, b); break; case 18: this.c3(c, b); break; case 3: this.c4(c, b); break; case 15: this.c8(c, b); break; case 17: this.c9(c, b); break; case 16: this.db(c, b); break; case 1: this.dc(c, b); break; case 11: this.dd(c, b); break; case 13: this.de(c, b); break; case 12: this.df(c, b); break; case 2: this.dg(c, b); break; case 8: this.dh(c, b); break; case 19: this.di(c, b); break; case 20: this.cz(c, b); break; case 0: break; } } di(a, b) { this.da(a, b); } dh(a, b) { } dg(a, b) { this.da(a, b); } df(a, b) { this.da(a, b); } de(a, b) { this.da(a, b); } dd(a, b) { this.da(a, b); } dc(a, b) { this.da(a, b); } da(a, b) { this.m.t(b, (c, d) => { if (c.d != 2) { c.d = 2; } if (c.t != 3) { c.t = 3; } let e = this.s(a, b.cellInfo.fb, b.cellInfo.hn); let f = c.inputs._inner[0]; f.bh = e; f.cq = (e.ar != null ? e.ar.toString() : ""); if (d) { f.changing = delegateCombine(f.changing, runOn(this, this.dl)); } }); } cz(a, b) { this.m.q(b, (c, d) => { if (c.r != 3) { c.r = 3; } let e = this.s(a, b.cellInfo.fb, b.cellInfo.hn); c.ed = e; let f = e.ar; if (typeof e.ar === 'number' || typeof e.ar === 'number') { f = e.ar.toString(); } this.m.ac(c, f); if (d) { c.clicked = delegateCombine(c.clicked, runOn(this, this.cm)); } }); } c7(a, b) { this.m.s(b, (c, d) => { if (c.density != 3) { c.density = 3; } let e = this.s(a, b.cellInfo.fb, b.cellInfo.hn); if (c.dd != e) { if (!d) { c.selectedValueChanged = delegateRemove(c.selectedValueChanged, runOn(this, this.cq)); } c.dd = e; c.value = null; c.itemsSource = this.b(this.a(e)); if (e.ar != c.value) { if (typeof e.ar === 'number' || typeof e.ar === 'number') { c.value = e.ar.toString(); } else { c.value = e.ar; } } if (!d) { c.selectedValueChanged = delegateCombine(c.selectedValueChanged, runOn(this, this.cq)); } } else { if (e.ar != c.value) { if (typeof e.ar === 'number' || typeof e.ar === 'number') { c.value = e.ar.toString(); } else { c.value = e.ar; } } } if (d) { c.selectedValueChanged = delegateCombine(c.selectedValueChanged, runOn(this, this.cq)); c.hw = BrushUtil.h(255, 255, 255, 255); c.g = ["Name"]; c.columnHeadersVisible = false; c.defaultColumnWidth = ((() => { let $ret = new ColumnWidth(); $ret.c = false; $ret.f = this.ba(e); return $ret; })()); c.fv = "Name"; } }); } b(a) { let b = new List$1(DropDownDataListItem.$, 0); if (a == null) { return []; } for (let c = 0; c < a.length; c++) { b.add(((() => { let $ret = new DropDownDataListItem(); $ret.Name = a[c]; $ret.Value = a[c]; return $ret; })())); } return b.toArray(); } a(a) { return a.c; } cq(a, b) { let c = a; let d = c.dd; this.an = true; d.ar = c.value; d.a5(); this.an = false; this.dx(d); } dl(a, b) { let c = a; let d = c.bh; this.an = true; if (d.w == 1) { let e = 0; let f = tryParseNumber(c.cq, e); e = f.p1; d.ar = e; } else if (d.w == 23) { if (c.cq != null) { let g = c.cq.split(' '); let h = new List$1(Number_$type, 0); for (let j = 0; j < g.length; j++) { let i = g[j]; if (!stringIsNullOrEmpty(i)) { let k = 0; if (((() => { let l = tryParseNumber(c.cq, k); k = l.p1; return l.ret; })())) { h.add(k); } } } d.ar = h.toArray(); } } else { d.ar = c.cq; } d.a5(); this.an = false; this.dx(d); } cm(a, b) { let c = a; let d = c.ed; this.an = true; d.a6(); this.an = false; this.dx(d); } dx(a) { if (this.bu != null && this.g != null) { if (this.am) { this.am = false; this.g.addTargetPropertyUpdatingListener(runOn(this, this.at)); } let b = this.bv == null; this.bv = this.cb(); if (b) { this.m.u(this.bu, (c) => this.g.loadJsonOverlay(this.bv, (d) => c, (d) => this.bu)); } else { this.m.u(this.bu, (c) => this.g.loadJsonDelta(this.bv, (d) => c, false)); } } } at(a, b, c) { let d = this.actualProperties; if (typeCast(HorizontalPropertyEditorDataSource.$, d) !== null) { d = d.ae; } for (let e = 0; e < d.count; e++) { let f = d._inner[e].a3; if (this.as(f, a)) { d._inner[e].a9(a, b, c); } } if (this.ap) { return true; } return false; } as(a, b) { if (a == null && b == null) { return true; } if (a == null) { return false; } if (b == null) { return false; } let c = stringSplit(a, ['.', '['], 0); let d = stringSplit(b, ['.', '['], 0); if (c.length != d.length) { return false; } for (let e = 0; e < c.length; e++) { let f = c[e]; let g = d[e]; if (stringContains(f, "]")) { if (!stringContains(g, "]")) { return false; } g = stringReplace(g, "]", ""); let h = this.av(f); if (!h.contains(g)) { return false; } } else { if (!Base.equalsStatic(f, g)) { return false; } } } return true; } av(a) { let b = new List$1(String_$type, 0); if (stringContains(a, "]")) { a = stringReplace(a, "]", ""); let c = a.split(','); for (let d = 0; d < c.length; d++) { let e = c[d]; if (stringContains(e, "as")) { let f = e.indexOf("as"); let g = e.substr(0, f).trim(); b.add(g); } } return b; } b.add(a); return b; } cb() { if (this.actualProperties == null) { return null; } let a = this.actualProperties; if (typeCast(HorizontalPropertyEditorDataSource.$, a) !== null) { a = a.ae; } let b = new PropertyEditorTreeTransformer(this.j, this.b7, false); this.c5(a, "", b, this.b7); return b.j(); } c5(a, b, c, d) { for (let e = 0; e < a.count; e++) { let f = a._inner[e]; if (f.w == 20) { continue; } if (f.m != null) { for (let g = 0; g < f.m.count; g++) { let h = f.m._inner[g]; let i = b + f.a3 + "[" + g + "]"; this.c5(h.a, i, c, h.b); } } else if (f.i != null) { let j = b + f.a3; this.c5(f.i.a, j, c, f.i.b); } else { c.k(b + f.a3, f.ar, d); } } } db(a, b) { } c9(a, b) { } c8(a, b) { this.c7(a, b); } c4(a, b) { } c3(a, b) { } c1(a, b) { } c2(a, b) { this.da(a, b); } c0(a, b) { } cx(a, b) { } c6(a, b) { this.da(a, b); } cy(a, b) { this.da(a, b); } cw(a, b) { this.m.r(b, (c, d) => { if (!c.y) { c.y = true; } let e = this.s(a, b.cellInfo.fb, b.cellInfo.hn); let f = e.ar; if (f == null) { f = false;