@ids-group-ltd/ids-design-system 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +108 -23
- package/agent/forms/ds-autocomplete.md +1 -1
- package/agent/forms/ds-button.md +3 -3
- package/agent/forms/ds-checkbox.md +1 -1
- package/agent/forms/ds-color-picker.md +1 -1
- package/agent/forms/ds-date-picker.md +1 -1
- package/agent/forms/ds-icon-button.md +1 -1
- package/agent/forms/ds-input.md +1 -1
- package/agent/forms/ds-multi-select.md +1 -1
- package/agent/forms/ds-otp-input.md +1 -1
- package/agent/forms/ds-radio-group.md +1 -1
- package/agent/forms/ds-radio.md +1 -1
- package/agent/forms/ds-search.md +1 -1
- package/agent/forms/ds-segmented.md +1 -1
- package/agent/forms/ds-select.md +1 -1
- package/agent/forms/ds-slider.md +1 -1
- package/agent/forms/ds-switch.md +1 -1
- package/agent/forms/ds-textarea.md +1 -1
- package/agent/forms/ds-time-picker.md +1 -1
- package/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +1 -1
- package/components.md +22 -22
- package/design-system.md +24 -0
- package/eslint/deprecated-api.json +7 -210
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +22 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +4 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +27 -19
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +8 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +4 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +4 -13
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +62 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +3 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +2 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +2 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +2 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs +10 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.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-textarea.mjs +2 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +58 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +53 -43
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +2 -3
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.15.1.json +4 -2
- package/migrations/0.15.3.json +14 -4
- package/migrations/1.0.0.json +0 -333
- package/migrations/1.0.1.json +36 -0
- package/migrations/1.0.2.json +70 -0
- package/package.json +5 -9
- package/schematics/check-overrides/surface.json +4 -1
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +11 -4
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +2 -1
- package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +6 -1
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +26 -2
- package/types/ids-group-ltd-ids-design-system-components-table-resize.d.ts +0 -1
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +7 -0
- package/types/ids-group-ltd-ids-design-system-components.d.ts +25 -21
- package/types/ids-group-ltd-ids-design-system.d.ts +3 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-submitted.mjs +0 -52
- package/fesm2022/ids-group-ltd-ids-design-system-components-submitted.mjs.map +0 -1
- package/types/ids-group-ltd-ids-design-system-components-submitted.d.ts +0 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-pie-chart.mjs","sources":["../../../src/lib/components/pie-chart/pie-chart.math.ts","../../../src/lib/components/pie-chart/pie-chart.component.ts","../../../src/lib/components/pie-chart/pie-chart.component.html","../../../src/lib/components/pie-chart/ids-group-ltd-ids-design-system-components-pie-chart.ts"],"sourcesContent":["import type { PieChartSlice } from './pie-chart.types';\n\nconst FULL_TURN = Math.PI * 2;\nconst FULL_TURN_EPSILON = 1e-9;\n\nexport const DEFAULT_INNER_RADIUS = 0.68;\n\n/** Valid over [0, 1); anything else falls back. */\nexport function holeFraction(innerRadius: number): number {\n return Number.isFinite(innerRadius) && innerRadius >= 0 && innerRadius < 1\n ? round(innerRadius)\n : DEFAULT_INNER_RADIUS;\n}\n\n/** The slices a legend can carry, with everything past `limit` summed into one that takes the neutral eighth palette slot. */\nexport function groupSmallest(\n slices: readonly PieChartSlice[],\n limit: number | null,\n otherLabel: string,\n): PieChartSlice[] {\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-pie-other', label: otherLabel, value: remainder, slot: 8 },\n ];\n}\n\nexport interface PieArc {\n readonly startAngle: number;\n readonly endAngle: number;\n}\n\n/** Anything that is not a positive share becomes zero; a NaN would reach every slice through the total and draw nothing, silently. */\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[]): PieArc[] {\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\n/** Start and end angles, flattened, of `count` slices drawn from the skeleton's `skeletonSlices`\n * equal slices; a slice past them opens from the end of the ring. */\nexport function skeletonArcs(count: number, skeletonSlices: number): number[] {\n const step = FULL_TURN / Math.max(skeletonSlices, 1);\n\n return Array.from({ length: count }, (unused, index) =>\n index < skeletonSlices\n ? [index * step, (index + 1) * step]\n : [FULL_TURN, FULL_TURN],\n ).flat();\n}\n\nexport function resolveInnerRadius(\n outerRadius: number,\n innerRadius: number,\n): number {\n if (!Number.isFinite(outerRadius) || outerRadius <= 0) {\n return 0;\n }\n\n return outerRadius * holeFraction(innerRadius);\n}\n\n/** A centre-value text with its width at the largest font size. */\nexport interface MeasuredText {\n readonly text: string;\n readonly width: number;\n}\n\nexport interface CenterValueFit {\n readonly text: string;\n readonly fontSize: number;\n}\n\n/** The largest font size, between `minFontSize` and `maxFontSize`, at which the value fits\n * `availableWidth`; past the floor, the compact text in its place when there is one. */\nexport function fitCenterValue(\n full: MeasuredText,\n compact: MeasuredText | null,\n availableWidth: number,\n maxFontSize: number,\n minFontSize: number,\n): CenterValueFit {\n const sizeFor = (width: number) =>\n width <= availableWidth\n ? maxFontSize\n : (maxFontSize * availableWidth) / width;\n\n const fullSize = sizeFor(full.width);\n if (fullSize >= minFontSize) {\n return { text: full.text, fontSize: fullSize };\n }\n if (compact && compact.text !== full.text) {\n return {\n text: compact.text,\n fontSize: Math.max(sizeFor(compact.width), minFontSize),\n };\n }\n\n return { text: full.text, fontSize: minFontSize };\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. */\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. */\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 inner circle winds the other way so the nonzero fill rule cancels it against the outer one.\n return `${outer} ${circlePath(centerX, centerY, innerRadius, 0)}`;\n}\n\n/** A closed circle is two half-turns: a single full-turn SVG arc draws nothing. */\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 type {\n ChartDimmable,\n ChartWithDataTable,\n ChartWithTooltipTrigger,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n TemplateRef,\n ViewEncapsulation,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n input,\n numberAttribute,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n CHART_SERIES_COLORS,\n chartTiming,\n describeSeries,\n formatWholePercent,\n largestRemainder,\n leaveMark,\n markAt,\n rovingMarks,\n chartRenderGate,\n CHART_SKELETON_COUNT,\n DsChartBase,\n skeletonMarkCount,\n tweenMarks,\n watchElementWidth,\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 type { ChartDataTable } from '@ids-group-ltd/ids-design-system/core';\nimport {\n ChartTooltipDirective,\n ChartStatesComponent,\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_INNER_RADIUS,\n arcPath,\n fitCenterValue,\n groupSmallest,\n holeFraction,\n paletteIndex,\n positiveValues,\n resolveInnerRadius,\n skeletonArcs,\n resolveTotal,\n ringCoords,\n sliceArcs,\n} from './pie-chart.math';\nimport type { CenterValueFit, PieArc } from './pie-chart.math';\nimport type { PieChartCenterPlacement, PieChartSlice } from './pie-chart.types';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\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// How far a hovered slice slides out along its bisector, in viewBox units.\nconst SLICE_HOVER_SHIFT = 3;\n// The value keeps a margin from the inner edge of the ring.\nconst CENTER_VALUE_HOLE_SHARE = 0.9;\n\n// One canvas and one font-load wait for every pie chart on the page.\nlet measureContext: CanvasRenderingContext2D | null | undefined;\nconst fontsLoaded = signal(false);\nlet fontsWatched = false;\n\nfunction watchFontsOnce(): void {\n if (!fontsWatched) {\n fontsWatched = true;\n void document.fonts?.ready.then(() => fontsLoaded.set(true));\n }\n}\n\n@Component({\n selector: 'ds-pie-chart',\n standalone: true,\n imports: [\n NgTemplateOutlet,\n SkeletonComponent,\n ChartTooltipDirective,\n ChartStatesComponent,\n IconComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './pie-chart.component.html',\n styleUrl: './pie-chart.component.scss',\n host: { '[class.framed]': \"frameResolved() === 'auto'\" },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PieChartComponent\n extends DsChartBase\n implements ChartDimmable, ChartWithDataTable, ChartWithTooltipTrigger\n{\n protected readonly renderReady = chartRenderGate();\n\n /** One slice per entry. A non-positive or non-finite value counts as zero. */\n readonly data = input<readonly PieChartSlice[]>([]);\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 /** When the sum does not fit the hole even at `--ds-pie-chart-center-value-min-font-size`, prints\n * it in the `'tick'` form of `valueFormat` (`32.4K`). A `centerValue` string is never shortened. */\n readonly centerCompact = input(true, { transform: booleanAttribute });\n\n /** `'below'` prints the value and its caption under the ring at full size, never shrunk or\n * shortened. */\n readonly centerPlacement = input<PieChartCenterPlacement>('inside');\n\n /** The hovered, focused or held slice prints its value and label in the centre in place of\n * `centerValue` and `centerLabel`. */\n readonly showHoverCenter = input(true, { transform: booleanAttribute });\n\n /** Legend placement, logical so it flips in right-to-left. */\n readonly legend = input<'end' | 'bottom' | 'none'>('end');\n\n /** How many slices, and legend rows, the loading skeleton draws before the data is known. */\n readonly skeletonCount = input(CHART_SKELETON_COUNT, {\n transform: (raw: unknown) => numberAttribute(raw, CHART_SKELETON_COUNT),\n });\n\n /** Longest legend to draw; past it the smallest slices are summed into one. Values below 2 are ignored. */\n readonly maxSlices = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Names the grouped slice. Unset falls back to `DS_INTL.chart.other`. */\n readonly otherLabel = input<string | null>(null);\n\n readonly otherLabelResolved = computed(\n () => this.otherLabel() ?? this.intl().chart.other,\n );\n\n /** The hole, as a fraction of the outer radius. Zero draws a solid pie without centre content. */\n readonly innerRadius = input(DEFAULT_INNER_RADIUS, {\n transform: numberAttribute,\n });\n\n /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,\n * `'visible'` opens it, `'none'` renders none. Unset falls back to `DS_CONFIG.chart.dataTable`,\n * then `'none'`. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Prints each slice's share in the legend, the tooltip and the data table. */\n readonly partOfWhole = input(true, { transform: booleanAttribute });\n\n readonly dataTableResolved = this.defaults.dataTable;\n\n /** The slice that was clicked or activated with Enter or Space. */\n readonly sliceClicked = output<PieChartSlice>();\n\n /** Dims every other mark while one is hovered or focused. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Whether a hovered or focused slice opens a tooltip. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n protected readonly tooltipTemplate =\n contentChild<TemplateRef<{ $implicit: ChartTooltipContext }>>(\n 'dsChartTooltip',\n );\n\n private readonly tooltipLingerResolved = this.defaults.tooltipLingerMs;\n\n protected readonly activeMark = chartActiveMark(\n () => this.tooltipLingerResolved(),\n () => this.defaults.hoverDelayMs(),\n );\n\n protected onMarkClick(\n payload: PieChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(payload);\n if (this.defaults.pinOnClick()) {\n this.activeMark.pin(index, event);\n }\n }\n protected readonly roving = rovingMarks(() => this.slices().length);\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.roving.focus(index);\n this.activeMark.enter(index, event);\n }\n\n /** A legend item opens the arc's tooltip and slides the arc out, as hovering the arc does. */\n protected onLegendEnter(index: number, event: Event): void {\n this.activeMark.enter(index, event, this.arcAt(event, index));\n }\n\n protected onLegendLeave(): void {\n this.activeMark.leave();\n }\n\n protected onLegendFocus(index: number, event: FocusEvent): void {\n this.roving.focus(index);\n this.onLegendEnter(index, event);\n }\n\n protected onLegendClick(\n slice: PieChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(slice);\n if (this.defaults.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 onMarkNavigation(\n event: KeyboardEvent,\n index: number,\n scope: string,\n ): void {\n this.roving.navigate(\n event,\n index,\n (event.currentTarget as Element).closest(scope),\n );\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.otherLabelResolved()),\n );\n\n protected readonly dataTableColumns = computed<readonly string[]>(() =>\n this.partOfWhole()\n ? [\n this.intl().chart.labelColumn,\n this.intl().chart.valueColumn,\n this.intl().chart.shareColumn,\n ]\n : [this.intl().chart.labelColumn, this.intl().chart.valueColumn],\n );\n\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.slices().map((entry) => ({\n key: entry.slice.id,\n cells: this.partOfWhole()\n ? [entry.slice.label, entry.formattedValue, entry.formattedPercent]\n : [entry.slice.label, entry.formattedValue],\n })),\n );\n\n protected readonly leaveMark = leaveMark;\n\n protected readonly sliceHoverShift = SLICE_HOVER_SHIFT;\n\n // Keyed by slice id, so a slice that stays tweens from where it is drawn and a new one opens from its start edge.\n private readonly drawnArcs = signal<ReadonlyMap<string, PieArc>>(new Map());\n\n private stopArcTween: () => void = () => undefined;\n\n private readonly states = viewChild(ChartStatesComponent);\n\n private readonly tweenArcs = afterRenderEffect((onCleanup) => {\n const data = this.visibleSlices();\n const ring = this.ringElement()?.nativeElement;\n const target = sliceArcs(data.map((slice) => slice.value));\n untracked(() => {\n const drawn = this.drawnArcs();\n const apply = (angles: readonly number[]): void =>\n this.drawnArcs.set(\n new Map(\n data.map((slice, index) => [\n slice.id,\n {\n startAngle: angles[2 * index],\n endAngle: angles[2 * index + 1],\n },\n ]),\n ),\n );\n const to = target.flatMap((arc) => [arc.startAngle, arc.endAngle]);\n this.stopArcTween();\n if (ring && drawn.size === 0 && this.states()?.morphing()) {\n this.stopArcTween = tweenMarks(\n ring,\n skeletonArcs(data.length, skeletonMarkCount(0, this.skeletonCount())),\n to,\n apply,\n 'mark-grow',\n );\n\n return;\n }\n if (!ring || drawn.size === 0) {\n apply(to);\n\n return;\n }\n const from = data.flatMap((slice, index) => {\n const arc = drawn.get(slice.id);\n\n return arc\n ? [arc.startAngle, arc.endAngle]\n : [target[index].startAngle, target[index].startAngle];\n });\n this.stopArcTween = tweenMarks(ring, from, to, apply);\n });\n onCleanup(() => this.stopArcTween());\n });\n\n protected readonly slices = computed(() => {\n const data = this.visibleSlices();\n const values = data.map((slice) => slice.value);\n const target = sliceArcs(values);\n const drawn = this.drawnArcs();\n const arcs = data.map(\n (slice, index) =>\n drawn.get(slice.id) ??\n (drawn.size === 0\n ? target[index]\n : {\n startAngle: target[index].startAngle,\n endAngle: target[index].startAngle,\n }),\n );\n const percents = largestRemainder(positiveValues(values));\n const innerRadius = resolveInnerRadius(\n RING_OUTER_RADIUS,\n this.innerRadius(),\n );\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 shift: ringCoords(\n 0,\n 0,\n SLICE_HOVER_SHIFT,\n (arcs[index].startAngle + arcs[index].endAngle) / 2,\n ),\n // Halfway along the arc and through the ring: inside the slice whatever its sweep.\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: formatWholePercent(\n percents[index],\n this.defaults.locale,\n ),\n }));\n });\n\n /** The held slice's centre as a share of the ring box. The badge is HTML over the ring: inside a `foreignObject` the viewBox scale grows it and the centring grid does not lay out. */\n protected readonly pinnedEntry = computed(() => {\n const entry = this.activeMark.pinned()\n ? this.slices()[this.activeMark.index()]\n : undefined;\n\n return entry\n ? {\n center: {\n x: ((entry.center.x + entry.shift.x) / RING_VIEW_BOX_SIZE) * 100,\n y: ((entry.center.y + entry.shift.y) / RING_VIEW_BOX_SIZE) * 100,\n },\n }\n : null;\n });\n\n protected readonly resolvedCenterValue = computed(\n () =>\n this.centerValue() ?? this.valueFormatResolved()(this.total(), 'tooltip'),\n );\n\n // The hovered, focused or held slice takes the centre from the total until the pointer leaves.\n private readonly centerEntry = computed(() =>\n this.showHoverCenter()\n ? (this.slices()[this.activeMark.index()] ?? null)\n : null,\n );\n\n private readonly centerKey = computed(() =>\n this.centerEntry() ? this.activeMark.index() : -1,\n );\n\n private readonly centerSwapElement =\n viewChild<ElementRef<HTMLElement>>('centerSwap');\n\n private shownCenterKey: number | null = null;\n\n // Fades the centre in once per slice it names, on the hover timing; a zero duration swaps at once.\n private readonly fadeCenterSwap = afterRenderEffect(() => {\n const key = this.centerKey();\n const swap = this.centerSwapElement()?.nativeElement;\n const previous = this.shownCenterKey;\n this.shownCenterKey = key;\n if (!swap || previous === null || previous === key) {\n return;\n }\n const timing = chartTiming(swap, 'state');\n if (timing) {\n swap.animate([{ opacity: 0 }, { opacity: 1 }], timing);\n }\n });\n\n private readonly shownCenterValue = computed(() => {\n const entry = this.centerEntry();\n if (!entry) {\n return this.resolvedCenterValue();\n }\n\n return this.partOfWhole() ? entry.formattedPercent : entry.formattedValue;\n });\n\n protected readonly shownCenterLabel = computed(\n () => this.centerEntry()?.slice.label ?? this.centerLabel(),\n );\n\n private readonly compactCenterValue = computed(() =>\n this.centerCompact() && this.centerValue() === null && !this.centerEntry()\n ? this.valueFormatResolved()(this.total(), 'tick')\n : null,\n );\n\n private readonly ringElement = viewChild<ElementRef<HTMLElement>>('ring');\n private readonly centerValueElement =\n viewChild<ElementRef<HTMLElement>>('centerValue');\n\n private readonly centerFit = signal<CenterValueFit | null>(null, {\n equal: (previous, next) =>\n previous?.text === next?.text && previous?.fontSize === next?.fontSize,\n });\n\n protected readonly centerText = computed(\n () => this.centerFit()?.text ?? this.shownCenterValue(),\n );\n\n protected readonly centerFontSize = computed(\n () => this.centerFit()?.fontSize ?? null,\n );\n\n private readonly ringWidth = signal(0);\n\n private readonly fitsInside = computed(\n () => this.hole() > 0 && this.centerPlacement() === 'inside',\n );\n\n private fitCenter(\n value: HTMLElement,\n ringWidth: number,\n full: string,\n compact: string | null,\n hole: number,\n ): CenterValueFit | null {\n const style = getComputedStyle(value);\n const maxFontSize = parseFloat(\n style.getPropertyValue('--_pie-chart-center-value-max-font-size'),\n );\n const minFontSize = parseFloat(\n style.getPropertyValue('--_pie-chart-center-value-min-font-size'),\n );\n measureContext ??= document.createElement('canvas').getContext('2d');\n const context = measureContext;\n if (!context || !(maxFontSize > 0) || !(minFontSize > 0)) {\n return null;\n }\n context.font = `${style.fontWeight} ${maxFontSize}px ${style.fontFamily}`;\n const measure = (text: string) => ({\n text,\n width: context.measureText(text).width,\n });\n const availableWidth = ringWidth * hole * CENTER_VALUE_HOLE_SHARE;\n const floor = Math.min(minFontSize, maxFontSize);\n const measuredFull = measure(full);\n const fitsAtFloor =\n (measuredFull.width * floor) / maxFontSize <= availableWidth;\n\n return fitCenterValue(\n measuredFull,\n compact === null || fitsAtFloor ? null : measure(compact),\n availableWidth,\n maxFontSize,\n floor,\n );\n }\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.intl().chart,\n this.caption() ?? this.intl().chart.title,\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.innerRadius()));\n\n // Only the ring is observed, and only while the value sits inside it: its box is set by\n // `--ds-pie-chart-size` alone, so the fitted value never resizes what is observed.\n private readonly watchRing = afterRenderEffect((onCleanup) => {\n const ring = this.ringElement()?.nativeElement;\n if (ring && this.fitsInside()) {\n onCleanup(watchElementWidth(ring, this.ringWidth));\n }\n });\n\n // Refits once per change of what decides the fit; an unchanged ring width writes nothing.\n private readonly refit = afterRenderEffect(() => {\n const value = this.centerValueElement()?.nativeElement;\n const ringWidth = this.ringWidth();\n const full = this.shownCenterValue();\n const compact = this.compactCenterValue();\n const hole = this.hole();\n fontsLoaded();\n if (!value || !this.fitsInside() || ringWidth === 0) {\n this.centerFit.set(null);\n\n return;\n }\n watchFontsOnce();\n this.centerFit.set(\n untracked(() => this.fitCenter(value, ringWidth, full, compact, hole)),\n );\n });\n\n protected entryLabel(entry: {\n slice: PieChartSlice;\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: PieChartSlice, event: Event): void {\n // A key pressed on a control inside the item belongs to that control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.sliceClicked.emit(slice);\n }\n\n // The legend items carry the tab route; the ring needs it only 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 protected readonly skeletonMarks = computed(() =>\n skeletonMarkCount(this.data().length, this.skeletonCount()),\n );\n\n protected readonly skeletonRows = computed(() =>\n Array.from({ length: this.skeletonMarks() }),\n );\n}\n","<figure\n class=\"pie-chart\"\n dsChartStates\n [style.--_pie-chart-hole-fraction]=\"hole()\"\n [pinned]=\"activeMark.pinned()\"\n [caption]=\"caption()\"\n [error]=\"error()\"\n [errorText]=\"errorTextResolved()\"\n [pending]=\"(loading() && isEmpty()) || !renderReady()\"\n [reloading]=\"loading()\"\n [dataTable]=\"dataTableResolved()\"\n [shimmer]=\"loading()\"\n [empty]=\"isEmpty()\"\n [emptyText]=\"emptyTextResolved()\"\n [skeleton]=\"skeleton\"\n [body]=\"body\"\n [message]=\"message\"\n (release)=\"activeMark.release()\">\n</figure>\n\n<ng-template #skeleton>\n <div\n class=\"skeleton\"\n aria-hidden=\"true\"\n [class.legend-bottom]=\"legend() === 'bottom'\"\n [style.--_pie-chart-skeleton-slices]=\"skeletonMarks()\">\n <div class=\"ring\">\n <ds-skeleton\n class=\"skeleton-ring\"\n data-morph=\"self\"\n circle\n width=\"100%\"\n height=\"100%\"\n [shimmer]=\"loading()\" />\n\n @if (hole() > 0 && centerPlacement() !== 'below') {\n <ds-skeleton\n class=\"skeleton-center\"\n width=\"40%\"\n height=\"var(--space-3)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n\n @if (legend() !== 'none') {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonRows(); track $index) {\n <div class=\"skeleton-row\">\n <ds-skeleton\n circle\n data-morph=\"mark\"\n width=\"var(--_pie-chart-swatch-size)\"\n height=\"var(--_pie-chart-swatch-size)\"\n [shimmer]=\"loading()\" />\n\n <ds-skeleton\n class=\"skeleton-label\"\n height=\"var(--space-2)\"\n [shimmer]=\"loading()\" />\n\n <ds-skeleton\n width=\"var(--space-8)\"\n height=\"var(--space-2)\"\n [shimmer]=\"loading()\" />\n\n @if (partOfWhole()) {\n <ds-skeleton\n width=\"var(--space-6)\"\n height=\"var(--space-2)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n }\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #body>\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 [dsChartTooltipSwatches]=\"defaults.tooltipSwatches()\"\n [dsChartTooltipPinned]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n @if (hole() > 0 && centerPlacement() === 'below') {\n <div class=\"ring-stack\">\n <ng-container [ngTemplateOutlet]=\"ringBlock\" />\n\n <div class=\"center-below\">\n <ng-container [ngTemplateOutlet]=\"centerContent\" />\n </div>\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"ringBlock\" />\n }\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 [class.pins]=\"defaults.pinOnClick()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === roving.tabStop() ? 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)=\"onLegendLeave()\"\n (focus)=\"onLegendFocus(index, $event)\"\n (blur)=\"onLegendLeave()\"\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 data-morph=\"mark\"\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 <ds-chart-data-table\n [columns]=\"dataTableColumns()\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n</ng-template>\n\n<ng-template\n #message\n let-text\n let-error=\"error\">\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p\n class=\"empty-text\"\n [class.is-error]=\"error\"\n [attr.role]=\"error ? 'status' : null\">\n {{ text }}\n </p>\n </div>\n</ng-template>\n\n<ng-template #ringBlock>\n <div\n #ring\n class=\"ring\"\n [class.ring-outline]=\"total() === 0\">\n <svg\n class=\"ring-svg\"\n data-morph=\"self\"\n [style.--_pie-chart-hover-shift.px]=\"sliceHoverShift\"\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.pins]=\"defaults.pinOnClick()\"\n [class.is-active]=\"activeMark.index() === index\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === index\n \"\n [class.focusable]=\"ringCarriesTheRoute()\"\n [attr.d]=\"entry.path\"\n [style.fill]=\"entry.color\"\n [style.--_slice-shift-x.px]=\"entry.shift.x\"\n [style.--_slice-shift-y.px]=\"entry.shift.y\"\n [attr.role]=\"ringCarriesTheRoute() ? 'button' : null\"\n [attr.tabindex]=\"\n ringCarriesTheRoute() ? (index === roving.tabStop() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"ringCarriesTheRoute() ? entryLabel(entry) : null\"\n (animate.leave)=\"leaveMark($event)\"\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 </svg>\n\n @if (hole() > 0 && centerPlacement() === 'inside') {\n <div class=\"center\">\n <ng-container [ngTemplateOutlet]=\"centerContent\" />\n </div>\n }\n\n @if (pinnedEntry(); as entry) {\n <span\n class=\"pin-marker\"\n [style.left.%]=\"entry.center.x\"\n [style.top.%]=\"entry.center.y\">\n <ds-icon\n name=\"pin\"\n [size]=\"14\" />\n </span>\n }\n </div>\n</ng-template>\n\n<ng-template #centerContent>\n <span\n #centerSwap\n class=\"center-swap\">\n <span\n #centerValue\n class=\"center-value\"\n [style.font-size.px]=\"centerFontSize()\">\n {{ centerText() }}\n </span>\n\n @if (shownCenterLabel()) {\n <span class=\"center-label\">\n {{ shownCenterLabel() }}\n </span>\n }\n </span>\n</ng-template>\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,oBAAoB,GAAG,IAAI;AAExC;AACM,SAAU,YAAY,CAAC,WAAmB,EAAA;AAC9C,IAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,WAAW,IAAI,CAAC,IAAI,WAAW,GAAG;AACvE,UAAE,KAAK,CAAC,WAAW;UACjB,oBAAoB;AAC1B;AAEA;SACg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AEnC,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhfpD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-pie-chart.mjs","sources":["../../../src/lib/components/pie-chart/pie-chart.math.ts","../../../src/lib/components/pie-chart/pie-chart.component.ts","../../../src/lib/components/pie-chart/pie-chart.component.html","../../../src/lib/components/pie-chart/ids-group-ltd-ids-design-system-components-pie-chart.ts"],"sourcesContent":["import type { PieChartSlice } from './pie-chart.types';\n\nconst FULL_TURN = Math.PI * 2;\nconst FULL_TURN_EPSILON = 1e-9;\n\nexport const DEFAULT_INNER_RADIUS = 0.68;\n\n/** Valid over [0, 1); anything else falls back. */\nexport function holeFraction(innerRadius: number): number {\n return Number.isFinite(innerRadius) && innerRadius >= 0 && innerRadius < 1\n ? round(innerRadius)\n : DEFAULT_INNER_RADIUS;\n}\n\n/** The slices a legend can carry, with everything past `limit` summed into one that takes the neutral eighth palette slot. */\nexport function groupSmallest(\n slices: readonly PieChartSlice[],\n limit: number | null,\n otherLabel: string,\n): PieChartSlice[] {\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-pie-other', label: otherLabel, value: remainder, slot: 8 },\n ];\n}\n\nexport interface PieArc {\n readonly startAngle: number;\n readonly endAngle: number;\n}\n\n/** Anything that is not a positive share becomes zero; a NaN would reach every slice through the total and draw nothing, silently. */\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[]): PieArc[] {\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\n/** Start and end angles, flattened, of `count` slices drawn from the skeleton's `skeletonSlices`\n * equal slices; a slice past them opens from the end of the ring. */\nexport function skeletonArcs(count: number, skeletonSlices: number): number[] {\n const step = FULL_TURN / Math.max(skeletonSlices, 1);\n\n return Array.from({ length: count }, (unused, index) =>\n index < skeletonSlices\n ? [index * step, (index + 1) * step]\n : [FULL_TURN, FULL_TURN],\n ).flat();\n}\n\nexport function resolveInnerRadius(\n outerRadius: number,\n innerRadius: number,\n): number {\n if (!Number.isFinite(outerRadius) || outerRadius <= 0) {\n return 0;\n }\n\n return outerRadius * holeFraction(innerRadius);\n}\n\n/** A centre-value text with its width at the largest font size. */\nexport interface MeasuredText {\n readonly text: string;\n readonly width: number;\n}\n\nexport interface CenterValueFit {\n readonly text: string;\n readonly fontSize: number;\n}\n\n/** The largest font size, between `minFontSize` and `maxFontSize`, at which the value fits\n * `availableWidth`; past the floor, the compact text in its place when there is one. */\nexport function fitCenterValue(\n full: MeasuredText,\n compact: MeasuredText | null,\n availableWidth: number,\n maxFontSize: number,\n minFontSize: number,\n): CenterValueFit {\n const sizeFor = (width: number) =>\n width <= availableWidth\n ? maxFontSize\n : (maxFontSize * availableWidth) / width;\n\n const fullSize = sizeFor(full.width);\n if (fullSize >= minFontSize) {\n return { text: full.text, fontSize: fullSize };\n }\n if (compact && compact.text !== full.text) {\n return {\n text: compact.text,\n fontSize: Math.max(sizeFor(compact.width), minFontSize),\n };\n }\n\n return { text: full.text, fontSize: minFontSize };\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. */\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. */\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 inner circle winds the other way so the nonzero fill rule cancels it against the outer one.\n return `${outer} ${circlePath(centerX, centerY, innerRadius, 0)}`;\n}\n\n/** A closed circle is two half-turns: a single full-turn SVG arc draws nothing. */\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 type {\n ChartDimmable,\n ChartWithDataTable,\n ChartWithTooltipTrigger,\n} from '@ids-group-ltd/ids-design-system/components';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n TemplateRef,\n ViewEncapsulation,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n input,\n numberAttribute,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n CHART_SERIES_COLORS,\n chartTiming,\n fontsLoaded,\n describeSeries,\n formatWholePercent,\n largestRemainder,\n leaveMark,\n markAt,\n rovingMarks,\n chartRenderGate,\n CHART_SKELETON_COUNT,\n DsChartBase,\n skeletonMarkCount,\n tweenMarks,\n watchElementWidth,\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 type { ChartDataTable } from '@ids-group-ltd/ids-design-system/core';\nimport {\n ChartTooltipDirective,\n ChartStatesComponent,\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_INNER_RADIUS,\n arcPath,\n fitCenterValue,\n groupSmallest,\n holeFraction,\n paletteIndex,\n positiveValues,\n resolveInnerRadius,\n skeletonArcs,\n resolveTotal,\n ringCoords,\n sliceArcs,\n} from './pie-chart.math';\nimport type { CenterValueFit, PieArc } from './pie-chart.math';\nimport type { PieChartCenterPlacement, PieChartSlice } from './pie-chart.types';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\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// How far a hovered slice slides out along its bisector, in viewBox units.\nconst SLICE_HOVER_SHIFT = 3;\n// The value keeps a margin from the inner edge of the ring.\nconst CENTER_VALUE_HOLE_SHARE = 0.9;\n\n// One canvas for every pie chart on the page.\nlet measureContext: CanvasRenderingContext2D | null | undefined;\n\n@Component({\n selector: 'ds-pie-chart',\n standalone: true,\n imports: [\n NgTemplateOutlet,\n SkeletonComponent,\n ChartTooltipDirective,\n ChartStatesComponent,\n IconComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './pie-chart.component.html',\n styleUrl: './pie-chart.component.scss',\n host: { '[class.framed]': \"frameResolved() === 'auto'\" },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PieChartComponent\n extends DsChartBase\n implements ChartDimmable, ChartWithDataTable, ChartWithTooltipTrigger\n{\n protected readonly renderReady = chartRenderGate();\n\n /** One slice per entry. A non-positive or non-finite value counts as zero. */\n readonly data = input<readonly PieChartSlice[]>([]);\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 /** When the sum does not fit the hole even at `--ds-pie-chart-center-value-min-font-size`, prints\n * it in the `'tick'` form of `valueFormat` (`32.4K`). A `centerValue` string is never shortened. */\n readonly centerCompact = input(true, { transform: booleanAttribute });\n\n /** `'below'` prints the value and its caption under the ring at full size, never shrunk or\n * shortened. */\n readonly centerPlacement = input<PieChartCenterPlacement>('inside');\n\n /** The hovered, focused or held slice prints its value and label in the centre in place of\n * `centerValue` and `centerLabel`. */\n readonly showHoverCenter = input(true, { transform: booleanAttribute });\n\n /** Legend placement, logical so it flips in right-to-left. */\n readonly legend = input<'end' | 'bottom' | 'none'>('end');\n\n /** How many slices, and legend rows, the loading skeleton draws before the data is known. */\n readonly skeletonCount = input(CHART_SKELETON_COUNT, {\n transform: (raw: unknown) => numberAttribute(raw, CHART_SKELETON_COUNT),\n });\n\n /** Longest legend to draw; past it the smallest slices are summed into one. Values below 2 are ignored. */\n readonly maxSlices = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n\n /** Names the grouped slice. Unset falls back to `DS_INTL.chart.other`. */\n readonly otherLabel = input<string | null>(null);\n\n readonly otherLabelResolved = computed(\n () => this.otherLabel() ?? this.intl().chart.other,\n );\n\n /** The hole, as a fraction of the outer radius. Zero draws a solid pie without centre content. */\n readonly innerRadius = input(DEFAULT_INNER_RADIUS, {\n transform: numberAttribute,\n });\n\n /** The label-and-value table under the plot: `'toggle'` puts it behind a disclosure,\n * `'visible'` opens it, `'none'` renders none. Unset falls back to `DS_CONFIG.chart.dataTable`,\n * then `'none'`. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Prints each slice's share in the legend, the tooltip and the data table. */\n readonly partOfWhole = input(true, { transform: booleanAttribute });\n\n readonly dataTableResolved = this.defaults.dataTable;\n\n /** The slice that was clicked or activated with Enter or Space. */\n readonly sliceClicked = output<PieChartSlice>();\n\n /** Dims every other mark while one is hovered or focused. */\n readonly dimOthers = input(false, { transform: booleanAttribute });\n\n /** Whether a hovered or focused slice opens a tooltip. */\n readonly tooltip = input<ChartItemTooltipTrigger>('item');\n\n protected readonly tooltipTemplate =\n contentChild<TemplateRef<{ $implicit: ChartTooltipContext }>>(\n 'dsChartTooltip',\n );\n\n private readonly tooltipLingerResolved = this.defaults.tooltipLingerMs;\n\n protected readonly activeMark = chartActiveMark(\n () => this.tooltipLingerResolved(),\n () => this.defaults.hoverDelayMs(),\n );\n\n protected onMarkClick(\n payload: PieChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(payload);\n if (this.defaults.pinOnClick()) {\n this.activeMark.pin(index, event);\n }\n }\n protected readonly roving = rovingMarks(() => this.slices().length);\n\n protected onMarkFocus(index: number, event: FocusEvent): void {\n this.roving.focus(index);\n this.activeMark.enter(index, event);\n }\n\n /** A legend item opens the arc's tooltip and slides the arc out, as hovering the arc does. */\n protected onLegendEnter(index: number, event: Event): void {\n this.activeMark.enter(index, event, this.arcAt(event, index));\n }\n\n protected onLegendLeave(): void {\n this.activeMark.leave();\n }\n\n protected onLegendFocus(index: number, event: FocusEvent): void {\n this.roving.focus(index);\n this.onLegendEnter(index, event);\n }\n\n protected onLegendClick(\n slice: PieChartSlice,\n index: number,\n event: Event,\n ): void {\n this.sliceClicked.emit(slice);\n if (this.defaults.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 onMarkNavigation(\n event: KeyboardEvent,\n index: number,\n scope: string,\n ): void {\n this.roving.navigate(\n event,\n index,\n (event.currentTarget as Element).closest(scope),\n );\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.otherLabelResolved()),\n );\n\n protected readonly dataTableColumns = computed<readonly string[]>(() =>\n this.partOfWhole()\n ? [\n this.intl().chart.labelColumn,\n this.intl().chart.valueColumn,\n this.intl().chart.shareColumn,\n ]\n : [this.intl().chart.labelColumn, this.intl().chart.valueColumn],\n );\n\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.slices().map((entry) => ({\n key: entry.slice.id,\n cells: this.partOfWhole()\n ? [entry.slice.label, entry.formattedValue, entry.formattedPercent]\n : [entry.slice.label, entry.formattedValue],\n })),\n );\n\n protected readonly leaveMark = leaveMark;\n\n protected readonly sliceHoverShift = SLICE_HOVER_SHIFT;\n\n // Keyed by slice id, so a slice that stays tweens from where it is drawn and a new one opens from its start edge.\n private readonly drawnArcs = signal<ReadonlyMap<string, PieArc>>(new Map());\n\n private stopArcTween: () => void = () => undefined;\n\n private readonly states = viewChild(ChartStatesComponent);\n\n private readonly tweenArcs = afterRenderEffect((onCleanup) => {\n const data = this.visibleSlices();\n const ring = this.ringElement()?.nativeElement;\n const target = sliceArcs(data.map((slice) => slice.value));\n untracked(() => {\n const drawn = this.drawnArcs();\n const apply = (angles: readonly number[]): void =>\n this.drawnArcs.set(\n new Map(\n data.map((slice, index) => [\n slice.id,\n {\n startAngle: angles[2 * index],\n endAngle: angles[2 * index + 1],\n },\n ]),\n ),\n );\n const to = target.flatMap((arc) => [arc.startAngle, arc.endAngle]);\n this.stopArcTween();\n if (ring && drawn.size === 0 && this.states()?.morphing()) {\n this.stopArcTween = tweenMarks(\n ring,\n skeletonArcs(data.length, skeletonMarkCount(0, this.skeletonCount())),\n to,\n apply,\n 'mark-grow',\n );\n\n return;\n }\n if (!ring || drawn.size === 0) {\n apply(to);\n\n return;\n }\n const from = data.flatMap((slice, index) => {\n const arc = drawn.get(slice.id);\n\n return arc\n ? [arc.startAngle, arc.endAngle]\n : [target[index].startAngle, target[index].startAngle];\n });\n this.stopArcTween = tweenMarks(ring, from, to, apply);\n });\n onCleanup(() => this.stopArcTween());\n });\n\n protected readonly slices = computed(() => {\n const data = this.visibleSlices();\n const values = data.map((slice) => slice.value);\n const target = sliceArcs(values);\n const drawn = this.drawnArcs();\n const arcs = data.map(\n (slice, index) =>\n drawn.get(slice.id) ??\n (drawn.size === 0\n ? target[index]\n : {\n startAngle: target[index].startAngle,\n endAngle: target[index].startAngle,\n }),\n );\n const percents = largestRemainder(positiveValues(values));\n const innerRadius = resolveInnerRadius(\n RING_OUTER_RADIUS,\n this.innerRadius(),\n );\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 shift: ringCoords(\n 0,\n 0,\n SLICE_HOVER_SHIFT,\n (arcs[index].startAngle + arcs[index].endAngle) / 2,\n ),\n // Halfway along the arc and through the ring: inside the slice whatever its sweep.\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: formatWholePercent(\n percents[index],\n this.defaults.locale,\n ),\n }));\n });\n\n /** The held slice's centre as a share of the ring box. The badge is HTML over the ring: inside a `foreignObject` the viewBox scale grows it and the centring grid does not lay out. */\n protected readonly pinnedEntry = computed(() => {\n const entry = this.activeMark.pinned()\n ? this.slices()[this.activeMark.index()]\n : undefined;\n\n return entry\n ? {\n center: {\n x: ((entry.center.x + entry.shift.x) / RING_VIEW_BOX_SIZE) * 100,\n y: ((entry.center.y + entry.shift.y) / RING_VIEW_BOX_SIZE) * 100,\n },\n }\n : null;\n });\n\n protected readonly resolvedCenterValue = computed(\n () =>\n this.centerValue() ?? this.valueFormatResolved()(this.total(), 'tooltip'),\n );\n\n // The hovered, focused or held slice takes the centre from the total until the pointer leaves.\n private readonly centerEntry = computed(() =>\n this.showHoverCenter()\n ? (this.slices()[this.activeMark.index()] ?? null)\n : null,\n );\n\n private readonly centerKey = computed(() =>\n this.centerEntry() ? this.activeMark.index() : -1,\n );\n\n private readonly centerSwapElement =\n viewChild<ElementRef<HTMLElement>>('centerSwap');\n\n private shownCenterKey: number | null = null;\n\n // Fades the centre in once per slice it names, on the hover timing; a zero duration swaps at once.\n private readonly fadeCenterSwap = afterRenderEffect(() => {\n const key = this.centerKey();\n const swap = this.centerSwapElement()?.nativeElement;\n const previous = this.shownCenterKey;\n this.shownCenterKey = key;\n if (!swap || previous === null || previous === key) {\n return;\n }\n const timing = chartTiming(swap, 'state');\n if (timing) {\n swap.animate([{ opacity: 0 }, { opacity: 1 }], timing);\n }\n });\n\n private readonly shownCenterValue = computed(() => {\n const entry = this.centerEntry();\n if (!entry) {\n return this.resolvedCenterValue();\n }\n\n return this.partOfWhole() ? entry.formattedPercent : entry.formattedValue;\n });\n\n protected readonly shownCenterLabel = computed(\n () => this.centerEntry()?.slice.label ?? this.centerLabel(),\n );\n\n private readonly compactCenterValue = computed(() =>\n this.centerCompact() && this.centerValue() === null && !this.centerEntry()\n ? this.valueFormatResolved()(this.total(), 'tick')\n : null,\n );\n\n private readonly ringElement = viewChild<ElementRef<HTMLElement>>('ring');\n private readonly centerValueElement =\n viewChild<ElementRef<HTMLElement>>('centerValue');\n\n private readonly centerFit = signal<CenterValueFit | null>(null, {\n equal: (previous, next) =>\n previous?.text === next?.text && previous?.fontSize === next?.fontSize,\n });\n\n protected readonly centerText = computed(\n () => this.centerFit()?.text ?? this.shownCenterValue(),\n );\n\n protected readonly centerFontSize = computed(\n () => this.centerFit()?.fontSize ?? null,\n );\n\n private readonly ringWidth = signal(0);\n\n private readonly fitsInside = computed(\n () => this.hole() > 0 && this.centerPlacement() === 'inside',\n );\n\n private fitCenter(\n value: HTMLElement,\n ringWidth: number,\n full: string,\n compact: string | null,\n hole: number,\n ): CenterValueFit | null {\n const style = getComputedStyle(value);\n const maxFontSize = parseFloat(\n style.getPropertyValue('--_pie-chart-center-value-max-font-size'),\n );\n const minFontSize = parseFloat(\n style.getPropertyValue('--_pie-chart-center-value-min-font-size'),\n );\n measureContext ??= document.createElement('canvas').getContext('2d');\n const context = measureContext;\n if (!context || !(maxFontSize > 0) || !(minFontSize > 0)) {\n return null;\n }\n context.font = `${style.fontWeight} ${maxFontSize}px ${style.fontFamily}`;\n const measure = (text: string) => ({\n text,\n width: context.measureText(text).width,\n });\n const availableWidth = ringWidth * hole * CENTER_VALUE_HOLE_SHARE;\n const floor = Math.min(minFontSize, maxFontSize);\n const measuredFull = measure(full);\n const fitsAtFloor =\n (measuredFull.width * floor) / maxFontSize <= availableWidth;\n\n return fitCenterValue(\n measuredFull,\n compact === null || fitsAtFloor ? null : measure(compact),\n availableWidth,\n maxFontSize,\n floor,\n );\n }\n\n protected readonly accessibleName = computed(\n () =>\n this.summary() ??\n describeSeries(\n this.intl().chart,\n this.caption() ?? this.intl().chart.title,\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.innerRadius()));\n\n // Only the ring is observed, and only while the value sits inside it: its box is set by\n // `--ds-pie-chart-size` alone, so the fitted value never resizes what is observed.\n private readonly watchRing = afterRenderEffect((onCleanup) => {\n const ring = this.ringElement()?.nativeElement;\n if (ring && this.fitsInside()) {\n onCleanup(watchElementWidth(ring, this.ringWidth));\n }\n });\n\n // Refits once per change of what decides the fit; an unchanged ring width writes nothing.\n private readonly refit = afterRenderEffect(() => {\n const value = this.centerValueElement()?.nativeElement;\n const ringWidth = this.ringWidth();\n const full = this.shownCenterValue();\n const compact = this.compactCenterValue();\n const hole = this.hole();\n if (!value || !this.fitsInside() || ringWidth === 0) {\n this.centerFit.set(null);\n\n return;\n }\n fontsLoaded();\n this.centerFit.set(\n untracked(() => this.fitCenter(value, ringWidth, full, compact, hole)),\n );\n });\n\n protected entryLabel(entry: {\n slice: PieChartSlice;\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: PieChartSlice, event: Event): void {\n // A key pressed on a control inside the item belongs to that control.\n if (!this.interactive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.sliceClicked.emit(slice);\n }\n\n // The legend items carry the tab route; the ring needs it only 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 protected readonly skeletonMarks = computed(() =>\n skeletonMarkCount(this.data().length, this.skeletonCount()),\n );\n\n protected readonly skeletonRows = computed(() =>\n Array.from({ length: this.skeletonMarks() }),\n );\n}\n","<figure\n class=\"pie-chart\"\n dsChartStates\n [style.--_pie-chart-hole-fraction]=\"hole()\"\n [pinned]=\"activeMark.pinned()\"\n [caption]=\"caption()\"\n [error]=\"error()\"\n [errorText]=\"errorTextResolved()\"\n [pending]=\"(loading() && isEmpty()) || !renderReady()\"\n [reloading]=\"loading()\"\n [dataTable]=\"dataTableResolved()\"\n [shimmer]=\"loading()\"\n [empty]=\"isEmpty()\"\n [emptyText]=\"emptyTextResolved()\"\n [skeleton]=\"skeleton\"\n [body]=\"body\"\n [message]=\"message\"\n (release)=\"activeMark.release()\">\n</figure>\n\n<ng-template #skeleton>\n <div\n class=\"skeleton\"\n aria-hidden=\"true\"\n [class.legend-bottom]=\"legend() === 'bottom'\"\n [style.--_pie-chart-skeleton-slices]=\"skeletonMarks()\">\n <div class=\"ring\">\n <ds-skeleton\n class=\"skeleton-ring\"\n data-morph=\"self\"\n circle\n width=\"100%\"\n height=\"100%\"\n [shimmer]=\"loading()\" />\n\n @if (hole() > 0 && centerPlacement() !== 'below') {\n <ds-skeleton\n class=\"skeleton-center\"\n width=\"40%\"\n height=\"var(--space-3)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n\n @if (legend() !== 'none') {\n <div class=\"skeleton-legend\">\n @for (placeholder of skeletonRows(); track $index) {\n <div class=\"skeleton-row\">\n <ds-skeleton\n circle\n data-morph=\"mark\"\n width=\"var(--_pie-chart-swatch-size)\"\n height=\"var(--_pie-chart-swatch-size)\"\n [shimmer]=\"loading()\" />\n\n <ds-skeleton\n class=\"skeleton-label\"\n height=\"var(--space-2)\"\n [shimmer]=\"loading()\" />\n\n <ds-skeleton\n width=\"var(--space-8)\"\n height=\"var(--space-2)\"\n [shimmer]=\"loading()\" />\n\n @if (partOfWhole()) {\n <ds-skeleton\n width=\"var(--space-6)\"\n height=\"var(--space-2)\"\n [shimmer]=\"loading()\" />\n }\n </div>\n }\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #body>\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 [dsChartTooltipSwatches]=\"defaults.tooltipSwatches()\"\n [dsChartTooltipPinned]=\"activeMark.pinned()\"\n [dsChartTooltipOrigin]=\"activeMark.origin()\"\n [dsChartTooltipTemplate]=\"tooltipTemplate() ?? null\">\n @if (hole() > 0 && centerPlacement() === 'below') {\n <div class=\"ring-stack\">\n <ng-container [ngTemplateOutlet]=\"ringBlock\" />\n\n <div class=\"center-below\">\n <ng-container [ngTemplateOutlet]=\"centerContent\" />\n </div>\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"ringBlock\" />\n }\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 [class.pins]=\"defaults.pinOnClick()\"\n [attr.role]=\"interactive() ? 'button' : null\"\n [attr.tabindex]=\"\n interactive() ? (index === roving.tabStop() ? 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)=\"onLegendLeave()\"\n (focus)=\"onLegendFocus(index, $event)\"\n (blur)=\"onLegendLeave()\"\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 data-morph=\"mark\"\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 <ds-chart-data-table\n [columns]=\"dataTableColumns()\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n</ng-template>\n\n<ng-template\n #message\n let-text\n let-error=\"error\">\n <div class=\"empty\">\n <div\n class=\"empty-ring\"\n aria-hidden=\"true\">\n </div>\n\n <p\n class=\"empty-text\"\n [class.is-error]=\"error\"\n [attr.role]=\"error ? 'status' : null\">\n {{ text }}\n </p>\n </div>\n</ng-template>\n\n<ng-template #ringBlock>\n <div\n #ring\n class=\"ring\"\n [class.ring-outline]=\"total() === 0\">\n <svg\n class=\"ring-svg\"\n data-morph=\"self\"\n [style.--_pie-chart-hover-shift.px]=\"sliceHoverShift\"\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.pins]=\"defaults.pinOnClick()\"\n [class.is-active]=\"activeMark.index() === index\"\n [class.is-pinned]=\"\n activeMark.pinned() && activeMark.index() === index\n \"\n [class.focusable]=\"ringCarriesTheRoute()\"\n [attr.d]=\"entry.path\"\n [style.fill]=\"entry.color\"\n [style.--_slice-shift-x.px]=\"entry.shift.x\"\n [style.--_slice-shift-y.px]=\"entry.shift.y\"\n [attr.role]=\"ringCarriesTheRoute() ? 'button' : null\"\n [attr.tabindex]=\"\n ringCarriesTheRoute() ? (index === roving.tabStop() ? 0 : -1) : null\n \"\n [attr.data-mark-index]=\"index\"\n [attr.aria-label]=\"ringCarriesTheRoute() ? entryLabel(entry) : null\"\n (animate.leave)=\"leaveMark($event)\"\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 </svg>\n\n @if (hole() > 0 && centerPlacement() === 'inside') {\n <div class=\"center\">\n <ng-container [ngTemplateOutlet]=\"centerContent\" />\n </div>\n }\n\n @if (pinnedEntry(); as entry) {\n <span\n class=\"pin-marker\"\n [style.left.%]=\"entry.center.x\"\n [style.top.%]=\"entry.center.y\">\n <ds-icon\n name=\"pin\"\n [size]=\"14\" />\n </span>\n }\n </div>\n</ng-template>\n\n<ng-template #centerContent>\n <span\n #centerSwap\n class=\"center-swap\">\n <span\n #centerValue\n class=\"center-value\"\n [style.font-size.px]=\"centerFontSize()\">\n {{ centerText() }}\n </span>\n\n @if (shownCenterLabel()) {\n <span class=\"center-label\">\n {{ shownCenterLabel() }}\n </span>\n }\n </span>\n</ng-template>\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,oBAAoB,GAAG,IAAI;AAExC;AACM,SAAU,YAAY,CAAC,WAAmB,EAAA;AAC9C,IAAA,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,WAAW,IAAI,CAAC,IAAI,WAAW,GAAG;AACvE,UAAE,KAAK,CAAC,WAAW;UACjB,oBAAoB;AAC1B;AAEA;SACgB,aAAa,CAC3B,MAAgC,EAChC,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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EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,gBAAgB,oFAqIgB,oBAAoB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CA+InB,YAAY,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAsCiB,MAAM,4EAEnC,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AExepD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ViewContainerRef, ElementRef, viewChild, input, booleanAttribute, signal, forwardRef, ViewEncapsulation, Component } from '@angular/core';
|
|
2
|
+
import { inject, ViewContainerRef, ElementRef, viewChild, input, booleanAttribute, signal, contentChild, computed, forwardRef, ViewEncapsulation, Component, afterRenderEffect, Directive } from '@angular/core';
|
|
3
3
|
import { Overlay } from '@angular/cdk/overlay';
|
|
4
4
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
5
5
|
import * as i1 from '@ids-group-ltd/ids-design-system/components';
|
|
@@ -7,7 +7,9 @@ import { DsStaticPreview, overlayPlacementOf, prepareOverlayEnter, forwardOverla
|
|
|
7
7
|
import { CdkTrapFocus } from '@angular/cdk/a11y';
|
|
8
8
|
import { NgTemplateOutlet } from '@angular/common';
|
|
9
9
|
import { DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';
|
|
10
|
+
import { MenuComponent } from '@ids-group-ltd/ids-design-system/components/menu';
|
|
10
11
|
|
|
12
|
+
let nextPanelId = 0;
|
|
11
13
|
class PopoverComponent {
|
|
12
14
|
overlay = inject(Overlay);
|
|
13
15
|
vcr = inject(ViewContainerRef);
|
|
@@ -48,6 +50,11 @@ class PopoverComponent {
|
|
|
48
50
|
panelLabel = input(null, ...(ngDevMode ? [{ debugName: "panelLabel" }] : /* istanbul ignore next */ []));
|
|
49
51
|
/** Open/closed state, for callers binding `aria-expanded` on the trigger. */
|
|
50
52
|
opened = signal(false, ...(ngDevMode ? [{ debugName: "opened" }] : /* istanbul ignore next */ []));
|
|
53
|
+
/** Id of the open panel, for `aria-controls` on the trigger. */
|
|
54
|
+
panelId = `ds-popover-${++nextPanelId}`;
|
|
55
|
+
menu = contentChild(MenuComponent, { ...(ngDevMode ? { debugName: "menu" } : /* istanbul ignore next */ {}), descendants: true });
|
|
56
|
+
/** Whether the projected content holds a `ds-menu`, which makes the trigger `aria-haspopup="menu"`. */
|
|
57
|
+
holdsMenu = computed(() => this.menu() !== undefined, ...(ngDevMode ? [{ debugName: "holdsMenu" }] : /* istanbul ignore next */ []));
|
|
51
58
|
/** Resolved placement after the overlay positions; drives the arrow direction. */
|
|
52
59
|
resolvedPlacement = signal('bottom', ...(ngDevMode ? [{ debugName: "resolvedPlacement" }] : /* istanbul ignore next */ []));
|
|
53
60
|
toggle(trigger) {
|
|
@@ -135,7 +142,7 @@ class PopoverComponent {
|
|
|
135
142
|
provide: DsOverlayCloseRef,
|
|
136
143
|
useExisting: forwardRef(() => PopoverComponent),
|
|
137
144
|
},
|
|
138
|
-
], viewQueries: [{ propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "panelTrap", first: true, predicate: CdkTrapFocus, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--ds-radius-panel));--_popover-shadow: var(--ds-popover-shadow, var(--ds-elevation-overlay));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0;--ds-menu-clip-radius: calc( var(--_popover-radius) - var(--border-width-default) )}.arrow{--_popover-arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_popover-arrow-size) * 2);height:calc(var(--_popover-arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";box-sizing:border-box;position:absolute;width:var(--_popover-arrow-size);height:var(--_popover-arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
145
|
+
], queries: [{ propertyName: "menu", first: true, predicate: MenuComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "panelTrap", first: true, predicate: CdkTrapFocus, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DsStaticPreview, inputs: ["staticPreview", "staticPreview"] }], ngImport: i0, template: "<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.id]=\"panelId\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--ds-radius-panel));--_popover-shadow: var(--ds-popover-shadow, var(--ds-elevation-overlay));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0;--ds-menu-clip-radius: calc( var(--_popover-radius) - var(--border-width-default) )}.arrow{--_popover-arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_popover-arrow-size) * 2);height:calc(var(--_popover-arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";box-sizing:border-box;position:absolute;width:var(--_popover-arrow-size);height:var(--_popover-arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
139
146
|
}
|
|
140
147
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverComponent, decorators: [{
|
|
141
148
|
type: Component,
|
|
@@ -144,8 +151,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
144
151
|
provide: DsOverlayCloseRef,
|
|
145
152
|
useExisting: forwardRef(() => PopoverComponent),
|
|
146
153
|
},
|
|
147
|
-
], template: "<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--ds-radius-panel));--_popover-shadow: var(--ds-popover-shadow, var(--ds-elevation-overlay));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0;--ds-menu-clip-radius: calc( var(--_popover-radius) - var(--border-width-default) )}.arrow{--_popover-arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_popover-arrow-size) * 2);height:calc(var(--_popover-arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";box-sizing:border-box;position:absolute;width:var(--_popover-arrow-size);height:var(--_popover-arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"] }]
|
|
148
|
-
}], propDecorators: { panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], panelTrap: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkTrapFocus), { isSignal: true }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], arrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrow", required: false }] }], panelRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelRole", required: false }] }], panelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelLabel", required: false }] }] } });
|
|
154
|
+
], template: "<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.id]=\"panelId\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),: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);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:contents}.popover{--_popover-bg-color: var(--ds-popover-bg-color, var(--surface-overlay));--_popover-border-color: var(--ds-popover-border-color, var(--border-default));--_popover-radius: var(--ds-popover-radius, var(--ds-radius-panel));--_popover-shadow: var(--ds-popover-shadow, var(--ds-elevation-overlay));--_popover-padding: var(--ds-popover-padding, var(--space-3));--_popover-max-width: var(--ds-popover-max-width, var(--popover-maxw));--_popover-min-width: var(--ds-popover-min-width, auto);position:relative;background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);border-radius:var(--_popover-radius);box-shadow:var(--_popover-shadow);padding:var(--_popover-padding);z-index:var(--layer-popover);max-width:var(--_popover-max-width);min-width:var(--_popover-min-width)}.popover:has(ds-menu){padding:0;--ds-menu-clip-radius: calc( var(--_popover-radius) - var(--border-width-default) )}.arrow{--_popover-arrow-size: var(--ds-popover-arrow-size, 7px);position:absolute;width:calc(var(--_popover-arrow-size) * 2);height:calc(var(--_popover-arrow-size) * 2);overflow:hidden;pointer-events:none}.arrow:before{content:\"\";box-sizing:border-box;position:absolute;width:var(--_popover-arrow-size);height:var(--_popover-arrow-size);background:var(--_popover-bg-color);border:var(--border-width-default) solid var(--_popover-border-color);transform:rotate(45deg);transform-origin:center}[data-placement=bottom] .arrow,[data-placement=bottom]>.arrow{top:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=bottom] .arrow:before,[data-placement=bottom]>.arrow:before{bottom:0;left:50%;translate:-50% 0;border-right:none;border-bottom:none}[data-placement=top] .arrow,[data-placement=top]>.arrow{bottom:calc(var(--_popover-arrow-size) * -1);left:var(--space-4)}[data-placement=top] .arrow:before,[data-placement=top]>.arrow:before{top:0;left:50%;translate:-50% 0;border-left:none;border-top:none}[data-placement=right] .arrow,[data-placement=right]>.arrow{left:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=right] .arrow:before,[data-placement=right]>.arrow:before{right:0;top:50%;translate:0 -50%;border-right:none;border-top:none}[data-placement=left] .arrow,[data-placement=left]>.arrow{right:calc(var(--_popover-arrow-size) * -1);top:var(--space-4)}[data-placement=left] .arrow:before,[data-placement=left]>.arrow:before{left:0;top:50%;translate:0 -50%;border-left:none;border-bottom:none}\n"] }]
|
|
155
|
+
}], propDecorators: { panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], panelTrap: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkTrapFocus), { isSignal: true }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], arrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrow", required: false }] }], panelRole: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelRole", required: false }] }], panelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelLabel", required: false }] }], menu: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MenuComponent), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
149
156
|
function buildPositions(placement, align, offsetPx) {
|
|
150
157
|
const crossStart = align === 'start' ? 'start' : 'end';
|
|
151
158
|
const crossEnd = align === 'start' ? 'end' : 'start';
|
|
@@ -235,9 +242,59 @@ function buildPositions(placement, align, offsetPx) {
|
|
|
235
242
|
}
|
|
236
243
|
}
|
|
237
244
|
|
|
245
|
+
/**
|
|
246
|
+
* Opens a `ds-popover` from the element it sits on and keeps the trigger's ARIA in step:
|
|
247
|
+
* `aria-haspopup` (`menu` when the popover holds a `ds-menu`, `dialog` otherwise), `aria-expanded`
|
|
248
|
+
* and, while open, `aria-controls`. On `ds-button` and `ds-icon-button` these land on the inner
|
|
249
|
+
* `<button>`, the element a screen reader focuses; the overlay anchors to it too.
|
|
250
|
+
*
|
|
251
|
+
* Writes the attributes itself, so leave `ariaHasPopup`, `ariaExpanded` and `ariaControls` unbound
|
|
252
|
+
* on the same button: a bound value would overwrite them on its next change.
|
|
253
|
+
*/
|
|
254
|
+
class DsPopoverTrigger {
|
|
255
|
+
popover = input.required({ ...(ngDevMode ? { debugName: "popover" } : /* istanbul ignore next */ {}), alias: 'dsPopoverTrigger' });
|
|
256
|
+
host = inject(ElementRef);
|
|
257
|
+
constructor() {
|
|
258
|
+
afterRenderEffect(() => {
|
|
259
|
+
const popover = this.popover();
|
|
260
|
+
const control = this.control();
|
|
261
|
+
const opened = popover.opened();
|
|
262
|
+
control.setAttribute('aria-haspopup', popover.holdsMenu() ? 'menu' : 'dialog');
|
|
263
|
+
control.setAttribute('aria-expanded', String(opened));
|
|
264
|
+
if (opened) {
|
|
265
|
+
control.setAttribute('aria-controls', popover.panelId);
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
control.removeAttribute('aria-controls');
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
toggle() {
|
|
273
|
+
this.popover().toggle(this.control());
|
|
274
|
+
}
|
|
275
|
+
control() {
|
|
276
|
+
const host = this.host.nativeElement;
|
|
277
|
+
if (host.matches('button, a[href], [role="button"]')) {
|
|
278
|
+
return host;
|
|
279
|
+
}
|
|
280
|
+
return (host.querySelector('button, a[href], [role="button"]') ??
|
|
281
|
+
host);
|
|
282
|
+
}
|
|
283
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsPopoverTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
284
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: DsPopoverTrigger, isStandalone: true, selector: "[dsPopoverTrigger]", inputs: { popover: { classPropertyName: "popover", publicName: "dsPopoverTrigger", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "toggle()" } }, ngImport: i0 });
|
|
285
|
+
}
|
|
286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsPopoverTrigger, decorators: [{
|
|
287
|
+
type: Directive,
|
|
288
|
+
args: [{
|
|
289
|
+
selector: '[dsPopoverTrigger]',
|
|
290
|
+
standalone: true,
|
|
291
|
+
host: { '(click)': 'toggle()' },
|
|
292
|
+
}]
|
|
293
|
+
}], ctorParameters: () => [], propDecorators: { popover: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsPopoverTrigger", required: true }] }] } });
|
|
294
|
+
|
|
238
295
|
/**
|
|
239
296
|
* Generated bundle index. Do not edit.
|
|
240
297
|
*/
|
|
241
298
|
|
|
242
|
-
export { PopoverComponent };
|
|
299
|
+
export { DsPopoverTrigger, PopoverComponent };
|
|
243
300
|
//# sourceMappingURL=ids-group-ltd-ids-design-system-components-popover.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-popover.mjs","sources":["../../../src/lib/components/popover/popover.component.ts","../../../src/lib/components/popover/popover.component.html","../../../src/lib/components/popover/ids-group-ltd-ids-design-system-components-popover.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n clearOnDetach,\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n focusIsInside,\n forwardOverlayTokens,\n overlayPlacementOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\n\nexport type PopoverAlign = 'start' | 'end';\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n@Component({\n selector: 'ds-popover',\n standalone: true,\n imports: [CdkTrapFocus, NgTemplateOutlet],\n templateUrl: './popover.component.html',\n styleUrl: './popover.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n providers: [\n {\n provide: DsOverlayCloseRef,\n useExisting: forwardRef(() => PopoverComponent),\n },\n ],\n})\nexport class PopoverComponent implements OnDestroy, DsOverlayCloseRef {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n protected readonly preview = inject(DsStaticPreview);\n protected readonly panelTpl = viewChild<TemplateRef<unknown>>('panel');\n private readonly panelTrap = viewChild(CdkTrapFocus);\n private ref: OverlayRef | null = null;\n private triggerElement: HTMLElement | null = null;\n private focusTimer: ReturnType<typeof setTimeout> | null = null;\n /** Public panel tokens forwarded onto the portaled overlay pane on open, so a\n * consumer's `ds-popover { --ds-popover-panel-*: ... }` reaches it. */\n private readonly panelTokens = [\n '--ds-popover-bg-color',\n '--ds-popover-border-color',\n '--ds-popover-radius',\n '--ds-popover-shadow',\n '--ds-popover-padding',\n '--ds-popover-max-width',\n '--ds-popover-min-width',\n '--ds-popover-arrow-size',\n // A projected ds-menu is portaled into the pane, out of reach of a scoped width.\n '--ds-menu-min-width',\n '--ds-menu-max-width',\n ];\n\n /** Cross-axis alignment of the panel against the trigger. */\n readonly align = input<PopoverAlign>('start');\n /** Which side of the trigger the panel prefers to appear on. */\n readonly placement = input<PopoverPlacement>('bottom');\n /** Render a small caret pointing at the trigger. */\n readonly arrow = input(false, { transform: booleanAttribute });\n\n /** ARIA role for the panel (e.g. 'dialog'). When set, the panel traps focus and captures it\n * on open; Escape or an in-panel close returns focus to the trigger, an outside click or\n * scroll does not (non-modal). Leave null for plain text popovers. A panel holding a\n * `role=\"menu\"` (a `ds-menu`) captures focus on open without it, untrapped. */\n readonly panelRole = input<string | null>(null);\n /** Accessible name for the panel; pair with `panelRole`. */\n readonly panelLabel = input<string | null>(null);\n\n /** Open/closed state, for callers binding `aria-expanded` on the trigger. */\n readonly opened = signal(false);\n /** Resolved placement after the overlay positions; drives the arrow direction. */\n readonly resolvedPlacement = signal<PopoverPlacement>('bottom');\n\n toggle(trigger: HTMLElement): void {\n if (this.preview.staticPreview()) {\n return;\n }\n // Clicking another trigger while open dismisses the overlay through the CDK's outside-pointer\n // listener FIRST, so `ref` is already gone here and this re-opens on the new trigger.\n if (this.ref) {\n this.close();\n\n return;\n }\n\n this.triggerElement = trigger;\n const placement = this.placement();\n const arrowOffset = this.arrow() ? 8 : 4;\n\n const positionStrategy: FlexibleConnectedPositionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(trigger)\n .withPositions(buildPositions(placement, this.align(), arrowOffset))\n .withViewportMargin(8);\n\n positionStrategy.positionChanges.subscribe((change) => {\n this.resolvedPlacement.set(\n overlayPlacementOf(\n change.connectionPair.overlayY,\n change.connectionPair.overlayX,\n ),\n );\n });\n\n const cfg: OverlayConfig = {\n positionStrategy,\n hasBackdrop: false,\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n };\n this.ref = this.overlay.create(cfg);\n prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);\n forwardOverlayTokens(this.ref, this.host.nativeElement, this.panelTokens);\n closeOnOutsidePointer(\n this.ref,\n (target) => trigger.contains(target),\n () => this.close('dismiss'),\n );\n // CDK's scroll strategies miss a plain overflow container, so close on any outside scroll ourselves.\n const removeScrollClose = closeOnScroll(this.ref, () =>\n this.close('dismiss'),\n );\n clearOnDetach(this.ref, {\n current: () => this.ref,\n always: removeScrollClose,\n clear: () => {\n this.ref = null;\n this.opened.set(false);\n },\n });\n this.ref.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close('dismiss');\n }\n });\n this.ref.attach(new TemplatePortal(this.panelTpl()!, this.vcr));\n this.resolvedPlacement.set(placement);\n this.opened.set(true);\n // A menu is operated from inside (APG menu button), so it takes focus without a panelRole.\n if (\n this.panelRole() ||\n this.ref.overlayElement.querySelector('[role=\"menu\"]')\n ) {\n // cdkTrapFocusAutoCapture without its destroy-time restore, which steals focus on an outside/scroll close.\n this.focusTimer = setTimeout(() => {\n this.focusTimer = null;\n void this.panelTrap()?.focusTrap?.focusInitialElementWhenReady();\n });\n }\n }\n\n close(cause: DsOverlayCloseCause = 'select'): void {\n if (!this.ref) {\n return;\n }\n clearTimeout(this.focusTimer ?? undefined);\n this.focusTimer = null;\n const focusWasInPanel = focusIsInside(this.ref);\n disposeWithLeave(this.ref, cause);\n this.ref = null;\n this.opened.set(false);\n if (focusWasInPanel) {\n this.triggerElement?.focus({ preventScroll: true });\n }\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.focusTimer ?? undefined);\n this.ref?.dispose();\n this.ref = null;\n }\n}\n\nfunction buildPositions(\n placement: PopoverPlacement,\n align: PopoverAlign,\n offsetPx: number,\n): ConnectedPosition[] {\n const crossStart = align === 'start' ? 'start' : 'end';\n const crossEnd: 'start' | 'end' = align === 'start' ? 'end' : 'start';\n\n switch (placement) {\n case 'top':\n return [\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'top',\n overlayX: crossEnd,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n ];\n case 'left':\n return [\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n ];\n case 'right':\n return [\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n ];\n default: // bottom\n return [\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'bottom',\n overlayX: crossEnd,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n ];\n }\n}\n","<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAwDa,gBAAgB,CAAA;AACV,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EAAC;AACpC,IAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;AACjC,IAAA,QAAQ,GAAG,SAAS,CAAuB,OAAO,+EAAC;AACrD,IAAA,SAAS,GAAG,SAAS,CAAC,YAAY,gFAAC;IAC5C,GAAG,GAAsB,IAAI;IAC7B,cAAc,GAAuB,IAAI;IACzC,UAAU,GAAyC,IAAI;AAC/D;AACwE;AACvD,IAAA,WAAW,GAAG;QAC7B,uBAAuB;QACvB,2BAA2B;QAC3B,qBAAqB;QACrB,qBAAqB;QACrB,sBAAsB;QACtB,wBAAwB;QACxB,wBAAwB;QACxB,yBAAyB;;QAEzB,qBAAqB;QACrB,qBAAqB;KACtB;;AAGQ,IAAA,KAAK,GAAG,KAAK,CAAe,OAAO,4EAAC;;AAEpC,IAAA,SAAS,GAAG,KAAK,CAAmB,QAAQ,gFAAC;;IAE7C,KAAK,GAAG,KAAK,CAAC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE9D;;;AAGgF;AACvE,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;;AAEtC,IAAA,UAAU,GAAG,KAAK,CAAgB,IAAI,iFAAC;;AAGvC,IAAA,MAAM,GAAG,MAAM,CAAC,KAAK,6EAAC;;AAEtB,IAAA,iBAAiB,GAAG,MAAM,CAAmB,QAAQ,wFAAC;AAE/D,IAAA,MAAM,CAAC,OAAoB,EAAA;AACzB,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,a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AAA;AACE,oBAAA,OAAO,EAAE,UAAU;AACnB,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,QAAQ,EAAE,QAAQ;oBAClB,OAAO,EAAE,CAAC,QAAQ;AACnB,iBAAA;AACD,gBAAA;AACE,oBAAA,OAAO,EAAE,QAAQ;AACjB,oBAAA,OAAO,EAAE,QAAQ;AACjB,oBAAA,QAAQ,EAAE,QAAQ;AAClB,oBAAA,QAAQ,EAAE,KAAK;AACf,oBAAA,OAAO,EAAE,QAAQ;AAClB,iBAAA;aACF;;AAEP;;AEvSA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-popover.mjs","sources":["../../../src/lib/components/popover/popover.component.ts","../../../src/lib/components/popover/popover.component.html","../../../src/lib/components/popover/popover-trigger.directive.ts","../../../src/lib/components/popover/ids-group-ltd-ids-design-system-components-popover.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChild,\n forwardRef,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n clearOnDetach,\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n focusIsInside,\n forwardOverlayTokens,\n overlayPlacementOf,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { DsOverlayCloseRef } from '@ids-group-ltd/ids-design-system/overlay';\nimport { DsStaticPreview } from '@ids-group-ltd/ids-design-system/components';\nimport { MenuComponent } from '@ids-group-ltd/ids-design-system/components/menu';\n\nlet nextPanelId = 0;\n\nexport type PopoverAlign = 'start' | 'end';\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n@Component({\n selector: 'ds-popover',\n standalone: true,\n imports: [CdkTrapFocus, NgTemplateOutlet],\n templateUrl: './popover.component.html',\n styleUrl: './popover.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n hostDirectives: [{ directive: DsStaticPreview, inputs: ['staticPreview'] }],\n providers: [\n {\n provide: DsOverlayCloseRef,\n useExisting: forwardRef(() => PopoverComponent),\n },\n ],\n})\nexport class PopoverComponent implements OnDestroy, DsOverlayCloseRef {\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n protected readonly preview = inject(DsStaticPreview);\n protected readonly panelTpl = viewChild<TemplateRef<unknown>>('panel');\n private readonly panelTrap = viewChild(CdkTrapFocus);\n private ref: OverlayRef | null = null;\n private triggerElement: HTMLElement | null = null;\n private focusTimer: ReturnType<typeof setTimeout> | null = null;\n /** Public panel tokens forwarded onto the portaled overlay pane on open, so a\n * consumer's `ds-popover { --ds-popover-panel-*: ... }` reaches it. */\n private readonly panelTokens = [\n '--ds-popover-bg-color',\n '--ds-popover-border-color',\n '--ds-popover-radius',\n '--ds-popover-shadow',\n '--ds-popover-padding',\n '--ds-popover-max-width',\n '--ds-popover-min-width',\n '--ds-popover-arrow-size',\n // A projected ds-menu is portaled into the pane, out of reach of a scoped width.\n '--ds-menu-min-width',\n '--ds-menu-max-width',\n ];\n\n /** Cross-axis alignment of the panel against the trigger. */\n readonly align = input<PopoverAlign>('start');\n /** Which side of the trigger the panel prefers to appear on. */\n readonly placement = input<PopoverPlacement>('bottom');\n /** Render a small caret pointing at the trigger. */\n readonly arrow = input(false, { transform: booleanAttribute });\n\n /** ARIA role for the panel (e.g. 'dialog'). When set, the panel traps focus and captures it\n * on open; Escape or an in-panel close returns focus to the trigger, an outside click or\n * scroll does not (non-modal). Leave null for plain text popovers. A panel holding a\n * `role=\"menu\"` (a `ds-menu`) captures focus on open without it, untrapped. */\n readonly panelRole = input<string | null>(null);\n /** Accessible name for the panel; pair with `panelRole`. */\n readonly panelLabel = input<string | null>(null);\n\n /** Open/closed state, for callers binding `aria-expanded` on the trigger. */\n readonly opened = signal(false);\n /** Id of the open panel, for `aria-controls` on the trigger. */\n readonly panelId = `ds-popover-${++nextPanelId}`;\n private readonly menu = contentChild(MenuComponent, { descendants: true });\n /** Whether the projected content holds a `ds-menu`, which makes the trigger `aria-haspopup=\"menu\"`. */\n readonly holdsMenu = computed(() => this.menu() !== undefined);\n /** Resolved placement after the overlay positions; drives the arrow direction. */\n readonly resolvedPlacement = signal<PopoverPlacement>('bottom');\n\n toggle(trigger: HTMLElement): void {\n if (this.preview.staticPreview()) {\n return;\n }\n // Clicking another trigger while open dismisses the overlay through the CDK's outside-pointer\n // listener FIRST, so `ref` is already gone here and this re-opens on the new trigger.\n if (this.ref) {\n this.close();\n\n return;\n }\n\n this.triggerElement = trigger;\n const placement = this.placement();\n const arrowOffset = this.arrow() ? 8 : 4;\n\n const positionStrategy: FlexibleConnectedPositionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(trigger)\n .withPositions(buildPositions(placement, this.align(), arrowOffset))\n .withViewportMargin(8);\n\n positionStrategy.positionChanges.subscribe((change) => {\n this.resolvedPlacement.set(\n overlayPlacementOf(\n change.connectionPair.overlayY,\n change.connectionPair.overlayX,\n ),\n );\n });\n\n const cfg: OverlayConfig = {\n positionStrategy,\n hasBackdrop: false,\n panelClass: 'ds-overlay-pane',\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n };\n this.ref = this.overlay.create(cfg);\n prepareOverlayEnter(this.ref, this.host.nativeElement, positionStrategy);\n forwardOverlayTokens(this.ref, this.host.nativeElement, this.panelTokens);\n closeOnOutsidePointer(\n this.ref,\n (target) => trigger.contains(target),\n () => this.close('dismiss'),\n );\n // CDK's scroll strategies miss a plain overflow container, so close on any outside scroll ourselves.\n const removeScrollClose = closeOnScroll(this.ref, () =>\n this.close('dismiss'),\n );\n clearOnDetach(this.ref, {\n current: () => this.ref,\n always: removeScrollClose,\n clear: () => {\n this.ref = null;\n this.opened.set(false);\n },\n });\n this.ref.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close('dismiss');\n }\n });\n this.ref.attach(new TemplatePortal(this.panelTpl()!, this.vcr));\n this.resolvedPlacement.set(placement);\n this.opened.set(true);\n // A menu is operated from inside (APG menu button), so it takes focus without a panelRole.\n if (\n this.panelRole() ||\n this.ref.overlayElement.querySelector('[role=\"menu\"]')\n ) {\n // cdkTrapFocusAutoCapture without its destroy-time restore, which steals focus on an outside/scroll close.\n this.focusTimer = setTimeout(() => {\n this.focusTimer = null;\n void this.panelTrap()?.focusTrap?.focusInitialElementWhenReady();\n });\n }\n }\n\n close(cause: DsOverlayCloseCause = 'select'): void {\n if (!this.ref) {\n return;\n }\n clearTimeout(this.focusTimer ?? undefined);\n this.focusTimer = null;\n const focusWasInPanel = focusIsInside(this.ref);\n disposeWithLeave(this.ref, cause);\n this.ref = null;\n this.opened.set(false);\n if (focusWasInPanel) {\n this.triggerElement?.focus({ preventScroll: true });\n }\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.focusTimer ?? undefined);\n this.ref?.dispose();\n this.ref = null;\n }\n}\n\nfunction buildPositions(\n placement: PopoverPlacement,\n align: PopoverAlign,\n offsetPx: number,\n): ConnectedPosition[] {\n const crossStart = align === 'start' ? 'start' : 'end';\n const crossEnd: 'start' | 'end' = align === 'start' ? 'end' : 'start';\n\n switch (placement) {\n case 'top':\n return [\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'top',\n overlayX: crossEnd,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n ];\n case 'left':\n return [\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n ];\n case 'right':\n return [\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offsetPx,\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offsetPx,\n },\n ];\n default: // bottom\n return [\n {\n originX: crossStart,\n originY: 'bottom',\n overlayX: crossStart,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n {\n originX: crossStart,\n originY: 'top',\n overlayX: crossStart,\n overlayY: 'bottom',\n offsetY: -offsetPx,\n },\n {\n originX: crossEnd,\n originY: 'bottom',\n overlayX: crossEnd,\n overlayY: 'top',\n offsetY: offsetPx,\n },\n ];\n }\n}\n","<!-- Projected content is captured once and stamped into the active render site; duplicating ng-content across branches breaks projection. -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n\n@if (preview.staticPreview()) {\n <div\n class=\"popover\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? placement() : null\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n}\n\n<ng-template #panel>\n <div\n class=\"popover\"\n [attr.id]=\"panelId\"\n [attr.role]=\"panelRole()\"\n [attr.aria-label]=\"panelLabel()\"\n [class.has-arrow]=\"arrow()\"\n [attr.data-placement]=\"arrow() ? resolvedPlacement() : null\"\n [cdkTrapFocus]=\"!!panelRole()\">\n @if (arrow()) {\n <span class=\"arrow\"></span>\n }\n\n <ng-container [ngTemplateOutlet]=\"content\" />\n </div>\n</ng-template>\n","import {\n Directive,\n ElementRef,\n afterRenderEffect,\n inject,\n input,\n} from '@angular/core';\nimport { PopoverComponent } from './popover.component';\n\n/**\n * Opens a `ds-popover` from the element it sits on and keeps the trigger's ARIA in step:\n * `aria-haspopup` (`menu` when the popover holds a `ds-menu`, `dialog` otherwise), `aria-expanded`\n * and, while open, `aria-controls`. On `ds-button` and `ds-icon-button` these land on the inner\n * `<button>`, the element a screen reader focuses; the overlay anchors to it too.\n *\n * Writes the attributes itself, so leave `ariaHasPopup`, `ariaExpanded` and `ariaControls` unbound\n * on the same button: a bound value would overwrite them on its next change.\n */\n@Directive({\n selector: '[dsPopoverTrigger]',\n standalone: true,\n host: { '(click)': 'toggle()' },\n})\nexport class DsPopoverTrigger {\n readonly popover = input.required<PopoverComponent>({\n alias: 'dsPopoverTrigger',\n });\n\n private readonly host: ElementRef<HTMLElement> = inject(ElementRef);\n\n constructor() {\n afterRenderEffect(() => {\n const popover = this.popover();\n const control = this.control();\n const opened = popover.opened();\n control.setAttribute(\n 'aria-haspopup',\n popover.holdsMenu() ? 'menu' : 'dialog',\n );\n control.setAttribute('aria-expanded', String(opened));\n if (opened) {\n control.setAttribute('aria-controls', popover.panelId);\n } else {\n control.removeAttribute('aria-controls');\n }\n });\n }\n\n protected toggle(): void {\n this.popover().toggle(this.control());\n }\n\n private control(): HTMLElement {\n const host = this.host.nativeElement;\n if (host.matches('button, a[href], [role=\"button\"]')) {\n return host;\n }\n\n return (\n host.querySelector<HTMLElement>('button, a[href], [role=\"button\"]') ??\n host\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAyCA,IAAI,WAAW,GAAG,CAAC;MAoBN,gBAAgB,CAAA;AACV,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EAAC;AACpC,IAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;AACjC,IAAA,QAAQ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IAAI,CAAC,IAAI,CAAC,aAAa;AACpC,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,kCAAkC,CAAC,EAAE;AACpD,YAAA,OAAO,IAAI;QACb;AAEA,QAAA,QACE,IAAI,CAAC,aAAa,CAAc,kCAAkC,CAAC;AACnE,YAAA,IAAI;IAER;wGAvCW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,UAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;AAChC,iBAAA;;;ACtBD;;AAEG;;;;"}
|
|
@@ -42,6 +42,7 @@ class RadioComponent extends DsFieldBase {
|
|
|
42
42
|
error: this.error,
|
|
43
43
|
errors: this.errors,
|
|
44
44
|
invalid: this.invalid,
|
|
45
|
+
touched: this.touched,
|
|
45
46
|
});
|
|
46
47
|
message = this.fieldMessage.message;
|
|
47
48
|
resolvedAriaLabel = computed(() => this.label() ? null : this.ariaLabel() || null, ...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -115,6 +116,8 @@ class RadioGroupComponent extends DsControlValueAccessor {
|
|
|
115
116
|
error: this.error,
|
|
116
117
|
errors: this.errors,
|
|
117
118
|
invalid: this.invalid,
|
|
119
|
+
touchedSelf: this.touchedSelf,
|
|
120
|
+
touched: this.touched,
|
|
118
121
|
});
|
|
119
122
|
message = this.fieldMessage.message;
|
|
120
123
|
pendingShown = this.fieldMessage.pending;
|