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

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 (101) hide show
  1. package/README.md +0 -1
  2. package/a11y/README.md +11 -5
  3. package/accordion/README.md +4 -2
  4. package/breadcrumb/README.md +262 -0
  5. package/collection/README.md +6 -0
  6. package/command-palette/README.md +227 -0
  7. package/data-grid-accordion/README.md +76 -2
  8. package/feedback/README.md +40 -0
  9. package/fesm2022/cngx-ui-a11y.mjs +189 -57
  10. package/fesm2022/cngx-ui-a11y.mjs.map +1 -1
  11. package/fesm2022/cngx-ui-accordion.mjs +120 -36
  12. package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
  13. package/fesm2022/cngx-ui-action-button.mjs +121 -56
  14. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  15. package/fesm2022/cngx-ui-breadcrumb.mjs +228 -108
  16. package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
  17. package/fesm2022/cngx-ui-chart-panel.mjs +180 -23
  18. package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -1
  19. package/fesm2022/cngx-ui-collection.mjs +204 -62
  20. package/fesm2022/cngx-ui-collection.mjs.map +1 -1
  21. package/fesm2022/cngx-ui-command-palette.mjs +395 -119
  22. package/fesm2022/cngx-ui-command-palette.mjs.map +1 -1
  23. package/fesm2022/cngx-ui-context-menu.mjs +209 -40
  24. package/fesm2022/cngx-ui-context-menu.mjs.map +1 -1
  25. package/fesm2022/cngx-ui-data-grid-accordion.mjs +498 -101
  26. package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
  27. package/fesm2022/cngx-ui-empty-state.mjs +16 -6
  28. package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
  29. package/fesm2022/cngx-ui-feedback.mjs +1074 -460
  30. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  31. package/fesm2022/cngx-ui-mat-accordion.mjs +76 -7
  32. package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
  33. package/fesm2022/cngx-ui-mat-paginator.mjs +67 -24
  34. package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
  35. package/fesm2022/cngx-ui-mat-stepper.mjs +72 -47
  36. package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
  37. package/fesm2022/cngx-ui-mat-tabs.mjs +555 -204
  38. package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
  39. package/fesm2022/cngx-ui-overlay.mjs +69 -13
  40. package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
  41. package/fesm2022/cngx-ui-paginator.mjs +553 -198
  42. package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
  43. package/fesm2022/cngx-ui-sidenav.mjs +344 -109
  44. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
  45. package/fesm2022/cngx-ui-skeleton.mjs +4 -16
  46. package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
  47. package/fesm2022/cngx-ui-speak.mjs +107 -8
  48. package/fesm2022/cngx-ui-speak.mjs.map +1 -1
  49. package/fesm2022/cngx-ui-stat-card.mjs +146 -46
  50. package/fesm2022/cngx-ui-stat-card.mjs.map +1 -1
  51. package/fesm2022/cngx-ui-stepper.mjs +234 -99
  52. package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
  53. package/fesm2022/cngx-ui-tabs.mjs +88 -25
  54. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  55. package/fesm2022/cngx-ui-timeline.mjs +98 -23
  56. package/fesm2022/cngx-ui-timeline.mjs.map +1 -1
  57. package/fesm2022/cngx-ui-toc.mjs +101 -33
  58. package/fesm2022/cngx-ui-toc.mjs.map +1 -1
  59. package/fesm2022/cngx-ui.mjs +15 -20
  60. package/fesm2022/cngx-ui.mjs.map +1 -1
  61. package/mat-paginator/README.md +9 -2
  62. package/mat-tabs/README.md +30 -6
  63. package/mat-tabs/styles/mat-tabs.css +188 -42
  64. package/overlay/README.md +9 -4
  65. package/package.json +31 -7
  66. package/paginator/README.md +8 -4
  67. package/schematics/collection.json +9 -0
  68. package/schematics/ng-add/index.js +9 -0
  69. package/schematics/ng-add/schema.json +91 -0
  70. package/schematics/package.json +3 -0
  71. package/sidenav/README.md +33 -11
  72. package/speak/README.md +3 -2
  73. package/stepper/README.md +14 -2
  74. package/timeline/README.md +1 -1
  75. package/toc/README.md +4 -1
  76. package/types/cngx-ui-a11y.d.ts +121 -30
  77. package/types/cngx-ui-accordion.d.ts +100 -28
  78. package/types/cngx-ui-action-button.d.ts +44 -3
  79. package/types/cngx-ui-breadcrumb.d.ts +167 -60
  80. package/types/cngx-ui-chart-panel.d.ts +122 -18
  81. package/types/cngx-ui-collection.d.ts +157 -55
  82. package/types/cngx-ui-command-palette.d.ts +297 -183
  83. package/types/cngx-ui-context-menu.d.ts +140 -10
  84. package/types/cngx-ui-data-grid-accordion.d.ts +278 -39
  85. package/types/cngx-ui-empty-state.d.ts +9 -2
  86. package/types/cngx-ui-feedback.d.ts +605 -59
  87. package/types/cngx-ui-mat-accordion.d.ts +30 -1
  88. package/types/cngx-ui-mat-paginator.d.ts +37 -8
  89. package/types/cngx-ui-mat-stepper.d.ts +23 -11
  90. package/types/cngx-ui-mat-tabs.d.ts +250 -34
  91. package/types/cngx-ui-overlay.d.ts +56 -10
  92. package/types/cngx-ui-paginator.d.ts +425 -136
  93. package/types/cngx-ui-sidenav.d.ts +248 -74
  94. package/types/cngx-ui-skeleton.d.ts +6 -7
  95. package/types/cngx-ui-speak.d.ts +118 -5
  96. package/types/cngx-ui-stat-card.d.ts +117 -33
  97. package/types/cngx-ui-stepper.d.ts +88 -49
  98. package/types/cngx-ui-tabs.d.ts +6 -4
  99. package/types/cngx-ui-timeline.d.ts +35 -11
  100. package/types/cngx-ui-toc.d.ts +93 -16
  101. package/types/cngx-ui.d.ts +7 -4
