@nexterajs/ui 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +279 -34
  2. package/fesm2022/nexterajs-ui-charts.mjs +1096 -0
  3. package/fesm2022/nexterajs-ui-charts.mjs.map +1 -0
  4. package/fesm2022/nexterajs-ui-core.mjs +835 -11
  5. package/fesm2022/nexterajs-ui-core.mjs.map +1 -1
  6. package/fesm2022/nexterajs-ui-display.mjs +1142 -0
  7. package/fesm2022/nexterajs-ui-display.mjs.map +1 -0
  8. package/fesm2022/nexterajs-ui-dropdowns.mjs +621 -69
  9. package/fesm2022/nexterajs-ui-dropdowns.mjs.map +1 -1
  10. package/fesm2022/nexterajs-ui-file-uploader.mjs +576 -11
  11. package/fesm2022/nexterajs-ui-file-uploader.mjs.map +1 -1
  12. package/fesm2022/nexterajs-ui-forms.mjs +2702 -452
  13. package/fesm2022/nexterajs-ui-forms.mjs.map +1 -1
  14. package/fesm2022/nexterajs-ui-grid.mjs +2350 -336
  15. package/fesm2022/nexterajs-ui-grid.mjs.map +1 -1
  16. package/fesm2022/nexterajs-ui-intl.mjs +117 -15
  17. package/fesm2022/nexterajs-ui-intl.mjs.map +1 -1
  18. package/fesm2022/nexterajs-ui-navigation.mjs +1054 -0
  19. package/fesm2022/nexterajs-ui-navigation.mjs.map +1 -0
  20. package/fesm2022/nexterajs-ui-notify.mjs +353 -0
  21. package/fesm2022/nexterajs-ui-notify.mjs.map +1 -0
  22. package/fesm2022/nexterajs-ui-overlay.mjs +1671 -0
  23. package/fesm2022/nexterajs-ui-overlay.mjs.map +1 -0
  24. package/fesm2022/nexterajs-ui-pivot.mjs +191 -136
  25. package/fesm2022/nexterajs-ui-pivot.mjs.map +1 -1
  26. package/fesm2022/nexterajs-ui-shell.mjs +542 -0
  27. package/fesm2022/nexterajs-ui-shell.mjs.map +1 -0
  28. package/fesm2022/nexterajs-ui-styling.mjs +568 -3
  29. package/fesm2022/nexterajs-ui-styling.mjs.map +1 -1
  30. package/fesm2022/nexterajs-ui-tree-view.mjs +150 -18
  31. package/fesm2022/nexterajs-ui-tree-view.mjs.map +1 -1
  32. package/fesm2022/nexterajs-ui-validation.mjs +283 -97
  33. package/fesm2022/nexterajs-ui-validation.mjs.map +1 -1
  34. package/fesm2022/nexterajs-ui.mjs +6 -0
  35. package/fesm2022/nexterajs-ui.mjs.map +1 -1
  36. package/package.json +37 -2
  37. package/styles/_dropdown.scss +150 -1
  38. package/styles/_editor.scss +75 -21
  39. package/styles/_icons.scss +92 -0
  40. package/styles/_mixins.scss +104 -1
  41. package/styles/_scrollbar.scss +134 -0
  42. package/styles/_status.scss +21 -0
  43. package/styles/_toast.scss +243 -0
  44. package/styles/_tokens.scss +467 -2
  45. package/styles/_widget.scss +14 -3
  46. package/styles/index.scss +10 -4
  47. package/types/nexterajs-ui-charts.d.ts +446 -0
  48. package/types/nexterajs-ui-core.d.ts +515 -30
  49. package/types/nexterajs-ui-display.d.ts +720 -0
  50. package/types/nexterajs-ui-dropdowns.d.ts +318 -57
  51. package/types/nexterajs-ui-file-uploader.d.ts +240 -8
  52. package/types/nexterajs-ui-forms.d.ts +772 -43
  53. package/types/nexterajs-ui-grid.d.ts +878 -135
  54. package/types/nexterajs-ui-intl.d.ts +39 -4
  55. package/types/nexterajs-ui-navigation.d.ts +531 -0
  56. package/types/nexterajs-ui-notify.d.ts +149 -0
  57. package/types/nexterajs-ui-overlay.d.ts +703 -0
  58. package/types/nexterajs-ui-pivot.d.ts +91 -70
  59. package/types/nexterajs-ui-shell.d.ts +294 -0
  60. package/types/nexterajs-ui-styling.d.ts +163 -3
  61. package/types/nexterajs-ui-tree-view.d.ts +56 -4
  62. package/types/nexterajs-ui-validation.d.ts +110 -22
  63. package/types/nexterajs-ui.d.ts +6 -0
