@coreui/data-grid 0.3.0-rc.0 → 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.
Files changed (122) hide show
  1. package/dist/css/data-grid.css +1 -1
  2. package/dist/css/data-grid.css.map +1 -1
  3. package/dist/css/data-grid.min.css +1 -1
  4. package/dist/css/data-grid.min.css.map +1 -1
  5. package/dist/css/data-grid.standalone.css +6 -6
  6. package/dist/css/data-grid.standalone.css.map +1 -1
  7. package/dist/css/data-grid.standalone.min.css +1 -1
  8. package/dist/css/data-grid.standalone.min.css.map +1 -1
  9. package/dist/js/clipboard.cjs +2 -3
  10. package/dist/js/clipboard.mjs +2 -3
  11. package/dist/js/csv.cjs +5 -6
  12. package/dist/js/csv.cjs.map +1 -1
  13. package/dist/js/csv.mjs +5 -6
  14. package/dist/js/csv.mjs.map +1 -1
  15. package/dist/js/data-grid.esm.js +5899 -5667
  16. package/dist/js/data-grid.esm.js.map +1 -1
  17. package/dist/js/data-grid.esm.min.js +2 -2
  18. package/dist/js/data-grid.esm.min.js.map +1 -1
  19. package/dist/js/data-grid.js +5899 -5668
  20. package/dist/js/data-grid.js.map +1 -1
  21. package/dist/js/data-grid.lite.esm.js +2669 -2622
  22. package/dist/js/data-grid.lite.esm.js.map +1 -1
  23. package/dist/js/data-grid.lite.esm.min.js +2 -2
  24. package/dist/js/data-grid.lite.esm.min.js.map +1 -1
  25. package/dist/js/data-grid.lite.js +2669 -2623
  26. package/dist/js/data-grid.lite.js.map +1 -1
  27. package/dist/js/data-grid.lite.min.js +2 -2
  28. package/dist/js/data-grid.lite.min.js.map +1 -1
  29. package/dist/js/data-grid.lite.mjs +2669 -2622
  30. package/dist/js/data-grid.lite.mjs.map +1 -1
  31. package/dist/js/data-grid.min.js +2 -2
  32. package/dist/js/data-grid.min.js.map +1 -1
  33. package/dist/js/data-grid.mjs +5899 -5667
  34. package/dist/js/data-grid.mjs.map +1 -1
  35. package/dist/js/direction.cjs +3 -4
  36. package/dist/js/direction.cjs.map +1 -1
  37. package/dist/js/direction.mjs +3 -4
  38. package/dist/js/direction.mjs.map +1 -1
  39. package/dist/js/drag.cjs +6 -6
  40. package/dist/js/drag.cjs.map +1 -1
  41. package/dist/js/drag.mjs +6 -6
  42. package/dist/js/drag.mjs.map +1 -1
  43. package/dist/js/{export-table-BdabEbJG.mjs → export-table-BggGRmzQ.mjs} +3 -4
  44. package/dist/js/{export-table-BdabEbJG.mjs.map → export-table-BggGRmzQ.mjs.map} +1 -1
  45. package/dist/js/{export-table-D762wrZ1.cjs → export-table-BiB3_lVo.cjs} +3 -4
  46. package/dist/js/{export-table-D762wrZ1.cjs.map → export-table-BiB3_lVo.cjs.map} +1 -1
  47. package/dist/js/filters.cjs +2 -3
  48. package/dist/js/filters.mjs +2 -3
  49. package/dist/js/labels.cjs +2 -3
  50. package/dist/js/labels.mjs +2 -3
  51. package/dist/js/print.cjs +2 -3
  52. package/dist/js/print.mjs +2 -3
  53. package/dist/js/selector.cjs +22 -0
  54. package/dist/js/selector.cjs.map +1 -0
  55. package/dist/js/selector.mjs +21 -0
  56. package/dist/js/selector.mjs.map +1 -0
  57. package/dist/js/validate.cjs +2 -3
  58. package/dist/js/validate.mjs +2 -3
  59. package/dist/js/xlsx.cjs +5 -7
  60. package/dist/js/xlsx.cjs.map +1 -1
  61. package/dist/js/xlsx.mjs +5 -7
  62. package/dist/js/xlsx.mjs.map +1 -1
  63. package/dist/types/base-component.d.mts +29 -0
  64. package/dist/types/data-grid.d.mts +141 -0
  65. package/dist/types/dom/data.d.mts +15 -0
  66. package/dist/types/dom/event-handler.d.mts +22 -0
  67. package/dist/types/dom/manipulator.d.mts +16 -0
  68. package/dist/types/engine/active-cell.d.mts +33 -0
  69. package/dist/types/engine/data-source.d.mts +19 -0
  70. package/dist/types/engine/features-lite.d.mts +25 -0
  71. package/dist/types/engine/features.d.mts +35 -0
  72. package/dist/types/engine/scheduler.d.mts +11 -0
  73. package/dist/types/engine/table.d.mts +9 -0
  74. package/dist/types/engine/validate.d.mts +20 -1
  75. package/dist/types/engine/virtualizer.d.mts +23 -0
  76. package/dist/types/filters.d.mts +13 -1
  77. package/dist/types/icons.d.mts +23 -0
  78. package/dist/types/index-lite.d.mts +19 -1
  79. package/dist/types/index.d.mts +21 -1
  80. package/dist/types/labels.d.mts +9 -1
  81. package/dist/types/types.d.mts +284 -0
  82. package/dist/types/ui/body.d.mts +37 -0
  83. package/dist/types/ui/column-chooser.d.mts +27 -0
  84. package/dist/types/ui/editor.d.mts +8 -0
  85. package/dist/types/ui/filter-menu.d.mts +21 -0
  86. package/dist/types/ui/header.d.mts +51 -0
  87. package/dist/types/ui/loading.d.mts +12 -0
  88. package/dist/types/ui/menu.d.mts +17 -0
  89. package/dist/types/ui/pagination.d.mts +17 -0
  90. package/dist/types/ui/pinning.d.mts +17 -0
  91. package/dist/types/ui/toolbar.d.mts +42 -0
  92. package/dist/types/ui/tooltip.d.mts +10 -0
  93. package/dist/types/util/clipboard.d.mts +29 -1
  94. package/dist/types/util/config.d.mts +28 -0
  95. package/dist/types/util/csv.d.mts +19 -1
  96. package/dist/types/util/debounce.d.mts +7 -0
  97. package/dist/types/util/direction.d.mts +17 -1
  98. package/dist/types/util/drag.d.mts +48 -1
  99. package/dist/types/util/export-table.d.mts +47 -0
  100. package/dist/types/util/index.d.mts +66 -0
  101. package/dist/types/util/print.d.mts +32 -1
  102. package/dist/types/util/sanitizer.d.mts +15 -0
  103. package/dist/types/util/selector.d.mts +12 -0
  104. package/dist/types/util/selector.d.ts +12 -0
  105. package/dist/types/util/xlsx.d.mts +17 -1
  106. package/dist/types/util/zip.d.mts +11 -0
  107. package/package.json +29 -16
  108. package/scss/data-grid.scss +1 -1
  109. package/src/data-grid.ts +4 -3
  110. package/src/engine/active-cell.ts +2 -6
  111. package/src/index-lite.ts +1 -1
  112. package/src/index.ts +1 -1
  113. package/src/ui/column-chooser.ts +4 -4
  114. package/src/ui/filter-menu.ts +5 -5
  115. package/src/ui/menu.ts +4 -4
  116. package/src/ui/pagination.ts +1 -1
  117. package/src/ui/tooltip.ts +2 -2
  118. package/src/util/csv.ts +2 -2
  119. package/src/util/direction.ts +4 -3
  120. package/src/util/drag.ts +5 -3
  121. package/src/util/selector.ts +16 -0
  122. package/src/util/xlsx.ts +1 -1