@@ -1,12 +1,31 @@
1
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';
2
+ import { InjectionToken, inject, signal, input, computed, untracked, viewChild, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, makeEnvironmentProviders, DestroyRef, Directive, HostAttributeToken, ElementRef } from '@angular/core';
3
+ import { CngxLiveRegion } from '@cngx/common/a11y';
4
+ import { createFilledOverrideMerge, nextUid, createOverrideMerge } from '@cngx/core/utils';
5
+ import { createLanguageSection } from '@cngx/core/i18n';
4
6
 
5
7
  /**
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.
8
+ * The English chart-panel section: the single source of the chart panel's
9
+ * English copy. The `CNGX_CHART_PANEL_CONFIG` labels default to it.
10
+ *
11
+ * @category ui/chart-panel/i18n
12
+ * @since 0.1.0
13
+ * @relatedTo CNGX_CHART_PANEL_CONFIG
14
+ */
15
+ const CNGX_CHART_PANEL_LANGUAGE_EN = {
16
+ busy: 'Updating',
17
+ };
18
+
19
+ /**
20
+ * @internal The chart-panel section of the active pack over the English section,
21
+ * shared app-wide. Consumers override copy through `withChartPanelAriaLabels`.
22
+ */
23
+ const injectChartPanelSiteCopy = createLanguageSection('chartPanel', CNGX_CHART_PANEL_LANGUAGE_EN);
24
+
25
+ /**
26
+ * Library defaults for the chart-panel configuration cascade. Carries no copy:
27
+ * the `ariaLabels` defaults are the `chartPanel` section of the language pack;
28
+ * single keys ride the `withChartPanelAriaLabels` feature.
10
29
  *
11
30
  * Exported for intra-lib consumers but **NOT** re-exported from
12
31
  * `public-api.ts` - downstream consumers reach the defaults via
@@ -15,9 +34,6 @@ import { nextUid } from '@cngx/core/utils';
15
34
  * @internal
16
35
  */
17
36
  const CNGX_CHART_PANEL_DEFAULTS = {
18
- ariaLabels: {
19
- busy: 'Updating',
20
- },
21
37
  legendPosition: 'bottom',
22
38
  };
23
39
  /**
@@ -48,6 +64,19 @@ const CNGX_CHART_PANEL_CONFIG = new InjectionToken('CNGX_CHART_PANEL_CONFIG', {
48
64
  function injectChartPanelConfig() {
49
65
  return inject(CNGX_CHART_PANEL_CONFIG);
50
66
  }
67
+ /**
68
+ * The resolved strings of the chart-panel config in scope, every key the
69
+ * config leaves unset (also a key an override sets to `undefined`) filled from
70
+ * the `chartPanel` section of the active pack, as a Signal that follows a
71
+ * runtime language switch. Runs in injection context; read it inside a `computed()`, a
72
+ * template or a handler, and untracked where it builds live-region text.
73
+ *
74
+ * @category ui/chart-panel
75
+ * @since 0.1.0
76
+ */
77
+ function injectChartPanelAriaLabels() {
78
+ return createFilledOverrideMerge(injectChartPanelSiteCopy(), injectChartPanelConfig().ariaLabels);
79
+ }
51
80
 
52
81
  /** DI token carrying the {@link CngxChartPanelRegistry} a `CngxChartPanel` provides. */
53
82
  const CNGX_CHART_PANEL = new InjectionToken('CNGX_CHART_PANEL');
@@ -73,6 +102,8 @@ const CNGX_CHART_PANEL = new InjectionToken('CNGX_CHART_PANEL');
73
102
  * region would hold back the projected chart's own live announcements and tell