@@ -0,0 +1,446 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import * as _nexterajs_ui_core from '@nexterajs/ui/core';
3
+ import { DateTime } from 'luxon';
4
+ import * as _nexterajs_ui_charts from '@nexterajs/ui/charts';
5
+
6
+ /** A "nice" axis: a domain that starts and ends on a tick, and the ticks between. */
7
+ interface NxeNiceScale {
8
+ readonly min: number;
9
+ readonly max: number;
10
+ readonly step: number;
11
+ readonly ticks: readonly number[];
12
+ }
13
+ /** Rounds `value` to a 1, 2, 5 or 10 times a power of ten (Heckbert). */
14
+ declare function niceNumber(value: number, round: boolean): number;
15
+ /** Decimal places needed to write multiples of `step` exactly (0.25 -> 2, 5 -> 0). */
16
+ declare function decimalsOf(step: number): number;
17
+ /**
18
+ * Ticks for `[min, max]`: about `targetTicks` of them, spaced 1, 2 or 5 times a power of ten, the
19
+ * first at or below `min` and the last at or above `max`. A flat domain (`min === max`) opens up
20
+ * around the value so the line has somewhere to sit.
21
+ */
22
+ declare function niceScale(min: number, max: number, targetTicks?: number): NxeNiceScale;
23
+ /** Maps `[d0, d1]` onto `[r0, r1]`. A degenerate domain maps to the middle of the range. */
24
+ declare function linearScale(d0: number, d1: number, r0: number, r1: number): (value: number) => number;
25
+ /** A `#,##0.00` style pattern that shows `decimals` places, for tick labels that share a step. */
26
+ declare function patternForDecimals(decimals: number): string;
27
+ /** Indexes (0-based) of at most `maxLabels` evenly spaced labels out of `count`, always including the first. */
28
+ declare function labelIndexes(count: number, maxLabels: number): number[];
29
+ /** Index of the entry of the ascending `xs` nearest to `x`; -1 when `xs` is empty. */
30
+ declare function nearestIndex(xs: readonly number[], x: number): number;
31
+
32
+ interface NxeChartPoint {
33
+ readonly x: number;
34
+ readonly y: number;
35
+ }
36
+ /** Splits a series at its gaps: each run of consecutive defined points is one segment. */
37
+ declare function segments(points: readonly (NxeChartPoint | null)[]): NxeChartPoint[][];
38
+ /**
39
+ * The line through `points`, `null` entries leaving gaps (the pen lifts; it never joins across a
40
+ * missing value). A run of one point draws no line: it shows as a marker.
41
+ */
42
+ declare function linePath(points: readonly (NxeChartPoint | null)[]): string;
43
+ /**
44
+ * The filled area between `top` and `bottom` (same length; `null` in either leaves a gap in the
45
+ * fill too). `bottom` is a baseline y for a plain area, or the lower edge of a stacked band.
46
+ */
47
+ declare function areaPath(top: readonly (NxeChartPoint | null)[], bottom: number | readonly (NxeChartPoint | null)[]): string;
48
+ /**
49
+ * Cumulative stack of `rows` (one array of values per series, aligned by index). Missing and
50
+ * negative values count as 0 so the bands above them still sit on the stack. Returns the lower and
51
+ * upper edge per series.
52
+ */
53
+ declare function stackValues(rows: readonly (readonly (number | null | undefined)[])[]): {
54
+ lower: number[];
55
+ upper: number[];
56
+ }[];
57
+ interface NxeDonutArc {
58
+ readonly startAngle: number;
59
+ readonly endAngle: number;
60
+ readonly path: string;
61
+ /** Midpoint of the arc on the ring's centre line, for a tooltip anchor. */
62
+ readonly centroid: NxeChartPoint;
63
+ }
64
+ /**
65
+ * Ring segments for `values` (zeros and negatives get no arc, `null` in the result). `gap` is the
66
+ * visible gap between neighbours in px, measured on the ring's centre line, so it reads as the 2px
67
+ * surface gap the mark spec asks for. A lone segment that is the whole ring is drawn as two half
68
+ * arcs (an SVG arc cannot start and end on the same point) with no gap.
69
+ */
70
+ declare function donutArcs(values: readonly number[], cx: number, cy: number, outer: number, inner: number, gap?: number): (NxeDonutArc | null)[];
71
+ /** A donut segment as the caller states it. */
72
+ interface NxeDonutDatum {
73
+ /** Stable identity for the legend toggle; defaults to the label. */
74
+ readonly key?: string;
75
+ readonly label: string;
76
+ readonly value: number;
77
+ /** Any CSS colour or `var(--nxe-ui-...)`; defaults to the next palette slot. */
78
+ readonly color?: string;
79
+ /** `true` on the grouped remainder `groupOther` appends. */
80
+ readonly other?: boolean;
81
+ }
82
+ /**
83
+ * Keeps the `max - 1` largest items (in their input order) and folds the rest into one "Other"
84
+ * item last. Returns the live items unchanged when they fit in `max`. Non-positive values never count.
85
+ */
86
+ declare function groupOther(items: readonly NxeDonutDatum[], max: number, otherLabel: string): NxeDonutDatum[];
87
+ /**
88
+ * The segment under the point `(x, y)` of a donut drawn by `donutArcs`, or -1 when the point is
89
+ * off the ring (in the hole or outside). Gaps belong to the segment whose share they interrupt, so
90
+ * the pointer never flickers through the 2px surface line.
91
+ */
92
+ declare function donutHit(values: readonly number[], cx: number, cy: number, outer: number, inner: number, x: number, y: number): number;
93
+
94
+ /** How many categorical colours the palette has (`--nxe-ui-chart-1` to `--nxe-ui-chart-8`). */
95
+ declare const NXE_CHART_SLOTS = 8;
96
+ /** The colour of the grouped "Other" remainder: a neutral, never a categorical slot. */
97
+ declare const NXE_CHART_OTHER_COLOR = "var(--nxe-ui-chart-other)";
98
+ /**
99
+ * The CSS colour of palette slot `index` (0-based). Slots are assigned in order and never cycled:
100
+ * past the eighth there is no ninth hue, so the remainder takes the neutral `Other` colour.
101
+ */
102
+ declare function nxeChartColor(index: number): string;
103
+ /** One data series of a line or area chart. */
104
+ interface NxeCartesianSeries {
105
+ /** Stable identity, kept when the legend hides the series; defaults to the name. */
106
+ readonly key?: string;
107
+ readonly name: string;
108
+ /** One value per category, aligned by index. `null` or `undefined` leaves a gap. */
109
+ readonly values: readonly (number | null | undefined)[];
110
+ /** Overrides the palette slot (any CSS colour or `var(--nxe-ui-...)`). */
111
+ readonly color?: string;
112
+ }
113
+ /** One entry of the legend. */
114
+ interface NxeChartLegendItem {
115
+ readonly key: string;
116
+ readonly label: string;
117
+ readonly color: string;
118
+ readonly hidden: boolean;
119
+ /** Formatted value shown after the label, if any. */
120
+ readonly value?: string;
121
+ }
122
+ /** A row of the data table alternative. */
123
+ interface NxeChartTableRow {
124
+ readonly header: string;
125
+ readonly cells: readonly string[];
126
+ }
127
+
128
+ /** An x value: a label for a category axis, or a date for a time axis. */
129
+ type NxeChartCategory = string | number | Date | DateTime;
130
+ /** How the x axis places its points. */
131
+ type NxeChartXType = 'category' | 'time';
132
+ interface LineView {
133
+ readonly key: string;
134
+ readonly name: string;
135
+ readonly color: string;
136
+ readonly line: string;
137
+ readonly area: string;
138
+ readonly markers: readonly {
139
+ x: number;
140
+ y: number;
141
+ index: number;
142
+ }[];
143
+ }
144
+ /**
145
+ * `nxe-line-chart` draws one or more series as lines over a category or time x axis.
146
+ *
147
+ * ```html
148
+ * <nxe-line-chart
149
+ * heading="Purchases per month"
150
+ * [categories]="months"
151
+ * [series]="[{ name: 'Total', values: totals }]"
152
+ * xType="time"
153
+ * xFormat="MMM yyyy" />
154
+ * ```
155
+ *
156
+ * It is SVG rendered by the template from computed scales: no chart library. It follows its
157
+ * container's width (ResizeObserver), takes colours from the `--nxe-ui-chart-1..8` tokens in
158
+ * order (so light and dark both validate), writes numbers with `NXE_NUMBER_SEPARATORS` and dates
159
+ * with Luxon in the active locale, leaves a gap where a value is `null`, and shows:
160
+ *
161
+ * - a legend (two series or more) whose entries hide and show a series from the keyboard;
162
+ * - a crosshair tooltip on hover, and on focus: Tab to the plot, then Left, Right, Home, End and
163
+ * Esc move through the points, and the values are announced;
164
+ * - `role="img"` with a text summary (range, first, last, lowest and highest per series), and the
165
+ * data as a visually hidden table that the "View as table" button shows in place of the plot;
166
+ * - `nxe-skeleton` while `loading`, and `nxe-empty-state` when there is nothing to draw.
167
+ *
168
+ * `area` fills under each line (`nxe-area-chart` is the same with `area` on); with `stacked` the
169
+ * series stack and a missing value counts as 0. Categories must be in ascending order on a time
170
+ * axis. Values are numbers in the unit of the axis: scale them first if the unit differs.
171
+ */
172
+ declare class NxeLineChartComponent {
173
+ private readonly host;
174
+ protected readonly messages: _nexterajs_ui_core.NxeMessageService;
175
+ private readonly formatter;
176
+ /** The series to draw, in palette order. Up to 8 take a palette colour; give more a `color`. */
177
+ readonly series: _angular_core.InputSignal<readonly NxeCartesianSeries[]>;
178
+ /** One entry per point along the x axis; a series' `values` line up with it by index. */
179
+ readonly categories: _angular_core.InputSignal<readonly NxeChartCategory[]>;
180
+ /** `category` spaces points evenly; `time` places them by date (Luxon parses strings, Dates and DateTimes). */
181
+ readonly xType: _angular_core.InputSignal<NxeChartXType>;
182
+ /** Luxon format of a date label, in the active locale. Default `dd-MMM-yyyy`. */
183
+ readonly xFormat: _angular_core.InputSignal<string>;
184
+ /** Number pattern for values in the tooltip, summary and table. Default `#,##0.##`. */
185
+ readonly valueFormat: _angular_core.InputSignal<string>;
186
+ /** Number pattern for the y axis; by default as many decimals as the tick step needs. */
187
+ readonly axisFormat: _angular_core.InputSignal<string | undefined>;
188
+ /** About how many y ticks. */
189
+ readonly yTicks: _angular_core.InputSignalWithTransform<number, unknown>;
190
+ /** Start the y axis at 0 when every value is positive. Areas always do. */
191
+ readonly includeZero: _angular_core.InputSignalWithTransform<boolean, unknown>;
192
+ /** Fill under each line. */
193
+ readonly area: _angular_core.InputSignalWithTransform<boolean, unknown>;
194
+ /** With `area`: stack the series instead of overlaying them. */
195
+ readonly stacked: _angular_core.InputSignalWithTransform<boolean, unknown>;
196
+ /** Visible title above the chart; also the start of its accessible summary. */
197
+ readonly heading: _angular_core.InputSignal<string>;
198
+ /** Extra sentence for the accessible summary, e.g. what to take away from the chart. */
199
+ readonly description: _angular_core.InputSignal<string>;
200
+ /** Height of the plot in px. */
201
+ readonly height: _angular_core.InputSignalWithTransform<number, unknown>;
202
+ /** Fixed width in px; by default the chart fills its container. */
203
+ readonly width: _angular_core.InputSignalWithTransform<number | undefined, unknown>;
204
+ /** Show the skeleton instead of the plot. */
205
+ readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
206
+ /** The legend: by default shown for two series or more. */
207
+ readonly showLegend: _angular_core.InputSignal<boolean | "auto">;
208
+ /** Offer the "View as table" button. */
209
+ readonly showTableToggle: _angular_core.InputSignalWithTransform<boolean, unknown>;
210
+ /** Keys of the series the legend has hidden; two-way. */
211
+ readonly hidden: _angular_core.ModelSignal<readonly string[]>;
212
+ /** `nxe-area-chart` turns this on. */
213
+ protected readonly areaForced: boolean;
214
+ protected readonly uid: string;
215
+ private readonly measured;
216
+ protected readonly hoverIndex: _angular_core.WritableSignal<number | null>;
217
+ protected readonly keyboardIndex: _angular_core.WritableSignal<number | null>;
218
+ protected readonly tableShown: _angular_core.WritableSignal<boolean>;
219
+ constructor();
220
+ private readonly isTime;
221
+ protected readonly isArea: _angular_core.Signal<boolean>;
222
+ protected readonly isStacked: _angular_core.Signal<boolean>;
223
+ /** Number of points along x. */
224
+ protected readonly count: _angular_core.Signal<number>;
225
+ protected readonly labels: _angular_core.Signal<string[]>;
226
+ private readonly xs;
227
+ private readonly entries;
228
+ private readonly visible;
229
+ protected readonly empty: _angular_core.Signal<boolean>;
230
+ private readonly stack;
231
+ private readonly domain;
232
+ private readonly axisPattern;
233
+ protected readonly yLabels: _angular_core.Signal<string[]>;
234
+ protected readonly svgWidth: _angular_core.Signal<number>;
235
+ protected readonly svgHeight: _angular_core.Signal<number>;
236
+ protected readonly left: _angular_core.Signal<number>;
237
+ protected readonly plotRight: _angular_core.Signal<number>;
238
+ protected readonly plotBottom: _angular_core.Signal<number>;
239
+ private readonly xScale;
240
+ private readonly yScale;
241
+ /** Pixel x of each point. */
242
+ protected readonly xPx: _angular_core.Signal<number[]>;
243
+ protected readonly yGrid: _angular_core.Signal<{
244
+ y: number;
245
+ label: string;
246
+ zero: boolean;
247
+ }[]>;
248
+ protected readonly xTicks: _angular_core.Signal<{
249
+ x: number;
250
+ text: string;
251
+ }[]>;
252
+ protected readonly lines: _angular_core.Signal<LineView[]>;
253
+ /** Markers on every point while there are few enough to tell apart; otherwise only the active one. */
254
+ protected readonly showAllMarkers: _angular_core.Signal<boolean>;
255
+ protected readonly activeIndex: _angular_core.Signal<number | null>;
256
+ protected readonly tooltip: _angular_core.Signal<{
257
+ title: string;
258
+ rows: {
259
+ key: string;
260
+ name: string;
261
+ color: string;
262
+ value: string;
263
+ }[];
264
+ x: number;
265
+ index: number;
266
+ align: string;
267
+ } | null>;
268
+ /** What a screen reader hears when keyboard focus lands on a point. */
269
+ protected readonly announcement: _angular_core.Signal<string>;
270
+ protected onPointerMove(event: PointerEvent): void;
271
+ protected onPointerLeave(): void;
272
+ protected onFocus(): void;
273
+ protected onBlur(): void;
274
+ protected onKeydown(event: KeyboardEvent): void;
275
+ protected readonly legendItems: _angular_core.Signal<NxeChartLegendItem[]>;
276
+ protected readonly legendShown: _angular_core.Signal<boolean>;
277
+ protected toggleSeries(key: string): void;
278
+ protected readonly tableColumns: _angular_core.Signal<string[]>;
279
+ protected readonly tableRows: _angular_core.Signal<NxeChartTableRow[]>;
280
+ protected readonly summary: _angular_core.Signal<string>;
281
+ protected toggleTable(): void;
282
+ private toDate;
283
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeLineChartComponent, never>;
284
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeLineChartComponent, "nxe-line-chart", never, { "series": { "alias": "series"; "required": false; "isSignal": true; }; "categories": { "alias": "categories"; "required": false; "isSignal": true; }; "xType": { "alias": "xType"; "required": false; "isSignal": true; }; "xFormat": { "alias": "xFormat"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "axisFormat": { "alias": "axisFormat"; "required": false; "isSignal": true; }; "yTicks": { "alias": "yTicks"; "required": false; "isSignal": true; }; "includeZero": { "alias": "includeZero"; "required": false; "isSignal": true; }; "area": { "alias": "area"; "required": false; "isSignal": true; }; "stacked": { "alias": "stacked"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "showLegend": { "alias": "showLegend"; "required": false; "isSignal": true; }; "showTableToggle": { "alias": "showTableToggle"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; }, { "hidden": "hiddenChange"; }, never, never, true, never>;
285
+ }
286
+
287
+ /**
288
+ * `nxe-area-chart` is `nxe-line-chart` with the area under each line filled. It takes every input of
289
+ * the line chart; add `stacked` to stack the series (a missing value then counts as 0).
290
+ *
291
+ * ```html
292
+ * <nxe-area-chart heading="Spend by month" [categories]="months" [series]="series" stacked />
293
+ * ```
294
+ */
295
+ declare class NxeAreaChartComponent extends NxeLineChartComponent {
296
+ protected readonly areaForced: boolean;
297
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeAreaChartComponent, never>;
298
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeAreaChartComponent, "nxe-area-chart", never, {}, {}, never, never, true, never>;
299
+ }
300
+
301
+ interface Segment {
302
+ readonly key: string;
303
+ readonly label: string;
304
+ readonly value: number;
305
+ readonly color: string;
306
+ readonly hidden: boolean;
307
+ }
308
+ /**
309
+ * `nxe-donut-chart` shows how a total divides into parts.
310
+ *
311
+ * ```html
312
+ * <nxe-donut-chart
313
+ * heading="Spend by supplier"
314
+ * [data]="[{ label: 'PT Maju', value: 420 }, { label: 'CV Sinar', value: 180 }]"
315
+ * [maxSegments]="6" />
316
+ * ```
317
+ *
318
+ * Segments take the `--nxe-ui-chart-1..8` colours in order (or a `color` of their own, e.g. a status
319
+ * family `var(--nxe-ui-status-success-fg)`), separated by a 2px surface gap. When there are more than
320
+ * `maxSegments`, the smallest fold into one "Other" segment in a neutral colour. The centre shows
321
+ * the total of the visible segments. The legend lists each segment with its value and share and
322
+ * toggles it (keyboard accessible); hover or arrow-key focus on the ring shows a tooltip. It
323
+ * announces itself as an image with a summary, keeps a visually hidden data table (shown by "View
324
+ * as table"), and uses `nxe-skeleton` and `nxe-empty-state` for loading and no data.
325
+ *
326
+ * A donut is for a handful of parts of one whole: past six or so, use a bar chart.
327
+ */
328
+ declare class NxeDonutChartComponent {
329
+ private readonly host;
330
+ protected readonly messages: _nexterajs_ui_core.NxeMessageService;
331
+ private readonly formatter;
332
+ /** The parts. Zero, negative and non-finite values are left out. */
333
+ readonly data: _angular_core.InputSignal<readonly NxeDonutDatum[]>;
334
+ /** Most segments shown; the rest fold into "Other". At most 9 (eight colours and Other). */
335
+ readonly maxSegments: _angular_core.InputSignalWithTransform<number, unknown>;
336
+ /** Number pattern for values. Default `#,##0.##`. */
337
+ readonly valueFormat: _angular_core.InputSignal<string>;
338
+ /** Decimal places of the percentages. */
339
+ readonly percentDecimals: _angular_core.InputSignalWithTransform<number, unknown>;
340
+ /** Visible title above the chart; also the start of its accessible summary. */
341
+ readonly heading: _angular_core.InputSignal<string>;
342
+ /** Extra sentence for the accessible summary. */
343
+ readonly description: _angular_core.InputSignal<string>;
344
+ /** Diameter of the ring in px; it shrinks to fit a narrower container. */
345
+ readonly size: _angular_core.InputSignalWithTransform<number, unknown>;
346
+ /** Text under the total in the centre. Default: the message "Total". */
347
+ readonly totalLabel: _angular_core.InputSignal<string | undefined>;
348
+ /** Show the total in the centre. */
349
+ readonly showTotal: _angular_core.InputSignalWithTransform<boolean, unknown>;
350
+ /** Show the legend (value and share per segment, and the toggles). */
351
+ readonly showLegend: _angular_core.InputSignalWithTransform<boolean, unknown>;
352
+ /** Show the skeleton instead of the ring. */
353
+ readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
354
+ /** Offer the "View as table" button. */
355
+ readonly showTableToggle: _angular_core.InputSignalWithTransform<boolean, unknown>;
356
+ /** Keys of the segments the legend has hidden; two-way. */
357
+ readonly hidden: _angular_core.ModelSignal<readonly string[]>;
358
+ protected readonly uid: string;
359
+ private readonly measured;
360
+ protected readonly hoverIndex: _angular_core.WritableSignal<number | null>;
361
+ protected readonly keyboardIndex: _angular_core.WritableSignal<number | null>;
362
+ protected readonly pointer: _angular_core.WritableSignal<{
363
+ x: number;
364
+ y: number;
365
+ } | null>;
366
+ protected readonly tableShown: _angular_core.WritableSignal<boolean>;
367
+ constructor();
368
+ /** Kept segments plus the "Other" remainder; colours follow position, so hiding repaints nothing. */
369
+ protected readonly all: _angular_core.Signal<Segment[]>;
370
+ protected readonly shown: _angular_core.Signal<Segment[]>;
371
+ protected readonly total: _angular_core.Signal<number>;
372
+ private readonly grandTotal;
373
+ protected readonly empty: _angular_core.Signal<boolean>;
374
+ private pct;
375
+ protected readonly diameter: _angular_core.Signal<number>;
376
+ private readonly outer;
377
+ private readonly inner;
378
+ protected readonly arcs: _angular_core.Signal<{
379
+ arc: _nexterajs_ui_charts.NxeDonutArc | null;
380
+ key: string;
381
+ label: string;
382
+ value: number;
383
+ color: string;
384
+ hidden: boolean;
385
+ }[]>;
386
+ protected readonly totalText: _angular_core.Signal<string>;
387
+ protected readonly totalCaption: _angular_core.Signal<string>;
388
+ protected readonly activeIndex: _angular_core.Signal<number | null>;
389
+ protected readonly tooltip: _angular_core.Signal<{
390
+ label: string;
391
+ color: string;
392
+ value: string;
393
+ share: string;
394
+ x: number;
395
+ y: number;
396
+ } | null>;
397
+ protected readonly announcement: _angular_core.Signal<string>;
398
+ protected onPointerMove(event: PointerEvent): void;
399
+ protected onPointerLeave(): void;
400
+ protected onFocus(): void;
401
+ protected onBlur(): void;
402
+ protected onKeydown(event: KeyboardEvent): void;
403
+ protected readonly legendItems: _angular_core.Signal<NxeChartLegendItem[]>;
404
+ protected toggleSegment(key: string): void;
405
+ protected readonly tableRows: _angular_core.Signal<NxeChartTableRow[]>;
406
+ protected readonly tableColumns: _angular_core.Signal<string[]>;
407
+ protected readonly summary: _angular_core.Signal<string>;
408
+ protected toggleTable(): void;
409
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeDonutChartComponent, never>;
410
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeDonutChartComponent, "nxe-donut-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "maxSegments": { "alias": "maxSegments"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "percentDecimals": { "alias": "percentDecimals"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "totalLabel": { "alias": "totalLabel"; "required": false; "isSignal": true; }; "showTotal": { "alias": "showTotal"; "required": false; "isSignal": true; }; "showLegend": { "alias": "showLegend"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "showTableToggle": { "alias": "showTableToggle"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; }, { "hidden": "hiddenChange"; }, never, never, true, never>;
411
+ }
412
+
413
+ /**
414
+ * The legend of a chart: a swatch and a name per series or segment. Each entry is a toggle button
415
+ * (`aria-pressed`, reachable and operable from the keyboard) that asks the chart to hide or show
416
+ * that series. Colour never carries the identity alone: the name is always written.
417
+ */
418
+ declare class NxeChartLegendComponent {
419
+ readonly items: _angular_core.InputSignal<readonly NxeChartLegendItem[]>;
420
+ /** Accessible name of the list. */
421
+ readonly label: _angular_core.InputSignal<string>;
422
+ /** `false` renders plain entries instead of toggle buttons. */
423
+ readonly toggleable: _angular_core.InputSignalWithTransform<boolean, unknown>;
424
+ /** Emits the key of the entry the user toggled. */
425
+ readonly toggled: _angular_core.OutputEmitterRef<string>;
426
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeChartLegendComponent, never>;
427
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeChartLegendComponent, "nxe-chart-legend", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; }, { "toggled": "toggled"; }, never, never, true, never>;
428
+ }
429
+
430
+ /**
431
+ * The data behind a chart as a real table: the alternative for a reader who cannot see the marks.
432
+ * It is a library-internal native table (the consuming app's own templates still avoid one). The
433
+ * chart keeps it visually hidden, or shows it in place of the plot under "View as table".
434
+ */
435
+ declare class NxeChartDataTableComponent {
436
+ readonly caption: _angular_core.InputSignal<string>;
437
+ /** Header of the first column (the category or segment). */
438
+ readonly corner: _angular_core.InputSignal<string>;
439
+ readonly columns: _angular_core.InputSignal<readonly string[]>;
440
+ readonly rows: _angular_core.InputSignal<readonly NxeChartTableRow[]>;
441
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NxeChartDataTableComponent, never>;
442
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NxeChartDataTableComponent, "nxe-chart-data-table", never, { "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "corner": { "alias": "corner"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
443
+ }
444
+
445
+ export { NXE_CHART_OTHER_COLOR, NXE_CHART_SLOTS, NxeAreaChartComponent, NxeChartDataTableComponent, NxeChartLegendComponent, NxeDonutChartComponent, NxeLineChartComponent, areaPath, decimalsOf, donutArcs, donutHit, groupOther, labelIndexes, linePath, linearScale, nearestIndex, niceNumber, niceScale, nxeChartColor, patternForDecimals, segments, stackValues };
446
+ export type { NxeCartesianSeries, NxeChartCategory, NxeChartLegendItem, NxeChartPoint, NxeChartTableRow, NxeChartXType, NxeDonutArc, NxeDonutDatum, NxeNiceScale };