@ids-group-ltd/ids-design-system 0.14.1 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +336 -0
- package/components.md +41 -38
- package/docs/agent/INDEX.md +3 -3
- package/docs/agent/charts/column-series-component.md +1 -1
- package/docs/agent/charts/ds-bar-chart.md +3 -3
- package/docs/agent/charts/ds-chart.md +1 -1
- package/docs/agent/charts/ds-column-chart.md +3 -3
- package/docs/agent/charts/ds-config.md +1 -1
- package/docs/agent/charts/ds-funnel-chart.md +3 -3
- package/docs/agent/charts/ds-heatmap-chart.md +1 -1
- package/docs/agent/charts/ds-line-chart.md +2 -2
- package/docs/agent/charts/ds-pie-chart.md +2 -2
- package/docs/agent/charts/ds-scatter-chart.md +1 -1
- package/docs/agent/charts/ds-waterfall-chart.md +1 -1
- package/docs/agent/charts/line-series-component.md +1 -1
- package/docs/agent/feedback/ds-description-list.md +3 -0
- package/docs/agent/forms/ds-color-picker.md +1 -1
- package/docs/agent/forms/ds-date-picker.md +1 -1
- package/docs/agent/forms/ds-select.md +1 -1
- package/docs/agent/forms/ds-textarea.md +1 -1
- package/docs/agent/forms/ds-time-picker.md +1 -1
- package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +1 -1
- package/docs/agent/foundations/tokens.md +1 -1
- package/docs/agent/navigation/ds-pagination.md +1 -1
- package/docs/agent/navigation/ds-tabs.md +2 -1
- package/docs/agent/overlays/ds-bottom-sheet.md +1 -1
- package/docs/agent/overlays/ds-drawer.md +1 -1
- package/docs/agent/overlays/ds-modal.md +1 -1
- package/docs/agent/overlays/ds-popover.md +1 -1
- package/docs/agent/overlays/ds-tooltip.md +4 -4
- package/docs/agent/tables/ds-table.md +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +22 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +16 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +19 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +180 -19
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +175 -93
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +25 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +10 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +28 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +3 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +13 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +32 -18
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +47 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +11 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +5 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +11 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +15 -13
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +35 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +5 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +32 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +66 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +84 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +16 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +138 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +25 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +87 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +4 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.14.2.json +427 -0
- package/migrations/0.14.3.json +71 -0
- package/package.json +1 -1
- package/schematics/check-overrides/surface.json +36 -2
- package/styles/_chart-frame.scss +34 -12
- package/styles/_chart-interactive.scss +10 -9
- package/styles/_chart-motion.scss +139 -16
- package/styles/_overlay-motion.scss +6 -0
- package/styles/_tokens.scss +19 -4
- package/themes/_semantic.scss +1 -0
- package/themes/dark/_theme.scss +1 -0
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +24 -10
- package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +6 -1
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +33 -2
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +151 -103
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +4 -2
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +8 -9
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +4 -2
- package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +23 -11
- package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +29 -2
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +8 -8
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +17 -7
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +20 -2
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +6 -2
- package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +13 -2
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +31 -5
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +3 -2
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +20 -2
- package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +11 -2
- package/types/ids-group-ltd-ids-design-system-components.d.ts +33 -6
- package/types/ids-group-ltd-ids-design-system-core.d.ts +14 -1
- package/types/ids-group-ltd-ids-design-system.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, ViewEncapsulation, Component, inject, ElementRef, booleanAttribute, HostListener, Directive } from '@angular/core';
|
|
2
|
+
import { input, ViewEncapsulation, Component, inject, ElementRef, booleanAttribute, afterNextRender, HostListener, Directive } from '@angular/core';
|
|
3
3
|
import { Overlay } from '@angular/cdk/overlay';
|
|
4
4
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
5
5
|
import { prepareOverlayEnter } from '@ids-group-ltd/ids-design-system/components';
|
|
@@ -13,7 +13,7 @@ class TooltipPanelComponent {
|
|
|
13
13
|
/** Element `id`, referenced by the trigger's `aria-describedby`. */
|
|
14
14
|
panelId = input('', ...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
|
|
15
15
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TooltipPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: TooltipPanelComponent, isStandalone: true, selector: "ds-tooltip-panel", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: true, transformFunction: null }, panelId: { classPropertyName: "panelId", publicName: "panelId", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tooltip" }, properties: { "attr.id": "panelId()", "class.top": "placement() === 'top'", "class.bottom": "placement() === 'bottom'", "class.left": "placement() === 'left'", "class.right": "placement() === 'right'" } }, ngImport: i0, template: `{{ text() }}`, isInline: true, styles: ["@charset \"UTF-8\";:host{--_tooltip-bg-color: var(--ds-tooltip-bg-color, var(--surface-inverted));--_tooltip-text-color: var(--ds-tooltip-text-color, var(--text-inverted));--_tooltip-radius: var(--ds-tooltip-radius, var(--ds-radius-control));--_tooltip-shadow: var(--ds-tooltip-shadow, var(--ds-elevation-overlay));--_tooltip-max-width: var(--ds-tooltip-max-width, var(--tooltip-maxw));--_tooltip-padding: var(--ds-tooltip-padding, var(--space-1-5) var(--space-2-5));display:block;position:relative;background:var(--_tooltip-bg-color);color:var(--_tooltip-text-color);font:var(--font-weight-medium) var(--font-size-xs)/var(--line-height-base) var(--font-sans);padding:var(--_tooltip-padding);border-radius:var(--_tooltip-radius);max-width:var(--_tooltip-max-width);z-index:var(--layer-tooltip);box-shadow:var(--_tooltip-shadow)}:host:after{content:\"\";position:absolute;width:var(--space-2);height:var(--space-2);background:var(--_tooltip-bg-color);transform:rotate(45deg)}:host(.bottom):after{top:calc(var(--tooltip-arrow) / -2);left:50%;margin-left:calc(var(--tooltip-arrow) / -2)}:host(.top):after{bottom:calc(var(--tooltip-arrow) / -2);left:50%;margin-left:calc(var(--tooltip-arrow) / -2)}:host(.left):after{right:calc(var(--tooltip-arrow) / -2);top:50%;margin-top:calc(var(--tooltip-arrow) / -2)}:host(.right):after{left:calc(var(--tooltip-arrow) / -2);top:50%;margin-top:calc(var(--tooltip-arrow) / -2)}\n"] });
|
|
16
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: TooltipPanelComponent, isStandalone: true, selector: "ds-tooltip-panel", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: true, transformFunction: null }, panelId: { classPropertyName: "panelId", publicName: "panelId", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tooltip" }, properties: { "attr.id": "panelId()", "class.top": "placement() === 'top'", "class.bottom": "placement() === 'bottom'", "class.left": "placement() === 'left'", "class.right": "placement() === 'right'" } }, ngImport: i0, template: `{{ text() }}`, isInline: true, styles: ["@charset \"UTF-8\";:host{--_tooltip-bg-color: var(--ds-tooltip-bg-color, var(--surface-inverted));--_tooltip-text-color: var(--ds-tooltip-text-color, var(--text-inverted));--_tooltip-radius: var(--ds-tooltip-radius, var(--ds-radius-control));--_tooltip-shadow: var(--ds-tooltip-shadow, var(--ds-elevation-overlay));--_tooltip-max-width: var(--ds-tooltip-max-width, var(--tooltip-maxw));--_tooltip-padding: var(--ds-tooltip-padding, var(--space-1-5) var(--space-2-5));display:block;position:relative;background:var(--_tooltip-bg-color);color:var(--_tooltip-text-color);font:var(--font-weight-medium) var(--font-size-xs)/var(--line-height-base) var(--font-sans);padding:var(--_tooltip-padding);border-radius:var(--_tooltip-radius);max-width:var(--_tooltip-max-width);overflow-wrap:anywhere;z-index:var(--layer-tooltip);box-shadow:var(--_tooltip-shadow)}:host:after{content:\"\";position:absolute;width:var(--space-2);height:var(--space-2);background:var(--_tooltip-bg-color);transform:rotate(45deg)}:host(.bottom):after{top:calc(var(--tooltip-arrow) / -2);left:50%;margin-left:calc(var(--tooltip-arrow) / -2)}:host(.top):after{bottom:calc(var(--tooltip-arrow) / -2);left:50%;margin-left:calc(var(--tooltip-arrow) / -2)}:host(.left):after{right:calc(var(--tooltip-arrow) / -2);top:50%;margin-top:calc(var(--tooltip-arrow) / -2)}:host(.right):after{left:calc(var(--tooltip-arrow) / -2);top:50%;margin-top:calc(var(--tooltip-arrow) / -2)}\n"] });
|
|
17
17
|
}
|
|
18
18
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TooltipPanelComponent, decorators: [{
|
|
19
19
|
type: Component,
|
|
@@ -24,10 +24,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
24
24
|
'[class.bottom]': "placement() === 'bottom'",
|
|
25
25
|
'[class.left]': "placement() === 'left'",
|
|
26
26
|
'[class.right]': "placement() === 'right'",
|
|
27
|
-
}, encapsulation: ViewEncapsulation.Emulated, styles: ["@charset \"UTF-8\";:host{--_tooltip-bg-color: var(--ds-tooltip-bg-color, var(--surface-inverted));--_tooltip-text-color: var(--ds-tooltip-text-color, var(--text-inverted));--_tooltip-radius: var(--ds-tooltip-radius, var(--ds-radius-control));--_tooltip-shadow: var(--ds-tooltip-shadow, var(--ds-elevation-overlay));--_tooltip-max-width: var(--ds-tooltip-max-width, var(--tooltip-maxw));--_tooltip-padding: var(--ds-tooltip-padding, var(--space-1-5) var(--space-2-5));display:block;position:relative;background:var(--_tooltip-bg-color);color:var(--_tooltip-text-color);font:var(--font-weight-medium) var(--font-size-xs)/var(--line-height-base) var(--font-sans);padding:var(--_tooltip-padding);border-radius:var(--_tooltip-radius);max-width:var(--_tooltip-max-width);z-index:var(--layer-tooltip);box-shadow:var(--_tooltip-shadow)}:host:after{content:\"\";position:absolute;width:var(--space-2);height:var(--space-2);background:var(--_tooltip-bg-color);transform:rotate(45deg)}:host(.bottom):after{top:calc(var(--tooltip-arrow) / -2);left:50%;margin-left:calc(var(--tooltip-arrow) / -2)}:host(.top):after{bottom:calc(var(--tooltip-arrow) / -2);left:50%;margin-left:calc(var(--tooltip-arrow) / -2)}:host(.left):after{right:calc(var(--tooltip-arrow) / -2);top:50%;margin-top:calc(var(--tooltip-arrow) / -2)}:host(.right):after{left:calc(var(--tooltip-arrow) / -2);top:50%;margin-top:calc(var(--tooltip-arrow) / -2)}\n"] }]
|
|
27
|
+
}, encapsulation: ViewEncapsulation.Emulated, styles: ["@charset \"UTF-8\";:host{--_tooltip-bg-color: var(--ds-tooltip-bg-color, var(--surface-inverted));--_tooltip-text-color: var(--ds-tooltip-text-color, var(--text-inverted));--_tooltip-radius: var(--ds-tooltip-radius, var(--ds-radius-control));--_tooltip-shadow: var(--ds-tooltip-shadow, var(--ds-elevation-overlay));--_tooltip-max-width: var(--ds-tooltip-max-width, var(--tooltip-maxw));--_tooltip-padding: var(--ds-tooltip-padding, var(--space-1-5) var(--space-2-5));display:block;position:relative;background:var(--_tooltip-bg-color);color:var(--_tooltip-text-color);font:var(--font-weight-medium) var(--font-size-xs)/var(--line-height-base) var(--font-sans);padding:var(--_tooltip-padding);border-radius:var(--_tooltip-radius);max-width:var(--_tooltip-max-width);overflow-wrap:anywhere;z-index:var(--layer-tooltip);box-shadow:var(--_tooltip-shadow)}:host:after{content:\"\";position:absolute;width:var(--space-2);height:var(--space-2);background:var(--_tooltip-bg-color);transform:rotate(45deg)}:host(.bottom):after{top:calc(var(--tooltip-arrow) / -2);left:50%;margin-left:calc(var(--tooltip-arrow) / -2)}:host(.top):after{bottom:calc(var(--tooltip-arrow) / -2);left:50%;margin-left:calc(var(--tooltip-arrow) / -2)}:host(.left):after{right:calc(var(--tooltip-arrow) / -2);top:50%;margin-top:calc(var(--tooltip-arrow) / -2)}:host(.right):after{left:calc(var(--tooltip-arrow) / -2);top:50%;margin-top:calc(var(--tooltip-arrow) / -2)}\n"] }]
|
|
28
28
|
}], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: true }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: true }] }], panelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelId", required: false }] }] } });
|
|
29
29
|
|
|
30
30
|
const TRIGGER_GAP_PX = 8;
|
|
31
|
+
const NATIVELY_FOCUSABLE = 'a[href], button, input, select, textarea, summary';
|
|
32
|
+
const FOCUSABLE = `${NATIVELY_FOCUSABLE}, [tabindex]`;
|
|
33
|
+
const KEYBOARD_FOCUSABLE = `${NATIVELY_FOCUSABLE}, [tabindex]:not([tabindex^="-"])`;
|
|
34
|
+
const INTERACTIVE = [
|
|
35
|
+
NATIVELY_FOCUSABLE,
|
|
36
|
+
'tr:not([role])',
|
|
37
|
+
...[
|
|
38
|
+
'button',
|
|
39
|
+
'link',
|
|
40
|
+
'tab',
|
|
41
|
+
'option',
|
|
42
|
+
'menuitem',
|
|
43
|
+
'menuitemcheckbox',
|
|
44
|
+
'menuitemradio',
|
|
45
|
+
'row',
|
|
46
|
+
'gridcell',
|
|
47
|
+
'combobox',
|
|
48
|
+
'checkbox',
|
|
49
|
+
'radio',
|
|
50
|
+
'switch',
|
|
51
|
+
'treeitem',
|
|
52
|
+
].map((role) => `[role="${role}"]`),
|
|
53
|
+
].join(', ');
|
|
54
|
+
const clippedHostsByAncestor = new WeakMap();
|
|
55
|
+
function firstClippedHost(tooltips) {
|
|
56
|
+
return [...tooltips]
|
|
57
|
+
.sort((a, b) => a.hostElement.compareDocumentPosition(b.hostElement) &
|
|
58
|
+
Node.DOCUMENT_POSITION_FOLLOWING
|
|
59
|
+
? -1
|
|
60
|
+
: 1)
|
|
61
|
+
.find((tooltip) => tooltip.isClipped());
|
|
62
|
+
}
|
|
31
63
|
let nextId = 0;
|
|
32
64
|
class TooltipDirective {
|
|
33
65
|
overlay = inject(Overlay);
|
|
@@ -49,14 +81,42 @@ class TooltipDirective {
|
|
|
49
81
|
*
|
|
50
82
|
* With this on, `dsTooltip` may be left empty and the host's own text is disclosed. That is
|
|
51
83
|
* what makes it usable on projected content, where the component holding the tip cannot know
|
|
52
|
-
* what it was handed.
|
|
84
|
+
* what it was handed. A tip whose text the host already contains sets no `aria-describedby`;
|
|
85
|
+
* one given a `dsTooltip` that says more than the host does describes it as usual. */
|
|
53
86
|
dsTooltipWhenClipped = input(false, { ...(ngDevMode ? { debugName: "dsTooltipWhenClipped" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
87
|
+
/** A selector for the element inside the host whose clipping `dsTooltipWhenClipped` tests and
|
|
88
|
+
* whose text it discloses. It lets the pointer area be a whole row while the text is one part
|
|
89
|
+
* of it. Resolved on every open, so the element may come and go with the host's content; while
|
|
90
|
+
* nothing matches, no clipped tip opens. */
|
|
91
|
+
dsTooltipTextSelector = input(null, ...(ngDevMode ? [{ debugName: "dsTooltipTextSelector" }] : /* istanbul ignore next */ []));
|
|
92
|
+
get hostElement() {
|
|
93
|
+
return this.host.nativeElement;
|
|
94
|
+
}
|
|
95
|
+
textElement() {
|
|
96
|
+
const selector = this.dsTooltipTextSelector();
|
|
97
|
+
return selector
|
|
98
|
+
? this.hostElement.querySelector(selector)
|
|
99
|
+
: this.hostElement;
|
|
100
|
+
}
|
|
101
|
+
isClipped() {
|
|
102
|
+
const textElement = this.textElement();
|
|
103
|
+
return textElement !== null && isTextClipped(textElement);
|
|
104
|
+
}
|
|
54
105
|
tipText() {
|
|
55
106
|
const given = this.dsTooltip();
|
|
56
107
|
if (given || !this.dsTooltipWhenClipped()) {
|
|
57
108
|
return given;
|
|
58
109
|
}
|
|
59
|
-
return (this.
|
|
110
|
+
return (this.textElement()?.textContent ?? '').trim();
|
|
111
|
+
}
|
|
112
|
+
/** A clipped host's full text is already in the DOM, so a screen reader has it; describing
|
|
113
|
+
* the element with it again would announce it twice. */
|
|
114
|
+
disclosesOwnText(text) {
|
|
115
|
+
if (!this.dsTooltipWhenClipped()) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
const collapse = (value) => value.replace(/\s+/g, ' ').trim();
|
|
119
|
+
return collapse(this.textElement()?.textContent ?? '').includes(collapse(text));
|
|
60
120
|
}
|
|
61
121
|
ref = null;
|
|
62
122
|
timer = null;
|
|
@@ -79,10 +139,66 @@ class TooltipDirective {
|
|
|
79
139
|
* pointing at a panel that no longer exists.
|
|
80
140
|
*/
|
|
81
141
|
describedElement = null;
|
|
142
|
+
detachAncestor = null;
|
|
143
|
+
constructor() {
|
|
144
|
+
afterNextRender(() => this.listenToFocusableAncestor());
|
|
145
|
+
}
|
|
146
|
+
/** `:focus-visible` keeps a click, which focuses the ancestor too, from opening it. Only the
|
|
147
|
+
* first clipped host of one ancestor opens, so two panels never stack. */
|
|
148
|
+
listenToFocusableAncestor() {
|
|
149
|
+
const host = this.host.nativeElement;
|
|
150
|
+
if (!this.dsTooltipWhenClipped() || host.matches(FOCUSABLE)) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
const ancestor = host.parentElement?.closest(FOCUSABLE);
|
|
154
|
+
if (!ancestor?.matches(INTERACTIVE)) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
let tooltips = clippedHostsByAncestor.get(ancestor);
|
|
158
|
+
if (!tooltips) {
|
|
159
|
+
tooltips = new Set();
|
|
160
|
+
clippedHostsByAncestor.set(ancestor, tooltips);
|
|
161
|
+
}
|
|
162
|
+
tooltips.add(this);
|
|
163
|
+
const open = (event) => {
|
|
164
|
+
if (event.target !== ancestor ||
|
|
165
|
+
// Tested here, not when registering: a disabled trigger carries tabindex="-1" until enabled.
|
|
166
|
+
!ancestor.matches(KEYBOARD_FOCUSABLE) ||
|
|
167
|
+
!ancestor.matches(':focus-visible') ||
|
|
168
|
+
firstClippedHost(tooltips) !== this) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
this.focusedTarget = ancestor;
|
|
172
|
+
this.scheduleShow();
|
|
173
|
+
};
|
|
174
|
+
const close = () => {
|
|
175
|
+
this.focusedTarget = null;
|
|
176
|
+
this.onClose();
|
|
177
|
+
};
|
|
178
|
+
ancestor.addEventListener('focusin', open);
|
|
179
|
+
ancestor.addEventListener('focusout', close);
|
|
180
|
+
ancestor.addEventListener('click', close);
|
|
181
|
+
ancestor.addEventListener('keydown', close);
|
|
182
|
+
this.detachAncestor = () => {
|
|
183
|
+
tooltips.delete(this);
|
|
184
|
+
ancestor.removeEventListener('focusin', open);
|
|
185
|
+
ancestor.removeEventListener('focusout', close);
|
|
186
|
+
ancestor.removeEventListener('click', close);
|
|
187
|
+
ancestor.removeEventListener('keydown', close);
|
|
188
|
+
};
|
|
189
|
+
}
|
|
82
190
|
onPointerEnter() {
|
|
83
191
|
this.scheduleShow();
|
|
84
192
|
}
|
|
193
|
+
// A clipped host that takes focus itself follows the same rule as one reached through its
|
|
194
|
+
// focusable ancestor: keyboard focus on the host opens, a click's focus does not.
|
|
85
195
|
onFocusIn(event) {
|
|
196
|
+
const host = this.hostElement;
|
|
197
|
+
if (this.dsTooltipWhenClipped() &&
|
|
198
|
+
host.matches(FOCUSABLE) &&
|
|
199
|
+
(event.target !== host || !host.matches(':focus-visible'))) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
86
202
|
if (event.target instanceof HTMLElement) {
|
|
87
203
|
this.focusedTarget = event.target;
|
|
88
204
|
}
|
|
@@ -96,8 +212,7 @@ class TooltipDirective {
|
|
|
96
212
|
if (!this.tipText()) {
|
|
97
213
|
return;
|
|
98
214
|
}
|
|
99
|
-
if (this.dsTooltipWhenClipped() &&
|
|
100
|
-
!isTextClipped(this.host.nativeElement)) {
|
|
215
|
+
if (this.dsTooltipWhenClipped() && !this.isClipped()) {
|
|
101
216
|
return;
|
|
102
217
|
}
|
|
103
218
|
if (this.timer !== null) {
|
|
@@ -134,6 +249,11 @@ class TooltipDirective {
|
|
|
134
249
|
described.removeAttribute('aria-describedby');
|
|
135
250
|
}
|
|
136
251
|
}
|
|
252
|
+
onKeydown() {
|
|
253
|
+
if (this.dsTooltipWhenClipped()) {
|
|
254
|
+
this.onClose();
|
|
255
|
+
}
|
|
256
|
+
}
|
|
137
257
|
onEscape() {
|
|
138
258
|
if (this.ref) {
|
|
139
259
|
this.onClose();
|
|
@@ -156,9 +276,13 @@ class TooltipDirective {
|
|
|
156
276
|
});
|
|
157
277
|
prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);
|
|
158
278
|
const cmpRef = this.ref.attach(new ComponentPortal(TooltipPanelComponent));
|
|
159
|
-
|
|
279
|
+
const text = this.tipText();
|
|
280
|
+
cmpRef.setInput('text', text);
|
|
160
281
|
cmpRef.setInput('placement', placement);
|
|
161
282
|
cmpRef.setInput('panelId', this.tipId);
|
|
283
|
+
if (this.disclosesOwnText(text)) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
162
286
|
const described = this.focusedTarget ?? this.host.nativeElement;
|
|
163
287
|
this.describedElement = described;
|
|
164
288
|
const existing = described.getAttribute('aria-describedby');
|
|
@@ -201,10 +325,11 @@ class TooltipDirective {
|
|
|
201
325
|
}
|
|
202
326
|
}
|
|
203
327
|
ngOnDestroy() {
|
|
328
|
+
this.detachAncestor?.();
|
|
204
329
|
this.onClose();
|
|
205
330
|
}
|
|
206
331
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
207
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: TooltipDirective, isStandalone: true, selector: "[dsTooltip]", inputs: { dsTooltip: { classPropertyName: "dsTooltip", publicName: "dsTooltip", isSignal: true, isRequired: false, transformFunction: null }, dsTooltipPlacement: { classPropertyName: "dsTooltipPlacement", publicName: "dsTooltipPlacement", isSignal: true, isRequired: false, transformFunction: null }, dsTooltipDelay: { classPropertyName: "dsTooltipDelay", publicName: "dsTooltipDelay", isSignal: true, isRequired: false, transformFunction: null }, dsTooltipWhenClipped: { classPropertyName: "dsTooltipWhenClipped", publicName: "dsTooltipWhenClipped", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onPointerEnter()", "focusin": "onFocusIn($event)", "focusout": "onFocusOut()", "mouseleave": "onClose()", "click": "onClose()", "keydown.escape": "onEscape()" } }, ngImport: i0 });
|
|
332
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: TooltipDirective, isStandalone: true, selector: "[dsTooltip]", inputs: { dsTooltip: { classPropertyName: "dsTooltip", publicName: "dsTooltip", isSignal: true, isRequired: false, transformFunction: null }, dsTooltipPlacement: { classPropertyName: "dsTooltipPlacement", publicName: "dsTooltipPlacement", isSignal: true, isRequired: false, transformFunction: null }, dsTooltipDelay: { classPropertyName: "dsTooltipDelay", publicName: "dsTooltipDelay", isSignal: true, isRequired: false, transformFunction: null }, dsTooltipWhenClipped: { classPropertyName: "dsTooltipWhenClipped", publicName: "dsTooltipWhenClipped", isSignal: true, isRequired: false, transformFunction: null }, dsTooltipTextSelector: { classPropertyName: "dsTooltipTextSelector", publicName: "dsTooltipTextSelector", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onPointerEnter()", "focusin": "onFocusIn($event)", "focusout": "onFocusOut()", "mouseleave": "onClose()", "click": "onClose()", "keydown": "onKeydown()", "keydown.escape": "onEscape()" } }, ngImport: i0 });
|
|
208
333
|
}
|
|
209
334
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
210
335
|
type: Directive,
|
|
@@ -212,7 +337,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
212
337
|
selector: '[dsTooltip]',
|
|
213
338
|
standalone: true,
|
|
214
339
|
}]
|
|
215
|
-
}], propDecorators: { dsTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltip", required: false }] }], dsTooltipPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltipPlacement", required: false }] }], dsTooltipDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltipDelay", required: false }] }], dsTooltipWhenClipped: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltipWhenClipped", required: false }] }], onPointerEnter: [{
|
|
340
|
+
}], ctorParameters: () => [], propDecorators: { dsTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltip", required: false }] }], dsTooltipPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltipPlacement", required: false }] }], dsTooltipDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltipDelay", required: false }] }], dsTooltipWhenClipped: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltipWhenClipped", required: false }] }], dsTooltipTextSelector: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTooltipTextSelector", required: false }] }], onPointerEnter: [{
|
|
216
341
|
type: HostListener,
|
|
217
342
|
args: ['mouseenter']
|
|
218
343
|
}], onFocusIn: [{
|
|
@@ -227,6 +352,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
227
352
|
}, {
|
|
228
353
|
type: HostListener,
|
|
229
354
|
args: ['click']
|
|
355
|
+
}], onKeydown: [{
|
|
356
|
+
type: HostListener,
|
|
357
|
+
args: ['keydown']
|
|
230
358
|
}], onEscape: [{
|
|
231
359
|
type: HostListener,
|
|
232
360
|
args: ['keydown.escape']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-tooltip.mjs","sources":["../../../src/lib/components/tooltip/tooltip-panel.component.ts","../../../src/lib/components/tooltip/tooltip.directive.ts","../../../src/lib/components/tooltip/ids-group-ltd-ids-design-system-components-tooltip.ts"],"sourcesContent":["import { Component, ViewEncapsulation, input } from '@angular/core';\nimport type { TooltipPlacement } from './tooltip.types';\n\n@Component({\n selector: 'ds-tooltip-panel',\n standalone: true,\n template: `{{ text() }}`,\n styleUrl: './tooltip-panel.component.scss',\n host: {\n role: 'tooltip',\n '[attr.id]': 'panelId()',\n '[class.top]': \"placement() === 'top'\",\n '[class.bottom]': \"placement() === 'bottom'\",\n '[class.left]': \"placement() === 'left'\",\n '[class.right]': \"placement() === 'right'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class TooltipPanelComponent {\n /** Tooltip text content. */\n readonly text = input.required<string>();\n /** Side of the trigger the panel is positioned on; also drives the arrow class. */\n readonly placement = input.required<TooltipPlacement>();\n /** Element `id`, referenced by the trigger's `aria-describedby`. */\n readonly panelId = input<string>('');\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n OnDestroy,\n booleanAttribute,\n inject,\n input,\n} from '@angular/core';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { TooltipPanelComponent } from './tooltip-panel.component';\nimport { prepareOverlayEnter } from '@ids-group-ltd/ids-design-system/components';\nimport { isTextClipped } from '@ids-group-ltd/ids-design-system/core';\nimport type { TooltipPlacement } from './tooltip.types';\n\nconst TRIGGER_GAP_PX = 8;\n\nlet nextId = 0;\n\n@Directive({\n selector: '[dsTooltip]',\n standalone: true,\n})\nexport class TooltipDirective implements OnDestroy {\n private readonly overlay = inject(Overlay);\n private readonly host = inject(ElementRef<HTMLElement>);\n\n /** Tip text. An empty string is how you turn the tooltip off — a host bound to a\n * value that may be blank needs no separate condition. */\n readonly dsTooltip = input<string>('');\n /** Which side the tip opens on. It does NOT flip: only the requested side is\n * offered to the overlay, so a tip with no room there is pushed rather than moved\n * to the opposite side. */\n readonly dsTooltipPlacement = input<TooltipPlacement>('top');\n /** Milliseconds before the tip appears. Hiding is immediate — this delay only ever\n * suppresses a tip the pointer passed over on its way somewhere else. */\n readonly dsTooltipDelay = input<number>(120);\n /** Show the tip only while the host is actually showing less text than it holds. For a label\n * that already reads in full, a tip repeating it is noise. Re-tested on every open, so a tip\n * appears and stops appearing as the column, panel or window is resized, with no observer to\n * run.\n *\n * With this on, `dsTooltip` may be left empty and the host's own text is disclosed. That is\n * what makes it usable on projected content, where the component holding the tip cannot know\n * what it was handed. */\n readonly dsTooltipWhenClipped = input(false, { transform: booleanAttribute });\n\n private tipText(): string {\n const given = this.dsTooltip();\n if (given || !this.dsTooltipWhenClipped()) {\n return given;\n }\n\n return (this.host.nativeElement.textContent ?? '').trim();\n }\n\n private ref: OverlayRef | null = null;\n private timer: number | null = null;\n private readonly tipId = `ds-tooltip-${++nextId}`;\n\n /**\n * Where `aria-describedby` belongs, when focus is involved. A host that is not\n * focusable itself never reaches a screen reader — `ds-menu-item` carries\n * `role=\"none\"` and puts the real `<button>` inside — so describing the host\n * describes something the user never focuses. `focusin` bubbles, so its target\n * IS whatever took focus; recording it is what keeps this directive out of the\n * host component's internal DOM. A pointer-only open leaves this null and\n * falls back to the host, where no screen reader is involved anyway.\n */\n private focusedTarget: HTMLElement | null = null;\n\n /**\n * Where `aria-describedby` was actually written, remembered so teardown strips\n * it from the same element. Not derivable at teardown: focus can arrive after\n * the panel opened (hover, then click or arrow onto it), which moves\n * `focusedTarget` and would otherwise strand the attribute on the host,\n * pointing at a panel that no longer exists.\n */\n private describedElement: HTMLElement | null = null;\n\n @HostListener('mouseenter')\n protected onPointerEnter(): void {\n this.scheduleShow();\n }\n\n @HostListener('focusin', ['$event'])\n protected onFocusIn(event: FocusEvent): void {\n if (event.target instanceof HTMLElement) {\n this.focusedTarget = event.target;\n }\n this.scheduleShow();\n }\n\n @HostListener('focusout')\n protected onFocusOut(): void {\n this.focusedTarget = null;\n this.onClose();\n }\n\n private scheduleShow(): void {\n if (!this.tipText()) {\n return;\n }\n if (\n this.dsTooltipWhenClipped() &&\n !isTextClipped(this.host.nativeElement)\n ) {\n return;\n }\n if (this.timer !== null) {\n clearTimeout(this.timer);\n }\n this.timer = window.setTimeout(() => this.show(), this.dsTooltipDelay());\n }\n\n // Close on activation too: clicking the thing the tip describes is a clear\n // dismiss, and a re-rendered anchor (e.g. a navigated sidenav item) under a\n // stationary cursor fires no mouseleave, which would otherwise strand the panel.\n @HostListener('mouseleave')\n @HostListener('click')\n protected onClose(): void {\n if (this.timer !== null) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n this.disposeRef();\n }\n\n private disposeRef(): void {\n this.ref?.dispose();\n this.ref = null;\n const described = this.describedElement;\n if (!described) {\n return;\n }\n this.describedElement = null;\n const remaining = (described.getAttribute('aria-describedby') ?? '')\n .split(' ')\n .filter((id: string) => id && id !== this.tipId)\n .join(' ');\n if (remaining) {\n described.setAttribute('aria-describedby', remaining);\n } else {\n described.removeAttribute('aria-describedby');\n }\n }\n\n @HostListener('keydown.escape')\n protected onEscape(): void {\n if (this.ref) {\n this.onClose();\n }\n }\n\n private show(): void {\n // A re-render or re-entrant hover can call show() with a panel still open;\n // dispose it first so the OverlayRef isn't leaked and aria-describedby\n // doesn't accumulate the same id twice.\n this.disposeRef();\n const placement = this.dsTooltipPlacement();\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions([this.positionFor(placement)]);\n\n this.ref = this.overlay.create({\n positionStrategy,\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.close(),\n });\n prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);\n\n const cmpRef = this.ref.attach(new ComponentPortal(TooltipPanelComponent));\n cmpRef.setInput('text', this.tipText());\n cmpRef.setInput('placement', placement);\n cmpRef.setInput('panelId', this.tipId);\n const described = this.focusedTarget ?? this.host.nativeElement;\n this.describedElement = described;\n const existing = described.getAttribute('aria-describedby');\n described.setAttribute(\n 'aria-describedby',\n existing ? `${existing} ${this.tipId}` : this.tipId,\n );\n }\n\n private positionFor(placement: TooltipPlacement) {\n switch (placement) {\n case 'top':\n return {\n originX: 'center' as const,\n originY: 'top' as const,\n overlayX: 'center' as const,\n overlayY: 'bottom' as const,\n offsetY: -TRIGGER_GAP_PX,\n };\n case 'bottom':\n return {\n originX: 'center' as const,\n originY: 'bottom' as const,\n overlayX: 'center' as const,\n overlayY: 'top' as const,\n offsetY: TRIGGER_GAP_PX,\n };\n case 'left':\n return {\n originX: 'start' as const,\n originY: 'center' as const,\n overlayX: 'end' as const,\n overlayY: 'center' as const,\n offsetX: -TRIGGER_GAP_PX,\n };\n case 'right':\n return {\n originX: 'end' as const,\n originY: 'center' as const,\n overlayX: 'start' as const,\n overlayY: 'center' as const,\n offsetX: TRIGGER_GAP_PX,\n };\n }\n }\n\n ngOnDestroy(): void {\n this.onClose();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAkBa,qBAAqB,CAAA;;AAEvB,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,0EAAU;;AAE/B,IAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,+EAAoB;;AAE9C,IAAA,OAAO,GAAG,KAAK,CAAS,EAAE,8EAAC;wGANzB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,qBAAqB,ssBAZtB,CAAA,YAAA,CAAc,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,s4CAAA,CAAA,EAAA,CAAA;;4FAYb,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAfjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,UAAA,EAChB,IAAI,EAAA,QAAA,EACN,CAAA,YAAA,CAAc,EAAA,IAAA,EAElB;AACJ,wBAAA,IAAI,EAAE,SAAS;AACf,wBAAA,WAAW,EAAE,WAAW;AACxB,wBAAA,aAAa,EAAE,uBAAuB;AACtC,wBAAA,gBAAgB,EAAE,0BAA0B;AAC5C,wBAAA,cAAc,EAAE,wBAAwB;AACxC,wBAAA,eAAe,EAAE,yBAAyB;qBAC3C,EAAA,aAAA,EACc,iBAAiB,CAAC,QAAQ,EAAA,MAAA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;;sBAyBvB,YAAY;uBAAC,YAAY;;sBACzB,YAAY;uBAAC,OAAO;;sBA4BpB,YAAY;uBAAC,gBAAgB;;;ACpJhC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-tooltip.mjs","sources":["../../../src/lib/components/tooltip/tooltip-panel.component.ts","../../../src/lib/components/tooltip/tooltip.directive.ts","../../../src/lib/components/tooltip/ids-group-ltd-ids-design-system-components-tooltip.ts"],"sourcesContent":["import { Component, ViewEncapsulation, input } from '@angular/core';\nimport type { TooltipPlacement } from './tooltip.types';\n\n@Component({\n selector: 'ds-tooltip-panel',\n standalone: true,\n template: `{{ text() }}`,\n styleUrl: './tooltip-panel.component.scss',\n host: {\n role: 'tooltip',\n '[attr.id]': 'panelId()',\n '[class.top]': \"placement() === 'top'\",\n '[class.bottom]': \"placement() === 'bottom'\",\n '[class.left]': \"placement() === 'left'\",\n '[class.right]': \"placement() === 'right'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class TooltipPanelComponent {\n /** Tooltip text content. */\n readonly text = input.required<string>();\n /** Side of the trigger the panel is positioned on; also drives the arrow class. */\n readonly placement = input.required<TooltipPlacement>();\n /** Element `id`, referenced by the trigger's `aria-describedby`. */\n readonly panelId = input<string>('');\n}\n","import {\n Directive,\n ElementRef,\n HostListener,\n OnDestroy,\n afterNextRender,\n booleanAttribute,\n inject,\n input,\n} from '@angular/core';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { TooltipPanelComponent } from './tooltip-panel.component';\nimport { prepareOverlayEnter } from '@ids-group-ltd/ids-design-system/components';\nimport { isTextClipped } from '@ids-group-ltd/ids-design-system/core';\nimport type { TooltipPlacement } from './tooltip.types';\n\nconst TRIGGER_GAP_PX = 8;\n\nconst NATIVELY_FOCUSABLE = 'a[href], button, input, select, textarea, summary';\nconst FOCUSABLE = `${NATIVELY_FOCUSABLE}, [tabindex]`;\nconst KEYBOARD_FOCUSABLE = `${NATIVELY_FOCUSABLE}, [tabindex]:not([tabindex^=\"-\"])`;\nconst INTERACTIVE = [\n NATIVELY_FOCUSABLE,\n 'tr:not([role])',\n ...[\n 'button',\n 'link',\n 'tab',\n 'option',\n 'menuitem',\n 'menuitemcheckbox',\n 'menuitemradio',\n 'row',\n 'gridcell',\n 'combobox',\n 'checkbox',\n 'radio',\n 'switch',\n 'treeitem',\n ].map((role) => `[role=\"${role}\"]`),\n].join(', ');\n\nconst clippedHostsByAncestor = new WeakMap<\n HTMLElement,\n Set<TooltipDirective>\n>();\n\nfunction firstClippedHost(\n tooltips: Set<TooltipDirective>,\n): TooltipDirective | undefined {\n return [...tooltips]\n .sort((a, b) =>\n a.hostElement.compareDocumentPosition(b.hostElement) &\n Node.DOCUMENT_POSITION_FOLLOWING\n ? -1\n : 1,\n )\n .find((tooltip) => tooltip.isClipped());\n}\n\nlet nextId = 0;\n\n@Directive({\n selector: '[dsTooltip]',\n standalone: true,\n})\nexport class TooltipDirective implements OnDestroy {\n private readonly overlay = inject(Overlay);\n private readonly host = inject(ElementRef<HTMLElement>);\n\n /** Tip text. An empty string is how you turn the tooltip off — a host bound to a\n * value that may be blank needs no separate condition. */\n readonly dsTooltip = input<string>('');\n /** Which side the tip opens on. It does NOT flip: only the requested side is\n * offered to the overlay, so a tip with no room there is pushed rather than moved\n * to the opposite side. */\n readonly dsTooltipPlacement = input<TooltipPlacement>('top');\n /** Milliseconds before the tip appears. Hiding is immediate — this delay only ever\n * suppresses a tip the pointer passed over on its way somewhere else. */\n readonly dsTooltipDelay = input<number>(120);\n /** Show the tip only while the host is actually showing less text than it holds. For a label\n * that already reads in full, a tip repeating it is noise. Re-tested on every open, so a tip\n * appears and stops appearing as the column, panel or window is resized, with no observer to\n * run.\n *\n * With this on, `dsTooltip` may be left empty and the host's own text is disclosed. That is\n * what makes it usable on projected content, where the component holding the tip cannot know\n * what it was handed. A tip whose text the host already contains sets no `aria-describedby`;\n * one given a `dsTooltip` that says more than the host does describes it as usual. */\n readonly dsTooltipWhenClipped = input(false, { transform: booleanAttribute });\n /** A selector for the element inside the host whose clipping `dsTooltipWhenClipped` tests and\n * whose text it discloses. It lets the pointer area be a whole row while the text is one part\n * of it. Resolved on every open, so the element may come and go with the host's content; while\n * nothing matches, no clipped tip opens. */\n readonly dsTooltipTextSelector = input<string | null>(null);\n\n get hostElement(): HTMLElement {\n return this.host.nativeElement;\n }\n\n private textElement(): HTMLElement | null {\n const selector = this.dsTooltipTextSelector();\n\n return selector\n ? this.hostElement.querySelector<HTMLElement>(selector)\n : this.hostElement;\n }\n\n isClipped(): boolean {\n const textElement = this.textElement();\n\n return textElement !== null && isTextClipped(textElement);\n }\n\n private tipText(): string {\n const given = this.dsTooltip();\n if (given || !this.dsTooltipWhenClipped()) {\n return given;\n }\n\n return (this.textElement()?.textContent ?? '').trim();\n }\n\n /** A clipped host's full text is already in the DOM, so a screen reader has it; describing\n * the element with it again would announce it twice. */\n private disclosesOwnText(text: string): boolean {\n if (!this.dsTooltipWhenClipped()) {\n return false;\n }\n const collapse = (value: string) => value.replace(/\\s+/g, ' ').trim();\n\n return collapse(this.textElement()?.textContent ?? '').includes(\n collapse(text),\n );\n }\n\n private ref: OverlayRef | null = null;\n private timer: number | null = null;\n private readonly tipId = `ds-tooltip-${++nextId}`;\n\n /**\n * Where `aria-describedby` belongs, when focus is involved. A host that is not\n * focusable itself never reaches a screen reader — `ds-menu-item` carries\n * `role=\"none\"` and puts the real `<button>` inside — so describing the host\n * describes something the user never focuses. `focusin` bubbles, so its target\n * IS whatever took focus; recording it is what keeps this directive out of the\n * host component's internal DOM. A pointer-only open leaves this null and\n * falls back to the host, where no screen reader is involved anyway.\n */\n private focusedTarget: HTMLElement | null = null;\n\n /**\n * Where `aria-describedby` was actually written, remembered so teardown strips\n * it from the same element. Not derivable at teardown: focus can arrive after\n * the panel opened (hover, then click or arrow onto it), which moves\n * `focusedTarget` and would otherwise strand the attribute on the host,\n * pointing at a panel that no longer exists.\n */\n private describedElement: HTMLElement | null = null;\n\n private detachAncestor: (() => void) | null = null;\n\n constructor() {\n afterNextRender(() => this.listenToFocusableAncestor());\n }\n\n /** `:focus-visible` keeps a click, which focuses the ancestor too, from opening it. Only the\n * first clipped host of one ancestor opens, so two panels never stack. */\n private listenToFocusableAncestor(): void {\n const host: HTMLElement = this.host.nativeElement;\n if (!this.dsTooltipWhenClipped() || host.matches(FOCUSABLE)) {\n return;\n }\n const ancestor = host.parentElement?.closest<HTMLElement>(FOCUSABLE);\n if (!ancestor?.matches(INTERACTIVE)) {\n return;\n }\n let tooltips = clippedHostsByAncestor.get(ancestor);\n if (!tooltips) {\n tooltips = new Set();\n clippedHostsByAncestor.set(ancestor, tooltips);\n }\n tooltips.add(this);\n const open = (event: FocusEvent) => {\n if (\n event.target !== ancestor ||\n // Tested here, not when registering: a disabled trigger carries tabindex=\"-1\" until enabled.\n !ancestor.matches(KEYBOARD_FOCUSABLE) ||\n !ancestor.matches(':focus-visible') ||\n firstClippedHost(tooltips) !== this\n ) {\n return;\n }\n this.focusedTarget = ancestor;\n this.scheduleShow();\n };\n const close = () => {\n this.focusedTarget = null;\n this.onClose();\n };\n ancestor.addEventListener('focusin', open);\n ancestor.addEventListener('focusout', close);\n ancestor.addEventListener('click', close);\n ancestor.addEventListener('keydown', close);\n this.detachAncestor = () => {\n tooltips.delete(this);\n ancestor.removeEventListener('focusin', open);\n ancestor.removeEventListener('focusout', close);\n ancestor.removeEventListener('click', close);\n ancestor.removeEventListener('keydown', close);\n };\n }\n\n @HostListener('mouseenter')\n protected onPointerEnter(): void {\n this.scheduleShow();\n }\n\n // A clipped host that takes focus itself follows the same rule as one reached through its\n // focusable ancestor: keyboard focus on the host opens, a click's focus does not.\n @HostListener('focusin', ['$event'])\n protected onFocusIn(event: FocusEvent): void {\n const host = this.hostElement;\n if (\n this.dsTooltipWhenClipped() &&\n host.matches(FOCUSABLE) &&\n (event.target !== host || !host.matches(':focus-visible'))\n ) {\n return;\n }\n if (event.target instanceof HTMLElement) {\n this.focusedTarget = event.target;\n }\n this.scheduleShow();\n }\n\n @HostListener('focusout')\n protected onFocusOut(): void {\n this.focusedTarget = null;\n this.onClose();\n }\n\n private scheduleShow(): void {\n if (!this.tipText()) {\n return;\n }\n if (this.dsTooltipWhenClipped() && !this.isClipped()) {\n return;\n }\n if (this.timer !== null) {\n clearTimeout(this.timer);\n }\n this.timer = window.setTimeout(() => this.show(), this.dsTooltipDelay());\n }\n\n // Close on activation too: clicking the thing the tip describes is a clear\n // dismiss, and a re-rendered anchor (e.g. a navigated sidenav item) under a\n // stationary cursor fires no mouseleave, which would otherwise strand the panel.\n @HostListener('mouseleave')\n @HostListener('click')\n protected onClose(): void {\n if (this.timer !== null) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n this.disposeRef();\n }\n\n private disposeRef(): void {\n this.ref?.dispose();\n this.ref = null;\n const described = this.describedElement;\n if (!described) {\n return;\n }\n this.describedElement = null;\n const remaining = (described.getAttribute('aria-describedby') ?? '')\n .split(' ')\n .filter((id: string) => id && id !== this.tipId)\n .join(' ');\n if (remaining) {\n described.setAttribute('aria-describedby', remaining);\n } else {\n described.removeAttribute('aria-describedby');\n }\n }\n\n @HostListener('keydown')\n protected onKeydown(): void {\n if (this.dsTooltipWhenClipped()) {\n this.onClose();\n }\n }\n\n @HostListener('keydown.escape')\n protected onEscape(): void {\n if (this.ref) {\n this.onClose();\n }\n }\n\n private show(): void {\n // A re-render or re-entrant hover can call show() with a panel still open;\n // dispose it first so the OverlayRef isn't leaked and aria-describedby\n // doesn't accumulate the same id twice.\n this.disposeRef();\n const placement = this.dsTooltipPlacement();\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions([this.positionFor(placement)]);\n\n this.ref = this.overlay.create({\n positionStrategy,\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.close(),\n });\n prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);\n\n const cmpRef = this.ref.attach(new ComponentPortal(TooltipPanelComponent));\n const text = this.tipText();\n cmpRef.setInput('text', text);\n cmpRef.setInput('placement', placement);\n cmpRef.setInput('panelId', this.tipId);\n if (this.disclosesOwnText(text)) {\n return;\n }\n const described = this.focusedTarget ?? this.host.nativeElement;\n this.describedElement = described;\n const existing = described.getAttribute('aria-describedby');\n described.setAttribute(\n 'aria-describedby',\n existing ? `${existing} ${this.tipId}` : this.tipId,\n );\n }\n\n private positionFor(placement: TooltipPlacement) {\n switch (placement) {\n case 'top':\n return {\n originX: 'center' as const,\n originY: 'top' as const,\n overlayX: 'center' as const,\n overlayY: 'bottom' as const,\n offsetY: -TRIGGER_GAP_PX,\n };\n case 'bottom':\n return {\n originX: 'center' as const,\n originY: 'bottom' as const,\n overlayX: 'center' as const,\n overlayY: 'top' as const,\n offsetY: TRIGGER_GAP_PX,\n };\n case 'left':\n return {\n originX: 'start' as const,\n originY: 'center' as const,\n overlayX: 'end' as const,\n overlayY: 'center' as const,\n offsetX: -TRIGGER_GAP_PX,\n };\n case 'right':\n return {\n originX: 'end' as const,\n originY: 'center' as const,\n overlayX: 'start' as const,\n overlayY: 'center' as const,\n offsetX: TRIGGER_GAP_PX,\n };\n }\n }\n\n ngOnDestroy(): void {\n this.detachAncestor?.();\n this.onClose();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAkBa,qBAAqB,CAAA;;AAEvB,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,0EAAU;;AAE/B,IAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,+EAAoB;;AAE9C,IAAA,OAAO,GAAG,KAAK,CAAS,EAAE,8EAAC;wGANzB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,Q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YAAY;uBAAC,gBAAgB;;;ACvShC;;AAEG;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, input, numberAttribute, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, booleanAttribute, output } from '@angular/core';
|
|
3
|
-
import { CHART_SCALES,
|
|
2
|
+
import { inject, input, numberAttribute, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, booleanAttribute, viewChild, output } from '@angular/core';
|
|
3
|
+
import { CHART_SCALES, ColumnSeriesComponent, ChartComponent } from '@ids-group-ltd/ids-design-system/components/chart';
|
|
4
4
|
import { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';
|
|
5
5
|
import { DS_INTL } from '@ids-group-ltd/ids-design-system/core';
|
|
6
|
+
import { staggerDelay, chartRenderGate, resolveChartDefaults, CHART_RENDER_GATE_PASSED } from '@ids-group-ltd/ids-design-system/components';
|
|
6
7
|
import { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';
|
|
7
|
-
import { chartRenderGate, resolveChartDefaults, CHART_RENDER_GATE_PASSED } from '@ids-group-ltd/ids-design-system/components';
|
|
8
8
|
|
|
9
9
|
/** Where each bar spans, walking the running sum from zero.
|
|
10
10
|
*
|
|
@@ -55,6 +55,8 @@ class WaterfallMarksComponent {
|
|
|
55
55
|
valueFormat = input((value) => String(value), ...(ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []));
|
|
56
56
|
/** The share of a category's band the bars take, so the connector starts where the bar ends. */
|
|
57
57
|
columnWidthRatio = input(0.8, { ...(ngDevMode ? { debugName: "columnWidthRatio" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
58
|
+
/** The bars' own `staggerMs`, so each label and rule waits for the bar it belongs to. */
|
|
59
|
+
staggerMs = input(40, { ...(ngDevMode ? { debugName: "staggerMs" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
58
60
|
markWidth = computed(() => this.scales.bandWidth() * this.columnWidthRatio(), ...(ngDevMode ? [{ debugName: "markWidth" }] : /* istanbul ignore next */ []));
|
|
59
61
|
/** One rule per gap between two bars, drawn at the level they share - the level the left bar
|
|
60
62
|
* ended on. Without it the bars read as five separate columns instead of one chain. */
|
|
@@ -68,6 +70,7 @@ class WaterfallMarksComponent {
|
|
|
68
70
|
x1: toX(index) + half,
|
|
69
71
|
x2: toX(index + 1) - half,
|
|
70
72
|
y: toY(step.to),
|
|
73
|
+
stagger: this.barStagger(index + 1),
|
|
71
74
|
}));
|
|
72
75
|
}, ...(ngDevMode ? [{ debugName: "connectors" }] : /* istanbul ignore next */ []));
|
|
73
76
|
labels = computed(() => {
|
|
@@ -84,16 +87,20 @@ class WaterfallMarksComponent {
|
|
|
84
87
|
x: toX(index),
|
|
85
88
|
y: tip - VALUE_LABEL_GAP,
|
|
86
89
|
text: `${sign}${format(reading, 'tooltip')}`,
|
|
90
|
+
stagger: this.barStagger(index),
|
|
87
91
|
};
|
|
88
92
|
});
|
|
89
93
|
}, ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
94
|
+
barStagger(index) {
|
|
95
|
+
return `${staggerDelay(index, this.steps().length, this.staggerMs())}ms`;
|
|
96
|
+
}
|
|
90
97
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: WaterfallMarksComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
91
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: WaterfallMarksComponent, isStandalone: true, selector: "g[dsWaterfallMarks]", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, labelValues: { classPropertyName: "labelValues", publicName: "labelValues", 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 }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null }, columnWidthRatio: { classPropertyName: "columnWidthRatio", publicName: "columnWidthRatio", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<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 }\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 {{ label.text }}\n </svg:text>\n }\n }\n</svg:g>\n", styles: [".connector{stroke:var(--_waterfall-chart-connector-color);stroke-width:1;stroke-dasharray:3 3}.value{fill:currentcolor;font-size:var(--font-size-xs);font-weight:700;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
98
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: WaterfallMarksComponent, isStandalone: true, selector: "g[dsWaterfallMarks]", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, labelValues: { classPropertyName: "labelValues", publicName: "labelValues", 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 }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null }, columnWidthRatio: { classPropertyName: "columnWidthRatio", publicName: "columnWidthRatio", isSignal: true, isRequired: false, transformFunction: null }, staggerMs: { classPropertyName: "staggerMs", publicName: "staggerMs", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<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", styles: ["@keyframes ds-chart-mark-grow-y{0%{transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-rise{0%{opacity:0;transform:translateY(var(--_chart-rise-distance, 4px))}}@keyframes ds-chart-mark-settle{0%{opacity:0;transform:scale(.96)}}@keyframes ds-chart-ring-sweep{0%{opacity:0;transform:rotate(-30deg) scale(.96)}}@keyframes ds-chart-line-draw{0%{stroke-dashoffset:1}}@keyframes ds-chart-mark-exit{to{opacity:0}}.connector{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--ds-motion-chart-mark-grow-duration) + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.connector{animation-delay:0ms}}.connector.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.value{animation:ds-chart-mark-rise var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--ds-motion-chart-mark-grow-duration) + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.value{animation-delay:0ms}}.connector{stroke:var(--_waterfall-chart-connector-color);stroke-width:1;stroke-dasharray:3 3}.value{fill:currentcolor;font-size:var(--font-size-xs);font-weight:700;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
92
99
|
}
|
|
93
100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: WaterfallMarksComponent, decorators: [{
|
|
94
101
|
type: Component,
|
|
95
|
-
args: [{ selector: 'g[dsWaterfallMarks]', standalone: true, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<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 }\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 {{ label.text }}\n </svg:text>\n }\n }\n</svg:g>\n", styles: [".connector{stroke:var(--_waterfall-chart-connector-color);stroke-width:1;stroke-dasharray:3 3}.value{fill:currentcolor;font-size:var(--font-size-xs);font-weight:700;pointer-events:none}\n"] }]
|
|
96
|
-
}], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: false }] }], labelValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelValues", required: false }] }], showValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValues", required: false }] }], showConnectors: [{ type: i0.Input, args: [{ isSignal: true, alias: "showConnectors", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], columnWidthRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnWidthRatio", required: false }] }] } });
|
|
102
|
+
args: [{ selector: 'g[dsWaterfallMarks]', standalone: true, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<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", styles: ["@keyframes ds-chart-mark-grow-y{0%{transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-rise{0%{opacity:0;transform:translateY(var(--_chart-rise-distance, 4px))}}@keyframes ds-chart-mark-settle{0%{opacity:0;transform:scale(.96)}}@keyframes ds-chart-ring-sweep{0%{opacity:0;transform:rotate(-30deg) scale(.96)}}@keyframes ds-chart-line-draw{0%{stroke-dashoffset:1}}@keyframes ds-chart-mark-exit{to{opacity:0}}.connector{animation:ds-chart-mark-fade-in var(--ds-motion-chart-mark-enter-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--ds-motion-chart-mark-grow-duration) + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.connector{animation-delay:0ms}}.connector.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.value{animation:ds-chart-mark-rise var(--ds-motion-chart-mark-detail-duration) var(--ds-motion-chart-mark-enter-easing) calc(var(--ds-motion-chart-mark-exit-duration) + var(--ds-motion-chart-mark-grow-duration) + var(--_chart-mark-stagger, 0ms)) backwards}@media(prefers-reduced-motion:reduce){.value{animation-delay:0ms}}.connector{stroke:var(--_waterfall-chart-connector-color);stroke-width:1;stroke-dasharray:3 3}.value{fill:currentcolor;font-size:var(--font-size-xs);font-weight:700;pointer-events:none}\n"] }]
|
|
103
|
+
}], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: false }] }], labelValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelValues", required: false }] }], showValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "showValues", required: false }] }], showConnectors: [{ type: i0.Input, args: [{ isSignal: true, alias: "showConnectors", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], columnWidthRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnWidthRatio", required: false }] }], staggerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerMs", required: false }] }] } });
|
|
97
104
|
|
|
98
105
|
/** What each direction is painted with. A total is the neutral series colour because it is not a
|
|
99
106
|
* change at all, and reading it as one is the mistake the three-colour scheme exists to prevent. */
|
|
@@ -150,6 +157,15 @@ class WaterfallChartComponent {
|
|
|
150
157
|
/** Formats every value the chart prints - the axis ticks, the bar labels and the annex table.
|
|
151
158
|
* The sign a delta carries is added around it, so a formatter never has to know about one. */
|
|
152
159
|
valueFormat = input(null, ...(ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []));
|
|
160
|
+
/** Holds the clicked step and its tooltip in place, with a pin disc on it, until a second click,
|
|
161
|
+
* Escape or a press outside releases it. Unset falls back to `DS_CONFIG.chart.pinOnClick`, then
|
|
162
|
+
* `true`. `barClicked` fires either way - pinning is a state, not a handler. */
|
|
163
|
+
pinOnClick = input(null, { ...(ngDevMode ? { debugName: "pinOnClick" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
164
|
+
/** Milliseconds between one step's entrance and the next; a long waterfall narrows the step to
|
|
165
|
+
* arrive within 260ms. `0` is no stagger. */
|
|
166
|
+
staggerMs = input(40, { ...(ngDevMode ? { debugName: "staggerMs" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
167
|
+
series = viewChild(ColumnSeriesComponent, ...(ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []));
|
|
168
|
+
pinned = computed(() => this.series()?.activeMark.pinned() ?? false, ...(ngDevMode ? [{ debugName: "pinned" }] : /* istanbul ignore next */ []));
|
|
153
169
|
/** The clicked datum, as it was given. Fires on click and on Enter or Space. */
|
|
154
170
|
barClicked = output();
|
|
155
171
|
defaults = resolveChartDefaults(this);
|
|
@@ -228,7 +244,7 @@ class WaterfallChartComponent {
|
|
|
228
244
|
}
|
|
229
245
|
}
|
|
230
246
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: WaterfallChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
231
|
-
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 } }, outputs: { barClicked: "barClicked" }, host: { properties: { "class.framed": "frameResolved() === 'auto'" } }, exportAs: ["dsWaterfallChart"], ngImport: i0, template: "<figure class=\"waterfall-chart\">\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 height=\"var(--_waterfall-chart-skeleton-height)\" [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 [valueFormat]=\"valueFormatResolved()\" />\n\n <svg:g\n dsColumnSeries\n showValues=\"false\"\n [data]=\"points()\"\n [offsets]=\"offsets()\"\n [interactive]=\"interactive()\"\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)}.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"] }, { 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 });
|
|
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 });
|
|
232
248
|
}
|
|
233
249
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: WaterfallChartComponent, decorators: [{
|
|
234
250
|
type: Component,
|
|
@@ -240,8 +256,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
240
256
|
ChartDataTableComponent,
|
|
241
257
|
], host: {
|
|
242
258
|
'[class.framed]': "frameResolved() === 'auto'",
|
|
243
|
-
}, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: CHART_RENDER_GATE_PASSED, useValue: true }], template: "<figure class=\"waterfall-chart\">\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
|
|
244
|
-
}], 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 }] }], barClicked: [{ type: i0.Output, args: ["barClicked"] }] } });
|
|
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"] }] } });
|
|
245
261
|
|
|
246
262
|
/**
|
|
247
263
|
* Generated bundle index. Do not edit.
|