@cngx/ui 0.1.0-rc.5 → 0.1.0-rc.7

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 (79) hide show
  1. package/README.md +112 -0
  2. package/a11y/README.md +81 -0
  3. package/context-menu/README.md +98 -0
  4. package/data-grid-accordion/README.md +27 -0
  5. package/feedback/README.md +2 -0
  6. package/fesm2022/cngx-ui-a11y.mjs +320 -0
  7. package/fesm2022/cngx-ui-a11y.mjs.map +1 -0
  8. package/fesm2022/cngx-ui-accordion.mjs +19 -8
  9. package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
  10. package/fesm2022/cngx-ui-action-button.mjs +5 -2
  11. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  12. package/fesm2022/cngx-ui-breadcrumb.mjs +11 -6
  13. package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
  14. package/fesm2022/cngx-ui-chart-panel.mjs +429 -0
  15. package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -0
  16. package/fesm2022/cngx-ui-collection.mjs +15 -6
  17. package/fesm2022/cngx-ui-collection.mjs.map +1 -1
  18. package/fesm2022/cngx-ui-command-palette.mjs +1005 -0
  19. package/fesm2022/cngx-ui-command-palette.mjs.map +1 -0
  20. package/fesm2022/cngx-ui-context-menu.mjs +742 -0
  21. package/fesm2022/cngx-ui-context-menu.mjs.map +1 -0
  22. package/fesm2022/cngx-ui-data-grid-accordion.mjs +90 -20
  23. package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
  24. package/fesm2022/cngx-ui-feedback.mjs +97 -106
  25. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  26. package/fesm2022/cngx-ui-layout.mjs +18 -9
  27. package/fesm2022/cngx-ui-layout.mjs.map +1 -1
  28. package/fesm2022/cngx-ui-mat-accordion.mjs +9 -9
  29. package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
  30. package/fesm2022/cngx-ui-mat-tabs.mjs +64 -70
  31. package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
  32. package/fesm2022/cngx-ui-paginator.mjs +18 -8
  33. package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
  34. package/fesm2022/cngx-ui-sidenav.mjs +2 -2
  35. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
  36. package/fesm2022/cngx-ui-skeleton.mjs +20 -7
  37. package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
  38. package/fesm2022/cngx-ui-speak.mjs +2 -2
  39. package/fesm2022/cngx-ui-speak.mjs.map +1 -1
  40. package/fesm2022/cngx-ui-stat-card.mjs +618 -0
  41. package/fesm2022/cngx-ui-stat-card.mjs.map +1 -0
  42. package/fesm2022/cngx-ui-stepper.mjs +38 -19
  43. package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
  44. package/fesm2022/cngx-ui-tabs.mjs +36 -19
  45. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  46. package/fesm2022/cngx-ui-timeline.mjs +495 -0
  47. package/fesm2022/cngx-ui-timeline.mjs.map +1 -0
  48. package/fesm2022/cngx-ui-toc.mjs +704 -0
  49. package/fesm2022/cngx-ui-toc.mjs.map +1 -0
  50. package/fesm2022/cngx-ui.mjs +2 -2
  51. package/fesm2022/cngx-ui.mjs.map +1 -1
  52. package/mat-accordion/README.md +1 -1
  53. package/mat-tabs/styles/mat-tabs.css +20 -17
  54. package/package.json +32 -1
  55. package/skeleton/README.md +2 -0
  56. package/stepper/README.md +2 -2
  57. package/timeline/README.md +350 -0
  58. package/toc/README.md +183 -0
  59. package/types/cngx-ui-a11y.d.ts +303 -0
  60. package/types/cngx-ui-accordion.d.ts +9 -4
  61. package/types/cngx-ui-action-button.d.ts +3 -0
  62. package/types/cngx-ui-breadcrumb.d.ts +5 -0
  63. package/types/cngx-ui-chart-panel.d.ts +278 -0
  64. package/types/cngx-ui-collection.d.ts +12 -3
  65. package/types/cngx-ui-command-palette.d.ts +451 -0
  66. package/types/cngx-ui-context-menu.d.ts +467 -0
  67. package/types/cngx-ui-data-grid-accordion.d.ts +72 -15
  68. package/types/cngx-ui-feedback.d.ts +71 -18
  69. package/types/cngx-ui-layout.d.ts +8 -3
  70. package/types/cngx-ui-mat-accordion.d.ts +3 -3
  71. package/types/cngx-ui-mat-tabs.d.ts +11 -9
  72. package/types/cngx-ui-paginator.d.ts +13 -3
  73. package/types/cngx-ui-skeleton.d.ts +13 -1
  74. package/types/cngx-ui-stat-card.d.ts +327 -0
  75. package/types/cngx-ui-stepper.d.ts +18 -4
  76. package/types/cngx-ui-tabs.d.ts +20 -4
  77. package/types/cngx-ui-timeline.d.ts +479 -0
  78. package/types/cngx-ui-toc.d.ts +514 -0
  79. package/types/cngx-ui.d.ts +1 -1
