@toolbox-web/grid-angular 1.4.1 → 1.5.1
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-clipboard.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-clipboard.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-column-virtualization.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-column-virtualization.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-context-menu.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-context-menu.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-editing.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-editing.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-export.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-export.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-grouping-columns.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-grouping-columns.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-grouping-rows.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-grouping-rows.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-master-detail.mjs +1 -2
- package/fesm2022/toolbox-web-grid-angular-features-master-detail.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-multi-sort.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-multi-sort.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-pinned-columns.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-pinned-columns.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-pinned-rows.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-pinned-rows.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-pivot.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-pivot.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-print.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-print.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-reorder-columns.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-reorder-columns.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-reorder-rows.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-reorder-rows.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-responsive.mjs +1 -2
- package/fesm2022/toolbox-web-grid-angular-features-responsive.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-row-drag-drop.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-row-drag-drop.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-selection.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-selection.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-server-side.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-server-side.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-tooltip.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-tooltip.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-tree.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-tree.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-undo-redo.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-undo-redo.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-visibility.mjs +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-visibility.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular.mjs +36 -4
- package/fesm2022/toolbox-web-grid-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/types/toolbox-web-grid-angular-features-clipboard.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-column-virtualization.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-context-menu.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-editing.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-export.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-grouping-columns.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-grouping-rows.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-master-detail.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-multi-sort.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-pinned-columns.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-pinned-rows.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-pivot.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-print.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-reorder-columns.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-reorder-rows.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-responsive.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-row-drag-drop.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-selection.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-server-side.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-tooltip.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-tree.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-undo-redo.d.ts +1 -1
- package/types/toolbox-web-grid-angular-features-visibility.d.ts +1 -1
- package/types/toolbox-web-grid-angular.d.ts +31 -2
- package/types/toolbox-web-grid-angular.d.ts.map +1 -1
|
@@ -12,7 +12,7 @@ import { registerFeatureClaim, claimEvent, unregisterFeatureClaim, unclaimEvent
|
|
|
12
12
|
* @category Directive
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
|
-
* Owns the binding(s) `[visibility], [columnVisibility]` on `<tbw-grid>` for the matching feature plugin. See
|
|
15
|
+
* Owns the binding(s) `[visibility], [columnVisibility]` on `<tbw-grid>` for the matching feature plugin. See `GridFilteringDirective` for the full rationale.
|
|
16
16
|
*
|
|
17
17
|
* @category Directive
|
|
18
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbox-web-grid-angular-features-visibility.mjs","sources":["../../../../libs/grid-angular/features/visibility/src/grid-visibility.directive.ts","../../../../libs/grid-angular/features/visibility/src/index.ts","../../../../libs/grid-angular/features/visibility/src/toolbox-web-grid-angular-features-visibility.ts"],"sourcesContent":["/**\n * `GridVisibilityDirective` — owns `[visibility]` and `(columnVisibility)`\n * on `<tbw-grid>`. The `(columnStateChange)` output stays on `Grid`\n * because it covers a broader set of column-state mutations beyond just\n * visibility toggles. See `GridFilteringDirective` for the full rationale.\n *\n * @category Directive\n */\nimport { Directive, ElementRef, inject, input, OnDestroy, OnInit, output } from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { claimEvent, registerFeatureClaim, unclaimEvent, unregisterFeatureClaim } from '@toolbox-web/grid-angular';\nimport type { ColumnVisibilityDetail, VisibilityConfig } from '@toolbox-web/grid/plugins/visibility';\n\n/**\n * Owns the binding(s) `[visibility], [columnVisibility]` on `<tbw-grid>` for the matching feature plugin. See
|
|
1
|
+
{"version":3,"file":"toolbox-web-grid-angular-features-visibility.mjs","sources":["../../../../libs/grid-angular/features/visibility/src/grid-visibility.directive.ts","../../../../libs/grid-angular/features/visibility/src/index.ts","../../../../libs/grid-angular/features/visibility/src/toolbox-web-grid-angular-features-visibility.ts"],"sourcesContent":["/**\n * `GridVisibilityDirective` — owns `[visibility]` and `(columnVisibility)`\n * on `<tbw-grid>`. The `(columnStateChange)` output stays on `Grid`\n * because it covers a broader set of column-state mutations beyond just\n * visibility toggles. See `GridFilteringDirective` for the full rationale.\n *\n * @category Directive\n */\nimport { Directive, ElementRef, inject, input, OnDestroy, OnInit, output } from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { claimEvent, registerFeatureClaim, unclaimEvent, unregisterFeatureClaim } from '@toolbox-web/grid-angular';\nimport type { ColumnVisibilityDetail, VisibilityConfig } from '@toolbox-web/grid/plugins/visibility';\n\n/**\n * Owns the binding(s) `[visibility], [columnVisibility]` on `<tbw-grid>` for the matching feature plugin. See `GridFilteringDirective` for the full rationale.\n *\n * @category Directive\n */\n@Directive({\n selector: 'tbw-grid[visibility], tbw-grid[columnVisibility]',\n standalone: true,\n})\nexport class GridVisibilityDirective implements OnInit, OnDestroy {\n private readonly elementRef = inject(ElementRef<DataGridElement>);\n\n readonly visibility = input<boolean | VisibilityConfig>();\n readonly columnVisibility = output<ColumnVisibilityDetail>();\n\n private listener?: (e: Event) => void;\n\n constructor() {\n const grid = this.elementRef.nativeElement;\n registerFeatureClaim(grid, 'visibility', () => this.visibility());\n claimEvent(grid, 'column-visibility');\n }\n\n ngOnInit(): void {\n const grid = this.elementRef.nativeElement;\n this.listener = (e: Event): void => this.columnVisibility.emit((e as CustomEvent<ColumnVisibilityDetail>).detail);\n grid.addEventListener('column-visibility', this.listener);\n }\n\n ngOnDestroy(): void {\n const grid = this.elementRef.nativeElement;\n if (this.listener) {\n grid.removeEventListener('column-visibility', this.listener);\n this.listener = undefined;\n }\n unregisterFeatureClaim(grid, 'visibility');\n unclaimEvent(grid, 'column-visibility');\n }\n}\n","/**\n * Column visibility feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `visibility` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/visibility';\n *\n * <tbw-grid [visibility]=\"true\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/visibility';\nexport { GridVisibilityDirective } from './grid-visibility.directive';\nexport type { _Augmentation as _VisibilityAugmentation } from '@toolbox-web/grid/features/visibility';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;AAOG;AAMH;;;;AAIG;MAKU,uBAAuB,CAAA;AACjB,IAAA,UAAU,GAAG,MAAM,EAAC,UAA2B,EAAC;IAExD,UAAU,GAAG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AA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kDAAkD;AAC5D,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACrBD;;;;;;;;;;;;;AAaG;;ACbH;;AAEG;;;;"}
|
|
@@ -1450,13 +1450,11 @@ function runTemplateBridges(ctx) {
|
|
|
1450
1450
|
const result = bridge(ctx);
|
|
1451
1451
|
if (result && typeof result.catch === 'function') {
|
|
1452
1452
|
result.catch((err) => {
|
|
1453
|
-
// eslint-disable-next-line no-console
|
|
1454
1453
|
console.error('[tbw-grid-angular] template bridge threw:', err);
|
|
1455
1454
|
});
|
|
1456
1455
|
}
|
|
1457
1456
|
}
|
|
1458
1457
|
catch (err) {
|
|
1459
|
-
// eslint-disable-next-line no-console
|
|
1460
1458
|
console.error('[tbw-grid-angular] template bridge threw:', err);
|
|
1461
1459
|
}
|
|
1462
1460
|
}
|
|
@@ -1685,6 +1683,12 @@ class GridAdapter {
|
|
|
1685
1683
|
if (angularConfig.loadingRenderer && isComponentClass(angularConfig.loadingRenderer)) {
|
|
1686
1684
|
result.loadingRenderer = this.createComponentLoadingRenderer(angularConfig.loadingRenderer);
|
|
1687
1685
|
}
|
|
1686
|
+
// Process emptyRenderer - convert Angular component class to function.
|
|
1687
|
+
// `null` is a valid opt-out value (suppresses the built-in default message);
|
|
1688
|
+
// non-component values (vanilla functions, null) are forwarded unchanged.
|
|
1689
|
+
if (angularConfig.emptyRenderer && isComponentClass(angularConfig.emptyRenderer)) {
|
|
1690
|
+
result.emptyRenderer = this.createComponentEmptyRenderer(angularConfig.emptyRenderer);
|
|
1691
|
+
}
|
|
1688
1692
|
return result;
|
|
1689
1693
|
}
|
|
1690
1694
|
/**
|
|
@@ -2189,6 +2193,19 @@ class GridAdapter {
|
|
|
2189
2193
|
const mount = this.mountComponentRenderer(componentClass, (ctx) => ({ size: ctx.size }));
|
|
2190
2194
|
return (ctx) => mount(ctx).hostElement;
|
|
2191
2195
|
}
|
|
2196
|
+
/**
|
|
2197
|
+
* Creates an empty-state renderer function from an Angular component class.
|
|
2198
|
+
*
|
|
2199
|
+
* The component receives `sourceRowCount` and `filteredOut` inputs.
|
|
2200
|
+
* @internal
|
|
2201
|
+
*/
|
|
2202
|
+
createComponentEmptyRenderer(componentClass) {
|
|
2203
|
+
const mount = this.mountComponentRenderer(componentClass, (ctx) => ({
|
|
2204
|
+
sourceRowCount: ctx.sourceRowCount,
|
|
2205
|
+
filteredOut: ctx.filteredOut,
|
|
2206
|
+
}));
|
|
2207
|
+
return (ctx) => mount(ctx).hostElement;
|
|
2208
|
+
}
|
|
2192
2209
|
/**
|
|
2193
2210
|
* Create an embedded view from a `TemplateRef` and append-track it on the
|
|
2194
2211
|
* adapter's view-ref pool so it is cleaned up on `destroy()` / `unmount()`.
|
|
@@ -2288,6 +2305,23 @@ class GridAdapter {
|
|
|
2288
2305
|
}
|
|
2289
2306
|
}
|
|
2290
2307
|
}
|
|
2308
|
+
/**
|
|
2309
|
+
* Open a teardown batch. No-op for the Angular adapter — `viewRef.destroy()`
|
|
2310
|
+
* and `componentRef.destroy()` are synchronous DOM operations with no
|
|
2311
|
+
* deferred-commit warning analogous to React's `flushSync`. Implemented
|
|
2312
|
+
* for {@link FrameworkAdapter} parity so grid core's bulk-teardown
|
|
2313
|
+
* wrappers work uniformly across adapters.
|
|
2314
|
+
*/
|
|
2315
|
+
beginBatch(_gridEl) {
|
|
2316
|
+
// intentionally empty
|
|
2317
|
+
}
|
|
2318
|
+
/**
|
|
2319
|
+
* Close a teardown batch opened by {@link beginBatch}. No-op for Angular —
|
|
2320
|
+
* see {@link beginBatch}.
|
|
2321
|
+
*/
|
|
2322
|
+
endBatch(_gridEl) {
|
|
2323
|
+
// intentionally empty
|
|
2324
|
+
}
|
|
2291
2325
|
/**
|
|
2292
2326
|
* Unmount a specific container (e.g., detail panel, tool panel).
|
|
2293
2327
|
* Finds the matching view or component ref whose DOM nodes are inside
|
|
@@ -6138,7 +6172,6 @@ class Grid {
|
|
|
6138
6172
|
_intentionallyOmittedEvents;
|
|
6139
6173
|
_assertEventOutputMapCoversCore;
|
|
6140
6174
|
// Store event listeners for cleanup
|
|
6141
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6142
6175
|
eventListeners = new Map();
|
|
6143
6176
|
ngOnInit() {
|
|
6144
6177
|
// Create and register the adapter
|
|
@@ -6195,7 +6228,6 @@ class Grid {
|
|
|
6195
6228
|
* Returns the array of created plugins (doesn't modify grid).
|
|
6196
6229
|
*/
|
|
6197
6230
|
createFeaturePlugins() {
|
|
6198
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6199
6231
|
const plugins = [];
|
|
6200
6232
|
const adapter = this.adapter;
|
|
6201
6233
|
const grid = this.elementRef.nativeElement;
|