@affino/datagrid-vue-app 0.1.33 → 0.1.34
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 +59 -3
- package/dist/chunks/{useDataGridAppRowModel-HgHd3xEp.js → useDataGridAppRowModel-JUDjg-Fq.js} +320 -274
- package/dist/host/DataGridDefaultRenderer.d.ts +30 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +73 -50
- package/dist/internal.js +1 -1
- package/dist/stage/useDataGridTableStageRuntime.d.ts +2 -1
- package/package.json +4 -4
package/dist/DataGrid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ExtractPublicPropTypes, type PropType, type VNode } from "vue";
|
|
2
|
-
import { type CreateDataGridCoreOptions, type DataGridApi, type DataGridApiRowSelectionChangedEvent, type DataGridApiSelectionChangedEvent, type DataGridApiPluginDefinition, type DataGridAggregationModel, type DataGridColumnPin, type DataGridComputedFieldDefinition, type DataGridCoreServiceRegistry, type DataGridFilterSnapshot, type DataGridFormulaFieldDefinition, type DataGridFormulaFunctionRegistry, type DataGridGroupBySpec, type DataGridMigrateStateOptions, type DataGridRowNode, type DataGridRowSelectionSnapshot, type DataGridRowModel, type DataGridRowNodeInput, type DataGridSetStateOptions, type DataGridSortState, type DataGridUnifiedColumnState, type DataGridUnifiedState, type DataGridPivotSpec } from "@affino/datagrid-vue";
|
|
1
|
+
import { type CSSProperties, type ExtractPublicPropTypes, type PropType, type VNode } from "vue";
|
|
2
|
+
import { type CreateDataGridCoreOptions, type DataGridApi, type DataGridApiRowSelectionChangedEvent, type DataGridApiSelectionChangedEvent, type DataGridApiPluginDefinition, type DataGridAggregationModel, type DataGridColumnSnapshot, type DataGridColumnPin, type DataGridComputedFieldDefinition, type DataGridCoreServiceRegistry, type DataGridFilterSnapshot, type DataGridFormulaFieldDefinition, type DataGridFormulaFunctionRegistry, type DataGridGroupBySpec, type DataGridMigrateStateOptions, type DataGridRowNode, type DataGridRowSelectionSnapshot, type DataGridRowModel, type DataGridRowNodeInput, type DataGridSetStateOptions, type DataGridSortState, type DataGridUnifiedColumnState, type DataGridUnifiedState, type DataGridPivotSpec } from "@affino/datagrid-vue";
|
|
3
3
|
import { defineDataGridStructuralRowActionHandler, type DataGridStructuralRowActionHandler, type DataGridStructuralRowActionId } from "./dataGridStructuralRowActions";
|
|
4
4
|
import type { DataGridBivariantCallback } from "./types/bivariance";
|
|
5
5
|
import type { DataGridAppToolbarModule } from "./host/DataGridModuleHost";
|
|
@@ -23,6 +23,7 @@ import { type DataGridVirtualizationProp } from "./config/dataGridVirtualization
|
|
|
23
23
|
import type { DataGridCellEditablePredicate } from "./dataGridEditability";
|
|
24
24
|
import { type DataGridHistoryController, type DataGridHistoryProp } from "./dataGridHistory";
|
|
25
25
|
import type { DataGridAppViewMode, DataGridGanttProp } from "./gantt/dataGridGantt.types";
|
|
26
|
+
import type { DataGridTableStageCellClass, DataGridTableStageCustomOverlay } from "./stage/dataGridTableStage.types";
|
|
26
27
|
type DataGridRuntimeOverrides = Omit<Partial<DataGridCoreServiceRegistry>, "rowModel" | "columnModel" | "viewport"> & {
|
|
27
28
|
viewport?: DataGridCoreServiceRegistry["viewport"];
|
|
28
29
|
};
|
|
@@ -34,8 +35,22 @@ export type DataGridFilterCellReader<TRow = unknown> = DataGridBivariantCallback
|
|
|
34
35
|
row: DataGridRowNode<TRow>,
|
|
35
36
|
columnKey: string
|
|
36
37
|
], unknown>;
|
|
38
|
+
export type DataGridCellClassResolver<TRow = unknown> = DataGridBivariantCallback<[
|
|
39
|
+
row: DataGridRowNode<TRow>,
|
|
40
|
+
rowIndex: number,
|
|
41
|
+
column: DataGridColumnSnapshot,
|
|
42
|
+
columnIndex: number
|
|
43
|
+
], DataGridTableStageCellClass | null | undefined>;
|
|
44
|
+
export type DataGridCellStyleResolver<TRow = unknown> = DataGridBivariantCallback<[
|
|
45
|
+
row: DataGridRowNode<TRow>,
|
|
46
|
+
rowIndex: number,
|
|
47
|
+
column: DataGridColumnSnapshot,
|
|
48
|
+
columnIndex: number
|
|
49
|
+
], CSSProperties | null | undefined>;
|
|
37
50
|
export declare function defineDataGridSelectionCellReader<TRow = unknown>(): <TReader extends DataGridSelectionCellReader<TRow>>(reader: TReader) => TReader;
|
|
38
51
|
export declare function defineDataGridFilterCellReader<TRow = unknown>(): <TReader extends DataGridFilterCellReader<TRow>>(reader: TReader) => TReader;
|
|
52
|
+
export declare function defineDataGridCellClassResolver<TRow = unknown>(): <TResolver extends DataGridCellClassResolver<TRow>>(resolver: TResolver) => TResolver;
|
|
53
|
+
export declare function defineDataGridCellStyleResolver<TRow = unknown>(): <TResolver extends DataGridCellStyleResolver<TRow>>(resolver: TResolver) => TResolver;
|
|
39
54
|
export { defineDataGridStructuralRowActionHandler };
|
|
40
55
|
declare const dataGridProps: {
|
|
41
56
|
readonly rows: {
|
|
@@ -258,6 +273,14 @@ declare const dataGridProps: {
|
|
|
258
273
|
readonly type: PropType<DataGridFilterCellReader | undefined>;
|
|
259
274
|
readonly default: undefined;
|
|
260
275
|
};
|
|
276
|
+
readonly cellClass: {
|
|
277
|
+
readonly type: PropType<DataGridCellClassResolver | undefined>;
|
|
278
|
+
readonly default: undefined;
|
|
279
|
+
};
|
|
280
|
+
readonly cellStyle: {
|
|
281
|
+
readonly type: PropType<DataGridCellStyleResolver | undefined>;
|
|
282
|
+
readonly default: undefined;
|
|
283
|
+
};
|
|
261
284
|
readonly isCellEditable: {
|
|
262
285
|
readonly type: PropType<DataGridCellEditablePredicate<Record<string, unknown>> | undefined>;
|
|
263
286
|
readonly default: undefined;
|
|
@@ -282,9 +305,13 @@ declare const dataGridProps: {
|
|
|
282
305
|
readonly type: PropType<readonly DataGridAppToolbarModule[]>;
|
|
283
306
|
readonly default: () => never[];
|
|
284
307
|
};
|
|
308
|
+
readonly customOverlays: {
|
|
309
|
+
readonly type: PropType<readonly DataGridTableStageCustomOverlay[] | undefined>;
|
|
310
|
+
readonly default: undefined;
|
|
311
|
+
};
|
|
285
312
|
};
|
|
286
313
|
type DataGridPublicPropsBase = ExtractPublicPropTypes<typeof dataGridProps>;
|
|
287
|
-
export type DataGridProps<TRow = unknown> = Omit<DataGridPublicPropsBase, "rows" | "rowModel" | "clientRowModelOptions" | "computedFields" | "columns" | "plugins" | "state" | "placeholderRows" | "readSelectionCell" | "readFilterCell" | "isCellEditable"> & {
|
|
314
|
+
export type DataGridProps<TRow = unknown> = Omit<DataGridPublicPropsBase, "rows" | "rowModel" | "clientRowModelOptions" | "computedFields" | "columns" | "plugins" | "state" | "placeholderRows" | "readSelectionCell" | "readFilterCell" | "cellClass" | "cellStyle" | "isCellEditable"> & {
|
|
288
315
|
rows?: readonly (TRow | DataGridRowNodeInput<TRow>)[];
|
|
289
316
|
rowModel?: DataGridRowModel<TRow> | undefined;
|
|
290
317
|
clientRowModelOptions?: DataGridAppClientRowModelOptions<TRow> | undefined;
|
|
@@ -295,6 +322,8 @@ export type DataGridProps<TRow = unknown> = Omit<DataGridPublicPropsBase, "rows"
|
|
|
295
322
|
placeholderRows?: DataGridPlaceholderRowsProp<TRow> | undefined;
|
|
296
323
|
readSelectionCell?: DataGridSelectionCellReader<TRow> | undefined;
|
|
297
324
|
readFilterCell?: DataGridFilterCellReader<TRow> | undefined;
|
|
325
|
+
cellClass?: DataGridCellClassResolver<TRow> | undefined;
|
|
326
|
+
cellStyle?: DataGridCellStyleResolver<TRow> | undefined;
|
|
298
327
|
isCellEditable?: DataGridCellEditablePredicate<TRow> | undefined;
|
|
299
328
|
};
|
|
300
329
|
export interface DataGridExposed<TRow = unknown> {
|
|
@@ -531,6 +560,14 @@ declare const DataGridRuntimeComponent: import("vue").DefineComponent<{
|
|
|
531
560
|
readonly type: PropType<DataGridFilterCellReader | undefined>;
|
|
532
561
|
readonly default: undefined;
|
|
533
562
|
};
|
|
563
|
+
readonly cellClass: {
|
|
564
|
+
readonly type: PropType<DataGridCellClassResolver | undefined>;
|
|
565
|
+
readonly default: undefined;
|
|
566
|
+
};
|
|
567
|
+
readonly cellStyle: {
|
|
568
|
+
readonly type: PropType<DataGridCellStyleResolver | undefined>;
|
|
569
|
+
readonly default: undefined;
|
|
570
|
+
};
|
|
534
571
|
readonly isCellEditable: {
|
|
535
572
|
readonly type: PropType<DataGridCellEditablePredicate<Record<string, unknown>> | undefined>;
|
|
536
573
|
readonly default: undefined;
|
|
@@ -555,6 +592,10 @@ declare const DataGridRuntimeComponent: import("vue").DefineComponent<{
|
|
|
555
592
|
readonly type: PropType<readonly DataGridAppToolbarModule[]>;
|
|
556
593
|
readonly default: () => never[];
|
|
557
594
|
};
|
|
595
|
+
readonly customOverlays: {
|
|
596
|
+
readonly type: PropType<readonly DataGridTableStageCustomOverlay[] | undefined>;
|
|
597
|
+
readonly default: undefined;
|
|
598
|
+
};
|
|
558
599
|
}, () => VNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
559
600
|
"cell-change": (_payload: unknown) => true;
|
|
560
601
|
"selection-change": (_payload: DataGridApiSelectionChangedEvent) => true;
|
|
@@ -795,6 +836,14 @@ declare const DataGridRuntimeComponent: import("vue").DefineComponent<{
|
|
|
795
836
|
readonly type: PropType<DataGridFilterCellReader | undefined>;
|
|
796
837
|
readonly default: undefined;
|
|
797
838
|
};
|
|
839
|
+
readonly cellClass: {
|
|
840
|
+
readonly type: PropType<DataGridCellClassResolver | undefined>;
|
|
841
|
+
readonly default: undefined;
|
|
842
|
+
};
|
|
843
|
+
readonly cellStyle: {
|
|
844
|
+
readonly type: PropType<DataGridCellStyleResolver | undefined>;
|
|
845
|
+
readonly default: undefined;
|
|
846
|
+
};
|
|
798
847
|
readonly isCellEditable: {
|
|
799
848
|
readonly type: PropType<DataGridCellEditablePredicate<Record<string, unknown>> | undefined>;
|
|
800
849
|
readonly default: undefined;
|
|
@@ -819,6 +868,10 @@ declare const DataGridRuntimeComponent: import("vue").DefineComponent<{
|
|
|
819
868
|
readonly type: PropType<readonly DataGridAppToolbarModule[]>;
|
|
820
869
|
readonly default: () => never[];
|
|
821
870
|
};
|
|
871
|
+
readonly customOverlays: {
|
|
872
|
+
readonly type: PropType<readonly DataGridTableStageCustomOverlay[] | undefined>;
|
|
873
|
+
readonly default: undefined;
|
|
874
|
+
};
|
|
822
875
|
}>> & {
|
|
823
876
|
"onCell-change"?: ((_payload: unknown) => any) | undefined;
|
|
824
877
|
"onSelection-change"?: ((_payload: DataGridApiSelectionChangedEvent) => any) | undefined;
|
|
@@ -848,7 +901,10 @@ declare const DataGridRuntimeComponent: import("vue").DefineComponent<{
|
|
|
848
901
|
readonly showRowIndex: boolean;
|
|
849
902
|
readonly rowHover: boolean;
|
|
850
903
|
readonly stripedRows: boolean;
|
|
904
|
+
readonly cellClass: DataGridCellClassResolver<unknown> | undefined;
|
|
905
|
+
readonly cellStyle: DataGridCellStyleResolver<unknown> | undefined;
|
|
851
906
|
readonly isCellEditable: DataGridCellEditablePredicate<Record<string, unknown>> | undefined;
|
|
907
|
+
readonly customOverlays: readonly DataGridTableStageCustomOverlay[] | undefined;
|
|
852
908
|
readonly rowSelection: boolean;
|
|
853
909
|
readonly state: DataGridUnifiedState<Record<string, unknown>> | null | undefined;
|
|
854
910
|
readonly chrome: DataGridChromeProp | undefined;
|