@toolbox-web/grid 1.4.0 → 1.5.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 +539 -473
- package/all.js.map +1 -1
- package/index.js +2 -2
- package/lib/plugins/export/index.d.ts +1 -1
- package/lib/plugins/export/index.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/grouping-rows/GroupingRowsPlugin.d.ts +12 -3
- package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts.map +1 -1
- package/lib/plugins/grouping-rows/grouping-rows.d.ts +13 -2
- package/lib/plugins/grouping-rows/grouping-rows.d.ts.map +1 -1
- package/lib/plugins/grouping-rows/index.d.ts +1 -1
- package/lib/plugins/grouping-rows/index.d.ts.map +1 -1
- package/lib/plugins/grouping-rows/index.js +199 -125
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/grouping-rows/types.d.ts +24 -2
- package/lib/plugins/grouping-rows/types.d.ts.map +1 -1
- package/lib/plugins/master-detail/index.d.ts +1 -1
- package/lib/plugins/master-detail/index.d.ts.map +1 -1
- package/lib/plugins/pinned-rows/index.js +1 -1
- package/lib/plugins/undo-redo/index.d.ts +1 -1
- package/lib/plugins/undo-redo/index.d.ts.map +1 -1
- package/lib/plugins/visibility/index.d.ts +1 -1
- package/lib/plugins/visibility/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/umd/grid.all.umd.js +23 -20
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/plugins/grouping-rows.umd.js +4 -1
- package/umd/plugins/grouping-rows.umd.js.map +1 -1
- package/umd/plugins/pinned-rows.umd.js +1 -1
- package/umd/plugins/pinned-rows.umd.js.map +1 -1
package/index.js
CHANGED
|
@@ -2371,7 +2371,7 @@ class so {
|
|
|
2371
2371
|
}
|
|
2372
2372
|
class L extends HTMLElement {
|
|
2373
2373
|
static tagName = "tbw-grid";
|
|
2374
|
-
static version = "1.
|
|
2374
|
+
static version = "1.5.0";
|
|
2375
2375
|
static #l = 0;
|
|
2376
2376
|
static adapters = [];
|
|
2377
2377
|
static registerAdapter(e) {
|
|
@@ -3359,7 +3359,7 @@ const ao = {
|
|
|
3359
3359
|
class co {
|
|
3360
3360
|
static dependencies;
|
|
3361
3361
|
static manifest;
|
|
3362
|
-
version = "1.
|
|
3362
|
+
version = "1.5.0";
|
|
3363
3363
|
styles;
|
|
3364
3364
|
cellRenderers;
|
|
3365
3365
|
headerRenderers;
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* @module Plugins/Export
|
|
6
6
|
*/
|
|
7
7
|
export { ExportPlugin } from './ExportPlugin';
|
|
8
|
-
export type { ExportFormat, ExportParams } from './types';
|
|
8
|
+
export type { ExportCompleteDetail, ExportConfig, ExportFormat, ExportParams } from './types';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/export/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/export/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* @module Plugins/Filtering
|
|
6
6
|
*/
|
|
7
7
|
export { FilteringPlugin } from './FilteringPlugin';
|
|
8
|
-
export type { FilterConfig, FilterModel, FilterOperator, FilterType } from './types';
|
|
8
|
+
export type { FilterChangeDetail, FilterConfig, FilterModel, FilterOperator, FilterType } from './types';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/filtering/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/filtering/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseGridPlugin, CellClickEvent } from '../../core/plugin/base-plugin';
|
|
1
|
+
import { BaseGridPlugin, CellClickEvent, PluginManifest } from '../../core/plugin/base-plugin';
|
|
2
2
|
import { GroupingRowsConfig, RenderRow } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Group state information returned by getGroupState()
|
|
@@ -31,11 +31,12 @@ export interface GroupState {
|
|
|
31
31
|
* | Option | Type | Default | Description |
|
|
32
32
|
* |--------|------|---------|-------------|
|
|
33
33
|
* | `groupOn` | `(row) => string[]` | - | Callback returning group path array |
|
|
34
|
-
* | `defaultExpanded` | `boolean` | `false` |
|
|
34
|
+
* | `defaultExpanded` | `boolean \\| number \\| string \\| string[]` | `false` | Initial expanded state |
|
|
35
35
|
* | `showRowCount` | `boolean` | `true` | Show row count in group header |
|
|
36
36
|
* | `indentWidth` | `number` | `20` | Indentation per level (pixels) |
|
|
37
37
|
* | `fullWidth` | `boolean` | `true` | Group row spans full width |
|
|
38
|
-
* | `animation` | `false
|
|
38
|
+
* | `animation` | `false \\| 'slide' \\| 'fade'` | `'slide'` | Expand/collapse animation |
|
|
39
|
+
* | `accordion` | `boolean` | `false` | Only one group open at a time |
|
|
39
40
|
*
|
|
40
41
|
* ## Programmatic API
|
|
41
42
|
*
|
|
@@ -94,6 +95,11 @@ export interface GroupState {
|
|
|
94
95
|
* @internal Extends BaseGridPlugin
|
|
95
96
|
*/
|
|
96
97
|
export declare class GroupingRowsPlugin extends BaseGridPlugin<GroupingRowsConfig> {
|
|
98
|
+
/**
|
|
99
|
+
* Plugin manifest - declares configuration validation rules.
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
static readonly manifest: PluginManifest<GroupingRowsConfig>;
|
|
97
103
|
/** @internal */
|
|
98
104
|
readonly name = "groupingRows";
|
|
99
105
|
/** @internal */
|
|
@@ -105,6 +111,8 @@ export declare class GroupingRowsPlugin extends BaseGridPlugin<GroupingRowsConfi
|
|
|
105
111
|
private isActive;
|
|
106
112
|
private previousVisibleKeys;
|
|
107
113
|
private keysToAnimate;
|
|
114
|
+
/** Track if initial defaultExpanded has been applied */
|
|
115
|
+
private hasAppliedDefaultExpanded;
|
|
108
116
|
/**
|
|
109
117
|
* Get expand/collapse animation style from plugin config.
|
|
110
118
|
* Uses base class isAnimationEnabled to respect grid-level settings.
|
|
@@ -150,6 +158,7 @@ export declare class GroupingRowsPlugin extends BaseGridPlugin<GroupingRowsConfi
|
|
|
150
158
|
collapseAll(): void;
|
|
151
159
|
/**
|
|
152
160
|
* Toggle expansion of a specific group.
|
|
161
|
+
* In accordion mode, expanding a group will collapse all sibling groups.
|
|
153
162
|
* @param key - The group key to toggle
|
|
154
163
|
*/
|
|
155
164
|
toggle(key: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupingRowsPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/grouping-rows/GroupingRowsPlugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"GroupingRowsPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/grouping-rows/GroupingRowsPlugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAcpG,OAAO,KAAK,EAEV,kBAAkB,EAGlB,SAAS,EACV,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,QAAQ,EAAE,OAAO,CAAC;IAClB,gCAAgC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AACH,qBAAa,kBAAmB,SAAQ,cAAc,CAAC,kBAAkB,CAAC;IACxE;;;OAGG;IACH,gBAAyB,QAAQ,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAsBnE;IAEF,gBAAgB;IAChB,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,gBAAgB;IAChB,SAAkB,MAAM,SAAU;IAElC,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,kBAAkB,CAAC,CASlE;IAGD,OAAO,CAAC,YAAY,CAA0B;IAC9C,OAAO,CAAC,aAAa,CAAmB;IACxC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,mBAAmB,CAAqB;IAChD,OAAO,CAAC,aAAa,CAAqB;IAC1C,wDAAwD;IACxD,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;IAI7B;;;OAGG;IACH,gBAAgB,IAAI,SAAS,EAAE;IAI/B;;;OAGG;IACH,gBAAgB,IAAI,OAAO;IAI3B;;;OAGG;IACH,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,SAAS,GAAG,IAAI;CAK7E"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { RenderRow, RowGroupingConfig } from './types';
|
|
1
|
+
import { DefaultExpandedValue, RenderRow, RowGroupingConfig } from './types';
|
|
2
2
|
export { getAggregator, listAggregators, registerAggregator, runAggregator } from '../../core/internal/aggregators';
|
|
3
3
|
interface BuildGroupingArgs {
|
|
4
4
|
rows: any[];
|
|
5
5
|
config: RowGroupingConfig;
|
|
6
6
|
expanded: Set<string>;
|
|
7
|
+
/** Initial expanded state to apply (processed by the plugin) */
|
|
8
|
+
initialExpanded?: Set<string>;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* Build a flattened grouping projection (collapsed by default).
|
|
@@ -12,7 +14,7 @@ interface BuildGroupingArgs {
|
|
|
12
14
|
* @param args - The grouping arguments
|
|
13
15
|
* @returns Flattened array of render rows (groups + data rows)
|
|
14
16
|
*/
|
|
15
|
-
export declare function buildGroupedRowModel({ rows, config, expanded }: BuildGroupingArgs): RenderRow[];
|
|
17
|
+
export declare function buildGroupedRowModel({ rows, config, expanded, initialExpanded }: BuildGroupingArgs): RenderRow[];
|
|
16
18
|
/**
|
|
17
19
|
* Toggle expansion state for a group key.
|
|
18
20
|
*
|
|
@@ -34,6 +36,15 @@ export declare function expandAllGroups(rows: RenderRow[]): Set<string>;
|
|
|
34
36
|
* @returns Empty set
|
|
35
37
|
*/
|
|
36
38
|
export declare function collapseAllGroups(): Set<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Resolve a defaultExpanded value to a set of keys to expand.
|
|
41
|
+
* This needs to be called AFTER building the group model to get all keys.
|
|
42
|
+
*
|
|
43
|
+
* @param value - The defaultExpanded config value
|
|
44
|
+
* @param allGroupKeys - All group keys from the model
|
|
45
|
+
* @returns Set of keys to expand initially
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolveDefaultExpanded(value: DefaultExpandedValue, allGroupKeys: string[]): Set<string>;
|
|
37
48
|
/**
|
|
38
49
|
* Get all group keys from a flattened model.
|
|
39
50
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grouping-rows.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/grouping-rows/grouping-rows.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAqB,SAAS,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"grouping-rows.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/grouping-rows/grouping-rows.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,oBAAoB,EAAqB,SAAS,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGrG,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAWpH,UAAU,iBAAiB;IACzB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,gEAAgE;IAChE,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,iBAAiB,GAAG,SAAS,EAAE,CAkEhH;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAQxF;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAQ9D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CAAC,MAAM,CAAC,CAE/C;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAuBvG;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,SAAS,GAAG,MAAM,CAG5D"}
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* @module Plugins/Row Grouping
|
|
6
6
|
*/
|
|
7
7
|
export { GroupingRowsPlugin } from './GroupingRowsPlugin';
|
|
8
|
-
export type { GroupRowRenderParams, GroupingRowsConfig } from './types';
|
|
8
|
+
export type { DefaultExpandedValue, GroupRowRenderParams, GroupToggleDetail, GroupingRowsConfig } from './types';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/grouping-rows/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/grouping-rows/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|