74
103
  * AT that a perfectly stable chart is updating - the same boundary violation in
75
104
  * the a11y layer that duplicating its view switch would be in the state layer.
105
+ * A hidden status region (outside the busy header) announces the configured
106
+ * `ariaLabels.busy` string while the panel-level operation runs.
76
107
  *
77
108
  * ```html
78
109
  * <cngx-chart-panel>
@@ -102,6 +133,7 @@ const CNGX_CHART_PANEL = new InjectionToken('CNGX_CHART_PANEL');
102
133
  class CngxChartPanel {
103
134
  titleId = signal(undefined, ...(ngDevMode ? [{ debugName: "titleId" }] : /* istanbul ignore next */ []));
104
135
  config = injectChartPanelConfig();
136
+ ariaLabels = injectChartPanelAriaLabels();
105
137
  /**
106
138
  * Panel-level async envelope - the one driving the header chrome, not the
107
139
  * chart's data. Bind the chart's own `[state]` to the chart; bind a
@@ -116,6 +148,46 @@ class CngxChartPanel {
116
148
  legendPosition = input(this.config.legendPosition ?? 'bottom', ...(ngDevMode ? [{ debugName: "legendPosition" }] : /* istanbul ignore next */ []));
117
149
  /** @internal Panel-level busy, never the chart's data-loading state. */
118
150
  panelBusy = computed(() => this.state()?.isBusy() ?? false, ...(ngDevMode ? [{ debugName: "panelBusy" }] : /* istanbul ignore next */ []));
151
+ /** {@inheritDoc CngxChartPanelRegistry.busy} */
152
+ busy = this.panelBusy;
153
+ /** @internal Names why the action cluster is disabled while busy; follows a language switch. */
154
+ busyLabel = computed(() => this.ariaLabels().busy, ...(ngDevMode ? [{ debugName: "busyLabel" }] : /* istanbul ignore next */ []));
155
+ /**
156
+ * @internal Text of the hidden status region. The label is read untracked, so
157
+ * a language switch does not re-announce a running busy phase; the next one
158
+ * speaks the new language.
159
+ */
160
+ busyStatus = computed(() => this.panelBusy() ? untracked(() => this.ariaLabels().busy) : '', ...(ngDevMode ? [{ debugName: "busyStatus" }] : /* istanbul ignore next */ []));
161
+ /** {@inheritDoc CngxChartPanelRegistry.busyDescriptionId} */
162
+ busyDescriptionId = `${nextUid('cngx-chart-panel')}-busy`;
163
+ actionSlot = viewChild.required('actionSlot');
164
+ constructor() {
165
+ // Keyboard guard for the aria-disabled action cluster. `pointer-events:
166
+ // none` stops clicks while busy, but a focused action still activates on
167
+ // Enter/Space. Capture phase, so the guard runs before any consumer key
168
+ // handler on the projected actions - a bubble listener would fire after
169
+ // them and hold back only the native activation. preventDefault on
170
+ // keydown stops the synthesized Enter click; keyup covers browsers that
171
+ // activate buttons on Space release.
172
+ effect((onCleanup) => {
173
+ const slot = this.actionSlot().nativeElement;
174
+ const guard = (event) => {
175
+ if (!this.panelBusy()) {
176
+ return;
177
+ }
178
+ if (event.key === 'Enter' || event.key === ' ') {
179
+ event.preventDefault();
180
+ event.stopPropagation();
181
+ }
182
+ };
183
+ slot.addEventListener('keydown', guard, true);
184
+ slot.addEventListener('keyup', guard, true);
185
+ onCleanup(() => {
186
+ slot.removeEventListener('keydown', guard, true);
187
+ slot.removeEventListener('keyup', guard, true);
188
+ });
189
+ });
190
+ }
119
191
  /** {@inheritDoc CngxChartPanelRegistry.registerTitle} */
