@toolbox-web/grid 1.5.0 → 1.6.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/all.js +749 -627
- package/all.js.map +1 -1
- package/index.js +513 -495
- package/index.js.map +1 -1
- package/lib/core/internal/header.d.ts.map +1 -1
- package/lib/core/internal/rows.d.ts +8 -0
- package/lib/core/internal/rows.d.ts.map +1 -1
- package/lib/core/types.d.ts +82 -17
- package/lib/core/types.d.ts.map +1 -1
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/editing/types.d.ts +68 -0
- package/lib/plugins/editing/types.d.ts.map +1 -1
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/FilteringPlugin.d.ts +18 -1
- package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
- package/lib/plugins/filtering/index.d.ts +1 -1
- package/lib/plugins/filtering/index.d.ts.map +1 -1
- package/lib/plugins/filtering/index.js +313 -183
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/filtering/types.d.ts +81 -2
- package/lib/plugins/filtering/types.d.ts.map +1 -1
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/print/index.js.map +1 -1
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/responsive/index.js.map +1 -1
- package/lib/plugins/row-reorder/index.js.map +1 -1
- package/lib/plugins/selection/SelectionPlugin.d.ts +5 -0
- package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
- package/lib/plugins/selection/index.js +90 -77
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/selection/types.d.ts +45 -0
- package/lib/plugins/selection/types.d.ts.map +1 -1
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/umd/grid.all.umd.js +25 -25
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +10 -10
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/filtering.umd.js +1 -1
- package/umd/plugins/filtering.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +2 -2
- package/umd/plugins/selection.umd.js.map +1 -1
|
@@ -6,6 +6,46 @@ declare module '../../core/types' {
|
|
|
6
6
|
* @default true
|
|
7
7
|
*/
|
|
8
8
|
filterable?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Configuration for the filter UI (only applicable when FilteringPlugin is enabled).
|
|
11
|
+
* For number columns: { min, max, step }
|
|
12
|
+
* For date columns: { min, max } (ISO date strings)
|
|
13
|
+
* Falls back to editorParams if not set.
|
|
14
|
+
*/
|
|
15
|
+
filterParams?: FilterParams;
|
|
16
|
+
}
|
|
17
|
+
interface TypeDefault {
|
|
18
|
+
/**
|
|
19
|
+
* Custom filter panel renderer for this type. Requires FilteringPlugin.
|
|
20
|
+
*
|
|
21
|
+
* Use type-level filter panels when you need custom filtering UI for all
|
|
22
|
+
* columns of a specific type (e.g., custom datepickers for all date columns).
|
|
23
|
+
*
|
|
24
|
+
* The renderer receives the container element and `FilterPanelParams` with
|
|
25
|
+
* helper methods for applying filters. Return nothing; append content to container.
|
|
26
|
+
*
|
|
27
|
+
* **Resolution Priority**: Plugin `filterPanelRenderer` → Type `filterPanelRenderer` → Built-in
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* // All 'date' columns use a custom filter panel with your datepicker
|
|
32
|
+
* typeDefaults: {
|
|
33
|
+
* date: {
|
|
34
|
+
* filterPanelRenderer: (container, params) => {
|
|
35
|
+
* const picker = new MyDateRangePicker();
|
|
36
|
+
* picker.onApply = (from, to) => {
|
|
37
|
+
* params.applyTextFilter('between', from, to);
|
|
38
|
+
* };
|
|
39
|
+
* picker.onClear = () => params.clearFilter();
|
|
40
|
+
* container.appendChild(picker);
|
|
41
|
+
* }
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @see FilterPanelParams for available methods (applySetFilter, applyTextFilter, clearFilter, closePanel)
|
|
47
|
+
*/
|
|
48
|
+
filterPanelRenderer?: FilterPanelRenderer;
|
|
9
49
|
}
|
|
10
50
|
interface ColumnState {
|
|
11
51
|
/**
|
|
@@ -19,6 +59,45 @@ declare module '../../core/types' {
|
|
|
19
59
|
valueTo?: unknown;
|
|
20
60
|
};
|
|
21
61
|
}
|
|
62
|
+
interface GridConfig {
|
|
63
|
+
/**
|
|
64
|
+
* Grid-wide filtering toggle. Requires `FilteringPlugin` to be loaded.
|
|
65
|
+
*
|
|
66
|
+
* When `false`, disables filtering for all columns regardless of their individual `filterable` setting.
|
|
67
|
+
* When `true` (default), columns with `filterable: true` (or not explicitly set to false) can be filtered.
|
|
68
|
+
*
|
|
69
|
+
* This affects:
|
|
70
|
+
* - Filter button visibility in headers
|
|
71
|
+
* - Filter panel accessibility
|
|
72
|
+
* - Filter keyboard shortcuts
|
|
73
|
+
*
|
|
74
|
+
* @default true
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```typescript
|
|
78
|
+
* // Disable all filtering at runtime
|
|
79
|
+
* grid.gridConfig = { ...grid.gridConfig, filterable: false };
|
|
80
|
+
*
|
|
81
|
+
* // Re-enable filtering
|
|
82
|
+
* grid.gridConfig = { ...grid.gridConfig, filterable: true };
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
filterable?: boolean;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Filter parameters for configuring the filter panel UI.
|
|
90
|
+
* These settings control the filter input constraints.
|
|
91
|
+
*/
|
|
92
|
+
export interface FilterParams {
|
|
93
|
+
/** Minimum value for number/date filters */
|
|
94
|
+
min?: number | string;
|
|
95
|
+
/** Maximum value for number/date filters */
|
|
96
|
+
max?: number | string;
|
|
97
|
+
/** Step value for number range slider */
|
|
98
|
+
step?: number;
|
|
99
|
+
/** Placeholder text for text inputs */
|
|
100
|
+
placeholder?: string;
|
|
22
101
|
}
|
|
23
102
|
/** Supported filter types */
|
|
24
103
|
export type FilterType = 'text' | 'number' | 'date' | 'set' | 'boolean';
|
|
@@ -51,8 +130,8 @@ export interface FilterPanelParams {
|
|
|
51
130
|
searchText: string;
|
|
52
131
|
/** Apply a set filter (exclude these values) */
|
|
53
132
|
applySetFilter: (excludedValues: unknown[]) => void;
|
|
54
|
-
/** Apply a text filter */
|
|
55
|
-
applyTextFilter: (operator: FilterOperator, value: string, valueTo?: string) => void;
|
|
133
|
+
/** Apply a text/number/date filter */
|
|
134
|
+
applyTextFilter: (operator: FilterOperator, value: string | number, valueTo?: string | number) => void;
|
|
56
135
|
/** Clear the filter for this field */
|
|
57
136
|
clearFilter: () => void;
|
|
58
137
|
/** Close the filter panel */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/filtering/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIrD,OAAO,QAAQ,kBAAkB,CAAC;IAChC,UAAU,gBAAgB;QACxB;;;WAGG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/filtering/types.ts"],"names":[],"mappings":"AAAA;;;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