@taocompany/magic-grid 0.9.7 → 0.9.8
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/dist/core/api/gridApi.d.ts +13 -1
- package/dist/core/api/gridApi.d.ts.map +1 -1
- package/dist/core/grid/grid.d.ts +2 -1
- package/dist/core/grid/grid.d.ts.map +1 -1
- package/dist/core/grid/gridRowMutation.d.ts +3 -1
- package/dist/core/grid/gridRowMutation.d.ts.map +1 -1
- package/dist/core/rowMutation/buildAddRowsByArrayTransaction.d.ts +6 -0
- package/dist/core/rowMutation/buildAddRowsByArrayTransaction.d.ts.map +1 -0
- package/dist/core/rowMutation/index.d.ts +1 -0
- package/dist/core/rowMutation/index.d.ts.map +1 -1
- package/dist/core/rowMutation/rowMutationService.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/types/rowMutation.d.ts +23 -0
- package/dist/core/types/rowMutation.d.ts.map +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +388 -301
- package/dist/index.es.js.map +1 -1
- package/dist/types/core.d.ts +40 -2
- package/dist/types/core.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, R as g, S as _, T as v, V as y, W as b, X as ee, Y as x, Z as S, _ as C, a as w, b as te, c as T, d as E, et as D, f as
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, R as g, S as _, T as v, V as y, W as b, X as ee, Y as x, Z as S, _ as C, a as w, b as te, c as T, d as E, et as D, f as ne, g as re, h as O, i as k, j as ie, k as ae, l as A, m as j, o as oe, p as se, q as ce, r as le, s as ue, t as de, tt as fe, u as pe, w as me, x as he, z as ge } from "./getRowDragCommitHierarchy-n5sW6yPV.js";
|
|
2
2
|
import { c as _e, i as ve, l as M, s as ye, u as be } from "./validation-BHqm5Flb.js";
|
|
3
3
|
import { Comment as xe, Fragment as Se, Teleport as Ce, computed as N, createBlock as we, createCommentVNode as P, createElementBlock as F, createElementVNode as I, createStaticVNode as Te, createTextVNode as Ee, createVNode as L, defineComponent as R, getCurrentInstance as De, guardReactiveProps as Oe, mergeProps as ke, nextTick as Ae, normalizeClass as z, normalizeProps as je, normalizeStyle as Me, onBeforeUnmount as Ne, onMounted as Pe, onUnmounted as Fe, openBlock as B, ref as V, render as Ie, renderList as Le, renderSlot as Re, resolveDynamicComponent as ze, shallowRef as Be, toDisplayString as Ve, unref as H, useSlots as He, vShow as Ue, watch as U, withCtx as We, withDirectives as Ge } from "vue";
|
|
4
4
|
//#region src/core/theme/gridSize.ts
|
|
@@ -256,6 +256,7 @@ function ct(e) {
|
|
|
256
256
|
setData: (t) => e.setData(t),
|
|
257
257
|
applyTransaction: (t) => e.applyTransaction(t),
|
|
258
258
|
addRows: (t) => e.addRows(t),
|
|
259
|
+
addRowsByArray: (t, n) => e.addRowsByArray(t, n),
|
|
259
260
|
removeRows: (t) => e.removeRows(t),
|
|
260
261
|
updateRows: (t) => e.updateRows(t),
|
|
261
262
|
patchRow: (t) => e.patchRow(t),
|
|
@@ -7832,7 +7833,7 @@ var Xh = class {
|
|
|
7832
7833
|
if (Rn(t) && a.rowExpansionHost?.active()) return this.clearInlineSession(n), this.refreshExpandCell(e, t, n, r, o, a.rowExpansionHost);
|
|
7833
7834
|
if (yr(t, e) && a.rowGroupingHost?.active()) return this.clearInlineSession(n), this.refreshGroupCell(e, t, n, r, o, a.rowGroupingHost);
|
|
7834
7835
|
if (Ph(t, e) && a.treeTableHost?.active()) return this.clearInlineSession(n), this.refreshTreeCell(e, n, r, o, a.treeTableHost);
|
|
7835
|
-
if (!x(t.colId) &&
|
|
7836
|
+
if (!x(t.colId) && O(t) && a.inlineEditor && Pr(e)) return this.refreshInlineEditorCell(e, t, n, r, o, a.inlineEditor, a, a.scheduleInlineEditor);
|
|
7836
7837
|
if (this.clearInlineSession(n), !x(t.colId) && t.cellRenderer) return this.refreshRendererCell(e, t, n, r, o, a.scheduleRenderer, a.cellRendererDefer, a.cellRendererPresentation, a.scrollActive, l);
|
|
7837
7838
|
let d = qi(e, t, l);
|
|
7838
7839
|
return !o && this.cacheVersion === r && Yh(this.cachedValue, d) ? !1 : (n.clearRenderer(), this.cachedValue = d, this.cachedRenderKey = "", this.cacheVersion = r, n.setValue(d), !0);
|
|
@@ -10391,7 +10392,7 @@ var Mg = class {
|
|
|
10391
10392
|
return;
|
|
10392
10393
|
}
|
|
10393
10394
|
if (e != null && t == null) {
|
|
10394
|
-
let t =
|
|
10395
|
+
let t = k(e, r?.internalRowId);
|
|
10395
10396
|
for (let e of [...this.bucketKeys.keys()]) e.startsWith(`${t}::`) && this.clearCellByBucketKey(e);
|
|
10396
10397
|
return;
|
|
10397
10398
|
}
|
|
@@ -10418,15 +10419,15 @@ var Mg = class {
|
|
|
10418
10419
|
}
|
|
10419
10420
|
removeByRowIds(e, t) {
|
|
10420
10421
|
let n = /* @__PURE__ */ new Set();
|
|
10421
|
-
for (let t of e) n.add(
|
|
10422
|
-
for (let e of t?.internalRowIds ?? []) n.add(
|
|
10422
|
+
for (let t of e) n.add(k(t));
|
|
10423
|
+
for (let e of t?.internalRowIds ?? []) n.add(k(null, e));
|
|
10423
10424
|
if (n.size !== 0) for (let e of [...this.bucketKeys.keys()]) {
|
|
10424
10425
|
let t = e.slice(0, e.indexOf("::"));
|
|
10425
10426
|
n.has(t) && this.clearCellByBucketKey(e);
|
|
10426
10427
|
}
|
|
10427
10428
|
}
|
|
10428
10429
|
promoteRowId(e, t) {
|
|
10429
|
-
let n =
|
|
10430
|
+
let n = k(null, e), r = String(t), i = `${n}::`, a = [];
|
|
10430
10431
|
for (let [e, t] of this.store) e.startsWith(i) && a.push([e, t]);
|
|
10431
10432
|
if (a.length !== 0) for (let [e, n] of a) {
|
|
10432
10433
|
let a = e.slice(i.length), o = `${r}::${a}`, s = a.slice(0, a.indexOf("::"));
|
|
@@ -15413,7 +15414,7 @@ function Rx(e, t) {
|
|
|
15413
15414
|
let n = e.deps.rowModel.getRow(t.rowIndex);
|
|
15414
15415
|
if (!n) return;
|
|
15415
15416
|
let r = e.deps.columnModel.getColumnById(t.colKey);
|
|
15416
|
-
if (!r || x(r.colId) || y(r.colId) ||
|
|
15417
|
+
if (!r || x(r.colId) || y(r.colId) || O(r) || !J(r, n, e.deps.getCellDisableContext())) return;
|
|
15417
15418
|
let i = e.deps.getColIndex(r.colId);
|
|
15418
15419
|
e.deps.cellFocusService.setFocusedCell({
|
|
15419
15420
|
rowId: n.id,
|
|
@@ -15452,7 +15453,7 @@ function Bx(e, t) {
|
|
|
15452
15453
|
});
|
|
15453
15454
|
return;
|
|
15454
15455
|
}
|
|
15455
|
-
let n = e.deps.columnModel.getColumns().filter((n) => J(n, t.rowNode, e.deps.getCellDisableContext()) && !
|
|
15456
|
+
let n = e.deps.columnModel.getColumns().filter((n) => J(n, t.rowNode, e.deps.getCellDisableContext()) && !O(n)).map((n) => {
|
|
15456
15457
|
let r = e.createCellEditorParams(t.rowNode, n), { stopEditing: i, setKeyboardPolicy: a, cancelCommit: o, getEditPhase: s, ...c } = r;
|
|
15457
15458
|
return {
|
|
15458
15459
|
column: n,
|
|
@@ -15531,7 +15532,7 @@ function Vx(e, t) {
|
|
|
15531
15532
|
return;
|
|
15532
15533
|
}
|
|
15533
15534
|
let n = e.deps.columnModel.getColumnById(t.colId);
|
|
15534
|
-
if (!n || !J(n, t.rowNode, e.deps.getCellDisableContext()) ||
|
|
15535
|
+
if (!n || !J(n, t.rowNode, e.deps.getCellDisableContext()) || O(n)) return;
|
|
15535
15536
|
let r = e.createCellEditorParams(t.rowNode, n), i = r.formattedValue, a = r.value, o = () => {
|
|
15536
15537
|
e.deps.validationFeedback.clearRowCell(t.rowId, t.rowElement ?? null, t.colId), bx(e.deps);
|
|
15537
15538
|
}, s = e.validationCtx();
|
|
@@ -16595,12 +16596,12 @@ function JS(e) {
|
|
|
16595
16596
|
w.disabled = !1;
|
|
16596
16597
|
let t = v.getSelectAllState();
|
|
16597
16598
|
w.checked = t.checked, w.indeterminate = t.indeterminate;
|
|
16598
|
-
}, E = null, D = null,
|
|
16599
|
-
|
|
16600
|
-
let
|
|
16601
|
-
if (
|
|
16599
|
+
}, E = null, D = null, ne = document.createElement("div");
|
|
16600
|
+
ne.className = "mg-column-handle-menu__filter-set-list-host";
|
|
16601
|
+
let re = () => {
|
|
16602
|
+
if (ne.replaceChildren(), E = null, D = null, i.length === 0) {
|
|
16602
16603
|
let e = document.createElement("div");
|
|
16603
|
-
e.className = "mg-column-handle-menu__filter-set-empty", e.textContent = "暂无可选值",
|
|
16604
|
+
e.className = "mg-column-handle-menu__filter-set-empty", e.textContent = "暂无可选值", ne.append(e), O();
|
|
16604
16605
|
return;
|
|
16605
16606
|
}
|
|
16606
16607
|
if (_ && b() === "tree") {
|
|
@@ -16609,26 +16610,26 @@ function JS(e) {
|
|
|
16609
16610
|
selection: v,
|
|
16610
16611
|
searchQuery: g.value,
|
|
16611
16612
|
onSelectionChange: () => {
|
|
16612
|
-
T(),
|
|
16613
|
+
T(), k("set");
|
|
16613
16614
|
},
|
|
16614
16615
|
emptySearchLabel: "无匹配项",
|
|
16615
16616
|
abortSignal: l
|
|
16616
|
-
}),
|
|
16617
|
+
}), ne.append(D.element), O();
|
|
16617
16618
|
return;
|
|
16618
16619
|
}
|
|
16619
16620
|
E = new VS({
|
|
16620
16621
|
options: y(),
|
|
16621
16622
|
selection: v,
|
|
16622
16623
|
onSelectionChange: () => {
|
|
16623
|
-
T(),
|
|
16624
|
+
T(), k("set");
|
|
16624
16625
|
},
|
|
16625
16626
|
emptySearchLabel: "无匹配项",
|
|
16626
16627
|
abortSignal: l
|
|
16627
|
-
}),
|
|
16628
|
-
},
|
|
16628
|
+
}), ne.append(E.element), O();
|
|
16629
|
+
}, O = () => {
|
|
16629
16630
|
let e = US.get(h);
|
|
16630
16631
|
e && (e.virtualList = E, e.dateTreeView = D);
|
|
16631
|
-
},
|
|
16632
|
+
}, k = (e) => {
|
|
16632
16633
|
let t = v.snapshot(), n = ES(t, S(), ee(), x());
|
|
16633
16634
|
if (e === "set" && n === null) return;
|
|
16634
16635
|
let r = n ?? t, i = A.readState();
|
|
@@ -16640,9 +16641,9 @@ function JS(e) {
|
|
|
16640
16641
|
selectedValues: r.selectedValues
|
|
16641
16642
|
});
|
|
16642
16643
|
}, ie = () => {
|
|
16643
|
-
|
|
16644
|
+
k("operator");
|
|
16644
16645
|
}, ae = () => {
|
|
16645
|
-
|
|
16646
|
+
k("set");
|
|
16646
16647
|
}, A = CS({
|
|
16647
16648
|
columnFilterType: r,
|
|
16648
16649
|
initialState: {
|
|
@@ -16653,13 +16654,13 @@ function JS(e) {
|
|
|
16653
16654
|
onInput: ie,
|
|
16654
16655
|
onStopPropagation: m
|
|
16655
16656
|
});
|
|
16656
|
-
p.append(A.element), WS.set(f, A), i.length === 0 && (g.disabled = !0, w.disabled = !0), h.append(
|
|
16657
|
+
p.append(A.element), WS.set(f, A), i.length === 0 && (g.disabled = !0, w.disabled = !0), h.append(ne), re(), US.set(h, {
|
|
16657
16658
|
allOptions: i,
|
|
16658
16659
|
searchInput: g,
|
|
16659
16660
|
selection: v,
|
|
16660
16661
|
virtualList: E,
|
|
16661
16662
|
dateTreeView: D,
|
|
16662
|
-
mountOptionsView:
|
|
16663
|
+
mountOptionsView: re,
|
|
16663
16664
|
getFilteredKeys: ee,
|
|
16664
16665
|
isSearchActive: x,
|
|
16665
16666
|
getValueMode: S,
|
|
@@ -17193,18 +17194,18 @@ function kC(e, t = {}) {
|
|
|
17193
17194
|
b.className = "mg-scroll-phantom", b.setAttribute("aria-hidden", "true"), p.appendChild(m), p.appendChild(b), f.appendChild(p), d.appendChild(f);
|
|
17194
17195
|
let { overlayEl: ee, wrapperEl: x, contentEl: S } = Cb();
|
|
17195
17196
|
d.appendChild(ee), n.appendChild(r);
|
|
17196
|
-
let C, w, te, T, E, D,
|
|
17197
|
+
let C, w, te, T, E, D, ne;
|
|
17197
17198
|
if (t.floatingFilter) {
|
|
17198
|
-
C = document.createElement("div"), C.className = "mg-floating-filter-viewport", w = document.createElement("div"), w.className = "mg-floating-filter-scroll", te = document.createElement("div"), te.className = "mg-floating-filter-gutter", te.setAttribute("aria-hidden", "true"), T = document.createElement("div"), T.className = "mg-floating-filter-row", E = OC("left"), D = OC("center"),
|
|
17199
|
+
C = document.createElement("div"), C.className = "mg-floating-filter-viewport", w = document.createElement("div"), w.className = "mg-floating-filter-scroll", te = document.createElement("div"), te.className = "mg-floating-filter-gutter", te.setAttribute("aria-hidden", "true"), T = document.createElement("div"), T.className = "mg-floating-filter-row", E = OC("left"), D = OC("center"), ne = OC("right"), T.append(E, D, ne);
|
|
17199
17200
|
let e = document.createElement("div");
|
|
17200
17201
|
e.className = "mg-floating-filter-span", e.setAttribute("aria-hidden", "true"), w.append(T, e), C.append(w, te), n.appendChild(C);
|
|
17201
17202
|
}
|
|
17202
17203
|
n.appendChild(d);
|
|
17203
|
-
let
|
|
17204
|
+
let re, O, k, ie, ae, A, j;
|
|
17204
17205
|
if (t.showSummary) {
|
|
17205
|
-
|
|
17206
|
+
re = document.createElement("div"), re.className = "mg-footer-viewport", O = document.createElement("div"), O.className = "mg-footer-scroll", k = document.createElement("div"), k.className = "mg-footer-gutter", k.setAttribute("aria-hidden", "true"), ie = document.createElement("div"), ie.className = "mg-footer-row", ae = DC("left"), A = DC("center"), j = DC("right"), ie.append(ae, A, j);
|
|
17206
17207
|
let e = document.createElement("div");
|
|
17207
|
-
e.className = "mg-footer-span", e.setAttribute("aria-hidden", "true"),
|
|
17208
|
+
e.className = "mg-footer-span", e.setAttribute("aria-hidden", "true"), O.append(ie, e), re.append(O, k), n.appendChild(re);
|
|
17208
17209
|
}
|
|
17209
17210
|
return e.appendChild(n), {
|
|
17210
17211
|
rootEl: n,
|
|
@@ -17224,9 +17225,9 @@ function kC(e, t = {}) {
|
|
|
17224
17225
|
rowsContainerEl: _,
|
|
17225
17226
|
spannedRowsContainerEl: v,
|
|
17226
17227
|
fullWidthRowsContainerEl: y,
|
|
17227
|
-
footerViewportEl:
|
|
17228
|
-
footerScrollEl:
|
|
17229
|
-
footerGutterEl:
|
|
17228
|
+
footerViewportEl: re,
|
|
17229
|
+
footerScrollEl: O,
|
|
17230
|
+
footerGutterEl: k,
|
|
17230
17231
|
footerRowEl: ie,
|
|
17231
17232
|
footerLeftLaneEl: ae,
|
|
17232
17233
|
footerCenterLaneEl: A,
|
|
@@ -17237,7 +17238,7 @@ function kC(e, t = {}) {
|
|
|
17237
17238
|
floatingFilterRowEl: T,
|
|
17238
17239
|
floatingFilterLeftLaneEl: E,
|
|
17239
17240
|
floatingFilterCenterLaneEl: D,
|
|
17240
|
-
floatingFilterRightLaneEl:
|
|
17241
|
+
floatingFilterRightLaneEl: ne,
|
|
17241
17242
|
overlayEl: ee,
|
|
17242
17243
|
overlayWrapperEl: x,
|
|
17243
17244
|
overlayContentEl: S
|
|
@@ -18164,7 +18165,7 @@ var bw = class {
|
|
|
18164
18165
|
return;
|
|
18165
18166
|
}
|
|
18166
18167
|
let r = this.deps.columnModel.getColumnById(e.colId);
|
|
18167
|
-
!r || !J(r, t, this.deps.getCellDisableContext()) ||
|
|
18168
|
+
!r || !J(r, t, this.deps.getCellDisableContext()) || O(r) || this.deps.tryStartCellEditing({
|
|
18168
18169
|
rowId: e.rowId,
|
|
18169
18170
|
colId: e.colId,
|
|
18170
18171
|
rowIndex: e.rowIndex,
|
|
@@ -18183,7 +18184,7 @@ var bw = class {
|
|
|
18183
18184
|
}
|
|
18184
18185
|
toggleInlineToggleAtCell(e, t, n) {
|
|
18185
18186
|
let r = this.deps.columnModel.getColumnById(t);
|
|
18186
|
-
if (!r || !
|
|
18187
|
+
if (!r || !O(r) || !Yt(r.cellEditor)) return !1;
|
|
18187
18188
|
let i = this.deps.rowModel.getRow(n);
|
|
18188
18189
|
if (!i || !J(r, i, this.deps.getCellDisableContext())) return !1;
|
|
18189
18190
|
let a = this.deps.mountEl.querySelector(`.mg-row[data-row-id="${e}"] .mg-cell[data-col-id="${t}"]`);
|
|
@@ -20256,7 +20257,7 @@ var cT = class {
|
|
|
20256
20257
|
}
|
|
20257
20258
|
let n = this.deps.columnModel.getColumnById(t.colId);
|
|
20258
20259
|
if (n) {
|
|
20259
|
-
if (
|
|
20260
|
+
if (O(n)) {
|
|
20260
20261
|
(n.cellEditor === "checkbox" || n.cellEditor === "switch") && !this.focusController.isInlineToggleClickTarget(e.target) && this.focusController.toggleInlineToggleAtCell(t.rowId, t.colId, t.rowIndex);
|
|
20261
20262
|
return;
|
|
20262
20263
|
}
|
|
@@ -20274,7 +20275,7 @@ var cT = class {
|
|
|
20274
20275
|
this.cellCommentSession?.closeAll(), this.deps.tryStartRowEditing(t);
|
|
20275
20276
|
return;
|
|
20276
20277
|
}
|
|
20277
|
-
!n || gi(n, this.deps.editType) !== "doubleClick" ||
|
|
20278
|
+
!n || gi(n, this.deps.editType) !== "doubleClick" || O(n) || (this.cellCommentSession?.closeAll(), this.deps.tryStartCellEditing(t));
|
|
20278
20279
|
};
|
|
20279
20280
|
async commitEditingForCellRangeInteraction(e, t) {
|
|
20280
20281
|
return !this.deps.isEditing() || this.isSameEditingTarget(e) || t.target instanceof Element && ht(t.target) ? !0 : (this.deps.isCommitting() && await this.deps.awaitCommitIdle(), await this.deps.commitEditing(), !this.deps.isEditing());
|
|
@@ -21321,7 +21322,7 @@ var gE = class {
|
|
|
21321
21322
|
}
|
|
21322
21323
|
toggleRowSelection(e, t, n) {
|
|
21323
21324
|
if (!this.deps.selectionService) return;
|
|
21324
|
-
let r =
|
|
21325
|
+
let r = ne(e), i = !1, a = this.deps.selectionService.isMultiple(), o = [];
|
|
21325
21326
|
for (let e of r) {
|
|
21326
21327
|
let r = this.deps.rowModel.getRowById(e);
|
|
21327
21328
|
if (!r) continue;
|
|
@@ -21364,7 +21365,7 @@ var gE = class {
|
|
|
21364
21365
|
}
|
|
21365
21366
|
setIndexFocus(e, t = {}) {
|
|
21366
21367
|
if (!this.deps.indexFocusService) return;
|
|
21367
|
-
let n =
|
|
21368
|
+
let n = ne(e).map((e) => {
|
|
21368
21369
|
let t = this.deps.rowModel.getRowIndexById(e);
|
|
21369
21370
|
return t >= 0 ? {
|
|
21370
21371
|
id: e,
|
|
@@ -21452,15 +21453,89 @@ var gE = class {
|
|
|
21452
21453
|
}
|
|
21453
21454
|
};
|
|
21454
21455
|
//#endregion
|
|
21456
|
+
//#region src/core/rowMutation/buildAddRowsByArrayTransaction.ts
|
|
21457
|
+
function _E(e) {
|
|
21458
|
+
return {
|
|
21459
|
+
id: e,
|
|
21460
|
+
data: {},
|
|
21461
|
+
rowHeight: 0,
|
|
21462
|
+
rowTop: 0,
|
|
21463
|
+
rowIndex: 0,
|
|
21464
|
+
sourceIndex: 0,
|
|
21465
|
+
estimated: !1,
|
|
21466
|
+
isTransient: !0
|
|
21467
|
+
};
|
|
21468
|
+
}
|
|
21469
|
+
function vE(e, t) {
|
|
21470
|
+
return e === "display" || t.hasSortOrFilter ? t.displayRows.length : t.sourceRows.length;
|
|
21471
|
+
}
|
|
21472
|
+
function yE(e, t, n) {
|
|
21473
|
+
let r = vE(t, n), i = r;
|
|
21474
|
+
return e.map((e) => {
|
|
21475
|
+
if (e.index === void 0) {
|
|
21476
|
+
let t = {
|
|
21477
|
+
...e,
|
|
21478
|
+
index: i
|
|
21479
|
+
};
|
|
21480
|
+
return i += 1, t;
|
|
21481
|
+
}
|
|
21482
|
+
let t = e.index;
|
|
21483
|
+
return t > r && (t = r), i = Math.max(i, t + 1), {
|
|
21484
|
+
...e,
|
|
21485
|
+
index: t
|
|
21486
|
+
};
|
|
21487
|
+
});
|
|
21488
|
+
}
|
|
21489
|
+
function bE(e) {
|
|
21490
|
+
return e.map((e, t) => ({
|
|
21491
|
+
item: e,
|
|
21492
|
+
sortIndex: e.index,
|
|
21493
|
+
originalOrder: t
|
|
21494
|
+
}));
|
|
21495
|
+
}
|
|
21496
|
+
function xE(e) {
|
|
21497
|
+
return [...e].sort((e, t) => t.sortIndex === e.sortIndex ? t.originalOrder - e.originalOrder : t.sortIndex - e.sortIndex).map(({ item: e, sortIndex: t }) => ({
|
|
21498
|
+
data: e.row,
|
|
21499
|
+
index: t
|
|
21500
|
+
}));
|
|
21501
|
+
}
|
|
21502
|
+
function SE(e, t, n) {
|
|
21503
|
+
let r = [...e].sort((e, t) => e.sortIndex === t.sortIndex ? e.originalOrder - t.originalOrder : e.sortIndex - t.sortIndex), i = [...n.sourceRows], a = [...n.displayRows], o = [];
|
|
21504
|
+
for (let { item: e } of r) {
|
|
21505
|
+
let r = i_({
|
|
21506
|
+
sourceRows: i,
|
|
21507
|
+
displayRows: a,
|
|
21508
|
+
sortModelLength: +!!n.hasSortOrFilter,
|
|
21509
|
+
filterModelKeyCount: +!!n.hasSortOrFilter
|
|
21510
|
+
}), s = a_(e.index, t, r);
|
|
21511
|
+
if (s === void 0) continue;
|
|
21512
|
+
o.push({
|
|
21513
|
+
data: e.row,
|
|
21514
|
+
index: s
|
|
21515
|
+
});
|
|
21516
|
+
let c = _E(`__mg_add_rows_by_array_${o.length}`);
|
|
21517
|
+
if (i = Up(i, [c], s), t === "display" && n.hasSortOrFilter) {
|
|
21518
|
+
let t = a_(e.index, "display", r);
|
|
21519
|
+
t !== void 0 && (a = Up(a, [c], t));
|
|
21520
|
+
} else a = Up(a, [c], s);
|
|
21521
|
+
}
|
|
21522
|
+
return o;
|
|
21523
|
+
}
|
|
21524
|
+
function CE(e, t, n, r = "desc") {
|
|
21525
|
+
if (e.length === 0) return {};
|
|
21526
|
+
let i = bE(yE(e, t, n));
|
|
21527
|
+
return { add: r === "asc" ? SE(i, t, n) : xE(i) };
|
|
21528
|
+
}
|
|
21529
|
+
//#endregion
|
|
21455
21530
|
//#region src/core/rowMutation/rowMutationService.ts
|
|
21456
|
-
function
|
|
21531
|
+
function wE(e, t) {
|
|
21457
21532
|
let n = e.indexMode ?? "source", r = a_(e.index, n, t);
|
|
21458
21533
|
return { add: e.rows.map((e, t) => ({
|
|
21459
21534
|
data: e.data,
|
|
21460
21535
|
index: r === void 0 ? void 0 : r + t
|
|
21461
21536
|
})) };
|
|
21462
21537
|
}
|
|
21463
|
-
function
|
|
21538
|
+
function TE(e, t) {
|
|
21464
21539
|
let n = new Set(se(e.rowIds) ?? []);
|
|
21465
21540
|
if (e.indexes?.length) {
|
|
21466
21541
|
let r = e.indexMode ?? "source";
|
|
@@ -21468,18 +21543,18 @@ function vE(e, t) {
|
|
|
21468
21543
|
}
|
|
21469
21544
|
return n.size === 0 ? {} : { remove: [...n] };
|
|
21470
21545
|
}
|
|
21471
|
-
function
|
|
21546
|
+
function EE(e) {
|
|
21472
21547
|
return e.rows.length === 0 ? {} : { update: e.rows.map((e) => e.rowId !== void 0 && e.rowId !== null ? {
|
|
21473
21548
|
data: { ...e.data },
|
|
21474
21549
|
rowId: String(e.rowId)
|
|
21475
21550
|
} : { ...e.data }) };
|
|
21476
21551
|
}
|
|
21477
|
-
function
|
|
21552
|
+
function DE(e) {
|
|
21478
21553
|
return e.remove?.length ? e.remove.filter((e) => typeof e == "string") : [];
|
|
21479
21554
|
}
|
|
21480
21555
|
//#endregion
|
|
21481
21556
|
//#region src/core/rowMutation/rowMutationEvents.ts
|
|
21482
|
-
function
|
|
21557
|
+
function OE(e, t, n) {
|
|
21483
21558
|
return { rows: e.map((e) => ({
|
|
21484
21559
|
rowId: e.id,
|
|
21485
21560
|
rowIndex: n(e.id),
|
|
@@ -21487,13 +21562,13 @@ function xE(e, t, n) {
|
|
|
21487
21562
|
isTransient: e.isTransient ?? !1
|
|
21488
21563
|
})) };
|
|
21489
21564
|
}
|
|
21490
|
-
function
|
|
21565
|
+
function kE(e, t) {
|
|
21491
21566
|
return { rows: e.map((e) => ({
|
|
21492
21567
|
rowId: e.id,
|
|
21493
21568
|
data: i(e, t)
|
|
21494
21569
|
})) };
|
|
21495
21570
|
}
|
|
21496
|
-
function
|
|
21571
|
+
function AE(e, t, n) {
|
|
21497
21572
|
return {
|
|
21498
21573
|
oldRowId: e,
|
|
21499
21574
|
newRowId: t.id,
|
|
@@ -21502,7 +21577,7 @@ function CE(e, t, n) {
|
|
|
21502
21577
|
}
|
|
21503
21578
|
//#endregion
|
|
21504
21579
|
//#region src/core/grid/gridRowMutation.ts
|
|
21505
|
-
var
|
|
21580
|
+
var jE = class {
|
|
21506
21581
|
deps;
|
|
21507
21582
|
pendingTransaction = null;
|
|
21508
21583
|
rowMoveService;
|
|
@@ -21529,7 +21604,7 @@ var wE = class {
|
|
|
21529
21604
|
handlers: this.deps.asyncRowMutation,
|
|
21530
21605
|
getRowById: (e) => this.deps.rowModel.getRowById(e),
|
|
21531
21606
|
sourceRows: this.deps.rowModel.getSourceRows()
|
|
21532
|
-
}), n =
|
|
21607
|
+
}), n = DE(t);
|
|
21533
21608
|
if (n.length > 0) {
|
|
21534
21609
|
this.prepareRemoveRows(new Set(n));
|
|
21535
21610
|
let e = this.commitTransaction(t);
|
|
@@ -21544,15 +21619,24 @@ var wE = class {
|
|
|
21544
21619
|
return this.deps.viewport.syncViewportHeight(), this.queueTransactionFlush(t), t;
|
|
21545
21620
|
}
|
|
21546
21621
|
async addRows(e) {
|
|
21547
|
-
let t =
|
|
21622
|
+
let t = wE(e, this.createRowIndexContext());
|
|
21548
21623
|
return this.applyTransaction(t);
|
|
21549
21624
|
}
|
|
21625
|
+
async addRowsByArray(e, t) {
|
|
21626
|
+
if (e.length === 0) return {
|
|
21627
|
+
add: [],
|
|
21628
|
+
remove: [],
|
|
21629
|
+
update: []
|
|
21630
|
+
};
|
|
21631
|
+
let n = t?.indexMode ?? "source", r = t?.order ?? "desc", i = CE(e, n, this.createRowIndexContext(), r);
|
|
21632
|
+
return this.applyTransaction(i);
|
|
21633
|
+
}
|
|
21550
21634
|
async removeRows(e) {
|
|
21551
|
-
let t =
|
|
21635
|
+
let t = TE(e.rowIds ? {
|
|
21552
21636
|
...e,
|
|
21553
21637
|
rowIds: se(e.rowIds)
|
|
21554
21638
|
} : e, this.createRowIndexContext());
|
|
21555
|
-
return
|
|
21639
|
+
return DE(t).length === 0 ? {
|
|
21556
21640
|
add: [],
|
|
21557
21641
|
remove: [],
|
|
21558
21642
|
update: []
|
|
@@ -21564,7 +21648,7 @@ var wE = class {
|
|
|
21564
21648
|
remove: [],
|
|
21565
21649
|
update: []
|
|
21566
21650
|
};
|
|
21567
|
-
let t =
|
|
21651
|
+
let t = EE(e);
|
|
21568
21652
|
return this.applyTransaction(t);
|
|
21569
21653
|
}
|
|
21570
21654
|
moveRowSync(e, t = "api") {
|
|
@@ -21670,7 +21754,7 @@ var wE = class {
|
|
|
21670
21754
|
if (!r.ok) return r;
|
|
21671
21755
|
this.finalizePromoteRowId(t, r.rowId, n);
|
|
21672
21756
|
let i = this.deps.rowModel.getRowById(r.rowId);
|
|
21673
|
-
return i && this.deps.eventBus.emit("rowIdPromoted",
|
|
21757
|
+
return i && this.deps.eventBus.emit("rowIdPromoted", AE(t, i, this.deps.rowModel.getRowKey())), {
|
|
21674
21758
|
ok: !0,
|
|
21675
21759
|
rowId: f(r.rowId, {
|
|
21676
21760
|
rowKey: this.deps.rowModel.getRowKey(),
|
|
@@ -21743,7 +21827,7 @@ var wE = class {
|
|
|
21743
21827
|
}
|
|
21744
21828
|
emitRowMutationEvents(e) {
|
|
21745
21829
|
let t = this.deps.rowModel.getRowKey();
|
|
21746
|
-
e.add.length > 0 && this.deps.eventBus.emit("rowsAdded",
|
|
21830
|
+
e.add.length > 0 && this.deps.eventBus.emit("rowsAdded", OE(e.add, t, (e) => this.deps.rowModel.getSourceRowIndexById(e))), e.remove.length > 0 && this.deps.eventBus.emit("rowsRemoved", kE(e.remove, t));
|
|
21747
21831
|
}
|
|
21748
21832
|
async withAsyncMutationLoading(e, t) {
|
|
21749
21833
|
let n = this.deps.setAsyncMutationLoading;
|
|
@@ -21759,7 +21843,7 @@ var wE = class {
|
|
|
21759
21843
|
let t = this.deps.asyncRowMutation;
|
|
21760
21844
|
if (!t) return [];
|
|
21761
21845
|
let n = /* @__PURE__ */ new Set();
|
|
21762
|
-
if (t.remove && e.remove?.length) for (let t of
|
|
21846
|
+
if (t.remove && e.remove?.length) for (let t of DE(e)) n.add(t);
|
|
21763
21847
|
if (t.update && e.update?.length) for (let t of e.update) {
|
|
21764
21848
|
if (Yp(t)) {
|
|
21765
21849
|
let e = this.deps.rowModel.getRowById(t.rowId);
|
|
@@ -21773,7 +21857,7 @@ var wE = class {
|
|
|
21773
21857
|
}
|
|
21774
21858
|
return [...n];
|
|
21775
21859
|
}
|
|
21776
|
-
},
|
|
21860
|
+
}, ME = class {
|
|
21777
21861
|
deps;
|
|
21778
21862
|
constructor(e) {
|
|
21779
21863
|
this.deps = e;
|
|
@@ -21796,19 +21880,19 @@ var wE = class {
|
|
|
21796
21880
|
};
|
|
21797
21881
|
//#endregion
|
|
21798
21882
|
//#region src/core/grid/gridValidationNormalize.ts
|
|
21799
|
-
function
|
|
21883
|
+
function NE(e) {
|
|
21800
21884
|
return e?.rowIds ? {
|
|
21801
21885
|
...e,
|
|
21802
21886
|
rowIds: se(e.rowIds)
|
|
21803
21887
|
} : e;
|
|
21804
21888
|
}
|
|
21805
|
-
function
|
|
21889
|
+
function PE(e) {
|
|
21806
21890
|
return {
|
|
21807
21891
|
...e,
|
|
21808
21892
|
rowIds: se(e.rowIds)
|
|
21809
21893
|
};
|
|
21810
21894
|
}
|
|
21811
|
-
function
|
|
21895
|
+
function FE(e) {
|
|
21812
21896
|
return {
|
|
21813
21897
|
...e,
|
|
21814
21898
|
cells: e.cells.map((e) => ({
|
|
@@ -21817,19 +21901,19 @@ function OE(e) {
|
|
|
21817
21901
|
}))
|
|
21818
21902
|
};
|
|
21819
21903
|
}
|
|
21820
|
-
function
|
|
21904
|
+
function IE(e) {
|
|
21821
21905
|
return e?.rowIds ? {
|
|
21822
21906
|
...e,
|
|
21823
21907
|
rowIds: se(e.rowIds)
|
|
21824
21908
|
} : e;
|
|
21825
21909
|
}
|
|
21826
|
-
function
|
|
21910
|
+
function LE(e) {
|
|
21827
21911
|
return {
|
|
21828
21912
|
...e,
|
|
21829
21913
|
rowIds: se(e.rowIds)
|
|
21830
21914
|
};
|
|
21831
21915
|
}
|
|
21832
|
-
function
|
|
21916
|
+
function RE(e) {
|
|
21833
21917
|
return {
|
|
21834
21918
|
...e,
|
|
21835
21919
|
cells: e.cells.map((e) => ({
|
|
@@ -21840,17 +21924,17 @@ function jE(e) {
|
|
|
21840
21924
|
}
|
|
21841
21925
|
//#endregion
|
|
21842
21926
|
//#region src/core/grid/gridMetrics.ts
|
|
21843
|
-
function
|
|
21927
|
+
function zE(e) {
|
|
21844
21928
|
return e >= 1e6 ? 2e3 : e >= 1e5 ? 500 : e >= 1e4 ? 200 : e >= 1e3 ? 100 : 50;
|
|
21845
21929
|
}
|
|
21846
|
-
function
|
|
21930
|
+
function BE(e) {
|
|
21847
21931
|
return {
|
|
21848
21932
|
maxDomRows: 80,
|
|
21849
|
-
maxSetDataMs:
|
|
21933
|
+
maxSetDataMs: zE(e)
|
|
21850
21934
|
};
|
|
21851
21935
|
}
|
|
21852
|
-
function
|
|
21853
|
-
let n =
|
|
21936
|
+
function VE(e, t) {
|
|
21937
|
+
let n = BE(t), r = e.activeDomRowCount <= n.maxDomRows, i = e.lastSetDataMs <= n.maxSetDataMs;
|
|
21854
21938
|
return {
|
|
21855
21939
|
domRowsPass: r,
|
|
21856
21940
|
setDataPass: i,
|
|
@@ -21859,7 +21943,7 @@ function PE(e, t) {
|
|
|
21859
21943
|
}
|
|
21860
21944
|
//#endregion
|
|
21861
21945
|
//#region src/core/grid/grid.ts
|
|
21862
|
-
var
|
|
21946
|
+
var HE = class {
|
|
21863
21947
|
mountEl;
|
|
21864
21948
|
rowModel;
|
|
21865
21949
|
rowRenderer;
|
|
@@ -22204,7 +22288,7 @@ var FE = class {
|
|
|
22204
22288
|
data: e.data,
|
|
22205
22289
|
masterRowId: e.masterRowId ?? e.id
|
|
22206
22290
|
})
|
|
22207
|
-
}) : null, this.rowRenderer.setDetailRowAutoHeightService(this.detailRowAutoHeightService), this.gridFooter = new
|
|
22291
|
+
}) : null, this.rowRenderer.setDetailRowAutoHeightService(this.detailRowAutoHeightService), this.gridFooter = new ME({
|
|
22208
22292
|
columnModel: this.columnModel,
|
|
22209
22293
|
columnViewport: this.columnViewport,
|
|
22210
22294
|
rowModel: this.rowModel,
|
|
@@ -22559,7 +22643,7 @@ var FE = class {
|
|
|
22559
22643
|
this.treeHierarchyMenuController.toggle(e, t, n);
|
|
22560
22644
|
},
|
|
22561
22645
|
closeTreeHierarchyMenu: () => this.treeHierarchyMenuController.close()
|
|
22562
|
-
}), this.rowMutation = new
|
|
22646
|
+
}), this.rowMutation = new jE({
|
|
22563
22647
|
rowKey: n.rowKey,
|
|
22564
22648
|
asyncRowMutation: this.asyncRowMutation,
|
|
22565
22649
|
rowModel: this.rowModel,
|
|
@@ -23039,6 +23123,9 @@ var FE = class {
|
|
|
23039
23123
|
addRows(e) {
|
|
23040
23124
|
return this.rowMutation.addRows(e);
|
|
23041
23125
|
}
|
|
23126
|
+
addRowsByArray(e, t) {
|
|
23127
|
+
return this.rowMutation.addRowsByArray(e, t);
|
|
23128
|
+
}
|
|
23042
23129
|
removeRows(e) {
|
|
23043
23130
|
return this.rowMutation.removeRows(e);
|
|
23044
23131
|
}
|
|
@@ -23740,22 +23827,22 @@ var FE = class {
|
|
|
23740
23827
|
});
|
|
23741
23828
|
}
|
|
23742
23829
|
validate(e) {
|
|
23743
|
-
return this.cellEditing.validate(
|
|
23830
|
+
return this.cellEditing.validate(NE(e)).then((e) => ae(e, this.businessRowIdCtx));
|
|
23744
23831
|
}
|
|
23745
23832
|
validateRows(e) {
|
|
23746
|
-
return this.cellEditing.validateRows(
|
|
23833
|
+
return this.cellEditing.validateRows(PE(e)).then((e) => ae(e, this.businessRowIdCtx));
|
|
23747
23834
|
}
|
|
23748
23835
|
validateCells(e) {
|
|
23749
|
-
return this.cellEditing.validateCells(
|
|
23836
|
+
return this.cellEditing.validateCells(FE(e)).then((e) => ae(e, this.businessRowIdCtx));
|
|
23750
23837
|
}
|
|
23751
23838
|
clearValidation(e) {
|
|
23752
|
-
this.cellEditing.clearValidation(
|
|
23839
|
+
this.cellEditing.clearValidation(IE(e));
|
|
23753
23840
|
}
|
|
23754
23841
|
clearRowValidation(e) {
|
|
23755
|
-
this.cellEditing.clearRowValidation(
|
|
23842
|
+
this.cellEditing.clearRowValidation(LE(e));
|
|
23756
23843
|
}
|
|
23757
23844
|
clearCellValidation(e) {
|
|
23758
|
-
this.cellEditing.clearCellValidation(
|
|
23845
|
+
this.cellEditing.clearCellValidation(RE(e));
|
|
23759
23846
|
}
|
|
23760
23847
|
registerCellEditor(e, t) {
|
|
23761
23848
|
this.cellEditing.registerCellEditor(e, t);
|
|
@@ -23812,7 +23899,7 @@ var FE = class {
|
|
|
23812
23899
|
isEditingTargetRow(e) {
|
|
23813
23900
|
return this.cellEditing.getEditingCell()?.rowId === e || this.cellEditing.getEditingCells().some((t) => t.rowId === e);
|
|
23814
23901
|
}
|
|
23815
|
-
},
|
|
23902
|
+
}, UE = {
|
|
23816
23903
|
"--mg-color-bg": "#141414",
|
|
23817
23904
|
"--mg-color-text-primary": "#e8e8e8",
|
|
23818
23905
|
"--mg-color-text-regular": "#e0e0e0",
|
|
@@ -23827,7 +23914,7 @@ var FE = class {
|
|
|
23827
23914
|
"--mg-fixed-shadow-left": "4px 0 8px -2px rgba(0, 0, 0, 0.45)",
|
|
23828
23915
|
"--mg-fixed-shadow-right": "-4px 0 8px -2px rgba(0, 0, 0, 0.45)",
|
|
23829
23916
|
"--mg-column-handle-menu-shadow": "0 1px 2px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.4)"
|
|
23830
|
-
},
|
|
23917
|
+
}, WE = {
|
|
23831
23918
|
"--mg-color-bg-cell": "#ffffff",
|
|
23832
23919
|
"--mg-color-bg-stripe": "#f5f7fa",
|
|
23833
23920
|
"--mg-color-text-primary": "#333333",
|
|
@@ -23838,28 +23925,28 @@ var FE = class {
|
|
|
23838
23925
|
"--mg-fixed-shadow-left": "4px 0 8px -2px rgba(0, 0, 0, 0.12)",
|
|
23839
23926
|
"--mg-fixed-shadow-right": "-4px 0 8px -2px rgba(0, 0, 0, 0.12)"
|
|
23840
23927
|
};
|
|
23841
|
-
function
|
|
23928
|
+
function GE(e) {
|
|
23842
23929
|
return e ?? "light";
|
|
23843
23930
|
}
|
|
23844
|
-
function
|
|
23931
|
+
function KE(e) {
|
|
23845
23932
|
return `magic-grid--theme-${e}`;
|
|
23846
23933
|
}
|
|
23847
|
-
function
|
|
23848
|
-
return e === "dark" ? { ...
|
|
23934
|
+
function qE(e) {
|
|
23935
|
+
return e === "dark" ? { ...UE } : {};
|
|
23849
23936
|
}
|
|
23850
|
-
function
|
|
23851
|
-
return e === "dark" ? { ...
|
|
23937
|
+
function JE(e) {
|
|
23938
|
+
return e === "dark" ? { ...WE } : {};
|
|
23852
23939
|
}
|
|
23853
|
-
var
|
|
23854
|
-
function
|
|
23940
|
+
var YE = Object.keys(WE);
|
|
23941
|
+
function XE(e, t) {
|
|
23855
23942
|
if (!e) return;
|
|
23856
|
-
for (let t of
|
|
23857
|
-
let n =
|
|
23943
|
+
for (let t of YE) e.style.removeProperty(t);
|
|
23944
|
+
let n = JE(t);
|
|
23858
23945
|
for (let [t, r] of Object.entries(n)) e.style.setProperty(t, r);
|
|
23859
23946
|
}
|
|
23860
23947
|
//#endregion
|
|
23861
23948
|
//#region src/components/StatusBar/StatusBarDefaultPanels.vue?vue&type=script&setup=true&lang.ts
|
|
23862
|
-
var
|
|
23949
|
+
var ZE = { class: "mg-status-bar__panels" }, QE = /* @__PURE__ */ R({
|
|
23863
23950
|
__name: "StatusBarDefaultPanels",
|
|
23864
23951
|
props: { context: {} },
|
|
23865
23952
|
setup(e) {
|
|
@@ -23867,67 +23954,67 @@ var WE = { class: "mg-status-bar__panels" }, GE = /* @__PURE__ */ R({
|
|
|
23867
23954
|
let { context: e } = t, n = [];
|
|
23868
23955
|
return n.push(`共 ${e.totalRowCount} 行`), e.isFiltered && n.push(`显示 ${e.displayedRowCount} 行`), e.rowSelectionEnabled && e.selectedRowCount > 0 && n.push(`已选 ${e.selectedRowCount} 行`), n;
|
|
23869
23956
|
});
|
|
23870
|
-
return (e, t) => (B(), F("div",
|
|
23957
|
+
return (e, t) => (B(), F("div", ZE, [(B(!0), F(Se, null, Le(n.value, (e, t) => (B(), F("span", {
|
|
23871
23958
|
key: t,
|
|
23872
23959
|
class: "mg-status-bar__panel"
|
|
23873
23960
|
}, Ve(e), 1))), 128))]));
|
|
23874
23961
|
}
|
|
23875
|
-
}),
|
|
23962
|
+
}), $E = 2;
|
|
23876
23963
|
//#endregion
|
|
23877
23964
|
//#region src/components/StatusBar/resolveStatusBarRangeAggregationPrecision.ts
|
|
23878
|
-
function
|
|
23965
|
+
function eD(e) {
|
|
23879
23966
|
if (typeof e == "number") {
|
|
23880
|
-
let t =
|
|
23967
|
+
let t = tD(e);
|
|
23881
23968
|
return {
|
|
23882
23969
|
average: t,
|
|
23883
23970
|
sum: t
|
|
23884
23971
|
};
|
|
23885
23972
|
}
|
|
23886
23973
|
return {
|
|
23887
|
-
average:
|
|
23888
|
-
sum:
|
|
23974
|
+
average: tD(e?.average ?? 2),
|
|
23975
|
+
sum: tD(e?.sum ?? 2)
|
|
23889
23976
|
};
|
|
23890
23977
|
}
|
|
23891
|
-
function
|
|
23978
|
+
function tD(e) {
|
|
23892
23979
|
return Number.isFinite(e) ? Math.max(0, Math.min(10, Math.trunc(e))) : 2;
|
|
23893
23980
|
}
|
|
23894
23981
|
//#endregion
|
|
23895
23982
|
//#region src/components/StatusBar/formatAggregationDisplayValue.ts
|
|
23896
|
-
function
|
|
23983
|
+
function nD(e, t, n = 2) {
|
|
23897
23984
|
if (t === "count") return String(Math.trunc(e));
|
|
23898
|
-
let r =
|
|
23985
|
+
let r = tD(n), i = 10 ** r, a = Math.round(e * i) / i;
|
|
23899
23986
|
return r === 0 ? String(Math.round(a)) : a.toFixed(r).replace(/\.?0+$/, "");
|
|
23900
23987
|
}
|
|
23901
23988
|
//#endregion
|
|
23902
23989
|
//#region src/components/StatusBar/hasStatusBarAggregationContent.ts
|
|
23903
|
-
function
|
|
23990
|
+
function rD(e) {
|
|
23904
23991
|
return e != null && e.count > 0;
|
|
23905
23992
|
}
|
|
23906
23993
|
//#endregion
|
|
23907
23994
|
//#region src/components/StatusBar/StatusBarRangeAggregationPanels.vue?vue&type=script&setup=true&lang.ts
|
|
23908
|
-
var
|
|
23995
|
+
var iD = {
|
|
23909
23996
|
key: 0,
|
|
23910
23997
|
class: "mg-status-bar__panels mg-status-bar__panels--aggregation"
|
|
23911
|
-
},
|
|
23998
|
+
}, aD = /* @__PURE__ */ R({
|
|
23912
23999
|
__name: "StatusBarRangeAggregationPanels",
|
|
23913
24000
|
props: { context: {} },
|
|
23914
24001
|
setup(e) {
|
|
23915
|
-
let t = e, n = N(() =>
|
|
24002
|
+
let t = e, n = N(() => rD(t.context.cellSelectionAggregation)), r = N(() => {
|
|
23916
24003
|
let e = t.context.cellSelectionAggregation;
|
|
23917
|
-
if (!
|
|
24004
|
+
if (!rD(e)) return [];
|
|
23918
24005
|
let n = t.context.statusBarRangeAggregationPrecision, r = [];
|
|
23919
24006
|
return e.average != null && r.push({
|
|
23920
24007
|
label: "平均值",
|
|
23921
|
-
value:
|
|
24008
|
+
value: nD(e.average, "average", n.average)
|
|
23922
24009
|
}), r.push({
|
|
23923
24010
|
label: "计数",
|
|
23924
|
-
value:
|
|
24011
|
+
value: nD(e.count, "count")
|
|
23925
24012
|
}), e.sum != null && r.push({
|
|
23926
24013
|
label: "求和",
|
|
23927
|
-
value:
|
|
24014
|
+
value: nD(e.sum, "sum", n.sum)
|
|
23928
24015
|
}), r;
|
|
23929
24016
|
});
|
|
23930
|
-
return (e, t) => n.value && r.value.length ? (B(), F("div",
|
|
24017
|
+
return (e, t) => n.value && r.value.length ? (B(), F("div", iD, [(B(!0), F(Se, null, Le(r.value, (e, t) => (B(), F("span", {
|
|
23931
24018
|
key: t,
|
|
23932
24019
|
class: "mg-status-bar__panel"
|
|
23933
24020
|
}, Ve(e.label) + ": " + Ve(e.value), 1))), 128))])) : P("", !0);
|
|
@@ -23935,7 +24022,7 @@ var ZE = {
|
|
|
23935
24022
|
});
|
|
23936
24023
|
//#endregion
|
|
23937
24024
|
//#region src/components/MagicGrid/resolveMagicGridDefaults.ts
|
|
23938
|
-
function
|
|
24025
|
+
function oD(e) {
|
|
23939
24026
|
if (e === !1) return !1;
|
|
23940
24027
|
let t = e === !0 || e == null ? {} : e, n = typeof e == "object" && !!e && "handleMode" in e, r = {
|
|
23941
24028
|
...t,
|
|
@@ -23947,7 +24034,7 @@ function $E(e) {
|
|
|
23947
24034
|
}
|
|
23948
24035
|
return r;
|
|
23949
24036
|
}
|
|
23950
|
-
function
|
|
24037
|
+
function sD(e) {
|
|
23951
24038
|
return {
|
|
23952
24039
|
...e,
|
|
23953
24040
|
syncToSelectionColumn: e?.syncToSelectionColumn ?? !0
|
|
@@ -23955,17 +24042,17 @@ function eD(e) {
|
|
|
23955
24042
|
}
|
|
23956
24043
|
//#endregion
|
|
23957
24044
|
//#region src/components/MagicGrid/useStatusBarContext.ts
|
|
23958
|
-
function
|
|
24045
|
+
function cD(e) {
|
|
23959
24046
|
return Ol({ cellSelection: e }).enabled;
|
|
23960
24047
|
}
|
|
23961
|
-
function
|
|
24048
|
+
function lD(e) {
|
|
23962
24049
|
let t = V(0), n = V(0), r = () => {
|
|
23963
24050
|
t.value += 1;
|
|
23964
24051
|
};
|
|
23965
24052
|
return {
|
|
23966
24053
|
statusBarContext: N(() => {
|
|
23967
24054
|
t.value;
|
|
23968
|
-
let r = e.api.value, i = r?.getMetrics(), a = b(e.rowSelection.value).mode !== !1, o =
|
|
24055
|
+
let r = e.api.value, i = r?.getMetrics(), a = b(e.rowSelection.value).mode !== !1, o = cD(e.cellSelection.value);
|
|
23969
24056
|
return {
|
|
23970
24057
|
api: r,
|
|
23971
24058
|
totalRowCount: i?.sourceRowCount ?? 0,
|
|
@@ -23975,7 +24062,7 @@ function nD(e) {
|
|
|
23975
24062
|
rowSelectionEnabled: a,
|
|
23976
24063
|
cellSelectionEnabled: o,
|
|
23977
24064
|
cellSelectionAggregation: o ? r?.getCellSelectionAggregation() ?? null : null,
|
|
23978
|
-
statusBarRangeAggregationPrecision:
|
|
24065
|
+
statusBarRangeAggregationPrecision: eD(e.statusBarRangeAggregationPrecision.value),
|
|
23979
24066
|
metrics: i
|
|
23980
24067
|
};
|
|
23981
24068
|
}),
|
|
@@ -23990,7 +24077,7 @@ function nD(e) {
|
|
|
23990
24077
|
}
|
|
23991
24078
|
//#endregion
|
|
23992
24079
|
//#region src/components/cellRenderer/vueCellRendererHost.ts
|
|
23993
|
-
var
|
|
24080
|
+
var uD = class {
|
|
23994
24081
|
appContext = null;
|
|
23995
24082
|
setAppContext(e) {
|
|
23996
24083
|
this.appContext = e;
|
|
@@ -24005,20 +24092,20 @@ var rD = class {
|
|
|
24005
24092
|
Ie(null, e);
|
|
24006
24093
|
}
|
|
24007
24094
|
};
|
|
24008
|
-
function
|
|
24095
|
+
function dD(e, t) {
|
|
24009
24096
|
return Od((n, r) => {
|
|
24010
24097
|
e.render(r.mountEl, t(n));
|
|
24011
24098
|
});
|
|
24012
24099
|
}
|
|
24013
|
-
function
|
|
24014
|
-
return
|
|
24100
|
+
function fD(e, t) {
|
|
24101
|
+
return dD(e, (e) => {
|
|
24015
24102
|
let n = t(e);
|
|
24016
24103
|
return Array.isArray(n) ? n[0] : n;
|
|
24017
24104
|
});
|
|
24018
24105
|
}
|
|
24019
24106
|
//#endregion
|
|
24020
24107
|
//#region src/components/detailRowRenderer/vueDetailRowRendererHost.ts
|
|
24021
|
-
var
|
|
24108
|
+
var pD = class {
|
|
24022
24109
|
render(e, t) {
|
|
24023
24110
|
Ie(t, e);
|
|
24024
24111
|
}
|
|
@@ -24026,20 +24113,20 @@ var oD = class {
|
|
|
24026
24113
|
Ie(null, e);
|
|
24027
24114
|
}
|
|
24028
24115
|
};
|
|
24029
|
-
function
|
|
24116
|
+
function mD(e, t) {
|
|
24030
24117
|
return (n, r) => {
|
|
24031
24118
|
e.render(r.mountEl, t(n));
|
|
24032
24119
|
};
|
|
24033
24120
|
}
|
|
24034
|
-
function
|
|
24035
|
-
return
|
|
24121
|
+
function hD(e, t) {
|
|
24122
|
+
return mD(e, (e) => {
|
|
24036
24123
|
let n = t(e);
|
|
24037
24124
|
return Array.isArray(n) ? n[0] : n;
|
|
24038
24125
|
});
|
|
24039
24126
|
}
|
|
24040
24127
|
//#endregion
|
|
24041
24128
|
//#region src/components/cellEditor/vueCellEditorHost.ts
|
|
24042
|
-
var
|
|
24129
|
+
var gD = class {
|
|
24043
24130
|
render(e, t) {
|
|
24044
24131
|
Ie(t, e);
|
|
24045
24132
|
}
|
|
@@ -24047,20 +24134,20 @@ var lD = class {
|
|
|
24047
24134
|
Ie(null, e);
|
|
24048
24135
|
}
|
|
24049
24136
|
};
|
|
24050
|
-
function
|
|
24137
|
+
function _D(e, t) {
|
|
24051
24138
|
return (n, r) => {
|
|
24052
24139
|
e.render(r.mountEl, t(n));
|
|
24053
24140
|
};
|
|
24054
24141
|
}
|
|
24055
|
-
function
|
|
24056
|
-
return
|
|
24142
|
+
function vD(e, t) {
|
|
24143
|
+
return _D(e, (e) => {
|
|
24057
24144
|
let n = t(e);
|
|
24058
24145
|
return Array.isArray(n) ? n[0] : n;
|
|
24059
24146
|
});
|
|
24060
24147
|
}
|
|
24061
24148
|
//#endregion
|
|
24062
24149
|
//#region src/components/tooltip/vueTooltipComponentHost.ts
|
|
24063
|
-
var
|
|
24150
|
+
var yD = class {
|
|
24064
24151
|
mountEl = null;
|
|
24065
24152
|
render(e, t) {
|
|
24066
24153
|
this.unmount(), this.mountEl = e, Ie(t, e);
|
|
@@ -24069,7 +24156,7 @@ var fD = class {
|
|
|
24069
24156
|
this.mountEl &&= (Ie(null, this.mountEl), null);
|
|
24070
24157
|
}
|
|
24071
24158
|
};
|
|
24072
|
-
function
|
|
24159
|
+
function bD(e, t) {
|
|
24073
24160
|
return (n, r) => {
|
|
24074
24161
|
let i = t(n), a = Array.isArray(i) ? i[0] : i;
|
|
24075
24162
|
return e.render(r, a), {
|
|
@@ -24080,7 +24167,7 @@ function pD(e, t) {
|
|
|
24080
24167
|
}
|
|
24081
24168
|
//#endregion
|
|
24082
24169
|
//#region src/components/overlay/vueOverlayComponentHost.ts
|
|
24083
|
-
var
|
|
24170
|
+
var xD = class {
|
|
24084
24171
|
mountEl = null;
|
|
24085
24172
|
render(e, t) {
|
|
24086
24173
|
this.unmount(), this.mountEl = e, Ie(t, e);
|
|
@@ -24089,7 +24176,7 @@ var mD = class {
|
|
|
24089
24176
|
this.mountEl &&= (Ie(null, this.mountEl), null);
|
|
24090
24177
|
}
|
|
24091
24178
|
};
|
|
24092
|
-
function
|
|
24179
|
+
function SD(e, t) {
|
|
24093
24180
|
return (n, r) => {
|
|
24094
24181
|
let i = t(n), a = Array.isArray(i) ? i[0] : i;
|
|
24095
24182
|
return e.render(r, a), {
|
|
@@ -24100,36 +24187,36 @@ function hD(e, t) {
|
|
|
24100
24187
|
}
|
|
24101
24188
|
//#endregion
|
|
24102
24189
|
//#region src/components/MagicGrid/MagicGrid.vue?vue&type=script&setup=true&lang.ts
|
|
24103
|
-
var
|
|
24190
|
+
var CD = ["data-status-bar", "data-toolbar"], wD = {
|
|
24104
24191
|
key: 0,
|
|
24105
24192
|
class: "magic-grid__toolbar"
|
|
24106
|
-
},
|
|
24193
|
+
}, TD = {
|
|
24107
24194
|
key: 0,
|
|
24108
24195
|
class: "mg-status-bar__region mg-status-bar__region--left"
|
|
24109
|
-
},
|
|
24196
|
+
}, ED = {
|
|
24110
24197
|
key: 1,
|
|
24111
24198
|
class: "mg-status-bar__separator",
|
|
24112
24199
|
role: "separator",
|
|
24113
24200
|
"aria-orientation": "vertical"
|
|
24114
|
-
},
|
|
24201
|
+
}, DD = {
|
|
24115
24202
|
key: 3,
|
|
24116
24203
|
class: "mg-status-bar__separator",
|
|
24117
24204
|
role: "separator",
|
|
24118
24205
|
"aria-orientation": "vertical"
|
|
24119
|
-
},
|
|
24206
|
+
}, OD = {
|
|
24120
24207
|
key: 4,
|
|
24121
24208
|
class: "mg-status-bar__separator",
|
|
24122
24209
|
role: "separator",
|
|
24123
24210
|
"aria-orientation": "vertical"
|
|
24124
|
-
},
|
|
24211
|
+
}, kD = {
|
|
24125
24212
|
key: 6,
|
|
24126
24213
|
class: "mg-status-bar__separator",
|
|
24127
24214
|
role: "separator",
|
|
24128
24215
|
"aria-orientation": "vertical"
|
|
24129
|
-
},
|
|
24216
|
+
}, AD = {
|
|
24130
24217
|
key: 7,
|
|
24131
24218
|
class: "mg-status-bar__region mg-status-bar__region--right"
|
|
24132
|
-
},
|
|
24219
|
+
}, jD = /* @__PURE__ */ R({
|
|
24133
24220
|
inheritAttrs: !1,
|
|
24134
24221
|
__name: "MagicGrid",
|
|
24135
24222
|
props: {
|
|
@@ -24736,7 +24823,7 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
24736
24823
|
},
|
|
24737
24824
|
emits: /* @__PURE__ */ "scroll.data-rendered.grid-ready.grid-destroyed.first-rendered.cell-clicked.row-click.row-dblclick.selection-changed.index-focus-changed.cell-value-changed.cell-editing-started.cell-editing-stopped.cell-commit-started.cell-commit-finished.edit-commit-aborted.row-commit-started.row-commit-finished.row-editing-started.row-editing-stopped.row-value-changed.cell-validation-failed.row-validation-failed.sort-changed.column-moved.column-resized.column-pinned.column-hidden-changed.filter-changed.rows-added.rows-removed.row-id-promoted.row-moved.row-drag-end.row-drag-commit-started.row-drag-commit-finished.row-height-changed.row-expanded.row-collapsed.row-group-opened.row-group-changed.tree-node-opened.tree-children-loading.tree-children-loaded.tree-children-load-failed.cell-comment-changed.cell-selection-changed.cell-selection-delete-start.cell-selection-delete-end.overlay-shown.overlay-hidden".split("."),
|
|
24738
24825
|
setup(e, { expose: t, emit: n }) {
|
|
24739
|
-
let r = new
|
|
24826
|
+
let r = new uD(), i = new pD(), a = new gD(), o = new yD(), s = new xD();
|
|
24740
24827
|
function c(e, t) {
|
|
24741
24828
|
return e.key ?? e.prop ?? `col_${t}`;
|
|
24742
24829
|
}
|
|
@@ -24749,7 +24836,7 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
24749
24836
|
let a = c(e, i);
|
|
24750
24837
|
e.cellRenderer && (n[a] = e.cellRenderer);
|
|
24751
24838
|
let o = t[`cell-${a}`];
|
|
24752
|
-
o && (n[a] =
|
|
24839
|
+
o && (n[a] = fD(r, (e) => o({
|
|
24753
24840
|
row: e.data,
|
|
24754
24841
|
value: e.value,
|
|
24755
24842
|
formattedValue: e.formattedValue,
|
|
@@ -24766,7 +24853,7 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
24766
24853
|
let i = c(e, r);
|
|
24767
24854
|
e.cellEditor && typeof e.cellEditor == "function" && (n[i] = e.cellEditor);
|
|
24768
24855
|
let o = t[`cell-editor-${i}`];
|
|
24769
|
-
o && (n[i] =
|
|
24856
|
+
o && (n[i] = vD(a, (e) => o({
|
|
24770
24857
|
row: e.data,
|
|
24771
24858
|
value: e.value,
|
|
24772
24859
|
formattedValue: e.formattedValue,
|
|
@@ -24779,11 +24866,11 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
24779
24866
|
}
|
|
24780
24867
|
function f(e, t) {
|
|
24781
24868
|
let n = t.tooltip;
|
|
24782
|
-
return n ?
|
|
24869
|
+
return n ? bD(o, (e) => n(e)) : e;
|
|
24783
24870
|
}
|
|
24784
24871
|
function p(e, t, n) {
|
|
24785
24872
|
let r = t[e];
|
|
24786
|
-
return r ?
|
|
24873
|
+
return r ? SD(s, (e) => r({
|
|
24787
24874
|
overlayType: e.overlayType,
|
|
24788
24875
|
api: e.api,
|
|
24789
24876
|
overlayText: e.overlayText
|
|
@@ -24812,7 +24899,7 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
24812
24899
|
}
|
|
24813
24900
|
function h(e, t) {
|
|
24814
24901
|
let n = t["detail-row"];
|
|
24815
|
-
return n ?
|
|
24902
|
+
return n ? hD(i, (e) => n({
|
|
24816
24903
|
row: e.data,
|
|
24817
24904
|
rowId: e.rowId,
|
|
24818
24905
|
masterRowId: e.masterRowId,
|
|
@@ -24836,12 +24923,12 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
24836
24923
|
x.value && S.value === e && x.value.emitGridLifecycleEvent("gridReady", t);
|
|
24837
24924
|
});
|
|
24838
24925
|
}
|
|
24839
|
-
let { statusBarContext: T, bumpRefresh: E, onSelectionChanged: D, resetSelectionCount:
|
|
24926
|
+
let { statusBarContext: T, bumpRefresh: E, onSelectionChanged: D, resetSelectionCount: ne } = lD({
|
|
24840
24927
|
api: S,
|
|
24841
24928
|
rowSelection: N(() => g.rowSelection),
|
|
24842
24929
|
cellSelection: N(() => g.cellSelection),
|
|
24843
24930
|
statusBarRangeAggregationPrecision: N(() => g.statusBarRangeAggregationPrecision)
|
|
24844
|
-
}),
|
|
24931
|
+
}), re = N(() => !!v["status-bar"]), O = N(() => !!v["status-bar-left"]), k = N(() => !!v["status-bar-right"]), ie = N(() => !!v.toolbar), ae = N(() => ({
|
|
24845
24932
|
api: S.value,
|
|
24846
24933
|
size: j.value.size,
|
|
24847
24934
|
portalEl: b.value ?? void 0
|
|
@@ -24852,14 +24939,14 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
24852
24939
|
})), oe = N(() => Je({
|
|
24853
24940
|
rounded: g.rounded,
|
|
24854
24941
|
sizeBorderRadius: j.value.borderRadius
|
|
24855
|
-
})), se = N(() =>
|
|
24942
|
+
})), se = N(() => GE(g.theme)), ce = N(() => oD(g.cellSelection)), le = N(() => sD(g.indexColumn)), ue = N(() => Xe(g.statusBarHeight, j.value.statusBarHeight)), de = N(() => g.showDefaultStatusBarPanels || O.value), fe = N(() => k.value), pe = N(() => g.showStatusBarRangeAggregation ? rD(T.value.cellSelectionAggregation) : !1), me = N(() => g.statusBarRangeAggregationPosition === "left" && pe.value), he = N(() => g.statusBarRangeAggregationPosition === "right" && pe.value), ge = N(() => de.value), _e = N(() => me.value), M = N(() => he.value || fe.value), ye = N(() => he.value && fe.value), be = N(() => ({
|
|
24856
24943
|
height: typeof g.height == "number" ? `${g.height}px` : g.height,
|
|
24857
24944
|
width: typeof g.width == "number" ? `${g.width}px` : g.width,
|
|
24858
24945
|
...rt({
|
|
24859
24946
|
...j.value,
|
|
24860
24947
|
statusBarHeight: ue.value
|
|
24861
24948
|
}, oe.value, g.summaryRowHeight),
|
|
24862
|
-
...
|
|
24949
|
+
...qE(se.value)
|
|
24863
24950
|
})), xe = N(() => {
|
|
24864
24951
|
let e = ue.value, { fontSize: t, spacing: n } = j.value, r = Ze(e);
|
|
24865
24952
|
return {
|
|
@@ -24878,7 +24965,7 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
24878
24965
|
"magic-grid",
|
|
24879
24966
|
`magic-grid--border-${g.border}`,
|
|
24880
24967
|
`magic-grid--size-${j.value.size}`,
|
|
24881
|
-
|
|
24968
|
+
KE(se.value),
|
|
24882
24969
|
g.showSummary && "magic-grid--has-footer",
|
|
24883
24970
|
g.showStatusBar && "magic-grid--has-status-bar",
|
|
24884
24971
|
ie.value && "magic-grid--has-toolbar"
|
|
@@ -24922,7 +25009,7 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
24922
25009
|
_("cell-selection-changed", e), E();
|
|
24923
25010
|
}), e.on("cellSelectionDeleteStart", (e) => _("cell-selection-delete-start", e)), e.on("cellSelectionDeleteEnd", (e) => _("cell-selection-delete-end", e)), e.on("overlayShown", (e) => _("overlay-shown", e)), e.on("overlayHidden", (e) => _("overlay-hidden", e)));
|
|
24924
25011
|
}, Ne = () => {
|
|
24925
|
-
|
|
25012
|
+
XE(y.value?.querySelector(".mg-body"), se.value);
|
|
24926
25013
|
};
|
|
24927
25014
|
function Ie() {
|
|
24928
25015
|
x.value?.setStatusBarElement(g.showStatusBar ? ee.value ?? null : null);
|
|
@@ -24933,10 +25020,10 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
24933
25020
|
for (let e of A) e();
|
|
24934
25021
|
A.length = 0;
|
|
24935
25022
|
let e = x.value, t = S.value;
|
|
24936
|
-
e && t && w(e, t, "reinit"), e?.destroy(),
|
|
25023
|
+
e && t && w(e, t, "reinit"), e?.destroy(), ne(), g.columns, g.columns, g.columns, Xr(g.columns), t_({
|
|
24937
25024
|
tree: g.tree,
|
|
24938
25025
|
rowGrouping: g.rowGrouping
|
|
24939
|
-
}), x.value = new
|
|
25026
|
+
}), x.value = new HE(y.value, {
|
|
24940
25027
|
columns: ve(g.columns),
|
|
24941
25028
|
rowKey: g.rowKey,
|
|
24942
25029
|
rowHeight: j.value.rowHeight,
|
|
@@ -25332,7 +25419,7 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
25332
25419
|
"data-status-bar": e.showStatusBar ? "true" : "false",
|
|
25333
25420
|
"data-toolbar": ie.value ? "true" : "false"
|
|
25334
25421
|
}, [
|
|
25335
|
-
ie.value ? (B(), F("div",
|
|
25422
|
+
ie.value ? (B(), F("div", wD, [Re(t.$slots, "toolbar", je(Oe(ae.value)))])) : P("", !0),
|
|
25336
25423
|
I("div", {
|
|
25337
25424
|
ref_key: "mountRef",
|
|
25338
25425
|
ref: y,
|
|
@@ -25352,32 +25439,32 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
25352
25439
|
style: Me(xe.value),
|
|
25353
25440
|
role: "status",
|
|
25354
25441
|
"aria-live": "polite"
|
|
25355
|
-
}, [
|
|
25356
|
-
de.value ? (B(), F("div",
|
|
25442
|
+
}, [re.value ? Re(t.$slots, "status-bar", je(Oe(H(T))), void 0, void 0, 0) : (B(), F(Se, { key: 1 }, [
|
|
25443
|
+
de.value ? (B(), F("div", TD, [e.showDefaultStatusBarPanels ? (B(), we(QE, {
|
|
25357
25444
|
key: 0,
|
|
25358
25445
|
context: H(T)
|
|
25359
25446
|
}, null, 8, ["context"])) : P("", !0), Re(t.$slots, "status-bar-left", je(Oe(H(T))))])) : P("", !0),
|
|
25360
|
-
ge.value ? (B(), F("div",
|
|
25361
|
-
me.value ? (B(), we(
|
|
25447
|
+
ge.value ? (B(), F("div", ED)) : P("", !0),
|
|
25448
|
+
me.value ? (B(), we(aD, {
|
|
25362
25449
|
key: 2,
|
|
25363
25450
|
context: H(T)
|
|
25364
25451
|
}, null, 8, ["context"])) : P("", !0),
|
|
25365
|
-
_e.value ? (B(), F("div",
|
|
25452
|
+
_e.value ? (B(), F("div", DD)) : P("", !0),
|
|
25366
25453
|
n[0] ||= I("div", {
|
|
25367
25454
|
class: "mg-status-bar__stretch",
|
|
25368
25455
|
"aria-hidden": "true"
|
|
25369
25456
|
}, null, -1),
|
|
25370
|
-
M.value ? (B(), F("div",
|
|
25371
|
-
he.value ? (B(), we(
|
|
25457
|
+
M.value ? (B(), F("div", OD)) : P("", !0),
|
|
25458
|
+
he.value ? (B(), we(aD, {
|
|
25372
25459
|
key: 5,
|
|
25373
25460
|
context: H(T)
|
|
25374
25461
|
}, null, 8, ["context"])) : P("", !0),
|
|
25375
|
-
ye.value ? (B(), F("div",
|
|
25376
|
-
fe.value ? (B(), F("div",
|
|
25462
|
+
ye.value ? (B(), F("div", kD)) : P("", !0),
|
|
25463
|
+
fe.value ? (B(), F("div", AD, [Re(t.$slots, "status-bar-right", je(Oe(H(T))))])) : P("", !0)
|
|
25377
25464
|
], 64))], 4)) : P("", !0)
|
|
25378
|
-
], 14,
|
|
25465
|
+
], 14, CD));
|
|
25379
25466
|
}
|
|
25380
|
-
}),
|
|
25467
|
+
}), MD = {
|
|
25381
25468
|
"sliders-vertical": [
|
|
25382
25469
|
["path", { d: "M10 8h4" }],
|
|
25383
25470
|
["path", { d: "M12 21v-9" }],
|
|
@@ -25430,7 +25517,7 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
25430
25517
|
["path", { d: "M9 3v18" }],
|
|
25431
25518
|
["path", { d: "M15 3v18" }]
|
|
25432
25519
|
]
|
|
25433
|
-
},
|
|
25520
|
+
}, ND = {
|
|
25434
25521
|
class: "mg-column-settings-menu__icon-svg",
|
|
25435
25522
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25436
25523
|
viewBox: "0 0 24 24",
|
|
@@ -25440,17 +25527,17 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
25440
25527
|
"stroke-linecap": "round",
|
|
25441
25528
|
"stroke-linejoin": "round",
|
|
25442
25529
|
"aria-hidden": "true"
|
|
25443
|
-
},
|
|
25530
|
+
}, PD = /* @__PURE__ */ R({
|
|
25444
25531
|
__name: "ColumnSettingsMenuIcon",
|
|
25445
25532
|
props: { name: {} },
|
|
25446
25533
|
setup(e) {
|
|
25447
|
-
let t = e, n = N(() =>
|
|
25448
|
-
return (t, r) => (B(), F("svg",
|
|
25534
|
+
let t = e, n = N(() => MD[t.name]);
|
|
25535
|
+
return (t, r) => (B(), F("svg", ND, [(B(!0), F(Se, null, Le(n.value, ([t, n], r) => (B(), we(ze(t), ke({ key: `${e.name}-${t}-${r}` }, { ref_for: !0 }, n), null, 16))), 128))]));
|
|
25449
25536
|
}
|
|
25450
|
-
}),
|
|
25537
|
+
}), FD = {
|
|
25451
25538
|
key: 0,
|
|
25452
25539
|
class: "mg-column-settings-menu__item-icon"
|
|
25453
|
-
},
|
|
25540
|
+
}, ID = { class: "mg-column-settings-menu__item-label" }, LD = /* @__PURE__ */ R({
|
|
25454
25541
|
__name: "ColumnSettingsMenuItem",
|
|
25455
25542
|
props: { label: {} },
|
|
25456
25543
|
setup(e) {
|
|
@@ -25458,9 +25545,9 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
25458
25545
|
type: "button",
|
|
25459
25546
|
class: z(H(sf)),
|
|
25460
25547
|
role: "menuitem"
|
|
25461
|
-
}, [t.$slots.icon ? (B(), F("span",
|
|
25548
|
+
}, [t.$slots.icon ? (B(), F("span", FD, [Re(t.$slots, "icon")])) : P("", !0), I("span", ID, [Re(t.$slots, "default", {}, () => [Ee(Ve(e.label), 1)])])], 2));
|
|
25462
25549
|
}
|
|
25463
|
-
}),
|
|
25550
|
+
}), RD = ["aria-expanded"], zD = { class: "mg-column-settings-menu__item-leading" }, BD = { class: "mg-column-settings-menu__item-icon" }, VD = /* @__PURE__ */ R({
|
|
25464
25551
|
__name: "ColumnSettingsMenu",
|
|
25465
25552
|
props: { showDivider: { type: Boolean } },
|
|
25466
25553
|
emits: [
|
|
@@ -25528,11 +25615,11 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
25528
25615
|
class: z(H(of)),
|
|
25529
25616
|
role: "menu"
|
|
25530
25617
|
}, [
|
|
25531
|
-
L(
|
|
25618
|
+
L(LD, {
|
|
25532
25619
|
label: "列设置",
|
|
25533
25620
|
onClick: c
|
|
25534
25621
|
}, {
|
|
25535
|
-
icon: We(() => [L(
|
|
25622
|
+
icon: We(() => [L(PD, { name: "sliders-vertical" })]),
|
|
25536
25623
|
_: 1
|
|
25537
25624
|
}),
|
|
25538
25625
|
I("div", {
|
|
@@ -25549,7 +25636,7 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
25549
25636
|
role: "menuitem",
|
|
25550
25637
|
"aria-haspopup": "menu",
|
|
25551
25638
|
"aria-expanded": i.value
|
|
25552
|
-
}, [I("span",
|
|
25639
|
+
}, [I("span", zD, [I("span", BD, [L(PD, { name: "list-restart" })]), n[1] ||= I("span", { class: "mg-column-settings-menu__item-label" }, "重置", -1)]), n[2] ||= I("svg", {
|
|
25553
25640
|
class: "mg-column-settings-menu__item-chevron",
|
|
25554
25641
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25555
25642
|
viewBox: "0 0 24 24",
|
|
@@ -25559,17 +25646,17 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
25559
25646
|
"stroke-linecap": "round",
|
|
25560
25647
|
"stroke-linejoin": "round",
|
|
25561
25648
|
"aria-hidden": "true"
|
|
25562
|
-
}, [I("path", { d: "m9 18 6-6-6-6" })], -1)], 10,
|
|
25649
|
+
}, [I("path", { d: "m9 18 6-6-6-6" })], -1)], 10, RD), Ge(I("div", {
|
|
25563
25650
|
ref_key: "resetSubmenuPanelRef",
|
|
25564
25651
|
ref: s,
|
|
25565
25652
|
class: z([H(ff), { "mg-column-settings-menu__submenu-panel--flip": a.value }]),
|
|
25566
25653
|
role: "menu"
|
|
25567
|
-
}, [(B(), F(Se, null, Le(r, (e) => L(
|
|
25654
|
+
}, [(B(), F(Se, null, Le(r, (e) => L(LD, {
|
|
25568
25655
|
key: e.scope,
|
|
25569
25656
|
label: e.label,
|
|
25570
25657
|
onClick: (t) => p(e.scope)
|
|
25571
25658
|
}, {
|
|
25572
|
-
icon: We(() => [L(
|
|
25659
|
+
icon: We(() => [L(PD, { name: e.icon }, null, 8, ["name"])]),
|
|
25573
25660
|
_: 2
|
|
25574
25661
|
}, 1032, ["label", "onClick"])), 64))], 2), [[Ue, i.value]])], 34),
|
|
25575
25662
|
e.showDivider ? (B(), F("div", {
|
|
@@ -25585,11 +25672,11 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
25585
25672
|
}, [Re(t.$slots, "default")])) : P("", !0)
|
|
25586
25673
|
], 2));
|
|
25587
25674
|
}
|
|
25588
|
-
}),
|
|
25675
|
+
}), HD = [
|
|
25589
25676
|
"disabled",
|
|
25590
25677
|
"aria-disabled",
|
|
25591
25678
|
"title"
|
|
25592
|
-
],
|
|
25679
|
+
], UD = /* @__PURE__ */ R({
|
|
25593
25680
|
__name: "ColumnSettingsClearFiltersBar",
|
|
25594
25681
|
props: {
|
|
25595
25682
|
gridApi: {},
|
|
@@ -25608,12 +25695,12 @@ var gD = ["data-status-bar", "data-toolbar"], _D = {
|
|
|
25608
25695
|
"aria-disabled": !e.canClearAllFilters,
|
|
25609
25696
|
title: e.canClearAllFilters ? void 0 : "当前无筛选",
|
|
25610
25697
|
onClick: i
|
|
25611
|
-
}, " 清除全部筛选 ", 10,
|
|
25698
|
+
}, " 清除全部筛选 ", 10, HD));
|
|
25612
25699
|
}
|
|
25613
25700
|
});
|
|
25614
25701
|
//#endregion
|
|
25615
25702
|
//#region src/core/column/columnSettingsFilterApply.ts
|
|
25616
|
-
function
|
|
25703
|
+
function WD(e) {
|
|
25617
25704
|
let t = null, n = () => {
|
|
25618
25705
|
t != null && (clearTimeout(t), t = null);
|
|
25619
25706
|
};
|
|
@@ -25649,7 +25736,7 @@ function LD(e) {
|
|
|
25649
25736
|
}
|
|
25650
25737
|
//#endregion
|
|
25651
25738
|
//#region src/components/ColumnSettings/ColumnFilterPanelEmbed.vue
|
|
25652
|
-
var
|
|
25739
|
+
var GD = /* @__PURE__ */ R({
|
|
25653
25740
|
__name: "ColumnFilterPanelEmbed",
|
|
25654
25741
|
props: {
|
|
25655
25742
|
colId: {},
|
|
@@ -25659,7 +25746,7 @@ var RD = /* @__PURE__ */ R({
|
|
|
25659
25746
|
},
|
|
25660
25747
|
emits: ["change"],
|
|
25661
25748
|
setup(e, { emit: t }) {
|
|
25662
|
-
let n = e, r = t, i = V(null), a = null, o = null, s =
|
|
25749
|
+
let n = e, r = t, i = V(null), a = null, o = null, s = WD({
|
|
25663
25750
|
getFilterModel: () => n.gridApi.getFilterModel(),
|
|
25664
25751
|
setFilterModel: (e) => {
|
|
25665
25752
|
n.gridApi.setFilterModel(e), r("change");
|
|
@@ -25716,65 +25803,65 @@ var RD = /* @__PURE__ */ R({
|
|
|
25716
25803
|
});
|
|
25717
25804
|
//#endregion
|
|
25718
25805
|
//#region src/core/column/columnSettingsActions.ts
|
|
25719
|
-
function
|
|
25806
|
+
function KD(e) {
|
|
25720
25807
|
return e === null ? "asc" : e === "asc" ? "desc" : null;
|
|
25721
25808
|
}
|
|
25722
|
-
function
|
|
25809
|
+
function qD(e, t, n) {
|
|
25723
25810
|
return t === null ? Xx(e, n) : t === "asc" ? Jx(e, n) : Yx(e, n);
|
|
25724
25811
|
}
|
|
25725
|
-
function
|
|
25726
|
-
e.setSortModel(
|
|
25812
|
+
function JD(e, t, n) {
|
|
25813
|
+
e.setSortModel(qD(t, n, e.getSortModel()));
|
|
25727
25814
|
}
|
|
25728
|
-
function
|
|
25729
|
-
let r =
|
|
25730
|
-
return
|
|
25815
|
+
function YD(e, t, n) {
|
|
25816
|
+
let r = KD(n);
|
|
25817
|
+
return JD(e, t, r), r;
|
|
25731
25818
|
}
|
|
25732
|
-
function
|
|
25819
|
+
function XD(e, t, n) {
|
|
25733
25820
|
return e.setColumnFixed(t, n);
|
|
25734
25821
|
}
|
|
25735
|
-
function
|
|
25822
|
+
function ZD(e) {
|
|
25736
25823
|
return e === "asc" ? "升序" : e === "desc" ? "降序" : "无排序";
|
|
25737
25824
|
}
|
|
25738
|
-
function
|
|
25825
|
+
function QD(e) {
|
|
25739
25826
|
return e === "left" ? "固定左侧" : e === "right" ? "固定右侧" : "不固定";
|
|
25740
25827
|
}
|
|
25741
25828
|
//#endregion
|
|
25742
25829
|
//#region src/core/column/columnSettingsVisibility.ts
|
|
25743
|
-
var
|
|
25744
|
-
function
|
|
25830
|
+
var $D = "[magic-grid] ColumnSettings: at least one user column must remain visible.";
|
|
25831
|
+
function eO(e) {
|
|
25745
25832
|
return e.filter((e) => bf(e.colId) && xs(e)).length;
|
|
25746
25833
|
}
|
|
25747
|
-
function
|
|
25834
|
+
function tO(e) {
|
|
25748
25835
|
return e.filter((e) => bf(e.colId) && e.hidden).map((e) => e.colId);
|
|
25749
25836
|
}
|
|
25750
|
-
function
|
|
25837
|
+
function nO(e, t) {
|
|
25751
25838
|
if (!bf(e)) return !1;
|
|
25752
25839
|
let n = t.find((t) => t.colId === e);
|
|
25753
|
-
return !n || n.hidden ? !1 :
|
|
25840
|
+
return !n || n.hidden ? !1 : eO(t) > 1;
|
|
25754
25841
|
}
|
|
25755
|
-
function
|
|
25842
|
+
function rO(e, t, n, r = {}) {
|
|
25756
25843
|
let i = r.warn ?? ((e) => console.warn(e));
|
|
25757
|
-
return !n && !
|
|
25844
|
+
return !n && !nO(t, e.getColumns()) ? (i($D), !1) : e.setColumnsHidden([t], !n);
|
|
25758
25845
|
}
|
|
25759
|
-
function
|
|
25760
|
-
let t =
|
|
25846
|
+
function iO(e) {
|
|
25847
|
+
let t = tO(e.getColumns());
|
|
25761
25848
|
return t.length !== 0 && e.setColumnsHidden(t, !1);
|
|
25762
25849
|
}
|
|
25763
25850
|
//#endregion
|
|
25764
25851
|
//#region src/components/ColumnSettings/ColumnSettingsRow.vue?vue&type=script&setup=true&lang.ts
|
|
25765
|
-
var
|
|
25852
|
+
var aO = ["data-col-id"], oO = { class: "mg-column-settings__row-main" }, sO = [
|
|
25766
25853
|
"draggable",
|
|
25767
25854
|
"aria-disabled",
|
|
25768
25855
|
"title"
|
|
25769
|
-
],
|
|
25856
|
+
], cO = ["title"], lO = {
|
|
25770
25857
|
key: 1,
|
|
25771
25858
|
class: "mg-column-settings__row-actions"
|
|
25772
|
-
},
|
|
25859
|
+
}, uO = ["aria-label", "title"], dO = ["aria-expanded", "aria-label"], fO = ["aria-label"], pO = [
|
|
25773
25860
|
"aria-checked",
|
|
25774
25861
|
"aria-label",
|
|
25775
25862
|
"title",
|
|
25776
25863
|
"onClick"
|
|
25777
|
-
],
|
|
25864
|
+
], mO = ["title"], hO = ["checked", "aria-label"], gO = /* @__PURE__ */ R({
|
|
25778
25865
|
__name: "ColumnSettingsRow",
|
|
25779
25866
|
props: {
|
|
25780
25867
|
row: {},
|
|
@@ -25817,10 +25904,10 @@ var QD = ["data-col-id"], $D = { class: "mg-column-settings__row-main" }, eO = [
|
|
|
25817
25904
|
"right"
|
|
25818
25905
|
];
|
|
25819
25906
|
function o() {
|
|
25820
|
-
!n.gridApi || !n.row.sortable || (
|
|
25907
|
+
!n.gridApi || !n.row.sortable || (YD(n.gridApi, n.row.colId, n.row.sortDirection), r("change"));
|
|
25821
25908
|
}
|
|
25822
25909
|
function s(e) {
|
|
25823
|
-
!n.gridApi || n.row.fixed === e ||
|
|
25910
|
+
!n.gridApi || n.row.fixed === e || XD(n.gridApi, n.row.colId, e) && r("change");
|
|
25824
25911
|
}
|
|
25825
25912
|
function c() {
|
|
25826
25913
|
i.value = !i.value;
|
|
@@ -25828,7 +25915,7 @@ var QD = ["data-col-id"], $D = { class: "mg-column-settings__row-main" }, eO = [
|
|
|
25828
25915
|
function l(e) {
|
|
25829
25916
|
if (!n.gridApi) return;
|
|
25830
25917
|
let t = e.target, i = t.checked;
|
|
25831
|
-
if (!
|
|
25918
|
+
if (!rO(n.gridApi, n.row.colId, i)) {
|
|
25832
25919
|
t.checked = !i;
|
|
25833
25920
|
return;
|
|
25834
25921
|
}
|
|
@@ -25851,7 +25938,7 @@ var QD = ["data-col-id"], $D = { class: "mg-column-settings__row-main" }, eO = [
|
|
|
25851
25938
|
"mg-column-settings__row--dragging": e.dragging
|
|
25852
25939
|
}]),
|
|
25853
25940
|
"data-col-id": e.row.colId
|
|
25854
|
-
}, [I("div",
|
|
25941
|
+
}, [I("div", oO, [
|
|
25855
25942
|
e.showDragHandle ? (B(), F("span", {
|
|
25856
25943
|
key: 0,
|
|
25857
25944
|
class: z(["mg-column-settings__drag-handle", { "mg-column-settings__drag-handle--disabled": !e.draggable }]),
|
|
@@ -25860,12 +25947,12 @@ var QD = ["data-col-id"], $D = { class: "mg-column-settings__row-main" }, eO = [
|
|
|
25860
25947
|
title: e.draggable ? "拖拽调整列顺序" : "此列不可拖拽",
|
|
25861
25948
|
onDragstart: u,
|
|
25862
25949
|
onDragend: d
|
|
25863
|
-
}, " ≡ ", 42,
|
|
25950
|
+
}, " ≡ ", 42, sO)) : P("", !0),
|
|
25864
25951
|
I("span", {
|
|
25865
25952
|
class: "mg-column-settings__row-label",
|
|
25866
25953
|
title: e.row.label
|
|
25867
|
-
}, Ve(e.row.label), 9,
|
|
25868
|
-
e.gridApi ? (B(), F("div",
|
|
25954
|
+
}, Ve(e.row.label), 9, cO),
|
|
25955
|
+
e.gridApi ? (B(), F("div", lO, [
|
|
25869
25956
|
e.showSort && e.row.sortable ? (B(), F("button", {
|
|
25870
25957
|
key: 0,
|
|
25871
25958
|
type: "button",
|
|
@@ -25873,10 +25960,10 @@ var QD = ["data-col-id"], $D = { class: "mg-column-settings__row-main" }, eO = [
|
|
|
25873
25960
|
"mg-column-settings__sort-button--asc": e.row.sortDirection === "asc",
|
|
25874
25961
|
"mg-column-settings__sort-button--desc": e.row.sortDirection === "desc"
|
|
25875
25962
|
}]),
|
|
25876
|
-
"aria-label": `${e.row.label} 排序:${H(
|
|
25877
|
-
title: H(
|
|
25963
|
+
"aria-label": `${e.row.label} 排序:${H(ZD)(e.row.sortDirection)}`,
|
|
25964
|
+
title: H(ZD)(e.row.sortDirection),
|
|
25878
25965
|
onClick: o
|
|
25879
|
-
}, Ve(e.row.sortDirection === "asc" ? "↑" : e.row.sortDirection === "desc" ? "↓" : "↕"), 11,
|
|
25966
|
+
}, Ve(e.row.sortDirection === "asc" ? "↑" : e.row.sortDirection === "desc" ? "↓" : "↕"), 11, uO)) : P("", !0),
|
|
25880
25967
|
e.showFilter && e.row.filterable ? (B(), F("button", {
|
|
25881
25968
|
key: 1,
|
|
25882
25969
|
type: "button",
|
|
@@ -25901,7 +25988,7 @@ var QD = ["data-col-id"], $D = { class: "mg-column-settings__row-main" }, eO = [
|
|
|
25901
25988
|
I("path", { d: "M3 6h18" }),
|
|
25902
25989
|
I("path", { d: "M7 12h10" }),
|
|
25903
25990
|
I("path", { d: "M10 18h4" })
|
|
25904
|
-
], -1)]], 10,
|
|
25991
|
+
], -1)]], 10, dO)) : P("", !0),
|
|
25905
25992
|
e.showPin ? (B(), F("div", {
|
|
25906
25993
|
key: 2,
|
|
25907
25994
|
class: "mg-column-settings__pin-group",
|
|
@@ -25913,10 +26000,10 @@ var QD = ["data-col-id"], $D = { class: "mg-column-settings__row-main" }, eO = [
|
|
|
25913
26000
|
class: z(["mg-column-settings__pin-button", { "mg-column-settings__pin-button--active": e.row.fixed === t }]),
|
|
25914
26001
|
role: "radio",
|
|
25915
26002
|
"aria-checked": e.row.fixed === t,
|
|
25916
|
-
"aria-label": H(
|
|
25917
|
-
title: H(
|
|
26003
|
+
"aria-label": H(QD)(t),
|
|
26004
|
+
title: H(QD)(t),
|
|
25918
26005
|
onClick: (e) => s(t)
|
|
25919
|
-
}, Ve(t === "left" ? "左" : t === "right" ? "右" : "中"), 11,
|
|
26006
|
+
}, Ve(t === "left" ? "左" : t === "right" ? "右" : "中"), 11, pO)), 64))], 8, fO)) : P("", !0),
|
|
25920
26007
|
e.showVisibility ? (B(), F("label", {
|
|
25921
26008
|
key: 3,
|
|
25922
26009
|
class: "mg-column-settings__visibility",
|
|
@@ -25927,12 +26014,12 @@ var QD = ["data-col-id"], $D = { class: "mg-column-settings__row-main" }, eO = [
|
|
|
25927
26014
|
checked: !e.row.hidden,
|
|
25928
26015
|
"aria-label": `${e.row.label} 显示列`,
|
|
25929
26016
|
onChange: l
|
|
25930
|
-
}, null, 40,
|
|
26017
|
+
}, null, 40, hO), n[2] ||= I("span", {
|
|
25931
26018
|
class: "mg-column-settings__visibility-label",
|
|
25932
26019
|
"aria-hidden": "true"
|
|
25933
|
-
}, "显示", -1)], 8,
|
|
26020
|
+
}, "显示", -1)], 8, mO)) : P("", !0)
|
|
25934
26021
|
])) : P("", !0)
|
|
25935
|
-
]), i.value && e.gridApi && e.row.filterable ? (B(), we(
|
|
26022
|
+
]), i.value && e.gridApi && e.row.filterable ? (B(), we(GD, {
|
|
25936
26023
|
key: 0,
|
|
25937
26024
|
class: "mg-column-settings__filter-panel",
|
|
25938
26025
|
"col-id": e.row.colId,
|
|
@@ -25945,19 +26032,19 @@ var QD = ["data-col-id"], $D = { class: "mg-column-settings__row-main" }, eO = [
|
|
|
25945
26032
|
"grid-api",
|
|
25946
26033
|
"filter-set-value-mode",
|
|
25947
26034
|
"filter-set-date-layout-mode"
|
|
25948
|
-
])) : P("", !0)], 10,
|
|
26035
|
+
])) : P("", !0)], 10, aO));
|
|
25949
26036
|
}
|
|
25950
26037
|
});
|
|
25951
26038
|
//#endregion
|
|
25952
26039
|
//#region src/core/column/columnSettingsMove.ts
|
|
25953
|
-
function
|
|
26040
|
+
function _O(e, t) {
|
|
25954
26041
|
return bf(e.colId) && !e.hidden && xf(e.fixed) === t;
|
|
25955
26042
|
}
|
|
25956
|
-
function
|
|
25957
|
-
return e.filter((e) =>
|
|
26043
|
+
function vO(e, t) {
|
|
26044
|
+
return e.filter((e) => _O(e, t));
|
|
25958
26045
|
}
|
|
25959
|
-
function
|
|
25960
|
-
let i =
|
|
26046
|
+
function yO(e, t, n, r) {
|
|
26047
|
+
let i = vO(e, t), a = i.findIndex((e) => e.colId === n);
|
|
25961
26048
|
if (a < 0 || !e.find((e) => e.colId === n)?.movable) return null;
|
|
25962
26049
|
let o = Math.max(0, Math.min(r, i.length - 1));
|
|
25963
26050
|
if (a === o) return null;
|
|
@@ -25965,7 +26052,7 @@ function fO(e, t, n, r) {
|
|
|
25965
26052
|
s.splice(a, 1), s.splice(o, 0, n), e.map((e) => e.colId);
|
|
25966
26053
|
let c = [], l = 0;
|
|
25967
26054
|
for (let n of e) {
|
|
25968
|
-
if (
|
|
26055
|
+
if (_O(n, t)) {
|
|
25969
26056
|
let e = s[l];
|
|
25970
26057
|
if (!e) return null;
|
|
25971
26058
|
c.push(e), l += 1;
|
|
@@ -25975,8 +26062,8 @@ function fO(e, t, n, r) {
|
|
|
25975
26062
|
}
|
|
25976
26063
|
return c;
|
|
25977
26064
|
}
|
|
25978
|
-
function
|
|
25979
|
-
let t =
|
|
26065
|
+
function bO(e) {
|
|
26066
|
+
let t = yO(e.columns, e.lane, e.colId, e.toDisplayIndex);
|
|
25980
26067
|
if (!t) return null;
|
|
25981
26068
|
let n = e.columns.findIndex((t) => t.colId === e.colId);
|
|
25982
26069
|
if (n < 0) return null;
|
|
@@ -25997,8 +26084,8 @@ function pO(e) {
|
|
|
25997
26084
|
allowCrossLaneColumnMove: !1
|
|
25998
26085
|
}) ? null : r;
|
|
25999
26086
|
}
|
|
26000
|
-
function
|
|
26001
|
-
let i =
|
|
26087
|
+
function xO(e, t, n, r) {
|
|
26088
|
+
let i = bO({
|
|
26002
26089
|
columns: e.getColumns(),
|
|
26003
26090
|
lane: t,
|
|
26004
26091
|
colId: n,
|
|
@@ -26008,7 +26095,7 @@ function mO(e, t, n, r) {
|
|
|
26008
26095
|
}
|
|
26009
26096
|
//#endregion
|
|
26010
26097
|
//#region src/components/ColumnSettings/ColumnSettingsList.vue?vue&type=script&setup=true&lang.ts
|
|
26011
|
-
var
|
|
26098
|
+
var SO = ["aria-label"], CO = { class: "mg-column-settings__rows" }, wO = ["onDragover", "onDrop"], TO = /* @__PURE__ */ R({
|
|
26012
26099
|
__name: "ColumnSettingsList",
|
|
26013
26100
|
props: {
|
|
26014
26101
|
lane: {},
|
|
@@ -26041,7 +26128,7 @@ var hO = ["aria-label"], gO = { class: "mg-column-settings__rows" }, _O = ["onDr
|
|
|
26041
26128
|
u();
|
|
26042
26129
|
return;
|
|
26043
26130
|
}
|
|
26044
|
-
|
|
26131
|
+
xO(r.gridApi, r.lane, n, e) && (i("reorder"), i("change")), u();
|
|
26045
26132
|
}
|
|
26046
26133
|
function u() {
|
|
26047
26134
|
a.value = null, o.value = null;
|
|
@@ -26050,12 +26137,12 @@ var hO = ["aria-label"], gO = { class: "mg-column-settings__rows" }, _O = ["onDr
|
|
|
26050
26137
|
key: 0,
|
|
26051
26138
|
class: z([H(hf), `mg-column-settings__group--${e.lane}`]),
|
|
26052
26139
|
"aria-label": n[e.lane]
|
|
26053
|
-
}, [I("div",
|
|
26140
|
+
}, [I("div", CO, [(B(!0), F(Se, null, Le(e.rows, (t, n) => (B(), F("div", {
|
|
26054
26141
|
key: t.colId,
|
|
26055
26142
|
class: "mg-column-settings__row-host",
|
|
26056
26143
|
onDragover: (e) => c(n, e),
|
|
26057
26144
|
onDrop: (e) => l(n, e)
|
|
26058
|
-
}, [L(
|
|
26145
|
+
}, [L(gO, {
|
|
26059
26146
|
row: t,
|
|
26060
26147
|
"grid-api": e.gridApi,
|
|
26061
26148
|
draggable: t.movable,
|
|
@@ -26075,9 +26162,9 @@ var hO = ["aria-label"], gO = { class: "mg-column-settings__rows" }, _O = ["onDr
|
|
|
26075
26162
|
"show-filter",
|
|
26076
26163
|
"show-visibility",
|
|
26077
26164
|
"onDragstart"
|
|
26078
|
-
])], 40,
|
|
26165
|
+
])], 40, wO))), 128))])], 10, SO)) : P("", !0);
|
|
26079
26166
|
}
|
|
26080
|
-
}),
|
|
26167
|
+
}), EO = { class: "mg-column-settings__groups" }, DO = { class: "mg-column-settings__visible-lanes" }, OO = { class: "mg-column-settings__hidden-divider" }, kO = { class: "mg-column-settings__hidden-divider-center" }, AO = ["aria-expanded"], jO = {
|
|
26081
26168
|
key: 0,
|
|
26082
26169
|
class: "mg-column-settings__hidden-toggle-icon",
|
|
26083
26170
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -26090,7 +26177,7 @@ var hO = ["aria-label"], gO = { class: "mg-column-settings__rows" }, _O = ["onDr
|
|
|
26090
26177
|
"stroke-linecap": "round",
|
|
26091
26178
|
"stroke-linejoin": "round",
|
|
26092
26179
|
"aria-hidden": "true"
|
|
26093
|
-
},
|
|
26180
|
+
}, MO = {
|
|
26094
26181
|
key: 1,
|
|
26095
26182
|
class: "mg-column-settings__hidden-toggle-icon",
|
|
26096
26183
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -26103,7 +26190,7 @@ var hO = ["aria-label"], gO = { class: "mg-column-settings__rows" }, _O = ["onDr
|
|
|
26103
26190
|
"stroke-linecap": "round",
|
|
26104
26191
|
"stroke-linejoin": "round",
|
|
26105
26192
|
"aria-hidden": "true"
|
|
26106
|
-
},
|
|
26193
|
+
}, NO = { class: "mg-column-settings__hidden-rows" }, PO = { class: "mg-column-settings__rows" }, FO = /* @__PURE__ */ R({
|
|
26107
26194
|
__name: "ColumnSettingsGroupedLists",
|
|
26108
26195
|
props: {
|
|
26109
26196
|
grouped: {},
|
|
@@ -26118,10 +26205,10 @@ var hO = ["aria-label"], gO = { class: "mg-column-settings__rows" }, _O = ["onDr
|
|
|
26118
26205
|
setup(e, { emit: t }) {
|
|
26119
26206
|
let n = e, r = t, i = V(!0);
|
|
26120
26207
|
function a() {
|
|
26121
|
-
|
|
26208
|
+
iO(n.gridApi) && r("change");
|
|
26122
26209
|
}
|
|
26123
|
-
return (t, n) => (B(), F("div",
|
|
26124
|
-
L(
|
|
26210
|
+
return (t, n) => (B(), F("div", EO, [I("div", DO, [
|
|
26211
|
+
L(TO, {
|
|
26125
26212
|
lane: "left",
|
|
26126
26213
|
rows: e.grouped.left,
|
|
26127
26214
|
"grid-api": e.gridApi,
|
|
@@ -26135,7 +26222,7 @@ var hO = ["aria-label"], gO = { class: "mg-column-settings__rows" }, _O = ["onDr
|
|
|
26135
26222
|
"show-filter",
|
|
26136
26223
|
"show-visibility"
|
|
26137
26224
|
]),
|
|
26138
|
-
L(
|
|
26225
|
+
L(TO, {
|
|
26139
26226
|
lane: "center",
|
|
26140
26227
|
rows: e.grouped.center,
|
|
26141
26228
|
"grid-api": e.gridApi,
|
|
@@ -26149,7 +26236,7 @@ var hO = ["aria-label"], gO = { class: "mg-column-settings__rows" }, _O = ["onDr
|
|
|
26149
26236
|
"show-filter",
|
|
26150
26237
|
"show-visibility"
|
|
26151
26238
|
]),
|
|
26152
|
-
L(
|
|
26239
|
+
L(TO, {
|
|
26153
26240
|
lane: "right",
|
|
26154
26241
|
rows: e.grouped.right,
|
|
26155
26242
|
"grid-api": e.gridApi,
|
|
@@ -26166,17 +26253,17 @@ var hO = ["aria-label"], gO = { class: "mg-column-settings__rows" }, _O = ["onDr
|
|
|
26166
26253
|
]), e.grouped.hidden.length > 0 ? (B(), F("section", {
|
|
26167
26254
|
key: 0,
|
|
26168
26255
|
class: z(H(yf))
|
|
26169
|
-
}, [I("div",
|
|
26256
|
+
}, [I("div", OO, [
|
|
26170
26257
|
n[10] ||= I("span", {
|
|
26171
26258
|
class: "mg-column-settings__hidden-divider-line",
|
|
26172
26259
|
"aria-hidden": "true"
|
|
26173
26260
|
}, null, -1),
|
|
26174
|
-
I("div",
|
|
26261
|
+
I("div", kO, [I("button", {
|
|
26175
26262
|
type: "button",
|
|
26176
26263
|
class: "mg-column-settings__hidden-toggle",
|
|
26177
26264
|
"aria-expanded": i.value,
|
|
26178
26265
|
onClick: n[6] ||= (e) => i.value = !i.value
|
|
26179
|
-
}, [Ee(" 隐藏 (" + Ve(e.grouped.hidden.length) + ") ", 1), i.value ? (B(), F("svg",
|
|
26266
|
+
}, [Ee(" 隐藏 (" + Ve(e.grouped.hidden.length) + ") ", 1), i.value ? (B(), F("svg", jO, [...n[8] ||= [Te("<path d=\"m3 8 4-4 4 4\"></path><path d=\"M7 4v16\"></path><path d=\"M11 12h10\"></path><path d=\"M11 16h7\"></path><path d=\"M11 20h4\"></path>", 5)]])) : (B(), F("svg", MO, [...n[9] ||= [Te("<path d=\"m3 16 4 4 4-4\"></path><path d=\"M7 20V4\"></path><path d=\"M11 4h10\"></path><path d=\"M11 8h7\"></path><path d=\"M11 12h4\"></path>", 5)]]))], 8, AO), I("button", {
|
|
26180
26267
|
type: "button",
|
|
26181
26268
|
class: "mg-column-settings__hidden-show-all",
|
|
26182
26269
|
onClick: a
|
|
@@ -26185,7 +26272,7 @@ var hO = ["aria-label"], gO = { class: "mg-column-settings__rows" }, _O = ["onDr
|
|
|
26185
26272
|
class: "mg-column-settings__hidden-divider-line",
|
|
26186
26273
|
"aria-hidden": "true"
|
|
26187
26274
|
}, null, -1)
|
|
26188
|
-
]), Ge(I("div",
|
|
26275
|
+
]), Ge(I("div", NO, [I("h4", { class: z([H(gf), "mg-column-settings__sr-only"]) }, " 已隐藏列 ", 2), I("div", PO, [(B(!0), F(Se, null, Le(e.grouped.hidden, (t) => (B(), we(gO, {
|
|
26189
26276
|
key: t.colId,
|
|
26190
26277
|
row: t,
|
|
26191
26278
|
"grid-api": e.gridApi,
|
|
@@ -26204,7 +26291,7 @@ var hO = ["aria-label"], gO = { class: "mg-column-settings__rows" }, _O = ["onDr
|
|
|
26204
26291
|
});
|
|
26205
26292
|
//#endregion
|
|
26206
26293
|
//#region src/core/column/columnSettingsProjection.ts
|
|
26207
|
-
function
|
|
26294
|
+
function IO(e) {
|
|
26208
26295
|
return {
|
|
26209
26296
|
colId: e.colId,
|
|
26210
26297
|
label: e.label,
|
|
@@ -26216,20 +26303,20 @@ function kO(e) {
|
|
|
26216
26303
|
hidden: e.hidden
|
|
26217
26304
|
};
|
|
26218
26305
|
}
|
|
26219
|
-
function
|
|
26220
|
-
return e.map(
|
|
26306
|
+
function LO(e) {
|
|
26307
|
+
return e.map(IO);
|
|
26221
26308
|
}
|
|
26222
|
-
function
|
|
26309
|
+
function RO(e, t = {}) {
|
|
26223
26310
|
return wf({
|
|
26224
|
-
columns:
|
|
26311
|
+
columns: LO(e.getColumns()),
|
|
26225
26312
|
sortModel: e.getSortModel(),
|
|
26226
26313
|
filterModel: e.getFilterModel(),
|
|
26227
26314
|
isColumnFilterActive: (t) => e.isColumnFilterActive(t),
|
|
26228
26315
|
includeHidden: t.includeHidden
|
|
26229
26316
|
});
|
|
26230
26317
|
}
|
|
26231
|
-
function
|
|
26232
|
-
let n =
|
|
26318
|
+
function zO(e, t = {}) {
|
|
26319
|
+
let n = RO(e, t);
|
|
26233
26320
|
return {
|
|
26234
26321
|
rows: n,
|
|
26235
26322
|
grouped: Tf(n),
|
|
@@ -26238,22 +26325,22 @@ function MO(e, t = {}) {
|
|
|
26238
26325
|
}
|
|
26239
26326
|
//#endregion
|
|
26240
26327
|
//#region src/core/column/columnSettingsPanelSubscribe.ts
|
|
26241
|
-
var
|
|
26328
|
+
var BO = [
|
|
26242
26329
|
"sortChanged",
|
|
26243
26330
|
"filterChanged",
|
|
26244
26331
|
"columnMoved",
|
|
26245
26332
|
"columnPinned",
|
|
26246
26333
|
"columnHiddenChanged"
|
|
26247
26334
|
];
|
|
26248
|
-
function
|
|
26249
|
-
let n =
|
|
26335
|
+
function VO(e, t) {
|
|
26336
|
+
let n = BO.map((n) => e.on(n, t));
|
|
26250
26337
|
return () => {
|
|
26251
26338
|
for (let e of n) e();
|
|
26252
26339
|
};
|
|
26253
26340
|
}
|
|
26254
26341
|
//#endregion
|
|
26255
26342
|
//#region src/components/ColumnSettings/ColumnSettingsPanel.vue?vue&type=script&setup=true&lang.ts
|
|
26256
|
-
var
|
|
26343
|
+
var HO = { class: "mg-column-settings__header-leading" }, UO = /* @__PURE__ */ R({
|
|
26257
26344
|
__name: "ColumnSettingsPanel",
|
|
26258
26345
|
props: {
|
|
26259
26346
|
gridApi: {},
|
|
@@ -26272,12 +26359,12 @@ var FO = { class: "mg-column-settings__header-leading" }, IO = /* @__PURE__ */ R
|
|
|
26272
26359
|
},
|
|
26273
26360
|
emits: ["close"],
|
|
26274
26361
|
setup(e, { emit: t }) {
|
|
26275
|
-
let n = e, r = t, i = Be(
|
|
26362
|
+
let n = e, r = t, i = Be(zO(n.gridApi)), a = null;
|
|
26276
26363
|
function o() {
|
|
26277
|
-
i.value =
|
|
26364
|
+
i.value = zO(n.gridApi);
|
|
26278
26365
|
}
|
|
26279
26366
|
function s() {
|
|
26280
|
-
c(), o(), a =
|
|
26367
|
+
c(), o(), a = VO(n.gridApi, o);
|
|
26281
26368
|
}
|
|
26282
26369
|
function c() {
|
|
26283
26370
|
a?.(), a = null;
|
|
@@ -26300,7 +26387,7 @@ var FO = { class: "mg-column-settings__header-leading" }, IO = /* @__PURE__ */ R
|
|
|
26300
26387
|
class: z(H($d)),
|
|
26301
26388
|
role: "document",
|
|
26302
26389
|
"aria-label": "列设置"
|
|
26303
|
-
}, [I("header", { class: z(H(ef)) }, [I("div",
|
|
26390
|
+
}, [I("header", { class: z(H(ef)) }, [I("div", HO, [n[1] ||= Te("<div class=\"mg-column-settings__title-group\"><svg class=\"mg-column-settings__title-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M10 8h4\"></path><path d=\"M12 21v-9\"></path><path d=\"M12 8V3\"></path><path d=\"M17 16h4\"></path><path d=\"M19 12V3\"></path><path d=\"M19 21v-5\"></path><path d=\"M3 14h4\"></path><path d=\"M5 10V3\"></path><path d=\"M5 21v-7\"></path></svg><h3 class=\"mg-column-settings__title\">列设置</h3></div>", 1), L(UD, {
|
|
26304
26391
|
"grid-api": e.gridApi,
|
|
26305
26392
|
"can-clear-all-filters": i.value.canClearAllFilters,
|
|
26306
26393
|
onChange: l
|
|
@@ -26309,7 +26396,7 @@ var FO = { class: "mg-column-settings__header-leading" }, IO = /* @__PURE__ */ R
|
|
|
26309
26396
|
class: "mg-column-settings__close",
|
|
26310
26397
|
"aria-label": "关闭列设置",
|
|
26311
26398
|
onClick: n[0] ||= (e) => r("close")
|
|
26312
|
-
}, " × ")], 2), I("div", { class: z(H(tf)) }, [L(
|
|
26399
|
+
}, " × ")], 2), I("div", { class: z(H(tf)) }, [L(FO, {
|
|
26313
26400
|
grouped: i.value.grouped,
|
|
26314
26401
|
"grid-api": e.gridApi,
|
|
26315
26402
|
"show-filter": e.showFilter,
|
|
@@ -26326,50 +26413,50 @@ var FO = { class: "mg-column-settings__header-leading" }, IO = /* @__PURE__ */ R
|
|
|
26326
26413
|
});
|
|
26327
26414
|
//#endregion
|
|
26328
26415
|
//#region src/core/column/columnSettingsReset.ts
|
|
26329
|
-
function
|
|
26416
|
+
function WO(e) {
|
|
26330
26417
|
e.getSortModel().length !== 0 && e.setSortModel([]);
|
|
26331
26418
|
}
|
|
26332
|
-
function
|
|
26419
|
+
function GO(e) {
|
|
26333
26420
|
e.clearAllFilters();
|
|
26334
26421
|
}
|
|
26335
|
-
function
|
|
26422
|
+
function KO(e) {
|
|
26336
26423
|
e.resetColumnWidths();
|
|
26337
26424
|
}
|
|
26338
|
-
function
|
|
26425
|
+
function qO(e) {
|
|
26339
26426
|
let t = e.getColumns(), n = aE(t);
|
|
26340
26427
|
oE(t.map((e) => e.colId), n) || e.resetColumnOrder();
|
|
26341
26428
|
}
|
|
26342
|
-
function
|
|
26429
|
+
function JO(e) {
|
|
26343
26430
|
for (let t of e.getColumns()) !bf(t.colId) || t.fixed === null || e.setColumnFixed(t.colId, null);
|
|
26344
26431
|
}
|
|
26345
|
-
function
|
|
26432
|
+
function YO(e, t) {
|
|
26346
26433
|
switch (t) {
|
|
26347
26434
|
case "sort":
|
|
26348
|
-
|
|
26435
|
+
WO(e);
|
|
26349
26436
|
break;
|
|
26350
26437
|
case "filter":
|
|
26351
|
-
|
|
26438
|
+
GO(e);
|
|
26352
26439
|
break;
|
|
26353
26440
|
case "width":
|
|
26354
|
-
|
|
26441
|
+
KO(e);
|
|
26355
26442
|
break;
|
|
26356
26443
|
case "order":
|
|
26357
|
-
|
|
26444
|
+
qO(e);
|
|
26358
26445
|
break;
|
|
26359
26446
|
case "pin":
|
|
26360
|
-
|
|
26447
|
+
JO(e);
|
|
26361
26448
|
break;
|
|
26362
|
-
case "all":
|
|
26449
|
+
case "all": WO(e), GO(e), KO(e), qO(e), JO(e);
|
|
26363
26450
|
}
|
|
26364
26451
|
}
|
|
26365
26452
|
//#endregion
|
|
26366
26453
|
//#region src/components/ColumnSettings/ColumnSettingsButton.vue?vue&type=script&setup=true&lang.ts
|
|
26367
|
-
var
|
|
26454
|
+
var XO = [
|
|
26368
26455
|
"disabled",
|
|
26369
26456
|
"aria-expanded",
|
|
26370
26457
|
"aria-label",
|
|
26371
26458
|
"title"
|
|
26372
|
-
],
|
|
26459
|
+
], ZO = /* @__PURE__ */ R({
|
|
26373
26460
|
__name: "ColumnSettingsButton",
|
|
26374
26461
|
props: {
|
|
26375
26462
|
gridApi: {},
|
|
@@ -26431,7 +26518,7 @@ var UO = [
|
|
|
26431
26518
|
_(!0);
|
|
26432
26519
|
}
|
|
26433
26520
|
function ee(e) {
|
|
26434
|
-
|
|
26521
|
+
YO(n.gridApi, e), S();
|
|
26435
26522
|
}
|
|
26436
26523
|
function x() {
|
|
26437
26524
|
l.value && _(!1);
|
|
@@ -26479,7 +26566,7 @@ var UO = [
|
|
|
26479
26566
|
U([c, l], () => {
|
|
26480
26567
|
D();
|
|
26481
26568
|
});
|
|
26482
|
-
function
|
|
26569
|
+
function ne(e) {
|
|
26483
26570
|
if (e.key === "Escape") {
|
|
26484
26571
|
if (l.value) {
|
|
26485
26572
|
e.preventDefault(), e.stopPropagation(), x();
|
|
@@ -26488,15 +26575,15 @@ var UO = [
|
|
|
26488
26575
|
c.value && (e.preventDefault(), e.stopPropagation(), S());
|
|
26489
26576
|
}
|
|
26490
26577
|
}
|
|
26491
|
-
function
|
|
26578
|
+
function re(e) {
|
|
26492
26579
|
if (!c.value && !l.value || d || e.button !== 0) return;
|
|
26493
26580
|
let t = e.target;
|
|
26494
26581
|
t instanceof Node && (a.value?.contains(t) || o.value?.contains(t) || s.value?.contains(t) || C());
|
|
26495
26582
|
}
|
|
26496
26583
|
return Pe(() => {
|
|
26497
|
-
D(), document.addEventListener("keydown",
|
|
26584
|
+
D(), document.addEventListener("keydown", ne, !0), document.addEventListener("pointerdown", re, !0), window.addEventListener("resize", E), window.addEventListener("scroll", E, !0);
|
|
26498
26585
|
}), Ne(() => {
|
|
26499
|
-
c.value = !1, l.value = !1, D(), document.removeEventListener("keydown",
|
|
26586
|
+
c.value = !1, l.value = !1, D(), document.removeEventListener("keydown", ne, !0), document.removeEventListener("pointerdown", re, !0), window.removeEventListener("resize", E), window.removeEventListener("scroll", E, !0);
|
|
26500
26587
|
}), (t, n) => (B(), F("div", {
|
|
26501
26588
|
class: z(H(nf)),
|
|
26502
26589
|
style: Me(g.value)
|
|
@@ -26525,7 +26612,7 @@ var UO = [
|
|
|
26525
26612
|
cx: "12",
|
|
26526
26613
|
cy: "12",
|
|
26527
26614
|
r: "3"
|
|
26528
|
-
})], -1)]], 8,
|
|
26615
|
+
})], -1)]], 8, XO), (B(), we(Ce, {
|
|
26529
26616
|
key: u.value,
|
|
26530
26617
|
to: p.value
|
|
26531
26618
|
}, [c.value ? (B(), F("div", {
|
|
@@ -26535,7 +26622,7 @@ var UO = [
|
|
|
26535
26622
|
ref_key: "menuRef",
|
|
26536
26623
|
ref: o,
|
|
26537
26624
|
class: z(H(af))
|
|
26538
|
-
}, [L(
|
|
26625
|
+
}, [L(VD, {
|
|
26539
26626
|
"show-divider": m.value,
|
|
26540
26627
|
onColumnSettings: b,
|
|
26541
26628
|
onCustomAction: S,
|
|
@@ -26553,7 +26640,7 @@ var UO = [
|
|
|
26553
26640
|
role: "dialog",
|
|
26554
26641
|
"aria-modal": "false",
|
|
26555
26642
|
"aria-label": "列设置面板"
|
|
26556
|
-
}, [L(
|
|
26643
|
+
}, [L(UO, {
|
|
26557
26644
|
"grid-api": e.gridApi,
|
|
26558
26645
|
open: l.value,
|
|
26559
26646
|
"show-visibility": e.showVisibility,
|
|
@@ -26566,7 +26653,7 @@ var UO = [
|
|
|
26566
26653
|
"show-filter"
|
|
26567
26654
|
])], 2)], 2)) : P("", !0)], 8, ["to"]))], 6));
|
|
26568
26655
|
}
|
|
26569
|
-
}),
|
|
26656
|
+
}), QO = {
|
|
26570
26657
|
input: {
|
|
26571
26658
|
deferEnterCommit: !1,
|
|
26572
26659
|
commitOnChange: !1
|
|
@@ -26576,28 +26663,28 @@ var UO = [
|
|
|
26576
26663
|
commitOnChange: !0
|
|
26577
26664
|
}
|
|
26578
26665
|
};
|
|
26579
|
-
async function
|
|
26666
|
+
async function $O(e) {
|
|
26580
26667
|
e && await e();
|
|
26581
26668
|
}
|
|
26582
|
-
function
|
|
26583
|
-
let n =
|
|
26669
|
+
function ek(e, t) {
|
|
26670
|
+
let n = QO[t.strategy ?? "input"], r = t.formatValue ?? ((e) => String(e ?? "")), i = t.commitOnChange ?? n.commitOnChange;
|
|
26584
26671
|
Pe(() => {
|
|
26585
26672
|
e.setGetValue?.(() => r(t.getValue())), e.setKeyboardPolicy?.({ deferEnterCommit: n.deferEnterCommit }), (async () => {
|
|
26586
|
-
await
|
|
26673
|
+
await $O(t.onMount), e.autoFocus !== !1 && await $O(t.onStart);
|
|
26587
26674
|
})();
|
|
26588
26675
|
}), Fe(() => {
|
|
26589
|
-
|
|
26676
|
+
$O(t.onDestroy);
|
|
26590
26677
|
});
|
|
26591
26678
|
function a() {
|
|
26592
26679
|
(async () => {
|
|
26593
|
-
await
|
|
26680
|
+
await $O(t.onBeforeCommit);
|
|
26594
26681
|
let n = await e.stopEditing(!0);
|
|
26595
|
-
n != null && n.committed === !0 && await
|
|
26682
|
+
n != null && n.committed === !0 && await $O(t.onAfterCommit);
|
|
26596
26683
|
})();
|
|
26597
26684
|
}
|
|
26598
26685
|
function o() {
|
|
26599
26686
|
(async () => {
|
|
26600
|
-
await
|
|
26687
|
+
await $O(t.onBeforeCancel), await e.stopEditing(!1) != null && await $O(t.onAfterCancel);
|
|
26601
26688
|
})();
|
|
26602
26689
|
}
|
|
26603
26690
|
function s() {
|
|
@@ -26621,16 +26708,16 @@ function qO(e, t) {
|
|
|
26621
26708
|
}
|
|
26622
26709
|
//#endregion
|
|
26623
26710
|
//#region src/components/MagicGrid/useGridApi.ts
|
|
26624
|
-
function
|
|
26711
|
+
function tk(e) {
|
|
26625
26712
|
return N(() => e.value?.api);
|
|
26626
26713
|
}
|
|
26627
26714
|
//#endregion
|
|
26628
26715
|
//#region src/components/MagicGrid/useGridLifecycle.ts
|
|
26629
|
-
function
|
|
26716
|
+
function nk(e) {
|
|
26630
26717
|
let t = {};
|
|
26631
26718
|
return e.onReady && (t["onGrid-ready"] = e.onReady), e.onDestroyed && (t["onGrid-destroyed"] = e.onDestroyed), e.onFirstRendered && (t["onFirst-rendered"] = e.onFirstRendered), t;
|
|
26632
26719
|
}
|
|
26633
26720
|
//#endregion
|
|
26634
|
-
export { _t as BUILTIN_CELL_EDITOR_NAMES, Ya as COLUMN_DRAG_THRESHOLD_PX,
|
|
26721
|
+
export { _t as BUILTIN_CELL_EDITOR_NAMES, Ya as COLUMN_DRAG_THRESHOLD_PX, ZO as ColumnSettingsButton, PD as ColumnSettingsMenuIcon, LD as ColumnSettingsMenuItem, UO as ColumnSettingsPanel, j as DEFAULT_CELL_EDITOR_MODE, o as DEFAULT_INDEX_COLUMN_START, d as DEFAULT_SELECTION_SELECT_ALL_LABEL, $E as DEFAULT_STATUS_BAR_RANGE_AGGREGATION_PRECISION, u as INDEX_COLUMN_ID, l as INDEX_COLUMN_MIN_WIDTH, zt as INLINE_CHECKBOX_CLASS, Bt as INLINE_SWITCH_CLASS, jD as MagicGrid, pe as RowMutationPersistError, g as SELECTION_COLUMN_DEFAULT_WIDTH, ge as SELECTION_COLUMN_ID, t as SELECTION_COLUMN_MIN_WIDTH, Xa as SORT_AFTER_MOVE_GUARD_MS, Vt as SWITCH_EDITOR_CLASS, gD as VueCellEditorHost, qt as checkboxCellEditor, Pt as coerceCheckboxEditorValue, Dt as coerceSwitchEditorValue, Dt as coerceToggleEditorValue, vD as createSlotCellEditor, _D as createVueCellEditor, VE as evaluateGridAcceptance, Ft as formatCheckboxEditorRawValue, kt as formatSwitchEditorRawValue, _ as generateFocusedRowIds, n as generateRowId, me as generateSelectedRowIds, tn as getCellEditor, BE as getGridAcceptanceThresholds, zE as getGridSetDataLimit, rn as getRegisteredCellEditorNames, de as getRowDragCommitHierarchy, nn as hasCellEditor, vt as isBuiltInCellEditor, O as isInlineEditorColumn, m as isSyntheticRow, Kt as numberCellEditor, Lt as parseCheckboxEditorRawValue, jt as parseSwitchEditorRawValue, It as readCheckboxControlValue, At as readSwitchControlValue, $t as registerCellEditor, dt as registerEditorSurfaceSelectors, ft as resetEditorSurfaceSelectors, re as resolveCellEditorMode, Nt as resolveCheckboxEditorValues, C as resolveColumnCellEditorMode, wt as resolveSwitchEditorValues, Jt as switchCellEditor, Gt as textCellEditor, e as toBusinessRowId, f as toBusinessRowIdFromInternal, p as toBusinessRowIdsFromInternal, SC as toggleHeaderSort, en as unregisterCellEditor, ek as useCellEditor, tk as useGridApi, nk as useGridLifecycle };
|
|
26635
26722
|
|
|
26636
26723
|
//# sourceMappingURL=index.es.js.map
|