120
192
  registerTitle(id) {
121
193
  this.titleId.set(id);
@@ -131,7 +203,7 @@ class CngxChartPanel {
131
203
  */
132
204
  labelledBy = computed(() => this.titleId() ?? null, ...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
133
205
  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: `
206
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.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 }], viewQueries: [{ propertyName: "actionSlot", first: true, predicate: ["actionSlot"], descendants: true, isSignal: true }], ngImport: i0, template: `
135
207
  <header class="cngx-chart-panel__header" [attr.aria-busy]="panelBusy() || null">
136
208
  <div class="cngx-chart-panel__heading">
137
209
  <ng-content select="[cngxChartPanelTitle]" />
@@ -142,15 +214,29 @@ class CngxChartPanel {
142
214
  second range change is not invited into an in-flight one. The cluster
143
215
  stays in the DOM and in the a11y tree; only the state flips (Pillar
144
216
  2). Deliberately not inert: that would hide the actions from AT
145
- entirely and the aria-disabled would never be announced. -->
217
+ entirely and the aria-disabled would never be announced. A group,
218
+ since aria-disabled is not allowed on a generic container; it
219
+ covers any projected content, while each [cngxChartPanelActions]
220
+ control also carries the state and the reason itself. -->
146
221
  <div
222
+ #actionSlot
147
223
  class="cngx-chart-panel__action-slot"
224
+ role="group"
148
225
  [attr.aria-disabled]="panelBusy() || null"
226
+ [attr.aria-describedby]="panelBusy() ? busyDescriptionId : null"
149
227
  >
150
228
  <ng-content select="[cngxChartPanelActions]" />
151
229
  </div>
152
230
  </header>
153
231
 
232
+ <!-- Why the actions are disabled. Always in the DOM; only the
233
+ aria-describedby reference above is gated on the busy state. -->
234
+ <span
235
+ [id]="busyDescriptionId"
236
+ class="cngx-chart-panel__sr cngx-chart-panel__busy-description"
237
+ >{{ busyLabel() }}</span
238
+ >
239
+
154
240
  <!-- One legend outlet, placed by the CSS order property. A duplicated
155
241
  ng-content selector would leave the second outlet permanently empty,
156
242
  and the legend carries no focusable content, so visual reordering
@@ -166,11 +252,18 @@ class CngxChartPanel {
166
252
  </div>
167
253
 
168
254
  <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 });
255
+
256
+ <!-- Hidden status region for the panel-level busy phase. Outside the
257
+ aria-busy header on purpose: a live region inside a busy container
258
+ has its announcements suppressed. -->
259
+ <span cngxLiveRegion class="cngx-chart-panel__sr cngx-chart-panel__status">{{
260
+ busyStatus()
261
+ }}</span>
262
+ `, 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)) )}.cngx-chart-panel__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-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"], dependencies: [{ kind: "directive", type: CngxLiveRegion, selector: "[cngxLiveRegion]", inputs: ["politeness", "atomic", "relevant"], exportAs: ["cngxLiveRegion"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
170
263
  }
171
264
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxChartPanel, decorators: [{
172
265
  type: Component,
173
- args: [{ selector: 'cngx-chart-panel', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: CNGX_CHART_PANEL, useExisting: CngxChartPanel }], host: {
266
+ args: [{ selector: 'cngx-chart-panel', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CngxLiveRegion], providers: [{ provide: CNGX_CHART_PANEL, useExisting: CngxChartPanel }], host: {
174
267
  class: 'cngx-chart-panel',
175
268
  role: 'group',
176
269
  '[attr.aria-labelledby]': 'labelledBy()',
@@ -187,15 +280,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
187
280
  second range change is not invited into an in-flight one. The cluster
188
281
  stays in the DOM and in the a11y tree; only the state flips (Pillar
189
282
  2). Deliberately not inert: that would hide the actions from AT
190
- entirely and the aria-disabled would never be announced. -->
283
+ entirely and the aria-disabled would never be announced. A group,
284
+ since aria-disabled is not allowed on a generic container; it
285
+ covers any projected content, while each [cngxChartPanelActions]
286
+ control also carries the state and the reason itself. -->
191
287
  <div
288
+ #actionSlot
192
289
  class="cngx-chart-panel__action-slot"
290
+ role="group"
193
291
  [attr.aria-disabled]="panelBusy() || null"
292
+ [attr.aria-describedby]="panelBusy() ? busyDescriptionId : null"
194
293
  >
195
294
  <ng-content select="[cngxChartPanelActions]" />
196
295
  </div>
197
296
  </header>
198
297
 
298
+ <!-- Why the actions are disabled. Always in the DOM; only the
299
+ aria-describedby reference above is gated on the busy state. -->
300
+ <span
301
+ [id]="busyDescriptionId"
302
+ class="cngx-chart-panel__sr cngx-chart-panel__busy-description"
303
+ >{{ busyLabel() }}</span
304
+ >
305
+
199
306
  <!-- One legend outlet, placed by the CSS order property. A duplicated
200
307
  ng-content selector would leave the second outlet permanently empty,
201
308
  and the legend carries no focusable content, so visual reordering
@@ -211,9 +318,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
211
318
  </div>
212
319
 
213
320
  <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
321
 
322
+ <!-- Hidden status region for the panel-level busy phase. Outside the
323
+ aria-busy header on purpose: a live region inside a busy container
324
+ has its announcements suppressed. -->
325
+ <span cngxLiveRegion class="cngx-chart-panel__sr cngx-chart-panel__status">{{
326
+ busyStatus()
327
+ }}</span>
328
+ `, 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)) )}.cngx-chart-panel__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-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"] }]
329
+ }], ctorParameters: () => [], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], actionSlot: [{ type: i0.ViewChild, args: ['actionSlot', { isSignal: true }] }] } });
330
+
331
+ const NO_ARIA_LABELS = {};
217
332
  /**
218
333
  * Reduces a list of feature objects into a partial config - last write wins
219
334
  * per sub-tree.
@@ -225,7 +340,7 @@ function reduceFeatures(features) {
225
340
  for (const f of features) {
226
341
  switch (f.kind) {
227
342
  case 'ariaLabels':
228
- out.ariaLabels = { ...out.ariaLabels, ...f.payload };
343
+ out.ariaLabels = createOverrideMerge(out.ariaLabels ?? NO_ARIA_LABELS, f.payload);
229
344
  break;
230
345
  case 'legendPosition':
231
346
  out.legendPosition = f.payload.legendPosition;
@@ -242,7 +357,7 @@ function reduceFeatures(features) {
242
357
  */