@@ -0,0 +1,429 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, signal, input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, makeEnvironmentProviders, DestroyRef, Directive } from '@angular/core';
3
+ import { nextUid } from '@cngx/core/utils';
4
+
5
+ /**
6
+ * Library defaults for the chart-panel configuration cascade. English by
7
+ * default; locale overrides ride the `withChartPanelAriaLabels` feature. The
8
+ * values are byte-identical to the per-instance input defaults the component
9
+ * shipped before the cascade, so an un-configured consumer sees no change.
10
+ *
11
+ * Exported for intra-lib consumers but **NOT** re-exported from
12
+ * `public-api.ts` - downstream consumers reach the defaults via
13
+ * `inject(CNGX_CHART_PANEL_CONFIG)`.
14
+ *
15
+ * @internal
16
+ */
17
+ const CNGX_CHART_PANEL_DEFAULTS = {
18
+ ariaLabels: {
19
+ busy: 'Updating',
20
+ },
21
+ legendPosition: 'bottom',
22
+ };
23
+ /**
24
+ * App-wide configuration cascade for the chart-panel. `providedIn: 'root'`
25
+ * with a default factory, so `inject(CNGX_CHART_PANEL_CONFIG)` always
26
+ * resolves.
27
+ *
28
+ * @category ui/chart-panel
29
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/config/chart-panel.config.defaults.ts
30
+ * @since 0.1.0
31
+ * @relatedTo provideChartPanelConfig, provideChartPanelConfigAt, injectChartPanelConfig
32
+ */
33
+ const CNGX_CHART_PANEL_CONFIG = new InjectionToken('CNGX_CHART_PANEL_CONFIG', {
34
+ providedIn: 'root',
35
+ factory: () => CNGX_CHART_PANEL_DEFAULTS,
36
+ });
37
+
38
+ /**
39
+ * Convenience accessor for the chart-panel configuration cascade. Runs in
40
+ * injection context; resolves through the priority chain (per-instance Input
41
+ * -> `provideChartPanelConfigAt` -> `provideChartPanelConfig` -> library
42
+ * defaults). Equivalent to `inject(CNGX_CHART_PANEL_CONFIG)` - the helper
43
+ * exists so consumers don't import the token directly.
44
+ *
45
+ * @category ui/chart-panel
46
+ * @since 0.1.0
47
+ */
48
+ function injectChartPanelConfig() {
49
+ return inject(CNGX_CHART_PANEL_CONFIG);
50
+ }
51
+
52
+ /** DI token carrying the {@link CngxChartPanelRegistry} a `CngxChartPanel` provides. */
53
+ const CNGX_CHART_PANEL = new InjectionToken('CNGX_CHART_PANEL');
54
+
55
+ /**
56
+ * Dashboard housing for a chart: a titled, footer-capable region that frames
57
+ * whatever `cngx-chart` or preset the consumer projects into it.
58
+ *
59
+ * **What it deliberately does not do.** `cngx-chart` already owns the data-level
60
+ * async envelope - its own `[state]`, its skeleton / empty / error slots, its
61
+ * SR data table. The panel never duplicates that machine. Reproducing it here
62
+ * would put two managers on one state (Pillar 1) and turn the panel into a
63
+ * God-component (Pillar 3). The chart stays the authority on what the body
64
+ * shows; the panel only frames it.
65
+ *
66
+ * What the panel does own is the chrome a bare chart cannot express: a title
67
+ * that names the region for assistive tech, a subtitle, a header action
68
+ * cluster, and a footer. `role="group"` plus `aria-labelledby` pointing at the
69
+ * projected title means a screen reader announces "Revenue by quarter, group"
70
+ * instead of dropping the user into an unlabelled SVG (Pillar 2).
71
+ *
72
+ * Panel-level busy marks the **header**, never the group. An `aria-busy` on the
73
+ * region would hold back the projected chart's own live announcements and tell
74
+ * AT that a perfectly stable chart is updating - the same boundary violation in
75
+ * the a11y layer that duplicating its view switch would be in the state layer.
76
+ *
77
+ * ```html
78
+ * <cngx-chart-panel>
79
+ * <h3 cngxChartPanelTitle>Revenue by quarter</h3>
80
+ * <span cngxChartPanelSubtitle>EUR, net</span>
81
+ * <button cngxChartPanelActions type="button">Refresh</button>
82
+ *
83
+ * <cngx-chart [data]="series" [state]="revenue">
84
+ * <svg:g cngxLine [data]="series"></svg:g>
85
+ * </cngx-chart>
86
+ *
87
+ * <small cngxChartPanelFooter>Source: finance warehouse</small>
88
+ * </cngx-chart-panel>
89
+ * ```
90
+ *
91
+ * @category ui/chart-panel
92
+ * @docsKind primary
93
+ * @wcag AA
94
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel.component.ts
95
+ * @since 0.1.0
96
+ * @relatedTo CngxChart, CngxChartLegend, CngxChartPanelTitle, CngxChartPanelActions
97
+ *
98
+ * <example-url>http://localhost:4200/#/ui/chart-panel/basic/titled-panel-with-legend</example-url>
99
+ * <example-url>http://localhost:4200/#/ui/chart-panel/async/panel-chrome-vs-chart-state</example-url>
100
+ * <example-url>http://localhost:4200/#/ui/chart-panel/slots/actions-and-footer</example-url>
101
+ */
102
+ class CngxChartPanel {
103
+ titleId = signal(undefined, ...(ngDevMode ? [{ debugName: "titleId" }] : /* istanbul ignore next */ []));
104
+ config = injectChartPanelConfig();
105
+ /**
106
+ * Panel-level async envelope - the one driving the header chrome, not the
107
+ * chart's data. Bind the chart's own `[state]` to the chart; bind a
108
+ * range-switch or export operation here. Optional per the bridge-input rule.
109
+ */
110
+ state = input(undefined, { ...(ngDevMode ? { debugName: "state" } : /* istanbul ignore next */ {}), transform: (v) => (typeof v === 'string' ? undefined : v) });
111
+ /**
112
+ * Where the projected `cngx-chart-legend` sits. `'none'` hides it. Matches
113
+ * the bare `cngx-chart-legend` tag; a legend wrapped in an element of your
114
+ * own lands in the body slot instead.
115
+ */
116
+ legendPosition = input(this.config.legendPosition ?? 'bottom', ...(ngDevMode ? [{ debugName: "legendPosition" }] : /* istanbul ignore next */ []));
117
+ /** @internal Panel-level busy, never the chart's data-loading state. */
118
+ panelBusy = computed(() => this.state()?.isBusy() ?? false, ...(ngDevMode ? [{ debugName: "panelBusy" }] : /* istanbul ignore next */ []));
119
+ /** {@inheritDoc CngxChartPanelRegistry.registerTitle} */
120
+ registerTitle(id) {
121
+ this.titleId.set(id);
122
+ }
123
+ /** {@inheritDoc CngxChartPanelRegistry.unregisterTitle} */
124
+ unregisterTitle(id) {
125
+ this.titleId.update((current) => (current === id ? undefined : current));
126
+ }
127
+ /**
128
+ * @internal Accessible name of the region, from the projected title slot.
129
+ * `null` when no title was projected - an unnamed group is better than one
130
+ * pointing at an id that does not exist.
131
+ */
132
+ labelledBy = computed(() => this.titleId() ?? null, ...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
133
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxChartPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
134
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: CngxChartPanel, isStandalone: true, selector: "cngx-chart-panel", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "attr.aria-labelledby": "labelledBy()", "attr.data-legend": "legendPosition()", "class.cngx-chart-panel--busy": "panelBusy()" }, classAttribute: "cngx-chart-panel" }, providers: [{ provide: CNGX_CHART_PANEL, useExisting: CngxChartPanel }], ngImport: i0, template: `
135
+ <header class="cngx-chart-panel__header" [attr.aria-busy]="panelBusy() || null">
136
+ <div class="cngx-chart-panel__heading">
137
+ <ng-content select="[cngxChartPanelTitle]" />
138
+ <ng-content select="[cngxChartPanelSubtitle]" />
139
+ </div>
140
+
141
+ <!-- Dimmed and aria-disabled while a panel-level operation runs, so a
142
+ second range change is not invited into an in-flight one. The cluster
143
+ stays in the DOM and in the a11y tree; only the state flips (Pillar
144
+ 2). Deliberately not inert: that would hide the actions from AT
145
+ entirely and the aria-disabled would never be announced. -->
146
+ <div
147
+ class="cngx-chart-panel__action-slot"
148
+ [attr.aria-disabled]="panelBusy() || null"
149
+ >
150
+ <ng-content select="[cngxChartPanelActions]" />
151
+ </div>
152
+ </header>
153
+
154
+ <!-- One legend outlet, placed by the CSS order property. A duplicated
155
+ ng-content selector would leave the second outlet permanently empty,
156
+ and the legend carries no focusable content, so visual reordering
157
+ cannot desync from tab order. -->
158
+ <div class="cngx-chart-panel__legend">
159
+ <ng-content select="cngx-chart-legend" />
160
+ </div>
161
+
162
+ <div class="cngx-chart-panel__body">
163
+ <!-- No view switch here, and no panel-owned placeholder either: the
164
+ projected cngx-chart owns the data async envelope end to end. -->
165
+ <ng-content />
166
+ </div>
167
+
168
+ <ng-content select="[cngxChartPanelFooter]" />
169
+ `, isInline: true, styles: ["@layer cngx.tokens{.cngx-chart-panel{display:flex;flex-direction:column;--cngx-chart-panel-gap: var(--cngx-space-md, 1rem);--cngx-chart-panel-header-gap: var(--cngx-space-sm, .5rem);--cngx-chart-panel-heading-gap: calc(var(--cngx-space-xs, .25rem) / 2);--cngx-chart-panel-padding: var(--cngx-space-md, 1rem);--cngx-chart-panel-footer-gap: var(--cngx-space-xs, .25rem);gap:var(--cngx-chart-panel-gap);padding:var(--cngx-chart-panel-padding);background:var(--cngx-chart-panel-surface, var(--cngx-color-surface, oklch(1 0 0)));border:1px solid var(--cngx-chart-panel-border, var(--cngx-color-border, oklch(.88 .005 250)));border-radius:var(--cngx-chart-panel-radius, var(--cngx-radius-md, 8px));color:var(--cngx-chart-panel-text, var(--cngx-color-text, oklch(.2 .01 250)))}}@layer cngx.components{@scope(.cngx-chart-panel){.cngx-chart-panel__header{order:1;display:flex;align-items:flex-start;justify-content:space-between;gap:var(--cngx-chart-panel-header-gap);flex-wrap:wrap}.cngx-chart-panel__heading{display:flex;flex-direction:column;gap:var(--cngx-chart-panel-heading-gap);min-inline-size:0}.cngx-chart-panel__title{margin:0;font-size:var(--cngx-chart-panel-title-size, 1rem);font-weight:var(--cngx-chart-panel-title-weight, 600)}.cngx-chart-panel__subtitle{font-size:var(--cngx-chart-panel-subtitle-size, .8125rem);color:var( --cngx-chart-panel-subtitle-color, var(--cngx-color-text-muted, oklch(.5 .01 250)) )}.cngx-chart-panel__actions,.cngx-chart-panel__action-slot{display:flex;align-items:center;gap:var(--cngx-chart-panel-footer-gap)}.cngx-chart-panel__action-slot[aria-disabled=true]{opacity:var(--cngx-chart-panel-busy-opacity, .5);pointer-events:none}.cngx-chart-panel__body{order:3;min-inline-size:0}.cngx-chart-panel__legend{order:4}.cngx-chart-panel__footer{order:5;display:flex;align-items:center;gap:var(--cngx-chart-panel-footer-gap);font-size:var(--cngx-chart-panel-footer-size, .8125rem);color:var( --cngx-chart-panel-footer-color, var(--cngx-color-text-muted, oklch(.5 .01 250)) )}}@scope(.cngx-chart-panel[data-legend=top]){.cngx-chart-panel__legend{order:2}}@scope(.cngx-chart-panel[data-legend=none]){.cngx-chart-panel__legend{display:none}}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
170
+ }
171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxChartPanel, decorators: [{
172
+ type: Component,
173
+ args: [{ selector: 'cngx-chart-panel', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: CNGX_CHART_PANEL, useExisting: CngxChartPanel }], host: {
174
+ class: 'cngx-chart-panel',
175
+ role: 'group',
176
+ '[attr.aria-labelledby]': 'labelledBy()',
177
+ '[attr.data-legend]': 'legendPosition()',
178
+ '[class.cngx-chart-panel--busy]': 'panelBusy()',
179
+ }, template: `
180
+ <header class="cngx-chart-panel__header" [attr.aria-busy]="panelBusy() || null">
181
+ <div class="cngx-chart-panel__heading">
182
+ <ng-content select="[cngxChartPanelTitle]" />
183
+ <ng-content select="[cngxChartPanelSubtitle]" />
184
+ </div>
185
+
186
+ <!-- Dimmed and aria-disabled while a panel-level operation runs, so a
187
+ second range change is not invited into an in-flight one. The cluster
188
+ stays in the DOM and in the a11y tree; only the state flips (Pillar
189
+ 2). Deliberately not inert: that would hide the actions from AT
190
+ entirely and the aria-disabled would never be announced. -->
191
+ <div
192
+ class="cngx-chart-panel__action-slot"
193
+ [attr.aria-disabled]="panelBusy() || null"
194
+ >
195
+ <ng-content select="[cngxChartPanelActions]" />
196
+ </div>
197
+ </header>
198
+
199
+ <!-- One legend outlet, placed by the CSS order property. A duplicated
200
+ ng-content selector would leave the second outlet permanently empty,
201
+ and the legend carries no focusable content, so visual reordering
202
+ cannot desync from tab order. -->
203
+ <div class="cngx-chart-panel__legend">
204
+ <ng-content select="cngx-chart-legend" />
205
+ </div>
206
+
207
+ <div class="cngx-chart-panel__body">
208
+ <!-- No view switch here, and no panel-owned placeholder either: the
209
+ projected cngx-chart owns the data async envelope end to end. -->
210
+ <ng-content />
211
+ </div>
212
+
213
+ <ng-content select="[cngxChartPanelFooter]" />
214
+ `, styles: ["@layer cngx.tokens{.cngx-chart-panel{display:flex;flex-direction:column;--cngx-chart-panel-gap: var(--cngx-space-md, 1rem);--cngx-chart-panel-header-gap: var(--cngx-space-sm, .5rem);--cngx-chart-panel-heading-gap: calc(var(--cngx-space-xs, .25rem) / 2);--cngx-chart-panel-padding: var(--cngx-space-md, 1rem);--cngx-chart-panel-footer-gap: var(--cngx-space-xs, .25rem);gap:var(--cngx-chart-panel-gap);padding:var(--cngx-chart-panel-padding);background:var(--cngx-chart-panel-surface, var(--cngx-color-surface, oklch(1 0 0)));border:1px solid var(--cngx-chart-panel-border, var(--cngx-color-border, oklch(.88 .005 250)));border-radius:var(--cngx-chart-panel-radius, var(--cngx-radius-md, 8px));color:var(--cngx-chart-panel-text, var(--cngx-color-text, oklch(.2 .01 250)))}}@layer cngx.components{@scope(.cngx-chart-panel){.cngx-chart-panel__header{order:1;display:flex;align-items:flex-start;justify-content:space-between;gap:var(--cngx-chart-panel-header-gap);flex-wrap:wrap}.cngx-chart-panel__heading{display:flex;flex-direction:column;gap:var(--cngx-chart-panel-heading-gap);min-inline-size:0}.cngx-chart-panel__title{margin:0;font-size:var(--cngx-chart-panel-title-size, 1rem);font-weight:var(--cngx-chart-panel-title-weight, 600)}.cngx-chart-panel__subtitle{font-size:var(--cngx-chart-panel-subtitle-size, .8125rem);color:var( --cngx-chart-panel-subtitle-color, var(--cngx-color-text-muted, oklch(.5 .01 250)) )}.cngx-chart-panel__actions,.cngx-chart-panel__action-slot{display:flex;align-items:center;gap:var(--cngx-chart-panel-footer-gap)}.cngx-chart-panel__action-slot[aria-disabled=true]{opacity:var(--cngx-chart-panel-busy-opacity, .5);pointer-events:none}.cngx-chart-panel__body{order:3;min-inline-size:0}.cngx-chart-panel__legend{order:4}.cngx-chart-panel__footer{order:5;display:flex;align-items:center;gap:var(--cngx-chart-panel-footer-gap);font-size:var(--cngx-chart-panel-footer-size, .8125rem);color:var( --cngx-chart-panel-footer-color, var(--cngx-color-text-muted, oklch(.5 .01 250)) )}}@scope(.cngx-chart-panel[data-legend=top]){.cngx-chart-panel__legend{order:2}}@scope(.cngx-chart-panel[data-legend=none]){.cngx-chart-panel__legend{display:none}}}\n"] }]
215
+ }], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }] } });
216
+
217
+ /**
218
+ * Reduces a list of feature objects into a partial config - last write wins
219
+ * per sub-tree.
220
+ *
221
+ * @internal
222
+ */
223
+ function reduceFeatures(features) {
224
+ const out = {};
225
+ for (const f of features) {
226
+ switch (f.kind) {
227
+ case 'ariaLabels':
228
+ out.ariaLabels = { ...out.ariaLabels, ...f.payload };
229
+ break;
230
+ case 'legendPosition':
231
+ out.legendPosition = f.payload.legendPosition;
232
+ break;
233
+ }
234
+ }
235
+ return out;
236
+ }
237
+ /**
238
+ * Two-level deep merge: the nested `ariaLabels` sub-tree spread-merges; the
239
+ * flat top-level scalars take the partial when present, else the base.
240
+ *
241
+ * @internal
242
+ */
243
+ function mergeConfig(base, partial) {
244
+ return {
245
+ ariaLabels: { ...base.ariaLabels, ...partial.ariaLabels },
246
+ legendPosition: partial.legendPosition ?? base.legendPosition,
247
+ };
248
+ }
249
+ /**
250
+ * Application-root configuration cascade for the chart-panel.
251
+ *
252
+ * ```ts
253
+ * bootstrapApplication(AppComponent, {
254
+ * providers: [provideChartPanelConfig(withChartPanelLegendPosition('top'))],
255
+ * });
256
+ * ```
257
+ *
258
+ * @category ui/chart-panel
259
+ * @since 0.1.0
260
+ */
261
+ function provideChartPanelConfig(...features) {
262
+ // Empty-features: skip the override so the root factory's defaults reference
263
+ // flows through untouched, preserving downstream identity comparisons.
264
+ if (features.length === 0) {
265
+ return makeEnvironmentProviders([]);
266
+ }
267
+ const partial = reduceFeatures(features);
268
+ return makeEnvironmentProviders([
269
+ {
270
+ provide: CNGX_CHART_PANEL_CONFIG,
271
+ useValue: mergeConfig(CNGX_CHART_PANEL_DEFAULTS, partial),
272
+ },
273
+ ]);
274
+ }
275
+ /**
276
+ * Component-scoped configuration cascade for the chart-panel. Injects the
277
+ * parent injector's value and deep-merges the supplied features on top.
278
+ *
279
+ * @category ui/chart-panel
280
+ * @since 0.1.0
281
+ */
282
+ function provideChartPanelConfigAt(...features) {
283
+ // Empty-features call: parent value flows through untouched.
284
+ if (features.length === 0) {
285
+ return [];
286
+ }
287
+ const partial = reduceFeatures(features);
288
+ return [
289
+ {
290
+ provide: CNGX_CHART_PANEL_CONFIG,
291
+ useFactory: () => {
292
+ const parent = inject(CNGX_CHART_PANEL_CONFIG, { skipSelf: true });
293
+ return mergeConfig(parent, partial);
294
+ },
295
+ },
296
+ ];
297
+ }
298
+
299
+ /**
300
+ * Override the chart-panel's string fallbacks. Library defaults are English;
301
+ * this is the hook a localised app uses.
302
+ *
303
+ * @category ui/chart-panel
304
+ * @since 0.1.0
305
+ */
306
+ function withChartPanelAriaLabels(labels) {
307
+ return { kind: 'ariaLabels', payload: labels };
308
+ }
309
+ /**
310
+ * Move the cascade default for where a projected `cngx-chart-legend` sits.
311
+ * Per-instance `[legendPosition]` still wins.
312
+ *
313
+ * @category ui/chart-panel
314
+ * @since 0.1.0
315
+ */
316
+ function withChartPanelLegendPosition(position) {
317
+ return { kind: 'legendPosition', payload: { legendPosition: position } };
318
+ }
319
+
320
+ /**
321
+ * Marks the panel's title. Its generated id becomes the panel's
322
+ * `aria-labelledby`, so the whole region reads as one named group instead of
323
+ * an unlabelled box wrapped around a chart.
324
+ *
325
+ * Registration runs against {@link CNGX_CHART_PANEL}, which the panel provides -
326
+ * the title resolves it from its declaration site in the consumer template.
327
+ *
328
+ * @category ui/chart-panel
329
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts
330
+ * @since 0.1.0
331
+ * @relatedTo CngxChartPanel, CngxChartPanelSubtitle
332
+ */
333
+ class CngxChartPanelTitle {
334
+ /** Auto-generated id bound to the host `[id]`; consumed by the panel. */
335
+ id = nextUid('cngx-chart-panel-title');
336
+ constructor() {
337
+ const panel = inject(CNGX_CHART_PANEL, { optional: true });
338
+ panel?.registerTitle(this.id);
339
+ // Without the withdrawal the panel's aria-labelledby would keep pointing at
340
+ // a removed element - a dangling reference reads as an unnamed group to AT.
341
+ inject(DestroyRef).onDestroy(() => panel?.unregisterTitle(this.id));
342
+ }
343
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxChartPanelTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
344
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CngxChartPanelTitle, isStandalone: true, selector: "[cngxChartPanelTitle]", host: { properties: { "id": "id" }, classAttribute: "cngx-chart-panel__title" }, ngImport: i0 });
345
+ }
346
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxChartPanelTitle, decorators: [{
347
+ type: Directive,
348
+ args: [{
349
+ selector: '[cngxChartPanelTitle]',
350
+ standalone: true,
351
+ host: { class: 'cngx-chart-panel__title', '[id]': 'id' },
352
+ }]
353
+ }], ctorParameters: () => [] });
354
+ /**
355
+ * Marks the panel's secondary line under the title - a period, a unit, a
356
+ * comparison basis. Descriptive only; it does not join the accessible name.
357
+ *
358
+ * @category ui/chart-panel
359
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts
360
+ * @since 0.1.0
361
+ * @relatedTo CngxChartPanel, CngxChartPanelTitle
362
+ */
363
+ class CngxChartPanelSubtitle {
364
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxChartPanelSubtitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
365
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CngxChartPanelSubtitle, isStandalone: true, selector: "[cngxChartPanelSubtitle]", host: { classAttribute: "cngx-chart-panel__subtitle" }, ngImport: i0 });
366
+ }
367
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxChartPanelSubtitle, decorators: [{
368
+ type: Directive,
369
+ args: [{
370
+ selector: '[cngxChartPanelSubtitle]',
371
+ standalone: true,
372
+ host: { class: 'cngx-chart-panel__subtitle' },
373
+ }]
374
+ }] });
375
+ /**
376
+ * Marks the panel's header action cluster - a range picker, a refresh button,
377
+ * an overflow menu. The panel dims the cluster and marks it `aria-disabled`
378
+ * while a panel-level operation runs, so a user cannot fire a second range
379
+ * change into an in-flight one.
380
+ *
381
+ * @category ui/chart-panel
382
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts
383
+ * @since 0.1.0
384
+ * @relatedTo CngxChartPanel
385
+ */
386
+ class CngxChartPanelActions {
387
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxChartPanelActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
388
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CngxChartPanelActions, isStandalone: true, selector: "[cngxChartPanelActions]", host: { classAttribute: "cngx-chart-panel__actions" }, ngImport: i0 });
389
+ }
390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxChartPanelActions, decorators: [{
391
+ type: Directive,
392
+ args: [{
393
+ selector: '[cngxChartPanelActions]',
394
+ standalone: true,
395
+ host: { class: 'cngx-chart-panel__actions' },
396
+ }]
397
+ }] });
398
+ /**
399
+ * Marks the panel's footer row - a source note, a last-updated timestamp, a
400
+ * drill-down link. Sits below the chart body and the legend.
401
+ *
402
+ * @category ui/chart-panel
403
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts
404
+ * @since 0.1.0
405
+ * @relatedTo CngxChartPanel
406
+ */
407
+ class CngxChartPanelFooter {
408
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxChartPanelFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
409
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CngxChartPanelFooter, isStandalone: true, selector: "[cngxChartPanelFooter]", host: { classAttribute: "cngx-chart-panel__footer" }, ngImport: i0 });
410
+ }
411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxChartPanelFooter, decorators: [{
412
+ type: Directive,
413
+ args: [{
414
+ selector: '[cngxChartPanelFooter]',
415
+ standalone: true,
416
+ host: { class: 'cngx-chart-panel__footer' },
417
+ }]
418
+ }] });
419
+
420
+ /**
421
+ * @module @cngx/ui/chart-panel
422
+ */
423
+
424
+ /**
425
+ * Generated bundle index. Do not edit.
426
+ */
427
+
428
+ export { CNGX_CHART_PANEL, CNGX_CHART_PANEL_CONFIG, CngxChartPanel, CngxChartPanelActions, CngxChartPanelFooter, CngxChartPanelSubtitle, CngxChartPanelTitle, injectChartPanelConfig, provideChartPanelConfig, provideChartPanelConfigAt, withChartPanelAriaLabels, withChartPanelLegendPosition };
429
+ //# sourceMappingURL=cngx-ui-chart-panel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cngx-ui-chart-panel.mjs","sources":["../../../projects/ui/chart-panel/config/chart-panel.config.defaults.ts","../../../projects/ui/chart-panel/config/inject-chart-panel-config.ts","../../../projects/ui/chart-panel/chart-panel.token.ts","../../../projects/ui/chart-panel/chart-panel.component.ts","../../../projects/ui/chart-panel/config/provide-chart-panel-config.ts","../../../projects/ui/chart-panel/config/features.ts","../../../projects/ui/chart-panel/chart-panel-slots.ts","../../../projects/ui/chart-panel/public-api.ts","../../../projects/ui/chart-panel/cngx-ui-chart-panel.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nimport type { CngxChartPanelConfig } from './chart-panel.config';\n\n/**\n * Library defaults for the chart-panel configuration cascade. English by\n * default; locale overrides ride the `withChartPanelAriaLabels` feature. The\n * values are byte-identical to the per-instance input defaults the component\n * shipped before the cascade, so an un-configured consumer sees no change.\n *\n * Exported for intra-lib consumers but **NOT** re-exported from\n * `public-api.ts` - downstream consumers reach the defaults via\n * `inject(CNGX_CHART_PANEL_CONFIG)`.\n *\n * @internal\n */\nexport const CNGX_CHART_PANEL_DEFAULTS: CngxChartPanelConfig = {\n ariaLabels: {\n busy: 'Updating',\n },\n legendPosition: 'bottom',\n};\n\n/**\n * App-wide configuration cascade for the chart-panel. `providedIn: 'root'`\n * with a default factory, so `inject(CNGX_CHART_PANEL_CONFIG)` always\n * resolves.\n *\n * @category ui/chart-panel\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/config/chart-panel.config.defaults.ts\n * @since 0.1.0\n * @relatedTo provideChartPanelConfig, provideChartPanelConfigAt, injectChartPanelConfig\n */\nexport const CNGX_CHART_PANEL_CONFIG = new InjectionToken<CngxChartPanelConfig>(\n 'CNGX_CHART_PANEL_CONFIG',\n {\n providedIn: 'root',\n factory: () => CNGX_CHART_PANEL_DEFAULTS,\n },\n);\n","import { inject } from '@angular/core';\n\nimport type { CngxChartPanelConfig } from './chart-panel.config';\nimport { CNGX_CHART_PANEL_CONFIG } from './chart-panel.config.defaults';\n\n/**\n * Convenience accessor for the chart-panel configuration cascade. Runs in\n * injection context; resolves through the priority chain (per-instance Input\n * -> `provideChartPanelConfigAt` -> `provideChartPanelConfig` -> library\n * defaults). Equivalent to `inject(CNGX_CHART_PANEL_CONFIG)` - the helper\n * exists so consumers don't import the token directly.\n *\n * @category ui/chart-panel\n * @since 0.1.0\n */\nexport function injectChartPanelConfig(): CngxChartPanelConfig {\n return inject(CNGX_CHART_PANEL_CONFIG);\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Title-registration contract the panel exposes to its projected title slot.\n * The slot registers its generated id on init; the panel derives its\n * `aria-labelledby` from it.\n *\n * Fronted by a DI token rather than the concrete `CngxChartPanel` class so the\n * slot stays decompose-safe - an ejected skin talks to the same token the\n * library defines. Mirrors `CNGX_STAT` behind the `cngxStat*` slots.\n */\nexport interface CngxChartPanelRegistry {\n /** Register the id contributed by the title slot. */\n registerTitle(id: string): void;\n /**\n * Withdraw a previously registered title id. Takes the id rather than no\n * argument so a destroy arriving after a replacement title already\n * registered cannot clear the newer one.\n */\n unregisterTitle(id: string): void;\n}\n\n/** DI token carrying the {@link CngxChartPanelRegistry} a `CngxChartPanel` provides. */\nexport const CNGX_CHART_PANEL = new InjectionToken<CngxChartPanelRegistry>('CNGX_CHART_PANEL');\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { CngxAsyncState } from '@cngx/core/utils';\n\nimport { injectChartPanelConfig } from './config/inject-chart-panel-config';\nimport { CNGX_CHART_PANEL, type CngxChartPanelRegistry } from './chart-panel.token';\n\n/**\n * Where the projected legend sits relative to the chart body.\n *\n * @category ui/chart-panel\n * @since 0.1.0\n */\nexport type CngxChartPanelLegendPosition = 'top' | 'bottom' | 'none';\n\n/**\n * Dashboard housing for a chart: a titled, footer-capable region that frames\n * whatever `cngx-chart` or preset the consumer projects into it.\n *\n * **What it deliberately does not do.** `cngx-chart` already owns the data-level\n * async envelope - its own `[state]`, its skeleton / empty / error slots, its\n * SR data table. The panel never duplicates that machine. Reproducing it here\n * would put two managers on one state (Pillar 1) and turn the panel into a\n * God-component (Pillar 3). The chart stays the authority on what the body\n * shows; the panel only frames it.\n *\n * What the panel does own is the chrome a bare chart cannot express: a title\n * that names the region for assistive tech, a subtitle, a header action\n * cluster, and a footer. `role=\"group\"` plus `aria-labelledby` pointing at the\n * projected title means a screen reader announces \"Revenue by quarter, group\"\n * instead of dropping the user into an unlabelled SVG (Pillar 2).\n *\n * Panel-level busy marks the **header**, never the group. An `aria-busy` on the\n * region would hold back the projected chart's own live announcements and tell\n * AT that a perfectly stable chart is updating - the same boundary violation in\n * the a11y layer that duplicating its view switch would be in the state layer.\n *\n * ```html\n * <cngx-chart-panel>\n * <h3 cngxChartPanelTitle>Revenue by quarter</h3>\n * <span cngxChartPanelSubtitle>EUR, net</span>\n * <button cngxChartPanelActions type=\"button\">Refresh</button>\n *\n * <cngx-chart [data]=\"series\" [state]=\"revenue\">\n * <svg:g cngxLine [data]=\"series\"></svg:g>\n * </cngx-chart>\n *\n * <small cngxChartPanelFooter>Source: finance warehouse</small>\n * </cngx-chart-panel>\n * ```\n *\n * @category ui/chart-panel\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel.component.ts\n * @since 0.1.0\n * @relatedTo CngxChart, CngxChartLegend, CngxChartPanelTitle, CngxChartPanelActions\n *\n * <example-url>http://localhost:4200/#/ui/chart-panel/basic/titled-panel-with-legend</example-url>\n * <example-url>http://localhost:4200/#/ui/chart-panel/async/panel-chrome-vs-chart-state</example-url>\n * <example-url>http://localhost:4200/#/ui/chart-panel/slots/actions-and-footer</example-url>\n */\n@Component({\n selector: 'cngx-chart-panel',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: CNGX_CHART_PANEL, useExisting: CngxChartPanel }],\n host: {\n class: 'cngx-chart-panel',\n role: 'group',\n '[attr.aria-labelledby]': 'labelledBy()',\n '[attr.data-legend]': 'legendPosition()',\n '[class.cngx-chart-panel--busy]': 'panelBusy()',\n },\n template: `\n <header class=\"cngx-chart-panel__header\" [attr.aria-busy]=\"panelBusy() || null\">\n <div class=\"cngx-chart-panel__heading\">\n <ng-content select=\"[cngxChartPanelTitle]\" />\n <ng-content select=\"[cngxChartPanelSubtitle]\" />\n </div>\n\n <!-- Dimmed and aria-disabled while a panel-level operation runs, so a\n second range change is not invited into an in-flight one. The cluster\n stays in the DOM and in the a11y tree; only the state flips (Pillar\n 2). Deliberately not inert: that would hide the actions from AT\n entirely and the aria-disabled would never be announced. -->\n <div\n class=\"cngx-chart-panel__action-slot\"\n [attr.aria-disabled]=\"panelBusy() || null\"\n >\n <ng-content select=\"[cngxChartPanelActions]\" />\n </div>\n </header>\n\n <!-- One legend outlet, placed by the CSS order property. A duplicated\n ng-content selector would leave the second outlet permanently empty,\n and the legend carries no focusable content, so visual reordering\n cannot desync from tab order. -->\n <div class=\"cngx-chart-panel__legend\">\n <ng-content select=\"cngx-chart-legend\" />\n </div>\n\n <div class=\"cngx-chart-panel__body\">\n <!-- No view switch here, and no panel-owned placeholder either: the\n projected cngx-chart owns the data async envelope end to end. -->\n <ng-content />\n </div>\n\n <ng-content select=\"[cngxChartPanelFooter]\" />\n `,\n styleUrls: ['./chart-panel.component.css'],\n})\nexport class CngxChartPanel implements CngxChartPanelRegistry {\n private readonly titleId = signal<string | undefined>(undefined);\n private readonly config = injectChartPanelConfig();\n\n /**\n * Panel-level async envelope - the one driving the header chrome, not the\n * chart's data. Bind the chart's own `[state]` to the chart; bind a\n * range-switch or export operation here. Optional per the bridge-input rule.\n */\n readonly state = input<\n CngxAsyncState<unknown> | undefined,\n CngxAsyncState<unknown> | '' | undefined\n >(undefined, { transform: (v) => (typeof v === 'string' ? undefined : v) });\n\n /**\n * Where the projected `cngx-chart-legend` sits. `'none'` hides it. Matches\n * the bare `cngx-chart-legend` tag; a legend wrapped in an element of your\n * own lands in the body slot instead.\n */\n readonly legendPosition = input<CngxChartPanelLegendPosition>(\n this.config.legendPosition ?? 'bottom',\n );\n\n /** @internal Panel-level busy, never the chart's data-loading state. */\n protected readonly panelBusy = computed(() => this.state()?.isBusy() ?? false);\n\n /** {@inheritDoc CngxChartPanelRegistry.registerTitle} */\n registerTitle(id: string): void {\n this.titleId.set(id);\n }\n\n /** {@inheritDoc CngxChartPanelRegistry.unregisterTitle} */\n unregisterTitle(id: string): void {\n this.titleId.update((current) => (current === id ? undefined : current));\n }\n\n /**\n * @internal Accessible name of the region, from the projected title slot.\n * `null` when no title was projected - an unnamed group is better than one\n * pointing at an id that does not exist.\n */\n protected readonly labelledBy = computed(() => this.titleId() ?? null);\n}\n","import {\n inject,\n makeEnvironmentProviders,\n type EnvironmentProviders,\n type Provider,\n} from '@angular/core';\n\nimport type { CngxChartPanelConfig } from './chart-panel.config';\nimport { CNGX_CHART_PANEL_CONFIG, CNGX_CHART_PANEL_DEFAULTS } from './chart-panel.config.defaults';\n\n/**\n * Discriminated-union shape returned by the chart-panel config features. The\n * reducer matches on `kind` and merges `payload` into the corresponding config\n * sub-tree. Mirrors `CngxStatCardConfigFeature` and `CngxBreadcrumbConfigFeature`.\n *\n * @category ui/chart-panel\n * @since 0.1.0\n */\nexport type CngxChartPanelConfigFeature =\n | {\n readonly kind: 'ariaLabels';\n readonly payload: NonNullable<CngxChartPanelConfig['ariaLabels']>;\n }\n | {\n readonly kind: 'legendPosition';\n readonly payload: {\n readonly legendPosition: NonNullable<CngxChartPanelConfig['legendPosition']>;\n };\n };\n\n/**\n * Reduces a list of feature objects into a partial config - last write wins\n * per sub-tree.\n *\n * @internal\n */\nfunction reduceFeatures(\n features: readonly CngxChartPanelConfigFeature[],\n): Partial<CngxChartPanelConfig> {\n const out: {\n ariaLabels?: NonNullable<CngxChartPanelConfig['ariaLabels']>;\n legendPosition?: NonNullable<CngxChartPanelConfig['legendPosition']>;\n } = {};\n for (const f of features) {\n switch (f.kind) {\n case 'ariaLabels':\n out.ariaLabels = { ...out.ariaLabels, ...f.payload };\n break;\n case 'legendPosition':\n out.legendPosition = f.payload.legendPosition;\n break;\n }\n }\n return out;\n}\n\n/**\n * Two-level deep merge: the nested `ariaLabels` sub-tree spread-merges; the\n * flat top-level scalars take the partial when present, else the base.\n *\n * @internal\n */\nfunction mergeConfig(\n base: CngxChartPanelConfig,\n partial: Partial<CngxChartPanelConfig>,\n): CngxChartPanelConfig {\n return {\n ariaLabels: { ...base.ariaLabels, ...partial.ariaLabels },\n legendPosition: partial.legendPosition ?? base.legendPosition,\n };\n}\n\n/**\n * Application-root configuration cascade for the chart-panel.\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideChartPanelConfig(withChartPanelLegendPosition('top'))],\n * });\n * ```\n *\n * @category ui/chart-panel\n * @since 0.1.0\n */\nexport function provideChartPanelConfig(\n ...features: CngxChartPanelConfigFeature[]\n): EnvironmentProviders {\n // Empty-features: skip the override so the root factory's defaults reference\n // flows through untouched, preserving downstream identity comparisons.\n if (features.length === 0) {\n return makeEnvironmentProviders([]);\n }\n const partial = reduceFeatures(features);\n return makeEnvironmentProviders([\n {\n provide: CNGX_CHART_PANEL_CONFIG,\n useValue: mergeConfig(CNGX_CHART_PANEL_DEFAULTS, partial),\n },\n ]);\n}\n\n/**\n * Component-scoped configuration cascade for the chart-panel. Injects the\n * parent injector's value and deep-merges the supplied features on top.\n *\n * @category ui/chart-panel\n * @since 0.1.0\n */\nexport function provideChartPanelConfigAt(\n ...features: CngxChartPanelConfigFeature[]\n): Provider[] {\n // Empty-features call: parent value flows through untouched.\n if (features.length === 0) {\n return [];\n }\n const partial = reduceFeatures(features);\n return [\n {\n provide: CNGX_CHART_PANEL_CONFIG,\n useFactory: () => {\n const parent = inject(CNGX_CHART_PANEL_CONFIG, { skipSelf: true });\n return mergeConfig(parent, partial);\n },\n },\n ];\n}\n","import type { CngxChartPanelLegendPosition } from '../chart-panel.component';\nimport type { CngxChartPanelConfig } from './chart-panel.config';\nimport type { CngxChartPanelConfigFeature } from './provide-chart-panel-config';\n\n/**\n * Override the chart-panel's string fallbacks. Library defaults are English;\n * this is the hook a localised app uses.\n *\n * @category ui/chart-panel\n * @since 0.1.0\n */\nexport function withChartPanelAriaLabels(\n labels: NonNullable<CngxChartPanelConfig['ariaLabels']>,\n): CngxChartPanelConfigFeature {\n return { kind: 'ariaLabels', payload: labels };\n}\n\n/**\n * Move the cascade default for where a projected `cngx-chart-legend` sits.\n * Per-instance `[legendPosition]` still wins.\n *\n * @category ui/chart-panel\n * @since 0.1.0\n */\nexport function withChartPanelLegendPosition(\n position: CngxChartPanelLegendPosition,\n): CngxChartPanelConfigFeature {\n return { kind: 'legendPosition', payload: { legendPosition: position } };\n}\n","import { DestroyRef, Directive, inject } from '@angular/core';\nimport { nextUid } from '@cngx/core/utils';\n\nimport { CNGX_CHART_PANEL } from './chart-panel.token';\n\n/**\n * Marks the panel's title. Its generated id becomes the panel's\n * `aria-labelledby`, so the whole region reads as one named group instead of\n * an unlabelled box wrapped around a chart.\n *\n * Registration runs against {@link CNGX_CHART_PANEL}, which the panel provides -\n * the title resolves it from its declaration site in the consumer template.\n *\n * @category ui/chart-panel\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxChartPanel, CngxChartPanelSubtitle\n */\n@Directive({\n selector: '[cngxChartPanelTitle]',\n standalone: true,\n host: { class: 'cngx-chart-panel__title', '[id]': 'id' },\n})\nexport class CngxChartPanelTitle {\n /** Auto-generated id bound to the host `[id]`; consumed by the panel. */\n readonly id = nextUid('cngx-chart-panel-title');\n\n constructor() {\n const panel = inject(CNGX_CHART_PANEL, { optional: true });\n panel?.registerTitle(this.id);\n // Without the withdrawal the panel's aria-labelledby would keep pointing at\n // a removed element - a dangling reference reads as an unnamed group to AT.\n inject(DestroyRef).onDestroy(() => panel?.unregisterTitle(this.id));\n }\n}\n\n/**\n * Marks the panel's secondary line under the title - a period, a unit, a\n * comparison basis. Descriptive only; it does not join the accessible name.\n *\n * @category ui/chart-panel\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxChartPanel, CngxChartPanelTitle\n */\n@Directive({\n selector: '[cngxChartPanelSubtitle]',\n standalone: true,\n host: { class: 'cngx-chart-panel__subtitle' },\n})\nexport class CngxChartPanelSubtitle {}\n\n/**\n * Marks the panel's header action cluster - a range picker, a refresh button,\n * an overflow menu. The panel dims the cluster and marks it `aria-disabled`\n * while a panel-level operation runs, so a user cannot fire a second range\n * change into an in-flight one.\n *\n * @category ui/chart-panel\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxChartPanel\n */\n@Directive({\n selector: '[cngxChartPanelActions]',\n standalone: true,\n host: { class: 'cngx-chart-panel__actions' },\n})\nexport class CngxChartPanelActions {}\n\n/**\n * Marks the panel's footer row - a source note, a last-updated timestamp, a\n * drill-down link. Sits below the chart body and the legend.\n *\n * @category ui/chart-panel\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts\n * @since 0.1.0\n * @relatedTo CngxChartPanel\n */\n@Directive({\n selector: '[cngxChartPanelFooter]',\n standalone: true,\n host: { class: 'cngx-chart-panel__footer' },\n})\nexport class CngxChartPanelFooter {}\n","/**\n * @module @cngx/ui/chart-panel\n */\n\nexport {\n CngxChartPanel,\n type CngxChartPanelLegendPosition,\n} from './chart-panel.component';\nexport { type CngxChartPanelConfig } from './config/chart-panel.config';\nexport { CNGX_CHART_PANEL_CONFIG } from './config/chart-panel.config.defaults';\nexport {\n provideChartPanelConfig,\n provideChartPanelConfigAt,\n type CngxChartPanelConfigFeature,\n} from './config/provide-chart-panel-config';\nexport { withChartPanelAriaLabels, withChartPanelLegendPosition } from './config/features';\nexport { injectChartPanelConfig } from './config/inject-chart-panel-config';\nexport {\n CngxChartPanelTitle,\n CngxChartPanelSubtitle,\n CngxChartPanelActions,\n CngxChartPanelFooter,\n} from './chart-panel-slots';\nexport { CNGX_CHART_PANEL, type CngxChartPanelRegistry } from './chart-panel.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAIA;;;;;;;;;;;AAWG;AACI,MAAM,yBAAyB,GAAyB;AAC7D,IAAA,UAAU,EAAE;AACV,QAAA,IAAI,EAAE,UAAU;AACjB,KAAA;AACD,IAAA,cAAc,EAAE,QAAQ;CACzB;AAED;;;;;;;;;AASG;MACU,uBAAuB,GAAG,IAAI,cAAc,CACvD,yBAAyB,EACzB;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,yBAAyB;AACzC,CAAA;;ACjCH;;;;;;;;;AASG;SACa,sBAAsB,GAAA;AACpC,IAAA,OAAO,MAAM,CAAC,uBAAuB,CAAC;AACxC;;ACKA;MACa,gBAAgB,GAAG,IAAI,cAAc,CAAyB,kBAAkB;;ACF7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CG;MAoDU,cAAc,CAAA;AACR,IAAA,OAAO,GAAG,M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IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,2BAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,2BAA2B,EAAE;AAC7C,iBAAA;;AAGD;;;;;;;;AAQG;MAMU,oBAAoB,CAAA;uGAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,0BAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,0BAA0B,EAAE;AAC5C,iBAAA;;;ACnFD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -412,9 +412,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
412
412
  * same contract when projected - the trigger stays a swappable terminal unit,
