@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-donut-chart.mjs","sources":["../../../src/lib/components/donut-chart/donut-chart.math.ts","../../../src/lib/components/donut-chart/donut-chart.component.ts","../../../src/lib/components/donut-chart/donut-chart.component.html","../../../src/lib/components/donut-chart/ids-group-ltd-ids-design-system-components-donut-chart.ts"],"sourcesContent":["import type { DonutChartSlice } from './donut-chart.types';\n\nconst FULL_TURN = Math.PI * 2;\nconst FULL_TURN_EPSILON = 1e-9;\n\nexport const DEFAULT_THICKNESS = 0.32;\n\n/** Diameter of the hole, as a fraction of the ring's own diameter. The centre content is held to\n * the square that fits inside it. */\nexport function holeFraction(thickness: number): number {\n const ratio =\n Number.isFinite(thickness) && thickness > 0 && thickness <= 1\n ? thickness\n : DEFAULT_THICKNESS;\n\n return round(1 - ratio);\n}\n\n/** The slices a legend can carry, with everything past `limit` summed into one. The kept slices stay\n * in the order given — a ring is read against its legend top to bottom, so reordering by value\n * would move every other slice to make room for the grouping. The remainder takes the neutral\n * eighth palette slot, which is what that slot is for. */\nexport function groupSmallest(\n slices: readonly DonutChartSlice[],\n limit: number | null,\n otherLabel: string,\n): DonutChartSlice[] {\n if (limit === null || !Number.isInteger(limit) || limit < 2) {\n return [...slices];\n }\n if (slices.length <= limit) {\n return [...slices];\n }\n const ranked = [...slices]\n .map((slice, index) => ({ index, value: positiveValues([slice.value])[0] }))\n .sort((a, b) => b.value - a.value || a.index - b.index);\n const kept = new Set(ranked.slice(0, limit - 1).map((entry) => entry.index));\n const remainder = slices\n .filter((unusedSlice, index) => !kept.has(index))\n .reduce((sum, slice) => sum + positiveValues([slice.value])[0], 0);\n\n return [\n ...slices.filter((unusedSlice, index) => kept.has(index)),\n { id: 'ds-donut-other', label: otherLabel, value: remainder, slot: 8 },\n ];\n}\n\nexport interface DonutArc {\n readonly startAngle: number;\n readonly endAngle: number;\n}\n\n/** A ring is a part-to-whole picture, so anything that is not a positive share\n * becomes zero. Non-finite values go in the same pass: one NaN reaches every\n * other slice through the total, and a `d` attribute holding NaN draws nothing\n * at all rather than failing loudly. */\nexport function positiveValues(values: readonly number[]): number[] {\n return values.map((value) =>\n Number.isFinite(value) && value > 0 ? value : 0,\n );\n}\n\nexport function resolveTotal(values: readonly number[]): number {\n return positiveValues(values).reduce((sum, value) => sum + value, 0);\n}\n\nexport function sliceArcs(values: readonly number[]): DonutArc[] {\n const positive = positiveValues(values);\n const total = resolveTotal(positive);\n if (total <= 0) {\n return positive.map(() => ({ startAngle: 0, endAngle: 0 }));\n }\n let cursor = 0;\n\n return positive.map((value) => {\n const startAngle = cursor;\n cursor += (value / total) * FULL_TURN;\n\n return { startAngle, endAngle: cursor };\n });\n}\n\nexport function resolveInnerRadius(\n outerRadius: number,\n thickness: number,\n): number {\n if (!Number.isFinite(outerRadius) || outerRadius <= 0) {\n return 0;\n }\n // A thickness outside (0, 1] draws no ring: at 0 the band has no width, above\n // 1 the inner radius goes negative. An unusable one falls back to the default\n // instead of rendering an empty chart.\n const ratio =\n Number.isFinite(thickness) && thickness > 0 && thickness <= 1\n ? thickness\n : DEFAULT_THICKNESS;\n\n return outerRadius * (1 - ratio);\n}\n\nexport function paletteIndex(\n slot: number | undefined,\n index: number,\n paletteLength: number,\n): number {\n if (paletteLength <= 0) {\n return 0;\n }\n if (slot !== undefined && Number.isInteger(slot) && slot > 0) {\n return (slot - 1) % paletteLength;\n }\n\n return index % paletteLength;\n}\n\n/** One `\"x y\"` pair for a path. Angles run clockwise from 12 o'clock, where a\n * reader expects a ring to start; SVG's y axis points down, so that is\n * (sin, -cos) rather than the (cos, sin) of the maths convention. */\nexport function ringPoint(\n centerX: number,\n centerY: number,\n radius: number,\n angle: number,\n): string {\n return `${round(centerX + radius * Math.sin(angle))} ${round(\n centerY - radius * Math.cos(angle),\n )}`;\n}\n\nexport function arcPath(\n centerX: number,\n centerY: number,\n outerRadius: number,\n innerRadius: number,\n startAngle: number,\n endAngle: number,\n): string {\n const finite = [\n centerX,\n centerY,\n outerRadius,\n innerRadius,\n startAngle,\n endAngle,\n ].every((value) => Number.isFinite(value));\n if (!finite || outerRadius <= 0) {\n return '';\n }\n const inner = Math.min(Math.max(innerRadius, 0), outerRadius);\n const sweep = endAngle - startAngle;\n if (sweep <= 0) {\n return '';\n }\n if (sweep >= FULL_TURN - FULL_TURN_EPSILON) {\n return fullRingPath(centerX, centerY, outerRadius, inner);\n }\n const largeArcFlag = sweep > Math.PI ? 1 : 0;\n const outerRadii = `${round(outerRadius)} ${round(outerRadius)}`;\n const outerArc =\n `M ${ringPoint(centerX, centerY, outerRadius, startAngle)}` +\n ` A ${outerRadii} 0 ${largeArcFlag} 1 ${ringPoint(centerX, centerY, outerRadius, endAngle)}`;\n if (inner === 0) {\n return `${outerArc} L ${round(centerX)} ${round(centerY)} Z`;\n }\n const innerRadii = `${round(inner)} ${round(inner)}`;\n\n return (\n `${outerArc} L ${ringPoint(centerX, centerY, inner, endAngle)}` +\n ` A ${innerRadii} 0 ${largeArcFlag} 0 ${ringPoint(centerX, centerY, inner, startAngle)} Z`\n );\n}\n\nfunction fullRingPath(\n centerX: number,\n centerY: number,\n outerRadius: number,\n innerRadius: number,\n): string {\n const outer = circlePath(centerX, centerY, outerRadius, 1);\n if (innerRadius <= 0) {\n return outer;\n }\n\n // The hole is cut by winding the inner circle the other way, which the default\n // nonzero fill rule then cancels against the outer one.\n return `${outer} ${circlePath(centerX, centerY, innerRadius, 0)}`;\n}\n\n/** A single arc of a full turn ends where it starts and SVG draws nothing for\n * it, so a closed circle is two half-turns. */\nfunction circlePath(\n centerX: number,\n centerY: number,\n radius: number,\n sweepFlag: 0 | 1,\n): string {\n const top = ringPoint(centerX, centerY, radius, 0);\n const bottom = ringPoint(centerX, centerY, radius, Math.PI);\n const radii = `${round(radius)} ${round(radius)}`;\n\n return `M ${top} A ${radii} 0 1 ${sweepFlag} ${bottom} A ${radii} 0 1 ${sweepFlag} ${top} Z`;\n}\n\nfunction round(value: number): number {\n return Math.round(value * 1000) / 1000;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n describeSeries,\n formatValue,\n focusMark,\n largestRemainder,\n nextRovingIndex,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport type {\n ChartDataTable,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n ChartTooltipDirective,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport {\n DEFAULT_THICKNESS,\n arcPath,\n groupSmallest,\n holeFraction,\n paletteIndex,\n positiveValues,\n resolveInnerRadius,\n resolveTotal,\n sliceArcs,\n} from './donut-chart.math';\nimport type { DonutChartSlice } from './donut-chart.types';\n\nconst defaultValueFormat = (value: number) => formatValue(value);\n\nconst RING_VIEW_BOX_SIZE = 100;\nconst RING_CENTER = RING_VIEW_BOX_SIZE / 2;\nconst RING_OUTER_RADIUS = RING_VIEW_BOX_SIZE / 2;\n\n@Component({\n selector: 'ds-donut-chart',\n standalone: true,\n imports: [SkeletonComponent, ChartTooltipDirective],\n templateUrl: './donut-chart.component.html',\n styleUrl: './donut-chart.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DonutChartComponent {\n /** One slice per entry. A non-positive or non-finite value counts as zero — a ring is a\n * part-to-whole picture and has no way to draw a negative share. */\n readonly data = input.required<readonly DonutChartSlice[]>();\n\n /** Printed inside the ring. Null prints the sum through `valueFormat`. */\n readonly centerValue = input<string | null>(null);\n\n /** Caption under the centre value. */\n readonly centerLabel = input<string | null>(null);\n\n /** Logical placement, so a right-to-left page needs no second value. */\n readonly legend = input<'end' | 'bottom' | 'none'>('end');\n\n /** Longest legend to draw. Past it the smallest slices are summed into one, so a long tail does\n * not become a legend nobody reads. Off by default: grouping changes what the chart says, and\n * that is the consumer's call. Values below 2 are ignored — one slice is not a donut. */\n readonly maxSlices = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Names the grouped slice. */\n readonly otherLabel = input<string>('Other');\n\n /** Ring width as a fraction of the radius. */\n readonly thickness = input(DEFAULT_THICKNESS, { transform: numberAttribute });\n\n /** Printed above the plot as the chart's visible title, and reused as the annex table's\n * caption. */\n readonly caption = input<string | null>(null);\n\n /** Accessible name. Generated from the data when omitted. */\n readonly summary = input<string | null>(null);\n\n /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,\n * `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so\n * `'none'` belongs only where the same data is already in a table on the page.\n * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'toggle'`. */\n readonly dataTable = input<ChartDataTable | null>(null);\n /** Draws skeleton marks in place of the data, at the same count, so the chart does not resize\n * when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_CONFIG.chart.emptyText`, then `'No data'`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shows `errorText` in place of the plot. Separate from `loading` and from an empty `data`,\n * because \"the request failed\" and \"there is nothing to show\" read the same to a reader and\n * mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** The message the error state prints. Unset falls back to `DS_CONFIG.chart.errorText`, then\n * `'Could not load the data'`. */\n readonly errorText = input<string | null>(null);\n /** Formats every value the chart prints, the annex table and the generated description\n * included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale\n * grouping with a K/M/B suffix past four digits. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n readonly dataTableResolved = resolveWithConfig(\n this.dataTable,\n (config) => config.chart?.dataTable,\n 'toggle' as ChartDataTable,\n );\n readonly emptyTextResolved = resolveWithConfig(\n this.emptyText,\n (config) => config.chart?.emptyText,\n 'No data',\n );\n readonly errorTextResolved = resolveWithConfig(\n this.errorText,\n (config) => config.chart?.errorText,\n 'Could not load the data',\n );\n readonly valueFormatResolved = resolveWithConfig(\n this.valueFormat,\n (config) => config.chart?.valueFormat,\n defaultValueFormat as ChartValueFormat,\n );\n\n /** Turns on the click affordance — the pointer cursor and any hover tint.\n * The click output fires whether or not this is set, so a consumer that\n * binds the output and forgets the flag still receives every click. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** The slice that was clicked, or activated with Enter or Space. Fires whether or not\n * `interactive` is set. */\n readonly sliceClicked = output<DonutChartSlice>();\n\n /** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the\n * one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed\n * marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full\n * opacity to 2.1 at `--ds-chart-dim-opacity`'s default 0.3 — so it buys loudness for one mark\n * and pays for it with the rest of the chart. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Accepted for parity with the other four charts and deliberately without effect here: a ring\n * arrives as ONE object, because arcs share their edges and fading them one at a time lets the\n * background through every seam. There is nothing to stagger. */\n readonly staggerMs = input(0, { transform: numberAttribute });\n\n /** Whether a hovered or focused slice opens a tooltip. `'axis'` is not offered — a ring\n * has no axis to group readings under. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n protected readonly tooltipTemplate =\n contentChild<TemplateRef<{ $implicit: ChartTooltipContext }>>(\n 'dsChartTooltip',\n );\n\n protected readonly activeMark = chartActiveMark();\n /** One tab stop per chart, not one per slice: WCAG 2.1.1's Understanding is explicit that not\n * every mouse-operable control has to be separately focusable. */\n protected readonly rovingIndex = signal(0);\n\n protected readonly tabStopIndex = computed(() =>\n Math.min(this.rovingIndex(), Math.max(0, this.slices().length - 1)),\n );\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.rovingIndex.set(index);\n this.activeMark.enter(index, event);\n }\n\n protected onMarkNavigation(\n event: KeyboardEvent,\n index: number,\n scope: string,\n ): void {\n const next = nextRovingIndex(event.key, index, this.slices().length);\n if (next === null) {\n return;\n }\n event.preventDefault();\n this.rovingIndex.set(next);\n focusMark((event.currentTarget as Element).closest(scope), next);\n }\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const entry = this.slices()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !entry) {\n return null;\n }\n\n return {\n category: '',\n entries: [\n {\n label: entry.slice.label,\n value: entry.slice.value,\n formatted: `${entry.formattedValue} · ${entry.formattedPercent}`,\n color: entry.color,\n },\n ],\n };\n },\n );\n\n protected readonly viewBox = `0 0 ${RING_VIEW_BOX_SIZE} ${RING_VIEW_BOX_SIZE}`;\n\n protected readonly total = computed(() =>\n resolveTotal(this.data().map((slice) => slice.value)),\n );\n\n protected readonly visibleSlices = computed(() =>\n groupSmallest(this.data(), this.maxSlices(), this.otherLabel()),\n );\n\n protected readonly slices = computed(() => {\n const data = this.visibleSlices();\n const values = data.map((slice) => slice.value);\n const arcs = sliceArcs(values);\n const percents = largestRemainder(positiveValues(values));\n const innerRadius = resolveInnerRadius(RING_OUTER_RADIUS, this.thickness());\n const format = this.valueFormatResolved();\n\n return data.map((slice, index) => ({\n slice,\n path: arcPath(\n RING_CENTER,\n RING_CENTER,\n RING_OUTER_RADIUS,\n innerRadius,\n arcs[index].startAngle,\n arcs[index].endAngle,\n ),\n color:\n CHART_SERIES_COLORS[\n paletteIndex(slice.slot, index, CHART_SERIES_COLORS.length)\n ],\n formattedValue: format(slice.value),\n formattedPercent: `${percents[index]}%`,\n }));\n });\n\n protected readonly resolvedCenterValue = computed(\n () => this.centerValue() ?? this.valueFormatResolved()(this.total()),\n );\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.caption() ?? 'Chart',\n this.data().map((slice) => ({\n label: slice.label,\n value: slice.value,\n })),\n this.valueFormatResolved(),\n this.dataTableResolved() !== 'none',\n ),\n );\n\n protected readonly hole = computed(() => holeFraction(this.thickness()));\n\n protected entryLabel(entry: {\n slice: DonutChartSlice;\n formattedValue: string;\n formattedPercent: string;\n }) {\n return `${entry.slice.label}, ${entry.formattedValue}, ${entry.formattedPercent}`;\n }\n\n protected onSliceKey(slice: DonutChartSlice, event: Event): void {\n // Only the legend item's own key opens it: a key pressed on a control inside belongs to that\n // control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.sliceClicked.emit(slice);\n }\n\n // Both focusable would double the tab order; the legend items already carry the route.\n // Without this the ring is unreachable at `legend=\"none\"`.\n protected readonly ringCarriesTheRoute = computed(\n () => this.interactive() && this.legend() === 'none',\n );\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n /** Placeholder legend rows while loading. Follows the real slice count so the\n * chart does not resize when the data lands; falls back to three when `data`\n * is still empty. */\n protected readonly skeletonRows = computed(() =>\n Array.from({ length: Math.max(this.data().length, 3) }),\n );\n}\n","<figure\n class=\"donut-chart\"\n [style.--_donut-chart-hole-fraction]=\"hole()\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p\n class=\"empty-text is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n </div>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\"\n [class.legend-bottom]=\"legend() === 'bottom'\">\n <ds-skeleton\n circle\n width=\"var(--_donut-chart-size)\"\n height=\"var(--_donut-chart-size)\" />\n\n @if (legend() !== 'none') {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonRows(); track $index) {\n <ds-skeleton height=\"var(--_donut-chart-legend-row-height)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p class=\"empty-text\">\n {{ emptyTextResolved() }}\n </p>\n </div>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [class.legend-bottom]=\"legend() === 'bottom'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <div\n class=\"ring\"\n [class.ring-outline]=\"total() === 0\">\n <svg\n class=\"ring-svg\"\n animate.enter=\"mark-enter\"\n [class.dims-others]=\"dimOthers()\"\n [attr.aria-hidden]=\"ringCarriesTheRoute() ? null : true\"\n [attr.viewBox]=\"viewBox\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <path\n class=\"slice\"\n [class.interactive]=\"interactive()\"\n [class.focusable]=\"ringCarriesTheRoute()\"\n [attr.d]=\"entry.path\"\n [style.fill]=\"entry.color\"\n [attr.role]=\"ringCarriesTheRoute() ? 'button' : null\"\n [attr.tabindex]=\"\n ringCarriesTheRoute()\n ? index === tabStopIndex()\n ? 0\n : -1\n : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"\n ringCarriesTheRoute() ? entryLabel(entry) : null\n \"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.ring-svg')\"\n (click)=\"sliceClicked.emit(entry.slice)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n </path>\n }\n </svg>\n\n <div class=\"center\">\n <span class=\"center-value\">\n {{ resolvedCenterValue() }}\n </span>\n\n @if (centerLabel()) {\n <span class=\"center-label\">\n {{ centerLabel() }}\n </span>\n }\n </div>\n </div>\n\n @if (legend() !== 'none') {\n <ul class=\"legend\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <li\n class=\"legend-item\"\n [class.interactive]=\"interactive()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.legend')\"\n (click)=\"sliceClicked.emit(entry.slice)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n <span\n class=\"swatch\"\n animate.enter=\"mark-enter\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ entry.slice.label }}\n </span>\n\n <span class=\"legend-value\">\n {{ entry.formattedValue }}\n </span>\n\n <span class=\"legend-percent\">\n {{ entry.formattedPercent }}\n </span>\n </li>\n }\n </ul>\n }\n </div>\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n <th scope=\"col\">\n Share\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of slices(); track entry.slice.id) {\n <tr>\n <td>\n {{ entry.slice.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n\n <td>\n {{ entry.formattedPercent }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;AAC7B,MAAM,iBAAiB,GAAG,IAAI;AAEvB,MAAM,iBAAiB,GAAG,IAAI;AAErC;AACsC;AAChC,SAAU,YAAY,CAAC,SAAiB,EAAA;AAC5C,IAAA,MAAM,KAAK,GACT,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,IAAI,SAAS,IAAI;AAC1D,UAAE;UACA,iBAAiB;AAEvB,IAAA,OAAO,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC;AACzB;AAEA;;;AAG2D;SAC3C,aAAa,CAC3B,MAAkC,EAClC,KAAoB,EACpB,UAAkB,EAAA;AAElB,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE;AAC3D,QAAA,OAAO,CAAC,GAAG,MAAM,CAAC;IACpB;AACA,IAAA,IAAI,MAAM,CAAC,MAAM,IAAI,KAAK,EAAE;AAC1B,QAAA,OAAO,CAAC,GAAG,MAAM,CAAC;IACpB;AACA,IAAA,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM;SACtB,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1E,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,GAA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BAAiB,yGAAE,qBAAqB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,gBAAA,EAAA,sBAAA,EAAA,wBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAMvC,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAT/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAAA,UAAA,EACd,IAAI,EAAA,OAAA,EACP,CAAC,iBAAiB,EAAE,qBAAqB,CAAC,EAAA,aAAA,EAGpC,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,gsMAAA,EAAA,MAAA,EAAA,CAAA,mlPAAA,CAAA,EAAA;47DA6G3C,gBAAgB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE1KtB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-donut-chart.mjs","sources":["../../../src/lib/components/donut-chart/donut-chart.math.ts","../../../src/lib/components/donut-chart/donut-chart.component.ts","../../../src/lib/components/donut-chart/donut-chart.component.html","../../../src/lib/components/donut-chart/ids-group-ltd-ids-design-system-components-donut-chart.ts"],"sourcesContent":["import type { DonutChartSlice } from './donut-chart.types';\n\nconst FULL_TURN = Math.PI * 2;\nconst FULL_TURN_EPSILON = 1e-9;\n\nexport const DEFAULT_THICKNESS = 0.32;\n\n/** Diameter of the hole, as a fraction of the ring's own diameter. The centre content is held to\n * the square that fits inside it. */\nexport function holeFraction(thickness: number): number {\n const ratio =\n Number.isFinite(thickness) && thickness > 0 && thickness <= 1\n ? thickness\n : DEFAULT_THICKNESS;\n\n return round(1 - ratio);\n}\n\n/** The slices a legend can carry, with everything past `limit` summed into one. The kept slices stay\n * in the order given — a ring is read against its legend top to bottom, so reordering by value\n * would move every other slice to make room for the grouping. The remainder takes the neutral\n * eighth palette slot, which is what that slot is for. */\nexport function groupSmallest(\n slices: readonly DonutChartSlice[],\n limit: number | null,\n otherLabel: string,\n): DonutChartSlice[] {\n if (limit === null || !Number.isInteger(limit) || limit < 2) {\n return [...slices];\n }\n if (slices.length <= limit) {\n return [...slices];\n }\n const ranked = [...slices]\n .map((slice, index) => ({ index, value: positiveValues([slice.value])[0] }))\n .sort((a, b) => b.value - a.value || a.index - b.index);\n const kept = new Set(ranked.slice(0, limit - 1).map((entry) => entry.index));\n const remainder = slices\n .filter((unusedSlice, index) => !kept.has(index))\n .reduce((sum, slice) => sum + positiveValues([slice.value])[0], 0);\n\n return [\n ...slices.filter((unusedSlice, index) => kept.has(index)),\n { id: 'ds-donut-other', label: otherLabel, value: remainder, slot: 8 },\n ];\n}\n\nexport interface DonutArc {\n readonly startAngle: number;\n readonly endAngle: number;\n}\n\n/** A ring is a part-to-whole picture, so anything that is not a positive share\n * becomes zero. Non-finite values go in the same pass: one NaN reaches every\n * other slice through the total, and a `d` attribute holding NaN draws nothing\n * at all rather than failing loudly. */\nexport function positiveValues(values: readonly number[]): number[] {\n return values.map((value) =>\n Number.isFinite(value) && value > 0 ? value : 0,\n );\n}\n\nexport function resolveTotal(values: readonly number[]): number {\n return positiveValues(values).reduce((sum, value) => sum + value, 0);\n}\n\nexport function sliceArcs(values: readonly number[]): DonutArc[] {\n const positive = positiveValues(values);\n const total = resolveTotal(positive);\n if (total <= 0) {\n return positive.map(() => ({ startAngle: 0, endAngle: 0 }));\n }\n let cursor = 0;\n\n return positive.map((value) => {\n const startAngle = cursor;\n cursor += (value / total) * FULL_TURN;\n\n return { startAngle, endAngle: cursor };\n });\n}\n\nexport function resolveInnerRadius(\n outerRadius: number,\n thickness: number,\n): number {\n if (!Number.isFinite(outerRadius) || outerRadius <= 0) {\n return 0;\n }\n // A thickness outside (0, 1] draws no ring: at 0 the band has no width, above\n // 1 the inner radius goes negative. An unusable one falls back to the default\n // instead of rendering an empty chart.\n const ratio =\n Number.isFinite(thickness) && thickness > 0 && thickness <= 1\n ? thickness\n : DEFAULT_THICKNESS;\n\n return outerRadius * (1 - ratio);\n}\n\nexport function paletteIndex(\n slot: number | undefined,\n index: number,\n paletteLength: number,\n): number {\n if (paletteLength <= 0) {\n return 0;\n }\n if (slot !== undefined && Number.isInteger(slot) && slot > 0) {\n return (slot - 1) % paletteLength;\n }\n\n return index % paletteLength;\n}\n\n/** One `\"x y\"` pair for a path. Angles run clockwise from 12 o'clock, where a\n * reader expects a ring to start; SVG's y axis points down, so that is\n * (sin, -cos) rather than the (cos, sin) of the maths convention. */\nexport function ringPoint(\n centerX: number,\n centerY: number,\n radius: number,\n angle: number,\n): string {\n const { x, y } = ringCoords(centerX, centerY, radius, angle);\n\n return `${x} ${y}`;\n}\n\n/** The same point as numbers, for PLACING something rather than drawing a path. */\nexport function ringCoords(\n centerX: number,\n centerY: number,\n radius: number,\n angle: number,\n): { x: number; y: number } {\n return {\n x: round(centerX + radius * Math.sin(angle)),\n y: round(centerY - radius * Math.cos(angle)),\n };\n}\n\nexport function arcPath(\n centerX: number,\n centerY: number,\n outerRadius: number,\n innerRadius: number,\n startAngle: number,\n endAngle: number,\n): string {\n const finite = [\n centerX,\n centerY,\n outerRadius,\n innerRadius,\n startAngle,\n endAngle,\n ].every((value) => Number.isFinite(value));\n if (!finite || outerRadius <= 0) {\n return '';\n }\n const inner = Math.min(Math.max(innerRadius, 0), outerRadius);\n const sweep = endAngle - startAngle;\n if (sweep <= 0) {\n return '';\n }\n if (sweep >= FULL_TURN - FULL_TURN_EPSILON) {\n return fullRingPath(centerX, centerY, outerRadius, inner);\n }\n const largeArcFlag = sweep > Math.PI ? 1 : 0;\n const outerRadii = `${round(outerRadius)} ${round(outerRadius)}`;\n const outerArc =\n `M ${ringPoint(centerX, centerY, outerRadius, startAngle)}` +\n ` A ${outerRadii} 0 ${largeArcFlag} 1 ${ringPoint(centerX, centerY, outerRadius, endAngle)}`;\n if (inner === 0) {\n return `${outerArc} L ${round(centerX)} ${round(centerY)} Z`;\n }\n const innerRadii = `${round(inner)} ${round(inner)}`;\n\n return (\n `${outerArc} L ${ringPoint(centerX, centerY, inner, endAngle)}` +\n ` A ${innerRadii} 0 ${largeArcFlag} 0 ${ringPoint(centerX, centerY, inner, startAngle)} Z`\n );\n}\n\nfunction fullRingPath(\n centerX: number,\n centerY: number,\n outerRadius: number,\n innerRadius: number,\n): string {\n const outer = circlePath(centerX, centerY, outerRadius, 1);\n if (innerRadius <= 0) {\n return outer;\n }\n\n // The hole is cut by winding the inner circle the other way, which the default\n // nonzero fill rule then cancels against the outer one.\n return `${outer} ${circlePath(centerX, centerY, innerRadius, 0)}`;\n}\n\n/** A single arc of a full turn ends where it starts and SVG draws nothing for\n * it, so a closed circle is two half-turns. */\nfunction circlePath(\n centerX: number,\n centerY: number,\n radius: number,\n sweepFlag: 0 | 1,\n): string {\n const top = ringPoint(centerX, centerY, radius, 0);\n const bottom = ringPoint(centerX, centerY, radius, Math.PI);\n const radii = `${round(radius)} ${round(radius)}`;\n\n return `M ${top} A ${radii} 0 1 ${sweepFlag} ${bottom} A ${radii} 0 1 ${sweepFlag} ${top} Z`;\n}\n\nfunction round(value: number): number {\n return Math.round(value * 1000) / 1000;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n input,\n numberAttribute,\n output,\n signal,\n} from '@angular/core';\nimport {\n CHART_SERIES_COLORS,\n defaultChartFormat,\n describeSeries,\n focusMark,\n largestRemainder,\n markAt,\n nextRovingIndex,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { resolveWithConfig } 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 {\n ChartTooltipDirective,\n chartActiveMark,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport type {\n ChartItemTooltipTrigger,\n ChartTooltipContext,\n} from '@ids-group-ltd/ids-design-system/components/chart-tooltip';\nimport {\n DEFAULT_THICKNESS,\n arcPath,\n groupSmallest,\n holeFraction,\n paletteIndex,\n positiveValues,\n resolveInnerRadius,\n resolveTotal,\n ringCoords,\n sliceArcs,\n} from './donut-chart.math';\nimport type { DonutChartSlice } from './donut-chart.types';\n\nconst RING_VIEW_BOX_SIZE = 100;\nconst RING_CENTER = RING_VIEW_BOX_SIZE / 2;\nconst RING_OUTER_RADIUS = RING_VIEW_BOX_SIZE / 2;\n\n@Component({\n selector: 'ds-donut-chart',\n standalone: true,\n imports: [SkeletonComponent, ChartTooltipDirective, IconComponent],\n templateUrl: './donut-chart.component.html',\n styleUrl: './donut-chart.component.scss',\n host: { '[class.framed]': \"frameResolved() === 'auto'\" },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DonutChartComponent {\n /** One slice per entry. A non-positive or non-finite value counts as zero — a ring is a\n * part-to-whole picture and has no way to draw a negative share. */\n readonly data = input.required<readonly DonutChartSlice[]>();\n\n /** Printed inside the ring. Null prints the sum through `valueFormat`. */\n readonly centerValue = input<string | null>(null);\n\n /** Caption under the centre value. */\n readonly centerLabel = input<string | null>(null);\n\n /** Logical placement, so a right-to-left page needs no second value. */\n readonly legend = input<'end' | 'bottom' | 'none'>('end');\n\n /** Longest legend to draw. Past it the smallest slices are summed into one, so a long tail does\n * not become a legend nobody reads. Off by default: grouping changes what the chart says, and\n * that is the consumer's call. Values below 2 are ignored — one slice is not a donut. */\n readonly maxSlices = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Names the grouped slice. */\n readonly otherLabel = input<string>('Other');\n\n /** Ring width as a fraction of the radius. */\n readonly thickness = input(DEFAULT_THICKNESS, { transform: numberAttribute });\n\n /** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;\n * `'none'` leaves the chart bare, for one placed inside a card the page has already drawn.\n * Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'` — whether charts live inside cards\n * is one decision per app rather than per plot. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** How long the tooltip stays after the pointer leaves the mark, in milliseconds. Zero, the\n * default, takes it away at once: a panel that outlives the pointer sits over the plot the\n * reader has moved on to.\n *\n * Raise it only for a panel a reader has to REACH — one carrying a link, a figure, or anything\n * selectable — which is WCAG 1.4.13's hoverable clause. The panel is portaled to the body, so\n * crossing the gap to it at an ordinary pointer speed needs about 140. Unset falls back to\n * `DS_CONFIG.chart.tooltipLingerMs`, then 0. */\n readonly tooltipLingerMs = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n /** Printed above the plot as the chart's visible title, and reused as the annex table's\n * caption. */\n readonly caption = input<string | null>(null);\n\n /** Accessible name. Generated from the data when omitted. */\n readonly summary = input<string | null>(null);\n\n /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,\n * `'visible'` opens it, `'none'` renders none. It is the non-visual route to the numbers, so\n * `'none'` belongs only where the same data is already in a table on the page.\n * Unset falls back to `DS_CONFIG.chart.dataTable`, then `'none'`. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Prints each slice's share of the ring — in the legend, on the tooltip and in the data table.\n * On by default, unlike every other chart, because a ring IS parts of one whole: the share is a\n * real quantity here whatever the data, not a claim the consumer has to make. Off drops all\n * three, for a ring whose slices are already labelled in percent. */\n readonly partOfWhole = input(true, { transform: booleanAttribute });\n\n /** Draws skeleton marks in place of the data, at the same count, so the chart does not resize\n * when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_CONFIG.chart.emptyText`, then `'No data'`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shows `errorText` in place of the plot. Separate from `loading` and from an empty `data`,\n * because \"the request failed\" and \"there is nothing to show\" read the same to a reader and\n * mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** The message the error state prints. Unset falls back to `DS_CONFIG.chart.errorText`, then\n * `'Could not load the data'`. */\n readonly errorText = input<string | null>(null);\n /** Formats every value the chart prints, the annex table and the generated description\n * included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale\n * grouping with a K/M/B suffix past four digits. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n readonly frameResolved = resolveWithConfig(\n this.frame,\n (config) => config.chart?.frame,\n 'auto' as ChartFrame,\n );\n readonly dataTableResolved = resolveWithConfig(\n this.dataTable,\n (config) => config.chart?.dataTable,\n 'none' as ChartDataTable,\n );\n readonly emptyTextResolved = resolveWithConfig(\n this.emptyText,\n (config) => config.chart?.emptyText,\n 'No data',\n );\n readonly errorTextResolved = resolveWithConfig(\n this.errorText,\n (config) => config.chart?.errorText,\n 'Could not load the data',\n );\n readonly valueFormatResolved = resolveWithConfig(\n this.valueFormat,\n (config) => config.chart?.valueFormat,\n defaultChartFormat,\n );\n\n /** Turns on the click affordance — the pointer cursor and any hover tint.\n * The click output fires whether or not this is set, so a consumer that\n * binds the output and forgets the flag still receives every click. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** The slice that was clicked, or activated with Enter or Space. Fires whether or not\n * `interactive` is set. */\n readonly sliceClicked = output<DonutChartSlice>();\n\n /** Holds the hovered mark and its tooltip in place when it is clicked, until Escape or a press\n * outside releases it. Off by default: a click is already the drill-down hook, and a mark left\n * lit after the pointer has gone needs a reader who knows why it is lit. `sliceClicked` fires\n * either way — pinning is a state, not a handler. */\n readonly pinOnClick = input(false, { transform: booleanAttribute });\n\n /** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the\n * one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed\n * marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full\n * opacity to 2.1 at `--ds-chart-dim-opacity`'s default 0.3 — so it buys loudness for one mark\n * and pays for it with the rest of the chart. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Accepted for parity with the other four charts and deliberately without effect here: a ring\n * arrives as ONE object, because arcs share their edges and fading them one at a time lets the\n * background through every seam. There is nothing to stagger. */\n readonly staggerMs = input(0, { transform: numberAttribute });\n\n /** Whether a hovered or focused slice opens a tooltip. `'axis'` is not offered — a ring\n * has no axis to group readings under. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n protected readonly tooltipTemplate =\n contentChild<TemplateRef<{ $implicit: ChartTooltipContext }>>(\n 'dsChartTooltip',\n );\n\n private readonly tooltipLingerResolved = resolveWithConfig(\n this.tooltipLingerMs,\n (config) => config.chart?.tooltipLingerMs,\n 0,\n );\n\n protected readonly activeMark = chartActiveMark(() =>\n this.tooltipLingerResolved(),\n );\n\n protected onMarkClick(\n payload: DonutChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(payload);\n if (this.pinOnClick()) {\n this.activeMark.pin(index, event);\n }\n }\n /** One tab stop per chart, not one per slice: WCAG 2.1.1's Understanding is explicit that not\n * every mouse-operable control has to be separately focusable. */\n protected readonly rovingIndex = signal(0);\n\n protected readonly tabStopIndex = computed(() =>\n Math.min(this.rovingIndex(), Math.max(0, this.slices().length - 1)),\n );\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.rovingIndex.set(index);\n this.activeMark.enter(index, event);\n }\n\n /** A legend item stands for its arc, so it opens the arc's tooltip over the ARC and dims the\n * other slices — the same state hovering the arc itself produces. */\n protected onLegendEnter(index: number, event: Event): void {\n this.activeMark.enter(index, event, this.arcAt(event, index));\n }\n\n protected onLegendFocus(index: number, event: FocusEvent): void {\n this.rovingIndex.set(index);\n this.onLegendEnter(index, event);\n }\n\n protected onLegendClick(\n slice: DonutChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(slice);\n if (this.pinOnClick()) {\n this.activeMark.pin(index, event, this.arcAt(event, index));\n }\n }\n\n private arcAt(event: Event, index: number): Element | null {\n return markAt(\n (event.currentTarget as Element).closest('.chart'),\n index,\n '.slice',\n );\n }\n\n protected isDimmed(index: number): boolean {\n return (\n this.dimOthers() &&\n this.activeMark.index() !== -1 &&\n this.activeMark.index() !== index\n );\n }\n\n protected onMarkNavigation(\n event: KeyboardEvent,\n index: number,\n scope: string,\n ): void {\n const next = nextRovingIndex(event.key, index, this.slices().length);\n if (next === null) {\n return;\n }\n event.preventDefault();\n this.rovingIndex.set(next);\n focusMark((event.currentTarget as Element).closest(scope), next);\n }\n\n protected readonly tooltipContext = computed<ChartTooltipContext | null>(\n () => {\n const entry = this.slices()[this.activeMark.index()];\n if (this.tooltip() === 'none' || !entry) {\n return null;\n }\n\n return {\n category: '',\n entries: [\n {\n label: entry.slice.label,\n value: entry.slice.value,\n formatted: this.partOfWhole()\n ? `${entry.formattedValue} · ${entry.formattedPercent}`\n : entry.formattedValue,\n color: entry.color,\n },\n ],\n };\n },\n );\n\n protected readonly viewBox = `0 0 ${RING_VIEW_BOX_SIZE} ${RING_VIEW_BOX_SIZE}`;\n\n protected readonly total = computed(() =>\n resolveTotal(this.data().map((slice) => slice.value)),\n );\n\n protected readonly visibleSlices = computed(() =>\n groupSmallest(this.data(), this.maxSlices(), this.otherLabel()),\n );\n\n protected readonly slices = computed(() => {\n const data = this.visibleSlices();\n const values = data.map((slice) => slice.value);\n const arcs = sliceArcs(values);\n const percents = largestRemainder(positiveValues(values));\n const innerRadius = resolveInnerRadius(RING_OUTER_RADIUS, this.thickness());\n const format = (value: number) =>\n this.valueFormatResolved()(value, 'tooltip');\n\n const midRadius = (RING_OUTER_RADIUS + innerRadius) / 2;\n\n return data.map((slice, index) => ({\n slice,\n // Halfway along the arc and halfway through the ring: the one point that is inside a slice\n // whatever its sweep, which the bounding box of a curved wedge is not.\n center: ringCoords(\n RING_CENTER,\n RING_CENTER,\n midRadius,\n (arcs[index].startAngle + arcs[index].endAngle) / 2,\n ),\n path: arcPath(\n RING_CENTER,\n RING_CENTER,\n RING_OUTER_RADIUS,\n innerRadius,\n arcs[index].startAngle,\n arcs[index].endAngle,\n ),\n color:\n CHART_SERIES_COLORS[\n paletteIndex(slice.slot, index, CHART_SERIES_COLORS.length)\n ],\n formattedValue: format(slice.value),\n formattedPercent: `${percents[index]}%`,\n }));\n });\n\n protected readonly resolvedCenterValue = computed(\n () =>\n this.centerValue() ?? this.valueFormatResolved()(this.total(), 'tooltip'),\n );\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.caption() ?? 'Chart',\n this.data().map((slice) => ({\n label: slice.label,\n value: slice.value,\n })),\n (value) => this.valueFormatResolved()(value, 'tooltip'),\n this.dataTableResolved() !== 'none',\n ),\n );\n\n protected readonly hole = computed(() => holeFraction(this.thickness()));\n\n protected entryLabel(entry: {\n slice: DonutChartSlice;\n formattedValue: string;\n formattedPercent: string;\n }) {\n return this.partOfWhole()\n ? `${entry.slice.label}, ${entry.formattedValue}, ${entry.formattedPercent}`\n : `${entry.slice.label}, ${entry.formattedValue}`;\n }\n\n protected onSliceKey(slice: DonutChartSlice, event: Event): void {\n // Only the legend item's own key opens it: a key pressed on a control inside belongs to that\n // control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.sliceClicked.emit(slice);\n }\n\n // Both focusable would double the tab order; the legend items already carry the route.\n // Without this the ring is unreachable at `legend=\"none\"`.\n protected readonly ringCarriesTheRoute = computed(\n () => this.interactive() && this.legend() === 'none',\n );\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n /** Placeholder legend rows while loading. Follows the real slice count so the\n * chart does not resize when the data lands; falls back to three when `data`\n * is still empty. */\n protected readonly skeletonRows = computed(() =>\n Array.from({ length: Math.max(this.data().length, 3) }),\n );\n}\n","<figure\n class=\"donut-chart\"\n [style.--_donut-chart-hole-fraction]=\"hole()\">\n @if (activeMark.pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"activeMark.release()\">\n Unpin\n </button>\n }\n\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p\n class=\"empty-text is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n </div>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\"\n [class.legend-bottom]=\"legend() === 'bottom'\">\n <ds-skeleton\n circle\n width=\"var(--_donut-chart-size)\"\n height=\"var(--_donut-chart-size)\" />\n\n @if (legend() !== 'none') {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonRows(); track $index) {\n <ds-skeleton height=\"var(--_donut-chart-legend-row-height)\" />\n }\n </div>\n }\n </div>\n } @else if (isEmpty()) {\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p class=\"empty-text\">\n {{ emptyTextResolved() }}\n </p>\n </div>\n } @else {\n <div\n class=\"chart\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [class.legend-bottom]=\"legend() === 'bottom'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipPreferBelow]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <div\n class=\"ring\"\n [class.ring-outline]=\"total() === 0\">\n <svg\n class=\"ring-svg\"\n animate.enter=\"mark-enter\"\n [class.dims-others]=\"dimOthers()\"\n [attr.aria-hidden]=\"ringCarriesTheRoute() ? null : true\"\n [attr.viewBox]=\"viewBox\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <path\n class=\"slice\"\n [class.interactive]=\"interactive()\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === index\n \"\n [class.is-dimmed]=\"isDimmed(index)\"\n [class.focusable]=\"ringCarriesTheRoute()\"\n [attr.d]=\"entry.path\"\n [style.fill]=\"entry.color\"\n [attr.role]=\"ringCarriesTheRoute() ? 'button' : null\"\n [attr.tabindex]=\"\n ringCarriesTheRoute()\n ? index === tabStopIndex()\n ? 0\n : -1\n : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"\n ringCarriesTheRoute() ? entryLabel(entry) : null\n \"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.ring-svg')\"\n (click)=\"onMarkClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n </path>\n\n @if (activeMark.pinned() && activeMark.index() === index) {\n <foreignObject\n class=\"pin-marker\"\n width=\"14\"\n height=\"14\"\n [attr.x]=\"entry.center.x - 7\"\n [attr.y]=\"entry.center.y - 7\">\n <ds-icon\n name=\"pin\"\n [size]=\"14\" />\n </foreignObject>\n }\n }\n </svg>\n\n <div class=\"center\">\n <span class=\"center-value\">\n {{ resolvedCenterValue() }}\n </span>\n\n @if (centerLabel()) {\n <span class=\"center-label\">\n {{ centerLabel() }}\n </span>\n }\n </div>\n </div>\n\n @if (legend() !== 'none') {\n <ul class=\"legend\">\n @for (entry of slices(); track entry.slice.id; let index = $index) {\n <li\n class=\"legend-item\"\n [class.interactive]=\"interactive()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"onLegendEnter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onLegendFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index, '.legend')\"\n (click)=\"onLegendClick(entry.slice, index, $event)\"\n (keydown.enter)=\"onSliceKey(entry.slice, $event)\"\n (keydown.space)=\"onSliceKey(entry.slice, $event)\">\n <span\n class=\"swatch\"\n animate.enter=\"mark-enter\"\n [style.background]=\"entry.color\">\n </span>\n\n <span class=\"legend-label\">\n {{ entry.slice.label }}\n </span>\n\n <span class=\"legend-value\">\n {{ entry.formattedValue }}\n </span>\n\n @if (partOfWhole()) {\n <span class=\"legend-percent\">\n {{ entry.formattedPercent }}\n </span>\n }\n </li>\n }\n </ul>\n }\n </div>\n\n @if (dataTableResolved() !== 'none') {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n @if (partOfWhole()) {\n <th scope=\"col\">\n Share of total\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (entry of slices(); track entry.slice.id) {\n <tr>\n <td>\n {{ entry.slice.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n\n @if (partOfWhole()) {\n <td>\n {{ entry.formattedPercent }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </details>\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEA,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;AAC7B,MAAM,iBAAiB,GAAG,IAAI;AAEvB,MAAM,iBAAiB,GAAG,IAAI;AAErC;AACsC;AAChC,SAAU,YAAY,CAAC,SAAiB,EAAA;AAC5C,IAAA,MAAM,KAAK,GACT,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,IAAI,SAAS,IAAI;AAC1D,UAAE;UACA,iBAAiB;AAEvB,IAA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B;;AAEG;;;;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, booleanAttribute,
|
|
3
|
-
import {
|
|
2
|
+
import { input, booleanAttribute, numberAttribute, output, contentChild, computed, signal, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import { formatPercent, defaultChartFormat, staggerDelay, markAt, nextRovingIndex, focusMark, chartColors, CHART_RAMP_COLORS, describeSeries } from '@ids-group-ltd/ids-design-system/components';
|
|
4
4
|
import { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';
|
|
5
|
+
import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
|
|
5
6
|
import { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';
|
|
6
7
|
import { chartActiveMark, ChartTooltipDirective } from '@ids-group-ltd/ids-design-system/components/chart-tooltip';
|
|
7
8
|
|
|
@@ -202,8 +203,26 @@ function stagePolygonPoints(geometry, viewBoxWidth, viewBoxHeight, gapUnits) {
|
|
|
202
203
|
`${roundCoordinate(horizontalCentre - halfBottomWidth)},${roundCoordinate(bottom)}`,
|
|
203
204
|
].join(' ');
|
|
204
205
|
}
|
|
206
|
+
/** The middle of a band, for placing a marker inside it. The x is the viewBox centre because every
|
|
207
|
+
* funnel band is symmetrical about it, whatever its two widths.
|
|
208
|
+
*
|
|
209
|
+
* @internal */
|
|
210
|
+
function stageCenter(geometry, viewBoxWidth, viewBoxHeight) {
|
|
211
|
+
const top = clampFraction(geometry.top) * viewBoxHeight;
|
|
212
|
+
const bottom = clampFraction(geometry.bottom) * viewBoxHeight;
|
|
213
|
+
return { x: viewBoxWidth / 2, y: (top + bottom) / 2 };
|
|
214
|
+
}
|
|
205
215
|
|
|
206
|
-
|
|
216
|
+
/** The Drop cell, in whichever unit the chart was asked for. A null fall is the first stage, which
|
|
217
|
+
* has nothing above it to fall from. */
|
|
218
|
+
function formatDrop(fraction, count, mode, format) {
|
|
219
|
+
if (mode === 'none' || fraction === null) {
|
|
220
|
+
return '—';
|
|
221
|
+
}
|
|
222
|
+
return mode === 'absolute' && count !== null
|
|
223
|
+
? `−${format(Math.abs(count))}`
|
|
224
|
+
: formatPercent(fraction, 1);
|
|
225
|
+
}
|
|
207
226
|
const SKELETON_STAGE_WIDTHS = ['88%', '62%', '80%', '54%', '72%'];
|
|
208
227
|
class FunnelChartComponent {
|
|
209
228
|
/** Drawn in the order given. The order of a funnel's stages is its meaning,
|
|
@@ -219,6 +238,20 @@ class FunnelChartComponent {
|
|
|
219
238
|
* `dataTable`: while this is on, the disclosure every chart carries would
|
|
220
239
|
* repeat a strict subset of these same numbers, so it is not rendered. */
|
|
221
240
|
showTable = input(true, { ...(ngDevMode ? { debugName: "showTable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
241
|
+
/** Whether the chart draws its own bordered, padded box. `'auto'`, the default, draws it;
|
|
242
|
+
* `'none'` leaves the chart bare, for one placed inside a card the page has already drawn.
|
|
243
|
+
* Unset falls back to `DS_CONFIG.chart.frame`, then `'auto'` — whether charts live inside cards
|
|
244
|
+
* is one decision per app rather than per plot. */
|
|
245
|
+
frame = input(null, ...(ngDevMode ? [{ debugName: "frame" }] : /* istanbul ignore next */ []));
|
|
246
|
+
/** How long the tooltip stays after the pointer leaves the mark, in milliseconds. Zero, the
|
|
247
|
+
* default, takes it away at once: a panel that outlives the pointer sits over the plot the
|
|
248
|
+
* reader has moved on to.
|
|
249
|
+
*
|
|
250
|
+
* Raise it only for a panel a reader has to REACH — one carrying a link, a figure, or anything
|
|
251
|
+
* selectable — which is WCAG 1.4.13's hoverable clause. The panel is portaled to the body, so
|
|
252
|
+
* crossing the gap to it at an ordinary pointer speed needs about 140. Unset falls back to
|
|
253
|
+
* `DS_CONFIG.chart.tooltipLingerMs`, then 0. */
|
|
254
|
+
tooltipLingerMs = input(null, { ...(ngDevMode ? { debugName: "tooltipLingerMs" } : /* istanbul ignore next */ {}), transform: (raw) => (raw == null ? null : numberAttribute(raw)) });
|
|
222
255
|
/** Printed above the plot as the chart's visible title, and reused as the annex table's
|
|
223
256
|
* caption. */
|
|
224
257
|
caption = input(null, ...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
|
|
@@ -228,6 +261,9 @@ class FunnelChartComponent {
|
|
|
228
261
|
* already prints every label and value. Unset falls back to `DS_CONFIG.chart.dataTable`, then
|
|
229
262
|
* `'toggle'`. */
|
|
230
263
|
dataTable = input(null, ...(ngDevMode ? [{ debugName: "dataTable" }] : /* istanbul ignore next */ []));
|
|
264
|
+
/** What the Drop column reports: `'relative'` (the default) the share that leaked at this
|
|
265
|
+
* stage, `'absolute'` the count, `'none'` no column at all. */
|
|
266
|
+
drop = input('relative', ...(ngDevMode ? [{ debugName: "drop" }] : /* istanbul ignore next */ []));
|
|
231
267
|
/** Draws skeleton marks in place of the data, at the same count, so the chart does not resize
|
|
232
268
|
* when the data lands. */
|
|
233
269
|
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
@@ -245,10 +281,11 @@ class FunnelChartComponent {
|
|
|
245
281
|
* included. Unset falls back to `DS_CONFIG.chart.valueFormat`, then the browser's locale
|
|
246
282
|
* grouping with a K/M/B suffix past four digits. */
|
|
247
283
|
valueFormat = input(null, ...(ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []));
|
|
248
|
-
|
|
284
|
+
frameResolved = resolveWithConfig(this.frame, (config) => config.chart?.frame, 'auto');
|
|
285
|
+
dataTableResolved = resolveWithConfig(this.dataTable, (config) => config.chart?.dataTable, 'none');
|
|
249
286
|
emptyTextResolved = resolveWithConfig(this.emptyText, (config) => config.chart?.emptyText, 'No data');
|
|
250
287
|
errorTextResolved = resolveWithConfig(this.errorText, (config) => config.chart?.errorText, 'Could not load the data');
|
|
251
|
-
valueFormatResolved = resolveWithConfig(this.valueFormat, (config) => config.chart?.valueFormat,
|
|
288
|
+
valueFormatResolved = resolveWithConfig(this.valueFormat, (config) => config.chart?.valueFormat, defaultChartFormat);
|
|
252
289
|
/** Turns on the click affordance — the pointer cursor and any hover tint.
|
|
253
290
|
* The click output fires whether or not this is set, so a consumer that
|
|
254
291
|
* binds the output and forgets the flag still receives every click. */
|
|
@@ -256,6 +293,11 @@ class FunnelChartComponent {
|
|
|
256
293
|
/** The stage that was clicked, or activated with Enter or Space. Fires whether or not
|
|
257
294
|
* `interactive` is set. */
|
|
258
295
|
stageClicked = output();
|
|
296
|
+
/** Holds the hovered mark and its tooltip in place when it is clicked, until Escape or a press
|
|
297
|
+
* outside releases it. Off by default: a click is already the drill-down hook, and a mark left
|
|
298
|
+
* lit after the pointer has gone needs a reader who knows why it is lit. `stageClicked` fires
|
|
299
|
+
* either way — pinning is a state, not a handler. */
|
|
300
|
+
pinOnClick = input(false, { ...(ngDevMode ? { debugName: "pinOnClick" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
259
301
|
/** Dims every OTHER mark while one is hovered or focused, so the reader's eye is held on the
|
|
260
302
|
* one under the pointer. Off by default: the dimming costs the separation BETWEEN the dimmed
|
|
261
303
|
* marks — measured 2026-09-13, the worst pair of three dimmed series falls from dE 14.8 at full
|
|
@@ -273,7 +315,27 @@ class FunnelChartComponent {
|
|
|
273
315
|
* funnel's stages are its categories, so an axis tooltip would repeat the item one. */
|
|
274
316
|
tooltip = input('item', ...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
275
317
|
tooltipTemplate = contentChild('dsChartTooltip', ...(ngDevMode ? [{ debugName: "tooltipTemplate" }] : /* istanbul ignore next */ []));
|
|
276
|
-
|
|
318
|
+
tooltipLingerResolved = resolveWithConfig(this.tooltipLingerMs, (config) => config.chart?.tooltipLingerMs, 0);
|
|
319
|
+
activeMark = chartActiveMark(() => this.tooltipLingerResolved());
|
|
320
|
+
/** Where the badge goes, as a percentage of the shape's box. Percentages rather than viewBox
|
|
321
|
+
* units because this svg is `preserveAspectRatio="none"`: it stretches horizontally with the
|
|
322
|
+
* card, and anything measured in user units stretches with it. */
|
|
323
|
+
pinnedCenter = computed(() => {
|
|
324
|
+
const entry = this.stages()[this.activeMark.index()];
|
|
325
|
+
if (!this.activeMark.pinned() || !entry) {
|
|
326
|
+
return null;
|
|
327
|
+
}
|
|
328
|
+
return {
|
|
329
|
+
xPercent: (entry.center.x / FUNNEL_VIEW_BOX_WIDTH) * 100,
|
|
330
|
+
yPercent: (entry.center.y / FUNNEL_VIEW_BOX_HEIGHT) * 100,
|
|
331
|
+
};
|
|
332
|
+
}, ...(ngDevMode ? [{ debugName: "pinnedCenter" }] : /* istanbul ignore next */ []));
|
|
333
|
+
onMarkClick(payload, index, event) {
|
|
334
|
+
this.stageClicked.emit(payload);
|
|
335
|
+
if (this.pinOnClick()) {
|
|
336
|
+
this.activeMark.pin(index, event);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
277
339
|
/** One tab stop per chart, not one per mark: WCAG 2.1.1's Understanding is explicit that not
|
|
278
340
|
* every mouse-operable control has to be separately focusable, and that is what keeps a
|
|
279
341
|
* twenty-five mark chart from being twenty-five stops in the page's tab order. */
|
|
@@ -283,6 +345,16 @@ class FunnelChartComponent {
|
|
|
283
345
|
this.rovingIndex.set(index);
|
|
284
346
|
this.activeMark.enter(index, event);
|
|
285
347
|
}
|
|
348
|
+
/** A table row stands for its band, so it opens the band's tooltip over the BAND and dims the
|
|
349
|
+
* others — the same state hovering the band itself produces. */
|
|
350
|
+
onRowEnter(index, event) {
|
|
351
|
+
this.activeMark.enter(index, event, markAt(event.currentTarget.closest('figure'), index, '.stage'));
|
|
352
|
+
}
|
|
353
|
+
isDimmed(index) {
|
|
354
|
+
return (this.dimOthers() &&
|
|
355
|
+
this.activeMark.index() !== -1 &&
|
|
356
|
+
this.activeMark.index() !== index);
|
|
357
|
+
}
|
|
286
358
|
onMarkNavigation(event, index) {
|
|
287
359
|
const next = nextRovingIndex(event.key, index, this.stages().length);
|
|
288
360
|
if (next === null) {
|
|
@@ -323,7 +395,7 @@ class FunnelChartComponent {
|
|
|
323
395
|
const geometry = funnelGeometry(values, this.shape());
|
|
324
396
|
const drops = stageDrops(values);
|
|
325
397
|
const gapUnits = stageGapUnits(data.length, FUNNEL_VIEW_BOX_HEIGHT);
|
|
326
|
-
const format = this.valueFormatResolved();
|
|
398
|
+
const format = (value) => this.valueFormatResolved()(value, 'tooltip');
|
|
327
399
|
// Every stage is a share of the funnel's mouth, not of the column total:
|
|
328
400
|
// the stages are nested subsets, so they do not add up to 100%.
|
|
329
401
|
const firstValue = values.length ? values[0] : 0;
|
|
@@ -335,10 +407,13 @@ class FunnelChartComponent {
|
|
|
335
407
|
const drop = drops[index];
|
|
336
408
|
return {
|
|
337
409
|
stage,
|
|
410
|
+
// The middle of the band, for the marker that says this one is held. A polygon has no
|
|
411
|
+
// centre of its own, and its bounding box centre drifts outside a steeply tapered band.
|
|
412
|
+
center: stageCenter(geometry[index], FUNNEL_VIEW_BOX_WIDTH, FUNNEL_VIEW_BOX_HEIGHT),
|
|
338
413
|
points: stagePolygonPoints(geometry[index], FUNNEL_VIEW_BOX_WIDTH, FUNNEL_VIEW_BOX_HEIGHT, gapUnits),
|
|
339
414
|
formattedValue: format(stage.value),
|
|
340
415
|
formattedPercent: formatPercent(stage.value, firstValue),
|
|
341
|
-
formattedDrop: drop
|
|
416
|
+
formattedDrop: formatDrop(drop, index > 0 ? values[index - 1] - stage.value : null, this.drop(), format),
|
|
342
417
|
color: index === lastIndex
|
|
343
418
|
? chartColors.seriesAccent
|
|
344
419
|
: CHART_RAMP_COLORS[rampPosition(index, lastIndex, CHART_RAMP_COLORS.length)],
|
|
@@ -349,7 +424,7 @@ class FunnelChartComponent {
|
|
|
349
424
|
describeSeries(this.caption() ?? 'Chart', this.data().map((stage) => ({
|
|
350
425
|
label: stage.label,
|
|
351
426
|
value: stage.value,
|
|
352
|
-
})), this.valueFormatResolved(), this.showTable() || this.dataTableResolved() !== 'none'), ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
|
|
427
|
+
})), (value) => this.valueFormatResolved()(value, 'tooltip'), this.showTable() || this.dataTableResolved() !== 'none'), ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
|
|
353
428
|
entryLabel(entry) {
|
|
354
429
|
return `${entry.stage.label}, ${entry.formattedValue}`;
|
|
355
430
|
}
|
|
@@ -373,12 +448,12 @@ class FunnelChartComponent {
|
|
|
373
448
|
* table's skeleton rows. */
|
|
374
449
|
skeletonStages = computed(() => Array.from({ length: Math.max(this.data().length, 3) }, (unusedEntry, index) => SKELETON_STAGE_WIDTHS[index % SKELETON_STAGE_WIDTHS.length]), ...(ngDevMode ? [{ debugName: "skeletonStages" }] : /* istanbul ignore next */ []));
|
|
375
450
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: FunnelChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
376
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: FunnelChartComponent, isStandalone: true, selector: "ds-funnel-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, showTable: { classPropertyName: "showTable", publicName: "showTable", 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 }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", 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 }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, dimOthers: { classPropertyName: "dimOthers", publicName: "dimOthers", isSignal: true, isRequired: false, transformFunction: null }, staggerMs: { classPropertyName: "staggerMs", publicName: "staggerMs", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stageClicked: "stageClicked" }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["dsChartTooltip"], descendants: true, isSignal: true }], ngImport: i0, template: "<figure class=\"funnel-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()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholderWidth of skeletonStages(); track $index) {\n <ds-skeleton\n height=\"calc(var(--_funnel-chart-stage-height) - var(--_funnel-chart-stage-gap))\"\n [width]=\"placeholderWidth\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <div\n class=\"shape\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <svg\n preserveAspectRatio=\"none\"\n [attr.aria-hidden]=\"interactive() ? null : true\"\n [attr.viewBox]=\"viewBox\"\n [style.block-size]=\"chartHeight()\">\n @for (entry of stages(); track entry.stage.id; let index = $index) {\n <polygon\n class=\"stage\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [attr.stroke-width]=\"hitGapUnits()\"\n [style.--_chart-mark-stagger]=\"markStagger(index)\"\n [class.interactive]=\"interactive()\"\n [attr.points]=\"entry.points\"\n [attr.fill]=\"entry.color\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index)\"\n (click)=\"stageClicked.emit(entry.stage)\"\n (keydown.enter)=\"onStageKey(entry.stage, $event)\"\n (keydown.space)=\"onStageKey(entry.stage, $event)\">\n </polygon>\n }\n </svg>\n </div>\n\n @if (showTable()) {\n <table class=\"stage-table\">\n <caption class=\"visually-hidden\">\n Each stage as a percentage of the first, and the drop from the stage\n above it.\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Stage\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n <th scope=\"col\">\n Percent\n </th>\n\n <th scope=\"col\">\n Drop\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of stages(); track entry.stage.id) {\n <tr>\n <th scope=\"row\">\n <span\n class=\"swatch\"\n animate.enter=\"mark-enter\"\n aria-hidden=\"true\"\n [style.background]=\"entry.color\">\n </span>\n\n {{ entry.stage.label }}\n </th>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n\n <td>\n {{ entry.formattedPercent }}\n </td>\n\n <td>\n {{ entry.formattedDrop }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n }\n\n @if (showDataTable()) {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of stages(); track entry.stage.id) {\n <tr>\n <td>\n {{ entry.stage.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </details>\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)}}@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.stage.mark-enter{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(--_chart-mark-stagger, 0ms)) both}.stage.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.swatch.mark-enter{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(--_chart-mark-stagger, 0ms)) both}.swatch.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;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{--_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)}.funnel-chart{--_funnel-chart-stage-height: var(--ds-funnel-chart-stage-height, 44px);--_funnel-chart-stage-gap: var(--ds-funnel-chart-stage-gap, var(--ds-chart-bar-gap));--_funnel-chart-row-gap: var(--ds-funnel-chart-row-gap, var(--space-4));--_funnel-chart-focus-color: var(--ds-funnel-chart-focus-color, var(--focus-ring-color));--_funnel-chart-focus-width: var(--ds-funnel-chart-focus-width, var(--focus-ring-width));position:relative;overflow-x:auto;margin:0}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{display:grid;place-items:center;min-block-size:calc(3 * (var(--_funnel-chart-stage-height) + var(--_funnel-chart-stage-gap)));margin:0;color:var(--text-secondary);text-align:center}.shape{display:block}svg{display:block;inline-size:100%}.stage{stroke:transparent}@media not (forced-colors:active){.stage.interactive:focus-visible{outline:none}}.stage.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 1px var(--ds-chart-focus-halo-color)) drop-shadow(0 0 1px var(--ds-chart-focus-halo-color))}.skeleton{display:grid;row-gap:var(--_funnel-chart-stage-gap)}.stage-table{inline-size:100%;margin-block-start:var(--_funnel-chart-row-gap);border-collapse:collapse;font-variant-numeric:tabular-nums}.stage-table th,.stage-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.stage-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.stage-table thead th:first-child{text-align:start}.stage-table td{padding-inline-start:var(--space-3)}.stage-table th[scope=row]{color:var(--text-secondary);font-weight:400;text-align:start}.swatch{display:inline-block;inline-size:var(--space-2);block-size:var(--space-2);margin-inline-end:var(--space-2);border-radius:var(--radius-sm)}.empty.is-error{color:var(--error)}.shape .stage{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.shape .stage.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.shape.dims-others:has(.stage.interactive:hover) .stage.interactive:not(:hover),.shape.dims-others:has(.stage.interactive:focus-visible) .stage.interactive:not(:focus-visible){opacity:var(--ds-chart-dim-opacity)}.shape .stage.interactive{cursor:pointer}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
451
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: FunnelChartComponent, isStandalone: true, selector: "ds-funnel-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, showTable: { classPropertyName: "showTable", publicName: "showTable", isSignal: true, isRequired: false, transformFunction: null }, frame: { classPropertyName: "frame", publicName: "frame", isSignal: true, isRequired: false, transformFunction: null }, tooltipLingerMs: { classPropertyName: "tooltipLingerMs", publicName: "tooltipLingerMs", 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 }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, drop: { classPropertyName: "drop", publicName: "drop", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", 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 }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, pinOnClick: { classPropertyName: "pinOnClick", publicName: "pinOnClick", isSignal: true, isRequired: false, transformFunction: null }, dimOthers: { classPropertyName: "dimOthers", publicName: "dimOthers", isSignal: true, isRequired: false, transformFunction: null }, staggerMs: { classPropertyName: "staggerMs", publicName: "staggerMs", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stageClicked: "stageClicked" }, host: { properties: { "class.framed": "frameResolved() === 'auto'" } }, queries: [{ propertyName: "tooltipTemplate", first: true, predicate: ["dsChartTooltip"], descendants: true, isSignal: true }], ngImport: i0, template: "<figure class=\"funnel-chart\">\n @if (activeMark.pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"activeMark.release()\">\n 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()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholderWidth of skeletonStages(); track $index) {\n <ds-skeleton\n height=\"calc(var(--_funnel-chart-stage-height) - var(--_funnel-chart-stage-gap))\"\n [width]=\"placeholderWidth\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <div\n class=\"shape\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipPreferBelow]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <svg\n preserveAspectRatio=\"none\"\n [attr.aria-hidden]=\"interactive() ? null : true\"\n [attr.viewBox]=\"viewBox\"\n [style.block-size]=\"chartHeight()\">\n @for (entry of stages(); track entry.stage.id; let index = $index) {\n <polygon\n class=\"stage\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [attr.stroke-width]=\"hitGapUnits()\"\n [style.--_chart-mark-stagger]=\"markStagger(index)\"\n [class.interactive]=\"interactive()\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === index\n \"\n [class.is-dimmed]=\"isDimmed(index)\"\n [attr.points]=\"entry.points\"\n [attr.fill]=\"entry.color\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index)\"\n (click)=\"onMarkClick(entry.stage, index, $event)\"\n (keydown.enter)=\"onStageKey(entry.stage, $event)\"\n (keydown.space)=\"onStageKey(entry.stage, $event)\">\n </polygon>\n }\n </svg>\n\n @if (pinnedCenter(); as center) {\n <span\n class=\"pin-marker\"\n [style.left.%]=\"center.xPercent\"\n [style.top.%]=\"center.yPercent\">\n <ds-icon\n name=\"pin\"\n [size]=\"13\" />\n </span>\n }\n </div>\n\n @if (showTable()) {\n <table class=\"stage-table\">\n <caption class=\"visually-hidden\">\n Each stage as a percentage of the first, and the drop from the stage\n above it.\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Stage\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n <th scope=\"col\">\n Percent\n </th>\n\n @if (drop() !== 'none') {\n <th scope=\"col\">\n Drop\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (entry of stages(); track entry.stage.id; let index = $index) {\n <tr\n (pointerenter)=\"onRowEnter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\">\n <th scope=\"row\">\n <span\n class=\"swatch\"\n animate.enter=\"mark-enter\"\n aria-hidden=\"true\"\n [style.background]=\"entry.color\">\n </span>\n\n {{ entry.stage.label }}\n </th>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n\n <td>\n {{ entry.formattedPercent }}\n </td>\n\n @if (drop() !== 'none') {\n <td>\n {{ entry.formattedDrop }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n }\n\n @if (showDataTable()) {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of stages(); track entry.stage.id) {\n <tr>\n <td>\n {{ entry.stage.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </details>\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)}}@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.stage.mark-enter{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(--_chart-mark-stagger, 0ms)) both}.stage.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.swatch.mark-enter{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(--_chart-mark-stagger, 0ms)) both}.swatch.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}: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,figcaption{-webkit-user-select:text;user-select:text}@media not (forced-colors:active){.stage:focus{outline:none}}.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)}.funnel-chart{--_funnel-chart-stage-height: var(--ds-funnel-chart-stage-height, 44px);--_funnel-chart-stage-gap: var(--ds-funnel-chart-stage-gap, var(--ds-chart-bar-gap));--_funnel-chart-row-gap: var(--ds-funnel-chart-row-gap, var(--space-4));--_funnel-chart-focus-color: var(--ds-funnel-chart-focus-color, var(--focus-ring-color));--_funnel-chart-focus-width: var(--ds-funnel-chart-focus-width, var(--focus-ring-width));position:relative;overflow-x:auto;margin:0}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{display:grid;place-items:center;min-block-size:calc(3 * (var(--_funnel-chart-stage-height) + var(--_funnel-chart-stage-gap)));margin:0;color:var(--text-secondary);text-align:center}.shape{display:block}svg{display:block;inline-size:100%}.stage{stroke:transparent}@media not (forced-colors:active){.stage.interactive:focus-visible{outline:none}}.stage.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color))}.skeleton{display:grid;row-gap:var(--_funnel-chart-stage-gap)}.stage-table{inline-size:100%;margin-block-start:var(--_funnel-chart-row-gap);border-collapse:collapse;font-variant-numeric:tabular-nums}.stage-table th,.stage-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.stage-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.stage-table thead th:first-child{text-align:start}.stage-table td{padding-inline-start:var(--space-3)}.stage-table th[scope=row]{color:var(--text-secondary);font-weight:400;text-align:start}.swatch{display:inline-block;inline-size:var(--space-2);block-size:var(--space-2);margin-inline-end:var(--space-2);border-radius:var(--radius-sm)}.empty.is-error{color:var(--error)}.shape .stage{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.shape .stage.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.shape.dims-others:not(:has(.stage.is-pinned)):has(.stage.interactive:hover) .stage.interactive:not(:hover),.shape.dims-others:not(:has(.stage.is-pinned)):has(.stage.interactive:focus-visible) .stage.interactive:not(:focus-visible),.shape.dims-others:has(.stage.is-pinned) .stage:not(.is-pinned){opacity:var(--ds-chart-dim-opacity)}.shape .stage.interactive{cursor:pointer}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}:host{position:relative}.pin-reset{position:absolute;inset-block-start:var(--space-2);inset-inline:0;z-index:1;justify-self:center;margin-inline:auto;display:inline-flex;align-items:center;gap:var(--space-1);min-block-size:var(--space-12);inline-size:fit-content;padding:var(--space-1) var(--space-3);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:hover{color:var(--text-primary);border-color:var(--border-strong)}.pin-marker{display:grid;place-items:center;inline-size:var(--ds-chart-pin-size, 22px);block-size:var(--ds-chart-pin-size, 22px);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-primary);box-shadow:var(--shadow-1);pointer-events:none}.shape{position:relative}.pin-marker{position:absolute;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[dsChartTooltip]", inputs: ["dsChartTooltip", "dsChartTooltipOrigin", "dsChartTooltipTemplate", "dsChartTooltipExtraGap", "dsChartTooltipPreferBelow"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
377
452
|
}
|
|
378
453
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: FunnelChartComponent, decorators: [{
|
|
379
454
|
type: Component,
|
|
380
|
-
args: [{ selector: 'ds-funnel-chart', standalone: true, imports: [SkeletonComponent, ChartTooltipDirective], encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"funnel-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()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholderWidth of skeletonStages(); track $index) {\n <ds-skeleton\n height=\"calc(var(--_funnel-chart-stage-height) - var(--_funnel-chart-stage-gap))\"\n [width]=\"placeholderWidth\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <div\n class=\"shape\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <svg\n preserveAspectRatio=\"none\"\n [attr.aria-hidden]=\"interactive() ? null : true\"\n [attr.viewBox]=\"viewBox\"\n [style.block-size]=\"chartHeight()\">\n @for (entry of stages(); track entry.stage.id; let index = $index) {\n <polygon\n class=\"stage\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [attr.stroke-width]=\"hitGapUnits()\"\n [style.--_chart-mark-stagger]=\"markStagger(index)\"\n [class.interactive]=\"interactive()\"\n [attr.points]=\"entry.points\"\n [attr.fill]=\"entry.color\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index)\"\n (click)=\"stageClicked.emit(entry.stage)\"\n (keydown.enter)=\"onStageKey(entry.stage, $event)\"\n (keydown.space)=\"onStageKey(entry.stage, $event)\">\n </polygon>\n }\n </svg>\n </div>\n\n @if (showTable()) {\n <table class=\"stage-table\">\n <caption class=\"visually-hidden\">\n Each stage as a percentage of the first, and the drop from the stage\n above it.\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Stage\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n <th scope=\"col\">\n Percent\n </th>\n\n <th scope=\"col\">\n Drop\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of stages(); track entry.stage.id) {\n <tr>\n <th scope=\"row\">\n <span\n class=\"swatch\"\n animate.enter=\"mark-enter\"\n aria-hidden=\"true\"\n [style.background]=\"entry.color\">\n </span>\n\n {{ entry.stage.label }}\n </th>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n\n <td>\n {{ entry.formattedPercent }}\n </td>\n\n <td>\n {{ entry.formattedDrop }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n }\n\n @if (showDataTable()) {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of stages(); track entry.stage.id) {\n <tr>\n <td>\n {{ entry.stage.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </details>\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)}}@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.stage.mark-enter{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(--_chart-mark-stagger, 0ms)) both}.stage.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.swatch.mark-enter{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(--_chart-mark-stagger, 0ms)) both}.swatch.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}:host{display:block;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{--_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)}.funnel-chart{--_funnel-chart-stage-height: var(--ds-funnel-chart-stage-height, 44px);--_funnel-chart-stage-gap: var(--ds-funnel-chart-stage-gap, var(--ds-chart-bar-gap));--_funnel-chart-row-gap: var(--ds-funnel-chart-row-gap, var(--space-4));--_funnel-chart-focus-color: var(--ds-funnel-chart-focus-color, var(--focus-ring-color));--_funnel-chart-focus-width: var(--ds-funnel-chart-focus-width, var(--focus-ring-width));position:relative;overflow-x:auto;margin:0}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{display:grid;place-items:center;min-block-size:calc(3 * (var(--_funnel-chart-stage-height) + var(--_funnel-chart-stage-gap)));margin:0;color:var(--text-secondary);text-align:center}.shape{display:block}svg{display:block;inline-size:100%}.stage{stroke:transparent}@media not (forced-colors:active){.stage.interactive:focus-visible{outline:none}}.stage.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 1px var(--ds-chart-focus-halo-color)) drop-shadow(0 0 1px var(--ds-chart-focus-halo-color))}.skeleton{display:grid;row-gap:var(--_funnel-chart-stage-gap)}.stage-table{inline-size:100%;margin-block-start:var(--_funnel-chart-row-gap);border-collapse:collapse;font-variant-numeric:tabular-nums}.stage-table th,.stage-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.stage-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.stage-table thead th:first-child{text-align:start}.stage-table td{padding-inline-start:var(--space-3)}.stage-table th[scope=row]{color:var(--text-secondary);font-weight:400;text-align:start}.swatch{display:inline-block;inline-size:var(--space-2);block-size:var(--space-2);margin-inline-end:var(--space-2);border-radius:var(--radius-sm)}.empty.is-error{color:var(--error)}.shape .stage{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.shape .stage.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.shape.dims-others:has(.stage.interactive:hover) .stage.interactive:not(:hover),.shape.dims-others:has(.stage.interactive:focus-visible) .stage.interactive:not(:focus-visible){opacity:var(--ds-chart-dim-opacity)}.shape .stage.interactive{cursor:pointer}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}\n"] }]
|
|
381
|
-
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], showTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTable", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], stageClicked: [{ type: i0.Output, args: ["stageClicked"] }], dimOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "dimOthers", required: false }] }], staggerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerMs", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipTemplate: [{ type: i0.ContentChild, args: ['dsChartTooltip', { isSignal: true }] }] } });
|
|
455
|
+
args: [{ selector: 'ds-funnel-chart', standalone: true, imports: [SkeletonComponent, ChartTooltipDirective, IconComponent], host: { '[class.framed]': "frameResolved() === 'auto'" }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<figure class=\"funnel-chart\">\n @if (activeMark.pinned()) {\n <button\n class=\"pin-reset\"\n type=\"button\"\n (click)=\"activeMark.release()\">\n 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()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholderWidth of skeletonStages(); track $index) {\n <ds-skeleton\n height=\"calc(var(--_funnel-chart-stage-height) - var(--_funnel-chart-stage-gap))\"\n [width]=\"placeholderWidth\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <div\n class=\"shape\"\n [class.dims-others]=\"dimOthers()\"\n [attr.role]=\"interactive() ? 'group' : 'img'\"\n [attr.aria-label]=\"accessibleName()\"\n [dsChartTooltip]=\"tooltipContext()\"\n [dsChartTooltipPreferBelow]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n <svg\n preserveAspectRatio=\"none\"\n [attr.aria-hidden]=\"interactive() ? null : true\"\n [attr.viewBox]=\"viewBox\"\n [style.block-size]=\"chartHeight()\">\n @for (entry of stages(); track entry.stage.id; let index = $index) {\n <polygon\n class=\"stage\"\n animate.enter=\"mark-enter\"\n animate.leave=\"mark-leave\"\n [attr.stroke-width]=\"hitGapUnits()\"\n [style.--_chart-mark-stagger]=\"markStagger(index)\"\n [class.interactive]=\"interactive()\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === index\n \"\n [class.is-dimmed]=\"isDimmed(index)\"\n [attr.points]=\"entry.points\"\n [attr.fill]=\"entry.color\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === tabStopIndex() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"interactive() ? entryLabel(entry) : null\"\n (pointerenter)=\"activeMark.enter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\"\n (focus)=\"onMarkFocus(index, $event)\"\n (blur)=\"activeMark.leave()\"\n (keydown)=\"onMarkNavigation($event, index)\"\n (click)=\"onMarkClick(entry.stage, index, $event)\"\n (keydown.enter)=\"onStageKey(entry.stage, $event)\"\n (keydown.space)=\"onStageKey(entry.stage, $event)\">\n </polygon>\n }\n </svg>\n\n @if (pinnedCenter(); as center) {\n <span\n class=\"pin-marker\"\n [style.left.%]=\"center.xPercent\"\n [style.top.%]=\"center.yPercent\">\n <ds-icon\n name=\"pin\"\n [size]=\"13\" />\n </span>\n }\n </div>\n\n @if (showTable()) {\n <table class=\"stage-table\">\n <caption class=\"visually-hidden\">\n Each stage as a percentage of the first, and the drop from the stage\n above it.\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Stage\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n\n <th scope=\"col\">\n Percent\n </th>\n\n @if (drop() !== 'none') {\n <th scope=\"col\">\n Drop\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (entry of stages(); track entry.stage.id; let index = $index) {\n <tr\n (pointerenter)=\"onRowEnter(index, $event)\"\n (pointerleave)=\"activeMark.leave()\">\n <th scope=\"row\">\n <span\n class=\"swatch\"\n animate.enter=\"mark-enter\"\n aria-hidden=\"true\"\n [style.background]=\"entry.color\">\n </span>\n\n {{ entry.stage.label }}\n </th>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n\n <td>\n {{ entry.formattedPercent }}\n </td>\n\n @if (drop() !== 'none') {\n <td>\n {{ entry.formattedDrop }}\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n }\n\n @if (showDataTable()) {\n <details\n class=\"data-table\"\n [open]=\"dataTableResolved() === 'visible'\">\n <summary>\n Data table\n </summary>\n\n <table>\n <caption>\n {{\n caption() ?? 'Chart data'\n }}\n </caption>\n\n <thead>\n <tr>\n <th scope=\"col\">\n Label\n </th>\n\n <th scope=\"col\">\n Value\n </th>\n </tr>\n </thead>\n\n <tbody>\n @for (entry of stages(); track entry.stage.id) {\n <tr>\n <td>\n {{ entry.stage.label }}\n </td>\n\n <td>\n {{ entry.formattedValue }}\n </td>\n </tr>\n }\n </tbody>\n </table>\n </details>\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)}}@keyframes ds-chart-mark-grow-y{0%{opacity:0;transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{opacity:0;transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-exit{to{opacity:0}}.stage.mark-enter{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(--_chart-mark-stagger, 0ms)) both}.stage.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}.swatch.mark-enter{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(--_chart-mark-stagger, 0ms)) both}.swatch.mark-leave{animation:ds-chart-mark-exit var(--ds-motion-chart-mark-exit-duration) var(--ds-motion-chart-mark-exit-easing) both}: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,figcaption{-webkit-user-select:text;user-select:text}@media not (forced-colors:active){.stage:focus{outline:none}}.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)}.funnel-chart{--_funnel-chart-stage-height: var(--ds-funnel-chart-stage-height, 44px);--_funnel-chart-stage-gap: var(--ds-funnel-chart-stage-gap, var(--ds-chart-bar-gap));--_funnel-chart-row-gap: var(--ds-funnel-chart-row-gap, var(--space-4));--_funnel-chart-focus-color: var(--ds-funnel-chart-focus-color, var(--focus-ring-color));--_funnel-chart-focus-width: var(--ds-funnel-chart-focus-width, var(--focus-ring-width));position:relative;overflow-x:auto;margin:0}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:600}.empty{display:grid;place-items:center;min-block-size:calc(3 * (var(--_funnel-chart-stage-height) + var(--_funnel-chart-stage-gap)));margin:0;color:var(--text-secondary);text-align:center}.shape{display:block}svg{display:block;inline-size:100%}.stage{stroke:transparent}@media not (forced-colors:active){.stage.interactive:focus-visible{outline:none}}.stage.interactive:focus-visible{stroke:var(--ds-chart-focus-ring-color);stroke-width:var(--focus-ring-width);paint-order:stroke;filter:drop-shadow(0 0 var(--focus-ring-width) var(--ds-chart-focus-halo-color))}.skeleton{display:grid;row-gap:var(--_funnel-chart-stage-gap)}.stage-table{inline-size:100%;margin-block-start:var(--_funnel-chart-row-gap);border-collapse:collapse;font-variant-numeric:tabular-nums}.stage-table th,.stage-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.stage-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.stage-table thead th:first-child{text-align:start}.stage-table td{padding-inline-start:var(--space-3)}.stage-table th[scope=row]{color:var(--text-secondary);font-weight:400;text-align:start}.swatch{display:inline-block;inline-size:var(--space-2);block-size:var(--space-2);margin-inline-end:var(--space-2);border-radius:var(--radius-sm)}.empty.is-error{color:var(--error)}.shape .stage{transition:opacity var(--ds-motion-chart-state-duration) var(--ds-motion-chart-state-easing),fill var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.shape .stage.is-dimmed{opacity:var(--ds-chart-dim-opacity)}.shape.dims-others:not(:has(.stage.is-pinned)):has(.stage.interactive:hover) .stage.interactive:not(:hover),.shape.dims-others:not(:has(.stage.is-pinned)):has(.stage.interactive:focus-visible) .stage.interactive:not(:focus-visible),.shape.dims-others:has(.stage.is-pinned) .stage:not(.is-pinned){opacity:var(--ds-chart-dim-opacity)}.shape .stage.interactive{cursor:pointer}@media(forced-colors:active){.axis-line,.grid-line{stroke:CanvasText}.axis-label,.category-label{fill:CanvasText}:focus-visible{stroke:Highlight;filter:none}}:host{position:relative}.pin-reset{position:absolute;inset-block-start:var(--space-2);inset-inline:0;z-index:1;justify-self:center;margin-inline:auto;display:inline-flex;align-items:center;gap:var(--space-1);min-block-size:var(--space-12);inline-size:fit-content;padding:var(--space-1) var(--space-3);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:hover{color:var(--text-primary);border-color:var(--border-strong)}.pin-marker{display:grid;place-items:center;inline-size:var(--ds-chart-pin-size, 22px);block-size:var(--ds-chart-pin-size, 22px);border:var(--border-width-default) solid var(--border-divider);border-radius:var(--radius-pill);background:var(--surface-default);color:var(--text-primary);box-shadow:var(--shadow-1);pointer-events:none}.shape{position:relative}.pin-marker{position:absolute;transform:translate(-50%,-50%)}\n"] }]
|
|
456
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], showTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTable", required: false }] }], frame: [{ type: i0.Input, args: [{ isSignal: true, alias: "frame", required: false }] }], tooltipLingerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipLingerMs", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], drop: [{ type: i0.Input, args: [{ isSignal: true, alias: "drop", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], stageClicked: [{ type: i0.Output, args: ["stageClicked"] }], pinOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinOnClick", required: false }] }], dimOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "dimOthers", required: false }] }], staggerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "staggerMs", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipTemplate: [{ type: i0.ContentChild, args: ['dsChartTooltip', { isSignal: true }] }] } });
|
|
382
457
|
|
|
383
458
|
/**
|
|
384
459
|
* Generated bundle index. Do not edit.
|