igniteui-react-grids
Version:
Ignite UI React grid components.
988 lines (987 loc) • 36.7 kB
JavaScript
/*
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, 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
*/
export let ColumnGroupingView = /*@__PURE__*/ (() => {
class ColumnGroupingView extends Base {
constructor() {
super();
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;
}
ai() {
}
get o() {
return this.n;
}
get u() {
return this.n.rootWrapper;
}
get v() {
return this.r;
}
get w() {
return this.t;
}
get l() {
return this.i;
}
get j() {
return this.g;
}
get k() {
return this.h;
}
ah(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;
let b = this.d;
b.onMouseDown = delegateCombine(b.onMouseDown, runOn(this, this.z));
let c = this.d;
c.onMouseOver = delegateCombine(c.onMouseOver, runOn(this, this.aa));
let 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();
}
an() {
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");
}
}
}
ao() {
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;
}
}
}
y() {
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);
let 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();
}
}
ar() {
if (this.t != null) {
this.t.setText(this.e.al);
}
}
aq() {
if (this.t != null) {
if (this.e.k != null) {
this.t.setStyleProperty("font", this.e.k.t);
}
else {
this.t.setStyleProperty("font", "14px Verdana");
}
}
}
ap() {
if (this.p != null) {
let a = this.i.count;
for (let b = 0; b < a; b++) {
let c = this.i._inner[b];
c.setStyleProperty("font", this.e.k.t);
}
}
}
as() {
if (this.n != null) {
let groupAreaElement_ = this.n.rootWrapper.getNativeElement();
let a = (groupAreaElement_.getBoundingClientRect());
return a;
}
return null;
}
ac() {
if (this.n != null) {
if (this.e.targetGrid != null) {
if (this.r != null) {
this.p.removeChildren();
let a = this.e.p();
let 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 (let c = 0; c < b; c++) {
if (c > 0 && c < b) {
let 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");
let 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);
}
let 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());
let 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);
let h = this.n.createElement("div");
let 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);
let 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);
}
}
}
}
}
am(a, b) {
if (this.n != null) {
let c = this.n.getSubRenderer(b);
a.provideContainer(c);
}
}
x(e_) {
let a = (e_.originalEvent.currentTarget);
let b = a.parentElement.getAttribute("data-field").toString();
this.e.a1(b);
}
af(e_) {
let a = (e_.originalEvent.currentTarget);
let b = a.getAttribute("data-field").toString();
this.e.ao(b);
}
z(a) {
this.aj(a);
}
aa(a, b, c) {
this.ak(a);
}
ab(a) {
this.al(a);
}
aj(a) {
let b = this.h.count;
for (let c = 0; c < b; c++) {
let d = this.h._inner[c].getNativeElement();
let e = d.offsetLeft;
let f = e + d.offsetWidth;
let g = d.offsetTop;
let 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;
}
}
}
}
ak(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";
let b = this.as();
let c = b.left - (NativeUI.k(this.q) / 2);
let d = b.top - (NativeUI.d(this.q) / 2);
let e = this.c();
d += e[0];
c += e[1];
NativeUI.v(this.q, a.x + c);
NativeUI.ae(this.q, a.y + d);
}
}
al(a) {
if (this.f == true) {
let b = this.as();
let c = b.width;
let d = b.height;
if (a.x > 0 && a.x < c) {
if (a.y > 0 && a.y < d) {
let e = -1;
let f = -1;
let g = this.h.count;
for (let h = 0; h < g; h++) {
let i = this.h._inner[h];
let j = i.getChildAt(0).getNativeElement();
let 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) {
let l = this.h._inner[e].getChildAt(0).getNativeElement();
let m = l.offsetLeft + l.offsetWidth;
if (a.x > m) {
e = e + 1;
}
}
}
let 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;
}
ae(e_) {
let a = (e_.originalEvent.target);
let b = this.h.count;
for (let c = 0; c < b; c++) {
let d = this.h._inner[c].getNativeElement();
if (d.contains(a)) {
this.h._inner[c].setStyleProperty("background-color", this.e.bk.color.colorString);
break;
}
}
}
ad(e_) {
let a = (e_.originalEvent.target);
let b = this.h.count;
for (let c = 0; c < b; c++) {
let d = this.h._inner[c].getNativeElement();
if (d.contains(a)) {
this.h._inner[c].setStyleProperty("background-color", this.e.bj.color.colorString);
break;
}
}
}
a() {
let rect_ = this.o.rootWrapper.getNativeElement().getBoundingClientRect();
let a = (rect_.top);
let b = (rect_.left);
let c = new Array(2);
c[0] = a;
c[1] = b;
return c;
}
b(a) {
let rect_ = a.getNativeElement().getBoundingClientRect();
let b = (rect_.top);
let c = (rect_.left);
let d = new Array(2);
d[0] = b;
d[1] = c;
return d;
}
c() {
let a = window.pageYOffset;
let b = window.pageXOffset;
let c = new Array(2);
c[0] = a;
c[1] = b;
return c;
}
ag() {
}
}
ColumnGroupingView.$t = /*@__PURE__*/ markType(ColumnGroupingView, 'ColumnGroupingView');
return ColumnGroupingView;
})();
/**
* @hidden
*/
export let ColumnGrouping = /*@__PURE__*/ (() => {
class ColumnGrouping extends Base {
constructor() {
super();
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);
let a = new ColumnGroupingView();
a.e = this;
this.b = a;
this.b.ai();
}
notifySizeChanged() {
this.b.ag();
}
destroy() {
this.provideContainer(null);
if (this.targetGrid != null) {
let a = this.targetGrid;
a.groupDescriptionsChanged = delegateRemove(a.groupDescriptionsChanged, runOn(this, this.a7));
let b = this.targetGrid;
b.actualColumnsChanged = delegateRemove(b.actualColumnsChanged, runOn(this, this.a6));
let c = this.targetGrid.dragger;
c.onDrag = delegateRemove(c.onDrag, runOn(this, this.av));
let d = this.targetGrid.dragger;
d.onDragEnd = delegateRemove(d.onDragEnd, runOn(this, this.aw));
}
}
provideContainer(a) {
this.b.ah(a);
}
get m() {
if (this.l == null) {
this.l = new SRProvider(this.b.o);
this.l.cb("ColumnGrouping");
}
return this.l;
}
get targetGrid() {
return this.c;
}
set targetGrid(a) {
let b = this.c;
this.c = a;
if (b != this.c) {
this.ay("TargetGrid", b, this.c);
}
}
get g() {
return this.f;
}
set g(a) {
let b = this.f;
this.f = a;
if (b != this.f) {
this.ay("BaseTheme", enumGetBox(BaseControlTheme_$type, b), enumGetBox(BaseControlTheme_$type, this.f));
}
}
get i() {
return this.h;
}
set i(a) {
let b = this.h;
this.h = a;
if (b != this.h) {
this.ay("Density", enumGetBox(ControlDisplayDensity_$type, b), enumGetBox(ControlDisplayDensity_$type, this.h));
}
}
get al() {
return this.w;
}
set al(a) {
let b = this.w;
this.w = a;
if (b != this.w) {
this.ay("Title", b, this.w);
}
}
get bm() {
return this.bg;
}
set bm(a) {
let b = this.bg;
this.bg = a;
if (b != this.bg) {
this.ay("TitleColor", b, this.bg);
}
}
get k() {
return this.j;
}
set k(a) {
let b = this.j;
this.j = a;
if (b != this.j) {
this.ay("TextStyle", b, this.j);
}
}
get bl() {
return this.bf;
}
set bl(a) {
let b = this.bf;
this.bf = a;
if (b != this.bf) {
this.ay("TextColor", b, this.bf);
}
}
get bi() {
return this.bc;
}
set bi(a) {
let b = this.bc;
this.bc = a;
if (b != this.bc) {
this.ay("IconColor", b, this.bc);
}
}
get bj() {
return this.bd;
}
set bj(a) {
let b = this.bd;
this.bd = a;
if (b != this.bd) {
this.ay("ItemBackgroundColor", b, this.bd);
}
}
get bk() {
return this.be;
}
set bk(a) {
let b = this.be;
this.be = a;
if (b != this.be) {
this.ay("ItemHoverBackgroundColor", b, this.be);
}
}
get bh() {
return this.bb;
}
set bh(a) {
let b = this.bb;
this.bb = a;
if (b != this.bb) {
this.ay("BackgroundColor", b, this.bb);
}
}
ay(a, b, c) {
if (this.propertyChanged != null) {
this.propertyChanged(this, new PropertyChangedEventArgs(a));
}
this.az(a, b, c);
}
az(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;
}
}
a4() {
}
ba() {
let a = this.b.w;
if (this.bm != null) {
NativeUI.q(a, this.bm);
}
}
a9() {
if (stringIsNullOrWhiteSpace(this.al)) {
this.al = !stringIsNullOrWhiteSpace(this.m.b1("Title")) ? this.m.b1("Title") : "Drag a Column Here";
}
this.b.ar();
}
a8() {
let a = this.b.l;
let b = this.b.j;
let c = this.b.k;
for (let d = 0; d < a.count; d++) {
NativeUI.q(a._inner[d], this.bl);
}
for (let e = 0; e < b.count; e++) {
NativeUI.q(b._inner[e], this.bi);
}
for (let f = 0; f < c.count; f++) {
NativeUI.m(c._inner[f], this.bj);
}
}
a3() {
if (this.i == 0) {
if (this.targetGrid != null) {
this.i = this.targetGrid.density;
}
}
this.b.ao();
}
a5() {
if (this.targetGrid != null) {
this.a9();
if (this.targetGrid.isGroupByAreaVisible) {
this.o = true;
}
this.b.an();
let a = this.targetGrid;
a.groupDescriptionsChanged = delegateCombine(a.groupDescriptionsChanged, runOn(this, this.a7));
let b = this.targetGrid;
b.actualColumnsChanged = delegateCombine(b.actualColumnsChanged, runOn(this, this.a6));
if (this.targetGrid.dragger != null) {
let c = this.targetGrid.dragger;
c.onDrag = delegateCombine(c.onDrag, runOn(this, this.av));
let d = this.targetGrid.dragger;
d.onDragEnd = delegateCombine(d.onDragEnd, runOn(this, this.aw));
}
this.b.ac();
}
}
p() {
let a = new List$1(GroupInfo.$, 0);
if (this.targetGrid != null) {
let b = this.targetGrid.actualColumns;
let c = this.targetGrid.groupDescriptions.j;
for (let d = 0; d < c.count; d++) {
let e = new GroupInfo();
let f = b.i((g) => g.lo == c.item(d).f);
if (f != -1) {
if (!stringIsNullOrEmpty(b._inner[f].lv)) {
e.c = b._inner[f].lv;
}
else {
e.c = c.item(d).f;
}
e.b = c.item(d).f;
e.a = c.item(d).c;
a.add(e);
}
else {
e.c = c.item(d).f;
e.b = c.item(d).f;
e.a = c.item(d).c;
a.add(e);
}
}
}
return a;
}
aw(a, b) {
if (this.targetGrid.dragger.dragType == 2) {
let c = this.b.as();
let d = c.height * -1;
let e = 0;
let f = 0;
let g = c.right - c.left;
if (this.t > f && this.t < g) {
if (this.u > d && this.u < e) {
let h = a;
let i = this.targetGrid.actualColumns._inner[h.cellPath.a5];
let j = new ColumnGroupDescription(0);
j.f = i.lo;
j.c = 1;
let k = this.targetGrid.groupDescriptions.j.contains(j);
j.c = 0;
let l = this.targetGrid.groupDescriptions.j.contains(j);
if (l == false && k == false) {
let m = this.b.l;
let n = m.count;
let o = false;
for (let p = 0; p < n; p++) {
let q = this.b.b(m._inner[p]);
let r = NativeUI.k(m._inner[p]);
let 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();
}
}
}
}
av(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;
}
}
}
at(a, b) {
let 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);
}
aq(a) {
let b = new XIcon();
this.b.am(b, a);
b.svgPath = ColumnGrouping.aa;
b.fill = BrushUtil.h(255, 119, 119, 119);
this.q.add(b);
}
as(a) {
let b = new XIcon();
this.b.am(b, a);
b.svgPath = ColumnGrouping.ah;
b.fill = BrushUtil.h(255, 119, 119, 119);
this.q.add(b);
}
ar(a) {
let 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);
}
ap() {
this.q.clear();
if (this.e != null) {
this.q.add(this.e);
}
}
ao(a) {
let b = this.targetGrid.groupDescriptions.j.count;
for (let c = 0; c < b; c++) {
let 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;
}
}
}
a1(a) {
let b = this.targetGrid.groupDescriptions.j.count;
for (let c = 0; c < b; c++) {
let d = this.targetGrid.groupDescriptions.j.item(c);
if (d.f == a) {
this.targetGrid.groupDescriptions.d(c);
break;
}
}
}
a2(a, b) {
let c = this.targetGrid.groupDescriptions.j.count;
let d = null;
for (let 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);
}
a7(a, b) {
this.b.ac();
}
a6(a, b) {
this.b.ac();
}
exportVisualModel() {
return this.a();
}
exportSerializedVisualModel() {
let a = this.a();
return a.serialize();
}
a() {
let a = new ColumnGroupingVisualModelExport();
let 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;
let c = this.b.a();
let d = c[0];
let e = c[1];
a.h = d;
a.f = e;
a.e = NativeUI.d(b);
a.i = NativeUI.k(b);
let f = this.b.l;
for (let g = 0; g < f.count; g++) {
let h = new TextVisualModelExport();
let 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);
}
let j = this.b.j;
for (let k = 0; k < j.count; k++) {
let l = this.q._inner[k].ay();
let 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) {
let n = this.k;
if (this.b != null && n.q == null) {
let o = this.b.o;
let 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 = /*@__PURE__*/ 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;
})();