243
358
  function mergeConfig(base, partial) {
244
359
  return {
245
- ariaLabels: { ...base.ariaLabels, ...partial.ariaLabels },
360
+ ariaLabels: createOverrideMerge(base.ariaLabels ?? NO_ARIA_LABELS, partial.ariaLabels),
246
361
  legendPosition: partial.legendPosition ?? base.legendPosition,
247
362
  };
248
363
  }
@@ -297,8 +412,11 @@ function provideChartPanelConfigAt(...features) {
297
412
  }
298
413
 
299
414
  /**
300
- * Override the chart-panel's string fallbacks. Library defaults are English;
301
- * this is the hook a localised app uses.
415
+ * Override the chart-panel's string fallbacks. The defaults come from the
416
+ * `chartPanel` section of the language pack (English without one); this
417
+ * overrides single keys on top of it. Pass a `Signal` to switch the
418
+ * language at runtime; the busy status speaks the new language with the next
419
+ * busy phase.
302
420
  *
303
421
  * @category ui/chart-panel
304
422
  * @since 0.1.0
@@ -317,6 +435,9 @@ function withChartPanelLegendPosition(position) {
317
435
  return { kind: 'legendPosition', payload: { legendPosition: position } };
318
436
  }
319
437
 
438
+ // aria-disabled is allowed on controls and on explicit widget / group roles,
439
+ // not on a generic wrapper.
440
+ const CONTROL_SELECTOR = 'a[href], button, input, select, textarea, [role]';
320
441
  /**
321
442
  * Marks the panel's title. Its generated id becomes the panel's
322
443
  * `aria-labelledby`, so the whole region reads as one named group instead of
@@ -378,21 +499,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
378
499
  * while a panel-level operation runs, so a user cannot fire a second range
379
500
  * change into an in-flight one.
380
501
  *
502
+ * On a control (a native button, link or form field, or any element with an
503
+ * explicit `role`) the marker also puts that state on the control itself:
504
+ * `aria-disabled="true"` plus an `aria-describedby` to the panel's busy reason
505
+ * ("Updating" by default, `ariaLabels.busy`), both only while the panel is
506
+ * busy, so focusing the action announces why it is unavailable. A static
507
+ * `aria-disabled` / `aria-describedby` the consumer wrote on the element is
508
+ * kept and merged. On a plain wrapper element the marker adds nothing (the
509
+ * attribute is not allowed on a generic); the slot group carries the state.
510
+ * Activation stays blocked by the slot (pointer and Enter/Space), so the
511
+ * control keeps its focusability instead of turning natively `disabled`.
512
+ *
381
513
  * @category ui/chart-panel
382
514
  * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts
383
515
  * @since 0.1.0
384
516
  * @relatedTo CngxChartPanel
385
517
  */
386
518
  class CngxChartPanelActions {
519
+ panel = inject(CNGX_CHART_PANEL, { optional: true });
520
+ ownDisabled = inject(new HostAttributeToken('aria-disabled'), {
521
+ optional: true,
522
+ });
523
+ ownDescribedBy = inject(new HostAttributeToken('aria-describedby'), {
524
+ optional: true,
525
+ });
526
+ carriesState = inject(ElementRef).nativeElement.matches(CONTROL_SELECTOR);
527
+ busy = computed(() => this.carriesState && (this.panel?.busy() ?? false), ...(ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []));
528
+ /** @internal The panel busy state on the control, else the consumer's own value. */
529
+ ariaDisabled = computed(() => (this.busy() ? 'true' : this.ownDisabled), ...(ngDevMode ? [{ debugName: "ariaDisabled" }] : /* istanbul ignore next */ []));
530
+ /**
531
+ * @internal The busy reason, referenced only while busy (the node itself is
532
+ * always rendered), appended to the consumer's own description.
533
+ */
534
+ describedBy = computed(() => {
535
+ if (!this.busy() || !this.panel) {
536
+ return this.ownDescribedBy;
537
+ }
538
+ return [this.ownDescribedBy, this.panel.busyDescriptionId].filter(Boolean).join(' ');
539
+ }, ...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
387
540
  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 });
