@ids-group-ltd/ids-design-system 0.14.1 → 0.14.2
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 +243 -0
- package/components.md +29 -26
- 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-textarea.md +1 -1
- package/docs/agent/navigation/ds-pagination.md +1 -1
- package/docs/agent/navigation/ds-tabs.md +1 -0
- package/docs/agent/overlays/ds-tooltip.md +3 -3
- 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-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-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-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-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 +4 -2
- 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 +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.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 +61 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +78 -6
- 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 +85 -9
- 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/package.json +1 -1
- package/schematics/check-overrides/surface.json +31 -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/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +24 -10
- 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-column-chart.d.ts +8 -9
- package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +1 -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 +22 -4
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +10 -1
- 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 +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,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,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,oBAAA,EAAA,EAAA,iBAAA,EAAA,sBAAA,EAAA,UAAA,EAAA,sBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,cAAA,EAAA,YAAA,EAAA,WAAA,EAAA,OAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;sBA0DE,YAAY;uBAAC,YAAY;;sBAKzB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;sBAQlC,YAAY;uBAAC,UAAU;;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^=\"-\"])`;\n\nconst clippedHostsByAncestor = new WeakMap<HTMLElement, Set<HTMLElement>>();\n\nfunction firstClippedHost(hosts: Set<HTMLElement>): HTMLElement | undefined {\n return [...hosts]\n .sort((a, b) =>\n a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1,\n )\n .find(isTextClipped);\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\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 /** 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.host.nativeElement.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) {\n return;\n }\n let hosts = clippedHostsByAncestor.get(ancestor);\n if (!hosts) {\n hosts = new Set();\n clippedHostsByAncestor.set(ancestor, hosts);\n }\n hosts.add(host);\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(hosts) !== host\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 hosts.delete(host);\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 @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 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,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAA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AAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,oBAAA,EAAA,EAAA,iBAAA,EAAA,sBAAA,EAAA,UAAA,EAAA,sBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,cAAA,EAAA,YAAA,EAAA,WAAA,EAAA,OAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;sBA6HE,YAAY;uBAAC,YAAY;;sBAKzB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;sBAQlC,YAAY;uBAAC,UAAU;;sBAyBvB,YAAY;uBAAC,YAAY;;sBACzB,YAAY;uBAAC,OAAO;;sBA4BpB,YAAY;uBAAC,gBAAgB;;;ACtOhC;;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.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-waterfall-chart.mjs","sources":["../../../src/lib/components/waterfall-chart/waterfall-chart.math.ts","../../../src/lib/components/waterfall-chart/waterfall-marks.component.ts","../../../src/lib/components/waterfall-chart/waterfall-marks.component.html","../../../src/lib/components/waterfall-chart/waterfall-chart.component.ts","../../../src/lib/components/waterfall-chart/waterfall-chart.component.html","../../../src/lib/components/waterfall-chart/ids-group-ltd-ids-design-system-components-waterfall-chart.ts"],"sourcesContent":["import type {\n WaterfallChartBar,\n WaterfallChartStep,\n} from './waterfall-chart.types';\n\n/** Where each bar spans, walking the running sum from zero.\n *\n * Every row adds its own value to the sum, including a total - a closing total carries `0` and so\n * prints the sum reached. A delta then spans from the sum before it to the sum after; a total or a\n * subtotal stands on zero and reaches the sum, which is what makes it a figure rather than a\n * change. A non-finite reading adds nothing rather than poisoning every bar after it.\n *\n * @internal */\nexport function waterfallSteps(\n data: readonly WaterfallChartBar[],\n): readonly WaterfallChartStep[] {\n let running = 0;\n\n return data.map((datum) => {\n const from = running;\n const value = Number.isFinite(datum.value) ? datum.value : 0;\n running += value;\n const standsOnZero = datum.kind === 'total' || datum.kind === 'subtotal';\n\n return {\n label: datum.label,\n from: standsOnZero ? 0 : from,\n to: running,\n direction: standsOnZero ? 'total' : value < 0 ? 'decrease' : 'increase',\n };\n });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\nimport { CHART_SCALES } from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ChartValueFormat } from '@ids-group-ltd/ids-design-system/core';\nimport type { WaterfallChartStep } from './waterfall-chart.types';\n\n/** Distance from a bar's own tip to its value label's baseline. */\nconst VALUE_LABEL_GAP = 8;\n\n/**\n * The two things a waterfall needs that a column series cannot carry: the dashed rule chaining one\n * bar to the next, and a value label that prints its own sign.\n *\n * The label lives here rather than on the column series because the sign is not a property of the\n * number - a delta of `130` reads `+130` and a total of `800` reads `800` - and a series-wide\n * formatter sees only the value, never which of the two it is holding.\n *\n * Hosted on a `<g>` rather than an element of its own: an element the SVG specification does not\n * know is not rendered, and neither are its descendants. Written as `<svg:g dsWaterfallMarks>`.\n *\n * @internal\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsWaterfallMarks]',\n standalone: true,\n templateUrl: './waterfall-marks.component.html',\n styleUrl: './waterfall-marks.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WaterfallMarksComponent {\n private readonly scales = inject(CHART_SCALES);\n\n readonly steps = input<readonly WaterfallChartStep[]>([]);\n\n /** The reading each label prints: a delta's own change, a total's running sum. */\n readonly labelValues = input<readonly number[]>([]);\n\n readonly showValues = input(true);\n\n readonly showConnectors = input(true);\n\n readonly valueFormat = input<ChartValueFormat>((value) => String(value));\n\n /** The share of a category's band the bars take, so the connector starts where the bar ends. */\n readonly columnWidthRatio = input(0.8, { transform: numberAttribute });\n\n protected readonly markWidth = computed(\n () => this.scales.bandWidth() * this.columnWidthRatio(),\n );\n\n /** One rule per gap between two bars, drawn at the level they share - the level the left bar\n * ended on. Without it the bars read as five separate columns instead of one chain. */\n protected readonly connectors = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const steps = this.steps();\n const half = this.markWidth() / 2;\n\n return steps.slice(0, -1).map((step, index) => ({\n key: `${index}-${step.label}`,\n x1: toX(index) + half,\n x2: toX(index + 1) - half,\n y: toY(step.to),\n }));\n });\n\n protected readonly labels = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const format = this.valueFormat();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => {\n const reading = values[index] ?? step.to - step.from;\n const tip = Math.min(toY(step.from), toY(step.to));\n const sign = step.direction === 'increase' && reading > 0 ? '+' : '';\n\n return {\n key: `${index}-${step.label}`,\n x: toX(index),\n y: tip - VALUE_LABEL_GAP,\n text: `${sign}${format(reading, 'tooltip')}`,\n };\n });\n });\n}\n","<svg:g\n class=\"waterfall-marks\"\n aria-hidden=\"true\">\n @if (showConnectors()) {\n @for (connector of connectors(); track connector.key) {\n <svg:line\n class=\"connector\"\n [attr.x1]=\"connector.x1\"\n [attr.x2]=\"connector.x2\"\n [attr.y1]=\"connector.y\"\n [attr.y2]=\"connector.y\" />\n }\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","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n numberAttribute,\n output,\n} from '@angular/core';\nimport {\n ChartComponent,\n ColumnSeriesComponent,\n} from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ColumnSeriesPoint } from '@ids-group-ltd/ids-design-system/components/chart';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { waterfallSteps } from './waterfall-chart.math';\nimport { WaterfallMarksComponent } from './waterfall-marks.component';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport {\n resolveChartDefaults,\n chartRenderGate,\n CHART_RENDER_GATE_PASSED,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n WaterfallChartBar,\n WaterfallChartStep,\n} from './waterfall-chart.types';\n\n/** What each direction is painted with. A total is the neutral series colour because it is not a\n * change at all, and reading it as one is the mistake the three-colour scheme exists to prevent. */\nconst DIRECTION_COLORS: Record<WaterfallChartStep['direction'], string> = {\n increase: 'var(--ds-chart-positive-color)',\n decrease: 'var(--ds-chart-negative-color)',\n total: 'var(--ds-chart-series-default-color)',\n};\n\n/**\n * A running total, bar by bar: what a figure started at, what moved it, and what it ended at.\n *\n * The one chart in the family that cannot be a mode on another, because it needs three things at\n * once - an accumulating level, bars pinned to zero for the totals, and its own three-colour\n * semantic. Colour never carries that semantic alone: every bar's label prints its own sign and\n * every bar's accessible name says \"increase\" or \"decrease\" in words.\n */\n@Component({\n selector: 'ds-waterfall-chart',\n standalone: true,\n exportAs: 'dsWaterfallChart',\n imports: [\n ChartComponent,\n ColumnSeriesComponent,\n SkeletonComponent,\n WaterfallMarksComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './waterfall-chart.component.html',\n styleUrl: './waterfall-chart.component.scss',\n host: {\n '[class.framed]': \"frameResolved() === 'auto'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [{ provide: CHART_RENDER_GATE_PASSED, useValue: true }],\n})\nexport class WaterfallChartComponent {\n protected readonly renderReady = chartRenderGate();\n\n /** The bars in the order they are read, which is the order they happened in - a waterfall is\n * never sorted, because the sequence is the meaning. */\n readonly data = input<readonly WaterfallChartBar[]>([]);\n\n /** Prints each bar's own reading above it, with its sign. */\n readonly showValues = input(true, { transform: booleanAttribute });\n\n /** The dashed rule chaining one bar to the next at the level they share. Without it the bars\n * read as separate columns rather than as one running total. */\n readonly showConnectors = input(true, { transform: booleanAttribute });\n\n /** Printed above the plot as the visible title, and reused as the annex table's caption. */\n readonly caption = input<string | null>(null);\n\n /** The accessible name. Generated from the steps when omitted, naming each one's direction in\n * words and the figure the chain ends at. */\n readonly summary = input<string | null>(null);\n\n /** A hint, not a count. Ticks snap to a round step. */\n readonly tickCount = input(5, { transform: numberAttribute });\n\n /** Turns on the click affordance and the keyboard route. `barClicked` fires whether or not\n * this is set. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** `'auto'` draws the bordered, padded box; `'none'` leaves it bare for a chart inside a card\n * the page has already drawn. Unset falls back to `DS_CONFIG.chart.frame`. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** The annex table under the plot. Unset falls back to `DS_CONFIG.chart.dataTable`, then\n * `'none'`. It prints each step's direction, its own reading and the running total. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Skeleton bars at the real count, so the page does not resize when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n\n /** Separate from an empty `data`: \"the request failed\" and \"there is nothing to show\" read the\n * same and mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_INTL.chart.empty`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shown in place of the plot while `error` is set. Unset falls back to\n * `DS_INTL.chart.error`. */\n readonly errorText = input<string | null>(null);\n\n /** Formats every value the chart prints - the axis ticks, the bar labels and the annex table.\n * The sign a delta carries is added around it, so a formatter never has to know about one. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n /** The clicked datum, as it was given. Fires on click and on Enter or Space. */\n readonly barClicked = output<WaterfallChartBar>();\n\n private readonly defaults = resolveChartDefaults(this);\n protected readonly intl = inject(DS_INTL);\n readonly frameResolved = this.defaults.frame;\n readonly dataTableResolved = this.defaults.dataTable;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n protected readonly steps = computed(() => waterfallSteps(this.data()));\n\n protected readonly categories = computed(() =>\n this.steps().map((step) => step.label),\n );\n\n protected readonly offsets = computed(() =>\n this.steps().map((step) => ({ from: step.from, to: step.to })),\n );\n\n /** What each bar's label prints: a delta's own change, a total's running sum. The two are\n * different readings and only one of them takes a sign. */\n protected readonly labelValues = computed(() =>\n this.steps().map((step, index) =>\n step.direction === 'total' ? step.to : (this.data()[index]?.value ?? 0),\n ),\n );\n\n protected readonly points = computed<readonly ColumnSeriesPoint[]>(() => {\n const format = this.valueFormatResolved();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => {\n const datum = this.data()[index];\n const reading = values[index];\n const sign = step.direction === 'increase' && reading > 0 ? '+' : '';\n\n return {\n id: datum?.id ?? String(index),\n // The word is what carries the meaning where colour cannot - forced colours, a monochrome\n // print, a reader who cannot tell the two hues apart, and every screen reader.\n label: `${step.label}, ${this.intl().chart[step.direction]} ${sign}${format(reading, 'tooltip')}`,\n value: reading,\n color: DIRECTION_COLORS[step.direction],\n };\n });\n });\n\n protected readonly accessibleName = computed(() => {\n const given = this.summary();\n if (given) {\n return given;\n }\n const words = this.intl().chart;\n const steps = this.steps();\n if (steps.length === 0) {\n return this.caption() ?? words.waterfallTitle;\n }\n const format = this.valueFormatResolved();\n const last = steps[steps.length - 1];\n const spoken = steps\n .map(\n (step, index) =>\n `${step.label} ${words[step.direction]} ${format(this.labelValues()[index], 'tooltip')}`,\n )\n .join(', ');\n\n return `${this.caption() ?? words.waterfallCaption}: ${spoken}. ${words.endsAt(format(last.to, 'tooltip'))}`;\n });\n\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.tableRows().map((row) => ({\n key: row.key,\n cells: [\n row.label,\n row.direction,\n row.formattedValue,\n row.formattedRunningTotal,\n ],\n })),\n );\n\n protected readonly tableRows = computed(() => {\n const format = this.valueFormatResolved();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => ({\n key: `${index}-${step.label}`,\n label: step.label,\n direction: this.intl().chart[step.direction],\n formattedValue: format(values[index], 'tooltip'),\n formattedRunningTotal: format(step.to, 'tooltip'),\n }));\n });\n\n protected readonly skeletonBars = computed(() =>\n Array.from({ length: Math.max(this.data().length, 5) }),\n );\n\n protected onPointClicked(point: ColumnSeriesPoint): void {\n const datum = this.data().find(\n (entry, index) => (entry.id ?? String(index)) === point.id,\n );\n if (datum) {\n this.barClicked.emit(datum);\n }\n }\n}\n","<figure class=\"waterfall-chart\">\n @if (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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKA;;;;;;;AAOgB;AACV,SAAU,cAAc,CAC5B,IAAkC,EAAA;IAElC,IAAI,OAAO,GAAG,CAAC;AAEf,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,KAAI;Q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AA,EACc,iBAAiB,CAAC,QAAQ,mBACxB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAA,QAAA,EAAA,qzDAAA,EAAA,MAAA,EAAA,CAAA,++GAAA,CAAA,EAAA;;;AEvExE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-waterfall-chart.mjs","sources":["../../../src/lib/components/waterfall-chart/waterfall-chart.math.ts","../../../src/lib/components/waterfall-chart/waterfall-marks.component.ts","../../../src/lib/components/waterfall-chart/waterfall-marks.component.html","../../../src/lib/components/waterfall-chart/waterfall-chart.component.ts","../../../src/lib/components/waterfall-chart/waterfall-chart.component.html","../../../src/lib/components/waterfall-chart/ids-group-ltd-ids-design-system-components-waterfall-chart.ts"],"sourcesContent":["import type {\n WaterfallChartBar,\n WaterfallChartStep,\n} from './waterfall-chart.types';\n\n/** Where each bar spans, walking the running sum from zero.\n *\n * Every row adds its own value to the sum, including a total - a closing total carries `0` and so\n * prints the sum reached. A delta then spans from the sum before it to the sum after; a total or a\n * subtotal stands on zero and reaches the sum, which is what makes it a figure rather than a\n * change. A non-finite reading adds nothing rather than poisoning every bar after it.\n *\n * @internal */\nexport function waterfallSteps(\n data: readonly WaterfallChartBar[],\n): readonly WaterfallChartStep[] {\n let running = 0;\n\n return data.map((datum) => {\n const from = running;\n const value = Number.isFinite(datum.value) ? datum.value : 0;\n running += value;\n const standsOnZero = datum.kind === 'total' || datum.kind === 'subtotal';\n\n return {\n label: datum.label,\n from: standsOnZero ? 0 : from,\n to: running,\n direction: standsOnZero ? 'total' : value < 0 ? 'decrease' : 'increase',\n };\n });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\nimport { staggerDelay } from '@ids-group-ltd/ids-design-system/components';\nimport { CHART_SCALES } from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ChartValueFormat } from '@ids-group-ltd/ids-design-system/core';\nimport type { WaterfallChartStep } from './waterfall-chart.types';\n\n/** Distance from a bar's own tip to its value label's baseline. */\nconst VALUE_LABEL_GAP = 8;\n\n/**\n * The two things a waterfall needs that a column series cannot carry: the dashed rule chaining one\n * bar to the next, and a value label that prints its own sign.\n *\n * The label lives here rather than on the column series because the sign is not a property of the\n * number - a delta of `130` reads `+130` and a total of `800` reads `800` - and a series-wide\n * formatter sees only the value, never which of the two it is holding.\n *\n * Hosted on a `<g>` rather than an element of its own: an element the SVG specification does not\n * know is not rendered, and neither are its descendants. Written as `<svg:g dsWaterfallMarks>`.\n *\n * @internal\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsWaterfallMarks]',\n standalone: true,\n templateUrl: './waterfall-marks.component.html',\n styleUrl: './waterfall-marks.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WaterfallMarksComponent {\n private readonly scales = inject(CHART_SCALES);\n\n readonly steps = input<readonly WaterfallChartStep[]>([]);\n\n /** The reading each label prints: a delta's own change, a total's running sum. */\n readonly labelValues = input<readonly number[]>([]);\n\n readonly showValues = input(true);\n\n readonly showConnectors = input(true);\n\n readonly valueFormat = input<ChartValueFormat>((value) => String(value));\n\n /** The share of a category's band the bars take, so the connector starts where the bar ends. */\n readonly columnWidthRatio = input(0.8, { transform: numberAttribute });\n\n /** The bars' own `staggerMs`, so each label and rule waits for the bar it belongs to. */\n readonly staggerMs = input(40, { transform: numberAttribute });\n\n protected readonly markWidth = computed(\n () => this.scales.bandWidth() * this.columnWidthRatio(),\n );\n\n /** One rule per gap between two bars, drawn at the level they share - the level the left bar\n * ended on. Without it the bars read as five separate columns instead of one chain. */\n protected readonly connectors = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const steps = this.steps();\n const half = this.markWidth() / 2;\n\n return steps.slice(0, -1).map((step, index) => ({\n key: `${index}-${step.label}`,\n x1: toX(index) + half,\n x2: toX(index + 1) - half,\n y: toY(step.to),\n stagger: this.barStagger(index + 1),\n }));\n });\n\n protected readonly labels = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const format = this.valueFormat();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => {\n const reading = values[index] ?? step.to - step.from;\n const tip = Math.min(toY(step.from), toY(step.to));\n const sign = step.direction === 'increase' && reading > 0 ? '+' : '';\n\n return {\n key: `${index}-${step.label}`,\n x: toX(index),\n y: tip - VALUE_LABEL_GAP,\n text: `${sign}${format(reading, 'tooltip')}`,\n stagger: this.barStagger(index),\n };\n });\n });\n\n private barStagger(index: number): string {\n return `${staggerDelay(index, this.steps().length, this.staggerMs())}ms`;\n }\n}\n","<svg:g\n class=\"waterfall-marks\"\n aria-hidden=\"true\">\n @if (showConnectors()) {\n @for (connector of connectors(); track connector.key) {\n <svg:line\n class=\"connector\"\n [attr.x1]=\"connector.x1\"\n [attr.x2]=\"connector.x2\"\n [attr.y1]=\"connector.y\"\n [attr.y2]=\"connector.y\"\n [style.--_chart-mark-stagger]=\"connector.stagger\" />\n }\n }\n\n @if (showValues()) {\n @for (label of labels(); track label.key) {\n <svg:text\n class=\"value\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"label.y\"\n [style.--_chart-mark-stagger]=\"label.stagger\">\n {{ label.text }}\n </svg:text>\n }\n }\n</svg:g>\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n numberAttribute,\n output,\n viewChild,\n} from '@angular/core';\nimport {\n ChartComponent,\n ColumnSeriesComponent,\n} from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ColumnSeriesPoint } from '@ids-group-ltd/ids-design-system/components/chart';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { waterfallSteps } from './waterfall-chart.math';\nimport { WaterfallMarksComponent } from './waterfall-marks.component';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport {\n resolveChartDefaults,\n chartRenderGate,\n CHART_RENDER_GATE_PASSED,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n WaterfallChartBar,\n WaterfallChartStep,\n} from './waterfall-chart.types';\n\n/** What each direction is painted with. A total is the neutral series colour because it is not a\n * change at all, and reading it as one is the mistake the three-colour scheme exists to prevent. */\nconst DIRECTION_COLORS: Record<WaterfallChartStep['direction'], string> = {\n increase: 'var(--ds-chart-positive-color)',\n decrease: 'var(--ds-chart-negative-color)',\n total: 'var(--ds-chart-series-default-color)',\n};\n\n/**\n * A running total, bar by bar: what a figure started at, what moved it, and what it ended at.\n *\n * The one chart in the family that cannot be a mode on another, because it needs three things at\n * once - an accumulating level, bars pinned to zero for the totals, and its own three-colour\n * semantic. Colour never carries that semantic alone: every bar's label prints its own sign and\n * every bar's accessible name says \"increase\" or \"decrease\" in words.\n */\n@Component({\n selector: 'ds-waterfall-chart',\n standalone: true,\n exportAs: 'dsWaterfallChart',\n imports: [\n ChartComponent,\n ColumnSeriesComponent,\n SkeletonComponent,\n WaterfallMarksComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './waterfall-chart.component.html',\n styleUrl: './waterfall-chart.component.scss',\n host: {\n '[class.framed]': \"frameResolved() === 'auto'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n viewProviders: [{ provide: CHART_RENDER_GATE_PASSED, useValue: true }],\n})\nexport class WaterfallChartComponent {\n protected readonly renderReady = chartRenderGate();\n\n /** The bars in the order they are read, which is the order they happened in - a waterfall is\n * never sorted, because the sequence is the meaning. */\n readonly data = input<readonly WaterfallChartBar[]>([]);\n\n /** Prints each bar's own reading above it, with its sign. */\n readonly showValues = input(true, { transform: booleanAttribute });\n\n /** The dashed rule chaining one bar to the next at the level they share. Without it the bars\n * read as separate columns rather than as one running total. */\n readonly showConnectors = input(true, { transform: booleanAttribute });\n\n /** Printed above the plot as the visible title, and reused as the annex table's caption. */\n readonly caption = input<string | null>(null);\n\n /** The accessible name. Generated from the steps when omitted, naming each one's direction in\n * words and the figure the chain ends at. */\n readonly summary = input<string | null>(null);\n\n /** A hint, not a count. Ticks snap to a round step. */\n readonly tickCount = input(5, { transform: numberAttribute });\n\n /** Turns on the click affordance and the keyboard route. `barClicked` fires whether or not\n * this is set. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** `'auto'` draws the bordered, padded box; `'none'` leaves it bare for a chart inside a card\n * the page has already drawn. Unset falls back to `DS_CONFIG.chart.frame`. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** The annex table under the plot. Unset falls back to `DS_CONFIG.chart.dataTable`, then\n * `'none'`. It prints each step's direction, its own reading and the running total. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Skeleton bars at the real count, so the page does not resize when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n\n /** Separate from an empty `data`: \"the request failed\" and \"there is nothing to show\" read the\n * same and mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_INTL.chart.empty`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shown in place of the plot while `error` is set. Unset falls back to\n * `DS_INTL.chart.error`. */\n readonly errorText = input<string | null>(null);\n\n /** Formats every value the chart prints - the axis ticks, the bar labels and the annex table.\n * The sign a delta carries is added around it, so a formatter never has to know about one. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n /** Holds the clicked step and its tooltip in place, with a pin disc on it, until a second click,\n * Escape or a press outside releases it. Unset falls back to `DS_CONFIG.chart.pinOnClick`, then\n * `true`. `barClicked` fires either way - pinning is a state, not a handler. */\n readonly pinOnClick = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n /** Milliseconds between one step's entrance and the next; a long waterfall narrows the step to\n * arrive within 260ms. `0` is no stagger. */\n readonly staggerMs = input(40, { transform: numberAttribute });\n\n protected readonly series = viewChild(ColumnSeriesComponent);\n\n protected readonly pinned = computed(\n () => this.series()?.activeMark.pinned() ?? false,\n );\n\n /** The clicked datum, as it was given. Fires on click and on Enter or Space. */\n readonly barClicked = output<WaterfallChartBar>();\n\n private readonly defaults = resolveChartDefaults(this);\n protected readonly intl = inject(DS_INTL);\n readonly frameResolved = this.defaults.frame;\n readonly dataTableResolved = this.defaults.dataTable;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n protected readonly steps = computed(() => waterfallSteps(this.data()));\n\n protected readonly categories = computed(() =>\n this.steps().map((step) => step.label),\n );\n\n protected readonly offsets = computed(() =>\n this.steps().map((step) => ({ from: step.from, to: step.to })),\n );\n\n /** What each bar's label prints: a delta's own change, a total's running sum. The two are\n * different readings and only one of them takes a sign. */\n protected readonly labelValues = computed(() =>\n this.steps().map((step, index) =>\n step.direction === 'total' ? step.to : (this.data()[index]?.value ?? 0),\n ),\n );\n\n protected readonly points = computed<readonly ColumnSeriesPoint[]>(() => {\n const format = this.valueFormatResolved();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => {\n const datum = this.data()[index];\n const reading = values[index];\n const sign = step.direction === 'increase' && reading > 0 ? '+' : '';\n\n return {\n id: datum?.id ?? String(index),\n // The word is what carries the meaning where colour cannot - forced colours, a monochrome\n // print, a reader who cannot tell the two hues apart, and every screen reader.\n label: `${step.label}, ${this.intl().chart[step.direction]} ${sign}${format(reading, 'tooltip')}`,\n value: reading,\n color: DIRECTION_COLORS[step.direction],\n };\n });\n });\n\n protected readonly accessibleName = computed(() => {\n const given = this.summary();\n if (given) {\n return given;\n }\n const words = this.intl().chart;\n const steps = this.steps();\n if (steps.length === 0) {\n return this.caption() ?? words.waterfallTitle;\n }\n const format = this.valueFormatResolved();\n const last = steps[steps.length - 1];\n const spoken = steps\n .map(\n (step, index) =>\n `${step.label} ${words[step.direction]} ${format(this.labelValues()[index], 'tooltip')}`,\n )\n .join(', ');\n\n return `${this.caption() ?? words.waterfallCaption}: ${spoken}. ${words.endsAt(format(last.to, 'tooltip'))}`;\n });\n\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.tableRows().map((row) => ({\n key: row.key,\n cells: [\n row.label,\n row.direction,\n row.formattedValue,\n row.formattedRunningTotal,\n ],\n })),\n );\n\n protected readonly tableRows = computed(() => {\n const format = this.valueFormatResolved();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => ({\n key: `${index}-${step.label}`,\n label: step.label,\n direction: this.intl().chart[step.direction],\n formattedValue: format(values[index], 'tooltip'),\n formattedRunningTotal: format(step.to, 'tooltip'),\n }));\n });\n\n protected readonly skeletonBars = computed(() =>\n Array.from({ length: Math.max(this.data().length, 5) }),\n );\n\n protected onPointClicked(point: ColumnSeriesPoint): void {\n const datum = this.data().find(\n (entry, index) => (entry.id ?? String(index)) === point.id,\n );\n if (datum) {\n this.barClicked.emit(datum);\n }\n }\n}\n","<figure class=\"waterfall-chart\">\n @if (pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"series()?.activeMark?.release()\">\n {{ intl().chart.unpin }}\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading() || !renderReady()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonBars(); track $index) {\n <ds-skeleton\n height=\"var(--_waterfall-chart-skeleton-height)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"valueFormatResolved()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\">\n <svg:g\n dsWaterfallMarks\n [steps]=\"steps()\"\n [labelValues]=\"labelValues()\"\n [showValues]=\"showValues()\"\n [showConnectors]=\"showConnectors()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\" />\n\n <svg:g\n dsColumnSeries\n showValues=\"false\"\n [data]=\"points()\"\n [offsets]=\"offsets()\"\n [interactive]=\"interactive()\"\n [pinOnClick]=\"pinOnClick()\"\n [staggerMs]=\"staggerMs()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n </ds-chart>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"[\n intl().chart.stepColumn,\n intl().chart.directionColumn,\n intl().chart.valueColumn,\n intl().chart.runningTotalColumn,\n ]\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKA;;;;;;;AAOgB;AACV,SAAU,cAAc,CAC5B,IAAkC,EAAA;IAElC,IAAI,OAAO,GAAG,CAAC;AAEf,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,KAAI;QACxB,MAAM,IAAI,GAAG,OAAO;QACpB,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,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YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAAA,UAAA,EAClB,IAAI,EAAA,QAAA,EACN,kBAAkB,EAAA,OAAA,EACnB;wBACP,cAAc;wBACd,qBAAqB;wBACrB,iBAAiB;wBACjB,uBAAuB;wBACvB,uBAAuB;qBACxB,EAAA,IAAA,EAGK;AACJ,wBAAA,gBAAgB,EAAE,4BAA4B;AAC/C,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,QAAQ,mBACxB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAA,QAAA,EAAA,ynEAAA,EAAA,MAAA,EAAA,CAAA,0/IAAA,CAAA,EAAA;wmDAoEhC,qBAAqB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE5I7D;;AAEG;;;;"}
|
|
@@ -854,18 +854,19 @@ function roundStepAtLeast(minimumStep) {
|
|
|
854
854
|
return 10 * base;
|
|
855
855
|
}
|
|
856
856
|
|
|
857
|
-
// Past
|
|
858
|
-
//
|
|
859
|
-
const
|
|
860
|
-
/** Entrance delay for the mark at `index`, in milliseconds
|
|
861
|
-
*
|
|
857
|
+
// The whole spread of a series' arrival. Past it the entrance stops reading as one gesture and
|
|
858
|
+
// starts reading as a queue.
|
|
859
|
+
const STAGGER_BUDGET_MS = 260;
|
|
860
|
+
/** Entrance delay for the mark at `index` of `count`, in milliseconds: `stepMs` apart, narrowed so
|
|
861
|
+
* the last mark starts within the budget. Spread evenly rather than capped, so a long series still
|
|
862
|
+
* arrives in order instead of landing all at once past the cap. `stepMs` of `0` means no stagger.
|
|
862
863
|
*
|
|
863
864
|
* @internal */
|
|
864
|
-
function staggerDelay(index, stepMs) {
|
|
865
|
-
if (!(stepMs > 0) || !Number.isFinite(index) || index <= 0) {
|
|
865
|
+
function staggerDelay(index, count, stepMs) {
|
|
866
|
+
if (!(stepMs > 0) || !Number.isFinite(index) || index <= 0 || count <= 1) {
|
|
866
867
|
return 0;
|
|
867
868
|
}
|
|
868
|
-
return Math.min(
|
|
869
|
+
return index * Math.min(stepMs, STAGGER_BUDGET_MS / (count - 1));
|
|
869
870
|
}
|
|
870
871
|
/** Starts a mark's exit, bound as `(animate.leave)="leaveMark($event)"`: `_chart-motion.scss`
|
|
871
872
|
* animates `.mark-leave`, and Angular removes the mark on its `animationend`. The function form,
|
|
@@ -877,6 +878,73 @@ function leaveMark(event) {
|
|
|
877
878
|
event.target.classList.add('mark-leave');
|
|
878
879
|
}
|
|
879
880
|
|
|
881
|
+
// A chart stays warm from its first answer until the pointer leaves it, so a reader moving along
|
|
882
|
+
// the marks is answered at once rather than waiting at every mark. One set for the whole page:
|
|
883
|
+
// a legend and the plot beside it are one chart.
|
|
884
|
+
const warmCharts = new WeakSet();
|
|
885
|
+
function chartOf(event) {
|
|
886
|
+
const node = event.currentTarget ?? event.target;
|
|
887
|
+
return node instanceof Element ? node.closest('figure') : null;
|
|
888
|
+
}
|
|
889
|
+
function warmUp(chart) {
|
|
890
|
+
if (warmCharts.has(chart)) {
|
|
891
|
+
return;
|
|
892
|
+
}
|
|
893
|
+
warmCharts.add(chart);
|
|
894
|
+
const coolOnLeave = (event) => {
|
|
895
|
+
if (!(event.target instanceof Node) || !chart.contains(event.target)) {
|
|
896
|
+
warmCharts.delete(chart);
|
|
897
|
+
document.removeEventListener('pointerover', coolOnLeave, true);
|
|
898
|
+
}
|
|
899
|
+
};
|
|
900
|
+
document.addEventListener('pointerover', coolOnLeave, true);
|
|
901
|
+
}
|
|
902
|
+
/** Call from anywhere; the wait is cancelled by the caller's own `leave`. `delayMs` is read at each
|
|
903
|
+
* `schedule`, so a config that changes is picked up on the next rest.
|
|
904
|
+
*
|
|
905
|
+
* @internal */
|
|
906
|
+
function chartDwell(delayMs) {
|
|
907
|
+
let waiting = null;
|
|
908
|
+
const cancel = () => {
|
|
909
|
+
if (waiting) {
|
|
910
|
+
clearTimeout(waiting.timer);
|
|
911
|
+
waiting = null;
|
|
912
|
+
}
|
|
913
|
+
};
|
|
914
|
+
return {
|
|
915
|
+
schedule(target, answer, event) {
|
|
916
|
+
const pointer = typeof PointerEvent !== 'undefined' &&
|
|
917
|
+
event instanceof PointerEvent &&
|
|
918
|
+
event.pointerType !== 'touch';
|
|
919
|
+
const chart = chartOf(event);
|
|
920
|
+
const delay = Math.max(delayMs(), 0);
|
|
921
|
+
if (!pointer || delay === 0 || (chart && warmCharts.has(chart))) {
|
|
922
|
+
cancel();
|
|
923
|
+
answer();
|
|
924
|
+
if (pointer && chart) {
|
|
925
|
+
warmUp(chart);
|
|
926
|
+
}
|
|
927
|
+
return;
|
|
928
|
+
}
|
|
929
|
+
if (waiting && waiting.target === target) {
|
|
930
|
+
waiting.answer = answer;
|
|
931
|
+
return;
|
|
932
|
+
}
|
|
933
|
+
cancel();
|
|
934
|
+
const timer = setTimeout(() => {
|
|
935
|
+
const ready = waiting;
|
|
936
|
+
waiting = null;
|
|
937
|
+
ready?.answer();
|
|
938
|
+
if (chart) {
|
|
939
|
+
warmUp(chart);
|
|
940
|
+
}
|
|
941
|
+
}, delay);
|
|
942
|
+
waiting = { target, answer, timer };
|
|
943
|
+
},
|
|
944
|
+
cancel,
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
|
|
880
948
|
/** Where a roving tabindex lands after `key`, or `null` when the key does not traverse.
|
|
881
949
|
*
|
|
882
950
|
* The ends wrap, as they do in `ds-radio-group`: a chart's marks are a closed set, and Home and
|
|
@@ -2532,6 +2600,12 @@ function createTypeAhead() {
|
|
|
2532
2600
|
|
|
2533
2601
|
const NO_DATA_TABLE = signal(null, ...(ngDevMode ? [{ debugName: "NO_DATA_TABLE" }] : /* istanbul ignore next */ []));
|
|
2534
2602
|
const NO_LINGER = signal(null, ...(ngDevMode ? [{ debugName: "NO_LINGER" }] : /* istanbul ignore next */ []));
|
|
2603
|
+
const NO_PIN = signal(null, ...(ngDevMode ? [{ debugName: "NO_PIN" }] : /* istanbul ignore next */ []));
|
|
2604
|
+
const NO_DELAY = signal(null, ...(ngDevMode ? [{ debugName: "NO_DELAY" }] : /* istanbul ignore next */ []));
|
|
2605
|
+
/** How long a resting pointer waits before a chart answers it, when nothing sets it.
|
|
2606
|
+
*
|
|
2607
|
+
* @internal */
|
|
2608
|
+
const CHART_HOVER_DELAY_MS = 500;
|
|
2535
2609
|
/** Each resolved input → `DS_CONFIG.chart` → the built-in; copy resolves input → `DS_INTL.chart`.
|
|
2536
2610
|
* Call from an injection context.
|
|
2537
2611
|
*
|
|
@@ -2547,6 +2621,8 @@ function resolveChartDefaults(inputs) {
|
|
|
2547
2621
|
errorText: computed(() => inputs.errorText() ?? intl().chart.error),
|
|
2548
2622
|
valueFormat: resolveWithConfig(inputs.valueFormat, (config) => config.chart?.valueFormat, chartValueFormat(locale)),
|
|
2549
2623
|
tooltipLingerMs: resolveWithConfig(inputs.tooltipLingerMs ?? NO_LINGER, (config) => config.chart?.tooltipLingerMs, 0),
|
|
2624
|
+
pinOnClick: resolveWithConfig(inputs.pinOnClick ?? NO_PIN, (config) => config.chart?.pinOnClick, true),
|
|
2625
|
+
hoverDelayMs: resolveWithConfig(inputs.hoverDelayMs ?? NO_DELAY, (config) => config.chart?.hoverDelayMs, CHART_HOVER_DELAY_MS),
|
|
2550
2626
|
};
|
|
2551
2627
|
}
|
|
2552
2628
|
|
|
@@ -2554,5 +2630,5 @@ function resolveChartDefaults(inputs) {
|
|
|
2554
2630
|
* Generated bundle index. Do not edit.
|
|
2555
2631
|
*/
|
|
2556
2632
|
|
|
2557
|
-
export { CHART_HEAT_COLORS, CHART_RAMP_COLORS, CHART_RENDER_GATE_PASSED, CHART_SERIES_COLORS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chartRenderGate, chartValueFormat, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, formatWholePercent, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, linePath, lineSegments, linearScale, listenForMarkFocus, lttbDecimate, markAt, markOf, minMaxDecimate, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge };
|
|
2633
|
+
export { CHART_HEAT_COLORS, CHART_HOVER_DELAY_MS, CHART_RAMP_COLORS, CHART_RENDER_GATE_PASSED, CHART_SERIES_COLORS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chartDwell, chartRenderGate, chartValueFormat, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, formatWholePercent, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, linePath, lineSegments, linearScale, listenForMarkFocus, lttbDecimate, markAt, markOf, minMaxDecimate, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge };
|
|
2558
2634
|
//# sourceMappingURL=ids-group-ltd-ids-design-system-components.mjs.map
|