@ids-group-ltd/ids-design-system 0.13.1 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +626 -0
- package/components.md +17 -9
- package/docs/agent/INDEX.md +1 -1
- package/docs/agent/charts/ds-column-chart.md +3 -2
- package/docs/agent/charts/ds-line-chart.md +2 -1
- package/docs/agent/feedback/ds-bar.md +13 -0
- package/docs/agent/forms/ds-button.md +1 -1
- package/docs/agent/forms/ds-icon-button.md +1 -1
- package/docs/agent/surfaces/ds-card.md +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +81 -13
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +95 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +3 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +47 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +198 -50
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +973 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +172 -111
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +86 -15
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +87 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +193 -98
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +233 -33
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +2 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.13.2.json +269 -0
- package/migrations/0.13.3.json +211 -0
- package/package.json +17 -9
- package/styles/_chart-frame.scss +117 -10
- package/styles/_chart-interactive.scss +12 -3
- package/styles/_overlay-motion.scss +7 -6
- package/styles/_tokens-charts.scss +29 -5
- package/styles/_tokens.scss +1 -1
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +68 -5
- package/types/ids-group-ltd-ids-design-system-components-bar.d.ts +63 -0
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +3 -2
- package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +25 -2
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +21 -4
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +543 -0
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +125 -37
- package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +43 -4
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +52 -4
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +90 -23
- package/types/ids-group-ltd-ids-design-system-components.d.ts +91 -16
- package/types/ids-group-ltd-ids-design-system-core.d.ts +73 -6
- package/types/ids-group-ltd-ids-design-system.d.ts +7 -6
- package/docs/agent/feedback/ds-progress.md +0 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +0 -41
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +0 -1
- package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +0 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-chart-tooltip.mjs","sources":["../../../src/lib/components/chart-tooltip/chart-tooltip-panel.component.ts","../../../src/lib/components/chart-tooltip/chart-tooltip-panel.component.html","../../../src/lib/components/chart-tooltip/chart-tooltip.directive.ts","../../../src/lib/components/chart-tooltip/chart-active-mark.ts","../../../src/lib/components/chart-tooltip/ids-group-ltd-ids-design-system-components-chart-tooltip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n input,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport type { ChartTooltipContext } from './chart-tooltip.types';\n\n@Component({\n selector: 'ds-chart-tooltip-panel',\n standalone: true,\n imports: [NgTemplateOutlet],\n templateUrl: './chart-tooltip-panel.component.html',\n styleUrl: './chart-tooltip-panel.component.scss',\n host: {\n // Hidden from assistive technology on purpose: every interactive mark already\n // carries the same label and value in its `aria-label`, so exposing the panel\n // makes a screen reader read each reading twice.\n 'aria-hidden': 'true',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartTooltipPanelComponent {\n /** The category and the readings the panel prints. */\n readonly context = input.required<ChartTooltipContext>();\n /** The chart's projected `#dsChartTooltip` template. Null renders the built-in rows. */\n readonly template = input<TemplateRef<{\n $implicit: ChartTooltipContext;\n }> | null>(null);\n}\n","@if (template(); as projected) {\n <ng-container\n [ngTemplateOutlet]=\"projected\"\n [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n} @else {\n @if (context().category) {\n <p class=\"category\">\n {{ context().category }}\n </p>\n }\n\n <ul class=\"entries\">\n @for (entry of context().entries; track entry.label) {\n <li class=\"entry\">\n <span\n class=\"swatch\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"label\">\n {{ entry.label }}\n </span>\n\n <span class=\"value\">\n {{ entry.formatted }}\n </span>\n\n @if (entry.detail) {\n <span class=\"detail\">\n {{ entry.detail }}\n </span>\n }\n </li>\n }\n </ul>\n}\n","import {\n ComponentRef,\n DestroyRef,\n Directive,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n Overlay,\n OverlayRef,\n type FlexibleConnectedPositionStrategyOrigin,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { closeOnScroll } from '@ids-group-ltd/ids-design-system/components';\nimport { ChartTooltipPanelComponent } from './chart-tooltip-panel.component';\nimport type {\n ChartTooltipContext,\n ChartTooltipOrigin,\n} from './chart-tooltip.types';\n\nconst POINTER_GAP_PX = 12;\n// A fingertip covers roughly 40 CSS px, so a touch-opened panel has to clear the tap\n// point by more than a pointer-opened one does.\nconst TOUCH_GAP_PX = 48;\n\n// Above first, then below, then either side: four fallbacks are what make the panel flip\n// out of a small dashboard card rather than be clipped by it.\nfunction positionsFor(gap: number): ConnectedPosition[] {\n return [\n {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -gap,\n },\n {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: gap,\n },\n {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: gap,\n },\n {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -gap,\n },\n ];\n}\n\n/**\n * The chart tooltip, driven entirely by the context a chart hands it: non-null opens the\n * panel, null closes it. Pointer and keyboard therefore share one path — a chart that\n * sets the context on `focus` gets the panel with no pointer involved.\n *\n * @internal\n */\n@Directive({\n selector: '[dsChartTooltip]',\n standalone: true,\n})\nexport class ChartTooltipDirective {\n private readonly overlay = inject(Overlay);\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n readonly dsChartTooltip = input<ChartTooltipContext | null>(null);\n readonly dsChartTooltipOrigin = input<ChartTooltipOrigin | null>(null);\n readonly dsChartTooltipTemplate = input<TemplateRef<{\n $implicit: ChartTooltipContext;\n }> | null>(null);\n\n private overlayRef: OverlayRef | null = null;\n private panelRef: ComponentRef<ChartTooltipPanelComponent> | null = null;\n private detachScrollClose: (() => void) | null = null;\n\n constructor() {\n effect(() => {\n const context = this.dsChartTooltip();\n const origin = this.dsChartTooltipOrigin();\n if (!context?.entries.length || !origin) {\n this.close();\n\n return;\n }\n this.open(context, origin);\n });\n inject(DestroyRef).onDestroy(() => this.close());\n }\n\n private open(context: ChartTooltipContext, origin: ChartTooltipOrigin): void {\n // Reposition rather than re-create while the pointer moves between marks: a fresh\n // OverlayRef per mark restarts the enter transition on every band it crosses.\n if (!this.overlayRef) {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.strategyFor(origin),\n panelClass: ['ds-overlay-pane', 'ds-chart-tooltip-pane'],\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n });\n this.panelRef = this.overlayRef.attach(\n new ComponentPortal(ChartTooltipPanelComponent, this.viewContainerRef),\n );\n // CDK's reposition strategy watches `window` and registered `cdkScrollable`s only, so it\n // misses an app's own `overflow: auto` container — and a panel that stays put while the\n // chart scrolls away points at nothing.\n // Nothing re-opens it: the effect re-runs on a CHANGE to the context or the origin, and a\n // scroll changes neither. The next pointer move does both.\n this.detachScrollClose = closeOnScroll(this.overlayRef, () =>\n this.close(),\n );\n } else {\n this.overlayRef.updatePositionStrategy(this.strategyFor(origin));\n }\n this.panelRef?.setInput('context', context);\n this.panelRef?.setInput('template', this.dsChartTooltipTemplate());\n }\n\n private strategyFor(origin: ChartTooltipOrigin) {\n const gap = coarsePointer() ? TOUCH_GAP_PX : POINTER_GAP_PX;\n\n return this.overlay\n .position()\n .flexibleConnectedTo(origin as FlexibleConnectedPositionStrategyOrigin)\n .withFlexibleDimensions(false)\n .withPush(true)\n .withPositions(positionsFor(gap));\n }\n\n private close(): void {\n this.detachScrollClose?.();\n this.detachScrollClose = null;\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.panelRef = null;\n }\n}\n\nfunction coarsePointer(): boolean {\n return (\n typeof window !== 'undefined' &&\n window.matchMedia('(pointer: coarse)').matches\n );\n}\n","import { DestroyRef, Signal, inject, signal } from '@angular/core';\n\n/** @internal */\nexport interface ChartActiveMark {\n /** Index of the mark under the pointer or holding focus; `-1` when none is. */\n readonly index: Signal<number>;\n /** The mark's own element, which is what the tooltip anchors to. */\n readonly origin: Signal<Element | null>;\n enter(index: number, event: Event, anchorWithin?: string): void;\n leave(): void;\n}\n\n/**\n * The pointer-and-focus target the tooltip reads, for a chart whose marks are elements.\n * Pointer and keyboard write the same pair, so a chart wires `pointerenter` and `focus` to\n * `enter` and gets one code path rather than two.\n *\n * A TAP LATCHES. A touch fires `pointerleave` the moment the finger lifts, so without this the\n * panel would flash and vanish; latched, it stays until the next tap lands outside the mark. Call\n * from an injection context — the release listener is torn down with the component.\n *\n * @internal\n */\nexport function chartActiveMark(): ChartActiveMark {\n const index = signal(-1);\n const origin = signal<Element | null>(null);\n let latched = false;\n\n const clear = (): void => {\n latched = false;\n index.set(-1);\n origin.set(null);\n document.removeEventListener('pointerdown', release, true);\n };\n\n const release = (event: PointerEvent): void => {\n const mark = origin();\n if (mark && event.target instanceof Node && mark.contains(event.target)) {\n return;\n }\n clear();\n };\n\n if (typeof document !== 'undefined') {\n inject(DestroyRef).onDestroy(() =>\n document.removeEventListener('pointerdown', release, true),\n );\n }\n\n return {\n index: index.asReadonly(),\n origin: origin.asReadonly(),\n enter(at, event, anchorWithin) {\n const host = event.currentTarget;\n if (host instanceof Element) {\n // The tooltip anchors to the MARK, not to the box that catches the pointer: a column's\n // cell is the full plot height, so anchoring to it opens the panel at the top of the\n // chart rather than over the column it is about.\n const anchor = anchorWithin ? host.querySelector(anchorWithin) : null;\n origin.set(anchor ?? host);\n }\n index.set(at);\n if (\n typeof document !== 'undefined' &&\n event instanceof PointerEvent &&\n event.pointerType === 'touch'\n ) {\n latched = true;\n document.addEventListener('pointerdown', release, true);\n }\n },\n leave() {\n if (latched) {\n return;\n }\n index.set(-1);\n origin.set(null);\n },\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAyBa,0BAA0B,CAAA;;AAE5B,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAuB;;AAE/C,IAAA,QAAQ,GAAG,KAAK,CAEd,IAAI,+EAAC;wGANL,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzBvC,kzBAoCA,EAAA,MAAA,EAAA,CAAA,itCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDvBY,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAA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CAAC;QACD,KAAK,GAAA;YACH,IAAI,OAAO,EAAE;gBACX;YACF;AACA,YAAA,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACb,YAAA,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;QAClB,CAAC;KACF;AACH;;AC/EA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-chart-tooltip.mjs","sources":["../../../src/lib/components/chart-tooltip/chart-tooltip-panel.component.ts","../../../src/lib/components/chart-tooltip/chart-tooltip-panel.component.html","../../../src/lib/components/chart-tooltip/chart-tooltip.directive.ts","../../../src/lib/components/chart-tooltip/chart-active-mark.ts","../../../src/lib/components/chart-tooltip/ids-group-ltd-ids-design-system-components-chart-tooltip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n input,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport type { ChartTooltipContext } from './chart-tooltip.types';\n\n@Component({\n selector: 'ds-chart-tooltip-panel',\n standalone: true,\n imports: [NgTemplateOutlet],\n templateUrl: './chart-tooltip-panel.component.html',\n styleUrl: './chart-tooltip-panel.component.scss',\n host: {\n // Hidden from assistive technology on purpose: every interactive mark already\n // carries the same label and value in its `aria-label`, so exposing the panel\n // makes a screen reader read each reading twice.\n 'aria-hidden': 'true',\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChartTooltipPanelComponent {\n /** The category and the readings the panel prints. */\n readonly context = input.required<ChartTooltipContext>();\n /** The chart's projected `#dsChartTooltip` template. Null renders the built-in rows. */\n readonly template = input<TemplateRef<{\n $implicit: ChartTooltipContext;\n }> | null>(null);\n}\n","@if (template(); as projected) {\n <ng-container\n [ngTemplateOutlet]=\"projected\"\n [ngTemplateOutletContext]=\"{ $implicit: context() }\" />\n} @else {\n @if (context().category) {\n <p class=\"category\">\n {{ context().category }}\n </p>\n }\n\n <ul class=\"entries\">\n @for (entry of context().entries; track entry.label) {\n <li class=\"entry\">\n <span\n class=\"swatch\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"label\">\n {{ entry.label }}\n </span>\n\n <span class=\"value\">\n {{ entry.formatted }}\n </span>\n\n @if (entry.detail) {\n <span class=\"detail\">\n {{ entry.detail }}\n </span>\n }\n </li>\n }\n </ul>\n}\n","import {\n ComponentRef,\n DestroyRef,\n Directive,\n TemplateRef,\n ViewContainerRef,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n Overlay,\n OverlayRef,\n type FlexibleConnectedPositionStrategyOrigin,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { closeOnScroll } from '@ids-group-ltd/ids-design-system/components';\nimport { ChartTooltipPanelComponent } from './chart-tooltip-panel.component';\nimport type {\n ChartTooltipContext,\n ChartTooltipOrigin,\n} from './chart-tooltip.types';\n\nconst POINTER_GAP_PX = 6;\n// A fingertip covers roughly 40 CSS px, so a touch-opened panel has to clear the tap\n// point by more than a pointer-opened one does.\nconst TOUCH_GAP_PX = 48;\n\n// Four fallbacks are what make the panel flip out of a small dashboard card rather than be\n// clipped by it. Above first, except while a mark is HELD: the Unpin control sits at the plot's\n// top edge, and a panel that opens upward from a mark in the upper half lands on top of it. The\n// panel is portaled to the body, so no z-index can lift the control over it — an app layout that\n// isolates its own stacking context traps the chart's chrome below the overlay whatever number it\n// carries.\nfunction positionsFor(gap: number, preferBelow: boolean): ConnectedPosition[] {\n const above: ConnectedPosition = {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -gap,\n };\n const below: ConnectedPosition = {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: gap,\n };\n\n return [\n ...(preferBelow ? [below, above] : [above, below]),\n {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: gap,\n },\n {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -gap,\n },\n ];\n}\n\n/**\n * The chart tooltip, driven entirely by the context a chart hands it: non-null opens the\n * panel, null closes it. Pointer and keyboard therefore share one path — a chart that\n * sets the context on `focus` gets the panel with no pointer involved.\n *\n * @internal\n */\n@Directive({\n selector: '[dsChartTooltip]',\n standalone: true,\n})\nexport class ChartTooltipDirective {\n private readonly overlay = inject(Overlay);\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n readonly dsChartTooltip = input<ChartTooltipContext | null>(null);\n readonly dsChartTooltipOrigin = input<ChartTooltipOrigin | null>(null);\n readonly dsChartTooltipTemplate = input<TemplateRef<{\n $implicit: ChartTooltipContext;\n }> | null>(null);\n\n /** Extra clearance between the mark and the panel, on top of the pointer default. A chart that\n * prints something ABOVE its mark — a column with its value on top — needs the panel to clear\n * that text as well as the mark, or the two overlap. Ignored for touch, where the gap is already\n * sized for a fingertip. */\n readonly dsChartTooltipExtraGap = input(0);\n /** Opens the panel BELOW the mark first. A chart sets it while a mark is held, so the panel\n * leaves the plot's top edge — and the Unpin control that lives there — alone. */\n readonly dsChartTooltipPreferBelow = input(false);\n\n private overlayRef: OverlayRef | null = null;\n private panelRef: ComponentRef<ChartTooltipPanelComponent> | null = null;\n private detachScrollReposition: (() => void) | null = null;\n private detachEscape: (() => void) | null = null;\n\n constructor() {\n effect(() => {\n const context = this.dsChartTooltip();\n const origin = this.dsChartTooltipOrigin();\n if (!context?.entries.length || !origin) {\n this.close();\n\n return;\n }\n this.open(context, origin);\n });\n inject(DestroyRef).onDestroy(() => this.close());\n }\n\n private open(context: ChartTooltipContext, origin: ChartTooltipOrigin): void {\n // Reposition rather than re-create while the pointer moves between marks: a fresh\n // OverlayRef per mark restarts the enter transition on every band it crosses.\n if (!this.overlayRef) {\n this.overlayRef = this.overlay.create({\n positionStrategy: this.strategyFor(origin),\n panelClass: ['ds-overlay-pane', 'ds-chart-tooltip-pane'],\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n });\n this.panelRef = this.overlayRef.attach(\n new ComponentPortal(ChartTooltipPanelComponent, this.viewContainerRef),\n );\n // CDK's reposition strategy watches `window` and registered `cdkScrollable`s only, so it\n // misses an app's own `overflow: auto` container. Moved rather than closed: a PINNED mark\n // stops answering pointer moves, so a close here would be permanent, leaving the pin glyph\n // and the Unpin control standing over a reading that is gone.\n this.detachScrollReposition = closeOnScroll(this.overlayRef, () =>\n this.overlayRef?.updatePosition(),\n );\n this.detachEscape = this.closeOnEscape();\n } else {\n this.overlayRef.updatePositionStrategy(this.strategyFor(origin));\n }\n this.panelRef?.setInput('context', context);\n this.panelRef?.setInput('template', this.dsChartTooltipTemplate());\n }\n\n private strategyFor(origin: ChartTooltipOrigin) {\n const gap = coarsePointer()\n ? TOUCH_GAP_PX\n : POINTER_GAP_PX + this.dsChartTooltipExtraGap();\n\n return this.overlay\n .position()\n .flexibleConnectedTo(origin as FlexibleConnectedPositionStrategyOrigin)\n .withFlexibleDimensions(false)\n .withPush(true)\n .withPositions(positionsFor(gap, this.dsChartTooltipPreferBelow()));\n }\n\n // WCAG 1.4.13 wants the panel dismissable WITHOUT moving the pointer or the focus, which rules\n // out \"move off the mark\". Nothing re-opens it afterwards: the effect re-runs on a CHANGE to the\n // context or the origin, and neither changes while the pointer rests where it already is — so the\n // reader keeps the screen they cleared until they visit another mark.\n private closeOnEscape(): () => void {\n if (typeof document === 'undefined') {\n return () => undefined;\n }\n const onKeydown = (event: KeyboardEvent): void => {\n if (event.key === 'Escape') {\n this.close();\n }\n };\n document.addEventListener('keydown', onKeydown, true);\n\n return () => document.removeEventListener('keydown', onKeydown, true);\n }\n\n private close(): void {\n this.detachEscape?.();\n this.detachEscape = null;\n this.detachScrollReposition?.();\n this.detachScrollReposition = null;\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.panelRef = null;\n }\n}\n\nfunction coarsePointer(): boolean {\n return (\n typeof window !== 'undefined' &&\n window.matchMedia('(pointer: coarse)').matches\n );\n}\n","import { DestroyRef, Signal, inject, signal } from '@angular/core';\n\n/** @internal */\nexport interface ChartActiveMark {\n /** Index of the mark under the pointer or holding focus; `-1` when none is. */\n readonly index: Signal<number>;\n /** The mark's own element, which is what the tooltip anchors to. */\n readonly origin: Signal<Element | null>;\n /** Whether the active mark is held rather than followed — a tap, or a click under `pinOnClick`. */\n readonly pinned: Signal<boolean>;\n enter(index: number, event: Event, anchor?: string | Element | null): void;\n leave(): void;\n /** Holds the mark that was activated, for any pointer type. Activating the mark that is already\n * pinned releases it, so one gesture both sets and clears. */\n pin(index: number, event: Event, anchor?: string | Element | null): void;\n /** Lets go of a held mark, for a control that offers the way out in as many words. */\n release(): void;\n}\n\n/**\n * The pointer-and-focus target the tooltip reads, for a chart whose marks are elements.\n * Pointer and keyboard write the same pair, so a chart wires `pointerenter` and `focus` to\n * `enter` and gets one code path rather than two.\n *\n * A TAP LATCHES. A touch fires `pointerleave` the moment the finger lifts, so without this the\n * panel would flash and vanish; latched, it stays until the next tap lands outside the mark. Call\n * from an injection context — the release listener is torn down with the component.\n *\n * @internal\n */\nexport function chartActiveMark(\n lingerMs: () => number = () => 0,\n): ChartActiveMark {\n const index = signal(-1);\n const origin = signal<Element | null>(null);\n // One flag for two ways of arriving at the same state: a tap, which has no hover to hold the\n // panel open, and a deliberate click under `pinOnClick`. Both release the same way.\n const pinned = signal(false);\n let pendingClear: ReturnType<typeof setTimeout> | null = null;\n // The element that OWNS the handlers, which is not always the tooltip anchor: a column anchors\n // its panel to the bar while the whole cell answers the pointer. A press is \"outside\" only when\n // it misses this, or a click on the cell beside the bar would release the pin and immediately\n // re-take it, leaving the pin looking stuck.\n let host: Element | null = null;\n\n const clear = (): void => {\n pinned.set(false);\n host = null;\n cancelPendingClear();\n index.set(-1);\n origin.set(null);\n document.removeEventListener('pointerdown', release, true);\n document.removeEventListener('keydown', releaseOnEscape, true);\n document.removeEventListener('pointerover', trackPointer, true);\n };\n\n // The tooltip anchors to the MARK, not to the box that catches the pointer: a column's cell is\n // the full plot height, so anchoring to it opens the panel at the top of the chart rather than\n // over the column it is about. A selector is resolved INSIDE the box; a legend item's mark is not\n // inside it, so that caller passes the element.\n const aim = (\n at: number,\n event: Event,\n anchor?: string | Element | null,\n ): void => {\n const target = event.currentTarget;\n if (target instanceof Element) {\n host = target;\n const mark =\n typeof anchor === 'string' ? target.querySelector(anchor) : anchor;\n origin.set(mark ?? target);\n }\n index.set(at);\n };\n\n const hold = (): void => {\n pinned.set(true);\n cancelPendingClear();\n document.addEventListener('pointerdown', release, true);\n document.addEventListener('keydown', releaseOnEscape, true);\n };\n\n // Escape releases the mark as well as the panel. Without this the panel would go and the dimming\n // it caused would stay, leaving the chart in a state with nothing on screen explaining it.\n const releaseOnEscape = (event: KeyboardEvent): void => {\n if (event.key === 'Escape') {\n clear();\n }\n };\n\n const cancelPendingClear = (): void => {\n if (pendingClear !== null) {\n clearTimeout(pendingClear);\n pendingClear = null;\n }\n };\n\n const scheduleClear = (): void => {\n cancelPendingClear();\n pendingClear = setTimeout(\n () => {\n pendingClear = null;\n index.set(-1);\n origin.set(null);\n document.removeEventListener('pointerover', trackPointer, true);\n },\n Math.max(lingerMs(), 0),\n );\n };\n\n // One listener answers both halves of \"is the pointer on the panel\": `pointerover` fires on every\n // element the pointer crosses, so arriving on the panel cancels the clear and leaving it for\n // anything that is not the mark schedules a new one. Without the second half a panel the pointer\n // once touched would never close, because the mark's own `pointerleave` has already fired.\n const trackPointer = (event: PointerEvent): void => {\n if (!(event.target instanceof Element)) {\n return;\n }\n if (pinned() || event.target.closest('.ds-chart-tooltip-pane')) {\n cancelPendingClear();\n\n return;\n }\n // Against the HOST, not the anchor: a legend item and the arc its panel points at are disjoint\n // elements, so testing the anchor would clear the panel the moment the pointer moved inside the\n // legend item that opened it.\n if (!host || !host.contains(event.target)) {\n scheduleClear();\n }\n };\n\n // The chart the aimed mark belongs to. Every chart puts its plot in one `<figure>`, so this is\n // what tells \"pressed another mark of the same chart\" apart from \"pressed away\".\n const chartOf = (element: Element | null): Element | null =>\n element ? element.closest('figure') : null;\n\n const release = (event: PointerEvent): void => {\n if (!(event.target instanceof Element)) {\n clear();\n\n return;\n }\n if (host && host.contains(event.target)) {\n return;\n }\n // Hopping the pin from one mark to the next must not pass through \"nothing is pinned\". This\n // handler runs on `pointerdown`, the re-aim on the `click` after it, so clearing here would\n // unmount the Unpin control and the pinned styling for a frame and mount them again — a\n // flicker on every hop. The press is a re-aim when it lands on another mark of the same chart.\n const pressedMark = event.target.closest('[data-mark-index]');\n if (pressedMark && chartOf(pressedMark) === chartOf(host)) {\n return;\n }\n clear();\n };\n\n if (typeof document !== 'undefined') {\n inject(DestroyRef).onDestroy(() => {\n cancelPendingClear();\n document.removeEventListener('pointerdown', release, true);\n document.removeEventListener('pointerover', trackPointer, true);\n });\n }\n\n return {\n index: index.asReadonly(),\n origin: origin.asReadonly(),\n pinned: pinned.asReadonly(),\n enter(at, event, anchor) {\n // A pin HOLDS. Without this the next mark the pointer crossed took the active slot straight\n // back, so pinning appeared to work and then followed the pointer anyway — the one thing a\n // pin exists not to do. It is released by Escape, or by a press outside the pinned mark.\n if (pinned()) {\n return;\n }\n aim(at, event, anchor);\n cancelPendingClear();\n if (typeof document !== 'undefined') {\n document.addEventListener('pointerover', trackPointer, true);\n }\n if (\n typeof document !== 'undefined' &&\n event instanceof PointerEvent &&\n event.pointerType === 'touch'\n ) {\n hold();\n }\n },\n leave() {\n if (pinned()) {\n return;\n }\n scheduleClear();\n },\n release() {\n if (typeof document !== 'undefined') {\n clear();\n }\n },\n pin(at, event, anchor) {\n if (typeof document === 'undefined') {\n return;\n }\n // The same gesture that set the pin clears it. A press on a DIFFERENT mark has already gone\n // through `release` by the time the click lands, so this only ever sees a fresh mark or the\n // pinned one.\n if (pinned() && index() === at) {\n clear();\n\n return;\n }\n // Re-aiming while already pinned keeps `pinned` true throughout, so nothing that renders on\n // it — the Unpin control, the held mark's styling — unmounts between the two marks.\n aim(at, event, anchor);\n if (!pin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