541
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CngxChartPanelActions, isStandalone: true, selector: "[cngxChartPanelActions]", host: { properties: { "attr.aria-disabled": "ariaDisabled()", "attr.aria-describedby": "describedBy()" }, classAttribute: "cngx-chart-panel__actions" }, ngImport: i0 });
389
542
  }
390
543
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CngxChartPanelActions, decorators: [{
391
544
  type: Directive,
392
545
  args: [{
393
546
  selector: '[cngxChartPanelActions]',
394
547
  standalone: true,
395
- host: { class: 'cngx-chart-panel__actions' },
548
+ host: {
549
+ class: 'cngx-chart-panel__actions',
550
+ '[attr.aria-disabled]': 'ariaDisabled()',
551
+ '[attr.aria-describedby]': 'describedBy()',
552
+ },
396
553
  }]
397
554
  }] });
398
555
  /**
@@ -425,5 +582,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
425
582
  * Generated bundle index. Do not edit.
426
583
  */
427
584
 
428
- export { CNGX_CHART_PANEL, CNGX_CHART_PANEL_CONFIG, CngxChartPanel, CngxChartPanelActions, CngxChartPanelFooter, CngxChartPanelSubtitle, CngxChartPanelTitle, injectChartPanelConfig, provideChartPanelConfig, provideChartPanelConfigAt, withChartPanelAriaLabels, withChartPanelLegendPosition };
585
+ export { CNGX_CHART_PANEL, CNGX_CHART_PANEL_CONFIG, CNGX_CHART_PANEL_LANGUAGE_EN, CngxChartPanel, CngxChartPanelActions, CngxChartPanelFooter, CngxChartPanelSubtitle, CngxChartPanelTitle, injectChartPanelAriaLabels, injectChartPanelConfig, provideChartPanelConfig, provideChartPanelConfigAt, withChartPanelAriaLabels, withChartPanelLegendPosition };
429
586
  //# sourceMappingURL=cngx-ui-chart-panel.mjs.map
