@affino/datagrid-vue-app 0.1.18 → 0.1.20

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.
Files changed (38) hide show
  1. package/README.md +40 -0
  2. package/dist/DataGrid.d.ts +20 -0
  3. package/dist/DataGridTableStage.vue.d.ts +9 -0
  4. package/dist/advanced-filter.js +1 -1
  5. package/dist/advancedFilterDraftClauses.d.ts +6 -0
  6. package/dist/chunks/{DataGridAdvancedFilterPopover-CabJ-Ztk.js → DataGridAdvancedFilterPopover-CRd9hbEZ.js} +1 -1
  7. package/dist/chunks/{DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-x-cfVm5j.js → DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-DhdOikY0.js} +10 -8
  8. package/dist/chunks/{DataGridAggregationsPopover-DfQ3-UV4.js → DataGridAggregationsPopover-Bu7nZX7u.js} +6 -4
  9. package/dist/chunks/DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-BPU8WkWd.js +373 -0
  10. package/dist/chunks/DataGridFindReplacePopover-DCuFy-bD.js +4 -0
  11. package/dist/chunks/DataGridFindReplacePopover.vue_vue_type_script_setup_true_lang-DfHFHhUf.js +171 -0
  12. package/dist/chunks/DataGridGanttStageEntry-BbSAXYrL.js +8404 -0
  13. package/dist/chunks/dataGridOverlayThemeVars-vzY74EIz.js +33 -0
  14. package/dist/chunks/useDataGridAppRowModel-Cq1nWBYl.js +3498 -0
  15. package/dist/config/dataGridFindReplace.d.ts +9 -0
  16. package/dist/config/dataGridGridLines.d.ts +16 -0
  17. package/dist/dataGridGridLines.d.ts +1 -0
  18. package/dist/find-replace.d.ts +2 -0
  19. package/dist/find-replace.js +4 -0
  20. package/dist/gantt.js +1 -1
  21. package/dist/gestures/dataGridTouchPanGuard.d.ts +13 -0
  22. package/dist/host/DataGridDefaultRenderer.d.ts +29 -1
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.js +437 -366
  25. package/dist/internal.d.ts +1 -0
  26. package/dist/internal.js +19 -17
  27. package/dist/overlays/DataGridFindReplacePopover.vue.d.ts +74 -0
  28. package/dist/stage/DataGridTableStage.vue.d.ts +9 -0
  29. package/dist/stage/dataGridTableStage.types.d.ts +3 -0
  30. package/dist/stage/useDataGridTableStageCellIo.d.ts +1 -0
  31. package/dist/stage/useDataGridTableStageHistory.d.ts +3 -1
  32. package/dist/stage/useDataGridTableStageRuntime.d.ts +17 -2
  33. package/dist/stage/useDataGridTableStageScrollSync.d.ts +1 -1
  34. package/dist/useDataGridAppFindReplace.d.ts +54 -0
  35. package/package.json +7 -3
  36. package/dist/chunks/DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-_1TDQseN.js +0 -399
  37. package/dist/chunks/DataGridGanttStageEntry-CS2wpBnj.js +0 -7815
  38. package/dist/chunks/useDataGridAppRowModel-RrE_k6tK.js +0 -3008
@@ -5,6 +5,7 @@ export { default as DataGridDefaultRenderer } from "./host/DataGridDefaultRender
5
5
  export { default as DataGridGanttStage } from "./gantt/DataGridGanttStage.vue";
6
6
  export { default as DataGridModuleHost } from "./host/DataGridModuleHost";
7
7
  export { default as DataGridAdvancedFilterPopover } from "./overlays/DataGridAdvancedFilterPopover.vue";
8
+ export { default as DataGridFindReplacePopover } from "./overlays/DataGridFindReplacePopover.vue";
8
9
  export { default as DataGridTableStage } from "./stage/DataGridTableStage.vue";
9
10
  export { buildDataGridTimelineRenderModels, normalizeDataGridGanttOptions, resolveDataGridTimelineRange, } from "./gantt/dataGridGantt";
10
11
  export { resolveDataGridFormulaRowModelOptions } from "./config/dataGridFormulaOptions";
