@affino/datagrid-vue-app 0.1.7 → 0.1.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/DataGrid.d.ts +18 -0
- package/dist/chunks/{DataGridGanttStage.vue_vue_type_script_setup_true_lang-DiaL9sUh.js → DataGridGanttStage.vue_vue_type_script_setup_true_lang-BYUAjngz.js} +1 -1
- package/dist/chunks/{DataGridGanttStageEntry-B8Ghe1BD.js → DataGridGanttStageEntry-CaMj_sad.js} +1 -1
- package/dist/chunks/{DataGridTableStage.vue_vue_type_script_setup_true_lang-Bb5ixAcf.js → DataGridTableStage.vue_vue_type_script_setup_true_lang-l1nn1PNS.js} +126 -122
- package/dist/chunks/{useDataGridAppRowModel-BX3O48Yb.js → useDataGridAppRowModel-D_G_3vas.js} +301 -285
- package/dist/gantt.js +1 -1
- package/dist/host/DataGridDefaultRenderer.d.ts +18 -0
- package/dist/index.js +24 -14
- package/dist/internal.js +3 -3
- package/dist/stage/dataGridTableStage.types.d.ts +2 -0
- package/dist/stage/useDataGridTableStageRuntime.d.ts +2 -0
- package/package.json +3 -3
package/dist/gantt.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as t } from "./chunks/DataGridGanttStageEntry-
|
|
1
|
+
import { default as t } from "./chunks/DataGridGanttStageEntry-CaMj_sad.js";
|
|
2
2
|
import { buildDataGridTimelineRenderModels as r, normalizeDataGridGanttOptions as d, resolveDataGridTimelineRange as n } from "@affino/datagrid-gantt";
|
|
3
3
|
export {
|
|
4
4
|
t as DataGridGanttStage,
|
|
@@ -121,6 +121,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
121
121
|
type: PropType<number | null>;
|
|
122
122
|
default: null;
|
|
123
123
|
};
|
|
124
|
+
fillHandle: {
|
|
125
|
+
type: BooleanConstructor;
|
|
126
|
+
default: boolean;
|
|
127
|
+
};
|
|
128
|
+
rangeMove: {
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
default: boolean;
|
|
131
|
+
};
|
|
124
132
|
rowHover: {
|
|
125
133
|
type: BooleanConstructor;
|
|
126
134
|
default: boolean;
|
|
@@ -264,6 +272,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
264
272
|
type: PropType<number | null>;
|
|
265
273
|
default: null;
|
|
266
274
|
};
|
|
275
|
+
fillHandle: {
|
|
276
|
+
type: BooleanConstructor;
|
|
277
|
+
default: boolean;
|
|
278
|
+
};
|
|
279
|
+
rangeMove: {
|
|
280
|
+
type: BooleanConstructor;
|
|
281
|
+
default: boolean;
|
|
282
|
+
};
|
|
267
283
|
rowHover: {
|
|
268
284
|
type: BooleanConstructor;
|
|
269
285
|
default: boolean;
|
|
@@ -319,6 +335,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
319
335
|
renderMode: "virtualization" | "pagination";
|
|
320
336
|
minRows: number | null;
|
|
321
337
|
maxRows: number | null;
|
|
338
|
+
fillHandle: boolean;
|
|
339
|
+
rangeMove: boolean;
|
|
322
340
|
viewMode: DataGridAppViewMode;
|
|
323
341
|
toolbarModules: readonly DataGridAppToolbarModule[];
|
|
324
342
|
inspectorPanel: DataGridAppInspectorPanel | null;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as ue, ref as Y, provide as ye, computed as f, watch as p, onBeforeUnmount as ee, h as Z, mergeProps as we, toRef as oe } from "vue";
|
|
2
2
|
import { useDataGridRuntime as pe } from "@affino/datagrid-vue";
|
|
3
3
|
import { useDataGridAppSelection as Se, useDataGridAppRowSelection as he } from "@affino/datagrid-vue/app";
|
|
4
|
-
import { d as Re, e as be, f as Me, r as Oe, g as Be, u as Ae, D as Ce } from "./chunks/useDataGridAppRowModel-
|
|
4
|
+
import { d as Re, e as be, f as Me, r as Oe, g as Be, u as Ae, D as Ce } from "./chunks/useDataGridAppRowModel-D_G_3vas.js";
|
|
5
5
|
import { applyGridTheme as xe, resolveGridThemeTokens as Pe, defaultStyleConfig as C, sugarTheme as se, industrialNeutralTheme as ne } from "@affino/datagrid-theme";
|
|
6
6
|
import { d as Ge } from "./chunks/DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-_1TDQseN.js";
|
|
7
7
|
const De = {
|
|
@@ -92,7 +92,7 @@ function ze(e, t, r, n) {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
const $ = "Advanced filter";
|
|
95
|
-
function
|
|
95
|
+
function He(e) {
|
|
96
96
|
return typeof e == "boolean" ? {
|
|
97
97
|
enabled: e,
|
|
98
98
|
buttonLabel: $
|
|
@@ -110,7 +110,7 @@ function ie(e) {
|
|
|
110
110
|
const t = Math.max(0, Math.trunc(e));
|
|
111
111
|
return t > 0 ? t : null;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function We(e, t, r) {
|
|
114
114
|
const n = e === "auto-height" ? "auto-height" : "fill";
|
|
115
115
|
if (n !== "auto-height")
|
|
116
116
|
return {
|
|
@@ -126,11 +126,11 @@ function Ve(e, t, r) {
|
|
|
126
126
|
maxRows: a
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Ve(e) {
|
|
130
130
|
return typeof e == "object" && e !== null;
|
|
131
131
|
}
|
|
132
132
|
function de(e, t, r) {
|
|
133
|
-
const n =
|
|
133
|
+
const n = Ve(e) ? e : null, c = t(n && "state" in n ? n.state : e, r);
|
|
134
134
|
if (!c)
|
|
135
135
|
return null;
|
|
136
136
|
const a = n?.viewMode, y = a === "gantt" ? "gantt" : a === "table" ? "table" : void 0;
|
|
@@ -523,7 +523,7 @@ function qe(e) {
|
|
|
523
523
|
}), r = o.columnModel.subscribe(() => {
|
|
524
524
|
g();
|
|
525
525
|
}), L(), O(), v(), G(), D(), M(), I(), g(), e.emit.ready({ api: o.api }));
|
|
526
|
-
},
|
|
526
|
+
}, H = () => e.gridRef.value?.api.state.get() ?? null, W = (o, d) => e.gridRef.value?.api.state.migrate(o, d) ?? null, V = (o) => {
|
|
527
527
|
const d = e.gridRef.value?.api;
|
|
528
528
|
if (!d)
|
|
529
529
|
return !1;
|
|
@@ -625,9 +625,9 @@ function qe(e) {
|
|
|
625
625
|
handleGridReady: j,
|
|
626
626
|
dispose: K,
|
|
627
627
|
getColumnState: P,
|
|
628
|
-
getState:
|
|
629
|
-
migrateState:
|
|
630
|
-
applyColumnState:
|
|
628
|
+
getState: H,
|
|
629
|
+
migrateState: W,
|
|
630
|
+
applyColumnState: V,
|
|
631
631
|
applyState: E,
|
|
632
632
|
exportPivotLayout: k,
|
|
633
633
|
exportPivotInterop: N,
|
|
@@ -867,6 +867,14 @@ const Ye = ue({
|
|
|
867
867
|
type: Number,
|
|
868
868
|
default: void 0
|
|
869
869
|
},
|
|
870
|
+
fillHandle: {
|
|
871
|
+
type: Boolean,
|
|
872
|
+
default: !1
|
|
873
|
+
},
|
|
874
|
+
rangeMove: {
|
|
875
|
+
type: Boolean,
|
|
876
|
+
default: !1
|
|
877
|
+
},
|
|
870
878
|
rowHover: {
|
|
871
879
|
type: Boolean,
|
|
872
880
|
default: !1
|
|
@@ -908,7 +916,7 @@ const Ye = ue({
|
|
|
908
916
|
i.value,
|
|
909
917
|
e.pageSize,
|
|
910
918
|
e.currentPage
|
|
911
|
-
)), b = f(() => Re(e.columnMenu)), A = f(() => be(e.cellMenu)), x = f(() => Me(e.rowIndexMenu)), P = f(() => Ne(e.columnLayout)), g = f(() => Ue(e.aggregations)), v = f(() =>
|
|
919
|
+
)), b = f(() => Re(e.columnMenu)), A = f(() => be(e.cellMenu)), x = f(() => Me(e.rowIndexMenu)), P = f(() => Ne(e.columnLayout)), g = f(() => Ue(e.aggregations)), v = f(() => He(e.advancedFilter)), G = f(() => Fe(e.groupBy)), D = f(() => _e(e.virtualization, i.value)), M = f(() => We(e.layoutMode, e.minRows, e.maxRows)), O = f(() => Oe({
|
|
912
920
|
columns: e.columns,
|
|
913
921
|
clientRowModelOptions: e.clientRowModelOptions,
|
|
914
922
|
computedFields: e.computedFields,
|
|
@@ -960,11 +968,11 @@ const Ye = ue({
|
|
|
960
968
|
get columns() {
|
|
961
969
|
return e.columns;
|
|
962
970
|
}
|
|
963
|
-
}, j = f(() => e.pivotModel ? "pivot" : O.value && "initialTreeData" in O.value ? "tree" : "base"),
|
|
971
|
+
}, j = f(() => e.pivotModel ? "pivot" : O.value && "initialTreeData" in O.value ? "tree" : "base"), H = f(() => a.value?.api.columns.getSnapshot().visibleColumns ?? []), W = f(() => a.value?.api.rows.getCount() ?? 0), V = {
|
|
964
972
|
mode: f(() => j.value),
|
|
965
973
|
resolveRuntime: () => a.value,
|
|
966
|
-
visibleColumns:
|
|
967
|
-
totalRows:
|
|
974
|
+
visibleColumns: H,
|
|
975
|
+
totalRows: W,
|
|
968
976
|
showRowSelection: f(() => e.rowSelection)
|
|
969
977
|
}, {
|
|
970
978
|
selectionSnapshot: E,
|
|
@@ -972,7 +980,7 @@ const Ye = ue({
|
|
|
972
980
|
syncSelectionSnapshotFromRuntime: N,
|
|
973
981
|
selectionService: U,
|
|
974
982
|
selectionAggregatesLabel: _
|
|
975
|
-
} = Se(
|
|
983
|
+
} = Se(V), {
|
|
976
984
|
rowSelectionSnapshot: F,
|
|
977
985
|
syncRowSelectionSnapshotFromRuntime: K,
|
|
978
986
|
reconcileRowSelectionFromRuntime: o,
|
|
@@ -1110,6 +1118,8 @@ const Ye = ue({
|
|
|
1110
1118
|
layoutMode: M.value.layoutMode,
|
|
1111
1119
|
minRows: M.value.minRows,
|
|
1112
1120
|
maxRows: M.value.maxRows,
|
|
1121
|
+
fillHandle: e.fillHandle,
|
|
1122
|
+
rangeMove: e.rangeMove,
|
|
1113
1123
|
rowHover: e.rowHover,
|
|
1114
1124
|
stripedRows: e.stripedRows,
|
|
1115
1125
|
isCellEditable: e.isCellEditable,
|
package/dist/internal.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { d as t, r } from "./chunks/DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-_1TDQseN.js";
|
|
2
2
|
import { buildDataGridChromePaneModel as o, buildDataGridChromeRenderModel as d } from "@affino/datagrid-chrome";
|
|
3
|
-
import { D as l, a as n, r as G, u as D, b as S, c as u } from "./chunks/useDataGridAppRowModel-
|
|
4
|
-
import { _ as b } from "./chunks/DataGridGanttStage.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { D as l, a as n, r as G, u as D, b as S, c as u } from "./chunks/useDataGridAppRowModel-D_G_3vas.js";
|
|
4
|
+
import { _ as b } from "./chunks/DataGridGanttStage.vue_vue_type_script_setup_true_lang-BYUAjngz.js";
|
|
5
5
|
import { _ as m } from "./chunks/DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-DixN56Qv.js";
|
|
6
|
-
import { _ as c, c as x, a as R, d as f, p as C, u as M, b as v, e as h, f as w, g as y, h as A, i as F, j as O, k as P, l as _, m as E, n as H } from "./chunks/DataGridTableStage.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as c, c as x, a as R, d as f, p as C, u as M, b as v, e as h, f as w, g as y, h as A, i as F, j as O, k as P, l as _, m as E, n as H } from "./chunks/DataGridTableStage.vue_vue_type_script_setup_true_lang-l1nn1PNS.js";
|
|
7
7
|
import { buildDataGridTimelineRenderModels as V, normalizeDataGridGanttOptions as j, resolveDataGridTimelineRange as k } from "@affino/datagrid-gantt";
|
|
8
8
|
export {
|
|
9
9
|
m as DataGridAdvancedFilterPopover,
|
|
@@ -93,6 +93,8 @@ export interface DataGridTableStageSelectionSection {
|
|
|
93
93
|
selectionAnchorCell?: DataGridTableStageAnchorCell | null;
|
|
94
94
|
fillPreviewRange: DataGridOverlayRange | null;
|
|
95
95
|
rangeMovePreviewRange: DataGridOverlayRange | null;
|
|
96
|
+
fillHandleEnabled: boolean;
|
|
97
|
+
rangeMoveEnabled: boolean;
|
|
96
98
|
isFillDragging: boolean;
|
|
97
99
|
isRangeMoving: boolean;
|
|
98
100
|
fillActionAnchorCell?: DataGridTableStageAnchorCell | null;
|
|
@@ -18,6 +18,8 @@ export interface UseDataGridTableStageRuntimeOptions<TRow extends Record<string,
|
|
|
18
18
|
layoutMode: Ref<DataGridLayoutMode>;
|
|
19
19
|
minRows: Ref<number | null>;
|
|
20
20
|
maxRows: Ref<number | null>;
|
|
21
|
+
enableFillHandle: Ref<boolean>;
|
|
22
|
+
enableRangeMove: Ref<boolean>;
|
|
21
23
|
rows: Ref<readonly TRow[]>;
|
|
22
24
|
sourceRows?: Ref<readonly TRow[]>;
|
|
23
25
|
runtime: DataGridTableStageBodyRuntime<TRow>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@affino/datagrid-vue-app",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Declarative Vue DataGrid component for Affino",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@affino/popover-vue": "^1.1.0",
|
|
36
36
|
"@affino/datagrid-chrome": "0.1.1",
|
|
37
37
|
"@affino/datagrid-gantt": "0.1.1",
|
|
38
|
-
"@affino/datagrid-
|
|
39
|
-
"@affino/datagrid-
|
|
38
|
+
"@affino/datagrid-theme": "0.2.2",
|
|
39
|
+
"@affino/datagrid-vue": "0.3.6"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"vue": "^3.3.0"
|