UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

1,070 lines (1,069 loc) 38.6 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 } from "tslib"; import { Base, runOn, delegateCombine, markType, INotifyPropertyChanged_$type, PropertyChangedEventArgs, delegateRemove, enumGetBox } from "igniteui-react-core"; import { DomWrapper_$type } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { CanvasGestureDOMEventProxy } from "igniteui-react-core"; import { ControlDisplayDensity_$type } from "igniteui-react-core"; import { GroupInfo } from "./GroupInfo"; import { XIcon } from "igniteui-react-inputs"; import { NativeUI } from "igniteui-react-core"; import { IColumnGrouping_$type } from "./IColumnGrouping"; import { SRProvider } from "igniteui-react-core"; import { BaseControlTheme_$type } from "igniteui-react-core"; import { BrushUtil } from "igniteui-react-core"; import { ObservableCollection$1 } from "igniteui-react-core"; import { ColumnGroupDescription } from "./ColumnGroupDescription"; import { ColumnGroupingVisualModelExport } from "./ColumnGroupingVisualModelExport"; import { TextVisualModelExport } from "./TextVisualModelExport"; import { IconVisualModelExport } from "igniteui-react-inputs"; import { AppearanceHelper } from "igniteui-react-core"; import { FontUtil } from "igniteui-react-core"; import { stringIsNullOrWhiteSpace, stringIsNullOrEmpty } from "igniteui-react-core"; import { isNaN_ } from "igniteui-react-core"; /** * @hidden */ var ColumnGroupingView = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ColumnGroupingView, _super); function ColumnGroupingView() { var _this = _super.call(this) || this; _this.e = null; _this.t = null; _this.r = null; _this.i = new List$1(DomWrapper_$type, 0); _this.g = new List$1(DomWrapper_$type, 0); _this.h = new List$1(DomWrapper_$type, 0); _this.n = null; _this.s = null; _this.p = null; _this.d = null; _this.f = false; _this.q = null; _this.m = null; return _this; } ColumnGroupingView.prototype.ai = function () { }; Object.defineProperty(ColumnGroupingView.prototype, "o", { get: function () { return this.n; }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGroupingView.prototype, "u", { get: function () { return this.n.rootWrapper; }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGroupingView.prototype, "v", { get: function () { return this.r; }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGroupingView.prototype, "w", { get: function () { return this.t; }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGroupingView.prototype, "l", { get: function () { return this.i; }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGroupingView.prototype, "j", { get: function () { return this.g; }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGroupingView.prototype, "k", { get: function () { return this.h; }, enumerable: false, configurable: true }); ColumnGroupingView.prototype.ah = function (a) { if (a == null) { this.n = null; return; } this.n = a; this.d = new CanvasGestureDOMEventProxy(this.o.rootWrapper, this.o, true); this.d.c8 = true; var b = this.d; b.onMouseDown = delegateCombine(b.onMouseDown, runOn(this, this.z)); var c = this.d; c.onMouseOver = delegateCombine(c.onMouseOver, runOn(this, this.aa)); var d = this.d; d.onMouseUp = delegateCombine(d.onMouseUp, runOn(this, this.ab)); this.n.rootWrapper.setStyleProperty("position", "relative"); this.n.rootWrapper.setStyleProperty("display", "flex"); this.n.rootWrapper.setStyleProperty("justify-content", "space-between"); this.n.rootWrapper.setStyleProperty("align-items", "center"); this.n.rootWrapper.setStyleProperty("padding", "4px 16px 4px 16px"); if (this.e.o == true) { this.n.rootWrapper.setStyleProperty("border-width", "0px 0px 1px 0px"); } else { this.n.rootWrapper.setStyleProperty("border-width", "1px 1px 0px 1px"); } this.n.rootWrapper.setStyleProperty("border-style", "solid"); this.n.rootWrapper.setStyleProperty("box-sizing", "border-box"); this.n.rootWrapper.setStyleProperty("border-color", "rgba(0, 0, 0, 0.2)"); this.n.rootWrapper.setStyleProperty("border-radius", "3px 3px 0px 0px"); this.n.rootWrapper.setStyleProperty("background-color", this.e.bh._fill); this.y(); }; ColumnGroupingView.prototype.an = function () { if (this.n != null) { if (this.e.o == true) { this.n.rootWrapper.setStyleProperty("border-width", "0px 0px 1px 0px"); } else { this.n.rootWrapper.setStyleProperty("border-width", "1px 1px 0px 1px"); } } }; ColumnGroupingView.prototype.ao = function () { if (this.n != null) { switch (this.e.i) { case 1: this.n.rootWrapper.setStyleProperty("height", "52px"); this.r.setStyleProperty("height", "52px"); break; case 2: this.n.rootWrapper.setStyleProperty("height", "46px"); this.r.setStyleProperty("height", "46px"); break; case 4: case 3: this.n.rootWrapper.setStyleProperty("height", "44px"); this.r.setStyleProperty("height", "44px"); break; case 0: this.n.rootWrapper.setStyleProperty("height", "46px"); this.r.setStyleProperty("height", "46px"); break; } } }; ColumnGroupingView.prototype.y = function () { if (this.n != null) { this.r = this.n.rootWrapper.getChildAt(0); this.r.setStyleProperty("width", "100%"); this.ao(); this.r.setStyleProperty("display", "flex"); this.r.setStyleProperty("align-items", "center"); this.r.setStyleProperty("flex-direction", "row"); this.s = this.n.createElement("div"); this.e.ar(this.s); this.s.setStyleProperty("height", "18px"); this.s.setStyleProperty("width", "18px"); this.s.setStyleProperty("margin-right", "5px"); this.s.setStyleProperty("color", this.e.bi.color.colorString); this.r.append(this.s); this.g.add(this.s); this.t = this.n.createElement("span"); this.aq(); this.ar(); this.r.append(this.t); var a = this.n.createElement("div"); a.setStyleProperty("display", "flex"); a.setStyleProperty("flex-direction", "row"); a.setStyleProperty("align-items", "center"); this.r.append(a); this.p = this.n.createElement("ul"); this.p.setStyleProperty("list-style-type", "none"); this.p.setStyleProperty("margin-top", "2px"); this.p.setStyleProperty("margin-bottom", "2px"); this.p.setStyleProperty("padding-left", "10px"); this.p.setStyleProperty("display", "flex"); a.append(this.p); this.ac(); } }; ColumnGroupingView.prototype.ar = function () { if (this.t != null) { this.t.setText(this.e.al); } }; ColumnGroupingView.prototype.aq = function () { if (this.t != null) { if (this.e.k != null) { this.t.setStyleProperty("font", this.e.k.t); } else { this.t.setStyleProperty("font", "14px Verdana"); } } }; ColumnGroupingView.prototype.ap = function () { if (this.p != null) { var a = this.i.count; for (var b = 0; b < a; b++) { var c = this.i._inner[b]; c.setStyleProperty("font", this.e.k.t); } } }; ColumnGroupingView.prototype.as = function () { if (this.n != null) { var groupAreaElement_ = this.n.rootWrapper.getNativeElement(); var a = (groupAreaElement_.getBoundingClientRect()); return a; } return null; }; ColumnGroupingView.prototype.ac = function () { if (this.n != null) { if (this.e.targetGrid != null) { if (this.r != null) { this.p.removeChildren(); var a = this.e.p(); var b = a.count; if (b > 0) { this.t.hide(); } else { this.t.show(); } this.e.ap(); this.i.clear(); this.g.clear(); this.h.clear(); this.g.add(this.s); for (var c = 0; c < b; c++) { if (c > 0 && c < b) { var d = this.n.createElement("li"); d.setStyleProperty("padding", "2px"); d.setStyleProperty("margin", "2px"); d.setStyleProperty("height", "18px"); d.setStyleProperty("display", "flex"); this.p.append(d); d.setAttribute("data-field", "NextMarker"); var e = this.n.createElement("div"); e.listen("click", runOn(this, this.x)); this.e.as(e); e.setStyleProperty("height", "18px"); e.setStyleProperty("width", "18px"); e.setStyleProperty("color", this.e.bi.color.colorString); d.append(e); this.g.add(e); } var f = this.n.createElement("li"); f.listen("mouseover", runOn(this, this.ae)); f.listen("mouseout", runOn(this, this.ad)); f.setStyleProperty("background-color", this.e.bj.color.colorString); f.setStyleProperty("border-radius", "3px 3px 3px 3px"); f.setStyleProperty("padding", "2px 5px 2px 5px"); f.setStyleProperty("margin", "2px"); f.setStyleProperty("height", "18px"); f.setStyleProperty("display", "flex"); f.setStyleProperty("align-items", "center"); f.listen("click", runOn(this, this.af)); this.p.append(f); this.h.add(f); f.setAttribute("data-field", a._inner[c].b.toString()); var g = this.n.createElement("span"); if (this.e.k != null) { g.setStyleProperty("font", this.e.k.t); } else { g.setStyleProperty("font", "14px Verdana"); } g.setStyleProperty("user-select", "none"); g.setStyleProperty("color", this.e.bl.color.colorString); g.setAttribute("data-field", a._inner[c].b.toString()); g.setText(a._inner[c].c.toString()); f.append(g); this.i.add(g); var h = this.n.createElement("div"); var i = true; if (a._inner[c].a == 1) { i = false; } this.e.at(h, i); h.setStyleProperty("height", "18px"); h.setStyleProperty("width", "18px"); h.setStyleProperty("color", this.e.bi.color.colorString); f.append(h); this.g.add(h); var j = this.n.createElement("div"); j.listen("click", runOn(this, this.x)); this.e.aq(j); j.setStyleProperty("height", "18px"); j.setStyleProperty("width", "18px"); j.setStyleProperty("color", this.e.bi.color.colorString); f.append(j); this.g.add(j); } } } } }; ColumnGroupingView.prototype.am = function (a, b) { if (this.n != null) { var c = this.n.getSubRenderer(b); a.provideContainer(c); } }; ColumnGroupingView.prototype.x = function (e_) { var a = (e_.originalEvent.currentTarget); var b = a.parentElement.getAttribute("data-field").toString(); this.e.a1(b); }; ColumnGroupingView.prototype.af = function (e_) { var a = (e_.originalEvent.currentTarget); var b = a.getAttribute("data-field").toString(); this.e.ao(b); }; ColumnGroupingView.prototype.z = function (a) { this.aj(a); }; ColumnGroupingView.prototype.aa = function (a, b, c) { this.ak(a); }; ColumnGroupingView.prototype.ab = function (a) { this.al(a); }; ColumnGroupingView.prototype.aj = function (a) { var b = this.h.count; for (var c = 0; c < b; c++) { var d = this.h._inner[c].getNativeElement(); var e = d.offsetLeft; var f = e + d.offsetWidth; var g = d.offsetTop; var h = d.offsetTop + d.offsetHeight; if (a.x > e && a.x < f) { if (a.y > g && a.y < h) { this.q = this.h._inner[c]; break; } } } }; ColumnGroupingView.prototype.ak = function (a) { if (this.q != null && this.f == false) { this.f = true; this.q = this.q.clone(); this.q.setStyleProperty("position", "absolute"); this.q.setStyleProperty("z-index", "12000"); this.m = this.q.getNativeElement(); document.documentElement.appendChild(this.m); } if (this.f == true) { this.m.style.cursor = "grabbing"; var b = this.as(); var c = b.left - (NativeUI.k(this.q) / 2); var d = b.top - (NativeUI.d(this.q) / 2); var e = this.c(); d += e[0]; c += e[1]; NativeUI.v(this.q, a.x + c); NativeUI.ae(this.q, a.y + d); } }; ColumnGroupingView.prototype.al = function (a) { if (this.f == true) { var b = this.as(); var c = b.width; var d = b.height; if (a.x > 0 && a.x < c) { if (a.y > 0 && a.y < d) { var e = -1; var f = -1; var g = this.h.count; for (var h = 0; h < g; h++) { var i = this.h._inner[h]; var j = i.getChildAt(0).getNativeElement(); var k = j.offsetLeft + j.offsetWidth; if (j.innerText != this.m.innerText) { if (a.x > k) { e = h; } else if (h == 0 && a.x < k) { e = -2; } } else { f = h; if (e == -1) { e = h; } } } if (e == -1) { e = g - 1; } else if (e == -2) { e = 0; } else { if (f > e) { var l = this.h._inner[e].getChildAt(0).getNativeElement(); var m = l.offsetLeft + l.offsetWidth; if (a.x > m) { e = e + 1; } } } var n = this.m.getAttribute("data-field").toString(); this.e.a2(n, e); } } if (this.q != null) { this.f = false; this.m.style.cursor = "pointer"; this.q.remove(); this.q = null; } } this.q = null; }; ColumnGroupingView.prototype.ae = function (e_) { var a = (e_.originalEvent.target); var b = this.h.count; for (var c = 0; c < b; c++) { var d = this.h._inner[c].getNativeElement(); if (d.contains(a)) { this.h._inner[c].setStyleProperty("background-color", this.e.bk.color.colorString); break; } } }; ColumnGroupingView.prototype.ad = function (e_) { var a = (e_.originalEvent.target); var b = this.h.count; for (var c = 0; c < b; c++) { var d = this.h._inner[c].getNativeElement(); if (d.contains(a)) { this.h._inner[c].setStyleProperty("background-color", this.e.bj.color.colorString); break; } } }; ColumnGroupingView.prototype.a = function () { var rect_ = this.o.rootWrapper.getNativeElement().getBoundingClientRect(); var a = (rect_.top); var b = (rect_.left); var c = new Array(2); c[0] = a; c[1] = b; return c; }; ColumnGroupingView.prototype.b = function (a) { var rect_ = a.getNativeElement().getBoundingClientRect(); var b = (rect_.top); var c = (rect_.left); var d = new Array(2); d[0] = b; d[1] = c; return d; }; ColumnGroupingView.prototype.c = function () { var a = window.pageYOffset; var b = window.pageXOffset; var c = new Array(2); c[0] = a; c[1] = b; return c; }; ColumnGroupingView.prototype.ag = function () { }; ColumnGroupingView.$t = markType(ColumnGroupingView, 'ColumnGroupingView'); return ColumnGroupingView; }(Base)); export { ColumnGroupingView }; /** * @hidden */ var ColumnGrouping = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ColumnGrouping, _super); function ColumnGrouping() { var _this = _super.call(this) || this; _this.b = null; _this.propertyChanged = null; _this.q = null; _this.e = null; _this.r = 0; _this.s = 0; _this.t = 0; _this.u = 0; _this.l = null; _this.o = false; _this.c = null; _this.f = 1; _this.h = 2; _this.w = "Drag a Column Here"; _this.bg = BrushUtil.h(158, 0, 0, 0); _this.j = null; _this.bf = BrushUtil.h(158, 0, 0, 0); _this.bc = BrushUtil.h(158, 0, 0, 0); _this.bd = BrushUtil.h(30, 0, 0, 0); _this.be = BrushUtil.h(66, 0, 0, 0); _this.bb = BrushUtil.h(255, 248, 248, 248); _this.v = 0; _this.n = false; _this.q = new ObservableCollection$1(XIcon.$, 0); var a = new ColumnGroupingView(); a.e = _this; _this.b = a; _this.b.ai(); return _this; } ColumnGrouping.prototype.notifySizeChanged = function () { this.b.ag(); }; ColumnGrouping.prototype.destroy = function () { this.provideContainer(null); if (this.targetGrid != null) { var a = this.targetGrid; a.groupDescriptionsChanged = delegateRemove(a.groupDescriptionsChanged, runOn(this, this.a7)); var b = this.targetGrid; b.actualColumnsChanged = delegateRemove(b.actualColumnsChanged, runOn(this, this.a6)); var c = this.targetGrid.dragger; c.onDrag = delegateRemove(c.onDrag, runOn(this, this.av)); var d = this.targetGrid.dragger; d.onDragEnd = delegateRemove(d.onDragEnd, runOn(this, this.aw)); } }; ColumnGrouping.prototype.provideContainer = function (a) { this.b.ah(a); }; Object.defineProperty(ColumnGrouping.prototype, "m", { get: function () { if (this.l == null) { this.l = new SRProvider(this.b.o); this.l.cb("ColumnGrouping"); } return this.l; }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGrouping.prototype, "targetGrid", { get: function () { return this.c; }, set: function (a) { var b = this.c; this.c = a; if (b != this.c) { this.ay("TargetGrid", b, this.c); } }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGrouping.prototype, "g", { get: function () { return this.f; }, set: function (a) { var b = this.f; this.f = a; if (b != this.f) { this.ay("BaseTheme", enumGetBox(BaseControlTheme_$type, b), enumGetBox(BaseControlTheme_$type, this.f)); } }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGrouping.prototype, "i", { get: function () { return this.h; }, set: function (a) { var b = this.h; this.h = a; if (b != this.h) { this.ay("Density", enumGetBox(ControlDisplayDensity_$type, b), enumGetBox(ControlDisplayDensity_$type, this.h)); } }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGrouping.prototype, "al", { get: function () { return this.w; }, set: function (a) { var b = this.w; this.w = a; if (b != this.w) { this.ay("Title", b, this.w); } }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGrouping.prototype, "bm", { get: function () { return this.bg; }, set: function (a) { var b = this.bg; this.bg = a; if (b != this.bg) { this.ay("TitleColor", b, this.bg); } }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGrouping.prototype, "k", { get: function () { return this.j; }, set: function (a) { var b = this.j; this.j = a; if (b != this.j) { this.ay("TextStyle", b, this.j); } }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGrouping.prototype, "bl", { get: function () { return this.bf; }, set: function (a) { var b = this.bf; this.bf = a; if (b != this.bf) { this.ay("TextColor", b, this.bf); } }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGrouping.prototype, "bi", { get: function () { return this.bc; }, set: function (a) { var b = this.bc; this.bc = a; if (b != this.bc) { this.ay("IconColor", b, this.bc); } }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGrouping.prototype, "bj", { get: function () { return this.bd; }, set: function (a) { var b = this.bd; this.bd = a; if (b != this.bd) { this.ay("ItemBackgroundColor", b, this.bd); } }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGrouping.prototype, "bk", { get: function () { return this.be; }, set: function (a) { var b = this.be; this.be = a; if (b != this.be) { this.ay("ItemHoverBackgroundColor", b, this.be); } }, enumerable: false, configurable: true }); Object.defineProperty(ColumnGrouping.prototype, "bh", { get: function () { return this.bb; }, set: function (a) { var b = this.bb; this.bb = a; if (b != this.bb) { this.ay("BackgroundColor", b, this.bb); } }, enumerable: false, configurable: true }); ColumnGrouping.prototype.ay = function (a, b, c) { if (this.propertyChanged != null) { this.propertyChanged(this, new PropertyChangedEventArgs(a)); } this.az(a, b, c); }; ColumnGrouping.prototype.az = function (a, b, c) { switch (a) { case "TargetGrid": this.a5(); break; case "BaseTheme": this.a4(); break; case "Density": this.a3(); break; case "Title": this.a9(); break; case "TitleColor": this.ba(); break; case "TextStyle": this.b.ap(); this.b.aq(); break; case "TextColor": case "IconColor": case "ItemBackgroundColor": this.a8(); break; case "ItemHoverBackgroundColor": break; case "BackgroundColor": NativeUI.m(this.b.u, this.bh); break; } }; ColumnGrouping.prototype.a4 = function () { }; ColumnGrouping.prototype.ba = function () { var a = this.b.w; if (this.bm != null) { NativeUI.q(a, this.bm); } }; ColumnGrouping.prototype.a9 = function () { if (stringIsNullOrWhiteSpace(this.al)) { this.al = !stringIsNullOrWhiteSpace(this.m.b1("Title")) ? this.m.b1("Title") : "Drag a Column Here"; } this.b.ar(); }; ColumnGrouping.prototype.a8 = function () { var a = this.b.l; var b = this.b.j; var c = this.b.k; for (var d = 0; d < a.count; d++) { NativeUI.q(a._inner[d], this.bl); } for (var e = 0; e < b.count; e++) { NativeUI.q(b._inner[e], this.bi); } for (var f = 0; f < c.count; f++) { NativeUI.m(c._inner[f], this.bj); } }; ColumnGrouping.prototype.a3 = function () { if (this.i == 0) { if (this.targetGrid != null) { this.i = this.targetGrid.density; } } this.b.ao(); }; ColumnGrouping.prototype.a5 = function () { if (this.targetGrid != null) { this.a9(); if (this.targetGrid.isGroupByAreaVisible) { this.o = true; } this.b.an(); var a = this.targetGrid; a.groupDescriptionsChanged = delegateCombine(a.groupDescriptionsChanged, runOn(this, this.a7)); var b = this.targetGrid; b.actualColumnsChanged = delegateCombine(b.actualColumnsChanged, runOn(this, this.a6)); if (this.targetGrid.dragger != null) { var c = this.targetGrid.dragger; c.onDrag = delegateCombine(c.onDrag, runOn(this, this.av)); var d = this.targetGrid.dragger; d.onDragEnd = delegateCombine(d.onDragEnd, runOn(this, this.aw)); } this.b.ac(); } }; ColumnGrouping.prototype.p = function () { var a = new List$1(GroupInfo.$, 0); if (this.targetGrid != null) { var b = this.targetGrid.actualColumns; var c_1 = this.targetGrid.groupDescriptions.j; var _loop_1 = function (d) { var e = new GroupInfo(); var f = b.i(function (g) { return g.lo == c_1.item(d).f; }); if (f != -1) { if (!stringIsNullOrEmpty(b._inner[f].lv)) { e.c = b._inner[f].lv; } else { e.c = c_1.item(d).f; } e.b = c_1.item(d).f; e.a = c_1.item(d).c; a.add(e); } else { e.c = c_1.item(d).f; e.b = c_1.item(d).f; e.a = c_1.item(d).c; a.add(e); } }; for (var d = 0; d < c_1.count; d++) { _loop_1(d); } } return a; }; ColumnGrouping.prototype.aw = function (a, b) { if (this.targetGrid.dragger.dragType == 2) { var c = this.b.as(); var d = c.height * -1; var e = 0; var f = 0; var g = c.right - c.left; if (this.t > f && this.t < g) { if (this.u > d && this.u < e) { var h = a; var i = this.targetGrid.actualColumns._inner[h.cellPath.a5]; var j = new ColumnGroupDescription(0); j.f = i.lo; j.c = 1; var k = this.targetGrid.groupDescriptions.j.contains(j); j.c = 0; var l = this.targetGrid.groupDescriptions.j.contains(j); if (l == false && k == false) { var m = this.b.l; var n = m.count; var o = false; for (var p = 0; p < n; p++) { var q = this.b.b(m._inner[p]); var r = NativeUI.k(m._inner[p]); var s = q[1] - c.left + r; if (this.t < s) { this.targetGrid.groupDescriptions.o(p, j); o = true; break; } } if (o == false) { this.targetGrid.groupDescriptions.g(j); } } a.cancel(); } } } }; ColumnGrouping.prototype.av = function (a, b) { if (this.targetGrid.dragger == null) { return; } this.r = b.startX; this.s = b.startY; this.t = b.currentX; this.u = b.currentY; if (this.u < 0) { if (this.n == false) { this.v = this.targetGrid.columnMovingSeparatorOpacity; this.targetGrid.columnMovingSeparatorOpacity = 0; this.n = true; } } else { if (this.n == true) { this.targetGrid.columnMovingSeparatorOpacity = this.v; this.n = false; } } }; ColumnGrouping.prototype.at = function (a, b) { var c = new XIcon(); this.b.am(c, a); if (b) { c.svgPath = ColumnGrouping.x; } else { c.svgPath = ColumnGrouping.ac; } c.fill = BrushUtil.h(255, 119, 119, 119); this.q.add(c); }; ColumnGrouping.prototype.aq = function (a) { var b = new XIcon(); this.b.am(b, a); b.svgPath = ColumnGrouping.aa; b.fill = BrushUtil.h(255, 119, 119, 119); this.q.add(b); }; ColumnGrouping.prototype.as = function (a) { var b = new XIcon(); this.b.am(b, a); b.svgPath = ColumnGrouping.ah; b.fill = BrushUtil.h(255, 119, 119, 119); this.q.add(b); }; ColumnGrouping.prototype.ar = function (a) { var b = new XIcon(); this.b.am(b, a); b.svgPath = ColumnGrouping.ad; b.fill = BrushUtil.h(255, 119, 119, 119); this.e = b; this.q.add(this.e); }; ColumnGrouping.prototype.ap = function () { this.q.clear(); if (this.e != null) { this.q.add(this.e); } }; ColumnGrouping.prototype.ao = function (a) { var b = this.targetGrid.groupDescriptions.j.count; for (var c = 0; c < b; c++) { var d = this.targetGrid.groupDescriptions.j.item(c); if (d.f == a) { this.targetGrid.groupDescriptions.d(c); if (d.c == 0) { d.c = 1; } else { d.c = 0; } this.targetGrid.groupDescriptions.o(c, d); break; } } }; ColumnGrouping.prototype.a1 = function (a) { var b = this.targetGrid.groupDescriptions.j.count; for (var c = 0; c < b; c++) { var d = this.targetGrid.groupDescriptions.j.item(c); if (d.f == a) { this.targetGrid.groupDescriptions.d(c); break; } } }; ColumnGrouping.prototype.a2 = function (a, b) { var c = this.targetGrid.groupDescriptions.j.count; var d = null; for (var e = 0; e < c; e++) { if (this.targetGrid.groupDescriptions.j.item(e).f == a) { d = this.targetGrid.groupDescriptions.j.item(e); this.targetGrid.groupDescriptions.d(e); break; } } this.targetGrid.groupDescriptions.j.insert(b, d); }; ColumnGrouping.prototype.a7 = function (a, b) { this.b.ac(); }; ColumnGrouping.prototype.a6 = function (a, b) { this.b.ac(); }; ColumnGrouping.prototype.exportVisualModel = function () { return this.a(); }; ColumnGrouping.prototype.exportSerializedVisualModel = function () { var a = this.a(); return a.serialize(); }; ColumnGrouping.prototype.a = function () { var a = new ColumnGroupingVisualModelExport(); var b = this.b.v; a.d = new List$1(IconVisualModelExport.$, 0); a.c = new List$1(TextVisualModelExport.$, 0); a.b = this.i; a.a = this.g; var c = this.b.a(); var d = c[0]; var e = c[1]; a.h = d; a.f = e; a.e = NativeUI.d(b); a.i = NativeUI.k(b); var f = this.b.l; for (var g = 0; g < f.count; g++) { var h = new TextVisualModelExport(); var i = this.b.b(f._inner[g]); h.e = i[0] - d; h.d = i[1] - e; h.c = NativeUI.d(f._inner[g]); h.f = NativeUI.k(f._inner[g]); h.b = AppearanceHelper.a(NativeUI.al(f._inner[g])); h.g = f._inner[g].getText(); a.c.add(h); } var j = this.b.j; for (var k = 0; k < j.count; k++) { var l = this.q._inner[k].a0(); var m = this.b.b(j._inner[k]); l.i = m[0] - d; l.g = m[1] - e; l.f = NativeUI.d(j._inner[k]); l.j = NativeUI.k(j._inner[k]); a.d.add(l); } if (this.k != null) { var n = this.k; if (this.b != null && n.q == null) { var o = this.b.o; var p = FontUtil.getFontInfoFromString(o, n.fontString); n.q = p.q; n.f = p.f; n.r = p.r; n.t = p.t; n.u = p.u; n.v = p.v; } if (n.q != null) { a.j = n.q; } if (!isNaN_(n.f)) { a.g = n.f; } if (n.v != null) { a.n = n.v; } if (n.t != null) { a.l = n.t; } if (n.r != null) { a.k = n.t; } } return a; }; ColumnGrouping.$t = markType(ColumnGrouping, 'ColumnGrouping', Base.$, [IColumnGrouping_$type, INotifyPropertyChanged_$type]); ColumnGrouping.x = "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"; ColumnGrouping.ac = "M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"; ColumnGrouping.aa = "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"; ColumnGrouping.ah = "M15,5l-1.41,1.41L18.17,11H2V13h16.17l-4.59,4.59L15,19l7-7L15,5z"; ColumnGrouping.ad = "M9,19v-2h11v2H9z M9,15v-2h11v2H9z M9,11V9h11v2H9z M7,7V5h13v2H7z M4,5h2v2H4V5z"; return ColumnGrouping; }(Base)); export { ColumnGrouping };