package/dist/internal.js CHANGED
@@ -1,40 +1,42 @@
1
- import { d as t, r } from "./chunks/DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-_1TDQseN.js";
1
+ import { d as t, r } from "./chunks/dataGridOverlayThemeVars-vzY74EIz.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-RrE_k6tK.js";
4
- import { _ as b, a as T, c as m, b as p, d as c, p as x, u as R, e as C, f, g as M, h as v, i as h, j as w, k as y, l as A, m as F, n as O, o as P } from "./chunks/DataGridGanttStageEntry-CS2wpBnj.js";
5
- import { _ as H } from "./chunks/DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-x-cfVm5j.js";
6
- import { buildDataGridTimelineRenderModels as V, normalizeDataGridGanttOptions as _, resolveDataGridTimelineRange as j } from "@affino/datagrid-gantt";
3
+ import { D as l, a as n, r as G, u as D, b as S, c as u } from "./chunks/useDataGridAppRowModel-Cq1nWBYl.js";
4
+ import { _ as b, a as T, c as p, b as m, d as c, p as x, u as R, e as f, f as C, g as M, h as v, i as h, j as w, k as y, l as F, m as P, n as A, o as O } from "./chunks/DataGridGanttStageEntry-BbSAXYrL.js";
5
+ import { _ as E } from "./chunks/DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-DhdOikY0.js";
6
+ import { _ as K } from "./chunks/DataGridFindReplacePopover.vue_vue_type_script_setup_true_lang-DfHFHhUf.js";
7
+ import { buildDataGridTimelineRenderModels as j, normalizeDataGridGanttOptions as k, resolveDataGridTimelineRange as z } from "@affino/datagrid-gantt";
7
8
  export {
8
- H as DataGridAdvancedFilterPopover,
9
+ E as DataGridAdvancedFilterPopover,
9
10
  l as DataGridDefaultRenderer,
11
+ K as DataGridFindReplacePopover,
10
12
  b as DataGridGanttStage,
11
13
  n as DataGridModuleHost,
12
14
  T as DataGridTableStage,
13
15
  o as buildDataGridChromePaneModel,
14
16
  d as buildDataGridChromeRenderModel,
15
- V as buildDataGridTimelineRenderModels,
16
- m as createDataGridTableStageContext,
17
- p as createDataGridTableStageContextFromProps,
17
+ j as buildDataGridTimelineRenderModels,
18
+ p as createDataGridTableStageContext,
19
+ m as createDataGridTableStageContextFromProps,
18
20
  t as dataGridAppRootElementKey,
19
21
  c as dataGridTableStageContextKey,
20
- _ as normalizeDataGridGanttOptions,
22
+ k as normalizeDataGridGanttOptions,
21
23
  x as provideDataGridTableStageContext,
22
24
  r as readDataGridOverlayThemeVars,
23
25
  G as resolveDataGridFormulaRowModelOptions,
24
- j as resolveDataGridTimelineRange,
26
+ z as resolveDataGridTimelineRange,
25
27
  D as useDataGridAppRowModel,
26
28
  S as useDataGridTableStageBindings,
27
29
  R as useDataGridTableStageCellsSection,
28
- C as useDataGridTableStageColumnsSection,
29
- f as useDataGridTableStageContext,
30
+ f as useDataGridTableStageColumnsSection,
31
+ C as useDataGridTableStageContext,
30
32
  M as useDataGridTableStageEditingSection,
31
33
  v as useDataGridTableStageInteractionSection,
32
34
  h as useDataGridTableStageLayoutSection,
33
35
  w as useDataGridTableStageMode,
34
36
  y as useDataGridTableStageRowHeightMode,
35
- A as useDataGridTableStageRowsSection,
37
+ F as useDataGridTableStageRowsSection,
36
38
  u as useDataGridTableStageRuntime,
37
- F as useDataGridTableStageSection,
38
- O as useDataGridTableStageSelectionSection,
39
- P as useDataGridTableStageViewportSection
39
+ P as useDataGridTableStageSection,
40
+ A as useDataGridTableStageSelectionSection,
41
+ O as useDataGridTableStageViewportSection
40
42
  };
