@toolbox-web/grid-angular 2.0.0-rc.1 → 2.0.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.
Files changed (53) hide show
  1. package/fesm2022/toolbox-web-grid-angular-features-clipboard.mjs +5 -4
  2. package/fesm2022/toolbox-web-grid-angular-features-clipboard.mjs.map +1 -1
  3. package/fesm2022/toolbox-web-grid-angular-features-column-virtualization.mjs +5 -4
  4. package/fesm2022/toolbox-web-grid-angular-features-column-virtualization.mjs.map +1 -1
  5. package/fesm2022/toolbox-web-grid-angular-features-context-menu.mjs +5 -4
  6. package/fesm2022/toolbox-web-grid-angular-features-context-menu.mjs.map +1 -1
  7. package/fesm2022/toolbox-web-grid-angular-features-editing.mjs +1537 -1510
  8. package/fesm2022/toolbox-web-grid-angular-features-editing.mjs.map +1 -1
  9. package/fesm2022/toolbox-web-grid-angular-features-export.mjs +5 -4
  10. package/fesm2022/toolbox-web-grid-angular-features-export.mjs.map +1 -1
  11. package/fesm2022/toolbox-web-grid-angular-features-filtering.mjs +12 -9
  12. package/fesm2022/toolbox-web-grid-angular-features-filtering.mjs.map +1 -1
  13. package/fesm2022/toolbox-web-grid-angular-features-grouping-columns.mjs +5 -4
  14. package/fesm2022/toolbox-web-grid-angular-features-grouping-columns.mjs.map +1 -1
  15. package/fesm2022/toolbox-web-grid-angular-features-grouping-rows.mjs +5 -4
  16. package/fesm2022/toolbox-web-grid-angular-features-grouping-rows.mjs.map +1 -1
  17. package/fesm2022/toolbox-web-grid-angular-features-master-detail.mjs +16 -11
  18. package/fesm2022/toolbox-web-grid-angular-features-master-detail.mjs.map +1 -1
  19. package/fesm2022/toolbox-web-grid-angular-features-multi-sort.mjs +5 -4
  20. package/fesm2022/toolbox-web-grid-angular-features-multi-sort.mjs.map +1 -1
  21. package/fesm2022/toolbox-web-grid-angular-features-pinned-columns.mjs +5 -4
  22. package/fesm2022/toolbox-web-grid-angular-features-pinned-columns.mjs.map +1 -1
  23. package/fesm2022/toolbox-web-grid-angular-features-pinned-rows.mjs +5 -4
  24. package/fesm2022/toolbox-web-grid-angular-features-pinned-rows.mjs.map +1 -1
  25. package/fesm2022/toolbox-web-grid-angular-features-pivot.mjs +5 -4
  26. package/fesm2022/toolbox-web-grid-angular-features-pivot.mjs.map +1 -1
  27. package/fesm2022/toolbox-web-grid-angular-features-print.mjs +7 -5
  28. package/fesm2022/toolbox-web-grid-angular-features-print.mjs.map +1 -1
  29. package/fesm2022/toolbox-web-grid-angular-features-reorder-columns.mjs +5 -4
  30. package/fesm2022/toolbox-web-grid-angular-features-reorder-columns.mjs.map +1 -1
  31. package/fesm2022/toolbox-web-grid-angular-features-responsive.mjs +16 -11
  32. package/fesm2022/toolbox-web-grid-angular-features-responsive.mjs.map +1 -1
  33. package/fesm2022/toolbox-web-grid-angular-features-row-drag-drop.mjs +5 -4
  34. package/fesm2022/toolbox-web-grid-angular-features-row-drag-drop.mjs.map +1 -1
  35. package/fesm2022/toolbox-web-grid-angular-features-selection.mjs +13 -8
  36. package/fesm2022/toolbox-web-grid-angular-features-selection.mjs.map +1 -1
  37. package/fesm2022/toolbox-web-grid-angular-features-server-side.mjs +5 -4
  38. package/fesm2022/toolbox-web-grid-angular-features-server-side.mjs.map +1 -1
  39. package/fesm2022/toolbox-web-grid-angular-features-shell.mjs +31 -20
  40. package/fesm2022/toolbox-web-grid-angular-features-shell.mjs.map +1 -1
  41. package/fesm2022/toolbox-web-grid-angular-features-sticky-rows.mjs +5 -4
  42. package/fesm2022/toolbox-web-grid-angular-features-sticky-rows.mjs.map +1 -1
  43. package/fesm2022/toolbox-web-grid-angular-features-tooltip.mjs +5 -4
  44. package/fesm2022/toolbox-web-grid-angular-features-tooltip.mjs.map +1 -1
  45. package/fesm2022/toolbox-web-grid-angular-features-tree.mjs +5 -4
  46. package/fesm2022/toolbox-web-grid-angular-features-tree.mjs.map +1 -1
  47. package/fesm2022/toolbox-web-grid-angular-features-undo-redo.mjs +11 -7
  48. package/fesm2022/toolbox-web-grid-angular-features-undo-redo.mjs.map +1 -1
  49. package/fesm2022/toolbox-web-grid-angular-features-visibility.mjs +5 -4
  50. package/fesm2022/toolbox-web-grid-angular-features-visibility.mjs.map +1 -1
  51. package/fesm2022/toolbox-web-grid-angular.mjs +61 -71
  52. package/fesm2022/toolbox-web-grid-angular.mjs.map +1 -1
  53. package/package.json +2 -2
