@ids-group-ltd/ids-design-system 0.13.1 → 0.13.3
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/CHANGELOG.md +626 -0
- package/components.md +17 -9
- package/docs/agent/INDEX.md +1 -1
- package/docs/agent/charts/ds-column-chart.md +3 -2
- package/docs/agent/charts/ds-line-chart.md +2 -1
- package/docs/agent/feedback/ds-bar.md +13 -0
- package/docs/agent/forms/ds-button.md +1 -1
- package/docs/agent/forms/ds-icon-button.md +1 -1
- package/docs/agent/surfaces/ds-card.md +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +81 -13
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +95 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +3 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +47 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +198 -50
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +973 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +172 -111
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +86 -15
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +87 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +193 -98
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +233 -33
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +2 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.13.2.json +269 -0
- package/migrations/0.13.3.json +211 -0
- package/package.json +17 -9
- package/styles/_chart-frame.scss +117 -10
- package/styles/_chart-interactive.scss +12 -3
- package/styles/_overlay-motion.scss +7 -6
- package/styles/_tokens-charts.scss +29 -5
- package/styles/_tokens.scss +1 -1
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +68 -5
- package/types/ids-group-ltd-ids-design-system-components-bar.d.ts +63 -0
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +3 -2
- package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +25 -2
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +21 -4
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +543 -0
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +125 -37
- package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +43 -4
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +52 -4
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +90 -23
- package/types/ids-group-ltd-ids-design-system-components.d.ts +91 -16
- package/types/ids-group-ltd-ids-design-system-core.d.ts +73 -6
- package/types/ids-group-ltd-ids-design-system.d.ts +7 -6
- package/docs/agent/feedback/ds-progress.md +0 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +0 -41
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +0 -1
- package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +0 -22
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as _ids_group_ltd_ids_design_system_components from '@ids-group-ltd/ids-design-system/components';
|
|
2
|
+
import { defaultChartFormat, LinePoint } from '@ids-group-ltd/ids-design-system/components';
|
|
3
|
+
import * as _ids_group_ltd_ids_design_system_core from '@ids-group-ltd/ids-design-system/core';
|
|
4
|
+
import { ChartAxisMode, ChartFrame, ChartDataTable, ChartValueFormat } from '@ids-group-ltd/ids-design-system/core';
|
|
2
5
|
import * as _angular_core from '@angular/core';
|
|
3
6
|
import { TemplateRef } from '@angular/core';
|
|
4
|
-
import { ChartDataTable, ChartValueFormat } from '@ids-group-ltd/ids-design-system/core';
|
|
5
7
|
import { ChartLegendItem } from '@ids-group-ltd/ids-design-system/components/chart-legend';
|
|
6
8
|
import { ChartTooltipTrigger, ChartTooltipContext, ChartTooltipOrigin } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
|
|
7
9
|
|
|
@@ -18,17 +20,22 @@ interface LineChartSeries {
|
|
|
18
20
|
* when one is hidden; left out, a series takes the colour of its position. */
|
|
19
21
|
slot?: number;
|
|
20
22
|
}
|
|
21
|
-
/** How the secondary axis relates to the primary one.
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
* to a round number, so its series stops short of the top.
|
|
25
|
-
* - `'exact'` — one set of gridlines, and the secondary axis ends exactly at its
|
|
26
|
-
* largest reading, so its series uses the full height and the labels are not round.
|
|
27
|
-
* - `'independent'` — each axis is scaled and gridded on its own.
|
|
28
|
-
* - `'stacked'` — two plots one above the other, sharing the category axis. */
|
|
29
|
-
type LineChartAxisMode = 'rounded' | 'exact' | 'independent' | 'stacked';
|
|
23
|
+
/** How the secondary axis relates to the primary one. The same four words `ds-chart` takes for a
|
|
24
|
+
* composed two-scale plot, so a combo and a line chart are read the same way. */
|
|
25
|
+
type LineChartAxisMode = ChartAxisMode;
|
|
30
26
|
/** What a `null` reading draws: a hole in the line, or a point at zero. */
|
|
31
27
|
type LineChartGaps = 'break' | 'zero';
|
|
28
|
+
/** A label pinned to one reading, so the point it names is legible with no pointer — a peak, a
|
|
29
|
+
* launch, the month a number turned. The tooltip answers "what is this?" on hover; an annotation
|
|
30
|
+
* answers it in a printed page or a screenshot. */
|
|
31
|
+
interface LineChartAnnotation {
|
|
32
|
+
/** 0-based position along the category axis. */
|
|
33
|
+
readonly categoryIndex: number;
|
|
34
|
+
readonly label: string;
|
|
35
|
+
/** Which series the reading belongs to. Left out, the first plotted one. An annotation whose
|
|
36
|
+
* series is hidden, or whose reading is `null`, draws nothing. */
|
|
37
|
+
readonly seriesId?: string;
|
|
38
|
+
}
|
|
32
39
|
/** One reading, named by the series it belongs to and the category it sits under. */
|
|
33
40
|
interface LineChartPoint {
|
|
34
41
|
readonly series: LineChartSeries;
|
|
@@ -61,12 +68,6 @@ interface ChartLayout {
|
|
|
61
68
|
readonly categoryLabelY: number;
|
|
62
69
|
readonly stacked: boolean;
|
|
63
70
|
}
|
|
64
|
-
interface LinePoint {
|
|
65
|
-
readonly categoryIndex: number;
|
|
66
|
-
readonly x: number;
|
|
67
|
-
readonly y: number;
|
|
68
|
-
readonly value: number;
|
|
69
|
-
}
|
|
70
71
|
|
|
71
72
|
interface ResolvedSeries {
|
|
72
73
|
readonly series: LineChartSeries;
|
|
@@ -96,9 +97,13 @@ declare class LineChartComponent {
|
|
|
96
97
|
* loses its tail and a shorter one ends early. */
|
|
97
98
|
readonly series: _angular_core.InputSignal<readonly LineChartSeries[]>;
|
|
98
99
|
/** How a secondary axis relates to the primary one. */
|
|
99
|
-
readonly yAxisMode: _angular_core.InputSignal<
|
|
100
|
+
readonly yAxisMode: _angular_core.InputSignal<_ids_group_ltd_ids_design_system_core.ChartAxisMode>;
|
|
100
101
|
/** Draws a dot at every reading. Off, the dots appear on hover and on focus only. */
|
|
101
102
|
readonly showMarkers: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
103
|
+
/** Labels pinned over their readings, for the points that have to read without a pointer. They
|
|
104
|
+
* are drawn, not announced: the data table already carries every reading, and repeating one in
|
|
105
|
+
* the plot makes a screen reader say it twice. */
|
|
106
|
+
readonly annotations: _angular_core.InputSignal<readonly LineChartAnnotation[]>;
|
|
102
107
|
/** Makes every reading focusable and clickable. A series drawn without markers grows invisible
|
|
103
108
|
* ones so there is something to land on; they appear on hover and on focus.
|
|
104
109
|
*
|
|
@@ -108,6 +113,12 @@ declare class LineChartComponent {
|
|
|
108
113
|
/** The point that was clicked, or activated with Enter or Space. Fires whether or not
|
|
109
114
|
* `interactive` is set. */
|
|
110
115
|
readonly pointClicked: _angular_core.OutputEmitterRef<LineChartPoint>;
|
|
116
|
+
/** Holds the crosshair and its tooltip on the category that was clicked, until Escape or a
|
|
117
|
+
* press outside releases it. Off by default: a click is already the drill-down hook, and a
|
|
118
|
+
* crosshair left standing after the pointer has gone needs a reader who knows why. `pointClicked`
|
|
119
|
+
* fires either way — pinning is a state, not a handler. */
|
|
120
|
+
readonly pinOnClick: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
121
|
+
protected readonly pinnedCategory: _angular_core.WritableSignal<boolean>;
|
|
111
122
|
/** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the
|
|
112
123
|
* one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed
|
|
113
124
|
* marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full
|
|
@@ -120,6 +131,20 @@ declare class LineChartComponent {
|
|
|
120
131
|
/** How many value-axis ticks to aim for. A hint, not a count: ticks snap to a round step, so
|
|
121
132
|
* the axis may carry one more or one fewer. */
|
|
122
133
|
readonly tickCount: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
134
|
+
/** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;
|
|
135
|
+
* `'none'` leaves the chart bare, for one placed inside a card the page has already drawn.
|
|
136
|
+
* Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'` — whether charts live inside cards
|
|
137
|
+
* is one decision per app rather than per plot. */
|
|
138
|
+
readonly frame: _angular_core.InputSignal<ChartFrame | null>;
|
|
139
|
+
/** How long the tooltip stays after the pointer leaves the mark, in milliseconds. Zero, the
|
|
140
|
+
* default, takes it away at once: a panel that outlives the pointer sits over the plot the
|
|
141
|
+
* reader has moved on to.
|
|
142
|
+
*
|
|
143
|
+
* Raise it only for a panel a reader has to REACH — one carrying a link, a figure, or anything
|
|
144
|
+
* selectable — which is WCAG 1.4.13's hoverable clause. The panel is portaled to the body, so
|
|
145
|
+
* crossing the gap to it at an ordinary pointer speed needs about 140. Unset falls back to
|
|
146
|
+
* `DS_CONFIG.chart.tooltipLingerMs`, then 0. */
|
|
147
|
+
readonly tooltipLingerMs: _angular_core.InputSignalWithTransform<number | null, number | null>;
|
|
123
148
|
/** Printed above the plot as the chart's visible title, and reused as the annex table's
|
|
124
149
|
* caption. */
|
|
125
150
|
readonly caption: _angular_core.InputSignal<string | null>;
|
|
@@ -128,8 +153,20 @@ declare class LineChartComponent {
|
|
|
128
153
|
/** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,
|
|
129
154
|
* `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so
|
|
130
155
|
* `'none'` belongs only where the same data is already in a table on the page.
|
|
131
|
-
* Unset falls back to `DS_CONFIG.chart.dataTable`, then `'
|
|
156
|
+
* Unset falls back to `DS_CONFIG.chart.dataTable`, then `'none'`. */
|
|
132
157
|
readonly dataTable: _angular_core.InputSignal<ChartDataTable | null>;
|
|
158
|
+
/** Pins the value axis instead of deriving it from the data. A panel opened one subject at a
|
|
159
|
+
* time — one agent, one microsite — derives a different axis for each of them, so two plots with
|
|
160
|
+
* the same gentle wiggle can be four times apart in value and nothing on screen says so. A fixed
|
|
161
|
+
* maximum is what makes two renders comparable.
|
|
162
|
+
*
|
|
163
|
+
* Null, the default, keeps the derived axis. Applies to the primary axis; `maxSecondary` pins
|
|
164
|
+
* the second one where a series sets `axis: 'secondary'`. A maximum below the data does not clip
|
|
165
|
+
* it — the larger of the two wins, because silently hiding a reading is worse than a taller axis
|
|
166
|
+
* than you asked for. */
|
|
167
|
+
readonly max: _angular_core.InputSignal<number | null>;
|
|
168
|
+
/** Pins the secondary value axis. See `max`. */
|
|
169
|
+
readonly maxSecondary: _angular_core.InputSignal<number | null>;
|
|
133
170
|
/** Draws skeleton marks in place of the data, at the same count, so the chart does not resize
|
|
134
171
|
* when the data lands. */
|
|
135
172
|
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -147,10 +184,11 @@ declare class LineChartComponent {
|
|
|
147
184
|
* included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale
|
|
148
185
|
* grouping with a K/M/B suffix past four digits. */
|
|
149
186
|
readonly valueFormat: _angular_core.InputSignal<ChartValueFormat | null>;
|
|
187
|
+
readonly frameResolved: _angular_core.Signal<ChartFrame>;
|
|
150
188
|
readonly dataTableResolved: _angular_core.Signal<ChartDataTable>;
|
|
151
189
|
readonly emptyTextResolved: _angular_core.Signal<string>;
|
|
152
190
|
readonly errorTextResolved: _angular_core.Signal<string>;
|
|
153
|
-
readonly valueFormatResolved: _angular_core.Signal<
|
|
191
|
+
readonly valueFormatResolved: _angular_core.Signal<typeof defaultChartFormat>;
|
|
154
192
|
protected readonly viewBox = "0 0 640 320";
|
|
155
193
|
protected readonly resolvedSeries: _angular_core.Signal<readonly ResolvedSeries[]>;
|
|
156
194
|
/** Ids of the series the legend has switched off. Two-way, so a page can drive it from a URL
|
|
@@ -162,6 +200,12 @@ declare class LineChartComponent {
|
|
|
162
200
|
readonly rescaleOnHide: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
163
201
|
/** Whether the legend switches series off. Off leaves it a plain key. */
|
|
164
202
|
readonly legendFilters: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
203
|
+
/** What a legend control does. `'isolate'` shows one series and hides the rest — one action to
|
|
204
|
+
* answer "show me only this" rather than one per series. `'toggle'` hides one and leaves the
|
|
205
|
+
* rest, for taking a dominant series out so the others can be read at a usable scale.
|
|
206
|
+
* Forwarded to `ds-chart-legend`, which renders radios for the first and checkboxes for the
|
|
207
|
+
* second. */
|
|
208
|
+
readonly legendMode: _angular_core.InputSignal<"toggle" | "isolate">;
|
|
165
209
|
/** Shown in place of the plot once the legend has switched every series off. Without it the
|
|
166
210
|
* reader is left with an empty grid and nothing saying why. */
|
|
167
211
|
readonly noVisibleSeriesText: _angular_core.InputSignal<string>;
|
|
@@ -184,6 +228,16 @@ declare class LineChartComponent {
|
|
|
184
228
|
protected readonly axes: _angular_core.Signal<AxisLayout>;
|
|
185
229
|
protected readonly categoryPositions: _angular_core.Signal<number[]>;
|
|
186
230
|
protected readonly plottedSeries: _angular_core.Signal<readonly PlottedSeries[]>;
|
|
231
|
+
/** Annotations resolved onto the markers the plot already computed, so a label sits exactly on
|
|
232
|
+
* its reading and moves with it. One whose series is hidden or whose reading is missing has no
|
|
233
|
+
* marker and is dropped — a hidden series must not leave its label floating over the plot. */
|
|
234
|
+
protected readonly placedAnnotations: _angular_core.Signal<{
|
|
235
|
+
key: string;
|
|
236
|
+
label: string;
|
|
237
|
+
x: number;
|
|
238
|
+
y: number;
|
|
239
|
+
anchor: string;
|
|
240
|
+
}[]>;
|
|
187
241
|
protected readonly primaryTicks: _angular_core.Signal<AxisTick[]>;
|
|
188
242
|
protected readonly secondaryTicks: _angular_core.Signal<readonly AxisTick[]>;
|
|
189
243
|
/** Drawn only when the two axes do not share the primary's gridlines, and only
|
|
@@ -192,8 +246,9 @@ declare class LineChartComponent {
|
|
|
192
246
|
protected readonly stacked: _angular_core.Signal<boolean>;
|
|
193
247
|
protected readonly categoryLabelY: _angular_core.Signal<number>;
|
|
194
248
|
/** The category under the pointer, or -1. */
|
|
249
|
+
private readonly host;
|
|
195
250
|
protected readonly activeCategory: _angular_core.WritableSignal<number>;
|
|
196
|
-
protected readonly categoryBands: _angular_core.Signal<_ids_group_ltd_ids_design_system_components.
|
|
251
|
+
protected readonly categoryBands: _angular_core.Signal<_ids_group_ltd_ids_design_system_components.PointScale>;
|
|
197
252
|
protected readonly activeBandX: _angular_core.Signal<number>;
|
|
198
253
|
protected readonly activeBandWidth: _angular_core.Signal<number>;
|
|
199
254
|
protected readonly activeCategoryX: _angular_core.Signal<number>;
|
|
@@ -203,6 +258,14 @@ declare class LineChartComponent {
|
|
|
203
258
|
* it over the readings it names instead of over the finger. */
|
|
204
259
|
private readingAnchor;
|
|
205
260
|
protected clearActiveCategory(): void;
|
|
261
|
+
/** The panel is portaled to the body, so the plot never sees the pointer arrive on it. This is
|
|
262
|
+
* the other half of the grace period: reaching the panel keeps it open, and leaving the panel for
|
|
263
|
+
* anything that is not the plot starts the clear the plot can no longer start itself. */
|
|
264
|
+
protected onPointerAnywhere(event: PointerEvent): void;
|
|
265
|
+
private cancelCategoryClear;
|
|
266
|
+
private readonly tooltipLingerResolved;
|
|
267
|
+
private pendingCategoryClear;
|
|
268
|
+
protected releaseCategoryPin(): void;
|
|
206
269
|
/** Whether the plot opens a tooltip, and for what. `'axis'` names every series at the
|
|
207
270
|
* category under the pointer, which is the reading a multi-series line is compared on;
|
|
208
271
|
* `'item'` names only the marker itself. */
|
|
@@ -241,7 +304,7 @@ declare class LineChartComponent {
|
|
|
241
304
|
protected readonly cursorBottomY: _angular_core.Signal<number>;
|
|
242
305
|
protected readonly primaryLabelX: _angular_core.Signal<number>;
|
|
243
306
|
protected readonly secondaryLabelX: _angular_core.Signal<number>;
|
|
244
|
-
protected readonly secondaryLabelAnchor: _angular_core.Signal<"
|
|
307
|
+
protected readonly secondaryLabelAnchor: _angular_core.Signal<"start" | "end">;
|
|
245
308
|
protected readonly categoryLabels: _angular_core.Signal<readonly CategoryLabel[]>;
|
|
246
309
|
protected readonly tableRows: _angular_core.Signal<{
|
|
247
310
|
category: string;
|
|
@@ -251,6 +314,10 @@ declare class LineChartComponent {
|
|
|
251
314
|
protected pointOf(entry: PlottedSeries, marker: LinePoint): LineChartPoint;
|
|
252
315
|
protected markerLabel(entry: PlottedSeries, marker: LinePoint): string;
|
|
253
316
|
protected onMarkerKey(entry: PlottedSeries, marker: LinePoint, event: Event): void;
|
|
317
|
+
/** The pin hangs off the MARKER, not off the plot: the marker is already focusable and already
|
|
318
|
+
* answers Enter and Space, so the keyboard gets the pin for free. A click handler on the plot
|
|
319
|
+
* would have no keyboard route at all. A second activation of the pinned category releases it. */
|
|
320
|
+
protected onMarkerClick(entry: PlottedSeries, marker: LinePoint): void;
|
|
254
321
|
protected readonly isEmpty: _angular_core.Signal<boolean>;
|
|
255
322
|
protected readonly showLegend: _angular_core.Signal<boolean>;
|
|
256
323
|
protected readonly noVisibleSeries: _angular_core.Signal<boolean>;
|
|
@@ -261,8 +328,8 @@ declare class LineChartComponent {
|
|
|
261
328
|
private plotFor;
|
|
262
329
|
private ticksFor;
|
|
263
330
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LineChartComponent, never>;
|
|
264
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LineChartComponent, "ds-line-chart", never, { "categories": { "alias": "categories"; "required": true; "isSignal": true; }; "series": { "alias": "series"; "required": true; "isSignal": true; }; "yAxisMode": { "alias": "yAxisMode"; "required": false; "isSignal": true; }; "showMarkers": { "alias": "showMarkers"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "dimOthers": { "alias": "dimOthers"; "required": false; "isSignal": true; }; "gaps": { "alias": "gaps"; "required": false; "isSignal": true; }; "tickCount": { "alias": "tickCount"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "summary": { "alias": "summary"; "required": false; "isSignal": true; }; "dataTable": { "alias": "dataTable"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorText": { "alias": "errorText"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "hiddenSeries": { "alias": "hiddenSeries"; "required": false; "isSignal": true; }; "rescaleOnHide": { "alias": "rescaleOnHide"; "required": false; "isSignal": true; }; "legendFilters": { "alias": "legendFilters"; "required": false; "isSignal": true; }; "noVisibleSeriesText": { "alias": "noVisibleSeriesText"; "required": false; "isSignal": true; }; "patterns": { "alias": "patterns"; "required": false; "isSignal": true; }; "staggerMs": { "alias": "staggerMs"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "tooltipAnchor": { "alias": "tooltipAnchor"; "required": false; "isSignal": true; }; }, { "pointClicked": "pointClicked"; "hiddenSeries": "hiddenSeriesChange"; }, ["tooltipTemplate"], never, true, never>;
|
|
331
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LineChartComponent, "ds-line-chart", never, { "categories": { "alias": "categories"; "required": true; "isSignal": true; }; "series": { "alias": "series"; "required": true; "isSignal": true; }; "yAxisMode": { "alias": "yAxisMode"; "required": false; "isSignal": true; }; "showMarkers": { "alias": "showMarkers"; "required": false; "isSignal": true; }; "annotations": { "alias": "annotations"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "pinOnClick": { "alias": "pinOnClick"; "required": false; "isSignal": true; }; "dimOthers": { "alias": "dimOthers"; "required": false; "isSignal": true; }; "gaps": { "alias": "gaps"; "required": false; "isSignal": true; }; "tickCount": { "alias": "tickCount"; "required": false; "isSignal": true; }; "frame": { "alias": "frame"; "required": false; "isSignal": true; }; "tooltipLingerMs": { "alias": "tooltipLingerMs"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "summary": { "alias": "summary"; "required": false; "isSignal": true; }; "dataTable": { "alias": "dataTable"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "maxSecondary": { "alias": "maxSecondary"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorText": { "alias": "errorText"; "required": false; "isSignal": true; }; "valueFormat": { "alias": "valueFormat"; "required": false; "isSignal": true; }; "hiddenSeries": { "alias": "hiddenSeries"; "required": false; "isSignal": true; }; "rescaleOnHide": { "alias": "rescaleOnHide"; "required": false; "isSignal": true; }; "legendFilters": { "alias": "legendFilters"; "required": false; "isSignal": true; }; "legendMode": { "alias": "legendMode"; "required": false; "isSignal": true; }; "noVisibleSeriesText": { "alias": "noVisibleSeriesText"; "required": false; "isSignal": true; }; "patterns": { "alias": "patterns"; "required": false; "isSignal": true; }; "staggerMs": { "alias": "staggerMs"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "tooltipAnchor": { "alias": "tooltipAnchor"; "required": false; "isSignal": true; }; }, { "pointClicked": "pointClicked"; "hiddenSeries": "hiddenSeriesChange"; }, ["tooltipTemplate"], never, true, never>;
|
|
265
332
|
}
|
|
266
333
|
|
|
267
334
|
export { LineChartComponent };
|
|
268
|
-
export type { LineChartAxisMode, LineChartGaps, LineChartPoint, LineChartSeries };
|
|
335
|
+
export type { LineChartAnnotation, LineChartAxisMode, LineChartGaps, LineChartPoint, LineChartSeries };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Signal, ElementRef, TemplateRef, ModelSignal, WritableSignal } from '@angular/core';
|
|
3
|
+
import { ChartFormatLocation, ChartThreshold, IconName } from '@ids-group-ltd/ids-design-system/core';
|
|
3
4
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
-
import { IconName } from '@ids-group-ltd/ids-design-system/core';
|
|
5
5
|
import { FieldMessageState } from '@ids-group-ltd/ids-design-system/components/field-message';
|
|
6
6
|
import { Params, QueryParamsHandling, UrlTree } from '@angular/router';
|
|
7
7
|
import { OverlayRef, Overlay, FlexibleConnectedPositionStrategy, OverlayConfig } from '@angular/cdk/overlay';
|
|
@@ -47,6 +47,12 @@ declare const CHART_RAMP_COLORS: readonly string[];
|
|
|
47
47
|
|
|
48
48
|
/** @internal */
|
|
49
49
|
declare function formatValue(value: number, locale?: string): string;
|
|
50
|
+
/** The built-in `valueFormat`: compact on a tick (`1.2M`), spelled out everywhere else
|
|
51
|
+
* (`1 248 392`). A caller-supplied formatter receives the same `location` and decides for
|
|
52
|
+
* itself; this is only the default.
|
|
53
|
+
*
|
|
54
|
+
* @internal */
|
|
55
|
+
declare function defaultChartFormat(value: number, location: ChartFormatLocation): string;
|
|
50
56
|
/** @internal */
|
|
51
57
|
declare function formatPercent(value: number, total: number): string;
|
|
52
58
|
/** Whole percentages that sum to exactly 100. Rounding each share on its own
|
|
@@ -56,13 +62,16 @@ declare function formatPercent(value: number, total: number): string;
|
|
|
56
62
|
declare function largestRemainder(values: readonly number[]): number[];
|
|
57
63
|
/** @internal */
|
|
58
64
|
declare function formatTick(value: number, step: number): string;
|
|
59
|
-
/** One mark's share of the total its siblings add up to.
|
|
65
|
+
/** One mark's share of the total its siblings add up to, as a bare percentage.
|
|
60
66
|
*
|
|
61
|
-
*
|
|
62
|
-
* that number tells the reader nothing they are not already looking at. The share is arithmetic
|
|
63
|
-
* the reader should not have to do. Empty for a lone mark, and empty for a reading that is not
|
|
67
|
+
* Empty for a lone mark, which is the whole of its own total, and empty for a reading that is not
|
|
64
68
|
* part of a total anyone can see: negatives and non-finite values are excluded from the total
|
|
65
|
-
* rather than subtracted from it.
|
|
69
|
+
* rather than subtracted from it, so a negative mark has no share rather than a misleading one.
|
|
70
|
+
*
|
|
71
|
+
* @internal */
|
|
72
|
+
declare function shareOfTotal(values: readonly number[], index: number): string;
|
|
73
|
+
/** The same share, phrased for a tooltip line, where no column header stands above it to say what
|
|
74
|
+
* the percentage is OF.
|
|
66
75
|
*
|
|
67
76
|
* @internal */
|
|
68
77
|
declare function describeShare(values: readonly number[], index: number): string;
|
|
@@ -73,17 +82,56 @@ declare function describeShare(values: readonly number[], index: number): string
|
|
|
73
82
|
* @internal */
|
|
74
83
|
declare function elementWidth(host: ElementRef<HTMLElement>): Signal<number>;
|
|
75
84
|
|
|
85
|
+
/** One plotted reading, in the canvas's own coordinates.
|
|
86
|
+
*
|
|
87
|
+
* @internal */
|
|
88
|
+
interface LinePoint {
|
|
89
|
+
readonly categoryIndex: number;
|
|
90
|
+
readonly x: number;
|
|
91
|
+
readonly y: number;
|
|
92
|
+
readonly value: number;
|
|
93
|
+
}
|
|
94
|
+
/** The unbroken runs of a series: a missing reading ends one run and starts the next.
|
|
95
|
+
*
|
|
96
|
+
* @internal */
|
|
97
|
+
declare function lineSegments(points: readonly (LinePoint | null)[]): LinePoint[][];
|
|
98
|
+
/** `''` rather than a partial list when a coordinate is unplottable: one `NaN` in a
|
|
99
|
+
* `points` list or a path `d` voids the whole attribute, and the line then vanishes
|
|
100
|
+
* with nothing logged.
|
|
101
|
+
*
|
|
102
|
+
* @internal */
|
|
103
|
+
declare function polylinePoints(segment: readonly LinePoint[]): string;
|
|
104
|
+
/** @internal */
|
|
105
|
+
declare function areaPath(segment: readonly LinePoint[], baselineY: number): string;
|
|
106
|
+
|
|
107
|
+
/** The floor of a domain that has to include zero: zero itself for an all-positive
|
|
108
|
+
* series, and the most negative reading otherwise.
|
|
109
|
+
*
|
|
110
|
+
* @internal */
|
|
111
|
+
declare function domainMinOf(values: readonly number[]): number;
|
|
76
112
|
/** @internal */
|
|
77
|
-
declare function tickValues(domainMax: number, targetCount: number): number[];
|
|
113
|
+
declare function tickValues(domainMin: number, domainMax: number, targetCount: number): number[];
|
|
78
114
|
/** @internal */
|
|
79
|
-
|
|
115
|
+
interface NiceDomain {
|
|
116
|
+
readonly min: number;
|
|
117
|
+
readonly max: number;
|
|
118
|
+
}
|
|
119
|
+
/** @internal */
|
|
120
|
+
declare function niceDomain(domainMin: number, domainMax: number, targetCount: number): NiceDomain;
|
|
80
121
|
/** Distance between two ticks, which `formatTick` needs to pick a precision. A
|
|
81
122
|
* degenerate series yields a single tick and therefore no step.
|
|
82
123
|
*
|
|
83
124
|
* @internal */
|
|
84
125
|
declare function tickStep(ticks: readonly number[]): number;
|
|
85
126
|
/** @internal */
|
|
86
|
-
declare function linearScale(domainMax: number, rangeSize: number): (value: number) => number;
|
|
127
|
+
declare function linearScale(domainMin: number, domainMax: number, rangeSize: number): (value: number) => number;
|
|
128
|
+
/** @internal */
|
|
129
|
+
interface PointScale {
|
|
130
|
+
readonly step: number;
|
|
131
|
+
readonly count: number;
|
|
132
|
+
position(index: number): number;
|
|
133
|
+
indexAt(offset: number): number;
|
|
134
|
+
}
|
|
87
135
|
/** @internal */
|
|
88
136
|
interface BandScale {
|
|
89
137
|
readonly bandWidth: number;
|
|
@@ -96,8 +144,24 @@ interface BandScale {
|
|
|
96
144
|
* a caller branches on rather than clamps. */
|
|
97
145
|
indexAt(offset: number): number;
|
|
98
146
|
}
|
|
147
|
+
/** Positions for marks that sit AT a category rather than inside it — the readings of a line.
|
|
148
|
+
* The first is at the plot's start and the last at its end, so the run fills the axis rather than
|
|
149
|
+
* floating half a slot inside it. A single reading has no run to fill and takes the middle.
|
|
150
|
+
*
|
|
151
|
+
* `step` is the distance between neighbours, which is what a crosshair band is a slot of; at the
|
|
152
|
+
* two ends that slot is half outside the plot and the caller clamps it.
|
|
153
|
+
*
|
|
154
|
+
* @internal */
|
|
155
|
+
declare function pointScale(count: number, rangeSize: number): PointScale;
|
|
99
156
|
/** @internal */
|
|
100
157
|
declare function bandScale(count: number, rangeSize: number, paddingRatio: number): BandScale;
|
|
158
|
+
/** The smallest 1/2/5/10 x power-of-ten step that is not below `minimumStep`.
|
|
159
|
+
* `niceDomain` picks its own number of intervals, so it cannot answer this: a second
|
|
160
|
+
* axis drawn against the first's gridlines has to reach its data within the intervals
|
|
161
|
+
* the first already drew.
|
|
162
|
+
*
|
|
163
|
+
* @internal */
|
|
164
|
+
declare function roundStepAtLeast(minimumStep: number): number;
|
|
101
165
|
|
|
102
166
|
/** Entrance delay for the mark at `index`, in milliseconds. `stepMs` of `0` is the default and
|
|
103
167
|
* means no stagger at all.
|
|
@@ -112,9 +176,13 @@ declare function staggerDelay(index: number, stepMs: number): number;
|
|
|
112
176
|
*
|
|
113
177
|
* @internal */
|
|
114
178
|
declare function nextRovingIndex(key: string, current: number, count: number): number | null;
|
|
179
|
+
/** The mark `index` within `scope`. `within` narrows the search for a chart whose marks repeat the
|
|
180
|
+
* same index once per series.
|
|
181
|
+
*
|
|
182
|
+
* @internal */
|
|
183
|
+
declare function markAt(scope: Element | null, index: number, within?: string): Element | null;
|
|
115
184
|
/** Moves DOM focus to the mark `index` within `scope`, which is what makes the roving tabindex a
|
|
116
|
-
* traversal rather than a state change nobody can see.
|
|
117
|
-
* whose marks repeat the same index once per series.
|
|
185
|
+
* traversal rather than a state change nobody can see.
|
|
118
186
|
*
|
|
119
187
|
* @internal */
|
|
120
188
|
declare function focusMark(scope: Element | null, index: number, within?: string): void;
|
|
@@ -133,7 +201,7 @@ interface SummaryPoint {
|
|
|
133
201
|
* levels of chart description, and the encoding is the one thing a screen-reader user cannot use.
|
|
134
202
|
*
|
|
135
203
|
* @internal */
|
|
136
|
-
declare function describeSeries(label: string, points: readonly SummaryPoint[], format?: (value: number) => string, tableFollows?: boolean): string;
|
|
204
|
+
declare function describeSeries(label: string, points: readonly SummaryPoint[], format?: (value: number) => string, tableFollows?: boolean, thresholds?: readonly ChartThreshold[]): string;
|
|
137
205
|
|
|
138
206
|
/** @internal */
|
|
139
207
|
declare function chipFit(count: Signal<number>, chipRow: Signal<ElementRef<HTMLElement> | undefined>, enabled: Signal<boolean>,
|
|
@@ -173,12 +241,19 @@ declare abstract class DsMessageBase {
|
|
|
173
241
|
/** Advisory text, shown when there is no error. */
|
|
174
242
|
readonly warning: i0.InputSignalWithTransform<string, string | null | undefined>;
|
|
175
243
|
/** Reserve the message-row height even when empty, so the control doesn't shift
|
|
176
|
-
* the layout below it when a hint/error appears.
|
|
177
|
-
* `
|
|
244
|
+
* the layout below it when a hint/error appears. What an unset value falls back
|
|
245
|
+
* to is the subclass's call, in `reserveMessageResolved`: a field takes
|
|
246
|
+
* `DS_CONFIG.field.reserveMessage`, a button does not. */
|
|
178
247
|
readonly reserveMessage: i0.InputSignalWithTransform<boolean | null, unknown>;
|
|
179
248
|
/** Glyph on the message line, overriding what the state resolves to. Unset
|
|
180
249
|
* follows `DS_CONFIG.field.stateIcons`; `false` removes the glyph here alone. */
|
|
181
250
|
readonly messageIcon: i0.InputSignal<false | IconName | null>;
|
|
251
|
+
/** Whether an unset `reserveMessage` falls back to `DS_CONFIG.field.reserveMessage`.
|
|
252
|
+
* True for a field, whose row reserves so its neighbours do not shift; `ds-button`
|
|
253
|
+
* turns it off, because a button is not in that column and an app-wide field
|
|
254
|
+
* setting would otherwise give every button an empty message row. Read lazily, so
|
|
255
|
+
* a subclass initializer running after this one still decides it. */
|
|
256
|
+
protected readonly reserveFollowsFieldDefault: boolean;
|
|
182
257
|
readonly reserveMessageResolved: i0.Signal<boolean>;
|
|
183
258
|
static ɵfac: i0.ɵɵFactoryDeclaration<DsMessageBase, never>;
|
|
184
259
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DsMessageBase, never, never, { "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "warning": { "alias": "warning"; "required": false; "isSignal": true; }; "reserveMessage": { "alias": "reserveMessage"; "required": false; "isSignal": true; }; "messageIcon": { "alias": "messageIcon"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -801,5 +876,5 @@ interface DsTypeAhead {
|
|
|
801
876
|
/** @internal */
|
|
802
877
|
declare function createTypeAhead(): DsTypeAhead;
|
|
803
878
|
|
|
804
|
-
export { CHART_RAMP_COLORS, CHART_SERIES_COLORS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, bandScale, chartColors, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, describeSeries, describeShare, disposeWithLeave, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, forwardOverlayTokens, largestRemainder, linearScale, nextControlId, nextRovingIndex,
|
|
805
|
-
export type { BandScale, DsAriaCurrent, DsDestination, DsFieldError, DsFieldErrorsInput, DsFieldMessage, DsLinkModifiers, DsOverlayCloseCause, DsRouterLink, SummaryPoint };
|
|
879
|
+
export { CHART_RAMP_COLORS, CHART_SERIES_COLORS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandScale, chartColors, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, defaultChartFormat, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, forwardOverlayTokens, largestRemainder, lineSegments, linearScale, markAt, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, resolveBrandValue, resolveFieldMessage, roundStepAtLeast, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge };
|
|
880
|
+
export type { BandScale, DsAriaCurrent, DsDestination, DsFieldError, DsFieldErrorsInput, DsFieldMessage, DsLinkModifiers, DsOverlayCloseCause, DsRouterLink, LinePoint, NiceDomain, PointScale, SummaryPoint };
|
|
@@ -23,8 +23,62 @@ type CardPadding = 'none' | 'sm' | 'md' | 'lg';
|
|
|
23
23
|
* route to the numbers, so `'none'` belongs only where the same data is already in a table on the
|
|
24
24
|
* page. */
|
|
25
25
|
type ChartDataTable = 'toggle' | 'visible' | 'none';
|
|
26
|
-
/**
|
|
27
|
-
|
|
26
|
+
/** Whether a chart draws its own bordered, padded box. `'auto'` draws it; `'none'` leaves the
|
|
27
|
+
* chart bare, for a chart placed inside a card the page has already drawn. */
|
|
28
|
+
type ChartFrame = 'auto' | 'none';
|
|
29
|
+
/** Where a chart-value formatter is printing: the compact `'tick'` label on the value axis, or
|
|
30
|
+
* `'tooltip'` everywhere else a value is spelled out in full, meaning the annex table, the
|
|
31
|
+
* generated description, and a value printed beside a mark. */
|
|
32
|
+
type ChartFormatLocation = 'tick' | 'tooltip';
|
|
33
|
+
/** Formats every value a chart prints — the annex table and the generated description included.
|
|
34
|
+
* Called with the location it is formatting for, so one function can abbreviate on the axis and
|
|
35
|
+
* spell the value out everywhere else. */
|
|
36
|
+
type ChartValueFormat = (value: number, location: ChartFormatLocation) => string;
|
|
37
|
+
/** How a reference line is stroked. Named rather than a `stroke-dasharray`, so the rhythm is the
|
|
38
|
+
* design system's to retune once and the same word draws the same line on every chart. */
|
|
39
|
+
type ChartThresholdDash = 'solid' | 'dashed' | 'dotted';
|
|
40
|
+
/** A line drawn across a chart's plot at one reading - a target, a budget, an SLA - or, with `to`,
|
|
41
|
+
* the band between two of them.
|
|
42
|
+
*
|
|
43
|
+
* ONE number, not a coordinate pair: a horizontal line has a single reading, and a shape that
|
|
44
|
+
* makes it write that reading twice is a shape whose two ends can drift apart. */
|
|
45
|
+
interface ChartThreshold {
|
|
46
|
+
readonly value: number;
|
|
47
|
+
/** Printed at the line's left end and named in the generated description. An unlabelled one
|
|
48
|
+
* reads as "Threshold" there. */
|
|
49
|
+
readonly label?: string;
|
|
50
|
+
/** Any CSS colour. Unset takes `--ds-chart-threshold-color`. */
|
|
51
|
+
readonly color?: string;
|
|
52
|
+
/** The band's other end. Present, the threshold is drawn as a filled region between the two
|
|
53
|
+
* readings rather than a line; either order reads the same. */
|
|
54
|
+
readonly to?: number;
|
|
55
|
+
/** Defaults to `'dashed'`, which is what separates an annotation from another series. Carries
|
|
56
|
+
* nothing on a band, which is a fill. */
|
|
57
|
+
readonly dash?: ChartThresholdDash;
|
|
58
|
+
}
|
|
59
|
+
/** Which of a chart's two value axes a mark is measured against. */
|
|
60
|
+
type ChartAxis = 'primary' | 'secondary';
|
|
61
|
+
/** How a chart's second value axis relates to its first.
|
|
62
|
+
*
|
|
63
|
+
* - `'rounded'` - one set of gridlines, and the secondary axis rounds its step up to a round
|
|
64
|
+
* number, so its series stops short of the top.
|
|
65
|
+
* - `'exact'` - one set of gridlines, and the secondary axis ends exactly at its largest
|
|
66
|
+
* reading, so its series uses the full height and the labels are not round.
|
|
67
|
+
* - `'independent'` - each axis is scaled and gridded on its own.
|
|
68
|
+
* - `'stacked'` - two plots one above the other, sharing the category axis. */
|
|
69
|
+
type ChartAxisMode = 'rounded' | 'exact' | 'independent' | 'stacked';
|
|
70
|
+
/** How several series share one category's band.
|
|
71
|
+
*
|
|
72
|
+
* - `'none'` - every series draws from the baseline at the band's centre, which is the single
|
|
73
|
+
* series case and what a chart that was handed one list has always done.
|
|
74
|
+
* - `'grouped'` - each series takes its own slot inside the band, side by side.
|
|
75
|
+
* - `'stacked'` - each series starts where the one before it ended, so the band's full height is
|
|
76
|
+
* the category's total.
|
|
77
|
+
* - `'normalized'` - stacked, then divided by the category's own total, so every band is full and
|
|
78
|
+
* the axis reads in shares rather than in the data's own unit.
|
|
79
|
+
*
|
|
80
|
+
* Unrelated to `ChartAxisMode`'s `'stacked'`, which puts two PLOTS one above the other. */
|
|
81
|
+
type ChartStackMode = 'none' | 'grouped' | 'stacked' | 'normalized';
|
|
28
82
|
|
|
29
83
|
declare const ICONS: {
|
|
30
84
|
readonly search: "<circle cx=\"11\" cy=\"11\" r=\"7\" /><path d=\"m20 20-3.5-3.5\" />";
|
|
@@ -86,7 +140,7 @@ declare const ICONS: {
|
|
|
86
140
|
readonly lock: "<rect x=\"4\" y=\"11\" width=\"16\" height=\"10\" rx=\"2\" /><path d=\"M8 11V7a4 4 0 0 1 8 0v4\" />";
|
|
87
141
|
readonly logout: "<path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\" /><path d=\"m16 17 5-5-5-5M21 12H9\" />";
|
|
88
142
|
readonly help: "<circle cx=\"12\" cy=\"12\" r=\"9\" /><path d=\"M9.5 9a2.5 2.5 0 0 1 5 0c0 1.5-2.5 2-2.5 4M12 17v.01\" />";
|
|
89
|
-
readonly pin: "<path d=\"
|
|
143
|
+
readonly pin: "<path d=\"M15 4.5 11 8.5 7 10 5.5 11.5 12.5 18.5 14 17 15.5 13 19.5 9\" /><path d=\"m9 15-4.5 4.5\" /><path d=\"m14.5 4 5.5 5.5\" />";
|
|
90
144
|
readonly bookmark: "<path d=\"M5 21V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16l-7-4z\" />";
|
|
91
145
|
readonly sparkle: "<path d=\"M12 3v6M12 15v6M3 12h6M15 12h6M5.6 5.6l4.2 4.2M14.2 14.2l4.2 4.2M5.6 18.4l4.2-4.2M14.2 9.8l4.2-4.2\" />";
|
|
92
146
|
readonly layers: "<path d=\"m12 3 9 5-9 5-9-5z\" /><path d=\"m3 13 9 5 9-5M3 18l9 5 9-5\" />";
|
|
@@ -245,10 +299,23 @@ interface DsConfig {
|
|
|
245
299
|
withDot?: boolean;
|
|
246
300
|
};
|
|
247
301
|
chart?: {
|
|
248
|
-
/** Default `dataTable` for all five charts. Default `'
|
|
302
|
+
/** Default `dataTable` for all five charts. Default `'none'`. It is an accessibility policy
|
|
249
303
|
* rather than a per-chart taste — whether the numbers behind a plot have a non-visual route is
|
|
250
|
-
* decided once for an app, not thirty times
|
|
304
|
+
* decided once for an app, not thirty times, so an app that wants the annex everywhere sets
|
|
305
|
+
* `'toggle'` here once rather than on every chart. Off by default: a chart usually sits in a
|
|
306
|
+
* page that already carries its numbers, and an unasked-for disclosure under every plot is
|
|
307
|
+
* chrome the page did not ask for. */
|
|
251
308
|
dataTable?: ChartDataTable;
|
|
309
|
+
/** Whether every chart draws its own bordered, padded box. Default `'auto'`, which draws it.
|
|
310
|
+
* Whether charts live inside cards is decided once for an app — a page that puts every chart
|
|
311
|
+
* in a card sets `'none'` here rather than reaching into five components' chrome from a
|
|
312
|
+
* global stylesheet. */
|
|
313
|
+
frame?: ChartFrame;
|
|
314
|
+
/** How long every chart's tooltip stays after the pointer leaves the mark, in milliseconds.
|
|
315
|
+
* Default 0. Raise it only where the panels carry something a reader has to reach — WCAG
|
|
316
|
+
* 1.4.13's hoverable clause — which is a property of what an app puts in its tooltips rather
|
|
317
|
+
* than of one plot. About 140 is enough to cross the gap at an ordinary pointer speed. */
|
|
318
|
+
tooltipLingerMs?: number;
|
|
252
319
|
/** Shown in place of the plot when a chart's data is empty. Default `'No data'`. */
|
|
253
320
|
emptyText?: string;
|
|
254
321
|
/** Shown in place of the plot when a chart has `error` set. Default
|
|
@@ -472,4 +539,4 @@ type DsTriggerDisplay = 'full' | 'count' | 'labels';
|
|
|
472
539
|
type DsControlWidth = 'fill' | 'content';
|
|
473
540
|
|
|
474
541
|
export { DS_CONFIG, ICONS, backdropDismiss, boundOr, devWarn, firstEnabledIndex, flattenDsOptions, inheritDsConfig, isDsOptionGroup, isTextClipped, isTextEntryTarget, lastEnabledIndex, nextEnabledIndex, optionalBound, provideDsConfig, resolveWithConfig };
|
|
475
|
-
export type { CardElevation, CardPadding, ChartDataTable, ChartValueFormat, DsConfig, DsControlWidth, DsOption, DsOptionGroup, DsOptionItem, DsSize, DsStatus, DsStatusKey, DsStatusRegistry, DsToastHorizontalPosition, DsToastPosition, DsToastVerticalPosition, DsTriggerDisplay, IconName };
|
|
542
|
+
export type { CardElevation, CardPadding, ChartAxis, ChartAxisMode, ChartDataTable, ChartFormatLocation, ChartFrame, ChartStackMode, ChartThreshold, ChartThresholdDash, ChartValueFormat, DsConfig, DsControlWidth, DsOption, DsOptionGroup, DsOptionItem, DsSize, DsStatus, DsStatusKey, DsStatusRegistry, DsToastHorizontalPosition, DsToastPosition, DsToastVerticalPosition, DsTriggerDisplay, IconName };
|
|
@@ -8,17 +8,19 @@ export { AvatarComponent, AvatarSize, AvatarStatus, AvatarTintOptions, avatarTin
|
|
|
8
8
|
export { AvatarGroupComponent } from '@ids-group-ltd/ids-design-system/components/avatar-group';
|
|
9
9
|
export { BadgeComponent } from '@ids-group-ltd/ids-design-system/components/badge';
|
|
10
10
|
export { BannerComponent, BannerVariant } from '@ids-group-ltd/ids-design-system/components/banner';
|
|
11
|
-
export {
|
|
11
|
+
export { BarComponent, BarSemantics, BarVariant } from '@ids-group-ltd/ids-design-system/components/bar';
|
|
12
|
+
export { BarChartComponent, BarChartRow, BarChartSegment } from '@ids-group-ltd/ids-design-system/components/bar-chart';
|
|
12
13
|
export { BottomSheetComponent } from '@ids-group-ltd/ids-design-system/components/bottom-sheet';
|
|
13
14
|
export { BreadcrumbItem, BreadcrumbsComponent, BreadcrumbsService } from '@ids-group-ltd/ids-design-system/components/breadcrumbs';
|
|
14
15
|
export { ButtonColor, ButtonComponent, ButtonType, ButtonVariant } from '@ids-group-ltd/ids-design-system/components/button';
|
|
15
16
|
export { ButtonGroupComponent } from '@ids-group-ltd/ids-design-system/components/button-group';
|
|
16
17
|
export { CardComponent, CardElevation, CardPadding } from '@ids-group-ltd/ids-design-system/components/card';
|
|
18
|
+
export { CHART_SCALES, ChartComponent, ChartPlot, ChartScales } from '@ids-group-ltd/ids-design-system/components/chart';
|
|
17
19
|
export { ChartLegendItem } from '@ids-group-ltd/ids-design-system/components/chart-legend';
|
|
18
20
|
export { ChartItemTooltipTrigger, ChartTooltipContext, ChartTooltipEntry, ChartTooltipOrigin, ChartTooltipTrigger } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
|
|
19
21
|
export { CheckboxComponent } from '@ids-group-ltd/ids-design-system/components/checkbox';
|
|
20
22
|
export { ColorPickerComponent } from '@ids-group-ltd/ids-design-system/components/color-picker';
|
|
21
|
-
export { ColumnChartComponent, ColumnChartPoint } from '@ids-group-ltd/ids-design-system/components/column-chart';
|
|
23
|
+
export { ColumnChartComponent, ColumnChartPoint, ColumnChartSeries } from '@ids-group-ltd/ids-design-system/components/column-chart';
|
|
22
24
|
export { DatePickerComponent, DatePickerMode, DatePickerPreset, DatePickerValue, DateValue, RangeValue } from '@ids-group-ltd/ids-design-system/components/date-picker';
|
|
23
25
|
export { DescriptionItemComponent, DescriptionListComponent, DescriptionListOrientation } from '@ids-group-ltd/ids-design-system/components/description-list';
|
|
24
26
|
export { DividerComponent, DividerSpacing, DividerVariant } from '@ids-group-ltd/ids-design-system/components/divider';
|
|
@@ -28,11 +30,11 @@ export { DropzoneComponent, DropzoneFile, DropzoneFileState } from '@ids-group-l
|
|
|
28
30
|
export { EmptyStateComponent, EmptyStateVariant } from '@ids-group-ltd/ids-design-system/components/empty-state';
|
|
29
31
|
export { DS_FIELD_GROUP, DsFieldGroupContext, FieldGroupComponent } from '@ids-group-ltd/ids-design-system/components/field-group';
|
|
30
32
|
export { FilterBarComponent, FilterItemDirective } from '@ids-group-ltd/ids-design-system/components/filter-bar';
|
|
31
|
-
export { FunnelChartComponent, FunnelChartShape, FunnelChartStage } from '@ids-group-ltd/ids-design-system/components/funnel-chart';
|
|
33
|
+
export { FunnelChartComponent, FunnelChartDrop, FunnelChartShape, FunnelChartStage } from '@ids-group-ltd/ids-design-system/components/funnel-chart';
|
|
32
34
|
export { IconButtonComponent, IconButtonType, IconButtonVariant } from '@ids-group-ltd/ids-design-system/components/icon-button';
|
|
33
35
|
export { InputComponent, InputType } from '@ids-group-ltd/ids-design-system/components/input';
|
|
34
36
|
export { ContainerComponent, ContainerSize, InlineComponent, LayoutAlign, LayoutGap, LayoutJustify, StackComponent } from '@ids-group-ltd/ids-design-system/components/layout';
|
|
35
|
-
export { LineChartAxisMode, LineChartComponent, LineChartGaps, LineChartPoint, LineChartSeries } from '@ids-group-ltd/ids-design-system/components/line-chart';
|
|
37
|
+
export { LineChartAnnotation, LineChartAxisMode, LineChartComponent, LineChartGaps, LineChartPoint, LineChartSeries } from '@ids-group-ltd/ids-design-system/components/line-chart';
|
|
36
38
|
export { ListComponent, ListItemComponent } from '@ids-group-ltd/ids-design-system/components/list';
|
|
37
39
|
export { LoadingOverlayComponent } from '@ids-group-ltd/ids-design-system/components/loading-overlay';
|
|
38
40
|
export { MenuComponent, MenuDividerComponent, MenuItemComponent } from '@ids-group-ltd/ids-design-system/components/menu';
|
|
@@ -45,7 +47,6 @@ export { PageHeaderComponent } from '@ids-group-ltd/ids-design-system/components
|
|
|
45
47
|
export { PaginationComponent } from '@ids-group-ltd/ids-design-system/components/pagination';
|
|
46
48
|
export { DsPasswordRule, DsPasswordRuleState, PasswordRulesComponent, passwordRulesMet } from '@ids-group-ltd/ids-design-system/components/password-rules';
|
|
47
49
|
export { PopoverAlign, PopoverComponent, PopoverPlacement } from '@ids-group-ltd/ids-design-system/components/popover';
|
|
48
|
-
export { ProgressComponent, ProgressVariant } from '@ids-group-ltd/ids-design-system/components/progress';
|
|
49
50
|
export { RADIO_GROUP, RadioComponent, RadioGroupChild, RadioGroupComponent, RadioGroupContract } from '@ids-group-ltd/ids-design-system/components/radio-group';
|
|
50
51
|
export { ReserveMessagesDirective } from '@ids-group-ltd/ids-design-system/components/reserve-messages';
|
|
51
52
|
export { SearchComponent } from '@ids-group-ltd/ids-design-system/components/search';
|
|
@@ -76,7 +77,7 @@ export { TooltipDirective, TooltipPanelComponent, TooltipPlacement } from '@ids-
|
|
|
76
77
|
export { TopBarComponent } from '@ids-group-ltd/ids-design-system/components/topbar';
|
|
77
78
|
export { TreeComponent, TreeNode } from '@ids-group-ltd/ids-design-system/components/tree';
|
|
78
79
|
export { W3wComponent } from '@ids-group-ltd/ids-design-system/components/w3w';
|
|
79
|
-
export { ChartDataTable, ChartValueFormat, DS_CONFIG, DsConfig, DsControlWidth, DsOption, DsOptionGroup, DsOptionItem, DsSize, DsStatus, DsStatusKey, DsStatusRegistry, DsTriggerDisplay, ICONS, IconName, flattenDsOptions, inheritDsConfig, isDsOptionGroup, isTextClipped, provideDsConfig } from '@ids-group-ltd/ids-design-system/core';
|
|
80
|
+
export { ChartAxis, ChartAxisMode, ChartDataTable, ChartFormatLocation, ChartFrame, ChartStackMode, ChartThreshold, ChartThresholdDash, ChartValueFormat, DS_CONFIG, DsConfig, DsControlWidth, DsOption, DsOptionGroup, DsOptionItem, DsSize, DsStatus, DsStatusKey, DsStatusRegistry, DsTriggerDisplay, ICONS, IconName, flattenDsOptions, inheritDsConfig, isDsOptionGroup, isTextClipped, provideDsConfig } from '@ids-group-ltd/ids-design-system/core';
|
|
80
81
|
export { DS_ICON_REGISTRY, DsIconRegistry, IconComponent, provideDsIcons } from '@ids-group-ltd/ids-design-system/icons';
|
|
81
82
|
export { BodyScrollLockService, DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';
|
|
82
83
|
export { DsThemeOptions, provideDsTheme } from '@ids-group-ltd/ids-design-system/theme';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<!-- GENERATED by tools/split-agent-catalogue.mjs from components.md. Do not edit. -->
|
|
2
|
-
# `<ds-progress>` — `ProgressComponent`
|
|
3
|
-
|
|
4
|
-
Group: Display & feedback
|
|
5
|
-
|
|
6
|
-
Linear progress bar (no circular variant).
|
|
7
|
-
Inputs: `value: number = 0` (0–100, clamped), `variant: 'default' | 'success' | 'warn' | 'error' | 'indeterminate' = 'default'`
|