@@ -0,0 +1,74 @@
1
+ type __VLS_Props = {
2
+ isOpen: boolean;
3
+ findText: string;
4
+ replaceText: string;
5
+ matchCase: boolean;
6
+ statusText?: string;
7
+ buttonLabel?: string;
8
+ active?: boolean;
9
+ canFind?: boolean;
10
+ canReplaceCurrent?: boolean;
11
+ canReplaceAll?: boolean;
12
+ };
13
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
14
+ statusText: string;
15
+ buttonLabel: string;
16
+ active: boolean;
17
+ canFind: boolean;
18
+ canReplaceCurrent: boolean;
19
+ canReplaceAll: boolean;
20
+ }>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ cancel: () => void;
22
+ open: () => void;
23
+ "update-find-text": (value: string) => void;
24
+ "update-replace-text": (value: string) => void;
25
+ "update-match-case": (value: boolean) => void;
26
+ "find-next": () => void;
27
+ "find-previous": () => void;
28
+ "replace-current": () => void;
29
+ "replace-all": () => void;
30
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
31
+ statusText: string;
32
+ buttonLabel: string;
33
+ active: boolean;
34
+ canFind: boolean;
35
+ canReplaceCurrent: boolean;
36
+ canReplaceAll: boolean;
37
+ }>>> & {
38
+ onCancel?: (() => any) | undefined;
39
+ onOpen?: (() => any) | undefined;
40
+ "onUpdate-find-text"?: ((value: string) => any) | undefined;
41
+ "onUpdate-replace-text"?: ((value: string) => any) | undefined;
42
+ "onUpdate-match-case"?: ((value: boolean) => any) | undefined;
43
+ "onFind-next"?: (() => any) | undefined;
44
+ "onFind-previous"?: (() => any) | undefined;
45
+ "onReplace-current"?: (() => any) | undefined;
46
+ "onReplace-all"?: (() => any) | undefined;
47
+ }, {
48
+ active: boolean;
49
+ buttonLabel: string;
50
+ statusText: string;
51
+ canFind: boolean;
52
+ canReplaceCurrent: boolean;
53
+ canReplaceAll: boolean;
54
+ }, {}>;
55
+ declare const _default: typeof __VLS_export;
56
+ export default _default;
57
+ type __VLS_TypePropsToOption<T> = {
58
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
59
+ type: import('vue').PropType<Required<T>[K]>;
60
+ } : {
61
+ type: import('vue').PropType<T[K]>;
62
+ required: true;
63
+ };
64
+ };
65
+ type __VLS_WithDefaults<P, D> = {
66
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
67
+ default: D[K];
68
+ }> : P[K];
69
+ };
70
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
71
+ [K in keyof T]: T[K];
72
+ } : {
73
+ [K in keyof T as K]: T[K];
74
+ }) & {};
@@ -14,6 +14,10 @@ declare const __VLS_export: import("vue").DefineComponent<{
14
14
  type: PropType<DataGridTableStageProps<Record<string, unknown>>["layoutMode"]>;
15
15
  required: true;
16
16
  };
17
+ chromeSignature: {
18
+ type: PropType<DataGridTableStageProps<Record<string, unknown>>["chromeSignature"]>;
19
+ default: string;
20
+ };
17
21
  layout: {
18
22
  type: PropType<DataGridTableStageProps<Record<string, unknown>>["layout"]>;
19
23
  required: true;
@@ -75,6 +79,10 @@ declare const __VLS_export: import("vue").DefineComponent<{
75
79
  type: PropType<DataGridTableStageProps<Record<string, unknown>>["layoutMode"]>;
76
80
  required: true;
77
81
  };
82
+ chromeSignature: {
83
+ type: PropType<DataGridTableStageProps<Record<string, unknown>>["chromeSignature"]>;
84
+ default: string;
85
+ };
78
86
  layout: {
79
87
  type: PropType<DataGridTableStageProps<Record<string, unknown>>["layout"]>;
80
88
  required: true;
@@ -116,6 +124,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
116
124
  default: undefined;
117
125
  };
118
126
  }>>, {
127
+ chromeSignature: string | undefined;
119
128
  onViewportContextMenu: (event: MouseEvent) => void;
120
129
  stageContext: DataGridTableStageContext<Record<string, unknown>>;
121
130
  }, {}>;
@@ -115,6 +115,7 @@ export interface DataGridTableStageEditingSection<TRow extends Record<string, un
115
115
  }) => void;
116
116
  updateEditingCellValue: (value: string) => void;
117
117
  handleEditorKeydown: (event: KeyboardEvent) => void;
118
+ handleEditorBlur: () => void;
118
119
  commitInlineEdit: (target?: "stay" | "next" | "previous") => void;
119
120
  cancelInlineEdit: () => void;
120
121
  }
@@ -151,11 +152,13 @@ export interface DataGridTableStageProps<TRow extends Record<string, unknown>> e
151
152
  mode: DataGridTableMode;
152
153
  rowHeightMode: "fixed" | "auto";
153
154
  layoutMode: DataGridLayoutMode;
