@ids-group-ltd/ids-design-system 0.14.3 → 0.14.4

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 (66) hide show
  1. package/CHANGELOG.md +119 -0
  2. package/components.md +11 -11
  3. package/docs/agent/charts/column-series-component.md +1 -1
  4. package/docs/agent/charts/ds-bar-chart.md +1 -1
  5. package/docs/agent/charts/ds-chart.md +1 -1
  6. package/docs/agent/charts/ds-column-chart.md +1 -1
  7. package/docs/agent/charts/ds-funnel-chart.md +1 -1
  8. package/docs/agent/charts/ds-heatmap-chart.md +1 -1
  9. package/docs/agent/charts/ds-line-chart.md +1 -1
  10. package/docs/agent/charts/ds-pie-chart.md +1 -1
  11. package/docs/agent/charts/ds-scatter-chart.md +1 -1
  12. package/docs/agent/charts/ds-waterfall-chart.md +1 -1
  13. package/docs/agent/charts/line-series-component.md +1 -1
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +10 -11
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +69 -11
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +27 -26
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +10 -11
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +10 -11
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +9 -6
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +15 -13
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +10 -11
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +48 -16
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs +147 -0
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs.map +1 -0
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +6 -3
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +11 -3
  43. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  44. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  45. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -0
  46. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  47. package/migrations/0.14.4.json +231 -0
  48. package/package.json +9 -1
  49. package/schematics/check-overrides/surface.json +14 -1
  50. package/styles/_chart-frame.scss +4 -6
  51. package/styles/_toast-overlay.scss +9 -0
  52. package/styles/_tokens.scss +6 -0
  53. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +9 -9
  54. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +5 -1
  55. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +15 -8
  56. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +8 -9
  57. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +9 -9
  58. package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +7 -3
  59. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +11 -11
  60. package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +9 -9
  61. package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +9 -3
  62. package/types/ids-group-ltd-ids-design-system-components-sparkline.d.ts +54 -0
  63. package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +4 -1
  64. package/types/ids-group-ltd-ids-design-system-components.d.ts +11 -2
  65. package/types/ids-group-ltd-ids-design-system-core.d.ts +6 -4
  66. package/types/ids-group-ltd-ids-design-system.d.ts +1 -0
