@tinisoftin/tsdatagrid 1.0.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 +1272 -0
- package/dist/components/TSDataGrid.vue.d.ts +1285 -0
- package/dist/components/TSDataGrid.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridActiveFilters.vue.d.ts +24 -0
- package/dist/components/TSDataGridActiveFilters.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridBody.vue.d.ts +259 -0
- package/dist/components/TSDataGridBody.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridCell.vue.d.ts +83 -0
- package/dist/components/TSDataGridCell.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridColumnChooser.vue.d.ts +56 -0
- package/dist/components/TSDataGridColumnChooser.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridContextMenu.vue.d.ts +46 -0
- package/dist/components/TSDataGridContextMenu.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridFilter.vue.d.ts +92 -0
- package/dist/components/TSDataGridFilter.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridFooter.vue.d.ts +95 -0
- package/dist/components/TSDataGridFooter.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridGroupPanel.vue.d.ts +47 -0
- package/dist/components/TSDataGridGroupPanel.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridHeader.vue.d.ts +221 -0
- package/dist/components/TSDataGridHeader.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridRow.vue.d.ts +83 -0
- package/dist/components/TSDataGridRow.vue.d.ts.map +1 -0
- package/dist/components/TSDataGridToolbar.vue.d.ts +139 -0
- package/dist/components/TSDataGridToolbar.vue.d.ts.map +1 -0
- package/dist/composables/index.d.ts +28 -0
- package/dist/composables/index.d.ts.map +1 -0
- package/dist/composables/useClipboard.d.ts +863 -0
- package/dist/composables/useClipboard.d.ts.map +1 -0
- package/dist/composables/useColumnChooser.d.ts +36 -0
- package/dist/composables/useColumnChooser.d.ts.map +1 -0
- package/dist/composables/useColumnReorder.d.ts +40 -0
- package/dist/composables/useColumnReorder.d.ts.map +1 -0
- package/dist/composables/useColumnResize.d.ts +36 -0
- package/dist/composables/useColumnResize.d.ts.map +1 -0
- package/dist/composables/useContextMenu.d.ts +55 -0
- package/dist/composables/useContextMenu.d.ts.map +1 -0
- package/dist/composables/useDataSource.d.ts +1770 -0
- package/dist/composables/useDataSource.d.ts.map +1 -0
- package/dist/composables/useEditing.d.ts +54 -0
- package/dist/composables/useEditing.d.ts.map +1 -0
- package/dist/composables/useExport.d.ts +72 -0
- package/dist/composables/useExport.d.ts.map +1 -0
- package/dist/composables/useFiltering.d.ts +42 -0
- package/dist/composables/useFiltering.d.ts.map +1 -0
- package/dist/composables/useGridApi.d.ts +85 -0
- package/dist/composables/useGridApi.d.ts.map +1 -0
- package/dist/composables/useGrouping.d.ts +879 -0
- package/dist/composables/useGrouping.d.ts.map +1 -0
- package/dist/composables/useInfiniteScroll.d.ts +49 -0
- package/dist/composables/useInfiniteScroll.d.ts.map +1 -0
- package/dist/composables/useKeyboardNavigation.d.ts +47 -0
- package/dist/composables/useKeyboardNavigation.d.ts.map +1 -0
- package/dist/composables/useLoadingState.d.ts +36 -0
- package/dist/composables/useLoadingState.d.ts.map +1 -0
- package/dist/composables/usePagination.d.ts +45 -0
- package/dist/composables/usePagination.d.ts.map +1 -0
- package/dist/composables/useRowExpansion.d.ts +47 -0
- package/dist/composables/useRowExpansion.d.ts.map +1 -0
- package/dist/composables/useSearch.d.ts +97 -0
- package/dist/composables/useSearch.d.ts.map +1 -0
- package/dist/composables/useSelection.d.ts +32 -0
- package/dist/composables/useSelection.d.ts.map +1 -0
- package/dist/composables/useSorting.d.ts +859 -0
- package/dist/composables/useSorting.d.ts.map +1 -0
- package/dist/composables/useStatePersistence.d.ts +26 -0
- package/dist/composables/useStatePersistence.d.ts.map +1 -0
- package/dist/composables/useSummary.d.ts +49 -0
- package/dist/composables/useSummary.d.ts.map +1 -0
- package/dist/composables/useUndo.d.ts +27 -0
- package/dist/composables/useUndo.d.ts.map +1 -0
- package/dist/composables/useVirtualization.d.ts +40 -0
- package/dist/composables/useVirtualization.d.ts.map +1 -0
- package/dist/html2canvas.esm-1a1724a1.js +4886 -0
- package/dist/index-541cb5f8.js +38398 -0
- package/dist/index.d.ts +108 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es-713282db.js +5771 -0
- package/dist/plugin.d.ts +22 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/purify.es-35a15df8.js +480 -0
- package/dist/style.css +1 -0
- package/dist/tsdatagrid.es.js +358 -0
- package/dist/tsdatagrid.umd.js +450 -0
- package/dist/types/core/base.d.ts +143 -0
- package/dist/types/core/base.d.ts.map +1 -0
- package/dist/types/core/column.d.ts +354 -0
- package/dist/types/core/column.d.ts.map +1 -0
- package/dist/types/core/datasource.d.ts +247 -0
- package/dist/types/core/datasource.d.ts.map +1 -0
- package/dist/types/core/events.d.ts +297 -0
- package/dist/types/core/events.d.ts.map +1 -0
- package/dist/types/core/models.d.ts +74 -0
- package/dist/types/core/models.d.ts.map +1 -0
- package/dist/types/features/accessibility.d.ts +75 -0
- package/dist/types/features/accessibility.d.ts.map +1 -0
- package/dist/types/features/editing.d.ts +185 -0
- package/dist/types/features/editing.d.ts.map +1 -0
- package/dist/types/features/export.d.ts +145 -0
- package/dist/types/features/export.d.ts.map +1 -0
- package/dist/types/features/filtering.d.ts +193 -0
- package/dist/types/features/filtering.d.ts.map +1 -0
- package/dist/types/features/grouping.d.ts +148 -0
- package/dist/types/features/grouping.d.ts.map +1 -0
- package/dist/types/features/keyboard.d.ts +126 -0
- package/dist/types/features/keyboard.d.ts.map +1 -0
- package/dist/types/features/pagination.d.ts +85 -0
- package/dist/types/features/pagination.d.ts.map +1 -0
- package/dist/types/features/searching.d.ts +90 -0
- package/dist/types/features/searching.d.ts.map +1 -0
- package/dist/types/features/selection.d.ts +99 -0
- package/dist/types/features/selection.d.ts.map +1 -0
- package/dist/types/features/sorting.d.ts +81 -0
- package/dist/types/features/sorting.d.ts.map +1 -0
- package/dist/types/features/summary.d.ts +99 -0
- package/dist/types/features/summary.d.ts.map +1 -0
- package/dist/types/features/virtualization.d.ts +88 -0
- package/dist/types/features/virtualization.d.ts.map +1 -0
- package/dist/types/index.d.ts +60 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/state/grid-state.d.ts +70 -0
- package/dist/types/state/grid-state.d.ts.map +1 -0
- package/dist/types/state/persistence.d.ts +65 -0
- package/dist/types/state/persistence.d.ts.map +1 -0
- package/dist/types/ui/styling.d.ts +72 -0
- package/dist/types/ui/styling.d.ts.map +1 -0
- package/dist/types/ui/templates.d.ts +80 -0
- package/dist/types/ui/templates.d.ts.map +1 -0
- package/dist/types/ui/toolbar.d.ts +63 -0
- package/dist/types/ui/toolbar.d.ts.map +1 -0
- package/dist/types/validation/validators.d.ts +134 -0
- package/dist/types/validation/validators.d.ts.map +1 -0
- package/dist/utils/accessibility.d.ts +35 -0
- package/dist/utils/accessibility.d.ts.map +1 -0
- package/dist/utils/array.d.ts +88 -0
- package/dist/utils/array.d.ts.map +1 -0
- package/dist/utils/cache.d.ts +92 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/clipboard.d.ts +25 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/column-searcher.d.ts +44 -0
- package/dist/utils/column-searcher.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +76 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/date.d.ts +101 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/dom.d.ts +128 -0
- package/dist/utils/dom.d.ts.map +1 -0
- package/dist/utils/error-handling.d.ts +190 -0
- package/dist/utils/error-handling.d.ts.map +1 -0
- package/dist/utils/export.d.ts +37 -0
- package/dist/utils/export.d.ts.map +1 -0
- package/dist/utils/formatters.d.ts +60 -0
- package/dist/utils/formatters.d.ts.map +1 -0
- package/dist/utils/index.d.ts +25 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/keyboard.d.ts +58 -0
- package/dist/utils/keyboard.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +45 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/number.d.ts +77 -0
- package/dist/utils/number.d.ts.map +1 -0
- package/dist/utils/object.d.ts +101 -0
- package/dist/utils/object.d.ts.map +1 -0
- package/dist/utils/odata.d.ts +87 -0
- package/dist/utils/odata.d.ts.map +1 -0
- package/dist/utils/performance.d.ts +75 -0
- package/dist/utils/performance.d.ts.map +1 -0
- package/dist/utils/storage.d.ts +83 -0
- package/dist/utils/storage.d.ts.map +1 -0
- package/dist/utils/string.d.ts +105 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/validators.d.ts +60 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/package.json +90 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { ColumnField } from '../core/base';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Summary type
|
|
5
|
+
*/
|
|
6
|
+
export declare const enum SummaryType {
|
|
7
|
+
Sum = "sum",
|
|
8
|
+
Avg = "avg",
|
|
9
|
+
Min = "min",
|
|
10
|
+
Max = "max",
|
|
11
|
+
Count = "count",
|
|
12
|
+
DistinctCount = "distinctCount",
|
|
13
|
+
Median = "median",
|
|
14
|
+
StdDev = "stdDev",
|
|
15
|
+
Variance = "variance",
|
|
16
|
+
First = "first",
|
|
17
|
+
Last = "last",
|
|
18
|
+
Concat = "concat",
|
|
19
|
+
Custom = "custom"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Summary scope
|
|
23
|
+
*/
|
|
24
|
+
export declare const enum SummaryScope {
|
|
25
|
+
/** All data */
|
|
26
|
+
All = "all",
|
|
27
|
+
/** Current page */
|
|
28
|
+
Page = "page",
|
|
29
|
+
/** Group */
|
|
30
|
+
Group = "group",
|
|
31
|
+
/** Both all and group */
|
|
32
|
+
Both = "both"
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Summary position
|
|
36
|
+
*/
|
|
37
|
+
export declare const enum SummaryPosition {
|
|
38
|
+
Footer = "footer",
|
|
39
|
+
Header = "header",
|
|
40
|
+
Both = "both"
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Summary configuration
|
|
44
|
+
*/
|
|
45
|
+
export interface SummaryConfig {
|
|
46
|
+
/** Field name */
|
|
47
|
+
field: ColumnField | string;
|
|
48
|
+
/** Summary type */
|
|
49
|
+
type: SummaryType;
|
|
50
|
+
/** Display label */
|
|
51
|
+
label?: string;
|
|
52
|
+
/** Scope */
|
|
53
|
+
scope?: SummaryScope;
|
|
54
|
+
/** Position */
|
|
55
|
+
position?: SummaryPosition;
|
|
56
|
+
/** Formatter */
|
|
57
|
+
formatter?: (value: any, summaryType: SummaryType) => string | number;
|
|
58
|
+
/** Custom calculation */
|
|
59
|
+
customCalculation?: (data: any[], field: string) => any;
|
|
60
|
+
/** Separator (for concat) */
|
|
61
|
+
separator?: string;
|
|
62
|
+
/** Precision (decimal places) */
|
|
63
|
+
precision?: number;
|
|
64
|
+
/** Show label */
|
|
65
|
+
showLabel?: boolean;
|
|
66
|
+
/** CSS class */
|
|
67
|
+
cssClass?: string;
|
|
68
|
+
/** Alignment */
|
|
69
|
+
alignment?: 'left' | 'center' | 'right';
|
|
70
|
+
/** Value template */
|
|
71
|
+
valueTemplate?: (value: any) => string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Summary result
|
|
75
|
+
*/
|
|
76
|
+
export interface SummaryResult {
|
|
77
|
+
/** Field name */
|
|
78
|
+
field: string;
|
|
79
|
+
/** Summary type */
|
|
80
|
+
type: SummaryType;
|
|
81
|
+
/** Calculated value */
|
|
82
|
+
value: any;
|
|
83
|
+
/** Formatted value */
|
|
84
|
+
formattedValue: string;
|
|
85
|
+
/** Scope */
|
|
86
|
+
scope: SummaryScope;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Summary state
|
|
90
|
+
*/
|
|
91
|
+
export interface SummaryState {
|
|
92
|
+
/** Summary configurations */
|
|
93
|
+
configs: SummaryConfig[];
|
|
94
|
+
/** Calculated summaries */
|
|
95
|
+
results: SummaryResult[];
|
|
96
|
+
/** Group summaries */
|
|
97
|
+
groupSummaries?: Map<string, SummaryResult[]>;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../../src/types/features/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C;;GAEG;AACH,0BAAkB,WAAW;IAC3B,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,aAAa,kBAAkB;IAC/B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,0BAAkB,YAAY;IAC5B,eAAe;IACf,GAAG,QAAQ;IAEX,mBAAmB;IACnB,IAAI,SAAS;IAEb,YAAY;IACZ,KAAK,UAAU;IAEf,yBAAyB;IACzB,IAAI,SAAS;CACd;AAED;;GAEG;AACH,0BAAkB,eAAe;IAC/B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,iBAAiB;IACjB,KAAK,EAAE,WAAW,GAAG,MAAM,CAAA;IAE3B,mBAAmB;IACnB,IAAI,EAAE,WAAW,CAAA;IAEjB,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,YAAY;IACZ,KAAK,CAAC,EAAE,YAA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|
|
3
|
+
* @module @tsdatagrid/types/features/virtualization
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Virtualization mode
|
|
7
|
+
*/
|
|
8
|
+
export declare const enum VirtualizationMode {
|
|
9
|
+
/** No virtualization */
|
|
10
|
+
None = "none",
|
|
11
|
+
/** Vertical virtualization (rows) */
|
|
12
|
+
Vertical = "vertical",
|
|
13
|
+
/** Horizontal virtualization (columns) */
|
|
14
|
+
Horizontal = "horizontal",
|
|
15
|
+
/** Both vertical and horizontal */
|
|
16
|
+
Both = "both"
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Scroll mode
|
|
20
|
+
*/
|
|
21
|
+
export declare const enum ScrollMode {
|
|
22
|
+
/** Standard scrolling */
|
|
23
|
+
Standard = "standard",
|
|
24
|
+
/** Virtual scrolling */
|
|
25
|
+
Virtual = "virtual",
|
|
26
|
+
/** Infinite scrolling */
|
|
27
|
+
Infinite = "infinite"
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Virtualization configuration
|
|
31
|
+
*/
|
|
32
|
+
export interface VirtualizationConfig {
|
|
33
|
+
/** Virtualization mode */
|
|
34
|
+
mode?: VirtualizationMode;
|
|
35
|
+
/** Row height */
|
|
36
|
+
rowHeight?: number;
|
|
37
|
+
/** Column width */
|
|
38
|
+
columnWidth?: number;
|
|
39
|
+
/** Buffer size (rows) */
|
|
40
|
+
rowBuffer?: number;
|
|
41
|
+
/** Column buffer */
|
|
42
|
+
columnBuffer?: number;
|
|
43
|
+
/** Enable row virtualization */
|
|
44
|
+
enableRowVirtualization?: boolean;
|
|
45
|
+
/** Enable column virtualization */
|
|
46
|
+
enableColumnVirtualization?: boolean;
|
|
47
|
+
/** Threshold (items before virtualization kicks in) */
|
|
48
|
+
threshold?: number;
|
|
49
|
+
/** Scroll mode */
|
|
50
|
+
scrollMode?: ScrollMode;
|
|
51
|
+
/** Preload pages */
|
|
52
|
+
preloadPages?: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Virtual viewport
|
|
56
|
+
*/
|
|
57
|
+
export interface VirtualViewport {
|
|
58
|
+
/** Viewport start index */
|
|
59
|
+
startIndex: number;
|
|
60
|
+
/** Viewport end index */
|
|
61
|
+
endIndex: number;
|
|
62
|
+
/** Visible rows */
|
|
63
|
+
visibleRows: any[];
|
|
64
|
+
/** Offset top */
|
|
65
|
+
offsetTop: number;
|
|
66
|
+
/** Offset bottom */
|
|
67
|
+
offsetBottom: number;
|
|
68
|
+
/** Total height */
|
|
69
|
+
totalHeight: number;
|
|
70
|
+
/** Viewport height */
|
|
71
|
+
viewportHeight: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Virtual scroll state
|
|
75
|
+
*/
|
|
76
|
+
export interface VirtualScrollState {
|
|
77
|
+
/** Scroll top */
|
|
78
|
+
scrollTop: number;
|
|
79
|
+
/** Scroll left */
|
|
80
|
+
scrollLeft: number;
|
|
81
|
+
/** Viewport */
|
|
82
|
+
viewport: VirtualViewport;
|
|
83
|
+
/** Is scrolling */
|
|
84
|
+
isScrolling: boolean;
|
|
85
|
+
/** Last scroll time */
|
|
86
|
+
lastScrollTime: number;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=virtualization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualization.d.ts","sourceRoot":"","sources":["../../../src/types/features/virtualization.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,0BAAkB,kBAAkB;IAClC,wBAAwB;IACxB,IAAI,SAAS;IAEb,qCAAqC;IACrC,QAAQ,aAAa;IAErB,0CAA0C;IAC1C,UAAU,eAAe;IAEzB,mCAAmC;IACnC,IAAI,SAAS;CACd;AAED;;GAEG;AACH,0BAAkB,UAAU;IAC1B,yBAAyB;IACzB,QAAQ,aAAa;IAErB,wBAAwB;IACxB,OAAO,YAAY;IAEnB,yBAAyB;IACzB,QAAQ,aAAa;CACtB;AAED;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
/**
|
|
2
|
+
* @fileoverview TSDataGrid type definitions
|
|
3
|
+
* @module @tsdatagrid/types
|
|
4
|
+
* @version 1.0.0
|
|
5
|
+
*/
|
|
6
|
+
export * from './core/base';
|
|
7
|
+
export * from './core/column';
|
|
8
|
+
export * from './core/datasource';
|
|
9
|
+
export * from './core/events';
|
|
10
|
+
export * from './core/models';
|
|
11
|
+
export * from './features/editing';
|
|
12
|
+
export * from './features/filtering';
|
|
13
|
+
export * from './features/sorting';
|
|
14
|
+
export * from './features/grouping';
|
|
15
|
+
export * from './features/selection';
|
|
16
|
+
export * from './features/searching';
|
|
17
|
+
export * from './features/pagination';
|
|
18
|
+
export * from './features/export';
|
|
19
|
+
export * from './features/summary';
|
|
20
|
+
export * from './features/keyboard';
|
|
21
|
+
export * from './features/virtualization';
|
|
22
|
+
export * from './features/accessibility';
|
|
23
|
+
export * from './state/grid-state';
|
|
24
|
+
export * from './state/persistence';
|
|
25
|
+
export * from './ui/toolbar';
|
|
26
|
+
export * from './ui/styling';
|
|
27
|
+
export * from './ui/templates';
|
|
28
|
+
export * from './validation/validators';
|
|
29
|
+
export declare const VERSION = "1.0.0";
|
|
30
|
+
/**
|
|
31
|
+
* Type utility: Make all properties readonly
|
|
32
|
+
*/
|
|
33
|
+
export type Immutable<T> = {
|
|
34
|
+
readonly [K in keyof T]: T[K] extends object ? Immutable<T[K]> : T[K];
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Type utility: Make all properties mutable
|
|
38
|
+
*/
|
|
39
|
+
export type Mutable<T> = {
|
|
40
|
+
-readonly [K in keyof T]: T[K];
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Type utility: Non-nullable
|
|
44
|
+
*/
|
|
45
|
+
export type NonNullableFields<T> = {
|
|
46
|
+
[K in keyof T]: NonNullable<T[K]>;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Type utility: Extract promise type
|
|
50
|
+
*/
|
|
51
|
+
export type UnwrapPromise<T> = T extends Promise<infer U> ? U : T;
|
|
52
|
+
/**
|
|
53
|
+
* Type utility: Function arguments
|
|
54
|
+
*/
|
|
55
|
+
export type ArgumentTypes<F extends Function> = F extends (...args: infer A) => any ? A : never;
|
|
56
|
+
/**
|
|
57
|
+
* Type utility: Function return type
|
|
58
|
+
*/
|
|
59
|
+
export type ReturnTypeOf<F extends Function> = F extends (...args: any[]) => infer R ? R : never;
|
|
60
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAG7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AAGxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AAGnC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAG9B,cAAc,yBAAyB,CAAA;AAGvC,eAAO,MAAM,OAAO,UAAU,CAAA;AAE9B;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;IACzB,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACtE,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IACvB,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAClC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEjE;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,QAAQ,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,CAAA;AAE/F;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,QAAQ,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ColumnDefinition } from '../core/column';
|
|
2
|
+
import { FilterCondition, ActiveFilter } from '../features/filtering';
|
|
3
|
+
import { SortDescriptor } from '../features/sorting';
|
|
4
|
+
import { GroupDescriptor, GroupedRow } from '../features/grouping';
|
|
5
|
+
import { PaginationConfig } from '../features/pagination';
|
|
6
|
+
import { SelectionState } from '../features/selection';
|
|
7
|
+
import { EditingState } from '../features/editing';
|
|
8
|
+
import { SummaryConfig, SummaryResult } from '../features/summary';
|
|
9
|
+
import { SearchState } from '../features/searching';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Grid state
|
|
13
|
+
*/
|
|
14
|
+
export interface GridState<T = any> {
|
|
15
|
+
columns: ColumnDefinition[];
|
|
16
|
+
visibleColumns: ColumnDefinition[];
|
|
17
|
+
columnOrder: string[];
|
|
18
|
+
columnWidths: Record<string, number | string>;
|
|
19
|
+
columnVisibility: Record<string, boolean>;
|
|
20
|
+
data: T[];
|
|
21
|
+
filteredData: T[];
|
|
22
|
+
groupedData?: GroupedRow<T>[];
|
|
23
|
+
totalCount: number;
|
|
24
|
+
filters: FilterCondition[];
|
|
25
|
+
activeFilters: ActiveFilter[];
|
|
26
|
+
sorting: SortDescriptor[];
|
|
27
|
+
grouping: GroupDescriptor[];
|
|
28
|
+
expandedGroups: Set<string>;
|
|
29
|
+
pagination: PaginationConfig & {
|
|
30
|
+
page: number;
|
|
31
|
+
pageSize: number;
|
|
32
|
+
totalPages: number;
|
|
33
|
+
total: number;
|
|
34
|
+
};
|
|
35
|
+
selection: SelectionState;
|
|
36
|
+
editing?: EditingState;
|
|
37
|
+
search?: SearchState;
|
|
38
|
+
summary?: {
|
|
39
|
+
configs: SummaryConfig[];
|
|
40
|
+
results: SummaryResult[];
|
|
41
|
+
};
|
|
42
|
+
loading: boolean;
|
|
43
|
+
error?: string;
|
|
44
|
+
columnChooserVisible: boolean;
|
|
45
|
+
scrollPosition: {
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
};
|
|
49
|
+
isDirty: boolean;
|
|
50
|
+
hasChanges: boolean;
|
|
51
|
+
validationErrors?: Map<any, Record<string, string>>;
|
|
52
|
+
timestamp: Date;
|
|
53
|
+
version: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Partial grid state (for updates)
|
|
57
|
+
*/
|
|
58
|
+
export type PartialGridState<T = any> = Partial<GridState<T>>;
|
|
59
|
+
/**
|
|
60
|
+
* Grid state snapshot
|
|
61
|
+
*/
|
|
62
|
+
export interface GridStateSnapshot<T = any> {
|
|
63
|
+
/** State */
|
|
64
|
+
state: GridState<T>;
|
|
65
|
+
/** Timestamp */
|
|
66
|
+
timestamp: Date;
|
|
67
|
+
/** Description */
|
|
68
|
+
description?: string;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=grid-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-state.d.ts","sourceRoot":"","sources":["../../../src/types/state/grid-state.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD;;GAEG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,GAAG;IAEhC,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B,cAAc,EAAE,gBAAgB,EAAE,CAAA;IAClC,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;IAC7C,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAGzC,IAAI,EAAE,CAAC,EAAE,CAAA;IACT,YAAY,EAAE,CAAC,EAAE,CAAA;IACjB,WAAW,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CA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,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IAEnB,gBAAgB;IAChB,SAAS,EAAE,IAAI,CAAA;IAEf,kBAAkB;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { GridState } from './grid-state';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Storage type
|
|
5
|
+
*/
|
|
6
|
+
export declare const enum StorageType {
|
|
7
|
+
LocalStorage = "localStorage",
|
|
8
|
+
SessionStorage = "sessionStorage",
|
|
9
|
+
Memory = "memory",
|
|
10
|
+
Custom = "custom"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Persistence configuration
|
|
14
|
+
*/
|
|
15
|
+
export interface PersistenceConfig {
|
|
16
|
+
/** Enable persistence */
|
|
17
|
+
enabled?: boolean;
|
|
18
|
+
/** Storage type */
|
|
19
|
+
storageType?: StorageType;
|
|
20
|
+
/** Storage key */
|
|
21
|
+
storageKey?: string;
|
|
22
|
+
/** Save on change */
|
|
23
|
+
saveOnChange?: boolean;
|
|
24
|
+
/** Debounce delay (ms) */
|
|
25
|
+
debounce?: number;
|
|
26
|
+
/** Persist columns */
|
|
27
|
+
persistColumns?: boolean;
|
|
28
|
+
/** Persist filters */
|
|
29
|
+
persistFilters?: boolean;
|
|
30
|
+
/** Persist sorting */
|
|
31
|
+
persistSorting?: boolean;
|
|
32
|
+
/** Persist grouping */
|
|
33
|
+
persistGrouping?: boolean;
|
|
34
|
+
/** Persist pagination */
|
|
35
|
+
persistPagination?: boolean;
|
|
36
|
+
/** Persist selection */
|
|
37
|
+
persistSelection?: boolean;
|
|
38
|
+
/** Custom storage */
|
|
39
|
+
customStorage?: IStorageProvider;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Storage provider interface
|
|
43
|
+
*/
|
|
44
|
+
export interface IStorageProvider {
|
|
45
|
+
/** Get item */
|
|
46
|
+
getItem(key: string): string | null | Promise<string | null>;
|
|
47
|
+
/** Set item */
|
|
48
|
+
setItem(key: string, value: string): void | Promise<void>;
|
|
49
|
+
/** Remove item */
|
|
50
|
+
removeItem(key: string): void | Promise<void>;
|
|
51
|
+
/** Clear all */
|
|
52
|
+
clear(): void | Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Persisted state
|
|
56
|
+
*/
|
|
57
|
+
export interface PersistedState {
|
|
58
|
+
/** Version */
|
|
59
|
+
version: string;
|
|
60
|
+
/** Timestamp */
|
|
61
|
+
timestamp: Date;
|
|
62
|
+
/** State */
|
|
63
|
+
state: Partial<GridState>;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=persistence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../../../src/types/state/persistence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C;;GAEG;AACH,0BAAkB,WAAW;IAC3B,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,yBAAyB;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,mBAAmB;IACnB,WAAW,CAAC,EAAE,WAAW,CAAA;IAEzB,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,qBAAqB;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,sBAAsB;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB,sBAAsB;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB,sBAAsB;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB,uBAAuB;IACvB,eAAe,CAAC,EAAE,OAAO,CAAA;IAEzB,yBAAyB;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAE3B,wBAAwB;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAE1B,qBAAqB;IACrB,aAAa,CAAC,EAAE,gBAAgB,CAAA;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,eAAe;IACf,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAE5D,eAAe;IACf,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEzD,kBAAkB;IAClB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAE7C,gBAAgB;IAChB,KAAK,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,cAAc;IACd,OAAO,EAAE,MAAM,CAAA;IAEf,gBAAgB;IAChB,SAAS,EAAE,IAAI,CAAA;IAEf,YAAY;IACZ,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;CAC1B"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { GridTheme } from '../core/base';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CSS class configuration
|
|
5
|
+
*/
|
|
6
|
+
export interface CssClassConfig {
|
|
7
|
+
/** Grid container */
|
|
8
|
+
grid?: string;
|
|
9
|
+
/** Header */
|
|
10
|
+
header?: string;
|
|
11
|
+
/** Header row */
|
|
12
|
+
headerRow?: string;
|
|
13
|
+
/** Header cell */
|
|
14
|
+
headerCell?: string;
|
|
15
|
+
/** Body */
|
|
16
|
+
body?: string;
|
|
17
|
+
/** Row */
|
|
18
|
+
row?: string;
|
|
19
|
+
/** Cell */
|
|
20
|
+
cell?: string;
|
|
21
|
+
/** Footer */
|
|
22
|
+
footer?: string;
|
|
23
|
+
/** Toolbar */
|
|
24
|
+
toolbar?: string;
|
|
25
|
+
/** Pagination */
|
|
26
|
+
pagination?: string;
|
|
27
|
+
/** Group panel */
|
|
28
|
+
groupPanel?: string;
|
|
29
|
+
/** Filter row */
|
|
30
|
+
filterRow?: string;
|
|
31
|
+
/** Summary row */
|
|
32
|
+
summaryRow?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Theme configuration
|
|
36
|
+
*/
|
|
37
|
+
export interface ThemeConfig {
|
|
38
|
+
/** Theme name */
|
|
39
|
+
name: GridTheme | string;
|
|
40
|
+
/** CSS classes */
|
|
41
|
+
cssClasses?: CssClassConfig;
|
|
42
|
+
/** CSS variables */
|
|
43
|
+
cssVariables?: Record<string, string>;
|
|
44
|
+
/** Custom CSS */
|
|
45
|
+
customCss?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Style configuration
|
|
49
|
+
*/
|
|
50
|
+
export interface StyleConfig {
|
|
51
|
+
/** Theme */
|
|
52
|
+
theme?: ThemeConfig;
|
|
53
|
+
/** Row height */
|
|
54
|
+
rowHeight?: number;
|
|
55
|
+
/** Header height */
|
|
56
|
+
headerHeight?: number;
|
|
57
|
+
/** Footer height */
|
|
58
|
+
footerHeight?: number;
|
|
59
|
+
/** Cell padding */
|
|
60
|
+
cellPadding?: number | string;
|
|
61
|
+
/** Border style */
|
|
62
|
+
borderStyle?: 'solid' | 'dashed' | 'dotted' | 'none';
|
|
63
|
+
/** Border color */
|
|
64
|
+
borderColor?: string;
|
|
65
|
+
/** Stripe rows */
|
|
66
|
+
stripeRows?: boolean;
|
|
67
|
+
/** Hover effect */
|
|
68
|
+
hoverEffect?: boolean;
|
|
69
|
+
/** Focus effect */
|
|
70
|
+
focusEffect?: boolean;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=styling.d.ts.map
|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,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,oBAAoB;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,oBAAoB;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAE7B,mBAAmB;IACnB,WAAW,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAA;IAEpD,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,kBAAkB;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB,mBAAmB;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB,mBAAmB;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { CellTemplateContext, HeaderTemplateContext } from '../core/column';
|
|
3
|
+
import { ActiveFilter } from '../features/filtering';
|
|
4
|
+
import { SummaryResult } from '../features/summary';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Template context base
|
|
8
|
+
*/
|
|
9
|
+
export interface TemplateContext {
|
|
10
|
+
/** Grid instance */
|
|
11
|
+
grid?: any;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Group header template context
|
|
15
|
+
*/
|
|
16
|
+
export interface GroupHeaderTemplateContext extends TemplateContext {
|
|
17
|
+
/** Group key */
|
|
18
|
+
groupKey: string;
|
|
19
|
+
/** Group value */
|
|
20
|
+
groupValue: any;
|
|
21
|
+
/** Group count */
|
|
22
|
+
count: number;
|
|
23
|
+
/** Group level */
|
|
24
|
+
level: number;
|
|
25
|
+
/** Is expanded */
|
|
26
|
+
isExpanded: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Summary template context
|
|
30
|
+
*/
|
|
31
|
+
export interface SummaryTemplateContext extends TemplateContext {
|
|
32
|
+
/** Summary results */
|
|
33
|
+
summaries: SummaryResult[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* No data template context
|
|
37
|
+
*/
|
|
38
|
+
export interface NoDataTemplateContext extends TemplateContext {
|
|
39
|
+
/** Has filters */
|
|
40
|
+
hasFilters: boolean;
|
|
41
|
+
/** Has search */
|
|
42
|
+
hasSearch: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Toolbar template context
|
|
46
|
+
*/
|
|
47
|
+
export interface ToolbarTemplateContext extends TemplateContext {
|
|
48
|
+
/** Selected count */
|
|
49
|
+
selectedCount: number;
|
|
50
|
+
/** Total count */
|
|
51
|
+
totalCount: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Template function
|
|
55
|
+
*/
|
|
56
|
+
export type TemplateFunction<TContext = any> = (context: TContext) => VNode | string;
|
|
57
|
+
/**
|
|
58
|
+
* Grid templates
|
|
59
|
+
*/
|
|
60
|
+
export interface GridTemplates {
|
|
61
|
+
/** Cell template */
|
|
62
|
+
cell?: TemplateFunction<CellTemplateContext>;
|
|
63
|
+
/** Header cell template */
|
|
64
|
+
headerCell?: TemplateFunction<HeaderTemplateContext>;
|
|
65
|
+
/** Group header template */
|
|
66
|
+
groupHeader?: TemplateFunction<GroupHeaderTemplateContext>;
|
|
67
|
+
/** Summary template */
|
|
68
|
+
summary?: TemplateFunction<SummaryTemplateContext>;
|
|
69
|
+
/** No data template */
|
|
70
|
+
noData?: TemplateFunction<NoDataTemplateContext>;
|
|
71
|
+
/** Loading template */
|
|
72
|
+
loading?: TemplateFunction<TemplateContext>;
|
|
73
|
+
/** Toolbar template */
|
|
74
|
+
toolbar?: TemplateFunction<ToolbarTemplateContext>;
|
|
75
|
+
/** Active filters template */
|
|
76
|
+
activeFilters?: TemplateFunction<{
|
|
77
|
+
filters: ActiveFilter[];
|
|
78
|
+
}>;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/types/ui/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAChC,OAAO,KAAK,EAAE,mBAAmB,EAAoB,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAClG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,IAAI,CAAC,EAAE,GAAG,CAAA;CACX;AAED;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,eAAe;IACjE,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAEhB,kBAAkB;IAClB,UAAU,EAAE,GAAG,CAAA;IAEf,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAA;IAEb,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAA;IAEb,kBAAkB;IAClB,UAAU,EAAE,OAAO,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,eAAe;IAC7D,sBAAsB;IACtB,SAAS,EAAE,aAAa,EAAE,CAAA;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,kBAAkB;IAClB,UAAU,EAAE,OAAO,CAAA;IAEnB,iBAAiB;IACjB,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,eAAe;IAC7D,qBAAqB;IACrB,aAAa,EAAE,MAAM,CAAA;IAErB,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,QAAQ,KAAK,KAAK,GAAG,MAAM,CAAA;AAEpF;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IACpB,IAAI,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,CAAA;IAE5C,2BAA2B;IAC3B,UAAU,CAAC,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,CAAA;IAEpD,4BAA4B;IAC5B,WAAW,CAAC,EAAE,gBAAgB,CAAC,0BAA0B,CAAC,CAAA;IAE1D,uBAAuB;IACvB,OAAO,CAAC,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,CAAA;IAElD,uBAAuB;IACvB,MAAM,CAAC,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,CAAA;IAEhD,uBAAuB;IACvB,OAAO,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAA;IAE3C,uBAAuB;IACvB,OAAO,CAAC,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,CAAA;IAElD,8BAA8B;IAC9B,aAAa,CAAC,EAAE,gBAAgB,CAAC;QAAE,OAAO,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC,CAAA;CAC9D"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Component, VNode } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Toolbar action location
|
|
5
|
+
*/
|
|
6
|
+
export declare const enum ToolbarLocation {
|
|
7
|
+
Before = "before",
|
|
8
|
+
After = "after",
|
|
9
|
+
Center = "center"
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Toolbar action
|
|
13
|
+
*/
|
|
14
|
+
export interface ToolbarAction {
|
|
15
|
+
/** Action ID */
|
|
16
|
+
id?: string;
|
|
17
|
+
/** Display text */
|
|
18
|
+
text?: string;
|
|
19
|
+
/** Icon (component or string) */
|
|
20
|
+
icon?: Component | string;
|
|
21
|
+
/** CSS class */
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Disabled */
|
|
24
|
+
disabled?: boolean | (() => boolean);
|
|
25
|
+
/** Visible */
|
|
26
|
+
visible?: boolean | (() => boolean);
|
|
27
|
+
/** Tooltip */
|
|
28
|
+
tooltip?: string;
|
|
29
|
+
/** Location */
|
|
30
|
+
location?: ToolbarLocation;
|
|
31
|
+
/** On click handler */
|
|
32
|
+
onClick?: () => void;
|
|
33
|
+
/** Template */
|
|
34
|
+
template?: () => VNode;
|
|
35
|
+
/** Widget type */
|
|
36
|
+
widget?: 'button' | 'menu' | 'separator' | 'custom';
|
|
37
|
+
/** Menu items (for dropdown) */
|
|
38
|
+
items?: ToolbarAction[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Toolbar configuration
|
|
42
|
+
*/
|
|
43
|
+
export interface ToolbarConfig {
|
|
44
|
+
/** Show toolbar */
|
|
45
|
+
visible?: boolean;
|
|
46
|
+
/** Actions */
|
|
47
|
+
actions?: ToolbarAction[];
|
|
48
|
+
/** Show refresh */
|
|
49
|
+
showRefresh?: boolean;
|
|
50
|
+
/** Show export */
|
|
51
|
+
showExport?: boolean;
|
|
52
|
+
/** Show column chooser */
|
|
53
|
+
showColumnChooser?: boolean;
|
|
54
|
+
/** Show search */
|
|
55
|
+
showSearch?: boolean;
|
|
56
|
+
/** Show add */
|
|
57
|
+
showAdd?: boolean;
|
|
58
|
+
/** Show delete */
|
|
59
|
+
showDelete?: boolean;
|
|
60
|
+
/** Custom template */
|
|
61
|
+
template?: () => VNode;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../src/types/ui/toolbar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAE3C;;GAEG;AACH,0BAAkB,eAAe;IAC/B,MAAM,WAAW;IACjB,KAAK,UAAU;I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