@guiexpert/table 1.1.37 → 1.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/main.css +34 -0
- package/css/table-classes.css +35 -0
- package/index.cjs +37 -15
- package/index.d.ts +1 -0
- package/index.js +192 -139
- package/lib/table/crud/crud-object-view.d.ts +9 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function ht(h, e = 500) {
|
|
2
2
|
let t = null, s = 0;
|
|
3
3
|
return function(...o) {
|
|
4
4
|
const i = Date.now(), r = e - (i - s);
|
|
@@ -15,7 +15,7 @@ function ve(h, e = 500) {
|
|
|
15
15
|
}, e);
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function ut(h = 500) {
|
|
19
19
|
return function(e, t, s) {
|
|
20
20
|
let o = 0;
|
|
21
21
|
const i = s.value;
|
|
@@ -1070,7 +1070,7 @@ class k {
|
|
|
1070
1070
|
this.header = e, this.body = t, this.footer = s;
|
|
1071
1071
|
}
|
|
1072
1072
|
}
|
|
1073
|
-
class
|
|
1073
|
+
class $e extends Le {
|
|
1074
1074
|
constructor(e, t, s, o) {
|
|
1075
1075
|
var r, l;
|
|
1076
1076
|
super(e, t, s, o), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
@@ -1960,12 +1960,12 @@ class _e extends Le {
|
|
|
1960
1960
|
n.setAttribute(a, "data-col-index", `${t}`), n.setAttribute(a, "data-row-index", `${e}`), n.setAttribute(a, "data-area", "header"), n.setAttribute(a, "data-ge-action", "resize-column"), n.addClass(a, "ge-table-column-resize-handle"), n.setStyle(a, "display", "clip"), n.setStyle(a, "position", "absolute"), n.setStyle(a, "cursor", "col-resize"), n.setStyle(a, "left", `${s + i - c}px`), n.setStyle(a, "top", `${o}px`), n.setStyle(a, "width", `${c}px`), n.setStyle(a, "height", `${r}px`), n.appendChild(l, a);
|
|
1961
1961
|
}
|
|
1962
1962
|
}
|
|
1963
|
-
class
|
|
1963
|
+
class _e {
|
|
1964
1964
|
constructor(e, t) {
|
|
1965
1965
|
this.columnIndex = e, this.sortState = t;
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
|
1968
|
-
class
|
|
1968
|
+
class Oe {
|
|
1969
1969
|
constructor(e) {
|
|
1970
1970
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
1971
1971
|
}
|
|
@@ -2567,14 +2567,14 @@ class Ke {
|
|
|
2567
2567
|
return this.createZip(s);
|
|
2568
2568
|
}
|
|
2569
2569
|
}
|
|
2570
|
-
class Se extends
|
|
2570
|
+
class Se extends $e {
|
|
2571
2571
|
constructor(e, t, s, o, i, r = new U(), l = new Ke()) {
|
|
2572
2572
|
var a;
|
|
2573
2573
|
if (super(e, t, new Re(s), o), this.eventListener = i, this.copyService = r, this.excelService = l, this.licenseManager = B.getInstance(), this.selectionService = new He(this), this.api = new Te(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, t.setTableScope(this), i || (this.eventListener = new le()), (a = this.tableOptions) != null && a.autoRestoreOptions) {
|
|
2574
2574
|
const d = this.tableOptions.autoRestoreOptions, u = d.getStorageKeyFn;
|
|
2575
2575
|
u && (d.autoRestoreScrollPosition && (this.storeScrollPosStateService = new ke(u)), d.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new De(u)), d.autoRestoreSortingState && (this.storeSortingService = new Fe(u)));
|
|
2576
2576
|
}
|
|
2577
|
-
this.mouseHandler = new Me(this), this.inputHandler = new
|
|
2577
|
+
this.mouseHandler = new Me(this), this.inputHandler = new Oe(this), this.resizeHandler = new Ye(this, o.resizeEventDebounceDelay), this.shortcutService = new Ne(this), this.shortcutService.addListener(this.selectionService);
|
|
2578
2578
|
const n = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2579
2579
|
n && n.addEventSelectionChangedListener(this);
|
|
2580
2580
|
const c = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
@@ -2790,7 +2790,7 @@ class Se extends _e {
|
|
|
2790
2790
|
const o = this.tableModel.getColumnDef(s);
|
|
2791
2791
|
if (o != null && o.sortable && o.sortable()) {
|
|
2792
2792
|
e.preventDefault(), e.stopPropagation();
|
|
2793
|
-
const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, n = o.sortState ?? "", c = l[(l.indexOf(n) + 1) % l.length], a = new
|
|
2793
|
+
const l = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, n = o.sortState ?? "", c = l[(l.indexOf(n) + 1) % l.length], a = new _e(s, c);
|
|
2794
2794
|
this.tableModel.doSort([a]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((u) => u.sortState = ""), o.sortState = c), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([a]);
|
|
2795
2795
|
}
|
|
2796
2796
|
}
|
|
@@ -3261,7 +3261,7 @@ class x {
|
|
|
3261
3261
|
}
|
|
3262
3262
|
}
|
|
3263
3263
|
const qe = () => !0, de = () => !1;
|
|
3264
|
-
class
|
|
3264
|
+
class O {
|
|
3265
3265
|
constructor(e, t, s = new x(100, "px"), o = new k(), i = new k(), r = new x(100, "px"), l = new x(100, "px"), n, c, a, d, u, f, p, m, g = () => this.visible) {
|
|
3266
3266
|
this.property = e, this.headerLabel = t, this.width = s, this.classes = o, this.rendererMap = i, this.minWidth = r, this.maxWidth = l, this.sortable = n, this.sortComparator = c, this.sortState = a, this.sortStatesOrder = d, this.sortIconVisible = u, this.editable = f, this.getEditRenderer = p, this.editInputPipe = m, this.isVisible = g, this.visible = !0, s.unit !== "px" && (this.minWidth = new x(0, "px"), this.maxWidth = new x(1e5, "px"));
|
|
3267
3267
|
}
|
|
@@ -3282,7 +3282,7 @@ class $ {
|
|
|
3282
3282
|
e.bodyClasses,
|
|
3283
3283
|
e.footerClasses
|
|
3284
3284
|
), o = e.sortIconVisible ?? e.sortable ?? de, i = e.editable ?? e.editable ?? de, r = e.isVisible ?? e.isVisible ?? qe;
|
|
3285
|
-
return new
|
|
3285
|
+
return new O(
|
|
3286
3286
|
e.property ?? "",
|
|
3287
3287
|
e.headerLabel ?? "",
|
|
3288
3288
|
e.width ?? new x(100, "px"),
|
|
@@ -3302,7 +3302,7 @@ class $ {
|
|
|
3302
3302
|
);
|
|
3303
3303
|
}
|
|
3304
3304
|
}
|
|
3305
|
-
const
|
|
3305
|
+
const gt = new x(500, "px"), pt = new x(400, "px"), Je = new x(300, "px"), ft = new x(290, "px"), mt = new x(280, "px"), bt = new x(270, "px"), xt = new x(260, "px"), wt = new x(250, "px"), St = new x(240, "px"), yt = new x(230, "px"), Ct = new x(220, "px"), vt = new x(210, "px"), he = new x(200, "px"), At = new x(190, "px"), Rt = new x(180, "px"), Et = new x(170, "px"), Mt = new x(160, "px"), Tt = new x(150, "px"), kt = new x(140, "px"), It = new x(130, "px"), Dt = new x(120, "px"), Ft = new x(110, "px"), Lt = new x(100, "px"), Pt = new x(90, "px"), $t = new x(80, "px"), _t = new x(70, "px"), Ot = new x(60, "px"), Bt = new x(50, "px"), Ht = new x(40, "px"), Wt = new x(30, "px"), Vt = new x(20, "px"), Nt = new x(10, "px"), Gt = new x(0, "px");
|
|
3306
3306
|
class re {
|
|
3307
3307
|
constructor(e, t = [], s = -1) {
|
|
3308
3308
|
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = s, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((o) => o.rendererMap[e]);
|
|
@@ -4186,7 +4186,7 @@ class fe extends et {
|
|
|
4186
4186
|
), this.areaIdent = e, this.rows = t, this.columnDefs = s, this.defaultRowHeight = o;
|
|
4187
4187
|
}
|
|
4188
4188
|
}
|
|
4189
|
-
class
|
|
4189
|
+
class _ {
|
|
4190
4190
|
/**
|
|
4191
4191
|
* TableFactory
|
|
4192
4192
|
*
|
|
@@ -4242,7 +4242,7 @@ class O {
|
|
|
4242
4242
|
g > -1 && (e.defaultRowHeights.footer = g);
|
|
4243
4243
|
}
|
|
4244
4244
|
}
|
|
4245
|
-
if (e.columnDefs === void 0 && ((s = e.properties) != null && s.length ? e.columnDefs = e.properties.map((g) => new
|
|
4245
|
+
if (e.columnDefs === void 0 && ((s = e.properties) != null && s.length ? e.columnDefs = e.properties.map((g) => new O(g, g.toUpperCase(), he)) : (o = e.rows) != null && o.length ? e.columnDefs = Object.keys(e.rows[0]).map((g) => new O(g, g.toUpperCase(), he)) : e.columnDefs = []), e.columnCount === void 0 && ((i = e.columnDefs) != null && i.length ? e.columnCount = e.columnDefs.length : (r = e.headerData) != null && r.length ? e.columnCount = e.headerData[0].length : (l = e.columnSizes) != null && l.length ? e.columnCount = (n = e.columnSizes) == null ? void 0 : n.length : console.warn('Property "columnCount" is missing and cannot be derived from other properties.')), e.headerAreaModel || ((c = e.headerData) != null && c.length ? e.headerAreaModel = new D(
|
|
4246
4246
|
"header",
|
|
4247
4247
|
e.headerData,
|
|
4248
4248
|
e.defaultRowHeights.header,
|
|
@@ -4314,7 +4314,7 @@ class O {
|
|
|
4314
4314
|
* @method
|
|
4315
4315
|
*/
|
|
4316
4316
|
static buildByTypedRowsParam(e) {
|
|
4317
|
-
return
|
|
4317
|
+
return _.buildByTypedRows(
|
|
4318
4318
|
e.rows ?? [],
|
|
4319
4319
|
e.columnDefs,
|
|
4320
4320
|
e.tableOptions ?? new z(),
|
|
@@ -4367,7 +4367,7 @@ class O {
|
|
|
4367
4367
|
r.body,
|
|
4368
4368
|
t
|
|
4369
4369
|
);
|
|
4370
|
-
return (l || s.showCheckboxWihoutExtraColumn) && (a.rowSelectionModel = new ge(c)),
|
|
4370
|
+
return (l || s.showCheckboxWihoutExtraColumn) && (a.rowSelectionModel = new ge(c)), _.createByAreaModelsParam({
|
|
4371
4371
|
headerAreaModel: new D("header", [t.map((d) => d.headerLabel)], r.header),
|
|
4372
4372
|
bodyAreaModel: a,
|
|
4373
4373
|
footerAreaModel: new D("footer", [], r.footer),
|
|
@@ -4381,7 +4381,7 @@ class O {
|
|
|
4381
4381
|
overridingColumnWidth: -1
|
|
4382
4382
|
});
|
|
4383
4383
|
}
|
|
4384
|
-
return
|
|
4384
|
+
return _.createByObjectArrayParam({
|
|
4385
4385
|
rows: e,
|
|
4386
4386
|
columnDefs: t,
|
|
4387
4387
|
fixedLeftColumnCount: o,
|
|
@@ -4435,7 +4435,7 @@ class O {
|
|
|
4435
4435
|
*/
|
|
4436
4436
|
static createByObjectArrayParam(e) {
|
|
4437
4437
|
const t = e.rowCheckboxVisible !== void 0 ? e.rowCheckboxVisible : !1;
|
|
4438
|
-
return
|
|
4438
|
+
return _.createByObjectArray(
|
|
4439
4439
|
e.rows,
|
|
4440
4440
|
e.header ?? [],
|
|
4441
4441
|
e.footer ?? [],
|
|
@@ -4540,7 +4540,7 @@ class O {
|
|
|
4540
4540
|
* });
|
|
4541
4541
|
*/
|
|
4542
4542
|
static createByAreaModelsParam(e) {
|
|
4543
|
-
return
|
|
4543
|
+
return _.createByAreaModels(
|
|
4544
4544
|
e.headerAreaModel ?? new F(),
|
|
4545
4545
|
e.bodyAreaModel,
|
|
4546
4546
|
e.footerAreaModel ?? new F(),
|
|
@@ -4619,7 +4619,7 @@ class O {
|
|
|
4619
4619
|
);
|
|
4620
4620
|
}
|
|
4621
4621
|
}
|
|
4622
|
-
const
|
|
4622
|
+
const zt = [
|
|
4623
4623
|
"COPY_2_CLIPBOARD",
|
|
4624
4624
|
"START_EDITING",
|
|
4625
4625
|
"TOGGLE_SELECTION",
|
|
@@ -4647,7 +4647,7 @@ class st {
|
|
|
4647
4647
|
this.emmitDataKey = e, this.emmitCancelKey = t, this.queryId = s, this.filter = o, this.sorting = i, this.startIndex = r, this.endIndex = l;
|
|
4648
4648
|
}
|
|
4649
4649
|
}
|
|
4650
|
-
class
|
|
4650
|
+
class Ut extends st {
|
|
4651
4651
|
constructor(e, t, s, o, i, r, l, n) {
|
|
4652
4652
|
super(
|
|
4653
4653
|
e,
|
|
@@ -4665,20 +4665,20 @@ class ot {
|
|
|
4665
4665
|
this.value = e, this.label = t;
|
|
4666
4666
|
}
|
|
4667
4667
|
}
|
|
4668
|
-
class
|
|
4668
|
+
class jt {
|
|
4669
4669
|
constructor(e, t) {
|
|
4670
4670
|
this.index = e, this.px = t;
|
|
4671
4671
|
}
|
|
4672
4672
|
}
|
|
4673
|
-
const
|
|
4673
|
+
const Xt = { body: ["ge-table-text-align-left"] }, Yt = { body: ["ge-table-text-align-center"] }, Kt = { body: ["ge-table-text-align-right"] }, qt = {
|
|
4674
4674
|
header: ["ge-table-text-align-left"],
|
|
4675
4675
|
body: ["ge-table-text-align-left"],
|
|
4676
4676
|
footer: ["ge-table-text-align-left"]
|
|
4677
|
-
},
|
|
4677
|
+
}, Jt = {
|
|
4678
4678
|
header: ["ge-table-text-align-center"],
|
|
4679
4679
|
body: ["ge-table-text-align-center"],
|
|
4680
4680
|
footer: ["ge-table-text-align-center"]
|
|
4681
|
-
},
|
|
4681
|
+
}, Zt = {
|
|
4682
4682
|
header: ["ge-table-text-align-right"],
|
|
4683
4683
|
body: ["ge-table-text-align-right"],
|
|
4684
4684
|
footer: ["ge-table-text-align-right"]
|
|
@@ -4701,7 +4701,7 @@ class me {
|
|
|
4701
4701
|
}
|
|
4702
4702
|
}
|
|
4703
4703
|
}
|
|
4704
|
-
class
|
|
4704
|
+
class Qt {
|
|
4705
4705
|
constructor() {
|
|
4706
4706
|
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new x(50, "px"), this.minWidth = new x(50, "px"), this.maxWidth = new x(100, "px"), this.rendererMap = new k(new me(), new me(), void 0), this.classes = new k(
|
|
4707
4707
|
[],
|
|
@@ -4710,7 +4710,7 @@ class Zt {
|
|
|
4710
4710
|
);
|
|
4711
4711
|
}
|
|
4712
4712
|
}
|
|
4713
|
-
class
|
|
4713
|
+
class es {
|
|
4714
4714
|
/**
|
|
4715
4715
|
* A factory that creates a new AreaObjectMap with the given body renderer.
|
|
4716
4716
|
*
|
|
@@ -4725,17 +4725,17 @@ class Qt {
|
|
|
4725
4725
|
);
|
|
4726
4726
|
}
|
|
4727
4727
|
}
|
|
4728
|
-
class
|
|
4728
|
+
class ts {
|
|
4729
4729
|
constructor(e = "down", t) {
|
|
4730
4730
|
this.status = e, this.originalEvent = t;
|
|
4731
4731
|
}
|
|
4732
4732
|
}
|
|
4733
|
-
class
|
|
4733
|
+
class ss {
|
|
4734
4734
|
constructor(e, t, s, o, i = {}) {
|
|
4735
4735
|
this.area = e, this.rowIndex = t, this.columnIndex = s, this.value = o, this.cssClasses = i;
|
|
4736
4736
|
}
|
|
4737
4737
|
}
|
|
4738
|
-
class
|
|
4738
|
+
class os {
|
|
4739
4739
|
constructor() {
|
|
4740
4740
|
this.autoRestoreSortingState = !1, this.autoRestoreCollapsedExpandedState = !1, this.autoRestoreScrollPosition = !1, this.autoRestoreCheckedState = !1, this.autoRestoreSelectedState = !1, this.getStorageKeyFn = void 0, this.isSame = (e, t, s) => {
|
|
4741
4741
|
if (e && t && s.getRowId) {
|
|
@@ -4861,7 +4861,7 @@ class T {
|
|
|
4861
4861
|
static buildColumnDefs(e, t = []) {
|
|
4862
4862
|
for (const s of e)
|
|
4863
4863
|
s.property && t.push(
|
|
4864
|
-
|
|
4864
|
+
O.create({
|
|
4865
4865
|
property: s.property,
|
|
4866
4866
|
headerLabel: s.data ? s.data : s.property,
|
|
4867
4867
|
isVisible: () => typeof s.isVisible == "function" ? s.isVisible() : !0
|
|
@@ -4932,7 +4932,7 @@ class T {
|
|
|
4932
4932
|
e.push(o.data + " rowIndex:" + o.rowIndex), (s = o.children) != null && s.length && T.iterateThrowColumns(e, o.children);
|
|
4933
4933
|
}
|
|
4934
4934
|
}
|
|
4935
|
-
class
|
|
4935
|
+
class is {
|
|
4936
4936
|
constructor() {
|
|
4937
4937
|
this.areaIdent = "body", this.rowSelectionModel = void 0;
|
|
4938
4938
|
}
|
|
@@ -5043,7 +5043,7 @@ const X = class X {
|
|
|
5043
5043
|
};
|
|
5044
5044
|
X.toggleHeaderGroup = "toggleHeaderGroup";
|
|
5045
5045
|
let Q = X;
|
|
5046
|
-
class
|
|
5046
|
+
class rs {
|
|
5047
5047
|
constructor(e = "header", t, s = [], o, i = new ie()) {
|
|
5048
5048
|
this.areaIdent = e, this.groups = t, this.columnDefs = s, this.defaultRowHeight = o, this.headerGroupOptions = i, this.gammaCells = !0, this.arr = [], this.groupExts = [], this.cellGroupExtCellRenderer = new Q(this.headerGroupOptions), this.groupExts = T.buildGroupExts(t), this.init();
|
|
5049
5049
|
}
|
|
@@ -5143,7 +5143,7 @@ class is {
|
|
|
5143
5143
|
return t != null && t.toggle && t.visibility !== "always" && (t.closed = !t.closed, this.init()), T.buildColumnDefs(this.groupExts);
|
|
5144
5144
|
}
|
|
5145
5145
|
}
|
|
5146
|
-
class
|
|
5146
|
+
class ns {
|
|
5147
5147
|
filterPredict(e, t, s = this.objectToString.bind(this)) {
|
|
5148
5148
|
if (!e)
|
|
5149
5149
|
return !1;
|
|
@@ -5197,12 +5197,12 @@ class rs {
|
|
|
5197
5197
|
return t.join(" ").toLowerCase();
|
|
5198
5198
|
}
|
|
5199
5199
|
}
|
|
5200
|
-
class
|
|
5200
|
+
class ls {
|
|
5201
5201
|
static bodyRenderer(e) {
|
|
5202
5202
|
return new k(void 0, e, void 0);
|
|
5203
5203
|
}
|
|
5204
5204
|
}
|
|
5205
|
-
class
|
|
5205
|
+
class as {
|
|
5206
5206
|
constructor(e, t = !0, s = !1) {
|
|
5207
5207
|
this.property = e, this.skipCheckableCheck = t, this.readonly = s;
|
|
5208
5208
|
}
|
|
@@ -5227,12 +5227,12 @@ class ls {
|
|
|
5227
5227
|
}
|
|
5228
5228
|
}
|
|
5229
5229
|
}
|
|
5230
|
-
class
|
|
5230
|
+
class cs {
|
|
5231
5231
|
render(e, t, s, o, i, r, l) {
|
|
5232
5232
|
r && (e.innerText = new Date(r).toISOString());
|
|
5233
5233
|
}
|
|
5234
5234
|
}
|
|
5235
|
-
class
|
|
5235
|
+
class ds {
|
|
5236
5236
|
constructor() {
|
|
5237
5237
|
this.formatter = new Intl.DateTimeFormat("de-DE", {
|
|
5238
5238
|
year: "numeric",
|
|
@@ -5255,17 +5255,17 @@ class cs {
|
|
|
5255
5255
|
}
|
|
5256
5256
|
}
|
|
5257
5257
|
}
|
|
5258
|
-
class
|
|
5258
|
+
class hs {
|
|
5259
5259
|
render(e, t, s, o, i, r, l) {
|
|
5260
5260
|
r && (e.innerText = new Date(r).toLocaleDateString());
|
|
5261
5261
|
}
|
|
5262
5262
|
}
|
|
5263
|
-
class
|
|
5263
|
+
class us {
|
|
5264
5264
|
render(e, t, s, o, i, r, l) {
|
|
5265
5265
|
r === "male" || r === "m" ? e.innerText = "♂" : (r === "female" || r === "f") && (e.innerText = "♀");
|
|
5266
5266
|
}
|
|
5267
5267
|
}
|
|
5268
|
-
class
|
|
5268
|
+
class gs {
|
|
5269
5269
|
constructor(e = 100, t = !1) {
|
|
5270
5270
|
this.maxValue = e, this.labelVisible = t;
|
|
5271
5271
|
}
|
|
@@ -5295,17 +5295,17 @@ class us {
|
|
|
5295
5295
|
}
|
|
5296
5296
|
}
|
|
5297
5297
|
}
|
|
5298
|
-
class
|
|
5298
|
+
class ps {
|
|
5299
5299
|
render(e, t, s, o, i, r, l) {
|
|
5300
5300
|
r === "true" || r === !0 ? e.innerHTML = '<span class="ge-true-text-color">✅</span>' : r === "false" || r === !1 ? e.innerHTML = '<span class="ge-false-text-color">❌</span>' : e.innerText = "";
|
|
5301
5301
|
}
|
|
5302
5302
|
}
|
|
5303
|
-
class
|
|
5303
|
+
class fs {
|
|
5304
5304
|
render(e, t, s, o, i, r, l) {
|
|
5305
5305
|
r && (e.innerText = new Date(r).toISOString().replace(/T/g, " ").replace(/\..*/g, ""));
|
|
5306
5306
|
}
|
|
5307
5307
|
}
|
|
5308
|
-
class
|
|
5308
|
+
class ms {
|
|
5309
5309
|
constructor(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) {
|
|
5310
5310
|
this.min = e, this.max = t;
|
|
5311
5311
|
}
|
|
@@ -5313,7 +5313,7 @@ class fs {
|
|
|
5313
5313
|
r && (e.innerText = r, (typeof r == "string" || isNaN(r) || r < this.min || r > this.max) && l.addClass(e, "ge-cell-error"));
|
|
5314
5314
|
}
|
|
5315
5315
|
}
|
|
5316
|
-
class
|
|
5316
|
+
class bs {
|
|
5317
5317
|
constructor(e) {
|
|
5318
5318
|
this.property = e;
|
|
5319
5319
|
}
|
|
@@ -5332,7 +5332,7 @@ class ms {
|
|
|
5332
5332
|
}
|
|
5333
5333
|
}
|
|
5334
5334
|
}
|
|
5335
|
-
class
|
|
5335
|
+
class xs {
|
|
5336
5336
|
constructor(e, t = 100, s = !1) {
|
|
5337
5337
|
this.property = e, this.maxValue = t, this.labelVisible = s;
|
|
5338
5338
|
}
|
|
@@ -5364,7 +5364,7 @@ class bs {
|
|
|
5364
5364
|
}
|
|
5365
5365
|
}
|
|
5366
5366
|
}
|
|
5367
|
-
class
|
|
5367
|
+
class ws {
|
|
5368
5368
|
render(e, t, s, o, i, r, l) {
|
|
5369
5369
|
if (r) {
|
|
5370
5370
|
e.innerHTML = `
|
|
@@ -5389,7 +5389,7 @@ class nt {
|
|
|
5389
5389
|
this.action = e, this.area = t, this.areaModel = s, this.rowIndex = o, this.columnIndex = i, this.id = r;
|
|
5390
5390
|
}
|
|
5391
5391
|
}
|
|
5392
|
-
class
|
|
5392
|
+
class $ {
|
|
5393
5393
|
constructor(e, t, s = "", o = "", i = "button", r = !0) {
|
|
5394
5394
|
this.action = e, this.label = t, this.icon = s, this.elementClass = o, this.elementType = i, this.enabled = r;
|
|
5395
5395
|
}
|
|
@@ -5456,10 +5456,10 @@ class lt {
|
|
|
5456
5456
|
return null;
|
|
5457
5457
|
}
|
|
5458
5458
|
getCrudActions(e) {
|
|
5459
|
-
return Array.isArray(e) && e.every((t) => t instanceof
|
|
5459
|
+
return Array.isArray(e) && e.every((t) => t instanceof $) ? e : this.crudActions;
|
|
5460
5460
|
}
|
|
5461
5461
|
}
|
|
5462
|
-
const
|
|
5462
|
+
const Ss = function(h, e, t) {
|
|
5463
5463
|
return h ? Number(h) : "";
|
|
5464
5464
|
};
|
|
5465
5465
|
class Ce {
|
|
@@ -5496,7 +5496,7 @@ class Ce {
|
|
|
5496
5496
|
}
|
|
5497
5497
|
}
|
|
5498
5498
|
}
|
|
5499
|
-
class
|
|
5499
|
+
class ys extends oe {
|
|
5500
5500
|
constructor(e) {
|
|
5501
5501
|
super("row", "multi"), this.model = e;
|
|
5502
5502
|
}
|
|
@@ -5579,7 +5579,7 @@ class Ss extends oe {
|
|
|
5579
5579
|
this.isSelected(e, 0) ? this.unselectRow(e) : this.selectRow(e);
|
|
5580
5580
|
}
|
|
5581
5581
|
}
|
|
5582
|
-
class
|
|
5582
|
+
class Cs {
|
|
5583
5583
|
constructor(e, t, s) {
|
|
5584
5584
|
this.r = e, this.g = t, this.b = s;
|
|
5585
5585
|
}
|
|
@@ -5601,7 +5601,7 @@ class G {
|
|
|
5601
5601
|
return e < t.middleValue ? G.getTwoColorGradientRGB(e, new be(t.minValue, t.minColor, t.middleValue, t.middleColor)) : e > t.middleValue ? G.getTwoColorGradientRGB(e, new be(t.middleValue, t.middleColor, t.maxValue, t.maxColor)) : `rgb(${t.middleColor.r}, ${t.middleColor.g}, ${t.middleColor.b})`;
|
|
5602
5602
|
}
|
|
5603
5603
|
}
|
|
5604
|
-
class
|
|
5604
|
+
class vs {
|
|
5605
5605
|
constructor(e, t, s, o, i, r) {
|
|
5606
5606
|
this.minValue = e, this.minColor = t, this.middleValue = s, this.middleColor = o, this.maxValue = i, this.maxColor = r;
|
|
5607
5607
|
}
|
|
@@ -5612,6 +5612,58 @@ class at {
|
|
|
5612
5612
|
}
|
|
5613
5613
|
}
|
|
5614
5614
|
class ct {
|
|
5615
|
+
constructor(e) {
|
|
5616
|
+
this.object = e;
|
|
5617
|
+
}
|
|
5618
|
+
openDialog() {
|
|
5619
|
+
const e = document.createElement("dialog");
|
|
5620
|
+
e.classList.add("ge-table-crud-object-view"), e.innerHTML = `
|
|
5621
|
+
<div class="ge-table-dialog-header">Item</div>
|
|
5622
|
+
<div class="ge-table-dialog-content">
|
|
5623
|
+
${this.generateHtmlTable(this.object)}
|
|
5624
|
+
</div>
|
|
5625
|
+
<div class="ge-table-dialog-footer">
|
|
5626
|
+
<button class="ge-table-dialog-footer-close-button" style="">Close</button>
|
|
5627
|
+
</div>
|
|
5628
|
+
`, document.body.appendChild(e), e.querySelector(".ge-table-dialog-footer-close-button").addEventListener("click", () => {
|
|
5629
|
+
e.close("close"), e.remove();
|
|
5630
|
+
}), e.showModal();
|
|
5631
|
+
}
|
|
5632
|
+
getCombinedKey(e, t) {
|
|
5633
|
+
return e ? `${e}.${t}` : t;
|
|
5634
|
+
}
|
|
5635
|
+
getLabel(e) {
|
|
5636
|
+
return e.replace(/\./g, " ");
|
|
5637
|
+
}
|
|
5638
|
+
generateHtmlTable(e) {
|
|
5639
|
+
return `<table>
|
|
5640
|
+
<thead>
|
|
5641
|
+
<tr>
|
|
5642
|
+
<th>Property</th>
|
|
5643
|
+
<th>Value</th>
|
|
5644
|
+
</tr>
|
|
5645
|
+
</thead>
|
|
5646
|
+
<tbody>
|
|
5647
|
+
${this.generateTableRows(e)}
|
|
5648
|
+
</tbody>
|
|
5649
|
+
</table>`;
|
|
5650
|
+
}
|
|
5651
|
+
generateTableRows(e, t = "") {
|
|
5652
|
+
const s = [], o = (i, r = null, l = !1) => `
|
|
5653
|
+
<tr>
|
|
5654
|
+
<td${l ? ' class="ge-table-crud-object-view-object-child"' : ""}>${i}</td>
|
|
5655
|
+
<td>${r ?? ""}</td>
|
|
5656
|
+
</tr>`;
|
|
5657
|
+
for (const i in e) {
|
|
5658
|
+
if (!e.hasOwnProperty(i))
|
|
5659
|
+
continue;
|
|
5660
|
+
const r = e[i], l = this.getCombinedKey(t, i), n = this.getLabel(l);
|
|
5661
|
+
typeof r == "object" && r !== null ? (s.push(o(n, null, !0)), s.push(this.generateTableRows(r, l))) : s.push(o(n, String(r)));
|
|
5662
|
+
}
|
|
5663
|
+
return s.join("");
|
|
5664
|
+
}
|
|
5665
|
+
}
|
|
5666
|
+
class dt {
|
|
5615
5667
|
constructor() {
|
|
5616
5668
|
this.urls = {
|
|
5617
5669
|
list: {
|
|
@@ -5619,13 +5671,13 @@ class ct {
|
|
|
5619
5671
|
method: "GET"
|
|
5620
5672
|
}
|
|
5621
5673
|
}, this.singleRowActions = [
|
|
5622
|
-
new
|
|
5623
|
-
new
|
|
5624
|
-
new
|
|
5625
|
-
new
|
|
5674
|
+
new $("VIEW", "View", "", "", "link"),
|
|
5675
|
+
new $("EDIT", "Edit", "", "", "link"),
|
|
5676
|
+
new $("CLONE", "Clone", "", "", "link"),
|
|
5677
|
+
new $("DELETE", "Delete", "", "", "link")
|
|
5626
5678
|
], this.tableActions = [
|
|
5627
|
-
new
|
|
5628
|
-
new
|
|
5679
|
+
new $("CREATE", "Create", "", "", "button"),
|
|
5680
|
+
new $("DELETE_SELECTED", "Delete Selected", "", "", "button")
|
|
5629
5681
|
], this.autoAddActionColumn = !0, this.columnWidths = new at(), this.calcFixedRightColumnCount = (e) => e > 6 ? 1 : 0, this.getHeadersInit = () => ({}), this.getIdByObject = (e) => "id" in e ? e.id : e, this.fetchList = (e) => {
|
|
5630
5682
|
const t = e.getHeadersInit ? e.getHeadersInit() : {};
|
|
5631
5683
|
let s = e.urls.list.url, o = e.urls.list.method ?? "GET";
|
|
@@ -5656,9 +5708,9 @@ class ct {
|
|
|
5656
5708
|
}, this.getId = (e) => e.id;
|
|
5657
5709
|
}
|
|
5658
5710
|
}
|
|
5659
|
-
class
|
|
5711
|
+
class As {
|
|
5660
5712
|
constructor() {
|
|
5661
|
-
this.crudOptions = new
|
|
5713
|
+
this.crudOptions = new dt(), this.listenActionEvent = (e) => {
|
|
5662
5714
|
};
|
|
5663
5715
|
}
|
|
5664
5716
|
createTableModel(e, t, s = (i) => {
|
|
@@ -5674,9 +5726,9 @@ class vs {
|
|
|
5674
5726
|
hoverColumnVisible: !1,
|
|
5675
5727
|
getSelectionModel: a
|
|
5676
5728
|
};
|
|
5677
|
-
const d = this.calcAutoColumnWidths(i, n), u = (r = t.columnDefs) != null && r.length ? t.columnDefs : n.map((g, b) => new
|
|
5729
|
+
const d = this.calcAutoColumnWidths(i, n), u = (r = t.columnDefs) != null && r.length ? t.columnDefs : n.map((g, b) => new O(g, g.toUpperCase(), new x(d[b], "px")));
|
|
5678
5730
|
if (e.autoAddActionColumn) {
|
|
5679
|
-
let g = new
|
|
5731
|
+
let g = new O(
|
|
5680
5732
|
"id",
|
|
5681
5733
|
"Actions",
|
|
5682
5734
|
Je,
|
|
@@ -5689,7 +5741,7 @@ class vs {
|
|
|
5689
5741
|
), u.push(g);
|
|
5690
5742
|
}
|
|
5691
5743
|
const f = 0, p = e.calcFixedRightColumnCount(u.length);
|
|
5692
|
-
this.tableModel =
|
|
5744
|
+
this.tableModel = _.buildByTypedRowsParam({
|
|
5693
5745
|
rows: i,
|
|
5694
5746
|
columnDefs: u,
|
|
5695
5747
|
tableOptions: this.tableOptions,
|
|
@@ -5705,7 +5757,7 @@ class vs {
|
|
|
5705
5757
|
var t, s;
|
|
5706
5758
|
if (this.listenActionEvent && this.listenActionEvent(e), e.action === "VIEW") {
|
|
5707
5759
|
let o = e.id;
|
|
5708
|
-
(t = this.crudOptions) == null || t.fetchItem(this.crudOptions, o).then((i) => (console.info(i), i));
|
|
5760
|
+
(t = this.crudOptions) == null || t.fetchItem(this.crudOptions, o).then((i) => (console.info(i), new ct(i).openDialog(), i));
|
|
5709
5761
|
} else if (e.action === "DELETE") {
|
|
5710
5762
|
let o = e.id;
|
|
5711
5763
|
(s = this.crudOptions) == null || s.deleteItem(this.crudOptions, o).then((i) => {
|
|
@@ -5755,7 +5807,7 @@ class vs {
|
|
|
5755
5807
|
return s;
|
|
5756
5808
|
}
|
|
5757
5809
|
}
|
|
5758
|
-
class
|
|
5810
|
+
class Rs {
|
|
5759
5811
|
constructor(e, t) {
|
|
5760
5812
|
this.method = e, this.url = t;
|
|
5761
5813
|
}
|
|
@@ -5764,42 +5816,43 @@ export {
|
|
|
5764
5816
|
re as AbstractAreaModel,
|
|
5765
5817
|
nt as ActionEvent,
|
|
5766
5818
|
lt as ActionsCellRenderer,
|
|
5767
|
-
|
|
5768
|
-
|
|
5819
|
+
es as AreaMapFactory,
|
|
5820
|
+
is as AreaModel,
|
|
5769
5821
|
D as AreaModelArrayOfArrays,
|
|
5770
|
-
|
|
5822
|
+
rs as AreaModelCellGroups,
|
|
5771
5823
|
F as AreaModelHidden,
|
|
5772
5824
|
et as AreaModelObjectArray,
|
|
5773
5825
|
fe as AreaModelObjectArrayWithColumndefs,
|
|
5774
5826
|
ue as AreaModelTree,
|
|
5775
5827
|
k as AreaObjectMap,
|
|
5776
|
-
|
|
5777
|
-
|
|
5828
|
+
os as AutoRestoreOptions,
|
|
5829
|
+
ut as AvoidDoubleExecution,
|
|
5778
5830
|
it as CellGroup,
|
|
5779
5831
|
rt as CellGroupExt,
|
|
5780
5832
|
Q as CellGroupExtCellRenderer,
|
|
5781
5833
|
R as CellRange,
|
|
5782
5834
|
T as CellgroupFactory,
|
|
5783
|
-
|
|
5835
|
+
as as CheckboxBooleanPropertyCellRenderer,
|
|
5784
5836
|
me as CheckboxCellRenderer,
|
|
5785
|
-
|
|
5837
|
+
Qt as CheckboxColumnDef,
|
|
5786
5838
|
Qe as CheckboxModel,
|
|
5787
|
-
|
|
5839
|
+
Ut as ChunkData,
|
|
5788
5840
|
Pe as ColAndRowspanModel,
|
|
5789
5841
|
Ie as CollapsedExpandedData,
|
|
5790
|
-
|
|
5791
|
-
|
|
5842
|
+
Cs as ColorRgb,
|
|
5843
|
+
O as ColumnDef,
|
|
5792
5844
|
at as ColumnWidths,
|
|
5793
5845
|
Re as ConvenienceDomService,
|
|
5794
5846
|
U as CopyService,
|
|
5795
|
-
|
|
5796
|
-
ct as
|
|
5797
|
-
|
|
5847
|
+
$ as CrudAction,
|
|
5848
|
+
ct as CrudObjectView,
|
|
5849
|
+
dt as CrudOptions,
|
|
5850
|
+
As as CrudTableModelFactory,
|
|
5798
5851
|
ae as CssVars,
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5852
|
+
ds as DateToIntlDDMMYYYYCellRenderer,
|
|
5853
|
+
cs as DateToIsoCellRenderer,
|
|
5854
|
+
hs as DateToLocaleDateCellRenderer,
|
|
5855
|
+
fs as DateToTecCellRenderer,
|
|
5803
5856
|
V as DefaultRowHeights,
|
|
5804
5857
|
Le as EleScope,
|
|
5805
5858
|
le as EventAdapter,
|
|
@@ -5808,28 +5861,28 @@ export {
|
|
|
5808
5861
|
Ue as FocusModel,
|
|
5809
5862
|
Be as GeCellIndices,
|
|
5810
5863
|
G as GeCssColorUtil,
|
|
5811
|
-
|
|
5812
|
-
|
|
5864
|
+
ns as GeFilterService,
|
|
5865
|
+
ts as GeKeyEvent,
|
|
5813
5866
|
se as GeModelChangeEvent,
|
|
5814
5867
|
ee as GeMouseEvent,
|
|
5815
5868
|
L as GeoData,
|
|
5816
5869
|
P as Icon,
|
|
5817
|
-
|
|
5870
|
+
jt as IndexAndPx,
|
|
5818
5871
|
ze as InputCellRenderer,
|
|
5819
|
-
|
|
5872
|
+
Oe as InputHandler,
|
|
5820
5873
|
B as LicenseManager,
|
|
5821
|
-
|
|
5874
|
+
us as MaleFemaleToIconCellRenderer,
|
|
5822
5875
|
Me as MouseHandler,
|
|
5823
5876
|
Ee as MouseTargetData,
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5877
|
+
ys as MultiRowsSelectionModel,
|
|
5878
|
+
gs as NumberCellProgressBarCellRenderer,
|
|
5879
|
+
ms as NumberCellRenderer,
|
|
5827
5880
|
Ve as OsxShortcutActionIdMapping,
|
|
5828
5881
|
pe as Padding,
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5882
|
+
ws as PositiveAndNegativeNumberRenderer,
|
|
5883
|
+
xs as ProgressBarCellRenderer,
|
|
5884
|
+
$e as RenderScope,
|
|
5885
|
+
ls as Renderer,
|
|
5833
5886
|
st as RequestChunk,
|
|
5834
5887
|
Ye as ResizeHandler,
|
|
5835
5888
|
Ce as SelectCellRenderer,
|
|
@@ -5838,76 +5891,76 @@ export {
|
|
|
5838
5891
|
Ne as ShortcutService,
|
|
5839
5892
|
Ge as SimpleDomService,
|
|
5840
5893
|
x as Size,
|
|
5841
|
-
|
|
5894
|
+
_e as SortItem,
|
|
5842
5895
|
we as SortedOptions,
|
|
5843
|
-
|
|
5896
|
+
bs as StarRatingCellRenderer,
|
|
5844
5897
|
De as StoreStateCollapsedExpandService,
|
|
5845
5898
|
ke as StoreStateScrollPosService,
|
|
5846
5899
|
Fe as StoreStateSortingService,
|
|
5847
5900
|
Te as TableApi,
|
|
5848
|
-
|
|
5849
|
-
|
|
5901
|
+
ss as TableCellUpdateEvent,
|
|
5902
|
+
_ as TableFactory,
|
|
5850
5903
|
q as TableModel,
|
|
5851
5904
|
tt as TableModelAndOptions,
|
|
5852
5905
|
z as TableOptions,
|
|
5853
5906
|
Se as TableScope,
|
|
5854
|
-
|
|
5907
|
+
vs as ThreeColorGradientArg,
|
|
5855
5908
|
ge as TreeCheckboxModel,
|
|
5856
5909
|
Z as TreeFactory,
|
|
5857
5910
|
xe as TreeOptions,
|
|
5858
5911
|
ce as TreeRow,
|
|
5859
5912
|
Ze as TreeRowService,
|
|
5860
|
-
|
|
5913
|
+
ps as TrueFalseCellRenderer,
|
|
5861
5914
|
qe as TrueFn,
|
|
5862
5915
|
be as TwoColorGradientArg,
|
|
5863
|
-
|
|
5916
|
+
Rs as UrlInfo,
|
|
5864
5917
|
ot as ValueLabel,
|
|
5865
5918
|
We as WindowsShortcutActionIdMapping,
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5919
|
+
zt as actionIds,
|
|
5920
|
+
Jt as allCenter,
|
|
5921
|
+
qt as allLeft,
|
|
5922
|
+
Zt as allRight,
|
|
5923
|
+
Yt as bodyCenter,
|
|
5924
|
+
Xt as bodyLeft,
|
|
5925
|
+
Kt as bodyRight,
|
|
5873
5926
|
ve as debounce,
|
|
5874
|
-
|
|
5927
|
+
Ss as editInputPipeForNumber,
|
|
5875
5928
|
Y as getAreaIdentByString,
|
|
5876
5929
|
J as isAreaModelTree,
|
|
5877
5930
|
Ae as isCheckboxColumnDef,
|
|
5878
5931
|
W as isTreeRow,
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5932
|
+
Gt as px0,
|
|
5933
|
+
Nt as px10,
|
|
5934
|
+
Lt as px100,
|
|
5935
|
+
Ft as px110,
|
|
5936
|
+
Dt as px120,
|
|
5937
|
+
It as px130,
|
|
5938
|
+
kt as px140,
|
|
5939
|
+
Tt as px150,
|
|
5940
|
+
Mt as px160,
|
|
5941
|
+
Et as px170,
|
|
5942
|
+
Rt as px180,
|
|
5943
|
+
At as px190,
|
|
5944
|
+
Vt as px20,
|
|
5892
5945
|
he as px200,
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5946
|
+
vt as px210,
|
|
5947
|
+
Ct as px220,
|
|
5948
|
+
yt as px230,
|
|
5949
|
+
St as px240,
|
|
5950
|
+
wt as px250,
|
|
5951
|
+
xt as px260,
|
|
5952
|
+
bt as px270,
|
|
5953
|
+
mt as px280,
|
|
5954
|
+
ft as px290,
|
|
5955
|
+
Wt as px30,
|
|
5903
5956
|
Je as px300,
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5957
|
+
Ht as px40,
|
|
5958
|
+
pt as px400,
|
|
5959
|
+
Bt as px50,
|
|
5960
|
+
gt as px500,
|
|
5908
5961
|
Ot as px60,
|
|
5909
5962
|
_t as px70,
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5963
|
+
$t as px80,
|
|
5964
|
+
Pt as px90,
|
|
5965
|
+
ht as throttle
|
|
5913
5966
|
};
|