@@ -0,0 +1,147 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, booleanAttribute, inject, LOCALE_ID, viewChild, computed, signal, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import { ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
4
+
5
+ /** Positions in percent of the box, x across the readings and y down from the top of the scale.
6
+ * A flat series on the `'data'` scale draws through the middle. A `null` breaks the line. */
7
+ function sparklineGeometry(data, scale) {
8
+ const finite = data.filter((value) => value !== null && Number.isFinite(value));
9
+ if (finite.length === 0) {
10
+ return { path: '', points: [] };
11
+ }
12
+ const floor = scale === 'zero' ? Math.min(0, ...finite) : Math.min(...finite);
13
+ const ceiling = scale === 'zero' ? Math.max(0, ...finite) : Math.max(...finite);
14
+ const span = ceiling - floor;
15
+ const lastIndex = data.length - 1;
16
+ const points = [];
17
+ let path = '';
18
+ let penDown = false;
19
+ data.forEach((value, index) => {
20
+ if (value === null || !Number.isFinite(value)) {
21
+ penDown = false;
22
+ return;
23
+ }
24
+ const x = lastIndex === 0 ? 50 : (index / lastIndex) * 100;
25
+ const y = span === 0 ? 50 : ((ceiling - value) / span) * 100;
26
+ points.push({ index, x, y });
27
+ path += `${penDown ? 'L' : 'M'}${x} ${y}`;
28
+ penDown = true;
29
+ });
30
+ return { path, points };
31
+ }
32
+
33
+ /** A word-sized trend line: no axes, gridlines, legend or frame, a dot on the last reading, and a
34
+ * tooltip naming the reading under the pointer. Sized by `--ds-sparkline-width` and
35
+ * `--ds-sparkline-height`. */
36
+ class SparklineComponent {
37
+ /** One reading per step, oldest first. `null` breaks the line. */
38
+ data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
39
+ /** What each reading is, for the tooltip. Left out, the tooltip prints the value alone. */
40
+ categories = input([], ...(ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []));
41
+ /** Accessible name, and the series name in the tooltip. Left out, the sparkline is decorative
42
+ * and hidden from assistive technology: it is then taken to sit beside a value that says it. */
43
+ label = input(null, ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
44
+ scale = input('data', ...(ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []));
45
+ /** Shows the reading under the pointer, and under the keyboard where `label` makes the
46
+ * sparkline focusable: focus opens the last reading, the arrow keys, Home and End move. */
47
+ tooltip = input(true, { ...(ngDevMode ? { debugName: "tooltip" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
48
+ /** Formats the value the tooltip prints. Unset, the locale's plain number format. */
49
+ valueFormat = input(null, ...(ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []));
50
+ locale = inject(LOCALE_ID);
51
+ canvas = viewChild.required('canvas');
52
+ focusable = computed(() => this.tooltip() && this.label() !== null, ...(ngDevMode ? [{ debugName: "focusable" }] : /* istanbul ignore next */ []));
53
+ geometry = computed(() => sparklineGeometry(this.data(), this.scale()), ...(ngDevMode ? [{ debugName: "geometry" }] : /* istanbul ignore next */ []));
54
+ activePoint = signal(null, ...(ngDevMode ? [{ debugName: "activePoint" }] : /* istanbul ignore next */ []));
55
+ shownPoint = computed(() => this.activePoint() ?? this.geometry().points.at(-1) ?? null, ...(ngDevMode ? [{ debugName: "shownPoint" }] : /* istanbul ignore next */ []));
56
+ tooltipOrigin = signal(null, ...(ngDevMode ? [{ debugName: "tooltipOrigin" }] : /* istanbul ignore next */ []));
57
+ tooltipContext = computed(() => {
58
+ const point = this.activePoint();
59
+ const value = point ? this.data()[point.index] : null;
60
+ if (!point || value == null || !this.tooltip()) {
61
+ return null;
62
+ }
63
+ const format = this.valueFormat() ??
64
+ ((reading) => reading.toLocaleString(this.locale));
65
+ return {
66
+ category: this.categories()[point.index] ?? '',
67
+ entries: [
68
+ {
69
+ label: this.label() ?? '',
70
+ value,
71
+ formatted: format(value),
72
+ color: 'var(--ds-sparkline-line-color, var(--ds-chart-series-1-color))',
73
+ },
74
+ ],
75
+ };
76
+ }, ...(ngDevMode ? [{ debugName: "tooltipContext" }] : /* istanbul ignore next */ []));
77
+ onPointerMove(event) {
78
+ const points = this.geometry().points;
79
+ if (!this.tooltip() || points.length === 0) {
80
+ return;
81
+ }
82
+ const box = this.canvas().nativeElement.getBoundingClientRect();
83
+ const across = ((event.clientX - box.left) / box.width) * 100;
84
+ this.activate(points.reduce((best, point) => Math.abs(point.x - across) < Math.abs(best.x - across) ? point : best));
85
+ }
86
+ onFocus() {
87
+ const last = this.geometry().points.at(-1);
88
+ if (this.focusable() && last) {
89
+ this.activate(last);
90
+ }
91
+ }
92
+ onKeydown(event) {
93
+ const points = this.geometry().points;
94
+ const current = this.activePoint();
95
+ if (!this.focusable() || !current) {
96
+ return;
97
+ }
98
+ const position = points.indexOf(current);
99
+ const target = {
100
+ ArrowLeft: position - 1,
101
+ ArrowRight: position + 1,
102
+ Home: 0,
103
+ End: points.length - 1,
104
+ }[event.key];
105
+ if (target === undefined) {
106
+ return;
107
+ }
108
+ event.preventDefault();
109
+ this.activate(points[Math.min(Math.max(target, 0), points.length - 1)]);
110
+ }
111
+ clearActive() {
112
+ this.activePoint.set(null);
113
+ this.tooltipOrigin.set(null);
114
+ }
115
+ activate(point) {
116
+ if (point === this.activePoint()) {
117
+ return;
118
+ }
119
+ const box = this.canvas().nativeElement.getBoundingClientRect();
120
+ this.activePoint.set(point);
121
+ this.tooltipOrigin.set({
122
+ x: box.left + (point.x / 100) * box.width,
123
+ y: box.top + (point.y / 100) * box.height,
124
+ });
125
+ }
126
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SparklineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
127
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SparklineComponent, isStandalone: true, selector: "ds-sparkline", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, scale: { classPropertyName: "scale", publicName: "scale", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "onFocus()", "blur": "clearActive()", "keydown": "onKeydown($event)" }, properties: { "attr.role": "label() ? 'img' : null", "attr.aria-label": "label()", "attr.aria-hidden": "label() ? null : 'true'", "attr.tabindex": "focusable() ? 0 : null" } }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: "<svg\n #canvas\n class=\"sparkline\"\n aria-hidden=\"true\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"clearActive()\">\n <svg\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n height=\"100%\"\n overflow=\"visible\">\n <path\n class=\"line\"\n [attr.d]=\"geometry().path\" />\n </svg>\n\n @if (shownPoint(); as point) {\n <circle\n class=\"dot\"\n [attr.cx]=\"point.x + '%'\"\n [attr.cy]=\"point.y + '%'\" />\n }\n</svg>\n", styles: [":where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_sparkline-width: var(--ds-sparkline-width, 80px);--_sparkline-height: var(--ds-sparkline-height, 24px);--_sparkline-line-color: var(--ds-sparkline-line-color, var(--ds-chart-series-1-color));--_sparkline-line-width: var(--ds-sparkline-line-width, 1.5px);--_sparkline-dot-radius: var(--ds-sparkline-dot-radius, 2.5px);display:inline-block;inline-size:var(--_sparkline-width);block-size:var(--_sparkline-height);vertical-align:middle}:host(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.sparkline{display:block;inline-size:100%;block-size:100%;overflow:visible}.line{fill:none;stroke:var(--_sparkline-line-color);stroke-width:var(--_sparkline-line-width);stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.dot{r:var(--_sparkline-dot-radius);fill:var(--_sparkline-line-color)}@media(forced-colors:active){.line{stroke:CanvasText}.dot{fill:CanvasText}}\n"], dependencies: [{ kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPinned", "dsChartTooltipSwatches"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
128
+ }
129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SparklineComponent, decorators: [{
130
+ type: Component,
131
+ args: [{ selector: 'ds-sparkline', standalone: true, imports: [ChartTooltipDirective], host: {
132
+ '[attr.role]': "label() ? 'img' : null",
133
+ '[attr.aria-label]': 'label()',
134
+ '[attr.aria-hidden]': "label() ? null : 'true'",
135
+ '[attr.tabindex]': 'focusable() ? 0 : null',
136
+ '(focus)': 'onFocus()',
137
+ '(blur)': 'clearActive()',
138
+ '(keydown)': 'onKeydown($event)',
139
+ }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg\n #canvas\n class=\"sparkline\"\n aria-hidden=\"true\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"clearActive()\">\n <svg\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n height=\"100%\"\n overflow=\"visible\">\n <path\n class=\"line\"\n [attr.d]=\"geometry().path\" />\n </svg>\n\n @if (shownPoint(); as point) {\n <circle\n class=\"dot\"\n [attr.cx]=\"point.x + '%'\"\n [attr.cy]=\"point.y + '%'\" />\n }\n</svg>\n", styles: [":where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_sparkline-width: var(--ds-sparkline-width, 80px);--_sparkline-height: var(--ds-sparkline-height, 24px);--_sparkline-line-color: var(--ds-sparkline-line-color, var(--ds-chart-series-1-color));--_sparkline-line-width: var(--ds-sparkline-line-width, 1.5px);--_sparkline-dot-radius: var(--ds-sparkline-dot-radius, 2.5px);display:inline-block;inline-size:var(--_sparkline-width);block-size:var(--_sparkline-height);vertical-align:middle}:host(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}.sparkline{display:block;inline-size:100%;block-size:100%;overflow:visible}.line{fill:none;stroke:var(--_sparkline-line-color);stroke-width:var(--_sparkline-line-width);stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.dot{r:var(--_sparkline-dot-radius);fill:var(--_sparkline-line-color)}@media(forced-colors:active){.line{stroke:CanvasText}.dot{fill:CanvasText}}\n"] }]
140
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], categories: [{ type: i0.Input, args: [{ isSignal: true, alias: "categories", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], scale: [{ type: i0.Input, args: [{ isSignal: true, alias: "scale", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], canvas: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }] } });
141
+
142
+ /**
143
+ * Generated bundle index. Do not edit.
144
+ */
145
+
146
+ export { SparklineComponent };
147
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-sparkline.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-sparkline.mjs","sources":["../../../src/lib/components/sparkline/sparkline.math.ts","../../../src/lib/components/sparkline/sparkline.component.ts","../../../src/lib/components/sparkline/sparkline.component.html","../../../src/lib/components/sparkline/ids-group-ltd-ids-design-system-components-sparkline.ts"],"sourcesContent":["import type { SparklineScale } from './sparkline.types';\n\nexport interface SparklinePoint {\n readonly index: number;\n readonly x: number;\n readonly y: number;\n}\n\nexport interface SparklineGeometry {\n readonly path: string;\n readonly points: readonly SparklinePoint[];\n}\n\n/** Positions in percent of the box, x across the readings and y down from the top of the scale.\n * A flat series on the `'data'` scale draws through the middle. A `null` breaks the line. */\nexport function sparklineGeometry(\n data: readonly (number | null)[],\n scale: SparklineScale,\n): SparklineGeometry {\n const finite = data.filter(\n (value): value is number => value !== null && Number.isFinite(value),\n );\n if (finite.length === 0) {\n return { path: '', points: [] };\n }\n const floor = scale === 'zero' ? Math.min(0, ...finite) : Math.min(...finite);\n const ceiling =\n scale === 'zero' ? Math.max(0, ...finite) : Math.max(...finite);\n const span = ceiling - floor;\n const lastIndex = data.length - 1;\n const points: SparklinePoint[] = [];\n let path = '';\n let penDown = false;\n data.forEach((value, index) => {\n if (value === null || !Number.isFinite(value)) {\n penDown = false;\n\n return;\n }\n const x = lastIndex === 0 ? 50 : (index / lastIndex) * 100;\n const y = span === 0 ? 50 : ((ceiling - value) / span) * 100;\n points.push({ index, x, y });\n path += `${penDown ? 'L' : 'M'}${x} ${y}`;\n penDown = true;\n });\n\n return { path, points };\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n LOCALE_ID,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartTooltipContext,\n ChartTooltipOrigin,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport { sparklineGeometry } from './sparkline.math';\nimport type { SparklinePoint } from './sparkline.math';\nimport type { SparklineScale } from './sparkline.types';\n\n/** A word-sized trend line: no axes, gridlines, legend or frame, a dot on the last reading, and a\n * tooltip naming the reading under the pointer. Sized by `--ds-sparkline-width` and\n * `--ds-sparkline-height`. */\n@Component({\n selector: 'ds-sparkline',\n standalone: true,\n imports: [ChartTooltipDirective],\n templateUrl: './sparkline.component.html',\n styleUrl: './sparkline.component.scss',\n host: {\n '[attr.role]': \"label() ? 'img' : null\",\n '[attr.aria-label]': 'label()',\n '[attr.aria-hidden]': \"label() ? null : 'true'\",\n '[attr.tabindex]': 'focusable() ? 0 : null',\n '(focus)': 'onFocus()',\n '(blur)': 'clearActive()',\n '(keydown)': 'onKeydown($event)',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SparklineComponent {\n /** One reading per step, oldest first. `null` breaks the line. */\n readonly data = input.required<readonly (number | null)[]>();\n\n /** What each reading is, for the tooltip. Left out, the tooltip prints the value alone. */\n readonly categories = input<readonly string[]>([]);\n\n /** Accessible name, and the series name in the tooltip. Left out, the sparkline is decorative\n * and hidden from assistive technology: it is then taken to sit beside a value that says it. */\n readonly label = input<string | null>(null);\n\n readonly scale = input<SparklineScale>('data');\n\n /** Shows the reading under the pointer, and under the keyboard where `label` makes the\n * sparkline focusable: focus opens the last reading, the arrow keys, Home and End move. */\n readonly tooltip = input(true, { transform: booleanAttribute });\n\n /** Formats the value the tooltip prints. Unset, the locale's plain number format. */\n readonly valueFormat = input<((value: number) => string) | null>(null);\n\n private readonly locale = inject(LOCALE_ID);\n\n private readonly canvas =\n viewChild.required<ElementRef<SVGSVGElement>>('canvas');\n\n protected readonly focusable = computed(\n () => this.tooltip() && this.label() !== null,\n );\n\n protected readonly geometry = computed(() =>\n sparklineGeometry(this.data(), this.scale()),\n );\n\n protected readonly activePoint = signal<SparklinePoint | null>(null);\n\n protected readonly shownPoint = computed(\n () => this.activePoint() ?? this.geometry().points.at(-1) ?? null,\n );\n\n protected readonly tooltipOrigin = signal<ChartTooltipOrigin | null>(null);\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const point = this.activePoint();\n const value = point ? this.data()[point.index] : null;\n if (!point || value == null || !this.tooltip()) {\n return null;\n }\n const format =\n this.valueFormat() ??\n ((reading: number) => reading.toLocaleString(this.locale));\n\n return {\n category: this.categories()[point.index] ?? '',\n entries: [\n {\n label: this.label() ?? '',\n value,\n formatted: format(value),\n color:\n 'var(--ds-sparkline-line-color, var(--ds-chart-series-1-color))',\n },\n ],\n };\n },\n );\n\n protected onPointerMove(event: PointerEvent): void {\n const points = this.geometry().points;\n if (!this.tooltip() || points.length === 0) {\n return;\n }\n const box = this.canvas().nativeElement.getBoundingClientRect();\n const across = ((event.clientX - box.left) / box.width) * 100;\n this.activate(\n points.reduce((best, point) =>\n Math.abs(point.x - across) < Math.abs(best.x - across) ? point : best,\n ),\n );\n }\n\n protected onFocus(): void {\n const last = this.geometry().points.at(-1);\n if (this.focusable() && last) {\n this.activate(last);\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const points = this.geometry().points;\n const current = this.activePoint();\n if (!this.focusable() || !current) {\n return;\n }\n const position = points.indexOf(current);\n const target = {\n ArrowLeft: position - 1,\n ArrowRight: position + 1,\n Home: 0,\n End: points.length - 1,\n }[event.key];\n if (target === undefined) {\n return;\n }\n event.preventDefault();\n this.activate(points[Math.min(Math.max(target, 0), points.length - 1)]);\n }\n\n protected clearActive(): void {\n this.activePoint.set(null);\n this.tooltipOrigin.set(null);\n }\n\n private activate(point: SparklinePoint): void {\n if (point === this.activePoint()) {\n return;\n }\n const box = this.canvas().nativeElement.getBoundingClientRect();\n this.activePoint.set(point);\n this.tooltipOrigin.set({\n x: box.left + (point.x / 100) * box.width,\n y: box.top + (point.y / 100) * box.height,\n });\n }\n}\n","<svg\n #canvas\n class=\"sparkline\"\n aria-hidden=\"true\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"tooltipOrigin()\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"clearActive()\">\n <svg\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"none\"\n width=\"100%\"\n height=\"100%\"\n overflow=\"visible\">\n <path\n class=\"line\"\n [attr.d]=\"geometry().path\" />\n </svg>\n\n @if (shownPoint(); as point) {\n <circle\n class=\"dot\"\n [attr.cx]=\"point.x + '%'\"\n [attr.cy]=\"point.y + '%'\" />\n }\n</svg>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAaA;AAC8F;AACxF,SAAU,iBAAiB,CAC/B,IAAgC,EAChC,KAAqB,EAAA;IAErB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CACxB,CAAC,KAAK,KAAsB,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CACrE;AACD,IAAA,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QACvB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IACjC;IACA,MAAM,KAAK,GAAG,KAAK,KAAK,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IAC7E,MAAM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AACvC,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,oBAAoB,EAAE,yBAAyB;AAC/C,wBAAA,iBAAiB,EAAE,wBAAwB;AAC3C,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,QAAQ,EAAE,eAAe;AACzB,wBAAA,WAAW,EAAE,mBAAmB;AACjC,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kmBAAA,EAAA,MAAA,EAAA,CAAA,w4DAAA,CAAA,EAAA;unBAyBC,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElE1D;;AAEG;;;;"}
@@ -140,6 +140,9 @@ class WaterfallChartComponent {
140
140
  /** `'auto'` draws the bordered, padded box; `'none'` leaves it bare for a chart inside a card
141
141
  * the page has already drawn. Unset falls back to `DS_CONFIG.chart.frame`. */
142
142
  frame = input(null, ...(ngDevMode ? [{ debugName: "frame" }] : /* istanbul ignore next */ []));
143
+ /** Whether the tooltip draws a colour dot beside each reading. Unset falls back to
144
+ * `DS_CONFIG.chart.tooltipSwatches`, then draws them for up to four readings. */
145
+ tooltipSwatches = input(null, { ...(ngDevMode ? { debugName: "tooltipSwatches" } : /* istanbul ignore next */ {}), transform: (value) => value == null ? null : booleanAttribute(value) });
143
146
  /** The annex table under the plot. Unset falls back to `DS_CONFIG.chart.dataTable`, then
144
147
  * `'none'`. It prints each step's direction, its own reading and the running total. */
145
148
  dataTable = input(null, ...(ngDevMode ? [{ debugName: "dataTable" }] : /* istanbul ignore next */ []));
@@ -244,7 +247,7 @@ class WaterfallChartComponent {
244
247
  }
245
248
  }
246
249
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: WaterfallChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
247
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: WaterfallChartComponent, isStandalone: true, selector: "ds-waterfall-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, showValues: { classPropertyName: "showValues", publicName: "showValues", isSignal: true, isRequired: false, transformFunction: null }, showConnectors: { classPropertyName: "showConnectors", publicName: "showConnectors", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, tickCount: { classPropertyName: "tickCount", publicName: "tickCount", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, frame: { classPropertyName: "frame", publicName: "frame", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null }, pinOnClick: { classPropertyName: "pinOnClick", publicName: "pinOnClick", isSignal: true, isRequired: false, transformFunction: null }, staggerMs: { classPropertyName: "staggerMs", publicName: "staggerMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { barClicked: "barClicked" }, host: { properties: { "class.framed": "frameResolved() === 'auto'" } }, viewQueries: [{ propertyName: "series", first: true, predicate: ColumnSeriesComponent, descendants: true, isSignal: true }], exportAs: ["dsWaterfallChart"], ngImport: i0, template: "<figure class=\"waterfall-chart\">\n @if (pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"series()?.activeMark?.release()\">\n {{ intl().chart.unpin }}\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading() || !renderReady()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonBars(); track $index) {\n <ds-skeleton\n height=\"var(--_waterfall-chart-skeleton-height)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"valueFormatResolved()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\">\n <svg:g\n dsWaterfallMarks\n [steps]=\"steps()\"\n [labelValues]=\"labelValues()\"\n [showValues]=\"showValues()\"\n [showConnectors]=\"showConnectors()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\" />\n\n <svg:g\n dsColumnSeries\n showValues=\"false\"\n [data]=\"points()\"\n [offsets]=\"offsets()\"\n [interactive]=\"interactive()\"\n [pinOnClick]=\"pinOnClick()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n </ds-chart>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"[\n intl().chart.stepColumn,\n intl().chart.directionColumn,\n intl().chart.valueColumn,\n intl().chart.runningTotalColumn,\n ]\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table{-webkit-user-select:text;user-select:text}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}.empty.is-error,.empty-text.is-error{color:var(--error)}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.waterfall-chart{--_waterfall-chart-connector-color: var(--ds-waterfall-chart-connector-color, var(--ds-chart-axis-line-color));--_waterfall-chart-skeleton-height: var(--ds-waterfall-chart-skeleton-height, 40px);margin:0}.empty{display:grid;place-items:center;min-block-size:240px;margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}:host{position:relative}:host(.framed){--_chart-pin-reset-inset: var(--ds-chart-frame-padding)}:host:has(.pin-reset) figure>figcaption{padding-inline-end:calc(5rem + var(--space-2))}:host:has(.pin-reset) figure:not(:has(>figcaption)){padding-block-start:calc(var(--space-6) + var(--space-2))}.pin-reset{position:absolute;inset-block-start:var(--_chart-pin-reset-inset, 0);inset-inline-end:var(--_chart-pin-reset-inset, 0);z-index:1;display:inline-flex;align-items:center;gap:var(--space-1);block-size:var(--space-6);padding:0 var(--space-2-5);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:before{position:absolute;inset:50% auto auto 50%;inline-size:max(100%,var(--hit-comfy));block-size:var(--hit-comfy);transform:translate(-50%,-50%);content:\"\"}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}.skeleton{display:grid;gap:var(--space-2)}\n"], dependencies: [{ kind: "component", type: ChartComponent, selector: "ds-chart", inputs: ["categories", "tickCount", "min", "max", "cursor", "cursorPin", "tooltipLingerMs", "maxSecondary", "plotHeight", "axisGutter", "valueSpace", "caption", "interactive", "summary", "frame", "loading", "emptyText", "error", "errorText", "valueFormat", "secondaryAxisMode", "axisColor", "secondaryAxisColor", "axisLabel", "secondaryAxisLabel", "tooltipTemplate", "tooltipExtraGap"], exportAs: ["dsChart"] }, { kind: "component", type: ColumnSeriesComponent, selector: "g[dsColumnSeries]", inputs: ["data", "showValues", "interactive", "pinOnClick", "dimOthers", "staggerMs", "partOfWhole", "tooltip", "tooltipAnchor", "tooltipLingerMs", "valueFormat", "columnWidthRatio", "slot", "slotCount", "offsets", "axis", "seriesColor", "seriesFill", "seriesLabel", "seriesKey", "highlighted"], outputs: ["pointClicked"], exportAs: ["dsColumnSeries"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline", "shimmer"] }, { kind: "component", type: WaterfallMarksComponent, selector: "g[dsWaterfallMarks]", inputs: ["steps", "labelValues", "showValues", "showConnectors", "valueFormat", "columnWidthRatio", "staggerMs"] }, { kind: "component", type: ChartDataTableComponent, selector: "ds-chart-data-table", inputs: ["columns", "rows", "caption", "open", "rowHeader"], outputs: ["toggled"] }], viewProviders: [{ provide: CHART_RENDER_GATE_PASSED, useValue: true }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
250
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: WaterfallChartComponent, isStandalone: true, selector: "ds-waterfall-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, showValues: { classPropertyName: "showValues", publicName: "showValues", isSignal: true, isRequired: false, transformFunction: null }, showConnectors: { classPropertyName: "showConnectors", publicName: "showConnectors", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, tickCount: { classPropertyName: "tickCount", publicName: "tickCount", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, frame: { classPropertyName: "frame", publicName: "frame", isSignal: true, isRequired: false, transformFunction: null }, tooltipSwatches: { classPropertyName: "tooltipSwatches", publicName: "tooltipSwatches", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null }, pinOnClick: { classPropertyName: "pinOnClick", publicName: "pinOnClick", isSignal: true, isRequired: false, transformFunction: null }, staggerMs: { classPropertyName: "staggerMs", publicName: "staggerMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { barClicked: "barClicked" }, host: { properties: { "class.framed": "frameResolved() === 'auto'" } }, viewQueries: [{ propertyName: "series", first: true, predicate: ColumnSeriesComponent, descendants: true, isSignal: true }], exportAs: ["dsWaterfallChart"], ngImport: i0, template: "<figure class=\"waterfall-chart\">\n @if (pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"series()?.activeMark?.release()\">\n {{ intl().chart.unpin }}\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading() || !renderReady()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonBars(); track $index) {\n <ds-skeleton\n height=\"var(--_waterfall-chart-skeleton-height)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [tooltipSwatches]=\"tooltipSwatches()\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"valueFormatResolved()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\">\n <svg:g\n dsWaterfallMarks\n [steps]=\"steps()\"\n [labelValues]=\"labelValues()\"\n [showValues]=\"showValues()\"\n [showConnectors]=\"showConnectors()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\" />\n\n <svg:g\n dsColumnSeries\n showValues=\"false\"\n soleSeries\n [data]=\"points()\"\n [offsets]=\"offsets()\"\n [interactive]=\"interactive()\"\n [pinOnClick]=\"pinOnClick()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n </ds-chart>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"[\n intl().chart.stepColumn,\n intl().chart.directionColumn,\n intl().chart.valueColumn,\n intl().chart.runningTotalColumn,\n ]\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table{-webkit-user-select:text;user-select:text}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}.empty.is-error,.empty-text.is-error{color:var(--error)}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.waterfall-chart{--_waterfall-chart-connector-color: var(--ds-waterfall-chart-connector-color, var(--ds-chart-axis-line-color));--_waterfall-chart-skeleton-height: var(--ds-waterfall-chart-skeleton-height, 40px);margin:0}.empty{display:grid;place-items:center;min-block-size:240px;margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}:host{position:relative}:host(.framed){--_chart-pin-reset-inset: var(--ds-chart-frame-padding)}:host:has(.pin-reset) figure>figcaption{padding-inline-end:calc(5rem + var(--space-2))}.pin-reset{position:absolute;inset-block-start:var(--_chart-pin-reset-inset, 0);inset-inline-end:var(--_chart-pin-reset-inset, 0);z-index:1;display:inline-flex;align-items:center;gap:var(--space-1);block-size:var(--space-6);padding:0 var(--space-2-5);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:before{position:absolute;inset:50% auto auto 50%;inline-size:max(100%,var(--hit-comfy));block-size:var(--hit-comfy);transform:translate(-50%,-50%);content:\"\"}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}.skeleton{display:grid;gap:var(--space-2)}\n"], dependencies: [{ kind: "component", type: ChartComponent, selector: "ds-chart", inputs: ["categories", "tickCount", "min", "max", "cursor", "cursorPin", "tooltipLingerMs", "maxSecondary", "plotHeight", "axisGutter", "valueSpace", "caption", "interactive", "summary", "frame", "tooltipSwatches", "loading", "emptyText", "error", "errorText", "valueFormat", "secondaryAxisMode", "axisColor", "secondaryAxisColor", "axisLabel", "secondaryAxisLabel", "tooltipTemplate", "tooltipExtraGap"], exportAs: ["dsChart"] }, { kind: "component", type: ColumnSeriesComponent, selector: "g[dsColumnSeries]", inputs: ["data", "showValues", "interactive", "pinOnClick", "dimOthers", "staggerMs", "partOfWhole", "tooltip", "tooltipAnchor", "tooltipLingerMs", "valueFormat", "columnWidthRatio", "slot", "slotCount", "offsets", "soleSeries", "axis", "seriesColor", "seriesFill", "seriesLabel", "seriesKey", "highlighted"], outputs: ["pointClicked"], exportAs: ["dsColumnSeries"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline", "shimmer"] }, { kind: "component", type: WaterfallMarksComponent, selector: "g[dsWaterfallMarks]", inputs: ["steps", "labelValues", "showValues", "showConnectors", "valueFormat", "columnWidthRatio", "staggerMs"] }, { kind: "component", type: ChartDataTableComponent, selector: "ds-chart-data-table", inputs: ["columns", "rows", "caption", "open", "rowHeader"], outputs: ["toggled"] }], viewProviders: [{ provide: CHART_RENDER_GATE_PASSED, useValue: true }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
248
251
  }
249
252
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: WaterfallChartComponent, decorators: [{
250
253
  type: Component,
@@ -256,8 +259,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
256
259
  ChartDataTableComponent,
257
260
  ], host: {
258
261
  '[class.framed]': "frameResolved() === 'auto'",
259
- }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: CHART_RENDER_GATE_PASSED, useValue: true }], template: "<figure class=\"waterfall-chart\">\n @if (pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"series()?.activeMark?.release()\">\n {{ intl().chart.unpin }}\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading() || !renderReady()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonBars(); track $index) {\n <ds-skeleton\n height=\"var(--_waterfall-chart-skeleton-height)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"valueFormatResolved()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\">\n <svg:g\n dsWaterfallMarks\n [steps]=\"steps()\"\n [labelValues]=\"labelValues()\"\n [showValues]=\"showValues()\"\n [showConnectors]=\"showConnectors()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\" />\n\n <svg:g\n dsColumnSeries\n showValues=\"false\"\n [data]=\"points()\"\n [offsets]=\"offsets()\"\n [interactive]=\"interactive()\"\n [pinOnClick]=\"pinOnClick()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n </ds-chart>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"[\n intl().chart.stepColumn,\n intl().chart.directionColumn,\n intl().chart.valueColumn,\n intl().chart.runningTotalColumn,\n ]\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table{-webkit-user-select:text;user-select:text}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}.empty.is-error,.empty-text.is-error{color:var(--error)}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.waterfall-chart{--_waterfall-chart-connector-color: var(--ds-waterfall-chart-connector-color, var(--ds-chart-axis-line-color));--_waterfall-chart-skeleton-height: var(--ds-waterfall-chart-skeleton-height, 40px);margin:0}.empty{display:grid;place-items:center;min-block-size:240px;margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}:host{position:relative}:host(.framed){--_chart-pin-reset-inset: var(--ds-chart-frame-padding)}:host:has(.pin-reset) figure>figcaption{padding-inline-end:calc(5rem + var(--space-2))}:host:has(.pin-reset) figure:not(:has(>figcaption)){padding-block-start:calc(var(--space-6) + var(--space-2))}.pin-reset{position:absolute;inset-block-start:var(--_chart-pin-reset-inset, 0);inset-inline-end:var(--_chart-pin-reset-inset, 0);z-index:1;display:inline-flex;align-items:center;gap:var(--space-1);block-size:var(--space-6);padding:0 var(--space-2-5);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:before{position:absolute;inset:50% auto auto 50%;inline-size:max(100%,var(--hit-comfy));block-size:var(--hit-comfy);transform:translate(-50%,-50%);content:\"\"}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}.skeleton{display:grid;gap:var(--space-2)}\n"] }]
260
- }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], showValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValues", required: false }] }], showConnectors: [{ type: i0.Input, args: [{ isSignal: true, alias: "showConnectors", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], tickCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickCount", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], frame: [{ type: i0.Input, args: [{ isSignal: true, alias: "frame", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], pinOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinOnClick", required: false }] }], staggerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerMs", required: false }] }], series: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ColumnSeriesComponent), { isSignal: true }] }], barClicked: [{ type: i0.Output, args: ["barClicked"] }] } });
262
+ }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: CHART_RENDER_GATE_PASSED, useValue: true }], template: "<figure class=\"waterfall-chart\">\n @if (pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"series()?.activeMark?.release()\">\n {{ intl().chart.unpin }}\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading() || !renderReady()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonBars(); track $index) {\n <ds-skeleton\n height=\"var(--_waterfall-chart-skeleton-height)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [tooltipSwatches]=\"tooltipSwatches()\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"valueFormatResolved()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\">\n <svg:g\n dsWaterfallMarks\n [steps]=\"steps()\"\n [labelValues]=\"labelValues()\"\n [showValues]=\"showValues()\"\n [showConnectors]=\"showConnectors()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\" />\n\n <svg:g\n dsColumnSeries\n showValues=\"false\"\n soleSeries\n [data]=\"points()\"\n [offsets]=\"offsets()\"\n [interactive]=\"interactive()\"\n [pinOnClick]=\"pinOnClick()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n </ds-chart>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"[\n intl().chart.stepColumn,\n intl().chart.directionColumn,\n intl().chart.valueColumn,\n intl().chart.runningTotalColumn,\n ]\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table{-webkit-user-select:text;user-select:text}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}.empty.is-error,.empty-text.is-error{color:var(--error)}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.waterfall-chart{--_waterfall-chart-connector-color: var(--ds-waterfall-chart-connector-color, var(--ds-chart-axis-line-color));--_waterfall-chart-skeleton-height: var(--ds-waterfall-chart-skeleton-height, 40px);margin:0}.empty{display:grid;place-items:center;min-block-size:240px;margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}:host{position:relative}:host(.framed){--_chart-pin-reset-inset: var(--ds-chart-frame-padding)}:host:has(.pin-reset) figure>figcaption{padding-inline-end:calc(5rem + var(--space-2))}.pin-reset{position:absolute;inset-block-start:var(--_chart-pin-reset-inset, 0);inset-inline-end:var(--_chart-pin-reset-inset, 0);z-index:1;display:inline-flex;align-items:center;gap:var(--space-1);block-size:var(--space-6);padding:0 var(--space-2-5);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-secondary);font-size:var(--font-size-xs);line-height:1;box-shadow:var(--shadow-1);cursor:pointer}.pin-reset:before{position:absolute;inset:50% auto auto 50%;inline-size:max(100%,var(--hit-comfy));block-size:var(--hit-comfy);transform:translate(-50%,-50%);content:\"\"}.pin-reset:hover{color:var(--text-primary);border-color:var(--border-strong)}.skeleton{display:grid;gap:var(--space-2)}\n"] }]
263
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], showValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValues", required: false }] }], showConnectors: [{ type: i0.Input, args: [{ isSignal: true, alias: "showConnectors", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], tickCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "tickCount", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], frame: [{ type: i0.Input, args: [{ isSignal: true, alias: "frame", required: false }] }], tooltipSwatches: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipSwatches", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], pinOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinOnClick", required: false }] }], staggerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerMs", required: false }] }], series: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ColumnSeriesComponent), { isSignal: true }] }], barClicked: [{ type: i0.Output, args: ["barClicked"] }] } });
261
264
 
