@toolbox-web/grid-angular 1.7.1 → 1.8.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/fesm2022/toolbox-web-grid-angular-features-shell.mjs +32 -0
- package/fesm2022/toolbox-web-grid-angular-features-shell.mjs.map +1 -0
- package/fesm2022/toolbox-web-grid-angular.mjs +34 -4
- package/fesm2022/toolbox-web-grid-angular.mjs.map +1 -1
- package/package.json +5 -1
- package/types/toolbox-web-grid-angular-features-shell.d.ts +2 -0
- package/types/toolbox-web-grid-angular-features-shell.d.ts.map +1 -0
- package/types/toolbox-web-grid-angular.d.ts.map +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import '@toolbox-web/grid/features/shell';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shell feature for @toolbox-web/grid-angular
|
|
5
|
+
*
|
|
6
|
+
* Import this module to opt the grid shell (header bar + tool panels) into
|
|
7
|
+
* the build. The shell also auto-registers in v2.x (so it is on by default
|
|
8
|
+
* and non-breaking); importing this module makes the opt-in explicit and
|
|
9
|
+
* tree-shakeable for v3, where the auto-register is removed.
|
|
10
|
+
*
|
|
11
|
+
* The shell is configured through `gridConfig` (`features: { shell }` or the
|
|
12
|
+
* `<tbw-grid-header-content>` / `<tbw-grid-toolbar-content>` /
|
|
13
|
+
* `<tbw-grid-tool-panel>` directives), not a boolean input.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // In your bootstrap (e.g. main.ts or app.component.ts):
|
|
18
|
+
* import '@toolbox-web/grid-angular/features/shell';
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* ```html
|
|
22
|
+
* <tbw-grid [gridConfig]="{ features: { shell: { header: { title: 'Employees' } } } }">
|
|
23
|
+
* </tbw-grid>
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @packageDocumentation
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Generated bundle index. Do not edit.
|
|
31
|
+
*/
|
|
32
|
+
//# sourceMappingURL=toolbox-web-grid-angular-features-shell.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbox-web-grid-angular-features-shell.mjs","sources":["../../../../libs/grid-angular/features/shell/src/index.ts","../../../../libs/grid-angular/features/shell/src/toolbox-web-grid-angular-features-shell.ts"],"sourcesContent":["/**\n * Shell feature for @toolbox-web/grid-angular\n *\n * Import this module to opt the grid shell (header bar + tool panels) into\n * the build. The shell also auto-registers in v2.x (so it is on by default\n * and non-breaking); importing this module makes the opt-in explicit and\n * tree-shakeable for v3, where the auto-register is removed.\n *\n * The shell is configured through `gridConfig` (`features: { shell }` or the\n * `<tbw-grid-header-content>` / `<tbw-grid-toolbar-content>` /\n * `<tbw-grid-tool-panel>` directives), not a boolean input.\n *\n * @example\n * ```typescript\n * // In your bootstrap (e.g. main.ts or app.component.ts):\n * import '@toolbox-web/grid-angular/features/shell';\n * ```\n *\n * ```html\n * <tbw-grid [gridConfig]=\"{ features: { shell: { header: { title: 'Employees' } } } }\">\n * </tbw-grid>\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/shell';\nexport type { _Augmentation as _ShellAugmentation } from '@toolbox-web/grid/features/shell';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;;ACxBH;;AAEG"}
|
|
@@ -4131,13 +4131,28 @@ class GridHeaderContent {
|
|
|
4131
4131
|
};
|
|
4132
4132
|
},
|
|
4133
4133
|
};
|
|
4134
|
-
|
|
4134
|
+
// Route through the shell plugin (#370). The core grid-element delegates
|
|
4135
|
+
// (`grid.registerHeaderContent`) are deprecated (TBW076) and removed at v3;
|
|
4136
|
+
// fall back to them only on cores that predate the shell plugin.
|
|
4137
|
+
const shell = grid.getPluginByName?.('shell');
|
|
4138
|
+
if (shell?.registerHeaderContent) {
|
|
4139
|
+
shell.registerHeaderContent(def);
|
|
4140
|
+
}
|
|
4141
|
+
else {
|
|
4142
|
+
grid.registerHeaderContent?.(def);
|
|
4143
|
+
}
|
|
4135
4144
|
this.registeredId = id;
|
|
4136
4145
|
}
|
|
4137
4146
|
unregister() {
|
|
4138
4147
|
const grid = this.findGrid();
|
|
4139
4148
|
if (grid && this.registeredId) {
|
|
4140
|
-
grid.
|
|
4149
|
+
const shell = grid.getPluginByName?.('shell');
|
|
4150
|
+
if (shell?.unregisterHeaderContent) {
|
|
4151
|
+
shell.unregisterHeaderContent(this.registeredId);
|
|
4152
|
+
}
|
|
4153
|
+
else {
|
|
4154
|
+
grid.unregisterHeaderContent?.(this.registeredId);
|
|
4155
|
+
}
|
|
4141
4156
|
}
|
|
4142
4157
|
this.registeredId = null;
|
|
4143
4158
|
if (this.viewRef) {
|
|
@@ -4944,13 +4959,28 @@ class GridToolbarContent {
|
|
|
4944
4959
|
};
|
|
4945
4960
|
},
|
|
4946
4961
|
};
|
|
4947
|
-
|
|
4962
|
+
// Route through the shell plugin (#370). The core grid-element delegates
|
|
4963
|
+
// (`grid.registerToolbarContent`) are deprecated (TBW076) and removed at v3;
|
|
4964
|
+
// fall back to them only on cores that predate the shell plugin.
|
|
4965
|
+
const shell = grid.getPluginByName?.('shell');
|
|
4966
|
+
if (shell?.registerToolbarContent) {
|
|
4967
|
+
shell.registerToolbarContent(def);
|
|
4968
|
+
}
|
|
4969
|
+
else {
|
|
4970
|
+
grid.registerToolbarContent?.(def);
|
|
4971
|
+
}
|
|
4948
4972
|
this.registeredId = id;
|
|
4949
4973
|
}
|
|
4950
4974
|
unregister() {
|
|
4951
4975
|
const grid = this.findGrid();
|
|
4952
4976
|
if (grid && this.registeredId) {
|
|
4953
|
-
grid.
|
|
4977
|
+
const shell = grid.getPluginByName?.('shell');
|
|
4978
|
+
if (shell?.unregisterToolbarContent) {
|
|
4979
|
+
shell.unregisterToolbarContent(this.registeredId);
|
|
4980
|
+
}
|
|
4981
|
+
else {
|
|
4982
|
+
grid.unregisterToolbarContent?.(this.registeredId);
|
|
4983
|
+
}
|
|
4954
4984
|
}
|
|
4955
4985
|
this.registeredId = null;
|
|
4956
4986
|
if (this.viewRef) {
|