155
+ chromeSignature?: string;
154
156
  }
155
157
  interface DataGridTableStageBindingsSource<TRow extends Record<string, unknown>> extends DataGridTableStageLayoutSection, DataGridTableStageViewportSection, DataGridTableStageColumnsSection, DataGridTableStageRowsSection<TRow>, DataGridTableStageSelectionSection, DataGridTableStageEditingSection<TRow>, DataGridTableStageCellsSection<TRow>, DataGridTableStageInteractionSection<TRow> {
156
158
  mode: DataGridTableMode;
157
159
  rowHeightMode: "fixed" | "auto";
158
160
  layoutMode: DataGridLayoutMode;
161
+ chromeSignature?: string;
159
162
  }
160
163
  export interface UseDataGridTableStageBindingsOptions<TRow extends Record<string, unknown>> extends Omit<{
161
164
  [K in keyof DataGridTableStageBindingsSource<TRow>]: DataGridMaybeRef<DataGridTableStageBindingsSource<TRow>[K]>;
@@ -13,6 +13,7 @@ export interface UseDataGridTableStageCellIoOptions<TRow extends Record<string,
13
13
  readDisplayCell: (row: DataGridTableRow<TRow>, columnKey: string) => string;
14
14
  toggleRowCheckboxSelected: (row: DataGridTableRow<TRow>) => void;
15
15
  captureHistorySnapshot: () => unknown;
16
+ captureHistorySnapshotForRowIds?: (rowIds: readonly (string | number)[]) => unknown;
16
17
  recordHistoryIntentTransaction: (descriptor: {
17
18
  intent: string;
18
19
  label: string;
@@ -1,6 +1,7 @@
1
1
  import type { DataGridCopyRange } from "@affino/datagrid-vue/advanced";
2
2
  export interface DataGridTableStageHistoryAdapter {
3
3
  captureSnapshot: () => unknown;
4
+ captureSnapshotForRowIds?: (rowIds: readonly (string | number)[]) => unknown;
4
5
  recordIntentTransaction: (descriptor: {
5
6
  intent: string;
6
7
  label: string;
@@ -11,13 +12,14 @@ export interface DataGridTableStageHistoryAdapter {
11
12
  runHistoryAction: (direction: "undo" | "redo") => Promise<string | null>;
12
13
  }
13
14
  export interface UseDataGridTableStageHistoryOptions<TRow extends Record<string, unknown>> {
14
- runtime: Pick<import("@affino/datagrid-vue").UseDataGridRuntimeResult<TRow>, "api">;
15
+ runtime: Pick<import("@affino/datagrid-vue").UseDataGridRuntimeResult<TRow>, "api" | "getBodyRowAtIndex" | "resolveBodyRowIndexById">;
15
16
  cloneRowData: (row: TRow) => TRow;
16
17
  syncViewport: () => void;
17
18
  history?: DataGridTableStageHistoryAdapter;
18
19
  }
19
20
  export interface UseDataGridTableStageHistoryResult {
20
21
  captureHistorySnapshot: () => unknown;
22
+ captureHistorySnapshotForRowIds: (rowIds: readonly (string | number)[]) => unknown;
21
23
  recordHistoryIntentTransaction: (descriptor: {
22
24
  intent: string;
23
25
  label: string;
@@ -7,9 +7,20 @@ import type { DataGridLayoutMode } from "../config/dataGridLayout";
7
7
  import type { DataGridVirtualizationOptions } from "../config/dataGridVirtualization";
8
8
  import type { DataGridTableStageContext } from "./dataGridTableStageContext";
9
9
  import type { DataGridTableStageHistoryAdapter } from "./useDataGridTableStageHistory";
10
- import type { DataGridTableStageProps } from "./dataGridTableStage.types";
10
+ import type { DataGridTableRow, DataGridTableStageCellClass, DataGridTableStageProps } from "./dataGridTableStage.types";
11
11
  export type { DataGridTableStageHistoryAdapter } from "./useDataGridTableStageHistory";
12
- type DataGridTableStageBodyRuntime<TRow extends Record<string, unknown>> = Pick<import("@affino/datagrid-vue").UseDataGridRuntimeResult<TRow>, "api" | "syncBodyRowsInRange" | "rowPartition" | "virtualWindow" | "columnSnapshot"> & {
12
+ type DataGridTableStageBodyRuntime<TRow extends Record<string, unknown>> = {
13
+ api: import("@affino/datagrid-vue").UseDataGridRuntimeResult<TRow>["api"];
14
+ syncBodyRowsInRange: import("@affino/datagrid-vue").UseDataGridRuntimeResult<TRow>["syncBodyRowsInRange"];
15
+ setViewportRange: import("@affino/datagrid-vue").UseDataGridRuntimeResult<TRow>["setViewportRange"];
16
+ rowPartition: import("@affino/datagrid-vue").UseDataGridRuntimeResult<TRow>["rowPartition"];
17
+ virtualWindow: import("@affino/datagrid-vue").UseDataGridRuntimeResult<TRow>["virtualWindow"];
18
+ columnSnapshot: import("@affino/datagrid-vue").UseDataGridRuntimeResult<TRow>["columnSnapshot"];
19
+ setVirtualWindowRange?: (range: {
20
+ start: number;
21
+ end: number;
22
+ }) => void;
23
+ } & {
13
24
  getBodyRowAtIndex: (rowIndex: number) => import("@affino/datagrid-vue").DataGridRowNode<TRow> | null;
14
25
  resolveBodyRowIndexById: (rowId: string | number) => number;
15
26
  };
@@ -35,6 +46,7 @@ export interface UseDataGridTableStageRuntimeOptions<TRow extends Record<string,
35
46
  rowSelectionSnapshot: Ref<DataGridRowSelectionSnapshot | null>;
36
47
  rowHover?: Ref<boolean>;
37
48
  stripedRows?: Ref<boolean>;
49
+ chromeSignature?: Ref<string | undefined>;
38
50
  showRowIndex?: Ref<boolean>;
39
51
  showRowSelection?: Ref<boolean>;
40
52
  isRowInPendingClipboardCut?: (row: import("@affino/datagrid-vue").DataGridRowNode<TRow>) => boolean;
@@ -80,6 +92,7 @@ export interface UseDataGridTableStageRuntimeOptions<TRow extends Record<string,
80
92
  openContextMenuFromCurrentCell?: () => void;
81
93
  clearExternalPendingClipboardOperation?: () => boolean;
82
94
  runRowIndexKeyboardAction?: (action: "insert-row-above" | "copy-row" | "cut-row" | "paste-row" | "delete-selected-rows" | "open-row-menu", rowId: string | number) => Promise<boolean> | boolean;
95
+ cellClass?: (row: DataGridTableRow<TRow>, rowIndex: number, column: DataGridColumnSnapshot, columnIndex: number) => DataGridTableStageCellClass | null | undefined;
83
96
  }
84
97
  export interface UseDataGridTableStageRuntimeResult<TRow extends Record<string, unknown>> {
85
98
  tableStageProps: ComputedRef<DataGridTableStageProps<TRow>>;
@@ -90,10 +103,12 @@ export interface UseDataGridTableStageRuntimeResult<TRow extends Record<string,
90
103
  cutSelectedCells: (trigger?: "keyboard" | "context-menu") => Promise<boolean>;
91
104
  clearSelectedCells: (trigger?: "keyboard" | "context-menu") => Promise<boolean>;
92
105
  captureHistorySnapshot: () => unknown;
106
+ captureHistorySnapshotForRowIds: (rowIds: readonly (string | number)[]) => unknown;
93
107
  recordHistoryIntentTransaction: (descriptor: {
94
108
  intent: string;
95
109
  label: string;
96
110
  affectedRange?: DataGridCopyRange | null;
97
111
  }, beforeSnapshot: unknown) => void;
112
+ revealCellInComfortZone: (rowIndex: number, columnIndex: number) => Promise<void>;
98
113
  }
99
114
  export declare function useDataGridTableStageRuntime<TRow extends Record<string, unknown>>(options: UseDataGridTableStageRuntimeOptions<TRow>): UseDataGridTableStageRuntimeResult<TRow>;
@@ -6,7 +6,7 @@ export interface UseDataGridTableStageScrollSyncOptions {
6
6
  stopColumnResize: () => void;
7
7
  handleInteractionWindowMouseMove: (event: MouseEvent) => void;
8
8
  handleInteractionWindowMouseUp: () => void;
9
- syncViewport: () => void;
9
+ syncViewport: (event: Event) => void;
10
10
  }
11
11
  export interface UseDataGridTableStageScrollSyncResult {
12
12
  handleWindowMouseMove: (event: MouseEvent) => void;
@@ -0,0 +1,54 @@
1
+ import { type ComputedRef, type Ref } from "vue";
2
+ import { type DataGridColumnSnapshot, type DataGridRowNode, type UseDataGridRuntimeResult } from "@affino/datagrid-vue";
3
+ export interface DataGridFindReplaceCellCoord {
4
+ rowIndex: number;
5
+ columnIndex: number;
6
+ }
7
+ export interface DataGridFindReplaceVisualTarget {
8
+ rowId: string | number;
9
+ columnKey: string;
10
+ flashPhase: 0 | 1;
11
+ }
12
+ export interface UseDataGridAppFindReplaceOptions<TRow extends Record<string, unknown>, TSnapshot> {
13
+ runtime: Pick<UseDataGridRuntimeResult<TRow>, "api" | "getBodyRowAtIndex" | "resolveBodyRowIndexById">;
14
+ visibleColumns: Ref<readonly DataGridColumnSnapshot[]>;
15
+ stageVisibleColumns: Ref<readonly DataGridColumnSnapshot[]>;
16
+ resolveCurrentCellCoord: () => DataGridFindReplaceCellCoord | null;
17
+ applyActiveCell: (coord: DataGridFindReplaceCellCoord) => void;
18
+ revealCellInComfortZone: (rowIndex: number, columnIndex: number) => void | Promise<void>;
19
+ captureRowsSnapshot: () => TSnapshot;
20
+ captureRowsSnapshotForRowIds: (rowIds: readonly (string | number)[]) => TSnapshot;
21
+ recordHistoryIntentTransaction: (descriptor: {
22
+ intent: string;
23
+ label: string;
24
+ affectedRange?: {
25
+ startRow: number;
26
+ endRow: number;
27
+ startColumn: number;
28
+ endColumn: number;
29
+ } | null;
30
+ }, beforeSnapshot: TSnapshot) => void;
31
+ isCellEditable: (row: DataGridRowNode<TRow>, rowIndex: number, column: DataGridColumnSnapshot, columnIndex: number) => boolean;
32
+ }
33
+ export interface UseDataGridAppFindReplaceResult {
34
+ isPanelOpen: Ref<boolean>;
35
+ findText: Ref<string>;
36
+ replaceText: Ref<string>;
37
+ matchCase: Ref<boolean>;
38
+ statusText: Ref<string>;
39
+ active: ComputedRef<boolean>;
40
+ canFind: ComputedRef<boolean>;
41
+ canReplaceCurrent: ComputedRef<boolean>;
42
+ canReplaceAll: ComputedRef<boolean>;
43
+ highlightedCell: ComputedRef<DataGridFindReplaceVisualTarget | null>;
44
+ openPanel: () => void;
45
+ closePanel: () => void;
46
+ updateFindText: (value: string) => void;
47
+ updateReplaceText: (value: string) => void;
48
+ updateMatchCase: (value: boolean) => void;
49
+ findNext: () => Promise<boolean>;
50
+ findPrevious: () => Promise<boolean>;
51
+ replaceCurrent: () => Promise<boolean>;
52
+ replaceAll: () => Promise<number>;
53
+ }
54
+ export declare function useDataGridAppFindReplace<TRow extends Record<string, unknown>, TSnapshot>(options: UseDataGridAppFindReplaceOptions<TRow, TSnapshot>): UseDataGridAppFindReplaceResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@affino/datagrid-vue-app",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "description": "Declarative Vue DataGrid component for Affino",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -22,6 +22,10 @@
22
22
  "types": "./dist/advanced-filter.d.ts",
23
23
  "import": "./dist/advanced-filter.js"
24
24
  },
25
+ "./find-replace": {
26
+ "types": "./dist/find-replace.d.ts",
27
+ "import": "./dist/find-replace.js"
28
+ },
25
29
  "./internal": {
26
30
  "types": "./dist/internal.d.ts",
27
31
  "import": "./dist/internal.js"
@@ -34,9 +38,9 @@
34
38
  "@affino/menu-vue": "^2.1.1",
35
39
  "@affino/popover-vue": "^1.1.0",
36
40
  "@affino/datagrid-chrome": "0.1.1",
37
- "@affino/datagrid-gantt": "0.1.1",
41
+ "@affino/datagrid-vue": "0.3.12",
38
42
  "@affino/datagrid-theme": "0.2.2",
39
- "@affino/datagrid-vue": "0.3.10"
43
+ "@affino/datagrid-gantt": "0.1.1"
40
44
  },
41
45
  "peerDependencies": {
42
46
  "vue": "^3.3.0"