@@ -0,0 +1,29 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI base-component.ts
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
+ *
6
+ * This component is a modified version of the Bootstrap's base-component.ts
7
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
+ * --------------------------------------------------------------------------
9
+ */
10
+ import Config, { type ComponentConfig } from './util/config.mjs';
11
+ /**
12
+ * Class definition
13
+ */
14
+ declare class BaseComponent extends Config {
15
+ ['constructor']: typeof BaseComponent;
16
+ protected _element: HTMLElement;
17
+ protected _config: ComponentConfig;
18
+ constructor(element?: string | Element | null, config?: ComponentConfig | null);
19
+ dispose(): void;
20
+ _queueCallback(callback: () => void, element: Element, isAnimated?: boolean): void;
21
+ _getConfig(config?: ComponentConfig | null): ComponentConfig;
22
+ static getInstance<T extends typeof BaseComponent>(this: T, element?: string | Element | null): InstanceType<T> | null;
23
+ static getOrCreateInstance<T extends typeof BaseComponent>(this: T, element?: string | Element | null, config?: ComponentConfig | null): InstanceType<T>;
24
+ static get VERSION(): string;
25
+ static get DATA_KEY(): string;
26
+ static get EVENT_KEY(): string;
27
+ static eventName(name: string): string;
28
+ }
29
+ export default BaseComponent;
@@ -0,0 +1,141 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ import BaseComponent from './base-component.mjs';
8
+ import type { ComponentConfig } from './util/config.mjs';
9
+ import type { DataGridFeatures, DataGridItem, DataGridOptions, DataGridState, DataGridTable, TableFeatures } from './types.mjs';
10
+ import { type CsvDownloadOptions, type CsvOptions } from './util/csv.mjs';
11
+ /**
12
+ * Class definition
13
+ */
14
+ declare class DataGrid<TFeatures extends TableFeatures = DataGridFeatures> extends BaseComponent {
15
+ _config: DataGridOptions;
16
+ private _table;
17
+ private _unsubscribeState;
18
+ private _scheduler;
19
+ private _virtualizer;
20
+ private _header;
21
+ private _body;
22
+ private _toolbar;
23
+ private _paginations;
24
+ private _emptySlot;
25
+ private _dataSource;
26
+ private _loading;
27
+ private _loadingMore;
28
+ private _loadFailed;
29
+ private _loadedItems;
30
+ private _loadMorePending;
31
+ private _pageResetPending;
32
+ private _dataVersion;
33
+ private _viewportElement;
34
+ private _tableElement;
35
+ private _liveRegion;
36
+ private _labels;
37
+ private _selectionAnchorIndex;
38
+ private _activeCell;
39
+ private _containsFocus;
40
+ private _editingCell;
41
+ private _undoStack;
42
+ private _redoStack;
43
+ private _persistState;
44
+ private _editor;
45
+ private _editorPointerdownHandler;
46
+ private _editorPopup;
47
+ private _editorErrorElement;
48
+ private _editorFocusPending;
49
+ private _columnsByKey;
50
+ private _columnDrag;
51
+ private _rowDrag;
52
+ private _menu;
53
+ private _tooltip;
54
+ private _filterMenu;
55
+ private _columnChooser;
56
+ private _toolbarConfig;
57
+ constructor(element: Element | string, config?: Partial<DataGridOptions<TFeatures>>);
58
+ get table(): DataGridTable<TFeatures>;
59
+ static get Default(): DataGridOptions;
60
+ static get DefaultType(): Record<string, string>;
61
+ static get NAME(): string;
62
+ getSelectedItems(): DataGridItem[];
63
+ print(): void;
64
+ getCsv(options?: CsvOptions): string;
65
+ downloadCsv(options?: CsvDownloadOptions): void;
66
+ getState(): DataGridState;
67
+ restoreState(state: Partial<DataGridState>): void;
68
+ undo(): void;
69
+ redo(): void;
70
+ private _applyHistoryEntry;
71
+ setItems(items: DataGridItem[]): void;
72
+ update(config: Partial<DataGridOptions<TFeatures>>): void;
73
+ dispose(): void;
74
+ _configAfterMerge(config: ComponentConfig): ComponentConfig;
75
+ private _createTable;
76
+ private _teardownUi;
77
+ private _slotContext;
78
+ private _isColumnSortable;
79
+ private _isColumnFilterable;
80
+ private _isColumnResizable;
81
+ private _sanitizeIcon;
82
+ private _hasColumnMenu;
83
+ private _renderToolbar;
84
+ private _render;
85
+ private _addEventListeners;
86
+ private _toggleColumnSorting;
87
+ private _navigableCellFromTarget;
88
+ private _onCellFocusIn;
89
+ private _onCellNavigationKeydown;
90
+ private _tableCellFromTarget;
91
+ private _descendIntoCell;
92
+ private _isColumnEditable;
93
+ private _startEditing;
94
+ private _editScopeContains;
95
+ private _mountEditorPopup;
96
+ private _commitEdit;
97
+ private _cancelEdit;
98
+ private _stopEditing;
99
+ private _showEditorInvalid;
100
+ private _moveEditing;
101
+ private _teardownEditor;
102
+ private _setActiveCell;
103
+ private _printColumns;
104
+ private _clipboardColumns;
105
+ private _copyCellSelection;
106
+ private _activeCellContext;
107
+ private _cellElementFor;
108
+ private _applyCellNavigation;
109
+ private _getMenuActions;
110
+ private _orderedLeafIds;
111
+ private _moveColumn;
112
+ private _initColumnDrag;
113
+ private _rowIndexOffset;
114
+ private _initRowDrag;
115
+ private _moveRowTo;
116
+ private _moveColumnTo;
117
+ private _startColumnResize;
118
+ private _toggleRowSelection;
119
+ private _initDataSource;
120
+ private _maybeLoadMore;
121
+ private _visibleLeafColumns;
122
+ private _pinnedRegion;
123
+ private _chooserColumns;
124
+ private _visibleColumns;
125
+ private _getColumnSizes;
126
+ private _getFilteredColumns;
127
+ private _getPinning;
128
+ private _storageKey;
129
+ private _restorePersistedState;
130
+ private _updateHistoryButtons;
131
+ private _announceResults;
132
+ private _announce;
133
+ private _getTotalRows;
134
+ private _notifyStateChange;
135
+ private _update;
136
+ private _paginationState;
137
+ static jQueryInterface(this: {
138
+ each: (callback: (this: HTMLElement) => void) => unknown;
139
+ }, config?: string | Partial<DataGridOptions>): unknown;
140
+ }
141
+ export default DataGrid;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI dom/data.ts
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
+ *
6
+ * This is a modified version of the Bootstrap's dom/data.js
7
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
+ * --------------------------------------------------------------------------
9
+ */
10
+ declare const _default: {
11
+ set(element: Element, key: string, instance: unknown): void;
12
+ get(element: Element | null, key: string): any;
13
+ remove(element: Element, key: string): void;
14
+ };
15
+ export default _default;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI dom/event-handler.ts
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
+ *
6
+ * This is a modified version of the Bootstrap's dom/event-handler.ts
7
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
+ * --------------------------------------------------------------------------
9
+ */
10
+ /**
11
+ * Types
12
+ */
13
+ type CoreUIEvent = Event & Record<string, any>;
14
+ type EventCallable = (this: any, event: CoreUIEvent) => any;
15
+ declare const EventHandler: {
16
+ on(element: EventTarget | null, event: string, handler?: string | EventCallable, delegationFunction?: EventCallable): void;
17
+ one(element: EventTarget | null, event: string, handler?: string | EventCallable, delegationFunction?: EventCallable): void;
18
+ off(element: EventTarget | null, originalTypeEvent: string, handler?: string | EventCallable, delegationFunction?: EventCallable): void;
19
+ trigger(element: EventTarget | null, event: string, args?: Record<string, unknown>): CoreUIEvent | null;
20
+ };
21
+ export default EventHandler;
22
+ export type { CoreUIEvent, EventCallable };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI dom/manipulator.ts
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
+ *
6
+ * This is a modified version of the Bootstrap's dom/manipulator.ts
7
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
+ * --------------------------------------------------------------------------
9
+ */
10
+ declare const Manipulator: {
11
+ setDataAttribute(element: Element, key: string, value: unknown): void;
12
+ removeDataAttribute(element: Element, key: string): void;
13
+ getDataAttributes(element: HTMLElement | null): Record<string, unknown>;
14
+ getDataAttribute(element: Element, key: string): unknown;
15
+ };
16
+ export default Manipulator;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid engine/active-cell.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ export interface ActiveCell {
8
+ rowIndex: number;
9
+ columnId: string;
10
+ }
11
+ export interface ActiveCellContext {
12
+ columnIds: string[];
13
+ rowCount: number;
14
+ pageStep: number;
15
+ paginated: boolean;
16
+ rtl?: boolean;
17
+ }
18
+ export interface NavigationResult {
19
+ cell: ActiveCell;
20
+ pageDelta?: -1 | 1;
21
+ }
22
+ export declare const clampActiveCell: (cell: ActiveCell | null, context: ActiveCellContext) => ActiveCell | null;
23
+ export declare const resolveNavigation: (key: string, ctrlKey: boolean, current: ActiveCell, context: ActiveCellContext) => NavigationResult | null;
24
+ export interface ActiveCellManager {
25
+ get: () => ActiveCell | null;
26
+ set: (cell: ActiveCell, options?: {
27
+ focus?: boolean;
28
+ }) => void;
29
+ clamp: (context: ActiveCellContext) => void;
30
+ reset: () => void;
31
+ consumeFocusRequest: () => boolean;
32
+ }
33
+ export declare const createActiveCellManager: (onChange: () => void) => ActiveCellManager;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid engine/data-source.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ import type { DataGridDataRequest, DataGridDataResponse } from '../types.mjs';
8
+ export interface GridDataSourceContext {
9
+ getRequest: () => DataGridDataRequest;
10
+ onError: (error: unknown) => void;
11
+ onLoad: (response: DataGridDataResponse, request: DataGridDataRequest) => void;
12
+ onLoadingChange: (loading: boolean) => void;
13
+ provider: (request: DataGridDataRequest) => Promise<DataGridDataResponse>;
14
+ }
15
+ export interface GridDataSource {
16
+ load: () => void;
17
+ dispose: () => void;
18
+ }
19
+ export declare const createDataSource: (context: GridDataSourceContext) => GridDataSource;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid engine/features-lite.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ export declare const dataGridLiteFeatures: {
8
+ coreReactivityFeature: import("@tanstack/table-core/reactivity").TableReactivityBindings;
9
+ columnFilteringFeature: import("@tanstack/table-core").TableFeature;
10
+ globalFilteringFeature: import("@tanstack/table-core").TableFeature;
11
+ rowPaginationFeature: import("@tanstack/table-core").TableFeature;
12
+ rowSortingFeature: import("@tanstack/table-core").TableFeature;
13
+ filteredRowModel: (table: import("@tanstack/table-core").Table<any, any>) => () => import("@tanstack/table-core").RowModel<any, any>;
14
+ paginatedRowModel: (table: import("@tanstack/table-core").Table<any, any>) => () => import("@tanstack/table-core").RowModel<any, any>;
15
+ sortedRowModel: (table: import("@tanstack/table-core").Table<any, any>) => () => import("@tanstack/table-core").RowModel<any, any>;
16
+ filterFns: {
17
+ includesString: import("@tanstack/table-core").CreatedFilterFn<any, any>;
18
+ };
19
+ sortFns: {
20
+ alphanumeric: import("@tanstack/table-core").CreatedSortFn<any, any>;
21
+ datetime: import("@tanstack/table-core").CreatedSortFn<any, any>;
22
+ text: import("@tanstack/table-core").CreatedSortFn<any, any>;
23
+ };
24
+ };
25
+ export type DataGridLiteFeatures = typeof dataGridLiteFeatures;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid engine/features.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ export declare const dataGridFeatures: {
8
+ coreReactivityFeature: import("@tanstack/table-core/reactivity").TableReactivityBindings;
9
+ cellSelectionFeature: import("@tanstack/table-core").TableFeature;
10
+ columnFilteringFeature: import("@tanstack/table-core").TableFeature;
11
+ globalFilteringFeature: import("@tanstack/table-core").TableFeature;
12
+ columnFacetingFeature: import("@tanstack/table-core").TableFeature;
13
+ columnOrderingFeature: import("@tanstack/table-core").TableFeature;
14
+ columnPinningFeature: import("@tanstack/table-core").TableFeature;
15
+ columnSizingFeature: import("@tanstack/table-core").TableFeature;
16
+ columnResizingFeature: import("@tanstack/table-core").TableFeature;
17
+ columnVisibilityFeature: import("@tanstack/table-core").TableFeature;
18
+ rowPaginationFeature: import("@tanstack/table-core").TableFeature;
19
+ rowSelectionFeature: import("@tanstack/table-core").TableFeature;
20
+ rowSortingFeature: import("@tanstack/table-core").TableFeature;
21
+ facetedRowModel: (table: import("@tanstack/table-core").Table<any, any>, columnId: string) => () => import("@tanstack/table-core").RowModel<any, any>;
22
+ facetedUniqueValues: (table: import("@tanstack/table-core").Table<import("@tanstack/table-core").TableFeatures, any>, columnId: string) => () => Map<any, number>;
23
+ filteredRowModel: (table: import("@tanstack/table-core").Table<any, any>) => () => import("@tanstack/table-core").RowModel<any, any>;
24
+ paginatedRowModel: (table: import("@tanstack/table-core").Table<any, any>) => () => import("@tanstack/table-core").RowModel<any, any>;
25
+ sortedRowModel: (table: import("@tanstack/table-core").Table<any, any>) => () => import("@tanstack/table-core").RowModel<any, any>;
26
+ filterFns: {
27
+ includesString: import("@tanstack/table-core").CreatedFilterFn<any, any>;
28
+ };
29
+ sortFns: {
30
+ alphanumeric: import("@tanstack/table-core").CreatedSortFn<any, any>;
31
+ datetime: import("@tanstack/table-core").CreatedSortFn<any, any>;
32
+ text: import("@tanstack/table-core").CreatedSortFn<any, any>;
33
+ };
34
+ };
35
+ export type DataGridFeatures = typeof dataGridFeatures;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid engine/scheduler.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ export interface Scheduler {
8
+ schedule: () => void;
9
+ dispose: () => void;
10
+ }
11
+ export declare const createScheduler: (flush: () => void) => Scheduler;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid engine/table.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ import type { DataGridOptions, DataGridTable, DataGridTableState } from '../types.mjs';
8
+ export declare const createGridTable: (options: DataGridOptions, getElement?: () => Element | null) => DataGridTable;
9
+ export declare const subscribeToTableState: (table: DataGridTable, listener: (previous: DataGridTableState, next: DataGridTableState) => void) => (() => void);
@@ -1 +1,20 @@
1
- export * from './validate.js'
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid engine/validate.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ export interface FeatureCoverageFlags {
8
+ cellSelection: boolean;
9
+ columnFilters: boolean;
10
+ columnOrder: boolean;
11
+ columnPinning: boolean;
12
+ columnSizing: boolean;
13
+ columnVisibility: boolean;
14
+ globalFilter: boolean;
15
+ pagination: boolean;
16
+ rowSelection: boolean;
17
+ selectFilters: boolean;
18
+ sorting: boolean;
19
+ }
20
+ export declare const assertFeatureCoverage: (componentName: string, features: object, flags: FeatureCoverageFlags) => void;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid engine/virtualizer.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ import { Virtualizer } from '@tanstack/virtual-core';
8
+ export type GridVirtualizerInstance = Virtualizer<HTMLDivElement, Element>;
9
+ export interface GridVirtualizer {
10
+ instance: GridVirtualizerInstance;
11
+ setCount: (count: number) => void;
12
+ remeasure: () => void;
13
+ destroy: () => void;
14
+ }
15
+ export interface GridVirtualizerOptions {
16
+ autoRowHeight: boolean;
17
+ count: number;
18
+ getScrollElement: () => HTMLDivElement;
19
+ onChange: () => void;
20
+ overscan: number;
21
+ rowHeight: number;
22
+ }
23
+ export declare const createGridVirtualizer: (options: GridVirtualizerOptions) => GridVirtualizer;
@@ -1 +1,13 @@
1
- export * from './filters.js'
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid filters.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ * Pure filter-operator logic, built as the dependency-free
7
+ * `@coreui/data-grid/filters` subpath so the framework bindings share one
8
+ * implementation without pulling in the vanilla component runtime.
9
+ */
10
+ import type { DataGridColumnFilterValue, DataGridFilterOperator, DataGridFilterType } from './types.mjs';
11
+ export declare const FILTER_OPERATORS: Record<Exclude<DataGridFilterType, 'select'>, DataGridFilterOperator[]>;
12
+ export declare const VALUELESS_OPERATORS: ReadonlySet<DataGridFilterOperator>;
13
+ export declare const evaluateColumnFilter: (cellValue: unknown, filterValue: DataGridColumnFilterValue, filterType?: DataGridFilterType) => boolean;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid icons.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ export declare const DEFAULT_COLUMN_MENU_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M204 148a52 52 0 1 0 104 0 52 52 0 1 0-104 0m78 0a26 26 0 1 1-26-26 26.03 26.03 0 0 1 26 26M204 264a52 52 0 1 0 104 0 52 52 0 1 0-104 0m78 0a26 26 0 1 1-26-26 26.03 26.03 0 0 1 26 26M204 380a52 52 0 1 0 104 0 52 52 0 1 0-104 0m78 0a26 26 0 1 1-26-26 26.03 26.03 0 0 1 26 26\"/></svg>";
8
+ export declare const DEFAULT_FILTER_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M96 197.333h320v32H96zm72 101.334h176v32H168zM216 400h80v32h-80zM48 96h416v32H48z\"/></svg>";
9
+ export declare const DEFAULT_ROW_HANDLE_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M160 96h64v64h-64zm0 128h64v64h-64zm0 128h64v64h-64zM288 96h64v64h-64zm0 128h64v64h-64zm0 128h64v64h-64z\"/></svg>";
10
+ export declare const DEFAULT_TOOLBAR_COLUMNS_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M16 64v384h480V64Zm304 32v320H192V96ZM48 96h112v320H48Zm416 320H352V96h112Z\"/></svg>";
11
+ export declare const DEFAULT_TOOLBAR_EXPORT_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M16 464h480v32H16zm379.313-164.687-22.626-22.626L280 369.373V16h-32v353.373l-92.687-92.686-22.626 22.626L264 430.627z\"/></svg>";
12
+ export declare const DEFAULT_TOOLBAR_UNDO_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M495.473 197.262c0-73.061-43.651-136.118-106.242-164.462q-2-.9-4.021-1.762-4.046-1.715-8.19-3.235-2.071-.761-4.167-1.47-4.19-1.422-8.468-2.64a180.95 180.95 0 0 0-98.675 0q-4.278 1.218-8.469 2.64-2.094.71-4.166 1.47-4.143 1.519-8.19 3.235-2.023.857-4.021 1.762c-62.592 28.344-106.242 91.4-106.242 164.462v237.483L38.627 338.75 16 361.377 150.623 496l134.623-134.623-22.627-22.627-96 96V197.263c0-72.891 52.814-133.678 122.186-146.1a149.4 149.4 0 0 1 52.479 0c69.371 12.426 122.186 73.213 122.186 146.1h32Z\"/></svg>";
13
+ export declare const DEFAULT_TOOLBAR_PRINT_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M400 144V16H112v128H16v256h96v96h288v-96h96V144ZM144 48h224v96H144Zm224 416H144V304h224Zm96-96h-64V272H112v96H48V176h416Z\"/><path fill=\"currentColor\" d=\"M384 208h32v32h-32z\"/></svg>";
14
+ export declare const DEFAULT_TOOLBAR_REDO_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M361.376 495.163 226.753 360.54l22.627-22.627 111.996 111.996 111.997-111.996L496 360.54z\"/><path fill=\"currentColor\" d=\"M377.377 472.52h-32V196.426C345.377 114.584 278.794 48 196.952 48c-83.229 0-148.426 63.106-148.426 143.667h-32c0-48.024 18.85-92.569 53.079-125.429C103.35 33.842 148.576 16 196.952 16c99.487 0 180.425 80.938 180.425 180.426Z\"/></svg>";
15
+ export declare const DEFAULT_SORT_ASCENDING_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M390.624 150.625 256 16 121.376 150.625l22.628 22.627 95.997-95.998v417.982h32V77.257l95.995 95.995z\"/></svg>";
16
+ export declare const DEFAULT_SORT_DESCENDING_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"m367.997 338.75-95.998 95.997V17.503h-32v417.242l-95.996-95.995-22.627 22.627L256 496l134.624-134.623z\"/></svg>";
17
+ export declare const DEFAULT_SORT_NEUTRAL_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M384 433.373V160h-32v274.51l-69.823-69.823-22.627 22.626 107.882 107.883 107.881-107.883-22.626-22.626zM159.432 17.372 51.55 125.255l22.627 22.627L144 78.059V352h32V79.195l68.687 68.687 22.626-22.627z\"/></svg>";
18
+ export declare const DEFAULT_PIN_START_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"m477.8 140.2-106-106a62.132 62.132 0 0 0-93.617 81.24l-4.913 5.533-97.654 42.9-42.611-23.026a24.04 24.04 0 0 0-28.86 4.638L62.6 189.487a23.88 23.88 0 0 0 .479 33.449l101.68 101.679L16 473.373V496h22.627l148.758-148.758L288.6 448.457a23.93 23.93 0 0 0 33.275.642l44.425-41.128a23.98 23.98 0 0 0 4.773-29.092l-23.344-42.858 42.131-90.515 8.6-10.318A62.134 62.134 0 0 0 477.8 140.2m-22.628 65.231a30.125 30.125 0 0 1-42.6 0l-16.885-16.886-33.08 39.678-50.7 108.933 28.087 51.566-34.209 31.669L91.2 205.806l32-33.89 50.969 27.543 118.386-52.008 29.177-32.863-15.158-15.161a30.126 30.126 0 0 1 42.6-42.6l106 106a30.126 30.126 0 0 1 0 42.6Z\"/></svg>";
19
+ export declare const DEFAULT_PIN_END_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><g transform=\"translate(512 0) scale(-1 1)\"><path fill=\"currentColor\" d=\"m477.8 140.2-106-106a62.132 62.132 0 0 0-93.617 81.24l-4.913 5.533-97.654 42.9-42.611-23.026a24.04 24.04 0 0 0-28.86 4.638L62.6 189.487a23.88 23.88 0 0 0 .479 33.449l101.68 101.679L16 473.373V496h22.627l148.758-148.758L288.6 448.457a23.93 23.93 0 0 0 33.275.642l44.425-41.128a23.98 23.98 0 0 0 4.773-29.092l-23.344-42.858 42.131-90.515 8.6-10.318A62.134 62.134 0 0 0 477.8 140.2m-22.628 65.231a30.125 30.125 0 0 1-42.6 0l-16.885-16.886-33.08 39.678-50.7 108.933 28.087 51.566-34.209 31.669L91.2 205.806l32-33.89 50.969 27.543 118.386-52.008 29.177-32.863-15.158-15.161a30.126 30.126 0 0 1 42.6-42.6l106 106a30.126 30.126 0 0 1 0 42.6Z\"/></g></svg>";
20
+ export declare const DEFAULT_UNPIN_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"m427.314 107.313-22.628-22.626L256 233.373 107.314 84.687l-22.628 22.626L233.373 256 84.686 404.687l22.628 22.626L256 278.627l148.686 148.686 22.628-22.626L278.627 256z\"/></svg>";
21
+ export declare const DEFAULT_MOVE_START_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M254.625 56h-38.632L16 256.2 216 456h38.623V336h144V176h-144Zm112 152v96h-144v113.384l-161.37-161.21 161.37-161.535V208Zm96-152h32v400h-32z\"/></svg>";
22
+ export declare const DEFAULT_MOVE_END_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M296.007 56h-38.632v120h-144v160h144v120H296l200-199.8Zm-6.632 361.384V304h-144v-96h144V94.639l161.37 161.535ZM17.375 56h32v400h-32z\"/></svg>";
23
+ export declare const DEFAULT_HIDE_COLUMN_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 512 512\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"m397.222 131.1-.218-.223c-63.173-63.17-158.534-75.015-233.776-35.531l23.938 23.939c61.571-27.691 136.573-16.327 187.105 34.115L464 246.683v3.107l-71.744 74.585 22.63 22.63L496 262.683V233.79Z\"/><path fill=\"currentColor\" d=\"M352.8 284.33a103.307 103.307 0 0 0-132.893-132.892L246.1 177.63a71.228 71.228 0 0 1 80.507 80.508Zm17.1 62.938-33.831-33.831c.088-.108.179-.212.266-.32l-22.805-22.806q-.126.168-.253.334l-99.681-99.681.334-.253-22.81-22.805c-.108.087-.213.179-.321.266L38.627 16H16v22.627l95.689 95.689L16 233.79v28.893l98.778 102.689.218.222A199.73 199.73 0 0 0 367.372 390l106 106H496v-22.627L392.537 369.911Zm-177.157-131.9 96.128 96.132a71.28 71.28 0 0 1-96.133-96.133Zm-55.014 127.705L48 249.79v-3.107l86.319-89.737 35.065 35.064a103.248 103.248 0 0 0 142.842 142.843l32.007 32.007c-64.51 40.015-150.522 32.095-206.504-23.787\"/></svg>";
@@ -1 +1,19 @@
1
- export * from './index-lite.js'
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid index-lite.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ import DataGridBase from './data-grid.mjs';
8
+ import { type DataGridLiteFeatures } from './engine/features-lite.mjs';
9
+ import type { DataGridOptions, TableFeatures } from './types.mjs';
10
+ declare class DataGrid<TFeatures extends TableFeatures = DataGridLiteFeatures> extends DataGridBase<TFeatures> {
11
+ static get Default(): DataGridOptions;
12
+ }
13
+ export { DataGrid };
14
+ export { dataGridLiteFeatures } from './engine/features-lite.mjs';
15
+ export { DEFAULT_LABELS, interpolate } from './labels.mjs';
16
+ export { evaluateColumnFilter, FILTER_OPERATORS, VALUELESS_OPERATORS } from './filters.mjs';
17
+ export { downloadCsv, exportCsv } from './util/csv.mjs';
18
+ export type { CsvDownloadOptions, CsvOptions } from './util/csv.mjs';
19
+ export type { Column, ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnSizingState, DataGridColumn, DataGridColumnFilterContext, DataGridColumnFilterFactory, DataGridColumnFilterValue, DataGridColumnMenuBuilder, DataGridColumnMenuContext, DataGridColumnSizingOptions, DataGridDataRequest, DataGridDataResponse, DataGridEditableOptions, DataGridEditCommitEvent, DataGridEditor, DataGridEditorContext, DataGridEditorFactory, DataGridEditorType, DataGridFilterCondition, DataGridFilterOperator, DataGridFilterType, DataGridInfiniteScrollOptions, DataGridItem, DataGridLabels, DataGridLiteFeatures, DataGridMenuAction, DataGridOptions, DataGridPaginationInfoState, DataGridPaginationOptions, DataGridRowSelectionOptions, DataGridSlot, DataGridSlotContext, DataGridSlotFactory, DataGridSlots, DataGridSortingOptions, DataGridState, DataGridToolbarOptions, PaginationState, RowSelectionState, SortingState, ColumnVisibilityState, DataGridColumnPinning, DataGridRow, DataGridTable, DataGridTableState, Table, TableFeatures } from './types.mjs';
@@ -1 +1,21 @@
1
- export * from './index.js'
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid index.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ import DataGridBase from './data-grid.mjs';
8
+ import { type DataGridFeatures } from './engine/features.mjs';
9
+ import type { DataGridOptions, TableFeatures } from './types.mjs';
10
+ declare class DataGrid<TFeatures extends TableFeatures = DataGridFeatures> extends DataGridBase<TFeatures> {
11
+ static get Default(): DataGridOptions;
12
+ }
13
+ export { DataGrid };
14
+ export { dataGridFeatures } from './engine/features.mjs';
15
+ export { dataGridLiteFeatures } from './engine/features-lite.mjs';
16
+ export { DEFAULT_LABELS, interpolate } from './labels.mjs';
17
+ export { evaluateColumnFilter, FILTER_OPERATORS, VALUELESS_OPERATORS } from './filters.mjs';
18
+ export { downloadCsv, exportCsv } from './util/csv.mjs';
19
+ export type { CsvDownloadOptions, CsvOptions } from './util/csv.mjs';
20
+ export type { DataGridExporter, DataGridExportOptions } from './ui/toolbar.mjs';
21
+ export type { Column, ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnSizingState, DataGridColumn, DataGridColumnFilterContext, DataGridColumnFilterFactory, DataGridColumnFilterValue, DataGridColumnMenuBuilder, DataGridColumnMenuContext, DataGridColumnSizingOptions, DataGridDataRequest, DataGridDataResponse, DataGridEditableOptions, DataGridEditCommitEvent, DataGridEditor, DataGridEditorContext, DataGridEditorFactory, DataGridEditorType, DataGridFeatures, DataGridFilterCondition, DataGridFilterOperator, DataGridFilterType, DataGridInfiniteScrollOptions, DataGridItem, DataGridLabels, DataGridLiteFeatures, DataGridMenuAction, DataGridOptions, DataGridPaginationInfoState, DataGridPaginationOptions, DataGridRowSelectionOptions, DataGridSlot, DataGridSlotContext, DataGridSlotFactory, DataGridSlots, DataGridSortingOptions, DataGridState, DataGridToolbarOptions, PaginationState, RowSelectionState, SortingState, ColumnVisibilityState, DataGridColumnPinning, DataGridRow, DataGridTable, DataGridTableState, Table, TableFeatures } from './types.mjs';
@@ -1 +1,9 @@
1
- export * from './labels.js'
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO data-grid labels.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ import type { DataGridLabels } from './types.mjs';
8
+ export declare const DEFAULT_LABELS: DataGridLabels;
9
+ export declare const interpolate: (template: string, tokens: Record<string, string | number>) => string;