@affino/datagrid-vue-app 0.1.63 → 0.4.0
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 +25 -7
- package/dist/DataGrid.d.ts +1 -3
- package/dist/advanced-filter.js +1 -1
- package/dist/aggregations.js +1 -1
- package/dist/chunks/{DataGridAdvancedFilterPopover-BmEL_QzN.js → DataGridAdvancedFilterPopover-p_hnZLCA.js} +1 -1
- package/dist/chunks/{DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-BkrpyjJb.js → DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-AVmOe3Bv.js} +1 -1
- package/dist/chunks/{DataGridAggregationsPopover-D-HP10PE.js → DataGridAggregationsPopover-Bzbn6Nuy.js} +1 -1
- package/dist/chunks/{DataGridAggregationsPopover.vue_vue_type_script_setup_true_lang-VYIMuuIQ.js → DataGridAggregationsPopover.vue_vue_type_script_setup_true_lang-TgxL5evy.js} +1 -1
- package/dist/chunks/DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-CpC_nuMk.js +419 -0
- package/dist/chunks/DataGridGanttStageEntry-Cypf1c3l.js +12522 -0
- package/dist/chunks/useDataGridAppRowModel-b5bfkfo3.js +5574 -0
- package/dist/gantt.js +1 -1
- package/dist/host/DataGridDefaultRenderer.d.ts +1 -1
- package/dist/index.js +694 -674
- package/dist/internal.js +3 -3
- package/dist/overlays/DataGridCellComboboxEditor.vue.d.ts +1 -0
- package/dist/perf/dataGridPerfTrace.d.ts +7 -0
- package/dist/stage/DataGridTableStageCenterPane.vue.d.ts +18 -0
- package/dist/stage/DataGridTableStagePinnedPane.vue.d.ts +10 -1
- package/dist/stage/dataGridMouseEventGuards.d.ts +8 -0
- package/dist/stage/dataGridTableStage.types.d.ts +5 -1
- package/dist/stage/dataGridTableStageA11y.d.ts +4 -0
- package/dist/stage/dataGridTableStageBody.types.d.ts +6 -0
- package/dist/stage/useDataGridStageCellRendering.d.ts +1 -1
- package/dist/stage/useDataGridStageCellState.d.ts +2 -0
- package/dist/stage/useDataGridStageChromeCanvas.d.ts +1 -0
- package/dist/stage/useDataGridStageFocusRuntime.d.ts +1 -0
- package/dist/stage/useDataGridStageOverlays.d.ts +1 -0
- package/dist/stage/useDataGridStagePanes.grouped.d.ts +6 -0
- package/dist/stage/useDataGridStageRenderApis.d.ts +6 -0
- package/dist/stage/useDataGridStageRenderApis.grouped.d.ts +6 -0
- package/dist/stage/useDataGridStageRowIndex.d.ts +1 -0
- package/dist/stage/useDataGridStageViewportRuntime.d.ts +4 -0
- package/dist/stage/useDataGridTableStageHistory.d.ts +3 -0
- package/dist/stage/useDataGridTableStageRuntime.d.ts +3 -0
- package/dist/stage/useDataGridTableStageScrollSync.d.ts +8 -0
- package/package.json +7 -7
- package/dist/chunks/DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-Dt_KqrSU.js +0 -405
- package/dist/chunks/DataGridGanttStageEntry-D6OYD0Gx.js +0 -11781
- package/dist/chunks/useDataGridAppRowModel-9ZIepsHi.js +0 -5281
package/dist/internal.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { d as t, r } from "./chunks/dataGridOverlayThemeVars-vzY74EIz.js";
|
|
2
2
|
import { buildDataGridChromePaneModel as i, buildDataGridChromeRenderModel as d } from "@affino/datagrid-chrome";
|
|
3
|
-
import { D as l, a as n, r as G, b as D, c as S, d as u, u as g, e as b, f as T } from "./chunks/useDataGridAppRowModel-
|
|
4
|
-
import { _ as p, a as c, c as R, b as x, d as C, p as f, u as v, e as M, f as h, g as w, h as y, i as F, j as P, k as A, l as O, m as _, n as E, o as H } from "./chunks/DataGridGanttStageEntry-
|
|
5
|
-
import { _ as V } from "./chunks/DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { D as l, a as n, r as G, b as D, c as S, d as u, u as g, e as b, f as T } from "./chunks/useDataGridAppRowModel-b5bfkfo3.js";
|
|
4
|
+
import { _ as p, a as c, c as R, b as x, d as C, p as f, u as v, e as M, f as h, g as w, h as y, i as F, j as P, k as A, l as O, m as _, n as E, o as H } from "./chunks/DataGridGanttStageEntry-Cypf1c3l.js";
|
|
5
|
+
import { _ as V } from "./chunks/DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-AVmOe3Bv.js";
|
|
6
6
|
import { _ as k } from "./chunks/DataGridFindReplacePopover.vue_vue_type_script_setup_true_lang-BEVRKG31.js";
|
|
7
7
|
import { buildDataGridTimelineRenderModels as B, normalizeDataGridGanttOptions as I, resolveDataGridTimelineRange as L } from "@affino/datagrid-gantt";
|
|
8
8
|
export {
|
|
@@ -7,6 +7,7 @@ type __VLS_Props = {
|
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
initialFilter?: string;
|
|
9
9
|
openOnMount?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
10
11
|
};
|
|
11
12
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
13
|
commit: (value: string, target?: CommitTarget | undefined) => void;
|
|
@@ -5,6 +5,12 @@ export type DataGridPerfSample = {
|
|
|
5
5
|
totalMs: number;
|
|
6
6
|
[key: string]: string | number;
|
|
7
7
|
};
|
|
8
|
+
export type DataGridPerfSampleInput = {
|
|
9
|
+
scope: string;
|
|
10
|
+
totalMs: number;
|
|
11
|
+
ts?: number;
|
|
12
|
+
[key: string]: string | number | undefined;
|
|
13
|
+
};
|
|
8
14
|
export type DataGridPerfSummary = {
|
|
9
15
|
scope: string;
|
|
10
16
|
count: number;
|
|
@@ -25,3 +31,4 @@ export declare function resolveDataGridPerfNow(): number;
|
|
|
25
31
|
export declare function createDataGridPerfStore(): DataGridPerfStore;
|
|
26
32
|
export declare function resolveDataGridPerfStore(): DataGridPerfStore | null;
|
|
27
33
|
export declare function recordDataGridPerfSample(sample: DataGridPerfSample): void;
|
|
34
|
+
export declare function recordDataGridPerfSampleIfEnabled(sample: DataGridPerfSampleInput): void;
|
|
@@ -30,6 +30,10 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
30
30
|
type: StringConstructor;
|
|
31
31
|
default: string;
|
|
32
32
|
};
|
|
33
|
+
viewportTabIndex: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
default: number;
|
|
36
|
+
};
|
|
33
37
|
handleScroll: {
|
|
34
38
|
type: PropType<(event: Event) => void>;
|
|
35
39
|
default: undefined;
|
|
@@ -74,6 +78,10 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
74
78
|
type: PropType<((layer: string, value: string) => void) | undefined>;
|
|
75
79
|
default: undefined;
|
|
76
80
|
};
|
|
81
|
+
perfTraceEnabled: {
|
|
82
|
+
type: BooleanConstructor;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
77
85
|
renderApi: {
|
|
78
86
|
type: PropType<DataGridTableStageCenterPaneRenderApi>;
|
|
79
87
|
required: true;
|
|
@@ -107,6 +115,10 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
107
115
|
type: StringConstructor;
|
|
108
116
|
default: string;
|
|
109
117
|
};
|
|
118
|
+
viewportTabIndex: {
|
|
119
|
+
type: NumberConstructor;
|
|
120
|
+
default: number;
|
|
121
|
+
};
|
|
110
122
|
handleScroll: {
|
|
111
123
|
type: PropType<(event: Event) => void>;
|
|
112
124
|
default: undefined;
|
|
@@ -151,6 +163,10 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
151
163
|
type: PropType<((layer: string, value: string) => void) | undefined>;
|
|
152
164
|
default: undefined;
|
|
153
165
|
};
|
|
166
|
+
perfTraceEnabled: {
|
|
167
|
+
type: BooleanConstructor;
|
|
168
|
+
default: boolean;
|
|
169
|
+
};
|
|
154
170
|
renderApi: {
|
|
155
171
|
type: PropType<DataGridTableStageCenterPaneRenderApi>;
|
|
156
172
|
required: true;
|
|
@@ -166,10 +182,12 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
166
182
|
viewportRef: DataGridElementRefHandler;
|
|
167
183
|
bodyRowsRevision: string | number | null;
|
|
168
184
|
viewportClass: string;
|
|
185
|
+
viewportTabIndex: number;
|
|
169
186
|
handleScroll: (event: Event) => void;
|
|
170
187
|
handleWheel: (event: WheelEvent) => void;
|
|
171
188
|
handleContextMenu: (event: MouseEvent) => void;
|
|
172
189
|
overlayLanes: readonly DataGridTableStageOverlayLane[];
|
|
190
|
+
perfTraceEnabled: boolean;
|
|
173
191
|
}, {}>;
|
|
174
192
|
declare const _default: typeof __VLS_export;
|
|
175
193
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
2
|
import type { DataGridTableStagePinnedPaneProps, DataGridTableStagePinnedPaneRenderApi } from "./dataGridTableStageBody.types";
|
|
3
3
|
declare var __VLS_1: {};
|
|
4
4
|
type __VLS_Slots = {} & {
|
|
@@ -17,6 +17,10 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
17
17
|
type: PropType<(event: MouseEvent) => void>;
|
|
18
18
|
default: undefined;
|
|
19
19
|
};
|
|
20
|
+
perfTraceEnabled: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
20
24
|
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
25
|
pane: {
|
|
22
26
|
type: PropType<DataGridTableStagePinnedPaneProps>;
|
|
@@ -30,8 +34,13 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
30
34
|
type: PropType<(event: MouseEvent) => void>;
|
|
31
35
|
default: undefined;
|
|
32
36
|
};
|
|
37
|
+
perfTraceEnabled: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
33
41
|
}>>, {
|
|
34
42
|
handleContextMenu: (event: MouseEvent) => void;
|
|
43
|
+
perfTraceEnabled: boolean;
|
|
35
44
|
}, {}>;
|
|
36
45
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
46
|
declare const _default: typeof __VLS_export;
|
|
@@ -3,7 +3,15 @@ export interface DataGridInteractionModeInput {
|
|
|
3
3
|
interactionMode?: DataGridInteractionMode;
|
|
4
4
|
isCoarsePointer?: boolean;
|
|
5
5
|
}
|
|
6
|
+
export interface DataGridMouseEventPolicy {
|
|
7
|
+
interactionMode: Exclude<DataGridInteractionMode, "auto">;
|
|
8
|
+
touchGenerated: boolean;
|
|
9
|
+
nativeScrollPriority: boolean;
|
|
10
|
+
preventDefaultAllowed: boolean;
|
|
11
|
+
}
|
|
6
12
|
export declare function isTouchGeneratedMouseEvent(event: MouseEvent): boolean;
|
|
7
13
|
export declare function resolveDataGridInteractionMode(input?: DataGridInteractionModeInput): Exclude<DataGridInteractionMode, "auto">;
|
|
8
14
|
export declare function shouldPrioritizeNativeScrollForMouseDown(event: MouseEvent, input?: DataGridInteractionModeInput): boolean;
|
|
9
15
|
export declare function shouldPrioritizeNativeScrollForMouseEvent(event: MouseEvent, input?: DataGridInteractionModeInput): boolean;
|
|
16
|
+
export declare function resolveDataGridMouseEventPolicy(event: MouseEvent, input?: DataGridInteractionModeInput): DataGridMouseEventPolicy;
|
|
17
|
+
export declare function shouldAllowGridPreventDefaultForMouseEvent(event: MouseEvent, input?: DataGridInteractionModeInput): boolean;
|
|
@@ -108,6 +108,7 @@ export interface DataGridTableStageRowsSection<TRow extends Record<string, unkno
|
|
|
108
108
|
displayRows: readonly DataGridTableRow<TRow>[];
|
|
109
109
|
displayRowsRevision?: number;
|
|
110
110
|
runtimeRevision?: string | number | null;
|
|
111
|
+
pinnedTopRows: readonly DataGridTableRow<TRow>[];
|
|
111
112
|
pinnedBottomRows: readonly DataGridTableRow<TRow>[];
|
|
112
113
|
sourceRows?: readonly TRow[];
|
|
113
114
|
showRowIndex?: boolean;
|
|
@@ -158,6 +159,9 @@ export interface DataGridTableStageEditingSection<TRow extends Record<string, un
|
|
|
158
159
|
editingCellValue: string;
|
|
159
160
|
editingCellInitialFilter: string;
|
|
160
161
|
editingCellOpenOnMount: boolean;
|
|
162
|
+
editingCellValidationMessage: string | null;
|
|
163
|
+
editingCellPending: boolean;
|
|
164
|
+
editingCellRejectedReason: string | null;
|
|
161
165
|
isEditingCell: (row: DataGridTableRow<TRow>, columnKey: string) => boolean;
|
|
162
166
|
startInlineEdit: (row: DataGridTableRow<TRow>, columnKey: string, options?: {
|
|
163
167
|
draftValue?: string;
|
|
@@ -216,7 +220,7 @@ interface DataGridTableStageBindingsSource<TRow extends Record<string, unknown>>
|
|
|
216
220
|
}
|
|
217
221
|
export interface UseDataGridTableStageBindingsOptions<TRow extends Record<string, unknown>> extends Omit<{
|
|
218
222
|
[K in keyof DataGridTableStageBindingsSource<TRow>]: DataGridMaybeRef<DataGridTableStageBindingsSource<TRow>[K]>;
|
|
219
|
-
}, "editingCellValue" | "headerViewportRef" | "bodyViewportRef"
|
|
223
|
+
}, "editingCellValue" | "headerViewportRef" | "bodyViewportRef"> {
|
|
220
224
|
editingCellValueRef: Ref<string>;
|
|
221
225
|
headerViewportRef: Ref<HTMLElement | null>;
|
|
222
226
|
bodyViewportRef: Ref<HTMLElement | null>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function sanitizeDataGridStageA11yIdPart(value: string): string;
|
|
2
|
+
export declare function resolveDataGridStageCellId(rowId: string | number | null | undefined, columnKey: string): string;
|
|
3
|
+
export declare function resolveDataGridStageHeaderId(columnKey: string): string;
|
|
4
|
+
export declare const DATA_GRID_STAGE_ROW_INDEX_HEADER_ID = "datagrid-stage-header-row-index";
|
|
@@ -37,6 +37,9 @@ export type DataGridTableStageSelectEditorOptionsLoader = (query: string) => Pro
|
|
|
37
37
|
export interface DataGridTableStageBodyRenderApiBase {
|
|
38
38
|
absoluteRowIndex: (row: DataGridTableStageBodyRow, rowOffset: number) => number;
|
|
39
39
|
viewportRowOffset: (row: DataGridTableStageBodyRow, rowOffset: number) => number;
|
|
40
|
+
rowAriaExpanded: (row: DataGridTableStageBodyRow) => "true" | "false" | undefined;
|
|
41
|
+
rowAriaLabel: (row: DataGridTableStageBodyRow, rowOffset: number) => string | undefined;
|
|
42
|
+
rowAriaDisabled: (row: DataGridTableStageBodyRow, rowOffset: number) => "true" | undefined;
|
|
40
43
|
rowStateClasses: (row: DataGridTableStageBodyRow, rowOffset: number) => Record<string, boolean>;
|
|
41
44
|
handleRowContainerClick: (row: DataGridTableStageBodyRow) => void;
|
|
42
45
|
setHoveredRow: (row: DataGridTableStageBodyRow, rowOffset: number) => void;
|
|
@@ -48,7 +51,9 @@ export interface DataGridTableStageBodyRenderApiBase {
|
|
|
48
51
|
bodyCellSelectionStyle: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn, rowOffset: number, columnIndex: number) => CSSProperties;
|
|
49
52
|
resolveCellCustomStyle: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => CSSProperties;
|
|
50
53
|
columnIndexByKey: (columnKey: string) => number;
|
|
54
|
+
cellDomId: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => string;
|
|
51
55
|
cellTabIndex: (rowOffset: number, columnIndex: number) => number;
|
|
56
|
+
cellAriaSelected: (rowOffset: number, columnIndex: number) => "true" | "false";
|
|
52
57
|
cellAriaRole: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => string | undefined;
|
|
53
58
|
cellAriaChecked: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => "true" | "false" | "mixed" | undefined;
|
|
54
59
|
cellAriaPressed: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => "true" | "false" | "mixed" | undefined;
|
|
@@ -82,6 +87,7 @@ export interface DataGridTableStageBodyRenderApiBase {
|
|
|
82
87
|
resolveSelectEditorValue: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => string;
|
|
83
88
|
resolveSelectEditorOptions: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => readonly DataGridTableStageSelectEditorOption[];
|
|
84
89
|
resolveSelectEditorOptionsLoader: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => DataGridTableStageSelectEditorOptionsLoader | undefined;
|
|
90
|
+
cellEditorAriaLabel: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => string;
|
|
85
91
|
handleSelectEditorCommit: (value: string, target?: "stay" | "next" | "previous") => void;
|
|
86
92
|
handleSelectEditorCancel: () => void;
|
|
87
93
|
handleSelectEditorOptionsResolved: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn, options: ReadonlyArray<DataGridFilterableComboboxOption>) => void;
|
|
@@ -15,7 +15,7 @@ export interface UseDataGridStageCellRenderingOptions {
|
|
|
15
15
|
isEditingCellSafe: (row: DataGridTableRow<Record<string, unknown>>, columnKey: string) => boolean;
|
|
16
16
|
columnIndexByKey: (columnKey: string) => number;
|
|
17
17
|
suppressInlineEditStart?: Readonly<Ref<boolean>>;
|
|
18
|
-
|
|
18
|
+
perfTraceEnabled?: boolean;
|
|
19
19
|
}
|
|
20
20
|
export interface UseDataGridStageCellRenderingResult {
|
|
21
21
|
startInlineEditIfAllowed: (row: DataGridTableRow<Record<string, unknown>>, column: DataGridTableStageBodyColumn, rowOffset: number, event?: MouseEvent) => void;
|
|
@@ -8,6 +8,7 @@ export interface UseDataGridStageCellStateOptions {
|
|
|
8
8
|
isCellEditableSafe: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => boolean;
|
|
9
9
|
isEditingCellSafe: (row: DataGridTableStageBodyRow, columnKey: string) => boolean;
|
|
10
10
|
resolveCellEditorMode: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => "none" | "text" | "select" | "date" | "datetime";
|
|
11
|
+
isCellSelectedSafe: (rowOffset: number, columnIndex: number) => boolean;
|
|
11
12
|
isVisualSelectionAnchorCell: (rowOffset: number, columnIndex: number) => boolean;
|
|
12
13
|
shouldHighlightSelectedCellVisual: (rowOffset: number, columnIndex: number) => boolean;
|
|
13
14
|
isRangeMoveHandleHoverCell: (rowOffset: number, columnIndex: number) => boolean;
|
|
@@ -18,6 +19,7 @@ export interface UseDataGridStageCellStateOptions {
|
|
|
18
19
|
export interface UseDataGridStageCellStateResult {
|
|
19
20
|
builtInCellClasses: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => Record<string, boolean>;
|
|
20
21
|
cellStateClasses: (row: DataGridTableStageBodyRow, rowOffset: number, columnIndex: number) => Record<string, boolean>;
|
|
22
|
+
cellAriaSelected: (rowOffset: number, columnIndex: number) => "true" | "false";
|
|
21
23
|
cellAriaRole: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => string | undefined;
|
|
22
24
|
cellAriaChecked: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => "true" | "false" | "mixed" | undefined;
|
|
23
25
|
cellAriaPressed: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => "true" | "false" | "mixed" | undefined;
|
|
@@ -27,6 +27,7 @@ export interface UseDataGridStageChromeCanvasOptions {
|
|
|
27
27
|
headerChromeRenderModel: ComputedRef<DataGridChromeRenderModel>;
|
|
28
28
|
pinnedBottomChromeRenderModel: ComputedRef<DataGridChromeRenderModel>;
|
|
29
29
|
hasPivotHeaderGroups: ComputedRef<boolean>;
|
|
30
|
+
perfTraceEnabled?: boolean;
|
|
30
31
|
}
|
|
31
32
|
export interface UseDataGridStageChromeCanvasResult {
|
|
32
33
|
syncBodyViewportMetrics: () => void;
|
|
@@ -15,6 +15,7 @@ export interface UseDataGridStageFocusRuntimeOptions {
|
|
|
15
15
|
isCellEditableSafe: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => boolean;
|
|
16
16
|
isBodyViewportScrolling?: Readonly<Ref<boolean>>;
|
|
17
17
|
runWhenBodyViewportScrollIdle?: (callback: () => void) => void;
|
|
18
|
+
shouldRestoreAnchorFocus?: () => boolean;
|
|
18
19
|
}
|
|
19
20
|
export interface UseDataGridStageFocusRuntimeResult {
|
|
20
21
|
isVisibleCellEditableByAbsoluteCoord: (rowIndex: number, columnIndex: number) => boolean;
|
|
@@ -24,6 +24,7 @@ export interface UseDataGridStageOverlaysOptions {
|
|
|
24
24
|
resolveVisibleRangeBounds: (range: DataGridOverlayRange | null) => DataGridStageOverlayBounds | null;
|
|
25
25
|
resolvePinnedBottomVisibleRangeBounds: (range: DataGridOverlayRange | null) => DataGridStageOverlayBounds | null;
|
|
26
26
|
customOverlays: ComputedRef<readonly DataGridTableStageCustomOverlay[]>;
|
|
27
|
+
perfTraceEnabled?: boolean;
|
|
27
28
|
}
|
|
28
29
|
export interface UseDataGridStageOverlaysResult {
|
|
29
30
|
leftSelectionOverlaySegments: ComputedRef<readonly DataGridTableStageOverlaySegment[]>;
|
|
@@ -13,9 +13,12 @@ type LayoutRuntime = Readonly<Ref<{
|
|
|
13
13
|
type PaneRuntime = Readonly<Ref<{
|
|
14
14
|
leftPaneContentRef: Ref<HTMLElement | null>;
|
|
15
15
|
rightPaneContentRef: Ref<HTMLElement | null>;
|
|
16
|
+
leftTopPaneContentRef: Ref<HTMLElement | null>;
|
|
17
|
+
rightTopPaneContentRef: Ref<HTMLElement | null>;
|
|
16
18
|
leftBottomPaneContentRef: Ref<HTMLElement | null>;
|
|
17
19
|
rightBottomPaneContentRef: Ref<HTMLElement | null>;
|
|
18
20
|
displayRows: Readonly<Ref<readonly DataGridTableStageBodyRow[]>>;
|
|
21
|
+
pinnedTopRows: Readonly<Ref<readonly DataGridTableStageBodyRow[]>>;
|
|
19
22
|
pinnedBottomRows: Readonly<Ref<readonly DataGridTableStageBodyRow[]>>;
|
|
20
23
|
showRowIndex: Readonly<Ref<boolean>>;
|
|
21
24
|
pinnedLeftColumns: Readonly<Ref<readonly DataGridTableStageBodyColumn[]>>;
|
|
@@ -76,9 +79,12 @@ export interface UseDataGridStagePanesResult {
|
|
|
76
79
|
rightTrackStyle: ComputedRef<CSSProperties>;
|
|
77
80
|
centerHeaderChromeCanvasStyle: ComputedRef<CSSProperties>;
|
|
78
81
|
centerChromeCanvasStyle: ComputedRef<CSSProperties>;
|
|
82
|
+
centerTopChromeCanvasStyle: ComputedRef<CSSProperties>;
|
|
79
83
|
centerBottomChromeCanvasStyle: ComputedRef<CSSProperties>;
|
|
80
84
|
leftPinnedPane: ComputedRef<DataGridTableStagePinnedPaneProps>;
|
|
81
85
|
rightPinnedPane: ComputedRef<DataGridTableStagePinnedPaneProps>;
|
|
86
|
+
leftPinnedTopPane: ComputedRef<DataGridTableStagePinnedPaneProps>;
|
|
87
|
+
rightPinnedTopPane: ComputedRef<DataGridTableStagePinnedPaneProps>;
|
|
82
88
|
leftPinnedBottomPane: ComputedRef<DataGridTableStagePinnedPaneProps>;
|
|
83
89
|
rightPinnedBottomPane: ComputedRef<DataGridTableStagePinnedPaneProps>;
|
|
84
90
|
}
|
|
@@ -74,6 +74,9 @@ export interface UseDataGridStageRenderApisOptions {
|
|
|
74
74
|
isVisibleCellEditableByAbsoluteCoord: (rowIndex: number, columnIndex: number) => boolean;
|
|
75
75
|
resolveAbsoluteRowIndex: (row: DataGridTableStageBodyRow, rowOffset: number) => number;
|
|
76
76
|
resolveViewportRowOffset: (row: DataGridTableStageBodyRow, rowOffset: number) => number;
|
|
77
|
+
rowAriaExpanded: (row: DataGridTableStageBodyRow) => "true" | "false" | undefined;
|
|
78
|
+
rowAriaLabel: (row: DataGridTableStageBodyRow, rowOffset: number) => string | undefined;
|
|
79
|
+
rowAriaDisabled: (row: DataGridTableStageBodyRow, rowOffset: number) => "true" | undefined;
|
|
77
80
|
rowStateClasses: (row: DataGridTableStageBodyRow, rowOffset: number) => Record<string, boolean>;
|
|
78
81
|
handleRowContainerClick: (row: DataGridTableStageBodyRow) => void;
|
|
79
82
|
setHoveredRow: (row: DataGridTableStageBodyRow, rowOffset: number) => void;
|
|
@@ -97,7 +100,9 @@ export interface UseDataGridStageRenderApisOptions {
|
|
|
97
100
|
bodyCellPresentationStyle: (column: DataGridTableStageBodyColumn) => CSSProperties;
|
|
98
101
|
bodyCellSelectionStyle: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn, rowOffset: number, columnIndex: number) => CSSProperties;
|
|
99
102
|
resolveCellCustomStyle: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => CSSProperties;
|
|
103
|
+
cellDomId: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => string;
|
|
100
104
|
cellTabIndex: (rowOffset: number, columnIndex: number) => number;
|
|
105
|
+
cellAriaSelected: (rowOffset: number, columnIndex: number) => "true" | "false";
|
|
101
106
|
cellAriaRole: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => string | undefined;
|
|
102
107
|
cellAriaChecked: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => "true" | "false" | "mixed" | undefined;
|
|
103
108
|
cellAriaPressed: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => "true" | "false" | "mixed" | undefined;
|
|
@@ -126,6 +131,7 @@ export interface UseDataGridStageRenderApisOptions {
|
|
|
126
131
|
resolveSelectEditorValue: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => string;
|
|
127
132
|
resolveSelectEditorOptions: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => readonly DataGridTableStageSelectEditorOption[];
|
|
128
133
|
resolveSelectEditorOptionsLoader: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => DataGridTableStageSelectEditorOptionsLoader | undefined;
|
|
134
|
+
cellEditorAriaLabel: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => string;
|
|
129
135
|
handleSelectEditorCommit: (value: string, target?: "stay" | "next" | "previous") => void;
|
|
130
136
|
handleSelectEditorCancel: () => void;
|
|
131
137
|
handleSelectEditorOptionsResolved: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn, options: ReadonlyArray<DataGridFilterableComboboxOption>) => void;
|
|
@@ -9,6 +9,9 @@ type RowRuntime = Readonly<Ref<{
|
|
|
9
9
|
}>>;
|
|
10
10
|
resolveAbsoluteRowIndex: (row: DataGridTableStageBodyRow, rowOffset: number) => number;
|
|
11
11
|
resolveViewportRowOffset: (row: DataGridTableStageBodyRow, rowOffset: number) => number;
|
|
12
|
+
rowAriaExpanded: (row: DataGridTableStageBodyRow) => "true" | "false" | undefined;
|
|
13
|
+
rowAriaLabel: (row: DataGridTableStageBodyRow, rowOffset: number) => string | undefined;
|
|
14
|
+
rowAriaDisabled: (row: DataGridTableStageBodyRow, rowOffset: number) => "true" | undefined;
|
|
12
15
|
rowStateClasses: (row: DataGridTableStageBodyRow, rowOffset: number) => Record<string, boolean>;
|
|
13
16
|
handleRowContainerClick: (row: DataGridTableStageBodyRow) => void;
|
|
14
17
|
setHoveredRow: (row: DataGridTableStageBodyRow, rowOffset: number) => void;
|
|
@@ -57,7 +60,9 @@ type CellRuntime = Readonly<Ref<{
|
|
|
57
60
|
bodyCellPresentationStyle: (column: DataGridTableStageBodyColumn) => CSSProperties;
|
|
58
61
|
bodyCellSelectionStyle: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn, rowOffset: number, columnIndex: number) => CSSProperties;
|
|
59
62
|
resolveCellCustomStyle: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => CSSProperties;
|
|
63
|
+
cellDomId: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => string;
|
|
60
64
|
cellTabIndex: (rowOffset: number, columnIndex: number) => number;
|
|
65
|
+
cellAriaSelected: (rowOffset: number, columnIndex: number) => "true" | "false";
|
|
61
66
|
cellAriaRole: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => string | undefined;
|
|
62
67
|
cellAriaChecked: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => "true" | "false" | "mixed" | undefined;
|
|
63
68
|
cellAriaPressed: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => "true" | "false" | "mixed" | undefined;
|
|
@@ -117,6 +122,7 @@ type EditorRuntime = Readonly<Ref<{
|
|
|
117
122
|
resolveCellEditorMode: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => "none" | "text" | "select" | "date" | "datetime";
|
|
118
123
|
resolveSelectEditorOptions: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => readonly DataGridTableStageSelectEditorOption[];
|
|
119
124
|
resolveSelectEditorOptionsLoader: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => DataGridTableStageSelectEditorOptionsLoader | undefined;
|
|
125
|
+
cellEditorAriaLabel: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => string;
|
|
120
126
|
handleSelectEditorOptionsResolved: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn, options: ReadonlyArray<DataGridFilterableComboboxOption>) => void;
|
|
121
127
|
readResolvedDisplayCell: (row: DataGridTableStageBodyRow, column: DataGridTableStageBodyColumn) => string;
|
|
122
128
|
renderResolvedCellContent: (row: DataGridTableStageBodyRow, rowOffset: number, column: DataGridTableStageBodyColumn, columnIndex: number) => VNodeChild;
|
|
@@ -7,6 +7,7 @@ export interface UseDataGridStageRowIndexOptions {
|
|
|
7
7
|
layout: Readonly<Ref<DataGridTableStageLayoutSection>>;
|
|
8
8
|
viewportRowStart: Readonly<Ref<number>>;
|
|
9
9
|
selectionRange: Readonly<Ref<DataGridOverlayRange | null>>;
|
|
10
|
+
selectionRanges?: Readonly<Ref<readonly DataGridOverlayRange[]>>;
|
|
10
11
|
visibleColumns: Readonly<Ref<readonly DataGridTableStageBodyColumn[]>>;
|
|
11
12
|
isHoveredRow: (row: DataGridTableStageBodyRow, rowOffset: number) => boolean;
|
|
12
13
|
isStripedRow: (row: DataGridTableStageBodyRow, rowOffset: number) => boolean;
|
|
@@ -20,11 +20,13 @@ export interface UseDataGridStageViewportRuntimeOptions {
|
|
|
20
20
|
}
|
|
21
21
|
export interface UseDataGridStageViewportRuntimeResult {
|
|
22
22
|
bodyViewportEl: Ref<HTMLElement | null>;
|
|
23
|
+
topViewportEl: Ref<HTMLElement | null>;
|
|
23
24
|
bottomViewportEl: Ref<HTMLElement | null>;
|
|
24
25
|
bodyViewportScrollTop: Ref<number>;
|
|
25
26
|
bodyViewportScrollLeft: Ref<number>;
|
|
26
27
|
bodyViewportClientWidth: Ref<number>;
|
|
27
28
|
bodyViewportClientHeight: Ref<number>;
|
|
29
|
+
pinnedTopViewportClientHeight: Ref<number>;
|
|
28
30
|
pinnedBottomViewportClientHeight: Ref<number>;
|
|
29
31
|
bodyViewportTopOffset: Ref<number>;
|
|
30
32
|
headerShellHeight: Ref<number>;
|
|
@@ -33,8 +35,10 @@ export interface UseDataGridStageViewportRuntimeResult {
|
|
|
33
35
|
isBodyViewportScrollIdle: Ref<boolean>;
|
|
34
36
|
runWhenBodyViewportScrollIdle: (callback: () => void) => void;
|
|
35
37
|
captureBodyViewportRef: (value: Element | ComponentPublicInstance | null) => void;
|
|
38
|
+
capturePinnedTopViewportRef: (value: Element | ComponentPublicInstance | null) => void;
|
|
36
39
|
capturePinnedBottomViewportRef: (value: Element | ComponentPublicInstance | null) => void;
|
|
37
40
|
handleCenterViewportScroll: (event: Event) => void;
|
|
41
|
+
handlePinnedTopViewportScroll: (event: Event) => void;
|
|
38
42
|
handlePinnedBottomViewportScroll: (event: Event) => void;
|
|
39
43
|
handleLinkedViewportWheel: (event: WheelEvent) => void;
|
|
40
44
|
handleBodyViewportWheel: (event: WheelEvent) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DataGridAppHistoryRestorationState } from "@affino/datagrid-vue/app";
|
|
1
2
|
import type { DataGridCopyRange } from "@affino/datagrid-vue/advanced";
|
|
2
3
|
import type { DataGridHistoryController } from "../dataGridHistory";
|
|
3
4
|
export interface DataGridTableStageHistoryAdapter {
|
|
@@ -27,6 +28,8 @@ export interface UseDataGridTableStageHistoryOptions<TRow extends Record<string,
|
|
|
27
28
|
syncViewport: () => void;
|
|
28
29
|
enabled?: boolean;
|
|
29
30
|
maxHistoryDepth?: number;
|
|
31
|
+
captureRestorationState?: () => DataGridAppHistoryRestorationState | null;
|
|
32
|
+
applyRestorationState?: (state: DataGridAppHistoryRestorationState) => void | Promise<void>;
|
|
30
33
|
history?: DataGridTableStageHistoryAdapter;
|
|
31
34
|
}
|
|
32
35
|
export interface UseDataGridTableStageHistoryResult extends DataGridHistoryController {
|
|
@@ -81,6 +81,7 @@ export interface UseDataGridTableStageRuntimeOptions<TRow extends Record<string,
|
|
|
81
81
|
getRow?: DataGridRowModel<TRow>["getRow"];
|
|
82
82
|
getRowCount?: DataGridRowModel<TRow>["getRowCount"];
|
|
83
83
|
getRowsInRange?: DataGridRowModel<TRow>["getRowsInRange"];
|
|
84
|
+
getLoadedRowIntervals?: DataGridRowModel<TRow>["getLoadedRowIntervals"];
|
|
84
85
|
dataSource?: {
|
|
85
86
|
resolveFillBoundary?: (request: DataGridAppResolveFillBoundaryRequest) => Promise<DataGridAppResolveFillBoundaryResult> | DataGridAppResolveFillBoundaryResult;
|
|
86
87
|
commitFillOperation?: (request: {
|
|
@@ -113,6 +114,7 @@ export interface UseDataGridTableStageRuntimeOptions<TRow extends Record<string,
|
|
|
113
114
|
} | null;
|
|
114
115
|
warnings?: readonly string[];
|
|
115
116
|
} | null>;
|
|
117
|
+
executeOperation?: (request: Record<string, unknown>) => Promise<Record<string, unknown>> | Record<string, unknown>;
|
|
116
118
|
undoFillOperation?: (request: {
|
|
117
119
|
operationId: string;
|
|
118
120
|
revision?: string | number | null;
|
|
@@ -175,6 +177,7 @@ export interface UseDataGridTableStageRuntimeOptions<TRow extends Record<string,
|
|
|
175
177
|
} | null;
|
|
176
178
|
warnings?: readonly string[];
|
|
177
179
|
} | null>;
|
|
180
|
+
executeOperation?: (request: Record<string, unknown>) => Promise<Record<string, unknown>> | Record<string, unknown>;
|
|
178
181
|
undoFillOperation?: (request: {
|
|
179
182
|
operationId: string;
|
|
180
183
|
revision?: string | number | null;
|
|
@@ -6,10 +6,18 @@ export interface UseDataGridTableStageScrollSyncOptions {
|
|
|
6
6
|
stopColumnResize: () => void;
|
|
7
7
|
handleInteractionWindowMouseMove: (event: MouseEvent) => void;
|
|
8
8
|
handleInteractionWindowMouseUp: () => void;
|
|
9
|
+
handleInteractionWindowPointerUp: () => void;
|
|
10
|
+
handleInteractionWindowPointerCancel: () => void;
|
|
11
|
+
handleInteractionWindowBlur: () => void;
|
|
12
|
+
handleInteractionWindowContextMenuCapture: (event: MouseEvent) => boolean;
|
|
9
13
|
syncViewport: (event: Event) => void;
|
|
10
14
|
}
|
|
11
15
|
export interface UseDataGridTableStageScrollSyncResult {
|
|
12
16
|
handleWindowMouseMove: (event: MouseEvent) => void;
|
|
17
|
+
handleWindowPointerUp: (event: PointerEvent) => void;
|
|
18
|
+
handleWindowPointerCancel: (event: PointerEvent) => void;
|
|
19
|
+
handleWindowBlur: () => void;
|
|
20
|
+
handleWindowContextMenuCapture: (event: MouseEvent) => boolean;
|
|
13
21
|
handleHeaderWheel: (event: WheelEvent) => void;
|
|
14
22
|
handleHeaderScroll: (event: Event) => void;
|
|
15
23
|
handleWindowMouseUp: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@affino/datagrid-vue-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Declarative Vue DataGrid component for Affino",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@affino/menu-vue": "^2.1.1",
|
|
47
47
|
"@affino/popover-vue": "^1.1.0",
|
|
48
|
+
"@affino/datagrid-gantt": "0.1.2",
|
|
48
49
|
"@affino/datagrid-chrome": "0.1.1",
|
|
49
|
-
"@affino/datagrid-vue": "0.
|
|
50
|
-
"@affino/datagrid-theme": "0.2.
|
|
51
|
-
"@affino/datagrid-gantt": "0.1.2"
|
|
50
|
+
"@affino/datagrid-vue": "0.4.0",
|
|
51
|
+
"@affino/datagrid-theme": "0.2.4"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"vue": "^3.3.0"
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"license": "MIT",
|
|
57
57
|
"repository": {
|
|
58
58
|
"type": "git",
|
|
59
|
-
"url": "git+https://github.com/affinio/
|
|
59
|
+
"url": "git+https://github.com/affinio/datagrid.git",
|
|
60
60
|
"directory": "packages/datagrid-vue-app"
|
|
61
61
|
},
|
|
62
|
-
"homepage": "https://github.com/affinio/
|
|
62
|
+
"homepage": "https://github.com/affinio/datagrid/tree/main/packages/datagrid-vue-app#readme",
|
|
63
63
|
"bugs": {
|
|
64
|
-
"url": "https://github.com/affinio/
|
|
64
|
+
"url": "https://github.com/affinio/datagrid/issues"
|
|
65
65
|
},
|
|
66
66
|
"keywords": [
|
|
67
67
|
"datagrid",
|