@taocompany/magic-grid 0.5.0 → 0.5.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/README.md +5 -1
- package/dist/components/MagicGrid/MagicGrid.vue.d.ts +1 -1
- package/dist/components/MagicGrid/MagicGrid.vue.d.ts.map +1 -1
- package/dist/core/cell/cellCtrl.d.ts.map +1 -1
- package/dist/core/editing/cellEditPipeline.d.ts +2 -1
- package/dist/core/editing/cellEditPipeline.d.ts.map +1 -1
- package/dist/core/editing/cellEditingService.d.ts.map +1 -1
- package/dist/core/editing/inlineCellEditorService.d.ts +2 -0
- package/dist/core/editing/inlineCellEditorService.d.ts.map +1 -1
- package/dist/core/grid/cellEditing/editorParams.d.ts.map +1 -1
- package/dist/core/grid/cellEditing/startEditing.d.ts.map +1 -1
- package/dist/core/grid/cellEditing/types.d.ts +2 -0
- package/dist/core/grid/cellEditing/types.d.ts.map +1 -1
- package/dist/core/grid/cellRangeDeleteWrite.d.ts +2 -0
- package/dist/core/grid/cellRangeDeleteWrite.d.ts.map +1 -1
- package/dist/core/grid/cellRangeFillWrite.d.ts +2 -0
- package/dist/core/grid/cellRangeFillWrite.d.ts.map +1 -1
- package/dist/core/grid/grid.d.ts +1 -0
- package/dist/core/grid/grid.d.ts.map +1 -1
- package/dist/core/selection/cellClipboardService.d.ts +2 -0
- package/dist/core/selection/cellClipboardService.d.ts.map +1 -1
- package/dist/core/types/cellEditor.d.ts +3 -0
- package/dist/core/types/cellEditor.d.ts.map +1 -1
- package/dist/core/types/gridOptions.d.ts +3 -0
- package/dist/core/types/gridOptions.d.ts.map +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +19 -13
- package/dist/index.es.js.map +1 -1
- package/dist/types/core.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -679,6 +679,7 @@ var ft = class {
|
|
|
679
679
|
data: t.data,
|
|
680
680
|
formattedValue: r,
|
|
681
681
|
...a.editorParams,
|
|
682
|
+
size: a.editorParams?.size ?? "default",
|
|
682
683
|
stopEditing: (e = !0) => this.stopEditing(e).then(() => void 0),
|
|
683
684
|
cancelCommit: () => this.cancelCommit(),
|
|
684
685
|
getEditPhase: () => this.phase,
|
|
@@ -1673,7 +1674,7 @@ function Pr(e, t) {
|
|
|
1673
1674
|
return n === void 0 || n === !1 ? !1 : n === !0 || n(t);
|
|
1674
1675
|
}
|
|
1675
1676
|
function K(e, t, n) {
|
|
1676
|
-
return Nr(e) || !e.prop || kr(e, t, n) ? !1 : Pr(e, t.data);
|
|
1677
|
+
return !tr(t) || Nr(e) || !e.prop || kr(e, t, n) ? !1 : Pr(e, t.data);
|
|
1677
1678
|
}
|
|
1678
1679
|
function Fr(e, t = "singleClick") {
|
|
1679
1680
|
return e.editType ?? t;
|
|
@@ -2015,6 +2016,7 @@ var gi = class {
|
|
|
2015
2016
|
value: q(e, t),
|
|
2016
2017
|
data: e.data,
|
|
2017
2018
|
formattedValue: fi(e, t),
|
|
2019
|
+
size: this.deps.gridSize,
|
|
2018
2020
|
checkboxEditorParams: t.checkboxEditorParams,
|
|
2019
2021
|
switchEditorParams: t.switchEditorParams,
|
|
2020
2022
|
stopEditing: async () => void 0,
|
|
@@ -7642,7 +7644,7 @@ var Wm = class {
|
|
|
7642
7644
|
if (an(t) && a.rowExpansionHost?.active()) return this.clearInlineSession(n), this.refreshExpandCell(e, t, n, r, o, a.rowExpansionHost);
|
|
7643
7645
|
if (Bn(t, e) && a.rowGroupingHost?.active()) return this.clearInlineSession(n), this.refreshGroupCell(e, t, n, r, o, a.rowGroupingHost);
|
|
7644
7646
|
if (Nm(t, e) && a.treeTableHost?.active()) return this.clearInlineSession(n), this.refreshTreeCell(e, n, r, o, a.treeTableHost);
|
|
7645
|
-
if (!V(t.colId) && Lo(t) && a.inlineEditor) return this.refreshInlineEditorCell(e, t, n, r, o, a.inlineEditor, a, a.scheduleInlineEditor);
|
|
7647
|
+
if (!V(t.colId) && Lo(t) && a.inlineEditor && tr(e)) return this.refreshInlineEditorCell(e, t, n, r, o, a.inlineEditor, a, a.scheduleInlineEditor);
|
|
7646
7648
|
if (this.clearInlineSession(n), !V(t.colId) && t.cellRenderer) return this.refreshRendererCell(e, t, n, r, o, a.scheduleRenderer, a.cellRendererDefer, a.cellRendererPresentation, a.scrollActive, l);
|
|
7647
7649
|
let d = fi(e, t, l);
|
|
7648
7650
|
return !o && this.cacheVersion === r && Um(this.cachedValue, d) ? !1 : (n.clearRenderer(), this.cachedValue = d, this.cachedRenderKey = "", this.cacheVersion = r, n.setValue(d), !0);
|
|
@@ -12471,6 +12473,7 @@ var R_ = class {
|
|
|
12471
12473
|
value: q(e, s),
|
|
12472
12474
|
data: e.data,
|
|
12473
12475
|
formattedValue: "",
|
|
12476
|
+
size: this.deps.gridSize,
|
|
12474
12477
|
stopEditing: async () => {},
|
|
12475
12478
|
cancelCommit: () => {},
|
|
12476
12479
|
getEditPhase: () => "idle",
|
|
@@ -12598,6 +12601,7 @@ var R_ = class {
|
|
|
12598
12601
|
value: o,
|
|
12599
12602
|
data: r.data,
|
|
12600
12603
|
formattedValue: String(o ?? ""),
|
|
12604
|
+
size: this.deps.gridSize,
|
|
12601
12605
|
stopEditing: async () => {},
|
|
12602
12606
|
cancelCommit: () => {},
|
|
12603
12607
|
getEditPhase: () => "idle",
|
|
@@ -12799,6 +12803,7 @@ var $_ = class {
|
|
|
12799
12803
|
value: a,
|
|
12800
12804
|
data: r.data,
|
|
12801
12805
|
formattedValue: String(a ?? ""),
|
|
12806
|
+
size: this.deps.gridSize,
|
|
12802
12807
|
stopEditing: async () => {},
|
|
12803
12808
|
cancelCommit: () => {},
|
|
12804
12809
|
getEditPhase: () => "idle",
|
|
@@ -12842,6 +12847,7 @@ var $_ = class {
|
|
|
12842
12847
|
value: a,
|
|
12843
12848
|
data: r.data,
|
|
12844
12849
|
formattedValue: String(a ?? ""),
|
|
12850
|
+
size: this.deps.gridSize,
|
|
12845
12851
|
stopEditing: async () => {},
|
|
12846
12852
|
cancelCommit: () => {},
|
|
12847
12853
|
getEditPhase: () => "idle",
|
|
@@ -13642,6 +13648,7 @@ function Bv(e, t, n) {
|
|
|
13642
13648
|
value: q(t, n),
|
|
13643
13649
|
data: t.data,
|
|
13644
13650
|
formattedValue: fi(t, n),
|
|
13651
|
+
size: e.deps.gridSize,
|
|
13645
13652
|
checkboxEditorParams: n.checkboxEditorParams,
|
|
13646
13653
|
switchEditorParams: n.switchEditorParams,
|
|
13647
13654
|
stopEditing: (t = !0) => e.stopEditing(!t),
|
|
@@ -14249,18 +14256,10 @@ function _y(e, t) {
|
|
|
14249
14256
|
return;
|
|
14250
14257
|
}
|
|
14251
14258
|
let n = e.deps.columnModel.getColumns().filter((n) => K(n, t.rowNode, e.deps.getCellDisableContext()) && !Lo(n)).map((n) => {
|
|
14252
|
-
let r = e.createCellEditorParams(t.rowNode, n);
|
|
14259
|
+
let r = e.createCellEditorParams(t.rowNode, n), { stopEditing: i, setKeyboardPolicy: a, cancelCommit: o, getEditPhase: s, ...c } = r;
|
|
14253
14260
|
return {
|
|
14254
14261
|
column: n,
|
|
14255
|
-
params:
|
|
14256
|
-
rowId: r.rowId,
|
|
14257
|
-
rowIndex: r.rowIndex,
|
|
14258
|
-
colId: r.colId,
|
|
14259
|
-
value: r.value,
|
|
14260
|
-
data: r.data,
|
|
14261
|
-
formattedValue: r.formattedValue,
|
|
14262
|
-
validate: r.validate
|
|
14263
|
-
},
|
|
14262
|
+
params: c,
|
|
14264
14263
|
oldValue: r.value
|
|
14265
14264
|
};
|
|
14266
14265
|
});
|
|
@@ -20456,6 +20455,7 @@ var sw = class {
|
|
|
20456
20455
|
showUnsortedSortHintOnHover;
|
|
20457
20456
|
columnSortOptions;
|
|
20458
20457
|
resolvedSummaryRowHeight;
|
|
20458
|
+
gridSize;
|
|
20459
20459
|
footerRenderer = null;
|
|
20460
20460
|
floatingFilterController = null;
|
|
20461
20461
|
lastSetDataMs = 0;
|
|
@@ -20530,7 +20530,7 @@ var sw = class {
|
|
|
20530
20530
|
treeTable: n.mode === "tree" ? this.treeTableOptions : void 0
|
|
20531
20531
|
}), this.cellRenderersByColId, this.cellEditorsByColId, fa(t), r, i, o, this.filterGridOptions), this.columnViewport = new Ns(this.columnModel);
|
|
20532
20532
|
let s = t.rowHeight ?? me;
|
|
20533
|
-
this.resolvedSummaryRowHeight = br(this.summaryOptions.summaryRowHeight, s);
|
|
20533
|
+
this.gridSize = t.size ?? "default", this.resolvedSummaryRowHeight = br(this.summaryOptions.summaryRowHeight, s);
|
|
20534
20534
|
let c = t.stripe ?? !1, { editBehavior: l, editType: u } = Ir(t);
|
|
20535
20535
|
this.cellDisableContext = Or({ isRowDisabled: t.isRowDisabled }), this.cellStyleContext = Xr({ rowStyle: t.rowStyle }), this.invalidEditValueMode = t.invalidEditValueMode ?? "block", this.rowValidator = t.rowValidator, this.asyncRowMutation = t.asyncRowMutation, this.editorHost = new ft({
|
|
20536
20536
|
onUnmountEditor: t.onUnmountEditor,
|
|
@@ -20829,6 +20829,7 @@ var sw = class {
|
|
|
20829
20829
|
applyCellRangeScrollVisuals: () => this.applyCellRangeScrollVisuals(),
|
|
20830
20830
|
onHeaderRefresh: () => this.columnHandleMenuController.onHeaderRefresh()
|
|
20831
20831
|
}), this.cellEditing = new yy({
|
|
20832
|
+
gridSize: this.gridSize,
|
|
20832
20833
|
mountEl: this.mountEl,
|
|
20833
20834
|
viewportEl: p.viewportEl,
|
|
20834
20835
|
rowModel: this.rowModel,
|
|
@@ -20856,6 +20857,7 @@ var sw = class {
|
|
|
20856
20857
|
getCellDisableContext: () => this.getCellDisableContext()
|
|
20857
20858
|
});
|
|
20858
20859
|
let m = new gi({
|
|
20860
|
+
gridSize: this.gridSize,
|
|
20859
20861
|
eventBus: this.eventBus,
|
|
20860
20862
|
applyTransaction: (e) => this.commitTransaction(e),
|
|
20861
20863
|
syncPinnedRows: () => this.viewport.syncPinnedRows(),
|
|
@@ -21116,6 +21118,7 @@ var sw = class {
|
|
|
21116
21118
|
getDataPath: () => this.treeTableOptions.getDataPath,
|
|
21117
21119
|
setDataPath: () => this.treeTableOptions.setDataPath
|
|
21118
21120
|
}), this.cellRangeFillWriteService = new $_({
|
|
21121
|
+
gridSize: this.gridSize,
|
|
21119
21122
|
rowModel: this.rowModel,
|
|
21120
21123
|
columnModel: this.columnModel,
|
|
21121
21124
|
eventBus: this.eventBus,
|
|
@@ -21124,6 +21127,7 @@ var sw = class {
|
|
|
21124
21127
|
applyTransaction: (e) => this.commitTransaction(e),
|
|
21125
21128
|
refreshCells: (e) => this.refreshCells(e)
|
|
21126
21129
|
}), this.cellRangeDeleteWriteService = new ev({
|
|
21130
|
+
gridSize: this.gridSize,
|
|
21127
21131
|
rowModel: this.rowModel,
|
|
21128
21132
|
columnModel: this.columnModel,
|
|
21129
21133
|
eventBus: this.eventBus,
|
|
@@ -21132,6 +21136,7 @@ var sw = class {
|
|
|
21132
21136
|
applyTransaction: (e) => this.commitTransaction(e),
|
|
21133
21137
|
refreshCells: (e) => this.refreshCells(e)
|
|
21134
21138
|
}), this.cellClipboardService = new R_({
|
|
21139
|
+
gridSize: this.gridSize,
|
|
21135
21140
|
rowModel: this.rowModel,
|
|
21136
21141
|
columnModel: this.columnModel,
|
|
21137
21142
|
eventBus: this.eventBus,
|
|
@@ -23143,6 +23148,7 @@ var Hw = ["data-status-bar", "data-toolbar"], Uw = {
|
|
|
23143
23148
|
rowKey: N.rowKey,
|
|
23144
23149
|
rowHeight: z.value.rowHeight,
|
|
23145
23150
|
headerHeight: z.value.headerHeight,
|
|
23151
|
+
size: z.value.size,
|
|
23146
23152
|
rowBuffer: N.rowBuffer,
|
|
23147
23153
|
scrollEndFlushMs: N.scrollEndFlushMs,
|
|
23148
23154
|
frameBudgetMs: N.frameBudgetMs,
|