413
413
  * the rich async experience lives here.
414
414
  *
415
- * Two-way `[(pageIndex)]` / `[(pageSize)]` mirror the paginator shell: the
416
- * brain's controlled inputs are aliased through `hostDirectives` and this
417
- * component is the single emitter of the matching outputs.
415
+ * Page bindings mirror the paginator shell and are longhand pairs -
416
+ * `[pageIndex]` + `(pageIndexChange)`, `[pageSize]` + `(pageSizeChange)`:
417
+ * the brain's controlled inputs are aliased through `hostDirectives` and this
418
+ * component is the single emitter of the matching outputs. The two-way
419
+ * shorthand (banana-in-a-box) fails NG8007 under `strictTemplates` because
420
+ * the two halves resolve to different directive instances - same limitation,
421
+ * same reason, as `CngxPaginator`.
418
422
  *
419
423
  * All ARIA is signal-driven: `aria-busy` reflects the brain busy signal and a
420
424
  * polite live region communicates every settle (empty / error / end-reached).
@@ -425,6 +429,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
425
429
  * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/collection/incremental-list.component.ts
426
430
  * @since 0.1.0
427
431
  * @relatedTo CngxPaginate, CngxPaginator, CngxAsyncState
432
+ * @slot cngxIncrementalItem Renders one row; gets the item and its index.
433
+ * @slot cngxIncrementalLoading Rendered while a page is being fetched.
434
+ * @slot cngxIncrementalEmpty Rendered when the list resolves to nothing.
435
+ * @slot cngxIncrementalError Rendered when a page fetch fails; gets the error and a retry callback.
436
+ * @slot cngxIncrementalEnd Rendered once after the last page, e.g. an end-of-results marker.
428
437
  */
