@taocompany/magic-grid 0.4.0 → 0.4.2
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/components/ColumnSettings/ColumnFilterPanelEmbed.vue.d.ts.map +1 -1
- package/dist/components/ColumnSettings/ColumnSettingsClearFiltersBar.vue.d.ts.map +1 -1
- package/dist/components/ColumnSettings/ColumnSettingsGroupedLists.vue.d.ts.map +1 -1
- package/dist/components/ColumnSettings/ColumnSettingsList.vue.d.ts.map +1 -1
- package/dist/components/ColumnSettings/ColumnSettingsPanel.vue.d.ts.map +1 -1
- package/dist/components/ColumnSettings/ColumnSettingsRow.vue.d.ts.map +1 -1
- package/dist/core/grid/gridInteraction/columnHeaderDragSession.d.ts +8 -2
- package/dist/core/grid/gridInteraction/columnHeaderDragSession.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +153 -145
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -15900,7 +15900,10 @@ var nx = class {
|
|
|
15900
15900
|
active: !1,
|
|
15901
15901
|
didMove: !1,
|
|
15902
15902
|
lastDropTarget: null,
|
|
15903
|
-
lastLiveMovePointerX: null
|
|
15903
|
+
lastLiveMovePointerX: null,
|
|
15904
|
+
ghostOffsetX: 0,
|
|
15905
|
+
ghostTop: 0,
|
|
15906
|
+
dragDirection: "right"
|
|
15904
15907
|
}, document.addEventListener("mousemove", this.handleMove), document.addEventListener("mouseup", this.handleEnd));
|
|
15905
15908
|
}
|
|
15906
15909
|
end(e) {
|
|
@@ -15919,22 +15922,25 @@ var nx = class {
|
|
|
15919
15922
|
if (!t.active) {
|
|
15920
15923
|
if (Math.abs(n) <= 5 || Math.abs(n) < Math.abs(r)) return;
|
|
15921
15924
|
t.active = !0, t.didMove = !0, this.deps.suppressMoveWhenColumnDragging() || this.deps.setColumnMoveLiveDragging(!0), this.refreshSourceCell(t);
|
|
15922
|
-
let
|
|
15925
|
+
let i = this.resolveSourceCellRect(t), a = this.deps.columnModel.getColumnById(t.colId);
|
|
15926
|
+
t.ghostOffsetX = e.clientX - i.left, t.ghostTop = i.bottom;
|
|
15927
|
+
let o = this.resolveGhostPositionAtPointer(e.clientX, t);
|
|
15923
15928
|
this.deps.columnDragController.setColumnMoving(t.colId);
|
|
15924
|
-
let
|
|
15925
|
-
|
|
15926
|
-
label:
|
|
15927
|
-
width:
|
|
15928
|
-
height:
|
|
15929
|
-
left:
|
|
15930
|
-
top:
|
|
15929
|
+
let s = this.resolveSourceCell(t);
|
|
15930
|
+
s?.isConnected && (t.sourceCell = s, this.deps.columnDragController.setSourceHeaderDragging(s, !0)), this.deps.columnDragController.setHeaderViewportDragging(this.deps.headerViewportEl, !0), this.deps.columnDragController.startGhost({
|
|
15931
|
+
label: a?.label ?? a?.prop ?? t.colId,
|
|
15932
|
+
width: i.width,
|
|
15933
|
+
height: i.height,
|
|
15934
|
+
left: o.left,
|
|
15935
|
+
top: o.top,
|
|
15931
15936
|
mountEl: this.deps.mountEl
|
|
15932
15937
|
});
|
|
15933
15938
|
}
|
|
15934
|
-
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
|
|
15939
|
+
t.dragDirection = e.clientX >= t.startX ? "right" : "left";
|
|
15940
|
+
let i = this.resolveGhostPositionAtPointer(e.clientX, t);
|
|
15941
|
+
this.deps.columnDragController.moveGhost(i.left, i.top), t.pointerX = e.clientX, this.shouldSkipRenderAtPointerAtScrollBoundary(e.clientX, t) || this.renderAtPointer(t, e.clientX);
|
|
15942
|
+
let a = this.resolveScrollHost(t), [o, s] = this.getScrollBounds(t), c = Xb(t.pointerX, o, s);
|
|
15943
|
+
c !== 0 && this.canHostScrollBy(a, c) && Zb(t.pointerX, o, s) && this.ensureEdgeScrollLoop();
|
|
15938
15944
|
};
|
|
15939
15945
|
handleEnd = (e) => {
|
|
15940
15946
|
let t = this.drag;
|
|
@@ -15995,12 +16001,17 @@ var nx = class {
|
|
|
15995
16001
|
resolveHeaderLaneEl(e) {
|
|
15996
16002
|
return e === "left" ? this.deps.headerLeftLaneEl : e === "right" ? this.deps.headerRightLaneEl : this.deps.headerCenterLaneEl;
|
|
15997
16003
|
}
|
|
15998
|
-
|
|
16004
|
+
resolveGhostPositionAtPointer(e, t) {
|
|
15999
16005
|
return {
|
|
16000
|
-
left: e.
|
|
16001
|
-
top:
|
|
16006
|
+
left: e - t.ghostOffsetX,
|
|
16007
|
+
top: t.ghostTop
|
|
16002
16008
|
};
|
|
16003
16009
|
}
|
|
16010
|
+
constrainDropTargetByDragDirection(e, t) {
|
|
16011
|
+
if (!e) return null;
|
|
16012
|
+
let n = this.deps.columnModel.getColumns().findIndex((e) => e.colId === t.colId);
|
|
16013
|
+
return n < 0 ? e : t.dragDirection === "left" && e.globalIndex >= n || t.dragDirection === "right" && e.globalIndex <= n ? null : e;
|
|
16014
|
+
}
|
|
16004
16015
|
isSameDropTarget(e, t) {
|
|
16005
16016
|
return !e || !t ? e === t : e.globalIndex === t.globalIndex && e.toFixed === t.toFixed;
|
|
16006
16017
|
}
|
|
@@ -16151,9 +16162,10 @@ var nx = class {
|
|
|
16151
16162
|
laneRectLeft: a.left,
|
|
16152
16163
|
laneRectRight: a.right,
|
|
16153
16164
|
targetFixed: n.fixed,
|
|
16165
|
+
sourceColId: t.colId,
|
|
16154
16166
|
laneHeaderCells: s
|
|
16155
16167
|
});
|
|
16156
|
-
if (n.fixed === null && this.deps.viewportEl.scrollLeft > 0 && o) return o;
|
|
16168
|
+
if (n.fixed === null && this.deps.viewportEl.scrollLeft > 0 && o) return this.constrainDropTargetByDragDirection(o, t);
|
|
16157
16169
|
let l = r.findIndex((e) => e.colId === t.colId);
|
|
16158
16170
|
return o && c && l >= 0 && c.globalIndex === l && o.globalIndex !== l && Ai({
|
|
16159
16171
|
columns: r,
|
|
@@ -16162,7 +16174,7 @@ var nx = class {
|
|
|
16162
16174
|
fixedGroups: i,
|
|
16163
16175
|
toFixed: o.toFixed,
|
|
16164
16176
|
allowCrossLaneColumnMove: this.deps.allowCrossLaneColumnMove()
|
|
16165
|
-
}) ? o : c ?? o;
|
|
16177
|
+
}) ? this.constrainDropTargetByDragDirection(o, t) : this.constrainDropTargetByDragDirection(c ?? o, t);
|
|
16166
16178
|
}
|
|
16167
16179
|
};
|
|
16168
16180
|
//#endregion
|
|
@@ -23338,7 +23350,7 @@ var dw = ["data-status-bar", "data-toolbar"], fw = {
|
|
|
23338
23350
|
"disabled",
|
|
23339
23351
|
"aria-disabled",
|
|
23340
23352
|
"title"
|
|
23341
|
-
], jw =
|
|
23353
|
+
], jw = /* @__PURE__ */ g({
|
|
23342
23354
|
__name: "ColumnSettingsClearFiltersBar",
|
|
23343
23355
|
props: {
|
|
23344
23356
|
gridApi: {},
|
|
@@ -23359,14 +23371,10 @@ var dw = ["data-status-bar", "data-toolbar"], fw = {
|
|
|
23359
23371
|
onClick: i
|
|
23360
23372
|
}, " 清除全部筛选 ", 10, Aw));
|
|
23361
23373
|
}
|
|
23362
|
-
})
|
|
23363
|
-
let n = e.__vccOpts || e;
|
|
23364
|
-
for (let [e, r] of t) n[e] = r;
|
|
23365
|
-
return n;
|
|
23366
|
-
}, Nw = /*#__PURE__*/ Mw(jw, [["__scopeId", "data-v-1c8bd037"]]);
|
|
23374
|
+
});
|
|
23367
23375
|
//#endregion
|
|
23368
23376
|
//#region src/core/column/columnSettingsFilterApply.ts
|
|
23369
|
-
function
|
|
23377
|
+
function Mw(e) {
|
|
23370
23378
|
let t = null, n = () => {
|
|
23371
23379
|
t != null && (clearTimeout(t), t = null);
|
|
23372
23380
|
};
|
|
@@ -23402,7 +23410,7 @@ function Pw(e) {
|
|
|
23402
23410
|
}
|
|
23403
23411
|
//#endregion
|
|
23404
23412
|
//#region src/components/ColumnSettings/ColumnFilterPanelEmbed.vue
|
|
23405
|
-
var
|
|
23413
|
+
var Nw = /* @__PURE__ */ g({
|
|
23406
23414
|
__name: "ColumnFilterPanelEmbed",
|
|
23407
23415
|
props: {
|
|
23408
23416
|
colId: {},
|
|
@@ -23412,7 +23420,7 @@ var Fw = /*#__PURE__*/ Mw(/* @__PURE__ */ g({
|
|
|
23412
23420
|
},
|
|
23413
23421
|
emits: ["change"],
|
|
23414
23422
|
setup(e, { emit: t }) {
|
|
23415
|
-
let n = e, r = t, i = D(null), a = null, o = null, s =
|
|
23423
|
+
let n = e, r = t, i = D(null), a = null, o = null, s = Mw({
|
|
23416
23424
|
getFilterModel: () => n.gridApi.getFilterModel(),
|
|
23417
23425
|
setFilterModel: (e) => {
|
|
23418
23426
|
n.gridApi.setFilterModel(e), r("change");
|
|
@@ -23466,68 +23474,68 @@ var Fw = /*#__PURE__*/ Mw(/* @__PURE__ */ g({
|
|
|
23466
23474
|
class: "mg-column-settings__filter-embed"
|
|
23467
23475
|
}, null, 512));
|
|
23468
23476
|
}
|
|
23469
|
-
})
|
|
23477
|
+
});
|
|
23470
23478
|
//#endregion
|
|
23471
23479
|
//#region src/core/column/columnSettingsActions.ts
|
|
23472
|
-
function
|
|
23480
|
+
function Pw(e) {
|
|
23473
23481
|
return e === null ? "asc" : e === "asc" ? "desc" : null;
|
|
23474
23482
|
}
|
|
23475
|
-
function
|
|
23483
|
+
function Fw(e, t, n) {
|
|
23476
23484
|
return t === null ? Xv(e, n) : t === "asc" ? Jv(e, n) : Yv(e, n);
|
|
23477
23485
|
}
|
|
23478
|
-
function
|
|
23479
|
-
e.setSortModel(
|
|
23486
|
+
function Iw(e, t, n) {
|
|
23487
|
+
e.setSortModel(Fw(t, n, e.getSortModel()));
|
|
23480
23488
|
}
|
|
23481
|
-
function
|
|
23482
|
-
let r =
|
|
23483
|
-
return
|
|
23489
|
+
function Lw(e, t, n) {
|
|
23490
|
+
let r = Pw(n);
|
|
23491
|
+
return Iw(e, t, r), r;
|
|
23484
23492
|
}
|
|
23485
|
-
function
|
|
23493
|
+
function Rw(e, t, n) {
|
|
23486
23494
|
return e.setColumnFixed(t, n);
|
|
23487
23495
|
}
|
|
23488
|
-
function
|
|
23496
|
+
function zw(e) {
|
|
23489
23497
|
return e === "asc" ? "升序" : e === "desc" ? "降序" : "无排序";
|
|
23490
23498
|
}
|
|
23491
|
-
function
|
|
23499
|
+
function Bw(e) {
|
|
23492
23500
|
return e === "left" ? "固定左侧" : e === "right" ? "固定右侧" : "不固定";
|
|
23493
23501
|
}
|
|
23494
23502
|
//#endregion
|
|
23495
23503
|
//#region src/core/column/columnSettingsVisibility.ts
|
|
23496
|
-
var
|
|
23497
|
-
function
|
|
23504
|
+
var Vw = "[magic-grid] ColumnSettings: at least one user column must remain visible.";
|
|
23505
|
+
function Hw(e) {
|
|
23498
23506
|
return e.filter((e) => ed(e.colId) && _o(e)).length;
|
|
23499
23507
|
}
|
|
23500
|
-
function
|
|
23508
|
+
function Uw(e) {
|
|
23501
23509
|
return e.filter((e) => ed(e.colId) && e.hidden).map((e) => e.colId);
|
|
23502
23510
|
}
|
|
23503
|
-
function
|
|
23511
|
+
function Ww(e, t) {
|
|
23504
23512
|
if (!ed(e)) return !1;
|
|
23505
23513
|
let n = t.find((t) => t.colId === e);
|
|
23506
|
-
return !n || n.hidden ? !1 :
|
|
23514
|
+
return !n || n.hidden ? !1 : Hw(t) > 1;
|
|
23507
23515
|
}
|
|
23508
|
-
function
|
|
23516
|
+
function Gw(e, t, n, r = {}) {
|
|
23509
23517
|
let i = r.warn ?? ((e) => console.warn(e));
|
|
23510
|
-
return !n && !
|
|
23518
|
+
return !n && !Ww(t, e.getColumns()) ? (i(Vw), !1) : e.setColumnsHidden([t], !n);
|
|
23511
23519
|
}
|
|
23512
|
-
function
|
|
23513
|
-
let t =
|
|
23520
|
+
function Kw(e) {
|
|
23521
|
+
let t = Uw(e.getColumns());
|
|
23514
23522
|
return t.length !== 0 && e.setColumnsHidden(t, !1);
|
|
23515
23523
|
}
|
|
23516
23524
|
//#endregion
|
|
23517
23525
|
//#region src/components/ColumnSettings/ColumnSettingsRow.vue?vue&type=script&setup=true&lang.ts
|
|
23518
|
-
var
|
|
23526
|
+
var qw = ["data-col-id"], Jw = { class: "mg-column-settings__row-main" }, Yw = [
|
|
23519
23527
|
"draggable",
|
|
23520
23528
|
"aria-disabled",
|
|
23521
23529
|
"title"
|
|
23522
|
-
],
|
|
23530
|
+
], Xw = ["title"], Zw = {
|
|
23523
23531
|
key: 1,
|
|
23524
23532
|
class: "mg-column-settings__row-actions"
|
|
23525
|
-
},
|
|
23533
|
+
}, Qw = ["aria-label", "title"], $w = ["aria-expanded", "aria-label"], eT = ["aria-label"], tT = [
|
|
23526
23534
|
"aria-checked",
|
|
23527
23535
|
"aria-label",
|
|
23528
23536
|
"title",
|
|
23529
23537
|
"onClick"
|
|
23530
|
-
],
|
|
23538
|
+
], nT = ["title"], rT = ["checked", "aria-label"], iT = /* @__PURE__ */ g({
|
|
23531
23539
|
__name: "ColumnSettingsRow",
|
|
23532
23540
|
props: {
|
|
23533
23541
|
row: {},
|
|
@@ -23570,10 +23578,10 @@ var Yw = ["data-col-id"], Xw = { class: "mg-column-settings__row-main" }, Zw = [
|
|
|
23570
23578
|
"right"
|
|
23571
23579
|
];
|
|
23572
23580
|
function s() {
|
|
23573
|
-
!n.gridApi || !n.row.sortable || (
|
|
23581
|
+
!n.gridApi || !n.row.sortable || (Lw(n.gridApi, n.row.colId, n.row.sortDirection), r("change"));
|
|
23574
23582
|
}
|
|
23575
23583
|
function c(e) {
|
|
23576
|
-
!n.gridApi || n.row.fixed === e ||
|
|
23584
|
+
!n.gridApi || n.row.fixed === e || Rw(n.gridApi, n.row.colId, e) && r("change");
|
|
23577
23585
|
}
|
|
23578
23586
|
function p() {
|
|
23579
23587
|
i.value = !i.value;
|
|
@@ -23581,7 +23589,7 @@ var Yw = ["data-col-id"], Xw = { class: "mg-column-settings__row-main" }, Zw = [
|
|
|
23581
23589
|
function m(e) {
|
|
23582
23590
|
if (!n.gridApi) return;
|
|
23583
23591
|
let t = e.target, i = t.checked;
|
|
23584
|
-
if (!
|
|
23592
|
+
if (!Gw(n.gridApi, n.row.colId, i)) {
|
|
23585
23593
|
t.checked = !i;
|
|
23586
23594
|
return;
|
|
23587
23595
|
}
|
|
@@ -23604,7 +23612,7 @@ var Yw = ["data-col-id"], Xw = { class: "mg-column-settings__row-main" }, Zw = [
|
|
|
23604
23612
|
"mg-column-settings__row--dragging": e.dragging
|
|
23605
23613
|
}]),
|
|
23606
23614
|
"data-col-id": e.row.colId
|
|
23607
|
-
}, [f("div",
|
|
23615
|
+
}, [f("div", Jw, [
|
|
23608
23616
|
e.showDragHandle ? (E(), d("span", {
|
|
23609
23617
|
key: 0,
|
|
23610
23618
|
class: b(["mg-column-settings__drag-handle", { "mg-column-settings__drag-handle--disabled": !e.draggable }]),
|
|
@@ -23613,12 +23621,12 @@ var Yw = ["data-col-id"], Xw = { class: "mg-column-settings__row-main" }, Zw = [
|
|
|
23613
23621
|
title: e.draggable ? "拖拽调整列顺序" : "此列不可拖拽",
|
|
23614
23622
|
onDragstart: h,
|
|
23615
23623
|
onDragend: g
|
|
23616
|
-
}, " ≡ ", 42,
|
|
23624
|
+
}, " ≡ ", 42, Yw)) : u("", !0),
|
|
23617
23625
|
f("span", {
|
|
23618
23626
|
class: "mg-column-settings__row-label",
|
|
23619
23627
|
title: e.row.label
|
|
23620
|
-
}, M(e.row.label), 9,
|
|
23621
|
-
e.gridApi ? (E(), d("div",
|
|
23628
|
+
}, M(e.row.label), 9, Xw),
|
|
23629
|
+
e.gridApi ? (E(), d("div", Zw, [
|
|
23622
23630
|
e.showSort && e.row.sortable ? (E(), d("button", {
|
|
23623
23631
|
key: 0,
|
|
23624
23632
|
type: "button",
|
|
@@ -23626,10 +23634,10 @@ var Yw = ["data-col-id"], Xw = { class: "mg-column-settings__row-main" }, Zw = [
|
|
|
23626
23634
|
"mg-column-settings__sort-button--asc": e.row.sortDirection === "asc",
|
|
23627
23635
|
"mg-column-settings__sort-button--desc": e.row.sortDirection === "desc"
|
|
23628
23636
|
}]),
|
|
23629
|
-
"aria-label": `${e.row.label} 排序:${N(
|
|
23630
|
-
title: N(
|
|
23637
|
+
"aria-label": `${e.row.label} 排序:${N(zw)(e.row.sortDirection)}`,
|
|
23638
|
+
title: N(zw)(e.row.sortDirection),
|
|
23631
23639
|
onClick: s
|
|
23632
|
-
}, M(e.row.sortDirection === "asc" ? "↑" : e.row.sortDirection === "desc" ? "↓" : "↕"), 11,
|
|
23640
|
+
}, M(e.row.sortDirection === "asc" ? "↑" : e.row.sortDirection === "desc" ? "↓" : "↕"), 11, Qw)) : u("", !0),
|
|
23633
23641
|
e.showFilter && e.row.filterable ? (E(), d("button", {
|
|
23634
23642
|
key: 1,
|
|
23635
23643
|
type: "button",
|
|
@@ -23654,7 +23662,7 @@ var Yw = ["data-col-id"], Xw = { class: "mg-column-settings__row-main" }, Zw = [
|
|
|
23654
23662
|
f("path", { d: "M3 6h18" }),
|
|
23655
23663
|
f("path", { d: "M7 12h10" }),
|
|
23656
23664
|
f("path", { d: "M10 18h4" })
|
|
23657
|
-
], -1)]], 10,
|
|
23665
|
+
], -1)]], 10, $w)) : u("", !0),
|
|
23658
23666
|
e.showPin ? (E(), d("div", {
|
|
23659
23667
|
key: 2,
|
|
23660
23668
|
class: "mg-column-settings__pin-group",
|
|
@@ -23666,10 +23674,10 @@ var Yw = ["data-col-id"], Xw = { class: "mg-column-settings__row-main" }, Zw = [
|
|
|
23666
23674
|
class: b(["mg-column-settings__pin-button", { "mg-column-settings__pin-button--active": e.row.fixed === t }]),
|
|
23667
23675
|
role: "radio",
|
|
23668
23676
|
"aria-checked": e.row.fixed === t,
|
|
23669
|
-
"aria-label": N(
|
|
23670
|
-
title: N(
|
|
23677
|
+
"aria-label": N(Bw)(t),
|
|
23678
|
+
title: N(Bw)(t),
|
|
23671
23679
|
onClick: (e) => c(t)
|
|
23672
|
-
}, M(t === "left" ? "左" : t === "right" ? "右" : "中"), 11,
|
|
23680
|
+
}, M(t === "left" ? "左" : t === "right" ? "右" : "中"), 11, tT)), 64))], 8, eT)) : u("", !0),
|
|
23673
23681
|
e.showVisibility ? (E(), d("label", {
|
|
23674
23682
|
key: 3,
|
|
23675
23683
|
class: "mg-column-settings__visibility",
|
|
@@ -23680,12 +23688,12 @@ var Yw = ["data-col-id"], Xw = { class: "mg-column-settings__row-main" }, Zw = [
|
|
|
23680
23688
|
checked: !e.row.hidden,
|
|
23681
23689
|
"aria-label": `${e.row.label} 显示列`,
|
|
23682
23690
|
onChange: m
|
|
23683
|
-
}, null, 40,
|
|
23691
|
+
}, null, 40, rT), n[2] ||= f("span", {
|
|
23684
23692
|
class: "mg-column-settings__visibility-label",
|
|
23685
23693
|
"aria-hidden": "true"
|
|
23686
|
-
}, "显示", -1)], 8,
|
|
23694
|
+
}, "显示", -1)], 8, nT)) : u("", !0)
|
|
23687
23695
|
])) : u("", !0)
|
|
23688
|
-
]), i.value && e.gridApi && e.row.filterable ? (E(), l(
|
|
23696
|
+
]), i.value && e.gridApi && e.row.filterable ? (E(), l(Nw, {
|
|
23689
23697
|
key: 0,
|
|
23690
23698
|
class: "mg-column-settings__filter-panel",
|
|
23691
23699
|
"col-id": e.row.colId,
|
|
@@ -23698,19 +23706,19 @@ var Yw = ["data-col-id"], Xw = { class: "mg-column-settings__row-main" }, Zw = [
|
|
|
23698
23706
|
"grid-api",
|
|
23699
23707
|
"filter-set-value-mode",
|
|
23700
23708
|
"filter-set-date-layout-mode"
|
|
23701
|
-
])) : u("", !0)], 10,
|
|
23709
|
+
])) : u("", !0)], 10, qw));
|
|
23702
23710
|
}
|
|
23703
|
-
})
|
|
23711
|
+
});
|
|
23704
23712
|
//#endregion
|
|
23705
23713
|
//#region src/core/column/columnSettingsMove.ts
|
|
23706
|
-
function
|
|
23714
|
+
function aT(e, t) {
|
|
23707
23715
|
return ed(e.colId) && !e.hidden && td(e.fixed) === t;
|
|
23708
23716
|
}
|
|
23709
|
-
function
|
|
23710
|
-
return e.filter((e) =>
|
|
23717
|
+
function oT(e, t) {
|
|
23718
|
+
return e.filter((e) => aT(e, t));
|
|
23711
23719
|
}
|
|
23712
|
-
function
|
|
23713
|
-
let i =
|
|
23720
|
+
function sT(e, t, n, r) {
|
|
23721
|
+
let i = oT(e, t), a = i.findIndex((e) => e.colId === n);
|
|
23714
23722
|
if (a < 0 || !e.find((e) => e.colId === n)?.movable) return null;
|
|
23715
23723
|
let o = Math.max(0, Math.min(r, i.length - 1));
|
|
23716
23724
|
if (a === o) return null;
|
|
@@ -23718,7 +23726,7 @@ function lT(e, t, n, r) {
|
|
|
23718
23726
|
s.splice(a, 1), s.splice(o, 0, n), e.map((e) => e.colId);
|
|
23719
23727
|
let c = [], l = 0;
|
|
23720
23728
|
for (let n of e) {
|
|
23721
|
-
if (
|
|
23729
|
+
if (aT(n, t)) {
|
|
23722
23730
|
let e = s[l];
|
|
23723
23731
|
if (!e) return null;
|
|
23724
23732
|
c.push(e), l += 1;
|
|
@@ -23728,8 +23736,8 @@ function lT(e, t, n, r) {
|
|
|
23728
23736
|
}
|
|
23729
23737
|
return c;
|
|
23730
23738
|
}
|
|
23731
|
-
function
|
|
23732
|
-
let t =
|
|
23739
|
+
function cT(e) {
|
|
23740
|
+
let t = sT(e.columns, e.lane, e.colId, e.toDisplayIndex);
|
|
23733
23741
|
if (!t) return null;
|
|
23734
23742
|
let n = e.columns.findIndex((t) => t.colId === e.colId);
|
|
23735
23743
|
if (n < 0) return null;
|
|
@@ -23750,8 +23758,8 @@ function uT(e) {
|
|
|
23750
23758
|
allowCrossLaneColumnMove: !1
|
|
23751
23759
|
}) ? null : r;
|
|
23752
23760
|
}
|
|
23753
|
-
function
|
|
23754
|
-
let i =
|
|
23761
|
+
function lT(e, t, n, r) {
|
|
23762
|
+
let i = cT({
|
|
23755
23763
|
columns: e.getColumns(),
|
|
23756
23764
|
lane: t,
|
|
23757
23765
|
colId: n,
|
|
@@ -23761,7 +23769,7 @@ function dT(e, t, n, r) {
|
|
|
23761
23769
|
}
|
|
23762
23770
|
//#endregion
|
|
23763
23771
|
//#region src/components/ColumnSettings/ColumnSettingsList.vue?vue&type=script&setup=true&lang.ts
|
|
23764
|
-
var
|
|
23772
|
+
var uT = ["aria-label"], dT = { class: "mg-column-settings__rows" }, fT = ["onDragover", "onDrop"], pT = /* @__PURE__ */ g({
|
|
23765
23773
|
__name: "ColumnSettingsList",
|
|
23766
23774
|
props: {
|
|
23767
23775
|
lane: {},
|
|
@@ -23794,7 +23802,7 @@ var fT = ["aria-label"], pT = { class: "mg-column-settings__rows" }, mT = ["onDr
|
|
|
23794
23802
|
m();
|
|
23795
23803
|
return;
|
|
23796
23804
|
}
|
|
23797
|
-
|
|
23805
|
+
lT(r.gridApi, r.lane, n, e) && (i("reorder"), i("change")), m();
|
|
23798
23806
|
}
|
|
23799
23807
|
function m() {
|
|
23800
23808
|
a.value = null, s.value = null;
|
|
@@ -23803,12 +23811,12 @@ var fT = ["aria-label"], pT = { class: "mg-column-settings__rows" }, mT = ["onDr
|
|
|
23803
23811
|
key: 0,
|
|
23804
23812
|
class: b([N(Yu), `mg-column-settings__group--${e.lane}`]),
|
|
23805
23813
|
"aria-label": n[e.lane]
|
|
23806
|
-
}, [f("div",
|
|
23814
|
+
}, [f("div", dT, [(E(!0), d(o, null, k(e.rows, (t, n) => (E(), d("div", {
|
|
23807
23815
|
key: t.colId,
|
|
23808
23816
|
class: "mg-column-settings__row-host",
|
|
23809
23817
|
onDragover: (e) => l(n, e),
|
|
23810
23818
|
onDrop: (e) => p(n, e)
|
|
23811
|
-
}, [h(
|
|
23819
|
+
}, [h(iT, {
|
|
23812
23820
|
row: t,
|
|
23813
23821
|
"grid-api": e.gridApi,
|
|
23814
23822
|
draggable: t.movable,
|
|
@@ -23828,9 +23836,9 @@ var fT = ["aria-label"], pT = { class: "mg-column-settings__rows" }, mT = ["onDr
|
|
|
23828
23836
|
"show-filter",
|
|
23829
23837
|
"show-visibility",
|
|
23830
23838
|
"onDragstart"
|
|
23831
|
-
])], 40,
|
|
23839
|
+
])], 40, fT))), 128))])], 10, uT)) : u("", !0);
|
|
23832
23840
|
}
|
|
23833
|
-
}),
|
|
23841
|
+
}), mT = { class: "mg-column-settings__groups" }, hT = { class: "mg-column-settings__visible-lanes" }, gT = { class: "mg-column-settings__hidden-divider" }, _T = { class: "mg-column-settings__hidden-divider-center" }, vT = ["aria-expanded"], yT = {
|
|
23834
23842
|
key: 0,
|
|
23835
23843
|
class: "mg-column-settings__hidden-toggle-icon",
|
|
23836
23844
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -23843,7 +23851,7 @@ var fT = ["aria-label"], pT = { class: "mg-column-settings__rows" }, mT = ["onDr
|
|
|
23843
23851
|
"stroke-linecap": "round",
|
|
23844
23852
|
"stroke-linejoin": "round",
|
|
23845
23853
|
"aria-hidden": "true"
|
|
23846
|
-
},
|
|
23854
|
+
}, bT = {
|
|
23847
23855
|
key: 1,
|
|
23848
23856
|
class: "mg-column-settings__hidden-toggle-icon",
|
|
23849
23857
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -23856,7 +23864,7 @@ var fT = ["aria-label"], pT = { class: "mg-column-settings__rows" }, mT = ["onDr
|
|
|
23856
23864
|
"stroke-linecap": "round",
|
|
23857
23865
|
"stroke-linejoin": "round",
|
|
23858
23866
|
"aria-hidden": "true"
|
|
23859
|
-
},
|
|
23867
|
+
}, xT = { class: "mg-column-settings__hidden-rows" }, ST = { class: "mg-column-settings__rows" }, CT = /* @__PURE__ */ g({
|
|
23860
23868
|
__name: "ColumnSettingsGroupedLists",
|
|
23861
23869
|
props: {
|
|
23862
23870
|
grouped: {},
|
|
@@ -23871,10 +23879,10 @@ var fT = ["aria-label"], pT = { class: "mg-column-settings__rows" }, mT = ["onDr
|
|
|
23871
23879
|
setup(e, { emit: t }) {
|
|
23872
23880
|
let n = e, r = t, i = D(!0);
|
|
23873
23881
|
function a() {
|
|
23874
|
-
|
|
23882
|
+
Kw(n.gridApi) && r("change");
|
|
23875
23883
|
}
|
|
23876
|
-
return (t, n) => (E(), d("div",
|
|
23877
|
-
h(
|
|
23884
|
+
return (t, n) => (E(), d("div", mT, [f("div", hT, [
|
|
23885
|
+
h(pT, {
|
|
23878
23886
|
lane: "left",
|
|
23879
23887
|
rows: e.grouped.left,
|
|
23880
23888
|
"grid-api": e.gridApi,
|
|
@@ -23888,7 +23896,7 @@ var fT = ["aria-label"], pT = { class: "mg-column-settings__rows" }, mT = ["onDr
|
|
|
23888
23896
|
"show-filter",
|
|
23889
23897
|
"show-visibility"
|
|
23890
23898
|
]),
|
|
23891
|
-
h(
|
|
23899
|
+
h(pT, {
|
|
23892
23900
|
lane: "center",
|
|
23893
23901
|
rows: e.grouped.center,
|
|
23894
23902
|
"grid-api": e.gridApi,
|
|
@@ -23902,7 +23910,7 @@ var fT = ["aria-label"], pT = { class: "mg-column-settings__rows" }, mT = ["onDr
|
|
|
23902
23910
|
"show-filter",
|
|
23903
23911
|
"show-visibility"
|
|
23904
23912
|
]),
|
|
23905
|
-
h(
|
|
23913
|
+
h(pT, {
|
|
23906
23914
|
lane: "right",
|
|
23907
23915
|
rows: e.grouped.right,
|
|
23908
23916
|
"grid-api": e.gridApi,
|
|
@@ -23919,17 +23927,17 @@ var fT = ["aria-label"], pT = { class: "mg-column-settings__rows" }, mT = ["onDr
|
|
|
23919
23927
|
]), e.grouped.hidden.length > 0 ? (E(), d("section", {
|
|
23920
23928
|
key: 0,
|
|
23921
23929
|
class: b(N($u))
|
|
23922
|
-
}, [f("div",
|
|
23930
|
+
}, [f("div", gT, [
|
|
23923
23931
|
n[10] ||= f("span", {
|
|
23924
23932
|
class: "mg-column-settings__hidden-divider-line",
|
|
23925
23933
|
"aria-hidden": "true"
|
|
23926
23934
|
}, null, -1),
|
|
23927
|
-
f("div",
|
|
23935
|
+
f("div", _T, [f("button", {
|
|
23928
23936
|
type: "button",
|
|
23929
23937
|
class: "mg-column-settings__hidden-toggle",
|
|
23930
23938
|
"aria-expanded": i.value,
|
|
23931
23939
|
onClick: n[6] ||= (e) => i.value = !i.value
|
|
23932
|
-
}, [m(" 隐藏 (" + M(e.grouped.hidden.length) + ") ", 1), i.value ? (E(), d("svg",
|
|
23940
|
+
}, [m(" 隐藏 (" + M(e.grouped.hidden.length) + ") ", 1), i.value ? (E(), d("svg", yT, [...n[8] ||= [p("<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)]])) : (E(), d("svg", bT, [...n[9] ||= [p("<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, vT), f("button", {
|
|
23933
23941
|
type: "button",
|
|
23934
23942
|
class: "mg-column-settings__hidden-show-all",
|
|
23935
23943
|
onClick: a
|
|
@@ -23938,7 +23946,7 @@ var fT = ["aria-label"], pT = { class: "mg-column-settings__rows" }, mT = ["onDr
|
|
|
23938
23946
|
class: "mg-column-settings__hidden-divider-line",
|
|
23939
23947
|
"aria-hidden": "true"
|
|
23940
23948
|
}, null, -1)
|
|
23941
|
-
]), ne(f("div",
|
|
23949
|
+
]), ne(f("div", xT, [f("h4", { class: b([N(Xu), "mg-column-settings__sr-only"]) }, " 已隐藏列 ", 2), f("div", ST, [(E(!0), d(o, null, k(e.grouped.hidden, (t) => (E(), l(iT, {
|
|
23942
23950
|
key: t.colId,
|
|
23943
23951
|
row: t,
|
|
23944
23952
|
"grid-api": e.gridApi,
|
|
@@ -23954,10 +23962,10 @@ var fT = ["aria-label"], pT = { class: "mg-column-settings__rows" }, mT = ["onDr
|
|
|
23954
23962
|
"show-visibility"
|
|
23955
23963
|
]))), 128))])], 512), [[P, i.value]])], 2)) : u("", !0)]));
|
|
23956
23964
|
}
|
|
23957
|
-
})
|
|
23965
|
+
});
|
|
23958
23966
|
//#endregion
|
|
23959
23967
|
//#region src/core/column/columnSettingsProjection.ts
|
|
23960
|
-
function
|
|
23968
|
+
function wT(e) {
|
|
23961
23969
|
return {
|
|
23962
23970
|
colId: e.colId,
|
|
23963
23971
|
label: e.label,
|
|
@@ -23969,20 +23977,20 @@ function ET(e) {
|
|
|
23969
23977
|
hidden: e.hidden
|
|
23970
23978
|
};
|
|
23971
23979
|
}
|
|
23972
|
-
function
|
|
23973
|
-
return e.map(
|
|
23980
|
+
function TT(e) {
|
|
23981
|
+
return e.map(wT);
|
|
23974
23982
|
}
|
|
23975
|
-
function
|
|
23983
|
+
function ET(e, t = {}) {
|
|
23976
23984
|
return id({
|
|
23977
|
-
columns:
|
|
23985
|
+
columns: TT(e.getColumns()),
|
|
23978
23986
|
sortModel: e.getSortModel(),
|
|
23979
23987
|
filterModel: e.getFilterModel(),
|
|
23980
23988
|
isColumnFilterActive: (t) => e.isColumnFilterActive(t),
|
|
23981
23989
|
includeHidden: t.includeHidden
|
|
23982
23990
|
});
|
|
23983
23991
|
}
|
|
23984
|
-
function
|
|
23985
|
-
let n =
|
|
23992
|
+
function DT(e, t = {}) {
|
|
23993
|
+
let n = ET(e, t);
|
|
23986
23994
|
return {
|
|
23987
23995
|
rows: n,
|
|
23988
23996
|
grouped: ad(n),
|
|
@@ -23991,22 +23999,22 @@ function kT(e, t = {}) {
|
|
|
23991
23999
|
}
|
|
23992
24000
|
//#endregion
|
|
23993
24001
|
//#region src/core/column/columnSettingsPanelSubscribe.ts
|
|
23994
|
-
var
|
|
24002
|
+
var OT = [
|
|
23995
24003
|
"sortChanged",
|
|
23996
24004
|
"filterChanged",
|
|
23997
24005
|
"columnMoved",
|
|
23998
24006
|
"columnPinned",
|
|
23999
24007
|
"columnHiddenChanged"
|
|
24000
24008
|
];
|
|
24001
|
-
function
|
|
24002
|
-
let n =
|
|
24009
|
+
function kT(e, t) {
|
|
24010
|
+
let n = OT.map((n) => e.on(n, t));
|
|
24003
24011
|
return () => {
|
|
24004
24012
|
for (let e of n) e();
|
|
24005
24013
|
};
|
|
24006
24014
|
}
|
|
24007
24015
|
//#endregion
|
|
24008
24016
|
//#region src/components/ColumnSettings/ColumnSettingsPanel.vue?vue&type=script&setup=true&lang.ts
|
|
24009
|
-
var
|
|
24017
|
+
var AT = { class: "mg-column-settings__header-leading" }, jT = /* @__PURE__ */ g({
|
|
24010
24018
|
__name: "ColumnSettingsPanel",
|
|
24011
24019
|
props: {
|
|
24012
24020
|
gridApi: {},
|
|
@@ -24025,12 +24033,12 @@ var MT = { class: "mg-column-settings__header-leading" }, NT = /*#__PURE__*/ Mw(
|
|
|
24025
24033
|
},
|
|
24026
24034
|
emits: ["close"],
|
|
24027
24035
|
setup(e, { emit: t }) {
|
|
24028
|
-
let n = e, r = t, i = j(
|
|
24036
|
+
let n = e, r = t, i = j(DT(n.gridApi)), a = null;
|
|
24029
24037
|
function o() {
|
|
24030
|
-
i.value =
|
|
24038
|
+
i.value = DT(n.gridApi);
|
|
24031
24039
|
}
|
|
24032
24040
|
function s() {
|
|
24033
|
-
c(), o(), a =
|
|
24041
|
+
c(), o(), a = kT(n.gridApi, o);
|
|
24034
24042
|
}
|
|
24035
24043
|
function c() {
|
|
24036
24044
|
a?.(), a = null;
|
|
@@ -24053,7 +24061,7 @@ var MT = { class: "mg-column-settings__header-leading" }, NT = /*#__PURE__*/ Mw(
|
|
|
24053
24061
|
class: b(N(Iu)),
|
|
24054
24062
|
role: "document",
|
|
24055
24063
|
"aria-label": "列设置"
|
|
24056
|
-
}, [f("header", { class: b(N(Lu)) }, [f("div",
|
|
24064
|
+
}, [f("header", { class: b(N(Lu)) }, [f("div", AT, [n[1] ||= p("<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), h(jw, {
|
|
24057
24065
|
"grid-api": e.gridApi,
|
|
24058
24066
|
"can-clear-all-filters": i.value.canClearAllFilters,
|
|
24059
24067
|
onChange: l
|
|
@@ -24062,7 +24070,7 @@ var MT = { class: "mg-column-settings__header-leading" }, NT = /*#__PURE__*/ Mw(
|
|
|
24062
24070
|
class: "mg-column-settings__close",
|
|
24063
24071
|
"aria-label": "关闭列设置",
|
|
24064
24072
|
onClick: n[0] ||= (e) => r("close")
|
|
24065
|
-
}, " × ")], 2), f("div", { class: b(N(Ru)) }, [h(
|
|
24073
|
+
}, " × ")], 2), f("div", { class: b(N(Ru)) }, [h(CT, {
|
|
24066
24074
|
grouped: i.value.grouped,
|
|
24067
24075
|
"grid-api": e.gridApi,
|
|
24068
24076
|
"show-filter": e.showFilter,
|
|
@@ -24076,70 +24084,70 @@ var MT = { class: "mg-column-settings__header-leading" }, NT = /*#__PURE__*/ Mw(
|
|
|
24076
24084
|
"show-visibility"
|
|
24077
24085
|
])], 2)], 2));
|
|
24078
24086
|
}
|
|
24079
|
-
})
|
|
24087
|
+
});
|
|
24080
24088
|
//#endregion
|
|
24081
24089
|
//#region src/core/column/columnSettingsReset.ts
|
|
24082
|
-
function
|
|
24090
|
+
function MT(e) {
|
|
24083
24091
|
e.getSortModel().length !== 0 && e.setSortModel([]);
|
|
24084
24092
|
}
|
|
24085
|
-
function
|
|
24093
|
+
function NT(e) {
|
|
24086
24094
|
e.clearAllFilters();
|
|
24087
24095
|
}
|
|
24088
|
-
function
|
|
24096
|
+
function PT(e) {
|
|
24089
24097
|
e.resetColumnWidths();
|
|
24090
24098
|
}
|
|
24091
|
-
function
|
|
24099
|
+
function FT(e) {
|
|
24092
24100
|
let t = e.getColumns(), n = JS(t);
|
|
24093
24101
|
YS(t.map((e) => e.colId), n) || e.resetColumnOrder();
|
|
24094
24102
|
}
|
|
24095
|
-
function
|
|
24103
|
+
function IT(e) {
|
|
24096
24104
|
for (let t of e.getColumns()) !ed(t.colId) || t.fixed === null || e.setColumnFixed(t.colId, null);
|
|
24097
24105
|
}
|
|
24098
|
-
function
|
|
24106
|
+
function LT(e, t) {
|
|
24099
24107
|
switch (t) {
|
|
24100
24108
|
case "sort":
|
|
24101
|
-
|
|
24109
|
+
MT(e);
|
|
24102
24110
|
break;
|
|
24103
24111
|
case "filter":
|
|
24104
|
-
|
|
24112
|
+
NT(e);
|
|
24105
24113
|
break;
|
|
24106
24114
|
case "width":
|
|
24107
|
-
|
|
24115
|
+
PT(e);
|
|
24108
24116
|
break;
|
|
24109
24117
|
case "order":
|
|
24110
|
-
|
|
24118
|
+
FT(e);
|
|
24111
24119
|
break;
|
|
24112
24120
|
case "pin":
|
|
24113
|
-
|
|
24121
|
+
IT(e);
|
|
24114
24122
|
break;
|
|
24115
|
-
case "all":
|
|
24123
|
+
case "all": MT(e), NT(e), PT(e), FT(e), IT(e);
|
|
24116
24124
|
}
|
|
24117
24125
|
}
|
|
24118
24126
|
//#endregion
|
|
24119
24127
|
//#region src/core/column/columnSettingsPopoverPosition.ts
|
|
24120
|
-
var
|
|
24121
|
-
function
|
|
24122
|
-
let r = Math.min(
|
|
24123
|
-
return a + n > window.innerHeight -
|
|
24128
|
+
var RT = 8, zT = 4, BT = 320, VT = 400, HT = 168;
|
|
24129
|
+
function UT(e, t, n) {
|
|
24130
|
+
let r = Math.min(VT, Math.max(BT, t)), i = e.right - r, a = e.bottom + zT;
|
|
24131
|
+
return a + n > window.innerHeight - RT && (a = e.top - n - zT), i = Math.max(RT, Math.min(i, window.innerWidth - r - RT)), a = Math.max(RT, Math.min(a, window.innerHeight - n - RT)), {
|
|
24124
24132
|
left: i,
|
|
24125
24133
|
top: a
|
|
24126
24134
|
};
|
|
24127
24135
|
}
|
|
24128
|
-
function
|
|
24129
|
-
let r = Math.max(
|
|
24130
|
-
return a + n > window.innerHeight -
|
|
24136
|
+
function WT(e, t, n) {
|
|
24137
|
+
let r = Math.max(HT, t), i = e.left, a = e.bottom + zT;
|
|
24138
|
+
return a + n > window.innerHeight - RT && (a = e.top - n - zT), i = Math.max(RT, Math.min(i, window.innerWidth - r - RT)), a = Math.max(RT, Math.min(a, window.innerHeight - n - RT)), {
|
|
24131
24139
|
left: i,
|
|
24132
24140
|
top: a
|
|
24133
24141
|
};
|
|
24134
24142
|
}
|
|
24135
24143
|
//#endregion
|
|
24136
24144
|
//#region src/components/ColumnSettings/ColumnSettingsButton.vue?vue&type=script&setup=true&lang.ts
|
|
24137
|
-
var
|
|
24145
|
+
var GT = [
|
|
24138
24146
|
"disabled",
|
|
24139
24147
|
"aria-expanded",
|
|
24140
24148
|
"aria-label",
|
|
24141
24149
|
"title"
|
|
24142
|
-
],
|
|
24150
|
+
], KT = /* @__PURE__ */ g({
|
|
24143
24151
|
__name: "ColumnSettingsButton",
|
|
24144
24152
|
props: {
|
|
24145
24153
|
gridApi: {},
|
|
@@ -24201,7 +24209,7 @@ var qT = [
|
|
|
24201
24209
|
M(!0);
|
|
24202
24210
|
}
|
|
24203
24211
|
function ie(e) {
|
|
24204
|
-
|
|
24212
|
+
LT(n.gridApi, e), oe();
|
|
24205
24213
|
}
|
|
24206
24214
|
function ae() {
|
|
24207
24215
|
_.value && M(!1);
|
|
@@ -24220,10 +24228,10 @@ var qT = [
|
|
|
24220
24228
|
e.style.left = `${a}px`, e.style.top = `${s}px`, e.style.visibility = "";
|
|
24221
24229
|
}
|
|
24222
24230
|
function L() {
|
|
24223
|
-
ce(p.value,
|
|
24231
|
+
ce(p.value, WT);
|
|
24224
24232
|
}
|
|
24225
24233
|
function le() {
|
|
24226
|
-
ce(m.value,
|
|
24234
|
+
ce(m.value, UT);
|
|
24227
24235
|
}
|
|
24228
24236
|
function R() {
|
|
24229
24237
|
g.value && L(), _.value && le();
|
|
@@ -24295,7 +24303,7 @@ var qT = [
|
|
|
24295
24303
|
cx: "12",
|
|
24296
24304
|
cy: "12",
|
|
24297
24305
|
r: "3"
|
|
24298
|
-
})], -1)]], 8,
|
|
24306
|
+
})], -1)]], 8, GT), (E(), l(s, {
|
|
24299
24307
|
key: v.value,
|
|
24300
24308
|
to: O.value
|
|
24301
24309
|
}, [g.value ? (E(), d("div", {
|
|
@@ -24323,7 +24331,7 @@ var qT = [
|
|
|
24323
24331
|
role: "dialog",
|
|
24324
24332
|
"aria-modal": "false",
|
|
24325
24333
|
"aria-label": "列设置面板"
|
|
24326
|
-
}, [h(
|
|
24334
|
+
}, [h(jT, {
|
|
24327
24335
|
"grid-api": e.gridApi,
|
|
24328
24336
|
open: _.value,
|
|
24329
24337
|
"show-visibility": e.showVisibility,
|
|
@@ -24336,7 +24344,7 @@ var qT = [
|
|
|
24336
24344
|
"show-filter"
|
|
24337
24345
|
])], 2)], 2)) : u("", !0)], 8, ["to"]))], 6));
|
|
24338
24346
|
}
|
|
24339
|
-
}),
|
|
24347
|
+
}), qT = {
|
|
24340
24348
|
input: {
|
|
24341
24349
|
deferEnterCommit: !1,
|
|
24342
24350
|
commitOnChange: !1
|
|
@@ -24346,8 +24354,8 @@ var qT = [
|
|
|
24346
24354
|
commitOnChange: !0
|
|
24347
24355
|
}
|
|
24348
24356
|
};
|
|
24349
|
-
function
|
|
24350
|
-
let n =
|
|
24357
|
+
function JT(e, t) {
|
|
24358
|
+
let n = qT[t.strategy ?? "input"], r = t.formatValue ?? ((e) => String(e ?? "")), i = t.commitOnChange ?? n.commitOnChange;
|
|
24351
24359
|
w(() => {
|
|
24352
24360
|
e.setGetValue?.(() => r(t.getValue())), e.setKeyboardPolicy?.({ deferEnterCommit: n.deferEnterCommit }), e.autoFocus !== !1 && t.onStart?.();
|
|
24353
24361
|
});
|
|
@@ -24377,6 +24385,6 @@ function XT(e, t) {
|
|
|
24377
24385
|
};
|
|
24378
24386
|
}
|
|
24379
24387
|
//#endregion
|
|
24380
|
-
export { Ee as BUILTIN_CELL_EDITOR_NAMES, Ki as COLUMN_DRAG_THRESHOLD_PX,
|
|
24388
|
+
export { Ee as BUILTIN_CELL_EDITOR_NAMES, Ki as COLUMN_DRAG_THRESHOLD_PX, KT as ColumnSettingsButton, Sw as ColumnSettingsMenuIcon, Tw as ColumnSettingsMenuItem, jT as ColumnSettingsPanel, uo as DEFAULT_CELL_EDITOR_MODE, mt as DEFAULT_INDEX_COLUMN_START, Ct as DEFAULT_SELECTION_SELECT_ALL_LABEL, VC as DEFAULT_STATUS_BAR_RANGE_AGGREGATION_PRECISION, ft as INDEX_COLUMN_ID, pt as INDEX_COLUMN_MIN_WIDTH, Oe as INLINE_CHECKBOX_CLASS, yw as MagicGrid, $l as RowMutationPersistError, St as SELECTION_COLUMN_DEFAULT_WIDTH, bt as SELECTION_COLUMN_ID, xt as SELECTION_COLUMN_MIN_WIDTH, qi as SORT_AFTER_MOVE_GUARD_MS, iw as VueCellEditorHost, Fe as checkboxCellEditor, Ae as coerceCheckboxEditorValue, ow as createSlotCellEditor, aw as createVueCellEditor, kC as evaluateGridAcceptance, je as formatCheckboxEditorRawValue, Be as getCellEditor, OC as getGridAcceptanceThresholds, DC as getGridSetDataLimit, He as getRegisteredCellEditorNames, Ve as hasCellEditor, De as isBuiltInCellEditor, mo as isInlineEditorColumn, ni as isSyntheticRow, Pe as numberCellEditor, Me as readCheckboxControlValue, Re as registerCellEditor, be as registerEditorSurfaceSelectors, xe as resetEditorSurfaceSelectors, fo as resolveCellEditorMode, po as resolveColumnCellEditorMode, Ne as textCellEditor, ri as toBusinessRowId, ai as toBusinessRowIdFromInternal, oi as toBusinessRowIdsFromInternal, fb as toggleHeaderSort, ze as unregisterCellEditor, JT as useCellEditor };
|
|
24381
24389
|
|
|
24382
24390
|
//# sourceMappingURL=index.es.js.map
|