@@ -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 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DG;MAEU,aAAa,CAAA;AAChB,IAAA,UAAU,GAAG,MAAM,EAAC,UAAuB,EAAC;;IAGpD,EAAE,GAAG,KAAK,CAAC,QAAQ,yEAAW,KAAK,EAAE,IAAI,EAAA,CAAG;;IAG5C,KAAK,GAAG,KAAK,CAAC,QAAQ,4EAAW,KAAK,EAAE,OAAO,EAAA,CAAG;;IAGlD,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;;IAGtB,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;;AAGzB,IAAA,KAAK,GAAG,KAAK,CAAS,GAAG,4EAAC;AAE1B;;AAEG;AACH,IAAA,QAAQ,GAAG,YAAY,EAAC,WAAiC,gFAAC;;AAGlD,IAAA,kBAAkB,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;;;;;;;;;;AAwBG;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;;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` (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 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DG;MAEU,aAAa,CAAA;AAChB,IAAA,UAAU,GAAG,MAAM,EAAC,UAAuB,EAAC;;IAGpD,EAAE,GAAG,KAAK,CAAC,QAAQ,yEAAW,KAAK,EAAE,IAAI,EAAA,CAAG;;IAG5C,KAAK,GAA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A,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;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;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;;ACnEF;;AAEG;;;;"}
@@ -17,17 +17,18 @@ import { registerFeatureClaim, unregisterFeatureClaim } from '@toolbox-web/grid-
17
17
  */
18
18
  class GridStickyRowsDirective {
19
19
  elementRef = inject((ElementRef));
20
- stickyRows = input(...(ngDevMode ? [undefined, { debugName: "stickyRows" }] : /* istanbul ignore next */ []));
20
+ stickyRows = input(/* @ts-ignore */
21
+ ...(ngDevMode ? [undefined, { debugName: "stickyRows" }] : /* istanbul ignore next */ []));
21
22
  constructor() {
22
23
  registerFeatureClaim(this.elementRef.nativeElement, 'stickyRows', () => this.stickyRows());
23
24
  }
24
25
  ngOnDestroy() {
25
26
  unregisterFeatureClaim(this.elementRef.nativeElement, 'stickyRows');
26
27
  }
27
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: GridStickyRowsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
28
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", type: GridStickyRowsDirective, isStandalone: true, selector: "tbw-grid[stickyRows]", inputs: { stickyRows: { classPropertyName: "stickyRows", publicName: "stickyRows", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridStickyRowsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
29
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridStickyRowsDirective, isStandalone: true, selector: "tbw-grid[stickyRows]", inputs: { stickyRows: { classPropertyName: "stickyRows", publicName: "stickyRows", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
29
30
  }
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: GridStickyRowsDirective, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridStickyRowsDirective, decorators: [{
31
32
  type: Directive,
32
33
  args: [{
33
34
  selector: 'tbw-grid[stickyRows]',
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-sticky-rows.mjs","sources":["../../../../libs/grid-angular/features/sticky-rows/src/grid-sticky-rows.directive.ts","../../../../libs/grid-angular/features/sticky-rows/src/index.ts","../../../../libs/grid-angular/features/sticky-rows/src/toolbox-web-grid-angular-features-sticky-rows.ts"],"sourcesContent":["/**\n * `GridStickyRowsDirective` — owns `[stickyRows]` on `<tbw-grid>`.\n * No event outputs. See `GridFilteringDirective` for the full rationale.\n *\n * @category Directive\n */\nimport { Directive, ElementRef, inject, input, OnDestroy } from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { registerFeatureClaim, unregisterFeatureClaim } from '@toolbox-web/grid-angular';\nimport type { StickyRowsConfig } from '@toolbox-web/grid/plugins/sticky-rows';\n\n/**\n * Owns the binding `[stickyRows]` on `<tbw-grid>` for the matching feature plugin.\n * See `GridFilteringDirective` for the full rationale.\n *\n * @category Directive\n */\n@Directive({\n selector: 'tbw-grid[stickyRows]',\n standalone: true,\n})\nexport class GridStickyRowsDirective implements OnDestroy {\n private readonly elementRef = inject(ElementRef<DataGridElement>);\n\n readonly stickyRows = input<StickyRowsConfig>();\n\n constructor() {\n registerFeatureClaim(this.elementRef.nativeElement, 'stickyRows', () => this.stickyRows());\n }\n\n ngOnDestroy(): void {\n unregisterFeatureClaim(this.elementRef.nativeElement, 'stickyRows');\n }\n}\n","/**\n * Sticky rows feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `stickyRows` input on the Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/sticky-rows';\n *\n * <tbw-grid [stickyRows]=\"{ isSticky: 'isSection' }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/sticky-rows';\nexport { GridStickyRowsDirective } from './grid-sticky-rows.directive';\nexport type { _Augmentation as _StickyRowsAugmentation } from '@toolbox-web/grid/features/sticky-rows';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAMH;;;;;AAKG;MAKU,uBAAuB,CAAA;AACjB,IAAA,UAAU,GAAG,MAAM,EAAC,UAA2B,EAAC;IAExD,UAAU,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAoB;AAE/C,IAAA,WAAA,GAAA;AACE,QAAA,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;IAC5F;IAEA,WAAW,GAAA;QACT,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,YAAY,CAAC;IACrE;uGAXW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACpBD;;;;;;;;;;;;;AAaG;;ACbH;;AAEG;;;;"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-sticky-rows.mjs","sources":["../../../../libs/grid-angular/features/sticky-rows/src/grid-sticky-rows.directive.ts","../../../../libs/grid-angular/features/sticky-rows/src/index.ts","../../../../libs/grid-angular/features/sticky-rows/src/toolbox-web-grid-angular-features-sticky-rows.ts"],"sourcesContent":["/**\n * `GridStickyRowsDirective` — owns `[stickyRows]` on `<tbw-grid>`.\n * No event outputs. See `GridFilteringDirective` for the full rationale.\n *\n * @category Directive\n */\nimport { Directive, ElementRef, inject, input, OnDestroy } from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { registerFeatureClaim, unregisterFeatureClaim } from '@toolbox-web/grid-angular';\nimport type { StickyRowsConfig } from '@toolbox-web/grid/plugins/sticky-rows';\n\n/**\n * Owns the binding `[stickyRows]` on `<tbw-grid>` for the matching feature plugin.\n * See `GridFilteringDirective` for the full rationale.\n *\n * @category Directive\n */\n@Directive({\n selector: 'tbw-grid[stickyRows]',\n standalone: true,\n})\nexport class GridStickyRowsDirective implements OnDestroy {\n private readonly elementRef = inject(ElementRef<DataGridElement>);\n\n readonly stickyRows = input<StickyRowsConfig>();\n\n constructor() {\n registerFeatureClaim(this.elementRef.nativeElement, 'stickyRows', () => this.stickyRows());\n }\n\n ngOnDestroy(): void {\n unregisterFeatureClaim(this.elementRef.nativeElement, 'stickyRows');\n }\n}\n","/**\n * Sticky rows feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `stickyRows` input on the Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/sticky-rows';\n *\n * <tbw-grid [stickyRows]=\"{ isSticky: 'isSection' }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/sticky-rows';\nexport { GridStickyRowsDirective } from './grid-sticky-rows.directive';\nexport type { _Augmentation as _StickyRowsAugmentation } from '@toolbox-web/grid/features/sticky-rows';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAMH;;;;;AAKG;MAKU,uBAAuB,CAAA;AACjB,IAAA,UAAU,GAAG,MAAM,EAAC,UAA2B,EAAC;AAExD,IAAA,UAAU,GAAG,KAAK;8FAAoB;AAE/C,IAAA,WAAA,GAAA;AACE,QAAA,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;IAC5F;IAEA,WAAW,GAAA;QACT,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,YAAY,CAAC;IACrE;uGAXW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACpBD;;;;;;;;;;;;;AAaG;;ACbH;;AAEG;;;;"}
@@ -16,17 +16,18 @@ import { registerFeatureClaim, unregisterFeatureClaim } from '@toolbox-web/grid-
16
16
  */
17
17
  class GridTooltipDirective {
18
18
  elementRef = inject((ElementRef));
19
- tooltip = input(...(ngDevMode ? [undefined, { debugName: "tooltip" }] : /* istanbul ignore next */ []));
19
+ tooltip = input(/* @ts-ignore */
20
+ ...(ngDevMode ? [undefined, { debugName: "tooltip" }] : /* istanbul ignore next */ []));
20
21
  constructor() {
21
22
  registerFeatureClaim(this.elementRef.nativeElement, 'tooltip', () => this.tooltip());
22
23
  }
23
24
  ngOnDestroy() {
24
25
  unregisterFeatureClaim(this.elementRef.nativeElement, 'tooltip');
25
26
  }
26
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: GridTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
27
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", type: GridTooltipDirective, isStandalone: true, selector: "tbw-grid[tooltip]", inputs: { tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
27
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
28
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridTooltipDirective, isStandalone: true, selector: "tbw-grid[tooltip]", inputs: { tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
28
29
  }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: GridTooltipDirective, decorators: [{
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridTooltipDirective, decorators: [{
30
31
  type: Directive,
31
32
  args: [{
32
33
  selector: 'tbw-grid[tooltip]',
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-tooltip.mjs","sources":["../../../../libs/grid-angular/features/tooltip/src/grid-tooltip.directive.ts","../../../../libs/grid-angular/features/tooltip/src/index.ts","../../../../libs/grid-angular/features/tooltip/src/toolbox-web-grid-angular-features-tooltip.ts"],"sourcesContent":["/**\n * `GridTooltipDirective` — owns `[tooltip]` on `<tbw-grid>`. No event\n * outputs. See `GridFilteringDirective` for the full rationale.\n *\n * @category Directive\n */\nimport { Directive, ElementRef, inject, input, OnDestroy } from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { registerFeatureClaim, unregisterFeatureClaim } from '@toolbox-web/grid-angular';\nimport type { TooltipConfig } from '@toolbox-web/grid/plugins/tooltip';\n\n/**\n * Owns the binding(s) `[tooltip]` 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[tooltip]',\n standalone: true,\n})\nexport class GridTooltipDirective implements OnDestroy {\n private readonly elementRef = inject(ElementRef<DataGridElement>);\n\n readonly tooltip = input<boolean | TooltipConfig>();\n\n constructor() {\n registerFeatureClaim(this.elementRef.nativeElement, 'tooltip', () => this.tooltip());\n }\n\n ngOnDestroy(): void {\n unregisterFeatureClaim(this.elementRef.nativeElement, 'tooltip');\n }\n}\n","/**\n * Tooltip feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `tooltip` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/tooltip';\n *\n * <tbw-grid [tooltip]=\"true\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/tooltip';\nexport { GridTooltipDirective } from './grid-tooltip.directive';\nexport type { _Augmentation as _TooltipAugmentation } from '@toolbox-web/grid/features/tooltip';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAMH;;;;AAIG;MAKU,oBAAoB,CAAA;AACd,IAAA,UAAU,GAAG,MAAM,EAAC,UAA2B,EAAC;IAExD,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA2B;AAEnD,IAAA,WAAA,GAAA;AACE,QAAA,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IACtF;IAEA,WAAW,GAAA;QACT,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC;IAClE;uGAXW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACnBD;;;;;;;;;;;;;AAaG;;ACbH;;AAEG;;;;"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-tooltip.mjs","sources":["../../../../libs/grid-angular/features/tooltip/src/grid-tooltip.directive.ts","../../../../libs/grid-angular/features/tooltip/src/index.ts","../../../../libs/grid-angular/features/tooltip/src/toolbox-web-grid-angular-features-tooltip.ts"],"sourcesContent":["/**\n * `GridTooltipDirective` — owns `[tooltip]` on `<tbw-grid>`. No event\n * outputs. See `GridFilteringDirective` for the full rationale.\n *\n * @category Directive\n */\nimport { Directive, ElementRef, inject, input, OnDestroy } from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { registerFeatureClaim, unregisterFeatureClaim } from '@toolbox-web/grid-angular';\nimport type { TooltipConfig } from '@toolbox-web/grid/plugins/tooltip';\n\n/**\n * Owns the binding(s) `[tooltip]` 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[tooltip]',\n standalone: true,\n})\nexport class GridTooltipDirective implements OnDestroy {\n private readonly elementRef = inject(ElementRef<DataGridElement>);\n\n readonly tooltip = input<boolean | TooltipConfig>();\n\n constructor() {\n registerFeatureClaim(this.elementRef.nativeElement, 'tooltip', () => this.tooltip());\n }\n\n ngOnDestroy(): void {\n unregisterFeatureClaim(this.elementRef.nativeElement, 'tooltip');\n }\n}\n","/**\n * Tooltip feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `tooltip` input on Grid directive.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/tooltip';\n *\n * <tbw-grid [tooltip]=\"true\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport '@toolbox-web/grid/features/tooltip';\nexport { GridTooltipDirective } from './grid-tooltip.directive';\nexport type { _Augmentation as _TooltipAugmentation } from '@toolbox-web/grid/features/tooltip';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAMH;;;;AAIG;MAKU,oBAAoB,CAAA;AACd,IAAA,UAAU,GAAG,MAAM,EAAC,UAA2B,EAAC;AAExD,IAAA,OAAO,GAAG,KAAK;2FAA2B;AAEnD,IAAA,WAAA,GAAA;AACE,QAAA,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IACtF;IAEA,WAAW,GAAA;QACT,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC;IAClE;uGAXW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACnBD;;;;;;;;;;;;;AAaG;;ACbH;;AAEG;;;;"}
@@ -16,7 +16,8 @@ import { registerFeatureClaim, claimEvent, unregisterFeatureClaim, unclaimEvent
16
16
  */
17
17
  class GridTreeDirective {
18
18
  elementRef = inject((ElementRef));
19
- tree = input(...(ngDevMode ? [undefined, { debugName: "tree" }] : /* istanbul ignore next */ []));
19
+ tree = input(/* @ts-ignore */
20
+ ...(ngDevMode ? [undefined, { debugName: "tree" }] : /* istanbul ignore next */ []));
20
21
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
22
  treeExpand = output();
22
23
  listener;
@@ -40,10 +41,10 @@ class GridTreeDirective {
40
41
  unregisterFeatureClaim(grid, 'tree');
41
42
  unclaimEvent(grid, 'tree-expand');
42
43
  }
43
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: GridTreeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
44
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", 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 });
44
+ 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 });
45
46
  }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: GridTreeDirective, decorators: [{
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridTreeDirective, decorators: [{
47
48
  type: Directive,
48
49
  args: [{
49
50
  selector: 'tbw-grid[tree], tbw-grid[treeExpand]',
@@ -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 `(treeExpand)` 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 { TreeConfig, TreeExpandDetail } from '@toolbox-web/grid/plugins/tree';\n\n/**\n * Owns the binding(s) `[tree], [treeExpand]` 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[tree], tbw-grid[treeExpand]',\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 private listener?: (e: Event) => void;\n\n constructor() {\n const grid = this.elementRef.nativeElement;\n registerFeatureClaim(grid, 'tree', () => this.tree());\n claimEvent(grid, 'tree-expand');\n }\n\n ngOnInit(): void {\n const grid = this.elementRef.nativeElement;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.listener = (e: Event): void => this.treeExpand.emit((e as CustomEvent<TreeExpandDetail<any>>).detail);\n grid.addEventListener('tree-expand', this.listener);\n }\n\n ngOnDestroy(): void {\n const grid = this.elementRef.nativeElement;\n if (this.listener) {\n grid.removeEventListener('tree-expand', this.listener);\n this.listener = undefined;\n }\n unregisterFeatureClaim(grid, 'tree');\n unclaimEvent(grid, 'tree-expand');\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;AAMH;;;;AAIG;MAKU,iBAAiB,CAAA;AACX,IAAA,UAAU,GAAG,MAAM,EAAC,UAA2B,EAAC;IAExD,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAwB;;IAEpC,UAAU,GAAG,MAAM,EAAyB;AAE7C,IAAA,QAAQ;AAEhB,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,UAAU,CAAC,IAAI,EAAE,aAAa,CAAC;IACjC;IAEA,QAAQ,GAAA;AACN,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;;AAE1C,QAAA,IAAI,CAAC,QAAQ,GAAG,C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../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 `(treeExpand)` 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 { TreeConfig, TreeExpandDetail } from '@toolbox-web/grid/plugins/tree';\n\n/**\n * Owns the binding(s) `[tree], [treeExpand]` 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[tree], tbw-grid[treeExpand]',\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 private listener?: (e: Event) => void;\n\n constructor() {\n const grid = this.elementRef.nativeElement;\n registerFeatureClaim(grid, 'tree', () => this.tree());\n claimEvent(grid, 'tree-expand');\n }\n\n ngOnInit(): void {\n const grid = this.elementRef.nativeElement;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.listener = (e: Event): void => this.treeExpand.emit((e as CustomEvent<TreeExpandDetail<any>>).detail);\n grid.addEventListener('tree-expand', this.listener);\n }\n\n ngOnDestroy(): void {\n const grid = this.elementRef.nativeElement;\n if (this.listener) {\n grid.removeEventListener('tree-expand', this.listener);\n this.listener = undefined;\n }\n unregisterFeatureClaim(grid, 'tree');\n unclaimEvent(grid, 'tree-expand');\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;AAMH;;;;AAIG;MAKU,iBAAiB,CAAA;AACX,IAAA,UAAU,GAAG,MAAM,EAAC,UAA2B,EAAC;AAExD,IAAA,IAAI,GAAG,KAAK;wFAAwB;;IAEpC,UAAU,GAAG,MAAM,EAAyB;AAE7C,IAAA,QAAQ;AAEhB,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,UAAU,CAAC,IAAI,EAAE,aAAa,CAAC;IACjC;IAEA,QAAQ,GAAA;AACN,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;;AAE1C,QAAA,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAQ,KAAW,IAAI,CAAC,UAAU,CAAC,IAAI,CAAE,CAAwC,CAAC,MAAM,CAAC;QAC1G,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC;IACrD;IAEA,WAAW,GAAA;AACT,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AAC1C,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC;AACtD,YAAA,IAAI,CAAC,QAAQ,GAAG,SAAS;QAC3B;AACA,QAAA,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAC;AACpC,QAAA,YAAY,CAAC,IAAI,EAAE,aAAa,CAAC;IACnC;uGA9BW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sCAAsC;AAChD,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACnBD;;;;;;;;;;;;;AAaG;;ACbH;;AAEG;;;;"}
@@ -16,7 +16,8 @@ import { registerFeatureClaim, claimEvent, unregisterFeatureClaim, unclaimEvent
16
16
  */
17
17
  class GridUndoRedoDirective {
18
18
  elementRef = inject((ElementRef));
19
- undoRedo = input(...(ngDevMode ? [undefined, { debugName: "undoRedo" }] : /* istanbul ignore next */ []));
19
+ undoRedo = input(/* @ts-ignore */
20
+ ...(ngDevMode ? [undefined, { debugName: "undoRedo" }] : /* istanbul ignore next */ []));
20
21
  undo = output();
21
22
  redo = output();
22
23
  listeners = new Map();
@@ -45,10 +46,10 @@ class GridUndoRedoDirective {
45
46
  unclaimEvent(grid, 'undo');
46
47
  unclaimEvent(grid, 'redo');
47
48
  }
48
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: GridUndoRedoDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
49
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", type: GridUndoRedoDirective, isStandalone: true, selector: "tbw-grid[undoRedo], tbw-grid[undo], tbw-grid[redo]", inputs: { undoRedo: { classPropertyName: "undoRedo", publicName: "undoRedo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { undo: "undo", redo: "redo" }, ngImport: i0 });
49
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridUndoRedoDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
50
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridUndoRedoDirective, isStandalone: true, selector: "tbw-grid[undoRedo], tbw-grid[undo], tbw-grid[redo]", inputs: { undoRedo: { classPropertyName: "undoRedo", publicName: "undoRedo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { undo: "undo", redo: "redo" }, ngImport: i0 });
50
51
  }
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: GridUndoRedoDirective, decorators: [{
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridUndoRedoDirective, decorators: [{
52
53
  type: Directive,
53
54
  args: [{
54
55
  selector: 'tbw-grid[undoRedo], tbw-grid[undo], tbw-grid[redo]',
@@ -121,10 +122,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
121
122
  function injectGridUndoRedo(selector = 'tbw-grid') {
122
123
  const elementRef = inject(ElementRef);
123
124
  const destroyRef = inject(DestroyRef);
124
- const isReady = signal(false, ...(ngDevMode ? [{ debugName: "isReady" }] : /* istanbul ignore next */ []));
125
+ const isReady = signal(false, /* @ts-ignore */
126
+ ...(ngDevMode ? [{ debugName: "isReady" }] : /* istanbul ignore next */ []));
125
127
  // Reactive undo/redo availability signals
126
- const canUndoSignal = signal(false, ...(ngDevMode ? [{ debugName: "canUndoSignal" }] : /* istanbul ignore next */ []));
127
- const canRedoSignal = signal(false, ...(ngDevMode ? [{ debugName: "canRedoSignal" }] : /* istanbul ignore next */ []));
128
+ const canUndoSignal = signal(false, /* @ts-ignore */
129
+ ...(ngDevMode ? [{ debugName: "canUndoSignal" }] : /* istanbul ignore next */ []));
130
+ const canRedoSignal = signal(false, /* @ts-ignore */
131
+ ...(ngDevMode ? [{ debugName: "canRedoSignal" }] : /* istanbul ignore next */ []));
128
132
  let cachedGrid = null;
129
133
  let readyPromiseStarted = false;
130
134
  let listenerAttached = false;
@@ -1 +1 @@
1
- {"version":3,"file":"toolbox-web-grid-angular-features-undo-redo.mjs","sources":["../../../../libs/grid-angular/features/undo-redo/src/grid-undo-redo.directive.ts","../../../../libs/grid-angular/features/undo-redo/src/index.ts","../../../../libs/grid-angular/features/undo-redo/src/toolbox-web-grid-angular-features-undo-redo.ts"],"sourcesContent":["/**\n * `GridUndoRedoDirective` — owns `[undoRedo]`, `(undo)` and `(redo)` on\n * `<tbw-grid>`. 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 { UndoRedoConfig, UndoRedoDetail } from '@toolbox-web/grid/plugins/undo-redo';\n\n/**\n * Owns the binding(s) `[undoRedo], [undo], [redo]` 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[undoRedo], tbw-grid[undo], tbw-grid[redo]',\n standalone: true,\n})\nexport class GridUndoRedoDirective implements OnInit, OnDestroy {\n private readonly elementRef = inject(ElementRef<DataGridElement>);\n\n readonly undoRedo = input<boolean | UndoRedoConfig>();\n readonly undo = output<UndoRedoDetail>();\n readonly redo = output<UndoRedoDetail>();\n\n private readonly listeners = new Map<string, (e: Event) => void>();\n\n constructor() {\n const grid = this.elementRef.nativeElement;\n registerFeatureClaim(grid, 'undoRedo', () => this.undoRedo());\n claimEvent(grid, 'undo');\n claimEvent(grid, 'redo');\n }\n\n ngOnInit(): void {\n const grid = this.elementRef.nativeElement;\n const wire = (name: string, out: { emit: (v: UndoRedoDetail) => void }): void => {\n const l = (e: Event): void => out.emit((e as CustomEvent<UndoRedoDetail>).detail);\n grid.addEventListener(name, l);\n this.listeners.set(name, l);\n };\n wire('undo', this.undo);\n wire('redo', this.redo);\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, 'undoRedo');\n unclaimEvent(grid, 'undo');\n unclaimEvent(grid, 'redo');\n }\n}\n","/**\n * Undo/Redo feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `undoRedo` input on Grid directive.\n * Also exports `injectGridUndoRedo()` for programmatic undo/redo control.\n * Requires editing feature to be enabled.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/editing';\n * import '@toolbox-web/grid-angular/features/undo-redo';\n *\n * <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />\n * ```\n *\n * @example Using injectGridUndoRedo\n * ```typescript\n * import { injectGridUndoRedo } from '@toolbox-web/grid-angular/features/undo-redo';\n *\n * @Component({...})\n * export class MyComponent {\n * private undoRedo = injectGridUndoRedo();\n *\n * undo() { this.undoRedo.undo(); }\n * redo() { this.undoRedo.redo(); }\n * }\n * ```\n *\n * @packageDocumentation\n */\n\nimport { afterNextRender, DestroyRef, ElementRef, inject, signal, type Signal } from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport '@toolbox-web/grid/features/undo-redo';\nimport { UndoRedoPlugin, type UndoRedoAction } from '@toolbox-web/grid/plugins/undo-redo';\nexport { GridUndoRedoDirective } from './grid-undo-redo.directive';\nexport type { _Augmentation as _UndoRedoAugmentation } from '@toolbox-web/grid/features/undo-redo';\n\n/**\n * Undo/Redo methods returned from injectGridUndoRedo.\n *\n * Uses lazy discovery - the grid is found on first method call, not during initialization.\n */\nexport interface UndoRedoMethods {\n /**\n * Undo the last edit action.\n * @returns The undone action (or compound action), or null if nothing to undo\n */\n undo: () => UndoRedoAction | null;\n\n /**\n * Redo the last undone action.\n * @returns The redone action (or compound action), or null if nothing to redo\n */\n redo: () => UndoRedoAction | null;\n\n /**\n * Reactive signal indicating whether undo is available.\n * Updates automatically when edits are made, undone, redone, or history is cleared.\n *\n * @example\n * ```typescript\n * // In template:\n * // <button [disabled]=\"!undoRedo.canUndo()\">Undo</button>\n *\n * // In computed:\n * readonly undoAvailable = computed(() => this.undoRedo.canUndo());\n * ```\n */\n canUndo: Signal<boolean>;\n\n /**\n * Reactive signal indicating whether redo is available.\n * Updates automatically when edits are made, undone, redone, or history is cleared.\n *\n * @example\n * ```typescript\n * // In template:\n * // <button [disabled]=\"!undoRedo.canRedo()\">Redo</button>\n *\n * // In computed:\n * readonly redoAvailable = computed(() => this.undoRedo.canRedo());\n * ```\n */\n canRedo: Signal<boolean>;\n\n /**\n * Clear all undo/redo history.\n */\n clearHistory: () => void;\n\n /**\n * Get a copy of the current undo stack.\n */\n getUndoStack: () => UndoRedoAction[];\n\n /**\n * Get a copy of the current redo stack.\n */\n getRedoStack: () => UndoRedoAction[];\n\n /**\n * Manually record an edit action.\n * If a transaction is active, the action is buffered; otherwise it's pushed to the undo stack.\n */\n recordEdit: (rowIndex: number, field: string, oldValue: unknown, newValue: unknown) => void;\n\n /**\n * Begin a transaction. All edits recorded until `endTransaction()` are grouped\n * into a single compound action for undo/redo.\n * @throws If a transaction is already active\n */\n beginTransaction: () => void;\n\n /**\n * End the active transaction and push the compound action to the undo stack.\n * If only one edit was recorded, it's pushed as a plain EditAction.\n * If no edits were recorded, the transaction is discarded.\n * @throws If no transaction is active\n */\n endTransaction: () => void;\n\n /**\n * Signal indicating if grid is ready.\n */\n isReady: Signal<boolean>;\n}\n\n/**\n * Angular inject function for programmatic undo/redo control.\n *\n * Uses **lazy grid discovery** - the grid element is found when methods are called,\n * not during initialization.\n *\n * @example\n * ```typescript\n * import { Component } from '@angular/core';\n * import { Grid } from '@toolbox-web/grid-angular';\n * import '@toolbox-web/grid-angular/features/editing';\n * import '@toolbox-web/grid-angular/features/undo-redo';\n * import { injectGridUndoRedo } from '@toolbox-web/grid-angular/features/undo-redo';\n *\n * @Component({\n * selector: 'app-my-grid',\n * imports: [Grid],\n * template: `\n * <button (click)=\"undoRedo.undo()\" [disabled]=\"!undoRedo.canUndo()\">Undo</button>\n * <button (click)=\"undoRedo.redo()\" [disabled]=\"!undoRedo.canRedo()\">Redo</button>\n * <tbw-grid [rows]=\"rows\" [editing]=\"'dblclick'\" [undoRedo]=\"true\"></tbw-grid>\n * `\n * })\n * export class MyGridComponent {\n * undoRedo = injectGridUndoRedo();\n * }\n * ```\n *\n * @param selector - Optional CSS selector to target a specific grid element.\n * Defaults to `'tbw-grid'` (first grid in the component). Use when the\n * component contains multiple grids, e.g. `'tbw-grid.primary'` or `'#my-grid'`.\n */\nexport function injectGridUndoRedo(selector = 'tbw-grid'): UndoRedoMethods {\n const elementRef = inject(ElementRef);\n const destroyRef = inject(DestroyRef);\n const isReady = signal(false);\n\n // Reactive undo/redo availability signals\n const canUndoSignal = signal(false);\n const canRedoSignal = signal(false);\n\n let cachedGrid: DataGridElement | null = null;\n let readyPromiseStarted = false;\n let listenerAttached = false;\n\n /**\n * Sync canUndo/canRedo signals with the current plugin state.\n */\n const syncSignals = (): void => {\n const plugin = getPlugin();\n if (plugin) {\n canUndoSignal.set(plugin.canUndo());\n canRedoSignal.set(plugin.canRedo());\n }\n };\n\n /**\n * Attach event listeners to the grid for undo/redo state changes.\n * Listens for `undo`, `redo`, and `cell-commit` DOM events.\n */\n const attachListeners = (grid: DataGridElement): void => {\n if (listenerAttached) return;\n listenerAttached = true;\n\n const unsubs = [grid.on('undo', syncSignals), grid.on('redo', syncSignals), grid.on('cell-commit', syncSignals)];\n\n destroyRef.onDestroy(() => {\n unsubs.forEach((fn) => fn());\n });\n };\n\n const getGrid = (): DataGridElement | null => {\n if (cachedGrid) return cachedGrid;\n\n const grid = elementRef.nativeElement.querySelector(selector) as DataGridElement | null;\n if (grid) {\n cachedGrid = grid;\n attachListeners(grid);\n if (!readyPromiseStarted) {\n readyPromiseStarted = true;\n grid.ready?.().then(() => {\n if (grid.getPluginByName('undoRedo')) {\n isReady.set(true);\n } else {\n setTimeout(() => isReady.set(true), 0);\n }\n });\n }\n }\n return grid;\n };\n\n const getPlugin = (): UndoRedoPlugin | undefined => {\n return getGrid()?.getPluginByName('undoRedo') as UndoRedoPlugin | undefined;\n };\n\n // Eagerly discover the grid after the first render so event listeners\n // are attached and isReady updates without requiring a programmatic\n // method call. Falls back to MutationObserver for lazy-rendered content.\n afterNextRender(() => {\n const grid = getGrid();\n if (grid) {\n grid.ready?.().then(() => {\n if (grid.getPluginByName('undoRedo')) {\n syncSignals();\n } else {\n setTimeout(syncSignals, 0);\n }\n });\n return;\n }\n\n const host = elementRef.nativeElement as HTMLElement;\n const observer = new MutationObserver(() => {\n const discovered = getGrid();\n if (discovered) {\n observer.disconnect();\n discovered.ready?.().then(() => {\n if (discovered.getPluginByName('undoRedo')) {\n syncSignals();\n } else {\n setTimeout(syncSignals, 0);\n }\n });\n }\n });\n observer.observe(host, { childList: true, subtree: true });\n\n destroyRef.onDestroy(() => observer.disconnect());\n });\n\n return {\n isReady: isReady.asReadonly(),\n canUndo: canUndoSignal.asReadonly(),\n canRedo: canRedoSignal.asReadonly(),\n\n undo: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />`,\n );\n return null;\n }\n const result = plugin.undo();\n syncSignals();\n return result;\n },\n\n redo: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />`,\n );\n return null;\n }\n const result = plugin.redo();\n syncSignals();\n return result;\n },\n\n clearHistory: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />`,\n );\n return;\n }\n plugin.clearHistory();\n syncSignals();\n },\n\n getUndoStack: () => getPlugin()?.getUndoStack() ?? [],\n\n getRedoStack: () => getPlugin()?.getRedoStack() ?? [],\n\n recordEdit: (rowIndex: number, field: string, oldValue: unknown, newValue: unknown) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />`,\n );\n return;\n }\n plugin.recordEdit(rowIndex, field, oldValue, newValue);\n syncSignals();\n },\n\n beginTransaction: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />`,\n );\n return;\n }\n plugin.beginTransaction();\n },\n\n endTransaction: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />`,\n );\n return;\n }\n plug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C;AACrC,oBAAA,CAAA,yDAAA,CAA2D,CAC9D;gBACD;YACF;YACA,MAAM,CAAC,cAAc,EAAE;AACvB,YAAA,WAAW,EAAE;QACf,CAAC;KACF;AACH;;ACjWA;;AAEG;;;;"}
1
+ {"version":3,"file":"toolbox-web-grid-angular-features-undo-redo.mjs","sources":["../../../../libs/grid-angular/features/undo-redo/src/grid-undo-redo.directive.ts","../../../../libs/grid-angular/features/undo-redo/src/index.ts","../../../../libs/grid-angular/features/undo-redo/src/toolbox-web-grid-angular-features-undo-redo.ts"],"sourcesContent":["/**\n * `GridUndoRedoDirective` — owns `[undoRedo]`, `(undo)` and `(redo)` on\n * `<tbw-grid>`. 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 { UndoRedoConfig, UndoRedoDetail } from '@toolbox-web/grid/plugins/undo-redo';\n\n/**\n * Owns the binding(s) `[undoRedo], [undo], [redo]` 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[undoRedo], tbw-grid[undo], tbw-grid[redo]',\n standalone: true,\n})\nexport class GridUndoRedoDirective implements OnInit, OnDestroy {\n private readonly elementRef = inject(ElementRef<DataGridElement>);\n\n readonly undoRedo = input<boolean | UndoRedoConfig>();\n readonly undo = output<UndoRedoDetail>();\n readonly redo = output<UndoRedoDetail>();\n\n private readonly listeners = new Map<string, (e: Event) => void>();\n\n constructor() {\n const grid = this.elementRef.nativeElement;\n registerFeatureClaim(grid, 'undoRedo', () => this.undoRedo());\n claimEvent(grid, 'undo');\n claimEvent(grid, 'redo');\n }\n\n ngOnInit(): void {\n const grid = this.elementRef.nativeElement;\n const wire = (name: string, out: { emit: (v: UndoRedoDetail) => void }): void => {\n const l = (e: Event): void => out.emit((e as CustomEvent<UndoRedoDetail>).detail);\n grid.addEventListener(name, l);\n this.listeners.set(name, l);\n };\n wire('undo', this.undo);\n wire('redo', this.redo);\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, 'undoRedo');\n unclaimEvent(grid, 'undo');\n unclaimEvent(grid, 'redo');\n }\n}\n","/**\n * Undo/Redo feature for @toolbox-web/grid-angular\n *\n * Import this module to enable the `undoRedo` input on Grid directive.\n * Also exports `injectGridUndoRedo()` for programmatic undo/redo control.\n * Requires editing feature to be enabled.\n *\n * @example\n * ```typescript\n * import '@toolbox-web/grid-angular/features/editing';\n * import '@toolbox-web/grid-angular/features/undo-redo';\n *\n * <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />\n * ```\n *\n * @example Using injectGridUndoRedo\n * ```typescript\n * import { injectGridUndoRedo } from '@toolbox-web/grid-angular/features/undo-redo';\n *\n * @Component({...})\n * export class MyComponent {\n * private undoRedo = injectGridUndoRedo();\n *\n * undo() { this.undoRedo.undo(); }\n * redo() { this.undoRedo.redo(); }\n * }\n * ```\n *\n * @packageDocumentation\n */\n\nimport { afterNextRender, DestroyRef, ElementRef, inject, signal, type Signal } from '@angular/core';\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport '@toolbox-web/grid/features/undo-redo';\nimport { UndoRedoPlugin, type UndoRedoAction } from '@toolbox-web/grid/plugins/undo-redo';\nexport { GridUndoRedoDirective } from './grid-undo-redo.directive';\nexport type { _Augmentation as _UndoRedoAugmentation } from '@toolbox-web/grid/features/undo-redo';\n\n/**\n * Undo/Redo methods returned from injectGridUndoRedo.\n *\n * Uses lazy discovery - the grid is found on first method call, not during initialization.\n */\nexport interface UndoRedoMethods {\n /**\n * Undo the last edit action.\n * @returns The undone action (or compound action), or null if nothing to undo\n */\n undo: () => UndoRedoAction | null;\n\n /**\n * Redo the last undone action.\n * @returns The redone action (or compound action), or null if nothing to redo\n */\n redo: () => UndoRedoAction | null;\n\n /**\n * Reactive signal indicating whether undo is available.\n * Updates automatically when edits are made, undone, redone, or history is cleared.\n *\n * @example\n * ```typescript\n * // In template:\n * // <button [disabled]=\"!undoRedo.canUndo()\">Undo</button>\n *\n * // In computed:\n * readonly undoAvailable = computed(() => this.undoRedo.canUndo());\n * ```\n */\n canUndo: Signal<boolean>;\n\n /**\n * Reactive signal indicating whether redo is available.\n * Updates automatically when edits are made, undone, redone, or history is cleared.\n *\n * @example\n * ```typescript\n * // In template:\n * // <button [disabled]=\"!undoRedo.canRedo()\">Redo</button>\n *\n * // In computed:\n * readonly redoAvailable = computed(() => this.undoRedo.canRedo());\n * ```\n */\n canRedo: Signal<boolean>;\n\n /**\n * Clear all undo/redo history.\n */\n clearHistory: () => void;\n\n /**\n * Get a copy of the current undo stack.\n */\n getUndoStack: () => UndoRedoAction[];\n\n /**\n * Get a copy of the current redo stack.\n */\n getRedoStack: () => UndoRedoAction[];\n\n /**\n * Manually record an edit action.\n * If a transaction is active, the action is buffered; otherwise it's pushed to the undo stack.\n */\n recordEdit: (rowIndex: number, field: string, oldValue: unknown, newValue: unknown) => void;\n\n /**\n * Begin a transaction. All edits recorded until `endTransaction()` are grouped\n * into a single compound action for undo/redo.\n * @throws If a transaction is already active\n */\n beginTransaction: () => void;\n\n /**\n * End the active transaction and push the compound action to the undo stack.\n * If only one edit was recorded, it's pushed as a plain EditAction.\n * If no edits were recorded, the transaction is discarded.\n * @throws If no transaction is active\n */\n endTransaction: () => void;\n\n /**\n * Signal indicating if grid is ready.\n */\n isReady: Signal<boolean>;\n}\n\n/**\n * Angular inject function for programmatic undo/redo control.\n *\n * Uses **lazy grid discovery** - the grid element is found when methods are called,\n * not during initialization.\n *\n * @example\n * ```typescript\n * import { Component } from '@angular/core';\n * import { Grid } from '@toolbox-web/grid-angular';\n * import '@toolbox-web/grid-angular/features/editing';\n * import '@toolbox-web/grid-angular/features/undo-redo';\n * import { injectGridUndoRedo } from '@toolbox-web/grid-angular/features/undo-redo';\n *\n * @Component({\n * selector: 'app-my-grid',\n * imports: [Grid],\n * template: `\n * <button (click)=\"undoRedo.undo()\" [disabled]=\"!undoRedo.canUndo()\">Undo</button>\n * <button (click)=\"undoRedo.redo()\" [disabled]=\"!undoRedo.canRedo()\">Redo</button>\n * <tbw-grid [rows]=\"rows\" [editing]=\"'dblclick'\" [undoRedo]=\"true\"></tbw-grid>\n * `\n * })\n * export class MyGridComponent {\n * undoRedo = injectGridUndoRedo();\n * }\n * ```\n *\n * @param selector - Optional CSS selector to target a specific grid element.\n * Defaults to `'tbw-grid'` (first grid in the component). Use when the\n * component contains multiple grids, e.g. `'tbw-grid.primary'` or `'#my-grid'`.\n */\nexport function injectGridUndoRedo(selector = 'tbw-grid'): UndoRedoMethods {\n const elementRef = inject(ElementRef);\n const destroyRef = inject(DestroyRef);\n const isReady = signal(false);\n\n // Reactive undo/redo availability signals\n const canUndoSignal = signal(false);\n const canRedoSignal = signal(false);\n\n let cachedGrid: DataGridElement | null = null;\n let readyPromiseStarted = false;\n let listenerAttached = false;\n\n /**\n * Sync canUndo/canRedo signals with the current plugin state.\n */\n const syncSignals = (): void => {\n const plugin = getPlugin();\n if (plugin) {\n canUndoSignal.set(plugin.canUndo());\n canRedoSignal.set(plugin.canRedo());\n }\n };\n\n /**\n * Attach event listeners to the grid for undo/redo state changes.\n * Listens for `undo`, `redo`, and `cell-commit` DOM events.\n */\n const attachListeners = (grid: DataGridElement): void => {\n if (listenerAttached) return;\n listenerAttached = true;\n\n const unsubs = [grid.on('undo', syncSignals), grid.on('redo', syncSignals), grid.on('cell-commit', syncSignals)];\n\n destroyRef.onDestroy(() => {\n unsubs.forEach((fn) => fn());\n });\n };\n\n const getGrid = (): DataGridElement | null => {\n if (cachedGrid) return cachedGrid;\n\n const grid = elementRef.nativeElement.querySelector(selector) as DataGridElement | null;\n if (grid) {\n cachedGrid = grid;\n attachListeners(grid);\n if (!readyPromiseStarted) {\n readyPromiseStarted = true;\n grid.ready?.().then(() => {\n if (grid.getPluginByName('undoRedo')) {\n isReady.set(true);\n } else {\n setTimeout(() => isReady.set(true), 0);\n }\n });\n }\n }\n return grid;\n };\n\n const getPlugin = (): UndoRedoPlugin | undefined => {\n return getGrid()?.getPluginByName('undoRedo') as UndoRedoPlugin | undefined;\n };\n\n // Eagerly discover the grid after the first render so event listeners\n // are attached and isReady updates without requiring a programmatic\n // method call. Falls back to MutationObserver for lazy-rendered content.\n afterNextRender(() => {\n const grid = getGrid();\n if (grid) {\n grid.ready?.().then(() => {\n if (grid.getPluginByName('undoRedo')) {\n syncSignals();\n } else {\n setTimeout(syncSignals, 0);\n }\n });\n return;\n }\n\n const host = elementRef.nativeElement as HTMLElement;\n const observer = new MutationObserver(() => {\n const discovered = getGrid();\n if (discovered) {\n observer.disconnect();\n discovered.ready?.().then(() => {\n if (discovered.getPluginByName('undoRedo')) {\n syncSignals();\n } else {\n setTimeout(syncSignals, 0);\n }\n });\n }\n });\n observer.observe(host, { childList: true, subtree: true });\n\n destroyRef.onDestroy(() => observer.disconnect());\n });\n\n return {\n isReady: isReady.asReadonly(),\n canUndo: canUndoSignal.asReadonly(),\n canRedo: canRedoSignal.asReadonly(),\n\n undo: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />`,\n );\n return null;\n }\n const result = plugin.undo();\n syncSignals();\n return result;\n },\n\n redo: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />`,\n );\n return null;\n }\n const result = plugin.redo();\n syncSignals();\n return result;\n },\n\n clearHistory: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />`,\n );\n return;\n }\n plugin.clearHistory();\n syncSignals();\n },\n\n getUndoStack: () => getPlugin()?.getUndoStack() ?? [],\n\n getRedoStack: () => getPlugin()?.getRedoStack() ?? [],\n\n recordEdit: (rowIndex: number, field: string, oldValue: unknown, newValue: unknown) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />`,\n );\n return;\n }\n plugin.recordEdit(rowIndex, field, oldValue, newValue);\n syncSignals();\n },\n\n beginTransaction: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />`,\n );\n return;\n }\n plugin.beginTransaction();\n },\n\n endTransaction: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <tbw-grid [editing]=\"'dblclick'\" [undoRedo]=\"true\" />`,\n );\n return;\n }\n plugin.endTransaction();\n syncSignals();\n },\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;;;AAKG;AAMH;;;;AAIG;MAKU,qBAAqB,CAAA;AACf,IAAA,UAAU,GAAG,MAAM,EAAC,UAA2B,EAAC;AAExD,IAAA,QAAQ,GAAG,KAAK;4FAA4B;IAC5C,IAAI,GAAG,MAAM,EAAkB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,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;QAErD,UAAU,EAAE,CAAC,QAAgB,EAAE,KAAa,EAAE,QAAiB,EAAE,QAAiB,KAAI;AACpF,YAAA,MAAM,MAAM,GAAG,SAAS,EAAE;YAC1B,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO,CAAC,IAAI,CACV,CAAA,iDAAA,CAAmD;oBACjD,CAAA,mCAAA,CAAqC;AACrC,oBAAA,CAAA,yDAAA,CAA2D,CAC9D;gBACD;YACF;YACA,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC;AACtD,YAAA,WAAW,EAAE;QACf,CAAC;QAED,gBAAgB,EAAE,MAAK;AACrB,YAAA,MAAM,MAAM,GAAG,SAAS,EAAE;YAC1B,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO,CAAC,IAAI,CACV,CAAA,iDAAA,CAAmD;oBACjD,CAAA,mCAAA,CAAqC;AACrC,oBAAA,CAAA,yDAAA,CAA2D,CAC9D;gBACD;YACF;YACA,MAAM,CAAC,gBAAgB,EAAE;QAC3B,CAAC;QAED,cAAc,EAAE,MAAK;AACnB,YAAA,MAAM,MAAM,GAAG,SAAS,EAAE;YAC1B,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO,CAAC,IAAI,CACV,CAAA,iDAAA,CAAmD;oBACjD,CAAA,mCAAA,CAAqC;AACrC,oBAAA,CAAA,yDAAA,CAA2D,CAC9D;gBACD;YACF;YACA,MAAM,CAAC,cAAc,EAAE;AACvB,YAAA,WAAW,EAAE;QACf,CAAC;KACF;AACH;;ACjWA;;AAEG;;;;"}
@@ -18,7 +18,8 @@ import { registerFeatureClaim, claimEvent, unregisterFeatureClaim, unclaimEvent
18
18
  */
19
19
  class GridVisibilityDirective {
20
20
  elementRef = inject((ElementRef));
21
- visibility = input(...(ngDevMode ? [undefined, { debugName: "visibility" }] : /* istanbul ignore next */ []));
21
+ visibility = input(/* @ts-ignore */
22
+ ...(ngDevMode ? [undefined, { debugName: "visibility" }] : /* istanbul ignore next */ []));
22
23
  columnVisibility = output();
23
24
  listener;
24
25
  constructor() {
@@ -40,10 +41,10 @@ class GridVisibilityDirective {
40
41
  unregisterFeatureClaim(grid, 'visibility');
41
42
  unclaimEvent(grid, 'column-visibility');
42
43
  }
43
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: GridVisibilityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
44
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.5", type: GridVisibilityDirective, isStandalone: true, selector: "tbw-grid[visibility], tbw-grid[columnVisibility]", inputs: { visibility: { classPropertyName: "visibility", publicName: "visibility", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnVisibility: "columnVisibility" }, ngImport: i0 });
44
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridVisibilityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
45
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridVisibilityDirective, isStandalone: true, selector: "tbw-grid[visibility], tbw-grid[columnVisibility]", inputs: { visibility: { classPropertyName: "visibility", publicName: "visibility", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnVisibility: "columnVisibility" }, ngImport: i0 });
45
46
  }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: GridVisibilityDirective, decorators: [{
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridVisibilityDirective, decorators: [{
47
48
  type: Directive,
48
49
  args: [{
49
50
  selector: 'tbw-grid[visibility], tbw-grid[columnVisibility]',
@@ -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 `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,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA8B;IAChD,gBAAgB,GAAG,MAAM,EAA0B;AAEpD,IAAA,QAAQ;AAEhB,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AAC1C,QAAA,oBAAoB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;AACjE,QAAA,UAAU,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACvC;IAEA,QAAQ,GAAA;AACN,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AAC1C,QAAA,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAQ,KAAW,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAE,CAAyC,CAAC,MAAM,CAAC;QACjH,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,IAAI,CAAC,QAAQ,CAAC;IAC3D;IAEA,WAAW,GAAA;AACT,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AAC1C,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,EAAE,IAAI,CAAC,QAAQ,CAAC;AAC5D,YAAA,IAAI,CAAC,QAAQ,GAAG,SAAS;QAC3B;AACA,QAAA,sBAAsB,CAAC,IAAI,EAAE,YAAY,CAAC;AAC1C,QAAA,YAAY,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACzC;uGA5BW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kDAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,EAAA,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;;;;"}
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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