@@ -1 +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;;;;;;;;;;;;;;;;;;;;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EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAArB,qBAAqB,EAAA,YAAA,EAAA,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;;;;"}
1
+ {"version":3,"file":"cngx-ui-chart-panel.mjs","sources":["../../../projects/ui/chart-panel/i18n/chart-panel-language-section.ts","../../../projects/ui/chart-panel/i18n/chart-panel-i18n.ts","../../../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":["/**\n * The chart-panel section of a {@link CngxLanguagePack}: the copy of\n * `CngxChartPanel`. It feeds the `ariaLabels` of `CNGX_CHART_PANEL_CONFIG`; a\n * key set through `withChartPanelAriaLabels` still wins.\n *\n * @category ui/chart-panel/i18n\n * @since 0.1.0\n * @relatedTo CNGX_CHART_PANEL_CONFIG, withChartPanelAriaLabels\n */\nexport interface CngxChartPanelLanguageSection {\n /** Accessible name announced while a panel-level operation runs. */\n readonly busy: string;\n}\n\n/**\n * The English chart-panel section: the single source of the chart panel's\n * English copy. The `CNGX_CHART_PANEL_CONFIG` labels default to it.\n *\n * @category ui/chart-panel/i18n\n * @since 0.1.0\n * @relatedTo CNGX_CHART_PANEL_CONFIG\n */\nexport const CNGX_CHART_PANEL_LANGUAGE_EN: CngxChartPanelLanguageSection = {\n busy: 'Updating',\n};\n\ndeclare module '@cngx/core/i18n' {\n interface CngxLanguagePack {\n readonly chartPanel: CngxChartPanelLanguageSection;\n }\n}\n","import { createLanguageSection } from '@cngx/core/i18n';\n\nimport { CNGX_CHART_PANEL_LANGUAGE_EN } from './chart-panel-language-section';\n\n/**\n * @internal The chart-panel section of the active pack over the English section,\n * shared app-wide. Consumers override copy through `withChartPanelAriaLabels`.\n */\nexport const injectChartPanelSiteCopy = createLanguageSection(\n 'chartPanel',\n CNGX_CHART_PANEL_LANGUAGE_EN,\n);\n","import { InjectionToken } from '@angular/core';\n\nimport type { CngxChartPanelConfig } from './chart-panel.config';\n\n/**\n * Library defaults for the chart-panel configuration cascade. Carries no copy:\n * the `ariaLabels` defaults are the `chartPanel` section of the language pack;\n * single keys ride the `withChartPanelAriaLabels` feature.\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 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, type Signal } from '@angular/core';\nimport { createFilledOverrideMerge } from '@cngx/core/utils';\n\nimport { injectChartPanelSiteCopy } from '../i18n/chart-panel-i18n';\nimport type { CngxChartPanelAriaLabels, 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\n/**\n * The resolved strings of the chart-panel config in scope, every key the\n * config leaves unset (also a key an override sets to `undefined`) filled from\n * the `chartPanel` section of the active pack, as a Signal that follows a\n * runtime language switch. Runs in injection context; read it inside a `computed()`, a\n * template or a handler, and untracked where it builds live-region text.\n *\n * @category ui/chart-panel\n * @since 0.1.0\n */\nexport function injectChartPanelAriaLabels(): Signal<Required<CngxChartPanelAriaLabels>> {\n return createFilledOverrideMerge(injectChartPanelSiteCopy(), injectChartPanelConfig().ariaLabels);\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Contract the panel exposes to its projected slots. The title slot registers\n * its generated id on init and the panel derives its `aria-labelledby` from\n * it; the actions slot reads the panel-level busy state and the id of the\n * node that says why the actions are unavailable.\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 * Panel-level busy (the panel `[state]`, never the chart's data). The\n * actions slot reads it to mark each projected action disabled.\n */\n readonly busy: Signal<boolean>;\n /**\n * Id of the always-rendered node naming why the actions are disabled while\n * busy. Referenced only while `busy()` holds.\n */\n readonly busyDescriptionId: string;\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 effect,\n type ElementRef,\n input,\n type Signal,\n signal,\n untracked,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { CngxLiveRegion } from '@cngx/common/a11y';\nimport { type CngxAsyncState, nextUid } from '@cngx/core/utils';\n\nimport {\n injectChartPanelAriaLabels,\n injectChartPanelConfig,\n} 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 * A hidden status region (outside the busy header) announces the configured\n * `ariaLabels.busy` string while the panel-level operation runs.\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 imports: [CngxLiveRegion],\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. A group,\n since aria-disabled is not allowed on a generic container; it\n covers any projected content, while each [cngxChartPanelActions]\n control also carries the state and the reason itself. -->\n <div\n #actionSlot\n class=\"cngx-chart-panel__action-slot\"\n role=\"group\"\n [attr.aria-disabled]=\"panelBusy() || null\"\n [attr.aria-describedby]=\"panelBusy() ? busyDescriptionId : null\"\n >\n <ng-content select=\"[cngxChartPanelActions]\" />\n </div>\n </header>\n\n <!-- Why the actions are disabled. Always in the DOM; only the\n aria-describedby reference above is gated on the busy state. -->\n <span\n [id]=\"busyDescriptionId\"\n class=\"cngx-chart-panel__sr cngx-chart-panel__busy-description\"\n >{{ busyLabel() }}</span\n >\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 <!-- Hidden status region for the panel-level busy phase. Outside the\n aria-busy header on purpose: a live region inside a busy container\n has its announcements suppressed. -->\n <span cngxLiveRegion class=\"cngx-chart-panel__sr cngx-chart-panel__status\">{{\n busyStatus()\n }}</span>\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 private readonly ariaLabels = injectChartPanelAriaLabels();\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.busy} */\n readonly busy: Signal<boolean> = this.panelBusy;\n\n /** @internal Names why the action cluster is disabled while busy; follows a language switch. */\n protected readonly busyLabel = computed(() => this.ariaLabels().busy);\n\n /**\n * @internal Text of the hidden status region. The label is read untracked, so\n * a language switch does not re-announce a running busy phase; the next one\n * speaks the new language.\n */\n protected readonly busyStatus = computed(() =>\n this.panelBusy() ? untracked(() => this.ariaLabels().busy) : '',\n );\n\n /** {@inheritDoc CngxChartPanelRegistry.busyDescriptionId} */\n readonly busyDescriptionId = `${nextUid('cngx-chart-panel')}-busy`;\n\n private readonly actionSlot = viewChild.required<ElementRef<HTMLElement>>('actionSlot');\n\n constructor() {\n // Keyboard guard for the aria-disabled action cluster. `pointer-events:\n // none` stops clicks while busy, but a focused action still activates on\n // Enter/Space. Capture phase, so the guard runs before any consumer key\n // handler on the projected actions - a bubble listener would fire after\n // them and hold back only the native activation. preventDefault on\n // keydown stops the synthesized Enter click; keyup covers browsers that\n // activate buttons on Space release.\n effect((onCleanup) => {\n const slot = this.actionSlot().nativeElement;\n const guard = (event: KeyboardEvent): void => {\n if (!this.panelBusy()) {\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n slot.addEventListener('keydown', guard, true);\n slot.addEventListener('keyup', guard, true);\n onCleanup(() => {\n slot.removeEventListener('keydown', guard, true);\n slot.removeEventListener('keyup', guard, true);\n });\n });\n }\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 type Signal,\n} from '@angular/core';\nimport { createOverrideMerge } from '@cngx/core/utils';\n\nimport type { CngxChartPanelAriaLabels, CngxChartPanelConfig } from './chart-panel.config';\nimport { CNGX_CHART_PANEL_CONFIG, CNGX_CHART_PANEL_DEFAULTS } from './chart-panel.config.defaults';\n\nconst NO_ARIA_LABELS: CngxChartPanelAriaLabels = {};\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: CngxChartPanelAriaLabels | Signal<CngxChartPanelAriaLabels>;\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 = createOverrideMerge(out.ariaLabels ?? NO_ARIA_LABELS, 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: createOverrideMerge(base.ariaLabels ?? NO_ARIA_LABELS, 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 { Signal } from '@angular/core';\n\nimport type { CngxChartPanelLegendPosition } from '../chart-panel.component';\nimport type { CngxChartPanelAriaLabels } from './chart-panel.config';\nimport type { CngxChartPanelConfigFeature } from './provide-chart-panel-config';\n\n/**\n * Override the chart-panel's string fallbacks. The defaults come from the\n * `chartPanel` section of the language pack (English without one); this\n * overrides single keys on top of it. Pass a `Signal` to switch the\n * language at runtime; the busy status speaks the new language with the next\n * busy phase.\n *\n * @category ui/chart-panel\n * @since 0.1.0\n */\nexport function withChartPanelAriaLabels(\n labels: CngxChartPanelAriaLabels | Signal<CngxChartPanelAriaLabels>,\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 {\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n HostAttributeToken,\n inject,\n} from '@angular/core';\nimport { nextUid } from '@cngx/core/utils';\n\nimport { CNGX_CHART_PANEL } from './chart-panel.token';\n\n// aria-disabled is allowed on controls and on explicit widget / group roles,\n// not on a generic wrapper.\nconst CONTROL_SELECTOR = 'a[href], button, input, select, textarea, [role]';\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 * On a control (a native button, link or form field, or any element with an\n * explicit `role`) the marker also puts that state on the control itself:\n * `aria-disabled=\"true\"` plus an `aria-describedby` to the panel's busy reason\n * (\"Updating\" by default, `ariaLabels.busy`), both only while the panel is\n * busy, so focusing the action announces why it is unavailable. A static\n * `aria-disabled` / `aria-describedby` the consumer wrote on the element is\n * kept and merged. On a plain wrapper element the marker adds nothing (the\n * attribute is not allowed on a generic); the slot group carries the state.\n * Activation stays blocked by the slot (pointer and Enter/Space), so the\n * control keeps its focusability instead of turning natively `disabled`.\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: {\n class: 'cngx-chart-panel__actions',\n '[attr.aria-disabled]': 'ariaDisabled()',\n '[attr.aria-describedby]': 'describedBy()',\n },\n})\nexport class CngxChartPanelActions {\n private readonly panel = inject(CNGX_CHART_PANEL, { optional: true });\n private readonly ownDisabled = inject(new HostAttributeToken('aria-disabled'), {\n optional: true,\n });\n private readonly ownDescribedBy = inject(new HostAttributeToken('aria-describedby'), {\n optional: true,\n });\n private readonly carriesState =\n inject<ElementRef<HTMLElement>>(ElementRef).nativeElement.matches(CONTROL_SELECTOR);\n private readonly busy = computed(() => this.carriesState && (this.panel?.busy() ?? false));\n\n /** @internal The panel busy state on the control, else the consumer's own value. */\n protected readonly ariaDisabled = computed(() => (this.busy() ? 'true' : this.ownDisabled));\n\n /**\n * @internal The busy reason, referenced only while busy (the node itself is\n * always rendered), appended to the consumer's own description.\n */\n protected readonly describedBy = computed(() => {\n if (!this.busy() || !this.panel) {\n return this.ownDescribedBy;\n }\n return [this.ownDescribedBy, this.panel.busyDescriptionId].filter(Boolean).join(' ');\n });\n}\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 { CngxChartPanel, type CngxChartPanelLegendPosition } from './chart-panel.component';\nexport {\n type CngxChartPanelAriaLabels,\n type CngxChartPanelConfig,\n} 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 {\n injectChartPanelAriaLabels,\n injectChartPanelConfig,\n} 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';\nexport {\n CNGX_CHART_PANEL_LANGUAGE_EN,\n type CngxChartPanelLanguageSection,\n} from './i18n/chart-panel-language-section';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAcA;;;;;;;AAOG;AACI,MAAM,4BAA4B,GAAkC;AACzE,IAAA,IAAI,EAAE,UAAU;;;ACnBlB;;;AAGG;AACI,MAAM,wBAAwB,GAAG,qBAAqB,CAC3D,YAAY,EACZ,4BAA4B,CAC7B;;ACPD;;;;;;;;;;AAUG;AACI,MAAM,yBAAyB,GAAyB;AAC7D,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;;AC3BH;;;;;;;;;AASG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