@cngx/ui 0.1.0-rc.6 → 0.1.0-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -1
- package/a11y/README.md +87 -0
- package/accordion/README.md +4 -2
- package/breadcrumb/README.md +262 -0
- package/collection/README.md +6 -0
- package/command-palette/README.md +224 -0
- package/context-menu/README.md +98 -0
- package/data-grid-accordion/README.md +103 -2
- package/feedback/README.md +42 -0
- package/fesm2022/cngx-ui-a11y.mjs +452 -0
- package/fesm2022/cngx-ui-a11y.mjs.map +1 -0
- package/fesm2022/cngx-ui-accordion.mjs +116 -38
- package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-action-button.mjs +115 -50
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-breadcrumb.mjs +181 -96
- package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/cngx-ui-chart-panel.mjs +586 -0
- package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -0
- package/fesm2022/cngx-ui-collection.mjs +207 -66
- package/fesm2022/cngx-ui-collection.mjs.map +1 -1
- package/fesm2022/cngx-ui-command-palette.mjs +1281 -0
- package/fesm2022/cngx-ui-command-palette.mjs.map +1 -0
- package/fesm2022/cngx-ui-context-menu.mjs +857 -0
- package/fesm2022/cngx-ui-context-menu.mjs.map +1 -0
- package/fesm2022/cngx-ui-data-grid-accordion.mjs +498 -111
- package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-empty-state.mjs +16 -6
- package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +1095 -521
- package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
- package/fesm2022/cngx-ui-layout.mjs +18 -9
- package/fesm2022/cngx-ui-layout.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-accordion.mjs +84 -16
- package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-paginator.mjs +67 -24
- package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-stepper.mjs +72 -47
- package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +370 -203
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-overlay.mjs +69 -13
- package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
- package/fesm2022/cngx-ui-paginator.mjs +501 -182
- package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +327 -106
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-skeleton.mjs +22 -21
- package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
- package/fesm2022/cngx-ui-speak.mjs +107 -8
- package/fesm2022/cngx-ui-speak.mjs.map +1 -1
- package/fesm2022/cngx-ui-stat-card.mjs +718 -0
- package/fesm2022/cngx-ui-stat-card.mjs.map +1 -0
- package/fesm2022/cngx-ui-stepper.mjs +217 -76
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +40 -19
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-timeline.mjs +548 -0
- package/fesm2022/cngx-ui-timeline.mjs.map +1 -0
- package/fesm2022/cngx-ui-toc.mjs +748 -0
- package/fesm2022/cngx-ui-toc.mjs.map +1 -0
- package/fesm2022/cngx-ui.mjs +16 -21
- package/fesm2022/cngx-ui.mjs.map +1 -1
- package/mat-accordion/README.md +1 -1
- package/mat-paginator/README.md +9 -2
- package/mat-tabs/styles/mat-tabs.css +29 -27
- package/overlay/README.md +9 -4
- package/package.json +32 -1
- package/paginator/README.md +8 -4
- package/sidenav/README.md +33 -11
- package/skeleton/README.md +2 -0
- package/speak/README.md +3 -2
- package/stepper/README.md +15 -3
- package/timeline/README.md +350 -0
- package/toc/README.md +186 -0
- package/types/cngx-ui-a11y.d.ts +394 -0
- package/types/cngx-ui-accordion.d.ts +100 -30
- package/types/cngx-ui-action-button.d.ts +47 -3
- package/types/cngx-ui-breadcrumb.d.ts +159 -58
- package/types/cngx-ui-chart-panel.d.ts +382 -0
- package/types/cngx-ui-collection.d.ts +159 -58
- package/types/cngx-ui-command-palette.d.ts +565 -0
- package/types/cngx-ui-context-menu.d.ts +559 -0
- package/types/cngx-ui-data-grid-accordion.d.ts +344 -51
- package/types/cngx-ui-empty-state.d.ts +9 -2
- package/types/cngx-ui-feedback.d.ts +664 -73
- package/types/cngx-ui-layout.d.ts +8 -3
- package/types/cngx-ui-mat-accordion.d.ts +32 -4
- package/types/cngx-ui-mat-paginator.d.ts +37 -8
- package/types/cngx-ui-mat-stepper.d.ts +23 -11
- package/types/cngx-ui-mat-tabs.d.ts +218 -23
- package/types/cngx-ui-overlay.d.ts +56 -10
- package/types/cngx-ui-paginator.d.ts +416 -132
- package/types/cngx-ui-sidenav.d.ts +248 -74
- package/types/cngx-ui-skeleton.d.ts +18 -7
- package/types/cngx-ui-speak.d.ts +118 -5
- package/types/cngx-ui-stat-card.d.ts +411 -0
- package/types/cngx-ui-stepper.d.ts +81 -29
- package/types/cngx-ui-tabs.d.ts +22 -6
- package/types/cngx-ui-timeline.d.ts +495 -0
- package/types/cngx-ui-toc.d.ts +581 -0
- package/types/cngx-ui.d.ts +8 -5
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Signal, EnvironmentProviders, Provider } from '@angular/core';
|
|
3
|
+
import { CngxAsyncState } from '@cngx/core/utils';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Contract the panel exposes to its projected slots. The title slot registers
|
|
7
|
+
* its generated id on init and the panel derives its `aria-labelledby` from
|
|
8
|
+
* it; the actions slot reads the panel-level busy state and the id of the
|
|
9
|
+
* node that says why the actions are unavailable.
|
|
10
|
+
*
|
|
11
|
+
* Fronted by a DI token rather than the concrete `CngxChartPanel` class so the
|
|
12
|
+
* slot stays decompose-safe - an ejected skin talks to the same token the
|
|
13
|
+
* library defines. Mirrors `CNGX_STAT` behind the `cngxStat*` slots.
|
|
14
|
+
*/
|
|
15
|
+
interface CngxChartPanelRegistry {
|
|
16
|
+
/** Register the id contributed by the title slot. */
|
|
17
|
+
registerTitle(id: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Withdraw a previously registered title id. Takes the id rather than no
|
|
20
|
+
* argument so a destroy arriving after a replacement title already
|
|
21
|
+
* registered cannot clear the newer one.
|
|
22
|
+
*/
|
|
23
|
+
unregisterTitle(id: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* Panel-level busy (the panel `[state]`, never the chart's data). The
|
|
26
|
+
* actions slot reads it to mark each projected action disabled.
|
|
27
|
+
*/
|
|
28
|
+
readonly busy: Signal<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* Id of the always-rendered node naming why the actions are disabled while
|
|
31
|
+
* busy. Referenced only while `busy()` holds.
|
|
32
|
+
*/
|
|
33
|
+
readonly busyDescriptionId: string;
|
|
34
|
+
}
|
|
35
|
+
/** DI token carrying the {@link CngxChartPanelRegistry} a `CngxChartPanel` provides. */
|
|
36
|
+
declare const CNGX_CHART_PANEL: InjectionToken<CngxChartPanelRegistry>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Where the projected legend sits relative to the chart body.
|
|
40
|
+
*
|
|
41
|
+
* @category ui/chart-panel
|
|
42
|
+
* @since 0.1.0
|
|
43
|
+
*/
|
|
44
|
+
type CngxChartPanelLegendPosition = 'top' | 'bottom' | 'none';
|
|
45
|
+
/**
|
|
46
|
+
* Dashboard housing for a chart: a titled, footer-capable region that frames
|
|
47
|
+
* whatever `cngx-chart` or preset the consumer projects into it.
|
|
48
|
+
*
|
|
49
|
+
* **What it deliberately does not do.** `cngx-chart` already owns the data-level
|
|
50
|
+
* async envelope - its own `[state]`, its skeleton / empty / error slots, its
|
|
51
|
+
* SR data table. The panel never duplicates that machine. Reproducing it here
|
|
52
|
+
* would put two managers on one state (Pillar 1) and turn the panel into a
|
|
53
|
+
* God-component (Pillar 3). The chart stays the authority on what the body
|
|
54
|
+
* shows; the panel only frames it.
|
|
55
|
+
*
|
|
56
|
+
* What the panel does own is the chrome a bare chart cannot express: a title
|
|
57
|
+
* that names the region for assistive tech, a subtitle, a header action
|
|
58
|
+
* cluster, and a footer. `role="group"` plus `aria-labelledby` pointing at the
|
|
59
|
+
* projected title means a screen reader announces "Revenue by quarter, group"
|
|
60
|
+
* instead of dropping the user into an unlabelled SVG (Pillar 2).
|
|
61
|
+
*
|
|
62
|
+
* Panel-level busy marks the **header**, never the group. An `aria-busy` on the
|
|
63
|
+
* region would hold back the projected chart's own live announcements and tell
|
|
64
|
+
* AT that a perfectly stable chart is updating - the same boundary violation in
|
|
65
|
+
* the a11y layer that duplicating its view switch would be in the state layer.
|
|
66
|
+
* A hidden status region (outside the busy header) announces the configured
|
|
67
|
+
* `ariaLabels.busy` string while the panel-level operation runs.
|
|
68
|
+
*
|
|
69
|
+
* ```html
|
|
70
|
+
* <cngx-chart-panel>
|
|
71
|
+
* <h3 cngxChartPanelTitle>Revenue by quarter</h3>
|
|
72
|
+
* <span cngxChartPanelSubtitle>EUR, net</span>
|
|
73
|
+
* <button cngxChartPanelActions type="button">Refresh</button>
|
|
74
|
+
*
|
|
75
|
+
* <cngx-chart [data]="series" [state]="revenue">
|
|
76
|
+
* <svg:g cngxLine [data]="series"></svg:g>
|
|
77
|
+
* </cngx-chart>
|
|
78
|
+
*
|
|
79
|
+
* <small cngxChartPanelFooter>Source: finance warehouse</small>
|
|
80
|
+
* </cngx-chart-panel>
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* @category ui/chart-panel
|
|
84
|
+
* @docsKind primary
|
|
85
|
+
* @wcag AA
|
|
86
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel.component.ts
|
|
87
|
+
* @since 0.1.0
|
|
88
|
+
* @relatedTo CngxChart, CngxChartLegend, CngxChartPanelTitle, CngxChartPanelActions
|
|
89
|
+
*
|
|
90
|
+
* <example-url>http://localhost:4200/#/ui/chart-panel/basic/titled-panel-with-legend</example-url>
|
|
91
|
+
* <example-url>http://localhost:4200/#/ui/chart-panel/async/panel-chrome-vs-chart-state</example-url>
|
|
92
|
+
* <example-url>http://localhost:4200/#/ui/chart-panel/slots/actions-and-footer</example-url>
|
|
93
|
+
*/
|
|
94
|
+
declare class CngxChartPanel implements CngxChartPanelRegistry {
|
|
95
|
+
private readonly titleId;
|
|
96
|
+
private readonly config;
|
|
97
|
+
private readonly ariaLabels;
|
|
98
|
+
/**
|
|
99
|
+
* Panel-level async envelope - the one driving the header chrome, not the
|
|
100
|
+
* chart's data. Bind the chart's own `[state]` to the chart; bind a
|
|
101
|
+
* range-switch or export operation here. Optional per the bridge-input rule.
|
|
102
|
+
*/
|
|
103
|
+
readonly state: i0.InputSignalWithTransform<CngxAsyncState<unknown> | undefined, "" | CngxAsyncState<unknown> | undefined>;
|
|
104
|
+
/**
|
|
105
|
+
* Where the projected `cngx-chart-legend` sits. `'none'` hides it. Matches
|
|
106
|
+
* the bare `cngx-chart-legend` tag; a legend wrapped in an element of your
|
|
107
|
+
* own lands in the body slot instead.
|
|
108
|
+
*/
|
|
109
|
+
readonly legendPosition: i0.InputSignal<CngxChartPanelLegendPosition>;
|
|
110
|
+
/** @internal Panel-level busy, never the chart's data-loading state. */
|
|
111
|
+
protected readonly panelBusy: Signal<boolean>;
|
|
112
|
+
/** {@inheritDoc CngxChartPanelRegistry.busy} */
|
|
113
|
+
readonly busy: Signal<boolean>;
|
|
114
|
+
/** @internal Names why the action cluster is disabled while busy; follows a language switch. */
|
|
115
|
+
protected readonly busyLabel: Signal<string>;
|
|
116
|
+
/**
|
|
117
|
+
* @internal Text of the hidden status region. The label is read untracked, so
|
|
118
|
+
* a language switch does not re-announce a running busy phase; the next one
|
|
119
|
+
* speaks the new language.
|
|
120
|
+
*/
|
|
121
|
+
protected readonly busyStatus: Signal<string>;
|
|
122
|
+
/** {@inheritDoc CngxChartPanelRegistry.busyDescriptionId} */
|
|
123
|
+
readonly busyDescriptionId: string;
|
|
124
|
+
private readonly actionSlot;
|
|
125
|
+
constructor();
|
|
126
|
+
/** {@inheritDoc CngxChartPanelRegistry.registerTitle} */
|
|
127
|
+
registerTitle(id: string): void;
|
|
128
|
+
/** {@inheritDoc CngxChartPanelRegistry.unregisterTitle} */
|
|
129
|
+
unregisterTitle(id: string): void;
|
|
130
|
+
/**
|
|
131
|
+
* @internal Accessible name of the region, from the projected title slot.
|
|
132
|
+
* `null` when no title was projected - an unnamed group is better than one
|
|
133
|
+
* pointing at an id that does not exist.
|
|
134
|
+
*/
|
|
135
|
+
protected readonly labelledBy: Signal<string | null>;
|
|
136
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxChartPanel, never>;
|
|
137
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CngxChartPanel, "cngx-chart-panel", never, { "state": { "alias": "state"; "required": false; "isSignal": true; }; "legendPosition": { "alias": "legendPosition"; "required": false; "isSignal": true; }; }, {}, never, ["[cngxChartPanelTitle]", "[cngxChartPanelSubtitle]", "[cngxChartPanelActions]", "cngx-chart-legend", "*", "[cngxChartPanelFooter]"], true, never>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The chart-panel section of a {@link CngxLanguagePack}: the copy of
|
|
142
|
+
* `CngxChartPanel`. It feeds the `ariaLabels` of `CNGX_CHART_PANEL_CONFIG`; a
|
|
143
|
+
* key set through `withChartPanelAriaLabels` still wins.
|
|
144
|
+
*
|
|
145
|
+
* @category ui/chart-panel/i18n
|
|
146
|
+
* @since 0.1.0
|
|
147
|
+
* @relatedTo CNGX_CHART_PANEL_CONFIG, withChartPanelAriaLabels
|
|
148
|
+
*/
|
|
149
|
+
interface CngxChartPanelLanguageSection {
|
|
150
|
+
/** Accessible name announced while a panel-level operation runs. */
|
|
151
|
+
readonly busy: string;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* The English chart-panel section: the single source of the chart panel's
|
|
155
|
+
* English copy. The `CNGX_CHART_PANEL_CONFIG` labels default to it.
|
|
156
|
+
*
|
|
157
|
+
* @category ui/chart-panel/i18n
|
|
158
|
+
* @since 0.1.0
|
|
159
|
+
* @relatedTo CNGX_CHART_PANEL_CONFIG
|
|
160
|
+
*/
|
|
161
|
+
declare const CNGX_CHART_PANEL_LANGUAGE_EN: CngxChartPanelLanguageSection;
|
|
162
|
+
declare module '@cngx/core/i18n' {
|
|
163
|
+
interface CngxLanguagePack {
|
|
164
|
+
readonly chartPanel: CngxChartPanelLanguageSection;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* String fallbacks for the chart-panel's non-content states. A partial of the
|
|
170
|
+
* `chartPanel` language section, declared once there; an unset key reads the
|
|
171
|
+
* section (English without a pack).
|
|
172
|
+
*
|
|
173
|
+
* @category ui/chart-panel
|
|
174
|
+
* @since 0.1.0
|
|
175
|
+
*/
|
|
176
|
+
type CngxChartPanelAriaLabels = Partial<CngxChartPanelLanguageSection>;
|
|
177
|
+
/**
|
|
178
|
+
* App-wide cascade for the chart-panel's ARIA strings and its default legend
|
|
179
|
+
* placement.
|
|
180
|
+
*
|
|
181
|
+
* Resolution priority (high -> low):
|
|
182
|
+
* 1. Per-instance Input binding (e.g. `[legendPosition]`).
|
|
183
|
+
* 2. `provideChartPanelConfigAt(...)` in a parent component's `viewProviders`.
|
|
184
|
+
* 3. `provideChartPanelConfig(...)` at the application root.
|
|
185
|
+
* 4. Library defaults (`CNGX_CHART_PANEL_DEFAULTS`; the strings come from
|
|
186
|
+
* the `chartPanel` section of the language pack).
|
|
187
|
+
*
|
|
188
|
+
* @category ui/chart-panel
|
|
189
|
+
* @since 0.1.0
|
|
190
|
+
*/
|
|
191
|
+
interface CngxChartPanelConfig {
|
|
192
|
+
/**
|
|
193
|
+
* String fallbacks for the panel's non-content states. Accepts a `Signal`
|
|
194
|
+
* so the strings follow a runtime language switch; read the resolved bundle
|
|
195
|
+
* through {@link injectChartPanelAriaLabels}.
|
|
196
|
+
*/
|
|
197
|
+
readonly ariaLabels?: CngxChartPanelAriaLabels | Signal<CngxChartPanelAriaLabels>;
|
|
198
|
+
/** App-wide default legend placement. Per-instance `[legendPosition]` wins. */
|
|
199
|
+
readonly legendPosition?: CngxChartPanelLegendPosition;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* App-wide configuration cascade for the chart-panel. `providedIn: 'root'`
|
|
204
|
+
* with a default factory, so `inject(CNGX_CHART_PANEL_CONFIG)` always
|
|
205
|
+
* resolves.
|
|
206
|
+
*
|
|
207
|
+
* @category ui/chart-panel
|
|
208
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/config/chart-panel.config.defaults.ts
|
|
209
|
+
* @since 0.1.0
|
|
210
|
+
* @relatedTo provideChartPanelConfig, provideChartPanelConfigAt, injectChartPanelConfig
|
|
211
|
+
*/
|
|
212
|
+
declare const CNGX_CHART_PANEL_CONFIG: InjectionToken<CngxChartPanelConfig>;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Discriminated-union shape returned by the chart-panel config features. The
|
|
216
|
+
* reducer matches on `kind` and merges `payload` into the corresponding config
|
|
217
|
+
* sub-tree. Mirrors `CngxStatCardConfigFeature` and `CngxBreadcrumbConfigFeature`.
|
|
218
|
+
*
|
|
219
|
+
* @category ui/chart-panel
|
|
220
|
+
* @since 0.1.0
|
|
221
|
+
*/
|
|
222
|
+
type CngxChartPanelConfigFeature = {
|
|
223
|
+
readonly kind: 'ariaLabels';
|
|
224
|
+
readonly payload: CngxChartPanelAriaLabels | Signal<CngxChartPanelAriaLabels>;
|
|
225
|
+
} | {
|
|
226
|
+
readonly kind: 'legendPosition';
|
|
227
|
+
readonly payload: {
|
|
228
|
+
readonly legendPosition: NonNullable<CngxChartPanelConfig['legendPosition']>;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* Application-root configuration cascade for the chart-panel.
|
|
233
|
+
*
|
|
234
|
+
* ```ts
|
|
235
|
+
* bootstrapApplication(AppComponent, {
|
|
236
|
+
* providers: [provideChartPanelConfig(withChartPanelLegendPosition('top'))],
|
|
237
|
+
* });
|
|
238
|
+
* ```
|
|
239
|
+
*
|
|
240
|
+
* @category ui/chart-panel
|
|
241
|
+
* @since 0.1.0
|
|
242
|
+
*/
|
|
243
|
+
declare function provideChartPanelConfig(...features: CngxChartPanelConfigFeature[]): EnvironmentProviders;
|
|
244
|
+
/**
|
|
245
|
+
* Component-scoped configuration cascade for the chart-panel. Injects the
|
|
246
|
+
* parent injector's value and deep-merges the supplied features on top.
|
|
247
|
+
*
|
|
248
|
+
* @category ui/chart-panel
|
|
249
|
+
* @since 0.1.0
|
|
250
|
+
*/
|
|
251
|
+
declare function provideChartPanelConfigAt(...features: CngxChartPanelConfigFeature[]): Provider[];
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Override the chart-panel's string fallbacks. The defaults come from the
|
|
255
|
+
* `chartPanel` section of the language pack (English without one); this
|
|
256
|
+
* overrides single keys on top of it. Pass a `Signal` to switch the
|
|
257
|
+
* language at runtime; the busy status speaks the new language with the next
|
|
258
|
+
* busy phase.
|
|
259
|
+
*
|
|
260
|
+
* @category ui/chart-panel
|
|
261
|
+
* @since 0.1.0
|
|
262
|
+
*/
|
|
263
|
+
declare function withChartPanelAriaLabels(labels: CngxChartPanelAriaLabels | Signal<CngxChartPanelAriaLabels>): CngxChartPanelConfigFeature;
|
|
264
|
+
/**
|
|
265
|
+
* Move the cascade default for where a projected `cngx-chart-legend` sits.
|
|
266
|
+
* Per-instance `[legendPosition]` still wins.
|
|
267
|
+
*
|
|
268
|
+
* @category ui/chart-panel
|
|
269
|
+
* @since 0.1.0
|
|
270
|
+
*/
|
|
271
|
+
declare function withChartPanelLegendPosition(position: CngxChartPanelLegendPosition): CngxChartPanelConfigFeature;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Convenience accessor for the chart-panel configuration cascade. Runs in
|
|
275
|
+
* injection context; resolves through the priority chain (per-instance Input
|
|
276
|
+
* -> `provideChartPanelConfigAt` -> `provideChartPanelConfig` -> library
|
|
277
|
+
* defaults). Equivalent to `inject(CNGX_CHART_PANEL_CONFIG)` - the helper
|
|
278
|
+
* exists so consumers don't import the token directly.
|
|
279
|
+
*
|
|
280
|
+
* @category ui/chart-panel
|
|
281
|
+
* @since 0.1.0
|
|
282
|
+
*/
|
|
283
|
+
declare function injectChartPanelConfig(): CngxChartPanelConfig;
|
|
284
|
+
/**
|
|
285
|
+
* The resolved strings of the chart-panel config in scope, every key the
|
|
286
|
+
* config leaves unset (also a key an override sets to `undefined`) filled from
|
|
287
|
+
* the `chartPanel` section of the active pack, as a Signal that follows a
|
|
288
|
+
* runtime language switch. Runs in injection context; read it inside a `computed()`, a
|
|
289
|
+
* template or a handler, and untracked where it builds live-region text.
|
|
290
|
+
*
|
|
291
|
+
* @category ui/chart-panel
|
|
292
|
+
* @since 0.1.0
|
|
293
|
+
*/
|
|
294
|
+
declare function injectChartPanelAriaLabels(): Signal<Required<CngxChartPanelAriaLabels>>;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Marks the panel's title. Its generated id becomes the panel's
|
|
298
|
+
* `aria-labelledby`, so the whole region reads as one named group instead of
|
|
299
|
+
* an unlabelled box wrapped around a chart.
|
|
300
|
+
*
|
|
301
|
+
* Registration runs against {@link CNGX_CHART_PANEL}, which the panel provides -
|
|
302
|
+
* the title resolves it from its declaration site in the consumer template.
|
|
303
|
+
*
|
|
304
|
+
* @category ui/chart-panel
|
|
305
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts
|
|
306
|
+
* @since 0.1.0
|
|
307
|
+
* @relatedTo CngxChartPanel, CngxChartPanelSubtitle
|
|
308
|
+
*/
|
|
309
|
+
declare class CngxChartPanelTitle {
|
|
310
|
+
/** Auto-generated id bound to the host `[id]`; consumed by the panel. */
|
|
311
|
+
readonly id: string;
|
|
312
|
+
constructor();
|
|
313
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxChartPanelTitle, never>;
|
|
314
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxChartPanelTitle, "[cngxChartPanelTitle]", never, {}, {}, never, never, true, never>;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Marks the panel's secondary line under the title - a period, a unit, a
|
|
318
|
+
* comparison basis. Descriptive only; it does not join the accessible name.
|
|
319
|
+
*
|
|
320
|
+
* @category ui/chart-panel
|
|
321
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts
|
|
322
|
+
* @since 0.1.0
|
|
323
|
+
* @relatedTo CngxChartPanel, CngxChartPanelTitle
|
|
324
|
+
*/
|
|
325
|
+
declare class CngxChartPanelSubtitle {
|
|
326
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxChartPanelSubtitle, never>;
|
|
327
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxChartPanelSubtitle, "[cngxChartPanelSubtitle]", never, {}, {}, never, never, true, never>;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Marks the panel's header action cluster - a range picker, a refresh button,
|
|
331
|
+
* an overflow menu. The panel dims the cluster and marks it `aria-disabled`
|
|
332
|
+
* while a panel-level operation runs, so a user cannot fire a second range
|
|
333
|
+
* change into an in-flight one.
|
|
334
|
+
*
|
|
335
|
+
* On a control (a native button, link or form field, or any element with an
|
|
336
|
+
* explicit `role`) the marker also puts that state on the control itself:
|
|
337
|
+
* `aria-disabled="true"` plus an `aria-describedby` to the panel's busy reason
|
|
338
|
+
* ("Updating" by default, `ariaLabels.busy`), both only while the panel is
|
|
339
|
+
* busy, so focusing the action announces why it is unavailable. A static
|
|
340
|
+
* `aria-disabled` / `aria-describedby` the consumer wrote on the element is
|
|
341
|
+
* kept and merged. On a plain wrapper element the marker adds nothing (the
|
|
342
|
+
* attribute is not allowed on a generic); the slot group carries the state.
|
|
343
|
+
* Activation stays blocked by the slot (pointer and Enter/Space), so the
|
|
344
|
+
* control keeps its focusability instead of turning natively `disabled`.
|
|
345
|
+
*
|
|
346
|
+
* @category ui/chart-panel
|
|
347
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts
|
|
348
|
+
* @since 0.1.0
|
|
349
|
+
* @relatedTo CngxChartPanel
|
|
350
|
+
*/
|
|
351
|
+
declare class CngxChartPanelActions {
|
|
352
|
+
private readonly panel;
|
|
353
|
+
private readonly ownDisabled;
|
|
354
|
+
private readonly ownDescribedBy;
|
|
355
|
+
private readonly carriesState;
|
|
356
|
+
private readonly busy;
|
|
357
|
+
/** @internal The panel busy state on the control, else the consumer's own value. */
|
|
358
|
+
protected readonly ariaDisabled: i0.Signal<string | null>;
|
|
359
|
+
/**
|
|
360
|
+
* @internal The busy reason, referenced only while busy (the node itself is
|
|
361
|
+
* always rendered), appended to the consumer's own description.
|
|
362
|
+
*/
|
|
363
|
+
protected readonly describedBy: i0.Signal<string | null>;
|
|
364
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxChartPanelActions, never>;
|
|
365
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxChartPanelActions, "[cngxChartPanelActions]", never, {}, {}, never, never, true, never>;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Marks the panel's footer row - a source note, a last-updated timestamp, a
|
|
369
|
+
* drill-down link. Sits below the chart body and the legend.
|
|
370
|
+
*
|
|
371
|
+
* @category ui/chart-panel
|
|
372
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts
|
|
373
|
+
* @since 0.1.0
|
|
374
|
+
* @relatedTo CngxChartPanel
|
|
375
|
+
*/
|
|
376
|
+
declare class CngxChartPanelFooter {
|
|
377
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxChartPanelFooter, never>;
|
|
378
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxChartPanelFooter, "[cngxChartPanelFooter]", never, {}, {}, never, never, true, never>;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
export { CNGX_CHART_PANEL, CNGX_CHART_PANEL_CONFIG, CNGX_CHART_PANEL_LANGUAGE_EN, CngxChartPanel, CngxChartPanelActions, CngxChartPanelFooter, CngxChartPanelSubtitle, CngxChartPanelTitle, injectChartPanelAriaLabels, injectChartPanelConfig, provideChartPanelConfig, provideChartPanelConfigAt, withChartPanelAriaLabels, withChartPanelLegendPosition };
|
|
382
|
+
export type { CngxChartPanelAriaLabels, CngxChartPanelConfig, CngxChartPanelConfigFeature, CngxChartPanelLanguageSection, CngxChartPanelLegendPosition, CngxChartPanelRegistry };
|