@toolbox-web/grid-angular 2.1.0 → 2.3.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/README.md +25 -55
- package/fesm2022/toolbox-web-grid-angular-features-editing.mjs +14 -4
- package/fesm2022/toolbox-web-grid-angular-features-editing.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-filtering.mjs +10 -30
- package/fesm2022/toolbox-web-grid-angular-features-filtering.mjs.map +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.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-pinned-rows.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-shell.mjs +25 -9
- package/fesm2022/toolbox-web-grid-angular-features-shell.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular-features-tree.mjs +47 -14
- package/fesm2022/toolbox-web-grid-angular-features-tree.mjs.map +1 -1
- package/fesm2022/toolbox-web-grid-angular.mjs +7 -0
- package/fesm2022/toolbox-web-grid-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/types/toolbox-web-grid-angular-features-editing.d.ts +14 -5
- package/types/toolbox-web-grid-angular-features-editing.d.ts.map +1 -1
- package/types/toolbox-web-grid-angular-features-filtering.d.ts +6 -22
- package/types/toolbox-web-grid-angular-features-filtering.d.ts.map +1 -1
- package/types/toolbox-web-grid-angular-features-grouping-columns.d.ts +1 -5
- package/types/toolbox-web-grid-angular-features-grouping-columns.d.ts.map +1 -1
- package/types/toolbox-web-grid-angular-features-grouping-rows.d.ts +1 -3
- package/types/toolbox-web-grid-angular-features-grouping-rows.d.ts.map +1 -1
- package/types/toolbox-web-grid-angular-features-pinned-rows.d.ts +1 -11
- package/types/toolbox-web-grid-angular-features-pinned-rows.d.ts.map +1 -1
- package/types/toolbox-web-grid-angular-features-shell.d.ts +14 -4
- package/types/toolbox-web-grid-angular-features-shell.d.ts.map +1 -1
- package/types/toolbox-web-grid-angular-features-tree.d.ts +23 -4
- package/types/toolbox-web-grid-angular-features-tree.d.ts.map +1 -1
- package/types/toolbox-web-grid-angular.d.ts +15 -8
- package/types/toolbox-web-grid-angular.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbox-web-grid-angular-features-shell.mjs","sources":["../../../../libs/grid-angular/features/shell/src/grid-tool-panel.directive.ts","../../../../libs/grid-angular/features/shell/src/grid-header-content.directive.ts","../../../../libs/grid-angular/features/shell/src/grid-toolbar-content.directive.ts","../../../../libs/grid-angular/features/shell/src/index.ts","../../../../libs/grid-angular/features/shell/src/toolbox-web-grid-angular-features-shell.ts"],"sourcesContent":["import { contentChild, Directive, effect, ElementRef, inject, input, TemplateRef } from '@angular/core';\n\n/**\n * Context object passed to the tool panel template.\n * Provides access to grid-related information for the panel content.\n * @since 0.1.0\n */\nexport interface GridToolPanelContext {\n /** The grid element (implicit binding) */\n $implicit: HTMLElement;\n /** The grid element */\n grid: HTMLElement;\n}\n\n// Global registry mapping DOM elements to their templates\nconst toolPanelTemplateRegistry = new Map<HTMLElement, TemplateRef<GridToolPanelContext>>();\n\n/**\n * Gets the tool panel template registered for a given tool panel element.\n * Used by AngularGridAdapter to retrieve templates at render time.\n */\nexport function getToolPanelTemplate(panelElement: HTMLElement): TemplateRef<GridToolPanelContext> | undefined {\n return toolPanelTemplateRegistry.get(panelElement);\n}\n\n/**\n * Gets all tool panel elements with registered templates within a grid element.\n */\nexport function getToolPanelElements(gridElement: HTMLElement): HTMLElement[] {\n const panelElements = gridElement.querySelectorAll('tbw-grid-tool-panel');\n return Array.from(panelElements).filter((el) => toolPanelTemplateRegistry.has(el as HTMLElement)) as HTMLElement[];\n}\n\n/**\n * Directive that captures an `<ng-template>` for use as a custom tool panel.\n *\n * This enables declarative Angular component usage for tool panels\n * that appear in the grid's side panel.\n *\n * ## Usage\n *\n * ```html\n * <tbw-grid [rows]=\"rows\" [gridConfig]=\"config\">\n * <tbw-grid-tool-panel\n * id=\"quick-filters\"\n * title=\"Quick Filters\"\n * icon=\"🔍\"\n * tooltip=\"Apply quick filters\"\n * [order]=\"10\"\n * >\n * <ng-template let-grid>\n * <app-quick-filters [grid]=\"grid\" />\n * </ng-template>\n * </tbw-grid-tool-panel>\n * </tbw-grid>\n * ```\n *\n * The template context provides:\n * - `$implicit` / `grid`: The grid element reference\n *\n * ### Attributes\n *\n * - `id` (required): Unique identifier for the panel\n * - `title` (required): Panel title shown in accordion header\n * - `icon`: Icon for accordion section header (emoji or text)\n * - `tooltip`: Tooltip for accordion section header\n * - `order`: Panel order priority (lower = first, default: 100)\n *\n * Import the directive in your component:\n *\n * ```typescript\n * import { GridToolPanel } from '@toolbox-web/grid-angular/features/shell';\n *\n * @Component({\n * imports: [GridToolPanel],\n * // ...\n * })\n * ```\n *\n * @example\n * ```html\n * <tbw-grid [rows]=\"rows\">\n * <tbw-grid-tool-panel id=\"quick-filters\" title=\"Quick Filters\" icon=\"\\uD83D\\uDD0D\">\n * <ng-template let-grid>\n * <app-quick-filters [grid]=\"grid\" />\n * </ng-template>\n * </tbw-grid-tool-panel>\n * </tbw-grid>\n * ```\n *\n * @category Directive\n * @since 0.1.0\n */\n@Directive({ selector: 'tbw-grid-tool-panel' })\nexport class GridToolPanel {\n private elementRef = inject(ElementRef<HTMLElement>);\n\n /** Unique panel identifier (required) */\n id = input.required<string>({ alias: 'id' });\n\n /** Panel title shown in accordion header (required) */\n title = input.required<string>({ alias: 'title' });\n\n /** Icon for accordion section header (emoji or text) */\n icon = input<string>();\n\n /** Tooltip for accordion section header */\n tooltip = input<string>();\n\n /** Panel order priority (lower = first, default: 100) */\n order = input<number>(100);\n\n /**\n * Query for the ng-template content child.\n */\n template = contentChild(TemplateRef<GridToolPanelContext>);\n\n /** Effect that triggers when the template is available */\n private onTemplateReceived = effect(() => {\n const template = this.template();\n const element = this.elementRef.nativeElement;\n\n if (template) {\n // Set attributes from inputs (for light DOM parsing to read)\n element.setAttribute('id', this.id());\n element.setAttribute('title', this.title());\n\n const icon = this.icon();\n if (icon) element.setAttribute('icon', icon);\n\n const tooltip = this.tooltip();\n if (tooltip) element.setAttribute('tooltip', tooltip);\n\n element.setAttribute('order', String(this.order()));\n\n // Register the template for this element\n toolPanelTemplateRegistry.set(element, template);\n }\n });\n\n /**\n * Static type guard for template context.\n * Enables type inference in templates.\n */\n static ngTemplateContextGuard(dir: GridToolPanel, ctx: unknown): ctx is GridToolPanelContext {\n return true;\n }\n}\n","import {\n afterNextRender,\n contentChild,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n EmbeddedViewRef,\n inject,\n input,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport type { HeaderContentDefinition } from '@toolbox-web/grid/plugins/shell';\n\n/**\n * Context object passed to the header content template.\n * @since 1.7.0\n */\nexport interface GridHeaderContentContext {\n /** The grid element (implicit binding for `let-grid`). */\n $implicit: DataGridElement;\n /** The grid element. */\n grid: DataGridElement;\n}\n\nlet autoIdCounter = 0;\n\n/**\n * Declarative wrapper around the grid's imperative\n * {@link ShellPlugin.registerHeaderContent} API.\n *\n * Captures an `<ng-template>` and mounts it as an Angular embedded view into\n * the slot the grid provides for header content. Must be a child of\n * `<tbw-grid>`.\n *\n * ## Usage\n *\n * ```html\n * <tbw-grid [rows]=\"rows\" [gridConfig]=\"config\">\n * <tbw-grid-header-content id=\"calendar-nav\" [order]=\"0\">\n * <ng-template let-grid>\n * <app-header-nav [year]=\"year()\" (yearChange)=\"setYear($event)\" />\n * </ng-template>\n * </tbw-grid-header-content>\n * </tbw-grid>\n * ```\n *\n * @category Directive\n * @since 1.7.0\n */\n@Directive({ selector: 'tbw-grid-header-content', standalone: true })\nexport class GridHeaderContent {\n private elementRef = inject(ElementRef<HTMLElement>);\n private viewContainerRef = inject(ViewContainerRef);\n private destroyRef = inject(DestroyRef);\n\n /** Unique identifier for this header content entry. Optional — defaults to a stable generated id. */\n id = input<string | undefined>(undefined);\n\n /** Render order priority. Lower values appear first. @default 100 */\n order = input<number>(100);\n\n /** The template to mount into the grid's header content slot. */\n template = contentChild(TemplateRef<GridHeaderContentContext>);\n\n private viewRef: EmbeddedViewRef<GridHeaderContentContext> | null = null;\n private registeredId: string | null = null;\n private resolvedId = `tbw-header-content-${++autoIdCounter}`;\n private destroyed = false;\n\n constructor() {\n afterNextRender(() => {\n void this.register();\n });\n\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n this.unregister();\n });\n\n // Re-register when id or order changes after mount.\n effect(() => {\n const nextId = this.id() ?? this.resolvedId;\n const nextOrder = this.order();\n if (this.registeredId && this.registeredId !== nextId) {\n this.unregister();\n void this.register();\n return;\n }\n if (this.registeredId && nextOrder !== this.lastOrder) {\n this.unregister();\n void this.register();\n }\n this.lastOrder = nextOrder;\n });\n }\n\n private lastOrder: number | undefined;\n\n private async register(): Promise<void> {\n const grid = this.findGrid();\n if (!grid) return;\n try {\n await grid.ready?.();\n } catch {\n return;\n }\n if (this.destroyed) return;\n\n const template = this.template();\n const id = this.id() ?? this.resolvedId;\n const order = this.order();\n\n const def: HeaderContentDefinition = {\n id,\n order,\n render: (container) => {\n if (!template) return undefined;\n // Sticky container: the shell may re-invoke `render` with the SAME\n // container across refreshes. If our embedded view is still attached\n // inside it, the previous render is live and this is a refresh — do\n // nothing (no-op cleanup preserves child state).\n const firstNode = this.viewRef?.rootNodes[0] as Node | undefined;\n if (this.viewRef && firstNode && container.contains(firstNode)) {\n return () => {\n /* intentionally empty */\n };\n }\n // Fresh container (first render or container was replaced) — destroy\n // any stale view, then build a new one.\n if (this.viewRef) {\n this.viewRef.destroy();\n this.viewRef = null;\n }\n this.viewRef = this.viewContainerRef.createEmbeddedView(template, {\n $implicit: grid,\n grid,\n });\n this.viewRef.detectChanges();\n for (const node of this.viewRef.rootNodes as Node[]) {\n container.appendChild(node);\n }\n // No-op cleanup: the grid may call this between re-renders before\n // invoking `render` again with the SAME container. Tearing the view\n // down here would destroy any internal state in the projected\n // template on every shell refresh. Teardown happens in `unregister`\n // (component destroy / id / order change).\n return () => {\n /* intentionally empty */\n };\n },\n };\n // Route through the shell plugin (#370). The shell is opt-in at v3 —\n // content registers only when a shell plugin is present.\n grid.getPluginByName?.('shell')?.registerHeaderContent(def);\n this.registeredId = id;\n }\n\n private unregister(): void {\n const grid = this.findGrid();\n if (grid && this.registeredId) {\n grid.getPluginByName?.('shell')?.unregisterHeaderContent(this.registeredId);\n }\n this.registeredId = null;\n if (this.viewRef) {\n this.viewRef.destroy();\n this.viewRef = null;\n }\n }\n\n private findGrid(): DataGridElement | null {\n const host = this.elementRef.nativeElement;\n // Use the stable `[data-tbw-grid]` attribute (set by core on connect) rather\n // than the literal `tbw-grid` tag, so a version-suffixed grid host (e.g.\n // `<tbw-grid-v2-15-0>`) is still found. See the multi-version guide.\n const grid = host.closest('[data-tbw-grid]') as DataGridElement | null;\n return grid;\n }\n\n /** Type guard for template context inference. */\n static ngTemplateContextGuard(_dir: GridHeaderContent, ctx: unknown): ctx is GridHeaderContentContext {\n return true;\n }\n}\n","import {\n afterNextRender,\n contentChild,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n EmbeddedViewRef,\n inject,\n input,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport type { ToolbarContentDefinition } from '@toolbox-web/grid/plugins/shell';\n\n/**\n * Context object passed to the toolbar content template.\n * @since 1.7.0\n */\nexport interface GridToolbarContentContext {\n /** The grid element (implicit binding for `let-grid`). */\n $implicit: DataGridElement;\n /** The grid element. */\n grid: DataGridElement;\n}\n\nlet autoIdCounter = 0;\n\n/**\n * Declarative wrapper around the grid's imperative\n * {@link ShellPlugin.registerToolbarContent} API.\n *\n * Captures an `<ng-template>` and mounts it as an Angular embedded view into\n * the slot the grid provides for toolbar content. Must be a child of\n * `<tbw-grid>`.\n *\n * Prefer this over `<tbw-grid-tool-buttons>` (light DOM) when you need\n * Angular template bindings to component state. Use the light-DOM form for\n * static markup that should be moved verbatim into the toolbar.\n *\n * ## Usage\n *\n * ```html\n * <tbw-grid [rows]=\"rows\" [gridConfig]=\"config\">\n * <tbw-grid-toolbar-content id=\"calendar-nav\" [order]=\"0\">\n * <ng-template let-grid>\n * <app-toolbar-nav (prev)=\"prev()\" (today)=\"today()\" (next)=\"next()\" />\n * </ng-template>\n * </tbw-grid-toolbar-content>\n * </tbw-grid>\n * ```\n *\n * @category Directive\n * @since 1.7.0\n */\n@Directive({ selector: 'tbw-grid-toolbar-content', standalone: true })\nexport class GridToolbarContent {\n private elementRef = inject(ElementRef<HTMLElement>);\n private viewContainerRef = inject(ViewContainerRef);\n private destroyRef = inject(DestroyRef);\n\n id = input<string | undefined>(undefined);\n order = input<number>(100);\n template = contentChild(TemplateRef<GridToolbarContentContext>);\n\n private viewRef: EmbeddedViewRef<GridToolbarContentContext> | null = null;\n private registeredId: string | null = null;\n private resolvedId = `tbw-toolbar-content-${++autoIdCounter}`;\n private lastOrder: number | undefined;\n private destroyed = false;\n\n constructor() {\n afterNextRender(() => {\n void this.register();\n });\n\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n this.unregister();\n });\n\n effect(() => {\n const nextId = this.id() ?? this.resolvedId;\n const nextOrder = this.order();\n if (this.registeredId && this.registeredId !== nextId) {\n this.unregister();\n void this.register();\n return;\n }\n if (this.registeredId && nextOrder !== this.lastOrder) {\n this.unregister();\n void this.register();\n }\n this.lastOrder = nextOrder;\n });\n }\n\n private async register(): Promise<void> {\n const grid = this.findGrid();\n if (!grid) return;\n try {\n await grid.ready?.();\n } catch {\n return;\n }\n if (this.destroyed) return;\n\n const template = this.template();\n const id = this.id() ?? this.resolvedId;\n const order = this.order();\n\n const def: ToolbarContentDefinition = {\n id,\n order,\n render: (container) => {\n if (!template) return undefined;\n // Sticky container: see grid-header-content.directive.ts for rationale.\n const firstNode = this.viewRef?.rootNodes[0] as Node | undefined;\n if (this.viewRef && firstNode && container.contains(firstNode)) {\n return () => {\n /* intentionally empty */\n };\n }\n if (this.viewRef) {\n this.viewRef.destroy();\n this.viewRef = null;\n }\n this.viewRef = this.viewContainerRef.createEmbeddedView(template, {\n $implicit: grid,\n grid,\n });\n this.viewRef.detectChanges();\n for (const node of this.viewRef.rootNodes as Node[]) {\n container.appendChild(node);\n }\n // No-op cleanup — see comment in grid-header-content.directive.ts.\n return () => {\n /* intentionally empty */\n };\n },\n };\n // Route through the shell plugin (#370). The shell is opt-in at v3 —\n // content registers only when a shell plugin is present.\n grid.getPluginByName?.('shell')?.registerToolbarContent(def);\n this.registeredId = id;\n }\n\n private unregister(): void {\n const grid = this.findGrid();\n if (grid && this.registeredId) {\n grid.getPluginByName?.('shell')?.unregisterToolbarContent(this.registeredId);\n }\n this.registeredId = null;\n if (this.viewRef) {\n this.viewRef.destroy();\n this.viewRef = null;\n }\n }\n\n private findGrid(): DataGridElement | null {\n const host = this.elementRef.nativeElement;\n // Use the stable `[data-tbw-grid]` attribute (set by core on connect) rather\n // than the literal `tbw-grid` tag, so a version-suffixed grid host (e.g.\n // `<tbw-grid-v2-15-0>`) is still found. See the multi-version guide.\n return host.closest('[data-tbw-grid]') as DataGridElement | null;\n }\n\n static ngTemplateContextGuard(_dir: GridToolbarContent, ctx: unknown): ctx is GridToolbarContentContext {\n return true;\n }\n}\n","/**\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 { registerToolPanelRendererBridge, type GridAdapter } from '@toolbox-web/grid-angular';\nimport '@toolbox-web/grid/features/shell';\nimport { getToolPanelTemplate, type GridToolPanelContext } from './grid-tool-panel.directive';\n\nexport type { _Augmentation as _ShellAugmentation } from '@toolbox-web/grid/features/shell';\n\n// ---------------------------------------------------------------------------\n// Shell-owned directives + helpers. These physically live in this secondary\n// entry (the runtime behaviour lives here too).\n// ---------------------------------------------------------------------------\nexport { GridHeaderContent } from './grid-header-content.directive';\nexport type { GridHeaderContentContext } from './grid-header-content.directive';\nexport { getToolPanelElements, getToolPanelTemplate, GridToolPanel } from './grid-tool-panel.directive';\nexport type { GridToolPanelContext } from './grid-tool-panel.directive';\nexport { GridToolbarContent } from './grid-toolbar-content.directive';\nexport type { GridToolbarContentContext } from './grid-toolbar-content.directive';\n\n// Install the tool-panel renderer bridge on the adapter. This is what\n// `adapter.createToolPanelRenderer(element)` delegates to. Without this import,\n// the method returns undefined and light-DOM `<tbw-grid-tool-panel>` Angular\n// templates are never mounted by the core ShellPlugin.\nregisterToolPanelRendererBridge((element: HTMLElement, adapter: GridAdapter) => {\n // Type inferred from `getToolPanelTemplate` (same package instance as the\n // adapter), not from a local `import type { TemplateRef } from '@angular/core'`\n // — the latter resolves through Bun's `.bun/` cache during ng-packagr build\n // and produces a brand-incompatible TemplateRef vs the built adapter `.d.ts`.\n const template = getToolPanelTemplate(element);\n if (!template) return undefined;\n\n // Find the parent grid element for context.\n const gridElement = element.closest('tbw-grid, [data-tbw-grid]') as HTMLElement | null;\n\n return (container: HTMLElement) => {\n const context: GridToolPanelContext = {\n $implicit: gridElement ?? container,\n grid: gridElement ?? container,\n };\n const viewRef = adapter.createTrackedEmbeddedView(template, context);\n viewRef.rootNodes.forEach((node: Node) => container.appendChild(node));\n return () => viewRef.destroy();\n };\n});\n","/**\n * Generated bundle index. Do not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2B,CAAuB;IAEtF,OAAO,CAAC,SAAsB,KAAI;AAChC,QAAA,MAAM,OAAO,GAAyB;YACpC,SAAS,EAAE,WAAW,IAAI,SAAS;YACnC,IAAI,EAAE,WAAW,IAAI,SAAS;SAC/B;QACD,MAAM,OAAO,GAAG,OAAO,CAAC,yBAAyB,CAAC,QAAQ,EAAE,OAAO,CAAC;AACpE,QAAA,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAU,KAAK,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACtE,QAAA,OAAO,MAAM,OAAO,CAAC,OAAO,EAAE;AAChC,IAAA,CAAC;AACH,CAAC,CAAC;;ACnEF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"toolbox-web-grid-angular-features-shell.mjs","sources":["../../../../libs/grid-angular/features/shell/src/grid-tool-panel.directive.ts","../../../../libs/grid-angular/features/shell/src/grid-header-content.directive.ts","../../../../libs/grid-angular/features/shell/src/grid-toolbar-content.directive.ts","../../../../libs/grid-angular/features/shell/src/index.ts","../../../../libs/grid-angular/features/shell/src/toolbox-web-grid-angular-features-shell.ts"],"sourcesContent":["import { contentChild, Directive, effect, ElementRef, inject, input, TemplateRef } from '@angular/core';\n\n/**\n * Context object passed to the tool panel template.\n * Provides access to grid-related information for the panel content.\n * @since 0.1.0\n */\nexport interface GridToolPanelContext {\n /** The grid element (implicit binding) */\n $implicit: HTMLElement;\n /** The grid element */\n grid: HTMLElement;\n}\n\n// Global registry mapping DOM elements to their templates\nconst toolPanelTemplateRegistry = new Map<HTMLElement, TemplateRef<GridToolPanelContext>>();\n\n/**\n * Gets the tool panel template registered for a given tool panel element.\n * Used by AngularGridAdapter to retrieve templates at render time.\n */\nexport function getToolPanelTemplate(panelElement: HTMLElement): TemplateRef<GridToolPanelContext> | undefined {\n return toolPanelTemplateRegistry.get(panelElement);\n}\n\n/**\n * Gets all tool panel elements with registered templates within a grid element.\n */\nexport function getToolPanelElements(gridElement: HTMLElement): HTMLElement[] {\n const panelElements = gridElement.querySelectorAll('tbw-grid-tool-panel');\n return Array.from(panelElements).filter((el) => toolPanelTemplateRegistry.has(el as HTMLElement)) as HTMLElement[];\n}\n\n/**\n * Directive that captures an `<ng-template>` for use as a custom tool panel.\n *\n * This enables declarative Angular component usage for tool panels\n * that appear in the grid's side panel.\n *\n * ## Usage\n *\n * ```html\n * <tbw-grid [rows]=\"rows\" [gridConfig]=\"config\">\n * <tbw-grid-tool-panel\n * id=\"quick-filters\"\n * title=\"Quick Filters\"\n * icon=\"🔍\"\n * tooltip=\"Apply quick filters\"\n * [order]=\"10\"\n * >\n * <ng-template let-grid>\n * <app-quick-filters [grid]=\"grid\" />\n * </ng-template>\n * </tbw-grid-tool-panel>\n * </tbw-grid>\n * ```\n *\n * The template context provides:\n * - `$implicit` / `grid`: The grid element reference\n *\n * ### Attributes\n *\n * - `id` (required): Unique identifier for the panel\n * - `title` (optional): Panel title shown in accordion header. Omit it when the\n * panel content provides its own heading.\n * - `icon`: Icon for accordion section header (emoji or text)\n * - `tooltip`: Tooltip for accordion section header\n * - `order`: Panel order priority (lower = first, default: 100)\n *\n * Import the directive in your component:\n *\n * ```typescript\n * import { GridToolPanel } from '@toolbox-web/grid-angular/features/shell';\n *\n * @Component({\n * imports: [GridToolPanel],\n * // ...\n * })\n * ```\n *\n * @example\n * ```html\n * <tbw-grid [rows]=\"rows\">\n * <tbw-grid-tool-panel id=\"quick-filters\" title=\"Quick Filters\" icon=\"\\uD83D\\uDD0D\">\n * <ng-template let-grid>\n * <app-quick-filters [grid]=\"grid\" />\n * </ng-template>\n * </tbw-grid-tool-panel>\n * </tbw-grid>\n * ```\n *\n * @category Directive\n * @since 0.1.0\n */\n@Directive({ selector: 'tbw-grid-tool-panel' })\nexport class GridToolPanel {\n private elementRef = inject(ElementRef<HTMLElement>);\n\n /** Unique panel identifier (required) */\n id = input.required<string>({ alias: 'id' });\n\n /**\n * Panel title shown in accordion header (optional).\n *\n * Omit it when the panel content provides its own heading. With a single\n * title-less panel the accordion header row is skipped; with multiple panels\n * a title-less header still renders so the expand/collapse control stays\n * available.\n *\n * @since 3.1.0 (previously required)\n */\n title = input<string>();\n\n /** Icon for accordion section header (emoji or text) */\n icon = input<string>();\n\n /** Tooltip for accordion section header */\n tooltip = input<string>();\n\n /** Panel order priority (lower = first, default: 100) */\n order = input<number>(100);\n\n /**\n * Query for the ng-template content child.\n */\n template = contentChild(TemplateRef<GridToolPanelContext>);\n\n /** Effect that triggers when the template is available */\n private onTemplateReceived = effect(() => {\n const template = this.template();\n const element = this.elementRef.nativeElement;\n\n if (template) {\n // Set attributes from inputs (for light DOM parsing to read)\n element.setAttribute('id', this.id());\n\n const title = this.title();\n if (title != null) {\n element.setAttribute('title', title);\n } else {\n element.removeAttribute('title');\n }\n\n const icon = this.icon();\n if (icon) element.setAttribute('icon', icon);\n\n const tooltip = this.tooltip();\n if (tooltip) element.setAttribute('tooltip', tooltip);\n\n element.setAttribute('order', String(this.order()));\n\n // Register the template for this element\n toolPanelTemplateRegistry.set(element, template);\n }\n });\n\n /**\n * Static type guard for template context.\n * Enables type inference in templates.\n */\n static ngTemplateContextGuard(dir: GridToolPanel, ctx: unknown): ctx is GridToolPanelContext {\n return true;\n }\n}\n","import {\n afterNextRender,\n contentChild,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n EmbeddedViewRef,\n inject,\n input,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport type { HeaderContentDefinition } from '@toolbox-web/grid/plugins/shell';\n\n/**\n * Context object passed to the header content template.\n * @since 1.7.0\n */\nexport interface GridHeaderContentContext {\n /** The grid element (implicit binding for `let-grid`). */\n $implicit: DataGridElement;\n /** The grid element. */\n grid: DataGridElement;\n}\n\nlet autoIdCounter = 0;\n\n/**\n * Declarative wrapper around the grid's imperative\n * {@link ShellPlugin.registerHeaderContent} API.\n *\n * Captures an `<ng-template>` and mounts it as an Angular embedded view into\n * the slot the grid provides for header content. Must be a child of\n * `<tbw-grid>`.\n *\n * ## Usage\n *\n * ```html\n * <tbw-grid [rows]=\"rows\" [gridConfig]=\"config\">\n * <tbw-grid-header-content id=\"calendar-nav\" [order]=\"0\">\n * <ng-template let-grid>\n * <app-header-nav [year]=\"year()\" (yearChange)=\"setYear($event)\" />\n * </ng-template>\n * </tbw-grid-header-content>\n * </tbw-grid>\n * ```\n *\n * @category Directive\n * @since 1.7.0\n */\n@Directive({ selector: 'tbw-grid-header-content', standalone: true })\nexport class GridHeaderContent {\n private elementRef = inject(ElementRef<HTMLElement>);\n private viewContainerRef = inject(ViewContainerRef);\n private destroyRef = inject(DestroyRef);\n\n /** Unique identifier for this header content entry. Optional — defaults to a stable generated id. */\n id = input<string | undefined>(undefined);\n\n /** Render order priority. Lower values appear first. @default 100 */\n order = input<number>(100);\n\n /** The template to mount into the grid's header content slot. */\n template = contentChild(TemplateRef<GridHeaderContentContext>);\n\n private viewRef: EmbeddedViewRef<GridHeaderContentContext> | null = null;\n private registeredId: string | null = null;\n private resolvedId = `tbw-header-content-${++autoIdCounter}`;\n private destroyed = false;\n\n constructor() {\n afterNextRender(() => {\n void this.register();\n });\n\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n this.unregister();\n });\n\n // Re-register when id or order changes after mount.\n effect(() => {\n const nextId = this.id() ?? this.resolvedId;\n const nextOrder = this.order();\n if (this.registeredId && this.registeredId !== nextId) {\n this.unregister();\n void this.register();\n return;\n }\n if (this.registeredId && nextOrder !== this.lastOrder) {\n this.unregister();\n void this.register();\n }\n this.lastOrder = nextOrder;\n });\n }\n\n private lastOrder: number | undefined;\n\n private async register(): Promise<void> {\n const grid = this.findGrid();\n if (!grid) return;\n try {\n await grid.ready?.();\n } catch {\n return;\n }\n if (this.destroyed) return;\n\n const template = this.template();\n const id = this.id() ?? this.resolvedId;\n const order = this.order();\n\n const def: HeaderContentDefinition = {\n id,\n order,\n render: (container) => {\n if (!template) return undefined;\n // Sticky container: the shell may re-invoke `render` with the SAME\n // container across refreshes. If our embedded view is still attached\n // inside it, the previous render is live and this is a refresh — do\n // nothing (no-op cleanup preserves child state).\n const firstNode = this.viewRef?.rootNodes[0] as Node | undefined;\n if (this.viewRef && firstNode && container.contains(firstNode)) {\n return () => {\n /* intentionally empty */\n };\n }\n // Fresh container (first render or container was replaced) — destroy\n // any stale view, then build a new one.\n if (this.viewRef) {\n this.viewRef.destroy();\n this.viewRef = null;\n }\n this.viewRef = this.viewContainerRef.createEmbeddedView(template, {\n $implicit: grid,\n grid,\n });\n this.viewRef.detectChanges();\n for (const node of this.viewRef.rootNodes as Node[]) {\n container.appendChild(node);\n }\n // No-op cleanup: the grid may call this between re-renders before\n // invoking `render` again with the SAME container. Tearing the view\n // down here would destroy any internal state in the projected\n // template on every shell refresh. Teardown happens in `unregister`\n // (component destroy / id / order change).\n return () => {\n /* intentionally empty */\n };\n },\n };\n // Route through the shell plugin (#370). The shell is opt-in at v3 —\n // content registers only when a shell plugin is present.\n grid.getPluginByName?.('shell')?.registerHeaderContent(def);\n this.registeredId = id;\n }\n\n private unregister(): void {\n const grid = this.findGrid();\n if (grid && this.registeredId) {\n grid.getPluginByName?.('shell')?.unregisterHeaderContent(this.registeredId);\n }\n this.registeredId = null;\n if (this.viewRef) {\n this.viewRef.destroy();\n this.viewRef = null;\n }\n }\n\n private findGrid(): DataGridElement | null {\n const host = this.elementRef.nativeElement;\n // Use the stable `[data-tbw-grid]` attribute (set by core on connect) rather\n // than the literal `tbw-grid` tag, so a version-suffixed grid host (e.g.\n // `<tbw-grid-v2-15-0>`) is still found. See the multi-version guide.\n const grid = host.closest('[data-tbw-grid]') as DataGridElement | null;\n return grid;\n }\n\n /** Type guard for template context inference. */\n static ngTemplateContextGuard(_dir: GridHeaderContent, ctx: unknown): ctx is GridHeaderContentContext {\n return true;\n }\n}\n","import {\n afterNextRender,\n contentChild,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n EmbeddedViewRef,\n inject,\n input,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport type { ToolbarContentDefinition } from '@toolbox-web/grid/plugins/shell';\n\n/**\n * Context object passed to the toolbar content template.\n * @since 1.7.0\n */\nexport interface GridToolbarContentContext {\n /** The grid element (implicit binding for `let-grid`). */\n $implicit: DataGridElement;\n /** The grid element. */\n grid: DataGridElement;\n}\n\nlet autoIdCounter = 0;\n\n/**\n * Declarative wrapper around the grid's imperative\n * {@link ShellPlugin.registerToolbarContent} API.\n *\n * Captures an `<ng-template>` and mounts it as an Angular embedded view into\n * the slot the grid provides for toolbar content. Must be a child of\n * `<tbw-grid>`.\n *\n * Prefer this over `<tbw-grid-tool-buttons>` (light DOM) when you need\n * Angular template bindings to component state. Use the light-DOM form for\n * static markup that should be moved verbatim into the toolbar.\n *\n * ## Usage\n *\n * ```html\n * <tbw-grid [rows]=\"rows\" [gridConfig]=\"config\">\n * <tbw-grid-toolbar-content id=\"calendar-nav\" [order]=\"0\">\n * <ng-template let-grid>\n * <app-toolbar-nav (prev)=\"prev()\" (today)=\"today()\" (next)=\"next()\" />\n * </ng-template>\n * </tbw-grid-toolbar-content>\n * </tbw-grid>\n * ```\n *\n * @category Directive\n * @since 1.7.0\n */\n@Directive({ selector: 'tbw-grid-toolbar-content', standalone: true })\nexport class GridToolbarContent {\n private elementRef = inject(ElementRef<HTMLElement>);\n private viewContainerRef = inject(ViewContainerRef);\n private destroyRef = inject(DestroyRef);\n\n id = input<string | undefined>(undefined);\n order = input<number>(100);\n template = contentChild(TemplateRef<GridToolbarContentContext>);\n\n private viewRef: EmbeddedViewRef<GridToolbarContentContext> | null = null;\n private registeredId: string | null = null;\n private resolvedId = `tbw-toolbar-content-${++autoIdCounter}`;\n private lastOrder: number | undefined;\n private destroyed = false;\n\n constructor() {\n afterNextRender(() => {\n void this.register();\n });\n\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n this.unregister();\n });\n\n effect(() => {\n const nextId = this.id() ?? this.resolvedId;\n const nextOrder = this.order();\n if (this.registeredId && this.registeredId !== nextId) {\n this.unregister();\n void this.register();\n return;\n }\n if (this.registeredId && nextOrder !== this.lastOrder) {\n this.unregister();\n void this.register();\n }\n this.lastOrder = nextOrder;\n });\n }\n\n private async register(): Promise<void> {\n const grid = this.findGrid();\n if (!grid) return;\n try {\n await grid.ready?.();\n } catch {\n return;\n }\n if (this.destroyed) return;\n\n const template = this.template();\n const id = this.id() ?? this.resolvedId;\n const order = this.order();\n\n const def: ToolbarContentDefinition = {\n id,\n order,\n render: (container) => {\n if (!template) return undefined;\n // Sticky container: see grid-header-content.directive.ts for rationale.\n const firstNode = this.viewRef?.rootNodes[0] as Node | undefined;\n if (this.viewRef && firstNode && container.contains(firstNode)) {\n return () => {\n /* intentionally empty */\n };\n }\n if (this.viewRef) {\n this.viewRef.destroy();\n this.viewRef = null;\n }\n this.viewRef = this.viewContainerRef.createEmbeddedView(template, {\n $implicit: grid,\n grid,\n });\n this.viewRef.detectChanges();\n for (const node of this.viewRef.rootNodes as Node[]) {\n container.appendChild(node);\n }\n // No-op cleanup — see comment in grid-header-content.directive.ts.\n return () => {\n /* intentionally empty */\n };\n },\n };\n // Route through the shell plugin (#370). The shell is opt-in at v3 —\n // content registers only when a shell plugin is present.\n grid.getPluginByName?.('shell')?.registerToolbarContent(def);\n this.registeredId = id;\n }\n\n private unregister(): void {\n const grid = this.findGrid();\n if (grid && this.registeredId) {\n grid.getPluginByName?.('shell')?.unregisterToolbarContent(this.registeredId);\n }\n this.registeredId = null;\n if (this.viewRef) {\n this.viewRef.destroy();\n this.viewRef = null;\n }\n }\n\n private findGrid(): DataGridElement | null {\n const host = this.elementRef.nativeElement;\n // Use the stable `[data-tbw-grid]` attribute (set by core on connect) rather\n // than the literal `tbw-grid` tag, so a version-suffixed grid host (e.g.\n // `<tbw-grid-v2-15-0>`) is still found. See the multi-version guide.\n return host.closest('[data-tbw-grid]') as DataGridElement | null;\n }\n\n static ngTemplateContextGuard(_dir: GridToolbarContent, ctx: unknown): ctx is GridToolbarContentContext {\n return true;\n }\n}\n","/**\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 is opt-in and tree-shakeable — nothing is registered\n * unless this entry point is imported.\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 { registerToolPanelRendererBridge, type GridAdapter } from '@toolbox-web/grid-angular';\nimport '@toolbox-web/grid/features/shell';\nimport { getToolPanelTemplate, type GridToolPanelContext } from './grid-tool-panel.directive';\n\nexport type { _Augmentation as _ShellAugmentation } from '@toolbox-web/grid/features/shell';\n\n// ---------------------------------------------------------------------------\n// Shell-owned directives + helpers. These physically live in this secondary\n// entry (the runtime behaviour lives here too).\n// ---------------------------------------------------------------------------\nexport { GridHeaderContent } from './grid-header-content.directive';\nexport type { GridHeaderContentContext } from './grid-header-content.directive';\nexport { getToolPanelElements, getToolPanelTemplate, GridToolPanel } from './grid-tool-panel.directive';\nexport type { GridToolPanelContext } from './grid-tool-panel.directive';\nexport { GridToolbarContent } from './grid-toolbar-content.directive';\nexport type { GridToolbarContentContext } from './grid-toolbar-content.directive';\n\n// Install the tool-panel renderer bridge on the adapter. This is what\n// `adapter.createToolPanelRenderer(element)` delegates to. Without this import,\n// the method returns undefined and light-DOM `<tbw-grid-tool-panel>` Angular\n// templates are never mounted by the core ShellPlugin.\nregisterToolPanelRendererBridge((element: HTMLElement, adapter: GridAdapter) => {\n // Type inferred from `getToolPanelTemplate` (same package instance as the\n // adapter), not from a local `import type { TemplateRef } from '@angular/core'`\n // — the latter resolves through Bun's `.bun/` cache during ng-packagr build\n // and produces a brand-incompatible TemplateRef vs the built adapter `.d.ts`.\n const template = getToolPanelTemplate(element);\n if (!template) return undefined;\n\n // Find the parent grid element for context.\n const gridElement = element.closest('tbw-grid, [data-tbw-grid]') as HTMLElement | null;\n\n return (container: HTMLElement) => {\n const context: GridToolPanelContext = {\n $implicit: gridElement ?? container,\n grid: gridElement ?? container,\n };\n const viewRef = adapter.createTrackedEmbeddedView(template, context);\n viewRef.rootNodes.forEach((node: Node) => container.appendChild(node));\n return () => viewRef.destroy();\n };\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["autoIdCounter"],"mappings":";;;;;AAcA;AACA,MAAM,yBAAyB,GAAG,IAAI,GAAG,EAAkD;AAE3F;;;AAGG;AACG,SAAU,oBAAoB,CAAC,YAAyB,EAAA;AAC5D,IAAA,OAAO,yBAAyB,CAAC,GAAG,CAAC,YAAY,CAAC;AACpD;AAEA;;AAEG;AACG,SAAU,oBAAoB,CAAC,WAAwB,EAAA;IAC3D,MAAM,aAAa,GAAG,WAAW,CAAC,gBAAgB,CAAC,qBAAqB,CAAC;IACzE,OAAO,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,yBAAyB,CAAC,GAAG,CAAC,EAAiB,CAAC,CAAkB;AACpH;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DG;MAEU,aAAa,CAAA;AAChB,IAAA,UAAU,GAAG,MAAM,EAAC,UAAuB,EAAC;;IAGpD,EAAE,GAAG,KAAK,CAAC,QAAQ,yEAAW,KAAK,EAAE,IAAI,EAAA,CAAG;AAE5C;;;;;;;;;AASG;AACH,IAAA,KAAK,GAAG,KAAK;yFAAU;;AAGvB,IAAA,IAAI,GAAG,KAAK;wFAAU;;AAGtB,IAAA,OAAO,GAAG,KAAK;2FAAU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PnD,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,QAAQ,EAAE,0BAA0B,EAAE,UAAU,EAAE,IAAI,EAAE;qSAQ3C,WAAsC,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AChEhE;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AAmBH;AACA;AACA;AACA;AACA,+BAA+B,CAAC,CAAC,OAAoB,EAAE,OAAoB,KAAI;;;;;AAK7E,IAAA,MAAM,QAAQ,GAAG,oBAAoB,CAAC,OAAO,CAAC;AAC9C,IAAA,IAAI,CAAC,QAAQ;AAAE,QAAA,OAAO,SAAS;;IAG/B,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,2BAA2B,CAAuB;IAEtF,OAAO,CAAC,SAAsB,KAAI;AAChC,QAAA,MAAM,OAAO,GAAyB;YACpC,SAAS,EAAE,WAAW,IAAI,SAAS;YACnC,IAAI,EAAE,WAAW,IAAI,SAAS;SAC/B;QACD,MAAM,OAAO,GAAG,OAAO,CAAC,yBAAyB,CAAC,QAAQ,EAAE,OAAO,CAAC;AACpE,QAAA,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAU,KAAK,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACtE,QAAA,OAAO,MAAM,OAAO,CAAC,OAAO,EAAE;AAChC,IAAA,CAAC;AACH,CAAC,CAAC;;AClEF;;AAEG;;;;"}
|
|
@@ -4,13 +4,13 @@ import { inject, ElementRef, input, output, Directive } from '@angular/core';
|
|
|
4
4
|
import { registerFeatureClaim, claimEvent, unregisterFeatureClaim, unclaimEvent } from '@toolbox-web/grid-angular';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* `GridTreeDirective` — owns `[tree]` and
|
|
7
|
+
* `GridTreeDirective` — owns `[tree]` and the tree outputs on `<tbw-grid>`.
|
|
8
8
|
* See `GridFilteringDirective` for the full rationale.
|
|
9
9
|
*
|
|
10
10
|
* @category Directive
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
* Owns the binding(s) `[tree], [treeExpand]` on `<tbw-grid>` for the matching feature plugin. See `GridFilteringDirective` for the full rationale.
|
|
13
|
+
* Owns the binding(s) `[tree], [treeExpand], [treeLoadStart], [treeLoadEnd], [treeLoadError]` on `<tbw-grid>` for the matching feature plugin. See `GridFilteringDirective` for the full rationale.
|
|
14
14
|
*
|
|
15
15
|
* @category Directive
|
|
16
16
|
*/
|
|
@@ -20,37 +20,70 @@ class GridTreeDirective {
|
|
|
20
20
|
...(ngDevMode ? [undefined, { debugName: "tree" }] : /* istanbul ignore next */ []));
|
|
21
21
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
22
|
treeExpand = output();
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Fired when lazy child loading starts for a tree node.
|
|
25
|
+
*
|
|
26
|
+
* @since 2.3.0
|
|
27
|
+
*/
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
+
treeLoadStart = output();
|
|
30
|
+
/**
|
|
31
|
+
* Fired when lazy child loading completes and children are merged into the parent row.
|
|
32
|
+
*
|
|
33
|
+
* @since 2.3.0
|
|
34
|
+
*/
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
|
+
treeLoadEnd = output();
|
|
37
|
+
/**
|
|
38
|
+
* Fired when lazy child loading fails. Re-expanding the node retries the fetch.
|
|
39
|
+
*
|
|
40
|
+
* @since 2.3.0
|
|
41
|
+
*/
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
|
+
treeLoadError = output();
|
|
44
|
+
listeners = new Map();
|
|
45
|
+
static EVENTS = ['tree-expand', 'tree-load-start', 'tree-load-end', 'tree-load-error'];
|
|
24
46
|
constructor() {
|
|
25
47
|
const grid = this.elementRef.nativeElement;
|
|
26
48
|
registerFeatureClaim(grid, 'tree', () => this.tree());
|
|
27
|
-
|
|
49
|
+
for (const ev of GridTreeDirective.EVENTS)
|
|
50
|
+
claimEvent(grid, ev);
|
|
28
51
|
}
|
|
29
52
|
ngOnInit() {
|
|
30
53
|
const grid = this.elementRef.nativeElement;
|
|
54
|
+
const wire = (name, out) => {
|
|
55
|
+
const l = (e) => out.emit(e.detail);
|
|
56
|
+
grid.addEventListener(name, l);
|
|
57
|
+
this.listeners.set(name, l);
|
|
58
|
+
};
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60
|
+
wire('tree-expand', this.treeExpand);
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
62
|
+
wire('tree-load-start', this.treeLoadStart);
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
64
|
+
wire('tree-load-end', this.treeLoadEnd);
|
|
31
65
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
|
-
|
|
33
|
-
grid.addEventListener('tree-expand', this.listener);
|
|
66
|
+
wire('tree-load-error', this.treeLoadError);
|
|
34
67
|
}
|
|
35
68
|
ngOnDestroy() {
|
|
36
69
|
const grid = this.elementRef.nativeElement;
|
|
37
|
-
|
|
38
|
-
grid.removeEventListener(
|
|
39
|
-
|
|
40
|
-
}
|
|
70
|
+
for (const [name, l] of this.listeners)
|
|
71
|
+
grid.removeEventListener(name, l);
|
|
72
|
+
this.listeners.clear();
|
|
41
73
|
unregisterFeatureClaim(grid, 'tree');
|
|
42
|
-
|
|
74
|
+
for (const ev of GridTreeDirective.EVENTS)
|
|
75
|
+
unclaimEvent(grid, ev);
|
|
43
76
|
}
|
|
44
77
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridTreeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
45
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridTreeDirective, isStandalone: true, selector: "tbw-grid[tree], tbw-grid[treeExpand]", inputs: { tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { treeExpand: "treeExpand" }, ngImport: i0 });
|
|
78
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridTreeDirective, isStandalone: true, selector: "tbw-grid[tree], tbw-grid[treeExpand], tbw-grid[treeLoadStart], tbw-grid[treeLoadEnd], tbw-grid[treeLoadError]", inputs: { tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { treeExpand: "treeExpand", treeLoadStart: "treeLoadStart", treeLoadEnd: "treeLoadEnd", treeLoadError: "treeLoadError" }, ngImport: i0 });
|
|
46
79
|
}
|
|
47
80
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridTreeDirective, decorators: [{
|
|
48
81
|
type: Directive,
|
|
49
82
|
args: [{
|
|
50
|
-
selector: 'tbw-grid[tree], tbw-grid[treeExpand]',
|
|
83
|
+
selector: 'tbw-grid[tree], tbw-grid[treeExpand], tbw-grid[treeLoadStart], tbw-grid[treeLoadEnd], tbw-grid[treeLoadError]',
|
|
51
84
|
standalone: true,
|
|
52
85
|
}]
|
|
53
|
-
}], ctorParameters: () => [], propDecorators: { tree: [{ type: i0.Input, args: [{ isSignal: true, alias: "tree", required: false }] }], treeExpand: [{ type: i0.Output, args: ["treeExpand"] }] } });
|
|
86
|
+
}], ctorParameters: () => [], propDecorators: { tree: [{ type: i0.Input, args: [{ isSignal: true, alias: "tree", required: false }] }], treeExpand: [{ type: i0.Output, args: ["treeExpand"] }], treeLoadStart: [{ type: i0.Output, args: ["treeLoadStart"] }], treeLoadEnd: [{ type: i0.Output, args: ["treeLoadEnd"] }], treeLoadError: [{ type: i0.Output, args: ["treeLoadError"] }] } });
|
|
54
87
|
|
|
55
88
|
/**
|
|
56
89
|
* Tree feature for @toolbox-web/grid-angular
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbox-web-grid-angular-features-tree.mjs","sources":["../../../../libs/grid-angular/features/tree/src/grid-tree.directive.ts","../../../../libs/grid-angular/features/tree/src/index.ts","../../../../libs/grid-angular/features/tree/src/toolbox-web-grid-angular-features-tree.ts"],"sourcesContent":["/**\n * `GridTreeDirective` — owns `[tree]` and
|
|
1
|
+
{"version":3,"file":"toolbox-web-grid-angular-features-tree.mjs","sources":["../../../../libs/grid-angular/features/tree/src/grid-tree.directive.ts","../../../../libs/grid-angular/features/tree/src/index.ts","../../../../libs/grid-angular/features/tree/src/toolbox-web-grid-angular-features-tree.ts"],"sourcesContent":["/**\n * `GridTreeDirective` — owns `[tree]` and the tree outputs on `<tbw-grid>`.\n * 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 {\n TreeConfig,\n TreeExpandDetail,\n TreeLoadEndDetail,\n TreeLoadErrorDetail,\n TreeLoadStartDetail,\n} from '@toolbox-web/grid/plugins/tree';\n\n/**\n * Owns the binding(s) `[tree], [treeExpand], [treeLoadStart], [treeLoadEnd], [treeLoadError]` on `<tbw-grid>` for the matching feature plugin. See `GridFilteringDirective` for the full rationale.\n *\n * @category Directive\n */\n@Directive({\n selector:\n 'tbw-grid[tree], tbw-grid[treeExpand], tbw-grid[treeLoadStart], tbw-grid[treeLoadEnd], tbw-grid[treeLoadError]',\n standalone: true,\n})\nexport class GridTreeDirective implements OnInit, OnDestroy {\n private readonly elementRef = inject(ElementRef<DataGridElement>);\n\n readonly tree = input<boolean | TreeConfig>();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly treeExpand = output<TreeExpandDetail<any>>();\n /**\n * Fired when lazy child loading starts for a tree node.\n *\n * @since 2.3.0\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly treeLoadStart = output<TreeLoadStartDetail<any>>();\n /**\n * Fired when lazy child loading completes and children are merged into the parent row.\n *\n * @since 2.3.0\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly treeLoadEnd = output<TreeLoadEndDetail<any>>();\n /**\n * Fired when lazy child loading fails. Re-expanding the node retries the fetch.\n *\n * @since 2.3.0\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly treeLoadError = output<TreeLoadErrorDetail<any>>();\n\n private readonly listeners = new Map<string, (e: Event) => void>();\n private static readonly EVENTS = ['tree-expand', 'tree-load-start', 'tree-load-end', 'tree-load-error'] as const;\n\n constructor() {\n const grid = this.elementRef.nativeElement;\n registerFeatureClaim(grid, 'tree', () => this.tree());\n for (const ev of GridTreeDirective.EVENTS) claimEvent(grid, ev);\n }\n\n ngOnInit(): void {\n const grid = this.elementRef.nativeElement;\n const wire = <T>(name: string, out: { emit: (v: T) => void }): void => {\n const l = (e: Event): void => out.emit((e as CustomEvent<T>).detail);\n grid.addEventListener(name, l);\n this.listeners.set(name, l);\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wire<TreeExpandDetail<any>>('tree-expand', this.treeExpand);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wire<TreeLoadStartDetail<any>>('tree-load-start', this.treeLoadStart);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wire<TreeLoadEndDetail<any>>('tree-load-end', this.treeLoadEnd);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wire<TreeLoadErrorDetail<any>>('tree-load-error', this.treeLoadError);\n }\n\n ngOnDestroy(): void {\n const grid = this.elementRef.nativeElement;\n for (const [name, l] of this.listeners) grid.removeEventListener(name, l);\n this.listeners.clear();\n unregisterFeatureClaim(grid, 'tree');\n for (const ev of GridTreeDirective.EVENTS) unclaimEvent(grid, ev);\n }\n}\n","/**\n * Tree feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `tree` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/tree';\n *\n * <tbw-grid [tree]=\"{ childrenField: 'children' }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/tree';\nexport { GridTreeDirective } from './grid-tree.directive';\nexport type { _Augmentation as _TreeAugmentation } from '@toolbox-web/grid/features/tree';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAYH;;;;AAIG;MAMU,iBAAiB,CAAA;AACX,IAAA,UAAU,GAAG,MAAM,EAAC,UAA2B,EAAC;AAExD,IAAA,IAAI,GAAG,KAAK;wFAAwB;;IAEpC,UAAU,GAAG,MAAM,EAAyB;AACrD;;;;AAIG;;IAEM,aAAa,GAAG,MAAM,EAA4B;AAC3D;;;;AAIG;;IAEM,WAAW,GAAG,MAAM,EAA0B;AACvD;;;;AAIG;;IAEM,aAAa,GAAG,MAAM,EAA4B;AAE1C,IAAA,SAAS,GAAG,IAAI,GAAG,EAA8B;AAC1D,IAAA,OAAgB,MAAM,GAAG,CAAC,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,iBAAiB,CAAU;AAEhH,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AAC1C,QAAA,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;AACrD,QAAA,KAAK,MAAM,EAAE,IAAI,iBAAiB,CAAC,MAAM;AAAE,YAAA,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC;IACjE;IAEA,QAAQ,GAAA;AACN,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AAC1C,QAAA,MAAM,IAAI,GAAG,CAAI,I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,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,aAAA,EAAA,eAAA,EAAA,WAAA,EAAA,aAAA,EAAA,aAAA,EAAA,eAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EACN,+GAA+G;AACjH,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;AC1BD;;;;;;;;;;;;;AAaG;;ACbH;;AAEG;;;;"}
|
|
@@ -2693,6 +2693,13 @@ class Grid {
|
|
|
2693
2693
|
tbwScroll: 'tbw-scroll',
|
|
2694
2694
|
render: 'render',
|
|
2695
2695
|
};
|
|
2696
|
+
/**
|
|
2697
|
+
* Compile-time assertion — assigning `true` only type-checks while the
|
|
2698
|
+
* conditional below resolves to `true`. Do not turn this back into a
|
|
2699
|
+
* `declare`d property: a bare declaration is never checked, which silently
|
|
2700
|
+
* disabled this guard for several releases.
|
|
2701
|
+
*/
|
|
2702
|
+
_assertEventOutputMapCoversCore = true;
|
|
2696
2703
|
// Store event listeners for cleanup
|
|
2697
2704
|
eventListeners = new Map();
|
|
2698
2705
|
ngOnInit() {
|