429
438
  class CngxIncrementalList {
430
439
  /** Visual skin; reflected onto `[data-skin]`. Paint-only. */
@@ -560,7 +569,7 @@ class CngxIncrementalList {
560
569
  /** `@for` track expression - delegates to the `trackBy` input (index by default). */
561
570
  trackItem = (index, item) => this.trackBy()(index, item);
562
571
  constructor() {
563
- // Two-way [(pageIndex)] / [(pageSize)] emit, shared verbatim with
572
+ // pageIndexChange / pageSizeChange emit, shared verbatim with
564
573
  // CngxPaginator through the connectPaginateEmit bridge.
565
574
  connectPaginateEmit(this.paginate, {
566
575
  onIndex: (index) => this.pageIndexChange.emit(index),
@@ -589,7 +598,7 @@ class CngxIncrementalList {
589
598
  };
590
599
  },
591
600
  },
592
- ], queries: [{ propertyName: "itemSlot", first: true, predicate: CngxIncrementalItem, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "emptySlot", first: true, predicate: CngxIncrementalEmpty, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "errorSlot", first: true, predicate: CngxIncrementalError, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "endSlot", first: true, predicate: CngxIncrementalEnd, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "loadingSlot", first: true, predicate: CngxIncrementalLoading, descendants: true, read: TemplateRef, isSignal: true }], exportAs: ["cngxIncrementalList"], hostDirectives: [{ directive: i1.CngxPaginate, inputs: ["cngxPageIndex", "pageIndex", "cngxPageSize", "pageSize", "total", "total", "state", "state"] }], ngImport: i0, template: "@switch (view()) {\n @case ('skeleton') {\n @if (loadingTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <cngx-progress\n class=\"cngx-incremental-list__progress\"\n variant=\"linear\"\n [state]=\"paginate.state()\"\n [label]=\"loadingLabel()\"\n />\n }\n }\n @case ('empty') {\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <cngx-empty-state class=\"cngx-incremental-list__empty\" [title]=\"emptyLabel()\" />\n }\n }\n @case ('error') {\n @if (errorTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"errorContext()\" />\n } @else {\n <div class=\"cngx-incremental-list__error\">\n <ng-container [ngTemplateOutlet]=\"builtinError\" />\n </div>\n }\n }\n @default {\n @if (virtualize()) {\n <cngx-incremental-virtualized-body\n [items]=\"items()\"\n [estimateSize]=\"estimateSize()\"\n [itemTemplate]=\"itemTemplate()\"\n [trackItem]=\"trackItem\"\n (focusEscaped)=\"handleFocusEscaped()\"\n />\n } @else {\n <ul class=\"cngx-incremental-list__items\" role=\"list\">\n @for (item of items(); track trackItem($index, item)) {\n <li class=\"cngx-incremental-list__item\">\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\"\n />\n } @else {\n {{ item }}\n }\n </li>\n }\n </ul>\n }\n @if (view() === 'content+error') {\n <!-- Subsequent-page failure: keep the accumulated list above visible and\n render a reachable retry, rather than silently swallowing the error. -->\n @if (errorTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"errorContext()\" />\n } @else {\n <div class=\"cngx-incremental-list__inline-error\">\n <ng-container [ngTemplateOutlet]=\"builtinError\" />\n </div>\n }\n } @else if (exhausted()) {\n @if (endTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <p class=\"cngx-incremental-list__message cngx-incremental-list__end\">{{ endLabel() }}</p>\n }\n } @else {\n <ng-content select=\"[cngxIncrementalTrigger]\" />\n }\n }\n}\n\n<ng-template #builtinError>\n <p class=\"cngx-incremental-list__error-text\">{{ errorViewLabel() }}</p>\n <button type=\"button\" class=\"cngx-incremental-list__retry\" (click)=\"retryFn()\">\n {{ retryLabel() }}\n </button>\n</ng-template>\n\n<span cngxLiveRegion class=\"cngx-incremental-list__sr\">{{ statusMessage() }}</span>\n", styles: ["@layer cngx.tokens{.cngx-incremental-list{display:block;--cngx-incremental-list-item-padding: var(--cngx-space-sm, .5rem);--cngx-incremental-list-message-padding: var(--cngx-space-md, 1rem);--cngx-incremental-list-error-gap: var(--cngx-space-sm, .5rem);--cngx-incremental-list-card-padding: var(--cngx-space-md, 1rem);--cngx-incremental-list-button-padding: var(--cngx-space-xs, .25rem) var(--cngx-space-md, 1rem);color:var(--cngx-incremental-list-text, var(--cngx-color-text, oklch(.2 .01 250)))}}@layer cngx.components{@scope(.cngx-incremental-list){.cngx-incremental-list__viewport{overflow-y:auto;max-block-size:var(--cngx-incremental-list-viewport-height, 60vh)}.cngx-incremental-list__items{margin:0;padding:0;list-style:none}.cngx-incremental-list__item{padding-block:var(--cngx-incremental-list-item-padding)}.cngx-incremental-list__message{margin:0;padding:var(--cngx-incremental-list-message-padding);text-align:center;color:var( --cngx-incremental-list-message-color, var(--cngx-color-text-muted, oklch(.5 .01 250)) )}.cngx-incremental-list__error,.cngx-incremental-list__inline-error{display:flex;flex-direction:column;align-items:center;gap:var(--cngx-incremental-list-error-gap);padding:var(--cngx-incremental-list-message-padding)}.cngx-incremental-list__inline-error{border-top:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}.cngx-incremental-list__error-text{margin:0;text-align:center;color:var(--cngx-incremental-list-error-color, var(--cngx-color-danger, oklch(.6 .18 25)))}.cngx-incremental-list__retry{font:inherit;color:var(--cngx-incremental-list-button-fg, var(--cngx-color-primary, oklch(.66 .19 50)));background:transparent;padding:var(--cngx-incremental-list-button-padding);border:1px solid var(--cngx-incremental-list-button-border, var(--cngx-color-border, oklch(.88 .005 250)));border-radius:var(--cngx-incremental-list-button-radius, var(--cngx-radius-sm, 6px));cursor:pointer}.cngx-incremental-list__retry:hover{background:color-mix(in oklch,var(--cngx-incremental-list-button-fg, var(--cngx-color-primary, oklch(.66 .19 50))) 8%,transparent)}.cngx-incremental-list__retry:focus-visible{outline:2px solid var(--cngx-incremental-list-button-fg, var(--cngx-color-primary, oklch(.66 .19 50)));outline-offset:2px}.cngx-incremental-list__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}}@scope(.cngx-incremental-list[data-skin=divided]){.cngx-incremental-list__item:not(:last-child){border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}@scope(.cngx-incremental-list[data-skin=card]){:scope{background:var(--cngx-incremental-list-surface, var(--cngx-color-surface, oklch(1 0 0)));border:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)));border-radius:var(--cngx-incremental-list-radius, var(--cngx-radius-md, 8px));padding-inline:var(--cngx-incremental-list-card-padding);overflow:hidden}.cngx-incremental-list__item:not(:last-child){border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}@scope(.cngx-incremental-list[data-skin=divided][data-virtualize]){.cngx-incremental-list__item{border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}@scope(.cngx-incremental-list[data-skin=card][data-virtualize]){.cngx-incremental-list__item{border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}}\n"], dependencies: [{ kind: "component", type: CngxProgress, selector: "cngx-progress", inputs: ["state", "progress", "variant", "showLabel", "label"] }, { kind: "component", type: CngxEmptyState, selector: "cngx-empty-state", inputs: ["title", "description", "state"] }, { kind: "directive", type: CngxLiveRegion, selector: "[cngxLiveRegion]", inputs: ["politeness", "atomic", "relevant"], exportAs: ["cngxLiveRegion"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CngxIncrementalVirtualizedBody, selector: "cngx-incremental-virtualized-body", inputs: ["items", "estimateSize", "itemTemplate", "trackItem"], outputs: ["focusEscaped"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
601
+ ], queries: [{ propertyName: "itemSlot", first: true, predicate: CngxIncrementalItem, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "emptySlot", first: true, predicate: CngxIncrementalEmpty, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "errorSlot", first: true, predicate: CngxIncrementalError, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "endSlot", first: true, predicate: CngxIncrementalEnd, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "loadingSlot", first: true, predicate: CngxIncrementalLoading, descendants: true, read: TemplateRef, isSignal: true }], exportAs: ["cngxIncrementalList"], hostDirectives: [{ directive: i1.CngxPaginate, inputs: ["cngxPageIndex", "pageIndex", "cngxPageSize", "pageSize", "total", "total", "state", "state"] }], ngImport: i0, template: "@switch (view()) {\n @case ('skeleton') {\n @if (loadingTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <cngx-progress\n class=\"cngx-incremental-list__progress\"\n variant=\"linear\"\n [state]=\"paginate.state()\"\n [label]=\"loadingLabel()\"\n />\n }\n }\n @case ('empty') {\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <cngx-empty-state class=\"cngx-incremental-list__empty\" [title]=\"emptyLabel()\" />\n }\n }\n @case ('error') {\n @if (errorTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"errorContext()\" />\n } @else {\n <div class=\"cngx-incremental-list__error\">\n <ng-container [ngTemplateOutlet]=\"builtinError\" />\n </div>\n }\n }\n @default {\n @if (virtualize()) {\n <cngx-incremental-virtualized-body\n [items]=\"items()\"\n [estimateSize]=\"estimateSize()\"\n [itemTemplate]=\"itemTemplate()\"\n [trackItem]=\"trackItem\"\n (focusEscaped)=\"handleFocusEscaped()\"\n />\n } @else {\n <ul class=\"cngx-incremental-list__items\" role=\"list\">\n @for (item of items(); track trackItem($index, item)) {\n <li class=\"cngx-incremental-list__item\">\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\"\n />\n } @else {\n {{ item }}\n }\n </li>\n }\n </ul>\n }\n @if (view() === 'content+error') {\n <!-- Subsequent-page failure: keep the accumulated list above visible and\n render a reachable retry, rather than silently swallowing the error. -->\n @if (errorTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"errorContext()\" />\n } @else {\n <div class=\"cngx-incremental-list__inline-error\">\n <ng-container [ngTemplateOutlet]=\"builtinError\" />\n </div>\n }\n } @else if (exhausted()) {\n @if (endTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <p class=\"cngx-incremental-list__message cngx-incremental-list__end\">{{ endLabel() }}</p>\n }\n } @else {\n <ng-content select=\"[cngxIncrementalTrigger]\" />\n }\n }\n}\n\n<ng-template #builtinError>\n <p class=\"cngx-incremental-list__error-text\">{{ errorViewLabel() }}</p>\n <button type=\"button\" class=\"cngx-incremental-list__retry\" (click)=\"retryFn()\">\n {{ retryLabel() }}\n </button>\n</ng-template>\n\n<span cngxLiveRegion class=\"cngx-incremental-list__sr\">{{ statusMessage() }}</span>\n", styles: ["@layer cngx.tokens{.cngx-incremental-list{display:block;--cngx-incremental-list-item-padding: var(--cngx-space-sm, .5rem);--cngx-incremental-list-message-padding: var(--cngx-space-md, 1rem);--cngx-incremental-list-error-gap: var(--cngx-space-sm, .5rem);--cngx-incremental-list-card-padding: var(--cngx-space-md, 1rem);--cngx-incremental-list-button-padding: var(--cngx-space-xs, .25rem) var(--cngx-space-md, 1rem);color:var(--cngx-incremental-list-text, var(--cngx-color-text, oklch(.2 .01 250)))}}@layer cngx.components{@scope(.cngx-incremental-list){.cngx-incremental-list__viewport{overflow-y:auto;max-block-size:var(--cngx-incremental-list-viewport-height, 60vh)}.cngx-incremental-list__items{margin:0;padding:0;list-style:none}.cngx-incremental-list__item{padding-block:var(--cngx-incremental-list-item-padding)}.cngx-incremental-list__message{margin:0;padding:var(--cngx-incremental-list-message-padding);text-align:center;color:var( --cngx-incremental-list-message-color, var(--cngx-color-text-muted, oklch(.5 .01 250)) )}.cngx-incremental-list__error,.cngx-incremental-list__inline-error{display:flex;flex-direction:column;align-items:center;gap:var(--cngx-incremental-list-error-gap);padding:var(--cngx-incremental-list-message-padding)}.cngx-incremental-list__inline-error{border-top:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}.cngx-incremental-list__error-text{margin:0;text-align:center;color:var(--cngx-incremental-list-error-color, var(--cngx-color-danger, oklch(.6 .18 25)))}.cngx-incremental-list__retry{font:inherit;color:var(--cngx-incremental-list-button-fg, var(--cngx-color-primary, oklch(.66 .19 50)));background:transparent;padding:var(--cngx-incremental-list-button-padding);border:1px solid var(--cngx-incremental-list-button-border, var(--cngx-color-border, oklch(.88 .005 250)));border-radius:var(--cngx-incremental-list-button-radius, var(--cngx-radius-sm, 6px));min-block-size:var(--cngx-target-min, 0px);cursor:pointer}.cngx-incremental-list__retry:hover{background:color-mix(in oklch,var(--cngx-incremental-list-button-fg, var(--cngx-color-primary, oklch(.66 .19 50))) 8%,transparent)}.cngx-incremental-list__retry:focus-visible{outline:2px solid var(--cngx-incremental-list-button-fg, var(--cngx-color-primary, oklch(.66 .19 50)));outline-offset:2px}.cngx-incremental-list__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}}@scope(.cngx-incremental-list[data-skin=divided]){.cngx-incremental-list__item:not(:last-child){border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}@scope(.cngx-incremental-list[data-skin=card]){:scope{background:var(--cngx-incremental-list-surface, var(--cngx-color-surface, oklch(1 0 0)));border:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)));border-radius:var(--cngx-incremental-list-radius, var(--cngx-radius-md, 8px));padding-inline:var(--cngx-incremental-list-card-padding);overflow:hidden}.cngx-incremental-list__item:not(:last-child){border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}@scope(.cngx-incremental-list[data-skin=divided][data-virtualize]){.cngx-incremental-list__item{border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}@scope(.cngx-incremental-list[data-skin=card][data-virtualize]){.cngx-incremental-list__item{border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}}\n"], dependencies: [{ kind: "component", type: CngxProgress, selector: "cngx-progress", inputs: ["state", "progress", "variant", "showLabel", "label"] }, { kind: "component", type: CngxEmptyState, selector: "cngx-empty-state", inputs: ["title", "description", "state"] }, { kind: "directive", type: CngxLiveRegion, selector: "[cngxLiveRegion]", inputs: ["politeness", "atomic", "relevant"], exportAs: ["cngxLiveRegion"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CngxIncrementalVirtualizedBody, selector: "cngx-incremental-virtualized-body", inputs: ["items", "estimateSize", "itemTemplate", "trackItem"], outputs: ["focusEscaped"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
593
602
  }
594
603
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxIncrementalList, decorators: [{
595
604
  type: Component,
@@ -630,7 +639,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
630
639
  '[attr.aria-busy]': 'paginate.isBusy()',
631
640
  '[attr.data-skin]': 'skin()',
632
641
  '[attr.data-virtualize]': "virtualize() ? '' : null",
633
- }, template: "@switch (view()) {\n @case ('skeleton') {\n @if (loadingTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <cngx-progress\n class=\"cngx-incremental-list__progress\"\n variant=\"linear\"\n [state]=\"paginate.state()\"\n [label]=\"loadingLabel()\"\n />\n }\n }\n @case ('empty') {\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <cngx-empty-state class=\"cngx-incremental-list__empty\" [title]=\"emptyLabel()\" />\n }\n }\n @case ('error') {\n @if (errorTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"errorContext()\" />\n } @else {\n <div class=\"cngx-incremental-list__error\">\n <ng-container [ngTemplateOutlet]=\"builtinError\" />\n </div>\n }\n }\n @default {\n @if (virtualize()) {\n <cngx-incremental-virtualized-body\n [items]=\"items()\"\n [estimateSize]=\"estimateSize()\"\n [itemTemplate]=\"itemTemplate()\"\n [trackItem]=\"trackItem\"\n (focusEscaped)=\"handleFocusEscaped()\"\n />\n } @else {\n <ul class=\"cngx-incremental-list__items\" role=\"list\">\n @for (item of items(); track trackItem($index, item)) {\n <li class=\"cngx-incremental-list__item\">\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\"\n />\n } @else {\n {{ item }}\n }\n </li>\n }\n </ul>\n }\n @if (view() === 'content+error') {\n <!-- Subsequent-page failure: keep the accumulated list above visible and\n render a reachable retry, rather than silently swallowing the error. -->\n @if (errorTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"errorContext()\" />\n } @else {\n <div class=\"cngx-incremental-list__inline-error\">\n <ng-container [ngTemplateOutlet]=\"builtinError\" />\n </div>\n }\n } @else if (exhausted()) {\n @if (endTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <p class=\"cngx-incremental-list__message cngx-incremental-list__end\">{{ endLabel() }}</p>\n }\n } @else {\n <ng-content select=\"[cngxIncrementalTrigger]\" />\n }\n }\n}\n\n<ng-template #builtinError>\n <p class=\"cngx-incremental-list__error-text\">{{ errorViewLabel() }}</p>\n <button type=\"button\" class=\"cngx-incremental-list__retry\" (click)=\"retryFn()\">\n {{ retryLabel() }}\n </button>\n</ng-template>\n\n<span cngxLiveRegion class=\"cngx-incremental-list__sr\">{{ statusMessage() }}</span>\n", styles: ["@layer cngx.tokens{.cngx-incremental-list{display:block;--cngx-incremental-list-item-padding: var(--cngx-space-sm, .5rem);--cngx-incremental-list-message-padding: var(--cngx-space-md, 1rem);--cngx-incremental-list-error-gap: var(--cngx-space-sm, .5rem);--cngx-incremental-list-card-padding: var(--cngx-space-md, 1rem);--cngx-incremental-list-button-padding: var(--cngx-space-xs, .25rem) var(--cngx-space-md, 1rem);color:var(--cngx-incremental-list-text, var(--cngx-color-text, oklch(.2 .01 250)))}}@layer cngx.components{@scope(.cngx-incremental-list){.cngx-incremental-list__viewport{overflow-y:auto;max-block-size:var(--cngx-incremental-list-viewport-height, 60vh)}.cngx-incremental-list__items{margin:0;padding:0;list-style:none}.cngx-incremental-list__item{padding-block:var(--cngx-incremental-list-item-padding)}.cngx-incremental-list__message{margin:0;padding:var(--cngx-incremental-list-message-padding);text-align:center;color:var( --cngx-incremental-list-message-color, var(--cngx-color-text-muted, oklch(.5 .01 250)) )}.cngx-incremental-list__error,.cngx-incremental-list__inline-error{display:flex;flex-direction:column;align-items:center;gap:var(--cngx-incremental-list-error-gap);padding:var(--cngx-incremental-list-message-padding)}.cngx-incremental-list__inline-error{border-top:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}.cngx-incremental-list__error-text{margin:0;text-align:center;color:var(--cngx-incremental-list-error-color, var(--cngx-color-danger, oklch(.6 .18 25)))}.cngx-incremental-list__retry{font:inherit;color:var(--cngx-incremental-list-button-fg, var(--cngx-color-primary, oklch(.66 .19 50)));background:transparent;padding:var(--cngx-incremental-list-button-padding);border:1px solid var(--cngx-incremental-list-button-border, var(--cngx-color-border, oklch(.88 .005 250)));border-radius:var(--cngx-incremental-list-button-radius, var(--cngx-radius-sm, 6px));cursor:pointer}.cngx-incremental-list__retry:hover{background:color-mix(in oklch,var(--cngx-incremental-list-button-fg, var(--cngx-color-primary, oklch(.66 .19 50))) 8%,transparent)}.cngx-incremental-list__retry:focus-visible{outline:2px solid var(--cngx-incremental-list-button-fg, var(--cngx-color-primary, oklch(.66 .19 50)));outline-offset:2px}.cngx-incremental-list__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}}@scope(.cngx-incremental-list[data-skin=divided]){.cngx-incremental-list__item:not(:last-child){border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}@scope(.cngx-incremental-list[data-skin=card]){:scope{background:var(--cngx-incremental-list-surface, var(--cngx-color-surface, oklch(1 0 0)));border:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)));border-radius:var(--cngx-incremental-list-radius, var(--cngx-radius-md, 8px));padding-inline:var(--cngx-incremental-list-card-padding);overflow:hidden}.cngx-incremental-list__item:not(:last-child){border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}@scope(.cngx-incremental-list[data-skin=divided][data-virtualize]){.cngx-incremental-list__item{border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}@scope(.cngx-incremental-list[data-skin=card][data-virtualize]){.cngx-incremental-list__item{border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}}\n"] }]
642
+ }, template: "@switch (view()) {\n @case ('skeleton') {\n @if (loadingTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <cngx-progress\n class=\"cngx-incremental-list__progress\"\n variant=\"linear\"\n [state]=\"paginate.state()\"\n [label]=\"loadingLabel()\"\n />\n }\n }\n @case ('empty') {\n @if (emptyTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <cngx-empty-state class=\"cngx-incremental-list__empty\" [title]=\"emptyLabel()\" />\n }\n }\n @case ('error') {\n @if (errorTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"errorContext()\" />\n } @else {\n <div class=\"cngx-incremental-list__error\">\n <ng-container [ngTemplateOutlet]=\"builtinError\" />\n </div>\n }\n }\n @default {\n @if (virtualize()) {\n <cngx-incremental-virtualized-body\n [items]=\"items()\"\n [estimateSize]=\"estimateSize()\"\n [itemTemplate]=\"itemTemplate()\"\n [trackItem]=\"trackItem\"\n (focusEscaped)=\"handleFocusEscaped()\"\n />\n } @else {\n <ul class=\"cngx-incremental-list__items\" role=\"list\">\n @for (item of items(); track trackItem($index, item)) {\n <li class=\"cngx-incremental-list__item\">\n @if (itemTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: $index }\"\n />\n } @else {\n {{ item }}\n }\n </li>\n }\n </ul>\n }\n @if (view() === 'content+error') {\n <!-- Subsequent-page failure: keep the accumulated list above visible and\n render a reachable retry, rather than silently swallowing the error. -->\n @if (errorTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"errorContext()\" />\n } @else {\n <div class=\"cngx-incremental-list__inline-error\">\n <ng-container [ngTemplateOutlet]=\"builtinError\" />\n </div>\n }\n } @else if (exhausted()) {\n @if (endTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <p class=\"cngx-incremental-list__message cngx-incremental-list__end\">{{ endLabel() }}</p>\n }\n } @else {\n <ng-content select=\"[cngxIncrementalTrigger]\" />\n }\n }\n}\n\n<ng-template #builtinError>\n <p class=\"cngx-incremental-list__error-text\">{{ errorViewLabel() }}</p>\n <button type=\"button\" class=\"cngx-incremental-list__retry\" (click)=\"retryFn()\">\n {{ retryLabel() }}\n </button>\n</ng-template>\n\n<span cngxLiveRegion class=\"cngx-incremental-list__sr\">{{ statusMessage() }}</span>\n", styles: ["@layer cngx.tokens{.cngx-incremental-list{display:block;--cngx-incremental-list-item-padding: var(--cngx-space-sm, .5rem);--cngx-incremental-list-message-padding: var(--cngx-space-md, 1rem);--cngx-incremental-list-error-gap: var(--cngx-space-sm, .5rem);--cngx-incremental-list-card-padding: var(--cngx-space-md, 1rem);--cngx-incremental-list-button-padding: var(--cngx-space-xs, .25rem) var(--cngx-space-md, 1rem);color:var(--cngx-incremental-list-text, var(--cngx-color-text, oklch(.2 .01 250)))}}@layer cngx.components{@scope(.cngx-incremental-list){.cngx-incremental-list__viewport{overflow-y:auto;max-block-size:var(--cngx-incremental-list-viewport-height, 60vh)}.cngx-incremental-list__items{margin:0;padding:0;list-style:none}.cngx-incremental-list__item{padding-block:var(--cngx-incremental-list-item-padding)}.cngx-incremental-list__message{margin:0;padding:var(--cngx-incremental-list-message-padding);text-align:center;color:var( --cngx-incremental-list-message-color, var(--cngx-color-text-muted, oklch(.5 .01 250)) )}.cngx-incremental-list__error,.cngx-incremental-list__inline-error{display:flex;flex-direction:column;align-items:center;gap:var(--cngx-incremental-list-error-gap);padding:var(--cngx-incremental-list-message-padding)}.cngx-incremental-list__inline-error{border-top:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}.cngx-incremental-list__error-text{margin:0;text-align:center;color:var(--cngx-incremental-list-error-color, var(--cngx-color-danger, oklch(.6 .18 25)))}.cngx-incremental-list__retry{font:inherit;color:var(--cngx-incremental-list-button-fg, var(--cngx-color-primary, oklch(.66 .19 50)));background:transparent;padding:var(--cngx-incremental-list-button-padding);border:1px solid var(--cngx-incremental-list-button-border, var(--cngx-color-border, oklch(.88 .005 250)));border-radius:var(--cngx-incremental-list-button-radius, var(--cngx-radius-sm, 6px));min-block-size:var(--cngx-target-min, 0px);cursor:pointer}.cngx-incremental-list__retry:hover{background:color-mix(in oklch,var(--cngx-incremental-list-button-fg, var(--cngx-color-primary, oklch(.66 .19 50))) 8%,transparent)}.cngx-incremental-list__retry:focus-visible{outline:2px solid var(--cngx-incremental-list-button-fg, var(--cngx-color-primary, oklch(.66 .19 50)));outline-offset:2px}.cngx-incremental-list__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}}@scope(.cngx-incremental-list[data-skin=divided]){.cngx-incremental-list__item:not(:last-child){border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}@scope(.cngx-incremental-list[data-skin=card]){:scope{background:var(--cngx-incremental-list-surface, var(--cngx-color-surface, oklch(1 0 0)));border:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)));border-radius:var(--cngx-incremental-list-radius, var(--cngx-radius-md, 8px));padding-inline:var(--cngx-incremental-list-card-padding);overflow:hidden}.cngx-incremental-list__item:not(:last-child){border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}@scope(.cngx-incremental-list[data-skin=divided][data-virtualize]){.cngx-incremental-list__item{border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}@scope(.cngx-incremental-list[data-skin=card][data-virtualize]){.cngx-incremental-list__item{border-bottom:1px solid var(--cngx-incremental-list-divider, var(--cngx-color-border, oklch(.88 .005 250)))}}}\n"] }]
634
643
  }], ctorParameters: () => [], propDecorators: { skin: [{ type: i0.Input, args: [{ isSignal: true, alias: "skin", required: false }] }], virtualize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualize", required: false }] }], estimateSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "estimateSize", required: false }] }], pageIndexChange: [{ type: i0.Output, args: ["pageIndexChange"] }], pageSizeChange: [{ type: i0.Output, args: ["pageSizeChange"] }], retry: [{ type: i0.Output, args: ["retry"] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackBy", required: false }] }], itemSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CngxIncrementalItem), { ...{ read: TemplateRef }, isSignal: true }] }], emptySlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CngxIncrementalEmpty), { ...{ read: TemplateRef }, isSignal: true }] }], errorSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CngxIncrementalError), { ...{ read: TemplateRef }, isSignal: true }] }], endSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CngxIncrementalEnd), { ...{ read: TemplateRef }, isSignal: true }] }], loadingSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CngxIncrementalLoading), { ...{ read: TemplateRef }, isSignal: true }] }] } });
635
644
 
636
645
  /**