262
265
  /**
263
266
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-waterfall-chart.mjs","sources":["../../../src/lib/components/waterfall-chart/waterfall-chart.math.ts","../../../src/lib/components/waterfall-chart/waterfall-marks.component.ts","../../../src/lib/components/waterfall-chart/waterfall-marks.component.html","../../../src/lib/components/waterfall-chart/waterfall-chart.component.ts","../../../src/lib/components/waterfall-chart/waterfall-chart.component.html","../../../src/lib/components/waterfall-chart/ids-group-ltd-ids-design-system-components-waterfall-chart.ts"],"sourcesContent":["import type {\n WaterfallChartBar,\n WaterfallChartStep,\n} from './waterfall-chart.types';\n\n/** Where each bar spans, walking the running sum from zero.\n *\n * Every row adds its own value to the sum, including a total - a closing total carries `0` and so\n * prints the sum reached. A delta then spans from the sum before it to the sum after; a total or a\n * subtotal stands on zero and reaches the sum, which is what makes it a figure rather than a\n * change. A non-finite reading adds nothing rather than poisoning every bar after it.\n *\n * @internal */\nexport function waterfallSteps(\n data: readonly WaterfallChartBar[],\n): readonly WaterfallChartStep[] {\n let running = 0;\n\n return data.map((datum) => {\n const from = running;\n const value = Number.isFinite(datum.value) ? datum.value : 0;\n running += value;\n const standsOnZero = datum.kind === 'total' || datum.kind === 'subtotal';\n\n return {\n label: datum.label,\n from: standsOnZero ? 0 : from,\n to: running,\n direction: standsOnZero ? 'total' : value < 0 ? 'decrease' : 'increase',\n };\n });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\nimport { staggerDelay } from '@ids-group-ltd/ids-design-system/components';\nimport { CHART_SCALES } from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ChartValueFormat } from '@ids-group-ltd/ids-design-system/core';\nimport type { WaterfallChartStep } from './waterfall-chart.types';\n\n/** Distance from a bar's own tip to its value label's baseline. */\nconst VALUE_LABEL_GAP = 8;\n\n/**\n * The two things a waterfall needs that a column series cannot carry: the dashed rule chaining one\n * bar to the next, and a value label that prints its own sign.\n *\n * The label lives here rather than on the column series because the sign is not a property of the\n * number - a delta of `130` reads `+130` and a total of `800` reads `800` - and a series-wide\n * formatter sees only the value, never which of the two it is holding.\n *\n * Hosted on a `<g>` rather than an element of its own: an element the SVG specification does not\n * know is not rendered, and neither are its descendants. Written as `<svg:g dsWaterfallMarks>`.\n *\n * @internal\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsWaterfallMarks]',\n standalone: true,\n templateUrl: './waterfall-marks.component.html',\n styleUrl: './waterfall-marks.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WaterfallMarksComponent {\n private readonly scales = inject(CHART_SCALES);\n\n readonly steps = input<readonly WaterfallChartStep[]>([]);\n\n /** The reading each label prints: a delta's own change, a total's running sum. */\n readonly labelValues = input<readonly number[]>([]);\n\n readonly showValues = input(true);\n\n readonly showConnectors = input(true);\n\n readonly valueFormat = input<ChartValueFormat>((value) => String(value));\n\n /** The share of a category's band the bars take, so the connector starts where the bar ends. */\n readonly columnWidthRatio = input(0.8, { transform: numberAttribute });\n\n /** The bars' own `staggerMs`, so each label and rule waits for the bar it belongs to. */\n readonly staggerMs = input(40, { transform: numberAttribute });\n\n protected readonly markWidth = computed(\n () => this.scales.bandWidth() * this.columnWidthRatio(),\n );\n\n /** One rule per gap between two bars, drawn at the level they share - the level the left bar\n * ended on. Without it the bars read as five separate columns instead of one chain. */\n protected readonly connectors = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const steps = this.steps();\n const half = this.markWidth() / 2;\n\n return steps.slice(0, -1).map((step, index) => ({\n key: `${index}-${step.label}`,\n x1: toX(index) + half,\n x2: toX(index + 1) - half,\n y: toY(step.to),\n stagger: this.barStagger(index + 1),\n }));\n });\n\n protected readonly labels = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const format = this.valueFormat();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => {\n const reading = values[index] ?? step.to - step.from;\n const tip = Math.min(toY(step.from), toY(step.to));\n const sign = step.direction === 'increase' && reading > 0 ? '+' : '';\n\n return {\n key: `${index}-${step.label}`,\n x: toX(index),\n y: tip - VALUE_LABEL_GAP,\n text: `${sign}${format(reading, 'tooltip')}`,\n stagger: this.barStagger(index),\n };\n });\n });\n\n private barStagger(index: number): string {\n return `${staggerDelay(index, this.steps().length, this.staggerMs())}ms`;\n }\n}\n","<svg:g\n class=\"waterfall-marks\"\n aria-hidden=\"true\">\n @if (showConnectors()) {\n @for (connector of connectors(); track connector.key) {\n <svg:line\n class=\"connector\"\n [attr.x1]=\"connector.x1\"\n [attr.x2]=\"connector.x2\"\n [attr.y1]=\"connector.y\"\n [attr.y2]=\"connector.y\"\n [style.--_chart-mark-stagger]=\"connector.stagger\" />\n }\n }\n\n @if (showValues()) {\n @for (label of labels(); track label.key) {\n <svg:text\n class=\"value\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"label.y\"\n [style.--_chart-mark-stagger]=\"label.stagger\">\n {{ label.text }}\n </svg:text>\n }\n }\n</svg:g>\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n numberAttribute,\n output,\n viewChild,\n} from '@angular/core';\nimport {\n ChartComponent,\n ColumnSeriesComponent,\n} from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ColumnSeriesPoint } from '@ids-group-ltd/ids-design-system/components/chart';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { waterfallSteps } from './waterfall-chart.math';\nimport { WaterfallMarksComponent } from './waterfall-marks.component';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport {\n resolveChartDefaults,\n chartRenderGate,\n CHART_RENDER_GATE_PASSED,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n WaterfallChartBar,\n WaterfallChartStep,\n} from './waterfall-chart.types';\n\n/** What each direction is painted with. A total is the neutral series colour because it is not a\n * change at all, and reading it as one is the mistake the three-colour scheme exists to prevent. */\nconst DIRECTION_COLORS: Record<WaterfallChartStep['direction'], string> = {\n increase: 'var(--ds-chart-positive-color)',\n decrease: 'var(--ds-chart-negative-color)',\n total: 'var(--ds-chart-series-default-color)',\n};\n\n/**\n * A running total, bar by bar: what a figure started at, what moved it, and what it ended at.\n *\n * The one chart in the family that cannot be a mode on another, because it needs three things at\n * once - an accumulating level, bars pinned to zero for the totals, and its own three-colour\n * semantic. Colour never carries that semantic alone: every bar's label prints its own sign and\n * every bar's accessible name says \"increase\" or \"decrease\" in words.\n */\n@Component({\n selector: 'ds-waterfall-chart',\n standalone: true,\n exportAs: 'dsWaterfallChart',\n imports: [\n ChartComponent,\n ColumnSeriesComponent,\n SkeletonComponent,\n WaterfallMarksComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './waterfall-chart.component.html',\n styleUrl: './waterfall-chart.component.scss',\n host: {\n '[class.framed]': \"frameResolved() === 'auto'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [{ provide: CHART_RENDER_GATE_PASSED, useValue: true }],\n})\nexport class WaterfallChartComponent {\n protected readonly renderReady = chartRenderGate();\n\n /** The bars in the order they are read, which is the order they happened in - a waterfall is\n * never sorted, because the sequence is the meaning. */\n readonly data = input<readonly WaterfallChartBar[]>([]);\n\n /** Prints each bar's own reading above it, with its sign. */\n readonly showValues = input(true, { transform: booleanAttribute });\n\n /** The dashed rule chaining one bar to the next at the level they share. Without it the bars\n * read as separate columns rather than as one running total. */\n readonly showConnectors = input(true, { transform: booleanAttribute });\n\n /** Printed above the plot as the visible title, and reused as the annex table's caption. */\n readonly caption = input<string | null>(null);\n\n /** The accessible name. Generated from the steps when omitted, naming each one's direction in\n * words and the figure the chain ends at. */\n readonly summary = input<string | null>(null);\n\n /** A hint, not a count. Ticks snap to a round step. */\n readonly tickCount = input(5, { transform: numberAttribute });\n\n /** Turns on the click affordance and the keyboard route. `barClicked` fires whether or not\n * this is set. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** `'auto'` draws the bordered, padded box; `'none'` leaves it bare for a chart inside a card\n * the page has already drawn. Unset falls back to `DS_CONFIG.chart.frame`. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** The annex table under the plot. Unset falls back to `DS_CONFIG.chart.dataTable`, then\n * `'none'`. It prints each step's direction, its own reading and the running total. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Skeleton bars at the real count, so the page does not resize when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n\n /** Separate from an empty `data`: \"the request failed\" and \"there is nothing to show\" read the\n * same and mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_INTL.chart.empty`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shown in place of the plot while `error` is set. Unset falls back to\n * `DS_INTL.chart.error`. */\n readonly errorText = input<string | null>(null);\n\n /** Formats every value the chart prints - the axis ticks, the bar labels and the annex table.\n * The sign a delta carries is added around it, so a formatter never has to know about one. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n /** Holds the clicked step and its tooltip in place, with a pin disc on it, until a second click,\n * Escape or a press outside releases it. Unset falls back to `DS_CONFIG.chart.pinOnClick`, then\n * `true`. `barClicked` fires either way - pinning is a state, not a handler. */\n readonly pinOnClick = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n /** Milliseconds between one step's entrance and the next; a long waterfall narrows the step to\n * arrive within 260ms. `0` is no stagger. */\n readonly staggerMs = input(40, { transform: numberAttribute });\n\n protected readonly series = viewChild(ColumnSeriesComponent);\n\n protected readonly pinned = computed(\n () => this.series()?.activeMark.pinned() ?? false,\n );\n\n /** The clicked datum, as it was given. Fires on click and on Enter or Space. */\n readonly barClicked = output<WaterfallChartBar>();\n\n private readonly defaults = resolveChartDefaults(this);\n protected readonly intl = inject(DS_INTL);\n readonly frameResolved = this.defaults.frame;\n readonly dataTableResolved = this.defaults.dataTable;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n protected readonly steps = computed(() => waterfallSteps(this.data()));\n\n protected readonly categories = computed(() =>\n this.steps().map((step) => step.label),\n );\n\n protected readonly offsets = computed(() =>\n this.steps().map((step) => ({ from: step.from, to: step.to })),\n );\n\n /** What each bar's label prints: a delta's own change, a total's running sum. The two are\n * different readings and only one of them takes a sign. */\n protected readonly labelValues = computed(() =>\n this.steps().map((step, index) =>\n step.direction === 'total' ? step.to : (this.data()[index]?.value ?? 0),\n ),\n );\n\n protected readonly points = computed<readonly ColumnSeriesPoint[]>(() => {\n const format = this.valueFormatResolved();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => {\n const datum = this.data()[index];\n const reading = values[index];\n const sign = step.direction === 'increase' && reading > 0 ? '+' : '';\n\n return {\n id: datum?.id ?? String(index),\n // The word is what carries the meaning where colour cannot - forced colours, a monochrome\n // print, a reader who cannot tell the two hues apart, and every screen reader.\n label: `${step.label}, ${this.intl().chart[step.direction]} ${sign}${format(reading, 'tooltip')}`,\n value: reading,\n color: DIRECTION_COLORS[step.direction],\n };\n });\n });\n\n protected readonly accessibleName = computed(() => {\n const given = this.summary();\n if (given) {\n return given;\n }\n const words = this.intl().chart;\n const steps = this.steps();\n if (steps.length === 0) {\n return this.caption() ?? words.waterfallTitle;\n }\n const format = this.valueFormatResolved();\n const last = steps[steps.length - 1];\n const spoken = steps\n .map(\n (step, index) =>\n `${step.label} ${words[step.direction]} ${format(this.labelValues()[index], 'tooltip')}`,\n )\n .join(', ');\n\n return `${this.caption() ?? words.waterfallCaption}: ${spoken}. ${words.endsAt(format(last.to, 'tooltip'))}`;\n });\n\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.tableRows().map((row) => ({\n key: row.key,\n cells: [\n row.label,\n row.direction,\n row.formattedValue,\n row.formattedRunningTotal,\n ],\n })),\n );\n\n protected readonly tableRows = computed(() => {\n const format = this.valueFormatResolved();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => ({\n key: `${index}-${step.label}`,\n label: step.label,\n direction: this.intl().chart[step.direction],\n formattedValue: format(values[index], 'tooltip'),\n formattedRunningTotal: format(step.to, 'tooltip'),\n }));\n });\n\n protected readonly skeletonBars = computed(() =>\n Array.from({ length: Math.max(this.data().length, 5) }),\n );\n\n protected onPointClicked(point: ColumnSeriesPoint): void {\n const datum = this.data().find(\n (entry, index) => (entry.id ?? String(index)) === point.id,\n );\n if (datum) {\n this.barClicked.emit(datum);\n }\n }\n}\n","<figure class=\"waterfall-chart\">\n @if (pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"series()?.activeMark?.release()\">\n {{ intl().chart.unpin }}\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading() || !renderReady()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonBars(); track $index) {\n <ds-skeleton\n height=\"var(--_waterfall-chart-skeleton-height)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"valueFormatResolved()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\">\n <svg:g\n dsWaterfallMarks\n [steps]=\"steps()\"\n [labelValues]=\"labelValues()\"\n [showValues]=\"showValues()\"\n [showConnectors]=\"showConnectors()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\" />\n\n <svg:g\n dsColumnSeries\n showValues=\"false\"\n [data]=\"points()\"\n [offsets]=\"offsets()\"\n [interactive]=\"interactive()\"\n [pinOnClick]=\"pinOnClick()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n </ds-chart>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"[\n intl().chart.stepColumn,\n intl().chart.directionColumn,\n intl().chart.valueColumn,\n intl().chart.runningTotalColumn,\n ]\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKA;;;;;;;AAOgB;AACV,SAAU,cAAc,CAC5B,IAAkC,EAAA;IAElC,IAAI,OAAO,GAAG,CAAC;AAEf,IAAA,OAAO,IAA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AAwB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAE3D,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBApBnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAAA,UAAA,EAClB,IAAI,EAAA,QAAA,EACN,kBAAkB,EAAA,OAAA,EACnB;wBACP,cAAc;wBACd,qBAAqB;wBACrB,iBAAiB;wBACjB,uBAAuB;wBACvB,uBAAuB;qBACxB,EAAA,IAAA,EAGK;AACJ,wBAAA,gBAAgB,EAAE,4BAA4B;AAC/C,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,QAAQ,mBACxB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAA,QAAA,EAAA,ynEAAA,EAAA,MAAA,EAAA,CAAA,0/IAAA,CAAA,EAAA;wmDAoEhC,qBAAqB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE5I7D;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-waterfall-chart.mjs","sources":["../../../src/lib/components/waterfall-chart/waterfall-chart.math.ts","../../../src/lib/components/waterfall-chart/waterfall-marks.component.ts","../../../src/lib/components/waterfall-chart/waterfall-marks.component.html","../../../src/lib/components/waterfall-chart/waterfall-chart.component.ts","../../../src/lib/components/waterfall-chart/waterfall-chart.component.html","../../../src/lib/components/waterfall-chart/ids-group-ltd-ids-design-system-components-waterfall-chart.ts"],"sourcesContent":["import type {\n WaterfallChartBar,\n WaterfallChartStep,\n} from './waterfall-chart.types';\n\n/** Where each bar spans, walking the running sum from zero.\n *\n * Every row adds its own value to the sum, including a total - a closing total carries `0` and so\n * prints the sum reached. A delta then spans from the sum before it to the sum after; a total or a\n * subtotal stands on zero and reaches the sum, which is what makes it a figure rather than a\n * change. A non-finite reading adds nothing rather than poisoning every bar after it.\n *\n * @internal */\nexport function waterfallSteps(\n data: readonly WaterfallChartBar[],\n): readonly WaterfallChartStep[] {\n let running = 0;\n\n return data.map((datum) => {\n const from = running;\n const value = Number.isFinite(datum.value) ? datum.value : 0;\n running += value;\n const standsOnZero = datum.kind === 'total' || datum.kind === 'subtotal';\n\n return {\n label: datum.label,\n from: standsOnZero ? 0 : from,\n to: running,\n direction: standsOnZero ? 'total' : value < 0 ? 'decrease' : 'increase',\n };\n });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\nimport { staggerDelay } from '@ids-group-ltd/ids-design-system/components';\nimport { CHART_SCALES } from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ChartValueFormat } from '@ids-group-ltd/ids-design-system/core';\nimport type { WaterfallChartStep } from './waterfall-chart.types';\n\n/** Distance from a bar's own tip to its value label's baseline. */\nconst VALUE_LABEL_GAP = 8;\n\n/**\n * The two things a waterfall needs that a column series cannot carry: the dashed rule chaining one\n * bar to the next, and a value label that prints its own sign.\n *\n * The label lives here rather than on the column series because the sign is not a property of the\n * number - a delta of `130` reads `+130` and a total of `800` reads `800` - and a series-wide\n * formatter sees only the value, never which of the two it is holding.\n *\n * Hosted on a `<g>` rather than an element of its own: an element the SVG specification does not\n * know is not rendered, and neither are its descendants. Written as `<svg:g dsWaterfallMarks>`.\n *\n * @internal\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsWaterfallMarks]',\n standalone: true,\n templateUrl: './waterfall-marks.component.html',\n styleUrl: './waterfall-marks.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WaterfallMarksComponent {\n private readonly scales = inject(CHART_SCALES);\n\n readonly steps = input<readonly WaterfallChartStep[]>([]);\n\n /** The reading each label prints: a delta's own change, a total's running sum. */\n readonly labelValues = input<readonly number[]>([]);\n\n readonly showValues = input(true);\n\n readonly showConnectors = input(true);\n\n readonly valueFormat = input<ChartValueFormat>((value) => String(value));\n\n /** The share of a category's band the bars take, so the connector starts where the bar ends. */\n readonly columnWidthRatio = input(0.8, { transform: numberAttribute });\n\n /** The bars' own `staggerMs`, so each label and rule waits for the bar it belongs to. */\n readonly staggerMs = input(40, { transform: numberAttribute });\n\n protected readonly markWidth = computed(\n () => this.scales.bandWidth() * this.columnWidthRatio(),\n );\n\n /** One rule per gap between two bars, drawn at the level they share - the level the left bar\n * ended on. Without it the bars read as five separate columns instead of one chain. */\n protected readonly connectors = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const steps = this.steps();\n const half = this.markWidth() / 2;\n\n return steps.slice(0, -1).map((step, index) => ({\n key: `${index}-${step.label}`,\n x1: toX(index) + half,\n x2: toX(index + 1) - half,\n y: toY(step.to),\n stagger: this.barStagger(index + 1),\n }));\n });\n\n protected readonly labels = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const format = this.valueFormat();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => {\n const reading = values[index] ?? step.to - step.from;\n const tip = Math.min(toY(step.from), toY(step.to));\n const sign = step.direction === 'increase' && reading > 0 ? '+' : '';\n\n return {\n key: `${index}-${step.label}`,\n x: toX(index),\n y: tip - VALUE_LABEL_GAP,\n text: `${sign}${format(reading, 'tooltip')}`,\n stagger: this.barStagger(index),\n };\n });\n });\n\n private barStagger(index: number): string {\n return `${staggerDelay(index, this.steps().length, this.staggerMs())}ms`;\n }\n}\n","<svg:g\n class=\"waterfall-marks\"\n aria-hidden=\"true\">\n @if (showConnectors()) {\n @for (connector of connectors(); track connector.key) {\n <svg:line\n class=\"connector\"\n [attr.x1]=\"connector.x1\"\n [attr.x2]=\"connector.x2\"\n [attr.y1]=\"connector.y\"\n [attr.y2]=\"connector.y\"\n [style.--_chart-mark-stagger]=\"connector.stagger\" />\n }\n }\n\n @if (showValues()) {\n @for (label of labels(); track label.key) {\n <svg:text\n class=\"value\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"label.y\"\n [style.--_chart-mark-stagger]=\"label.stagger\">\n {{ label.text }}\n </svg:text>\n }\n }\n</svg:g>\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n numberAttribute,\n output,\n viewChild,\n} from '@angular/core';\nimport {\n ChartComponent,\n ColumnSeriesComponent,\n} from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ColumnSeriesPoint } from '@ids-group-ltd/ids-design-system/components/chart';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { waterfallSteps } from './waterfall-chart.math';\nimport { WaterfallMarksComponent } from './waterfall-marks.component';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport {\n resolveChartDefaults,\n chartRenderGate,\n CHART_RENDER_GATE_PASSED,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n WaterfallChartBar,\n WaterfallChartStep,\n} from './waterfall-chart.types';\n\n/** What each direction is painted with. A total is the neutral series colour because it is not a\n * change at all, and reading it as one is the mistake the three-colour scheme exists to prevent. */\nconst DIRECTION_COLORS: Record<WaterfallChartStep['direction'], string> = {\n increase: 'var(--ds-chart-positive-color)',\n decrease: 'var(--ds-chart-negative-color)',\n total: 'var(--ds-chart-series-default-color)',\n};\n\n/**\n * A running total, bar by bar: what a figure started at, what moved it, and what it ended at.\n *\n * The one chart in the family that cannot be a mode on another, because it needs three things at\n * once - an accumulating level, bars pinned to zero for the totals, and its own three-colour\n * semantic. Colour never carries that semantic alone: every bar's label prints its own sign and\n * every bar's accessible name says \"increase\" or \"decrease\" in words.\n */\n@Component({\n selector: 'ds-waterfall-chart',\n standalone: true,\n exportAs: 'dsWaterfallChart',\n imports: [\n ChartComponent,\n ColumnSeriesComponent,\n SkeletonComponent,\n WaterfallMarksComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './waterfall-chart.component.html',\n styleUrl: './waterfall-chart.component.scss',\n host: {\n '[class.framed]': \"frameResolved() === 'auto'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [{ provide: CHART_RENDER_GATE_PASSED, useValue: true }],\n})\nexport class WaterfallChartComponent {\n protected readonly renderReady = chartRenderGate();\n\n /** The bars in the order they are read, which is the order they happened in - a waterfall is\n * never sorted, because the sequence is the meaning. */\n readonly data = input<readonly WaterfallChartBar[]>([]);\n\n /** Prints each bar's own reading above it, with its sign. */\n readonly showValues = input(true, { transform: booleanAttribute });\n\n /** The dashed rule chaining one bar to the next at the level they share. Without it the bars\n * read as separate columns rather than as one running total. */\n readonly showConnectors = input(true, { transform: booleanAttribute });\n\n /** Printed above the plot as the visible title, and reused as the annex table's caption. */\n readonly caption = input<string | null>(null);\n\n /** The accessible name. Generated from the steps when omitted, naming each one's direction in\n * words and the figure the chain ends at. */\n readonly summary = input<string | null>(null);\n\n /** A hint, not a count. Ticks snap to a round step. */\n readonly tickCount = input(5, { transform: numberAttribute });\n\n /** Turns on the click affordance and the keyboard route. `barClicked` fires whether or not\n * this is set. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** `'auto'` draws the bordered, padded box; `'none'` leaves it bare for a chart inside a card\n * the page has already drawn. Unset falls back to `DS_CONFIG.chart.frame`. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** Whether the tooltip draws a colour dot beside each reading. Unset falls back to\n * `DS_CONFIG.chart.tooltipSwatches`, then draws them for up to four readings. */\n readonly tooltipSwatches = input<boolean | null>(null, {\n transform: (value: unknown) =>\n value == null ? null : booleanAttribute(value),\n });\n\n /** The annex table under the plot. Unset falls back to `DS_CONFIG.chart.dataTable`, then\n * `'none'`. It prints each step's direction, its own reading and the running total. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Skeleton bars at the real count, so the page does not resize when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n\n /** Separate from an empty `data`: \"the request failed\" and \"there is nothing to show\" read the\n * same and mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_INTL.chart.empty`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shown in place of the plot while `error` is set. Unset falls back to\n * `DS_INTL.chart.error`. */\n readonly errorText = input<string | null>(null);\n\n /** Formats every value the chart prints - the axis ticks, the bar labels and the annex table.\n * The sign a delta carries is added around it, so a formatter never has to know about one. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n /** Holds the clicked step and its tooltip in place, with a pin disc on it, until a second click,\n * Escape or a press outside releases it. Unset falls back to `DS_CONFIG.chart.pinOnClick`, then\n * `true`. `barClicked` fires either way - pinning is a state, not a handler. */\n readonly pinOnClick = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n /** Milliseconds between one step's entrance and the next; a long waterfall narrows the step to\n * arrive within 260ms. `0` is no stagger. */\n readonly staggerMs = input(40, { transform: numberAttribute });\n\n protected readonly series = viewChild(ColumnSeriesComponent);\n\n protected readonly pinned = computed(\n () => this.series()?.activeMark.pinned() ?? false,\n );\n\n /** The clicked datum, as it was given. Fires on click and on Enter or Space. */\n readonly barClicked = output<WaterfallChartBar>();\n\n private readonly defaults = resolveChartDefaults(this);\n protected readonly intl = inject(DS_INTL);\n readonly frameResolved = this.defaults.frame;\n readonly dataTableResolved = this.defaults.dataTable;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n protected readonly steps = computed(() => waterfallSteps(this.data()));\n\n protected readonly categories = computed(() =>\n this.steps().map((step) => step.label),\n );\n\n protected readonly offsets = computed(() =>\n this.steps().map((step) => ({ from: step.from, to: step.to })),\n );\n\n /** What each bar's label prints: a delta's own change, a total's running sum. The two are\n * different readings and only one of them takes a sign. */\n protected readonly labelValues = computed(() =>\n this.steps().map((step, index) =>\n step.direction === 'total' ? step.to : (this.data()[index]?.value ?? 0),\n ),\n );\n\n protected readonly points = computed<readonly ColumnSeriesPoint[]>(() => {\n const format = this.valueFormatResolved();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => {\n const datum = this.data()[index];\n const reading = values[index];\n const sign = step.direction === 'increase' && reading > 0 ? '+' : '';\n\n return {\n id: datum?.id ?? String(index),\n // The word is what carries the meaning where colour cannot - forced colours, a monochrome\n // print, a reader who cannot tell the two hues apart, and every screen reader.\n label: `${step.label}, ${this.intl().chart[step.direction]} ${sign}${format(reading, 'tooltip')}`,\n value: reading,\n color: DIRECTION_COLORS[step.direction],\n };\n });\n });\n\n protected readonly accessibleName = computed(() => {\n const given = this.summary();\n if (given) {\n return given;\n }\n const words = this.intl().chart;\n const steps = this.steps();\n if (steps.length === 0) {\n return this.caption() ?? words.waterfallTitle;\n }\n const format = this.valueFormatResolved();\n const last = steps[steps.length - 1];\n const spoken = steps\n .map(\n (step, index) =>\n `${step.label} ${words[step.direction]} ${format(this.labelValues()[index], 'tooltip')}`,\n )\n .join(', ');\n\n return `${this.caption() ?? words.waterfallCaption}: ${spoken}. ${words.endsAt(format(last.to, 'tooltip'))}`;\n });\n\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.tableRows().map((row) => ({\n key: row.key,\n cells: [\n row.label,\n row.direction,\n row.formattedValue,\n row.formattedRunningTotal,\n ],\n })),\n );\n\n protected readonly tableRows = computed(() => {\n const format = this.valueFormatResolved();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => ({\n key: `${index}-${step.label}`,\n label: step.label,\n direction: this.intl().chart[step.direction],\n formattedValue: format(values[index], 'tooltip'),\n formattedRunningTotal: format(step.to, 'tooltip'),\n }));\n });\n\n protected readonly skeletonBars = computed(() =>\n Array.from({ length: Math.max(this.data().length, 5) }),\n );\n\n protected onPointClicked(point: ColumnSeriesPoint): void {\n const datum = this.data().find(\n (entry, index) => (entry.id ?? String(index)) === point.id,\n );\n if (datum) {\n this.barClicked.emit(datum);\n }\n }\n}\n","<figure class=\"waterfall-chart\">\n @if (pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"series()?.activeMark?.release()\">\n {{ intl().chart.unpin }}\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading() || !renderReady()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonBars(); track $index) {\n <ds-skeleton\n height=\"var(--_waterfall-chart-skeleton-height)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [tooltipSwatches]=\"tooltipSwatches()\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"valueFormatResolved()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\">\n <svg:g\n dsWaterfallMarks\n [steps]=\"steps()\"\n [labelValues]=\"labelValues()\"\n [showValues]=\"showValues()\"\n [showConnectors]=\"showConnectors()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\" />\n\n <svg:g\n dsColumnSeries\n showValues=\"false\"\n soleSeries\n [data]=\"points()\"\n [offsets]=\"offsets()\"\n [interactive]=\"interactive()\"\n [pinOnClick]=\"pinOnClick()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n </ds-chart>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"[\n intl().chart.stepColumn,\n intl().chart.directionColumn,\n intl().chart.valueColumn,\n intl().chart.runningTotalColumn,\n ]\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKA;;;;;;;AAOgB;AACV,SAAU,cAAc,CAC5B,IAAkC,EAAA;IAElC,IAAI,OAAO,GAAG,CAAC;AAEf,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,KAAI;QACxB,MAAM,IAAI,GAAG,OAAO;QACpB,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC;QAC5D,OAAO,IAAI,KAAK;AAChB,QAAA,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU;QAExE,OAAO;YACL,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,IAAI,EAAE,YAAY,GAAG,CAAC,GAAG,IAAI;AAC7B,YAAA,EAAE,EAAE,OAAO;AACX,YAAA,SAAS,EAAE,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,CAAC,GAAG,UAAU,GAAG,UAAU;SACxE;AACH,IAAA,CAAC,CAAC;AACJ;;ACjB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,CAAA;kBApBnC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAAA,UAAA,EAClB,IAAI,EAAA,QAAA,EACN,kBAAkB,EAAA,OAAA,EACnB;wBACP,cAAc;wBACd,qBAAqB;wBACrB,iBAAiB;wBACjB,uBAAuB;wBACvB,uBAAuB;qBACxB,EAAA,IAAA,EAGK;AACJ,wBAAA,gBAAgB,EAAE,4BAA4B;AAC/C,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,QAAQ,mBACxB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAA,QAAA,EAAA,4rEAAA,EAAA,MAAA,EAAA,CAAA,44IAAA,CAAA,EAAA;stDA2EhC,qBAAqB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnJ7D;;AAEG;;;;"}
@@ -2602,10 +2602,17 @@ const NO_DATA_TABLE = signal(null, ...(ngDevMode ? [{ debugName: "NO_DATA_TABLE"
2602
2602
  const NO_LINGER = signal(null, ...(ngDevMode ? [{ debugName: "NO_LINGER" }] : /* istanbul ignore next */ []));
2603
2603
  const NO_PIN = signal(null, ...(ngDevMode ? [{ debugName: "NO_PIN" }] : /* istanbul ignore next */ []));
2604
2604
  const NO_DELAY = signal(null, ...(ngDevMode ? [{ debugName: "NO_DELAY" }] : /* istanbul ignore next */ []));
2605
+ const NO_SWATCHES = signal(null, ...(ngDevMode ? [{ debugName: "NO_SWATCHES" }] : /* istanbul ignore next */ []));
2605
2606
  /** How long a resting pointer waits before a chart answers it, when nothing sets it.
2606
2607
  *
2607
2608
  * @internal */
2608
- const CHART_HOVER_DELAY_MS = 500;
2609
+ const CHART_HOVER_DELAY_MS = 0;
2610
+ /** How long a tooltip outlives the pointer leaving its mark, when nothing sets it. Long enough
2611
+ * that the pointer crossing the gap to the next mark finds the same panel and it glides there,
2612
+ * where a shorter wait closes it and opens a new one.
2613
+ *
2614
+ * @internal */
2615
+ const CHART_TOOLTIP_LINGER_MS = 500;
2609
2616
  /** Each resolved input → `DS_CONFIG.chart` → the built-in; copy resolves input → `DS_INTL.chart`.
2610
2617
  * Call from an injection context.
2611
2618
  *
@@ -2620,9 +2627,10 @@ function resolveChartDefaults(inputs) {
2620
2627
  emptyText: computed(() => inputs.emptyText() ?? intl().chart.empty),
2621
2628
  errorText: computed(() => inputs.errorText() ?? intl().chart.error),
2622
2629
  valueFormat: resolveWithConfig(inputs.valueFormat, (config) => config.chart?.valueFormat, chartValueFormat(locale)),
2623
- tooltipLingerMs: resolveWithConfig(inputs.tooltipLingerMs ?? NO_LINGER, (config) => config.chart?.tooltipLingerMs, 0),
2630
+ tooltipLingerMs: resolveWithConfig(inputs.tooltipLingerMs ?? NO_LINGER, (config) => config.chart?.tooltipLingerMs, CHART_TOOLTIP_LINGER_MS),
2624
2631
  pinOnClick: resolveWithConfig(inputs.pinOnClick ?? NO_PIN, (config) => config.chart?.pinOnClick, true),
2625
2632
  hoverDelayMs: resolveWithConfig(inputs.hoverDelayMs ?? NO_DELAY, (config) => config.chart?.hoverDelayMs, CHART_HOVER_DELAY_MS),
2633
+ tooltipSwatches: resolveWithConfig(inputs.tooltipSwatches ?? NO_SWATCHES, (config) => config.chart?.tooltipSwatches, 'auto'),
2626
2634
  };
2627
2635
  }
2628
2636
 
@@ -2630,5 +2638,5 @@ function resolveChartDefaults(inputs) {
2630
2638
  * Generated bundle index. Do not edit.
2631
2639
  */
2632
2640
 
2633
- export { CHART_HEAT_COLORS, CHART_HOVER_DELAY_MS, CHART_RAMP_COLORS, CHART_RENDER_GATE_PASSED, CHART_SERIES_COLORS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chartDwell, chartRenderGate, chartValueFormat, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, formatWholePercent, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, linePath, lineSegments, linearScale, listenForMarkFocus, lttbDecimate, markAt, markOf, minMaxDecimate, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge };
2641
+ export { CHART_HEAT_COLORS, CHART_HOVER_DELAY_MS, CHART_RAMP_COLORS, CHART_RENDER_GATE_PASSED, CHART_SERIES_COLORS, CHART_TOOLTIP_LINGER_MS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chartDwell, chartRenderGate, chartValueFormat, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, formatWholePercent, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, linePath, lineSegments, linearScale, listenForMarkFocus, lttbDecimate, markAt, markOf, minMaxDecimate, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge };
2634
2642
  //# sourceMappingURL=ids-group-ltd-ids-design-system-components.mjs.map