@ids-group-ltd/ids-design-system 0.14.6 → 0.14.7
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 +98 -0
- package/components.md +5 -4
- package/docs/agent/forms/ds-button.md +2 -2
- package/docs/agent/overlays/ds-drawer.md +1 -1
- package/docs/agent/overlays/ds-modal-card.md +1 -1
- package/docs/agent/overlays/ds-modal.md +1 -1
- package/docs/agent/platform/toast-service.md +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +16 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +16 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +4 -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-tooltip.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +68 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +15 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +63 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +96 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +14 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +18 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +126 -9
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +17 -6
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +5 -2
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.14.7.json +140 -0
- package/migrations/0.4.0.json +3 -1
- package/package.json +1 -1
- package/schematics/check-overrides/surface.json +9 -10
- package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +4 -2
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +4 -3
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +19 -4
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +2 -1
- package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +21 -4
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +22 -3
- package/types/ids-group-ltd-ids-design-system-components.d.ts +7 -2
- package/types/ids-group-ltd-ids-design-system-core.d.ts +33 -3
- package/types/ids-group-ltd-ids-design-system-icons.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-theme.d.ts +4 -2
- package/types/ids-group-ltd-ids-design-system.d.ts +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, booleanAttribute, viewChild, ViewEncapsulation, Component, inject, model, output, ElementRef, computed, signal, contentChildren, Injector, afterRenderEffect,
|
|
3
|
+
import { input, booleanAttribute, viewChild, ViewEncapsulation, Component, inject, model, output, ElementRef, computed, signal, contentChildren, Injector, afterRenderEffect, effect } from '@angular/core';
|
|
4
4
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
5
5
|
import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
|
|
6
|
-
import { DS_INTL } from '@ids-group-ltd/ids-design-system/core';
|
|
6
|
+
import { DS_INTL, reportDevWarning } from '@ids-group-ltd/ids-design-system/core';
|
|
7
7
|
|
|
8
8
|
class TabComponent {
|
|
9
9
|
/** Text shown in the tab button. */
|
|
@@ -108,7 +108,7 @@ class TabsComponent {
|
|
|
108
108
|
onCleanup(() => observer.disconnect());
|
|
109
109
|
});
|
|
110
110
|
// Two strips sharing a parameter silently erase each other's tab.
|
|
111
|
-
if (
|
|
111
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
112
112
|
effect((onCleanup) => {
|
|
113
113
|
const param = this.urlParam();
|
|
114
114
|
if (!param) {
|
|
@@ -116,7 +116,7 @@ class TabsComponent {
|
|
|
116
116
|
}
|
|
117
117
|
const held = claimedUrlParams.get(param) ?? 0;
|
|
118
118
|
if (held > 0) {
|
|
119
|
-
|
|
119
|
+
reportDevWarning(`[ds-tabs] urlParam="${param}" is already used by another ds-tabs on this screen. Both strips write the same query parameter, so each one erases the other's tab and a reload restores whichever wrote last. Give each strip its own name.`);
|
|
120
120
|
}
|
|
121
121
|
claimedUrlParams.set(param, held + 1);
|
|
122
122
|
// onCleanup alone: it runs on every re-run AND on destroy; a DestroyRef release would double-count.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-tabs.mjs","sources":["../../../src/lib/components/tabs/tab.component.ts","../../../src/lib/components/tabs/tabs.component.ts","../../../src/lib/components/tabs/tabs.component.html","../../../src/lib/components/tabs/ids-group-ltd-ids-design-system-components-tabs.ts"],"sourcesContent":["import {\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n input,\n viewChild,\n} from '@angular/core';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-tab',\n standalone: true,\n template: `<ng-template #content>\n <ng-content></ng-content>\n </ng-template>`,\n styles: [':host { display: none; }'],\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class TabComponent {\n /** Text shown in the tab button. */\n readonly label = input.required<string>();\n /** Icon shown before the label. */\n readonly icon = input<IconName | null>(null);\n /** Numeric badge shown after the label. */\n readonly count = input<number | null>(null);\n /** Excludes the tab from selection and keyboard navigation. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Identifier emitted by tabClosed. Falls back to label when omitted. */\n readonly value = input<string | null>(null);\n readonly content = viewChild.required<TemplateRef<unknown>>('content');\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ElementRef,\n afterRenderEffect,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChildren,\n effect,\n inject,\n Injector,\n input,\n isDevMode,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ActivatedRoute, Router, type ParamMap } from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { TabComponent } from './tab.component';\nimport type { TabsOrientation, TabsVariant } from './tabs.types';\n\nlet nextId = 0;\n\n// Dev-only: query parameters claimed by a strip.\nconst claimedUrlParams = new Map<string, number>();\n\n/** Label to URL name. Diacritics are dropped; a label with nothing sluggable in it\n * (CJK, bare punctuation) keeps its raw text. */\nfunction slugify(label: string): string {\n const slug = label\n .normalize('NFKD')\n .replace(/\\p{M}/gu, '')\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '');\n\n return slug || label;\n}\n\n@Component({\n selector: 'ds-tabs',\n standalone: true,\n imports: [NgTemplateOutlet, IconComponent],\n templateUrl: './tabs.component.html',\n styleUrl: './tabs.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.vertical-host]': \"orientation() === 'vertical'\",\n '[class.scrolling-host]': 'scrollsHorizontally()',\n },\n})\nexport class TabsComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Index of the active tab, two-way bound. */\n readonly selectedIndex = model<number>(0);\n /** Visual style of the tab strip. */\n readonly variant = input<TabsVariant>('line');\n\n /** When true, a tab's content is instantiated on first activation and kept alive. Default renders only the active panel. */\n readonly lazy = input(false, { transform: booleanAttribute });\n\n /** When true, a horizontal strip scrolls inside its own box with previous/next arrows\n while tabs lie beyond its edges, and the active tab is scrolled into view.\n When false, an overlong strip overflows its container. */\n readonly scrollable = input(false, { transform: booleanAttribute });\n\n /** When true, each tab shows a close button; clicking it emits `tabClosed` and does not switch to that tab. */\n readonly closable = input(false, { transform: booleanAttribute });\n\n /** Tab list above the panel (`horizontal`, default) or beside it (`vertical`). */\n readonly orientation = input<TabsOrientation>('horizontal');\n\n /**\n * Keep the active tab in a query parameter so it survives reload and sharing:\n * `urlParam=\"tab\"` gives `?tab=activity`. Empty (default) leaves the URL alone.\n *\n * Names come from each `ds-tab`'s `value` (falling back to its `label`), not\n * indices, so inserting a tab does not repoint old links. The FIRST tab writes\n * no parameter and every write REPLACES the history entry. An unknown name\n * lands on the first tab.\n *\n * Outside a routed context the input is inert.\n */\n readonly urlParam = input<string>('');\n\n /** Reopen the tab this screen was last left on, per path, from `sessionStorage`.\n * Off by default; needs `urlParam` for the names. A link always wins: memory only\n * fills the gap the first tab leaves in the URL. */\n readonly rememberLastTab = input(false, { transform: booleanAttribute });\n\n /** Emitted when a close button is clicked, with the tab's value (or label). The host removes the tab. */\n readonly tabClosed = output<string>();\n\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly uid = `ds-tabs-${++nextId}`;\n private readonly tablist =\n viewChild.required<ElementRef<HTMLElement>>('tablist');\n\n protected readonly scrollsHorizontally = computed(\n () => this.scrollable() && this.orientation() === 'horizontal',\n );\n private readonly overflowing = signal(false);\n protected readonly showScrollArrows = computed(\n () => this.scrollsHorizontally() && this.overflowing(),\n );\n protected readonly canScrollPrevious = signal(false);\n protected readonly canScrollNext = signal(false);\n\n protected readonly tabs = contentChildren(TabComponent);\n\n // On-demand Router lookup: most strips sit outside a routed context (dialogs, static pages).\n private readonly injector = inject(Injector);\n private router: Router | null = null;\n private route: ActivatedRoute | null = null;\n private readonly urlParams = signal<ParamMap | null>(null);\n\n constructor() {\n afterRenderEffect((onCleanup) => {\n this.tabs();\n if (!this.scrollsHorizontally()) {\n this.overflowing.set(false);\n\n return;\n }\n const strip = this.tablist().nativeElement;\n const observer = new ResizeObserver(() => this.updateScrollArrows());\n observer.observe(strip);\n observer.observe(strip.parentElement!);\n for (const tab of Array.from(strip.children)) {\n observer.observe(tab);\n }\n onCleanup(() => observer.disconnect());\n });\n\n // Two strips sharing a parameter silently erase each other's tab.\n if (isDevMode()) {\n effect((onCleanup) => {\n const param = this.urlParam();\n if (!param) {\n return;\n }\n const held = claimedUrlParams.get(param) ?? 0;\n if (held > 0) {\n console.warn(\n `[ds-tabs] urlParam=\"${param}\" is already used by another ds-tabs on this screen. Both strips write the same query parameter, so each one erases the other's tab and a reload restores whichever wrote last. Give each strip its own name.`,\n );\n }\n claimedUrlParams.set(param, held + 1);\n // onCleanup alone: it runs on every re-run AND on destroy; a DestroyRef release would double-count.\n onCleanup(() => {\n const now = (claimedUrlParams.get(param) ?? 1) - 1;\n if (now > 0) {\n claimedUrlParams.set(param, now);\n } else {\n claimedUrlParams.delete(param);\n }\n });\n });\n }\n\n effect((onCleanup) => {\n if (!this.urlParam() || !this.resolveRouting()) {\n this.urlParams.set(null);\n\n return;\n }\n const subscription = this.route!.queryParamMap.subscribe((map) =>\n this.urlParams.set(map),\n );\n onCleanup(() => subscription.unsubscribe());\n });\n\n // URL -> tab. Re-runs when the tabs arrive and on Back/Forward; the equality check stops a loop with `writeUrl`.\n effect(() => {\n const param = this.urlParam();\n const params = this.urlParams();\n const tabs = this.tabs();\n if (!param || !params || tabs.length === 0) {\n return;\n }\n const target = params.get(param) ?? this.rememberedName();\n const found = target\n ? tabs.findIndex((tab) => this.tabName(tab) === target)\n : 0;\n const index = found < 0 ? 0 : found;\n if (index !== this.selectedIndex()) {\n this.selectedIndex.set(index);\n }\n });\n }\n\n /** Resolves the router pair on first use; false outside a routed context, which makes `urlParam` inert. */\n private resolveRouting(): boolean {\n this.router ??= this.injector.get(Router, null);\n this.route ??= this.injector.get(ActivatedRoute, null);\n\n return !!this.router && !!this.route;\n }\n\n /** The tab's name in the URL, deliberately NOT what `tabClosed` emits. A slug derives from\n * display copy, so renaming a tab breaks saved links unless `value` is set. */\n private tabName(tab: TabComponent): string {\n return tab.value() ?? slugify(tab.label());\n }\n\n /** Storage key for `rememberLastTab`: the path plus the parameter name, which keeps two strips on one path apart. */\n private memoryKey(): string | null {\n const param = this.urlParam();\n if (!this.rememberLastTab() || !param || !this.resolveRouting()) {\n return null;\n }\n\n return `ds-tabs:${this.router!.url.split('?')[0]}:${param}`;\n }\n\n /** Guarded: Safari private mode throws on write, and a quota error must not take the strip down. */\n private rememberedName(): string | null {\n const key = this.memoryKey();\n if (!key) {\n return null;\n }\n try {\n return sessionStorage.getItem(key);\n } catch {\n return null;\n }\n }\n\n private remember(index: number): void {\n const key = this.memoryKey();\n const tab = this.tabs()[index];\n if (!key || !tab) {\n return;\n }\n try {\n // Stored for the first tab too (it writes no parameter), or going back to tab one would be forgotten.\n sessionStorage.setItem(key, this.tabName(tab));\n } catch {\n // Storage unavailable: the strip stops remembering.\n }\n }\n\n private writeUrl(index: number): void {\n this.remember(index);\n const param = this.urlParam();\n if (!param || !this.resolveRouting()) {\n return;\n }\n const tab = this.tabs()[index];\n void this.router!.navigate([], {\n relativeTo: this.route,\n queryParams: { [param]: index === 0 || !tab ? null : this.tabName(tab) },\n queryParamsHandling: 'merge',\n replaceUrl: true,\n });\n }\n\n private readonly activatedIndices = signal<ReadonlySet<number>>(new Set([0]));\n\n protected tabId(index: number): string {\n return `${this.uid}-tab-${index}`;\n }\n\n protected panelId(index: number): string {\n return `${this.uid}-panel-${index}`;\n }\n\n protected readonly tablistClasses = computed(() => {\n const parts = ['tabs'];\n if (this.variant() === 'pills') {\n parts.push('pills');\n }\n if (this.scrollable()) {\n parts.push('scrollable');\n }\n if (this.orientation() === 'vertical') {\n parts.push('vertical');\n }\n\n return parts.join(' ');\n });\n\n protected isPanelVisible(index: number): boolean {\n if (!this.lazy()) {\n return index === this.selectedIndex();\n }\n\n return this.activatedIndices().has(index);\n }\n\n protected tabClasses(index: number, disabled: boolean): string {\n const parts = ['tab'];\n if (index === this.selectedIndex()) {\n parts.push('active');\n }\n if (disabled) {\n parts.push('disabled');\n }\n\n return parts.join(' ');\n }\n\n protected select(index: number, disabled: boolean): void {\n if (disabled) {\n return;\n }\n this.selectedIndex.set(index);\n this.writeUrl(index);\n if (this.lazy()) {\n this.activatedIndices.update((previous) => {\n if (previous.has(index)) {\n return previous;\n }\n\n return new Set([...previous, index]);\n });\n }\n if (this.scrollable()) {\n setTimeout(() => {\n const button = this.host.nativeElement.querySelector(\n `#${this.tabId(index)}`,\n ) as HTMLElement | null;\n button?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n });\n }\n }\n\n protected updateScrollArrows(): void {\n const strip = this.tablist().nativeElement;\n const scrolled = Math.abs(strip.scrollLeft);\n const hidden = strip.scrollWidth - strip.clientWidth;\n // Against the row, not the strip: the arrows narrow the strip, and a strip\n // measured against its own width would keep them for tabs that fit without them.\n this.overflowing.set(\n strip.scrollWidth > strip.parentElement!.clientWidth + 1,\n );\n this.canScrollPrevious.set(scrolled > 1);\n this.canScrollNext.set(scrolled < hidden - 1);\n }\n\n protected scrollPage(towardEnd: boolean): void {\n const strip = this.tablist().nativeElement;\n const mirror = getComputedStyle(strip).direction === 'rtl' ? -1 : 1;\n const inlineStart = (rect: DOMRect): number =>\n mirror === 1 ? rect.left : -rect.right;\n const inlineEnd = (rect: DOMRect): number =>\n mirror === 1 ? rect.right : -rect.left;\n const view = strip.getBoundingClientRect();\n const tabRects = Array.from(strip.children, (tab) =>\n tab.getBoundingClientRect(),\n );\n const step = towardEnd ? 1 : -1;\n let distance = 0;\n if (towardEnd) {\n const next = tabRects.find(\n (rect) => inlineEnd(rect) > inlineEnd(view) + 1,\n );\n distance = next ? inlineStart(next) - inlineStart(view) : 0;\n } else {\n const previous = tabRects\n .reverse()\n .find((rect) => inlineStart(rect) < inlineStart(view) - 1);\n distance = previous ? inlineEnd(previous) - inlineEnd(view) : 0;\n }\n // A tab wider than the strip is already aligned, so move a full width.\n if (distance * step < 1) {\n distance = step * strip.clientWidth;\n }\n strip.scrollBy({ left: mirror * distance });\n }\n\n protected onCloseClick(event: MouseEvent, index: number): void {\n event.stopPropagation();\n this.closeTab(index);\n }\n\n private closeTab(index: number): void {\n const tab = this.tabs()[index];\n if (!tab) {\n return;\n }\n this.tabClosed.emit(tab.value() ?? tab.label());\n }\n\n /** Roving keyboard navigation across the tablist (APG automatic activation).\n Arrow axis follows orientation: Left/Right for horizontal, Up/Down for vertical. */\n protected onKeydown(event: KeyboardEvent, index: number): void {\n const count = this.tabs().length;\n if (!count) {\n return;\n }\n if (this.closable() && event.key === 'Delete') {\n event.preventDefault();\n this.closeTab(index);\n\n return;\n }\n const isVertical = this.orientation() === 'vertical';\n const forwardKey = isVertical ? 'ArrowDown' : 'ArrowRight';\n const backwardKey = isVertical ? 'ArrowUp' : 'ArrowLeft';\n // Both axes stay active (cross-axis keys too), per the APG roving tabindex recommendation.\n const forward =\n event.key === forwardKey ||\n (!isVertical && event.key === 'ArrowDown') ||\n (isVertical && event.key === 'ArrowRight');\n const backward =\n event.key === backwardKey ||\n (!isVertical && event.key === 'ArrowUp') ||\n (isVertical && event.key === 'ArrowLeft');\n\n let next: number;\n if (forward) {\n next = (index + 1) % count;\n } else if (backward) {\n next = (index - 1 + count) % count;\n } else if (event.key === 'Home') {\n next = 0;\n } else if (event.key === 'End') {\n next = count - 1;\n } else {\n return;\n }\n event.preventDefault();\n const step = backward || event.key === 'End' ? -1 : 1;\n let guard = 0;\n while (this.tabs()[next]?.disabled() && guard < count) {\n next = (next + step + count) % count;\n guard++;\n }\n this.select(next, this.tabs()[next]?.disabled() ?? false);\n setTimeout(() => {\n const element = this.host.nativeElement.querySelector(\n `#${this.tabId(next)}`,\n ) as HTMLElement | null;\n element?.focus();\n });\n }\n}\n","@if (showScrollArrows()) {\n <button\n type=\"button\"\n class=\"scroll-arrow\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class.at-edge]=\"!canScrollPrevious()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"scrollPage(false)\">\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"16\">\n </ds-icon>\n </button>\n}\n\n<div\n #tablist\n role=\"tablist\"\n [class]=\"tablistClasses()\"\n [attr.aria-orientation]=\"orientation()\"\n (scroll)=\"updateScrollArrows()\">\n @for (tab of tabs(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n [id]=\"tabId($index)\"\n [class]=\"tabClasses($index, tab.disabled())\"\n [attr.aria-selected]=\"$index === selectedIndex()\"\n [attr.aria-controls]=\"panelId($index)\"\n [attr.tabindex]=\"$index === selectedIndex() ? 0 : -1\"\n [disabled]=\"tab.disabled()\"\n (click)=\"select($index, tab.disabled())\"\n (keydown)=\"onKeydown($event, $index)\">\n @if (tab.icon()) {\n <ds-icon\n [name]=\"tab.icon()!\"\n [size]=\"14\">\n </ds-icon>\n }\n\n <span>\n {{ tab.label() }}\n </span>\n\n @if (tab.count() !== null) {\n <span class=\"badge\">\n {{ tab.count() }}\n </span>\n }\n\n @if (closable()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- mouse affordance; keyboard closes the focused tab via Delete (see onKeydown) -->\n <span\n class=\"tab-close\"\n [attr.aria-label]=\"intl().tabs.close(tab.label())\"\n (click)=\"onCloseClick($event, $index)\">\n <ds-icon\n name=\"x\"\n [size]=\"12\">\n </ds-icon>\n </span>\n }\n </button>\n }\n</div>\n\n@if (showScrollArrows()) {\n <button\n type=\"button\"\n class=\"scroll-arrow\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class.at-edge]=\"!canScrollNext()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"scrollPage(true)\">\n <ds-icon\n name=\"chevronRight\"\n [size]=\"16\">\n </ds-icon>\n </button>\n}\n\n@for (tab of tabs(); track $index) {\n @if (isPanelVisible($index)) {\n <div\n class=\"panel\"\n role=\"tabpanel\"\n tabindex=\"0\"\n [id]=\"panelId($index)\"\n [attr.aria-labelledby]=\"tabId($index)\"\n [hidden]=\"$index !== selectedIndex()\">\n <ng-container *ngTemplateOutlet=\"tab.content()\"></ng-container>\n </div>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAmBa,YAAY,CAAA;;AAEd,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;AAEhC,IAAA,IAAI,GAAG,KAAK,CA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AA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,SAAS,wFAYb,YAAY,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEjHxD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-tabs.mjs","sources":["../../../src/lib/components/tabs/tab.component.ts","../../../src/lib/components/tabs/tabs.component.ts","../../../src/lib/components/tabs/tabs.component.html","../../../src/lib/components/tabs/ids-group-ltd-ids-design-system-components-tabs.ts"],"sourcesContent":["import {\n Component,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n input,\n viewChild,\n} from '@angular/core';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-tab',\n standalone: true,\n template: `<ng-template #content>\n <ng-content></ng-content>\n </ng-template>`,\n styles: [':host { display: none; }'],\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class TabComponent {\n /** Text shown in the tab button. */\n readonly label = input.required<string>();\n /** Icon shown before the label. */\n readonly icon = input<IconName | null>(null);\n /** Numeric badge shown after the label. */\n readonly count = input<number | null>(null);\n /** Excludes the tab from selection and keyboard navigation. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Identifier emitted by tabClosed. Falls back to label when omitted. */\n readonly value = input<string | null>(null);\n readonly content = viewChild.required<TemplateRef<unknown>>('content');\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ElementRef,\n afterRenderEffect,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChildren,\n effect,\n inject,\n Injector,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ActivatedRoute, Router, type ParamMap } from '@angular/router';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { reportDevWarning } from '@ids-group-ltd/ids-design-system/core';\nimport { TabComponent } from './tab.component';\nimport type { TabsOrientation, TabsVariant } from './tabs.types';\n\nlet nextId = 0;\n\n// Dev-only: query parameters claimed by a strip.\nconst claimedUrlParams = new Map<string, number>();\n\n/** Label to URL name. Diacritics are dropped; a label with nothing sluggable in it\n * (CJK, bare punctuation) keeps its raw text. */\nfunction slugify(label: string): string {\n const slug = label\n .normalize('NFKD')\n .replace(/\\p{M}/gu, '')\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '');\n\n return slug || label;\n}\n\n@Component({\n selector: 'ds-tabs',\n standalone: true,\n imports: [NgTemplateOutlet, IconComponent],\n templateUrl: './tabs.component.html',\n styleUrl: './tabs.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.vertical-host]': \"orientation() === 'vertical'\",\n '[class.scrolling-host]': 'scrollsHorizontally()',\n },\n})\nexport class TabsComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Index of the active tab, two-way bound. */\n readonly selectedIndex = model<number>(0);\n /** Visual style of the tab strip. */\n readonly variant = input<TabsVariant>('line');\n\n /** When true, a tab's content is instantiated on first activation and kept alive. Default renders only the active panel. */\n readonly lazy = input(false, { transform: booleanAttribute });\n\n /** When true, a horizontal strip scrolls inside its own box with previous/next arrows\n while tabs lie beyond its edges, and the active tab is scrolled into view.\n When false, an overlong strip overflows its container. */\n readonly scrollable = input(false, { transform: booleanAttribute });\n\n /** When true, each tab shows a close button; clicking it emits `tabClosed` and does not switch to that tab. */\n readonly closable = input(false, { transform: booleanAttribute });\n\n /** Tab list above the panel (`horizontal`, default) or beside it (`vertical`). */\n readonly orientation = input<TabsOrientation>('horizontal');\n\n /**\n * Keep the active tab in a query parameter so it survives reload and sharing:\n * `urlParam=\"tab\"` gives `?tab=activity`. Empty (default) leaves the URL alone.\n *\n * Names come from each `ds-tab`'s `value` (falling back to its `label`), not\n * indices, so inserting a tab does not repoint old links. The FIRST tab writes\n * no parameter and every write REPLACES the history entry. An unknown name\n * lands on the first tab.\n *\n * Outside a routed context the input is inert.\n */\n readonly urlParam = input<string>('');\n\n /** Reopen the tab this screen was last left on, per path, from `sessionStorage`.\n * Off by default; needs `urlParam` for the names. A link always wins: memory only\n * fills the gap the first tab leaves in the URL. */\n readonly rememberLastTab = input(false, { transform: booleanAttribute });\n\n /** Emitted when a close button is clicked, with the tab's value (or label). The host removes the tab. */\n readonly tabClosed = output<string>();\n\n private readonly host = inject(ElementRef<HTMLElement>);\n private readonly uid = `ds-tabs-${++nextId}`;\n private readonly tablist =\n viewChild.required<ElementRef<HTMLElement>>('tablist');\n\n protected readonly scrollsHorizontally = computed(\n () => this.scrollable() && this.orientation() === 'horizontal',\n );\n private readonly overflowing = signal(false);\n protected readonly showScrollArrows = computed(\n () => this.scrollsHorizontally() && this.overflowing(),\n );\n protected readonly canScrollPrevious = signal(false);\n protected readonly canScrollNext = signal(false);\n\n protected readonly tabs = contentChildren(TabComponent);\n\n // On-demand Router lookup: most strips sit outside a routed context (dialogs, static pages).\n private readonly injector = inject(Injector);\n private router: Router | null = null;\n private route: ActivatedRoute | null = null;\n private readonly urlParams = signal<ParamMap | null>(null);\n\n constructor() {\n afterRenderEffect((onCleanup) => {\n this.tabs();\n if (!this.scrollsHorizontally()) {\n this.overflowing.set(false);\n\n return;\n }\n const strip = this.tablist().nativeElement;\n const observer = new ResizeObserver(() => this.updateScrollArrows());\n observer.observe(strip);\n observer.observe(strip.parentElement!);\n for (const tab of Array.from(strip.children)) {\n observer.observe(tab);\n }\n onCleanup(() => observer.disconnect());\n });\n\n // Two strips sharing a parameter silently erase each other's tab.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n effect((onCleanup) => {\n const param = this.urlParam();\n if (!param) {\n return;\n }\n const held = claimedUrlParams.get(param) ?? 0;\n if (held > 0) {\n reportDevWarning(\n `[ds-tabs] urlParam=\"${param}\" is already used by another ds-tabs on this screen. Both strips write the same query parameter, so each one erases the other's tab and a reload restores whichever wrote last. Give each strip its own name.`,\n );\n }\n claimedUrlParams.set(param, held + 1);\n // onCleanup alone: it runs on every re-run AND on destroy; a DestroyRef release would double-count.\n onCleanup(() => {\n const now = (claimedUrlParams.get(param) ?? 1) - 1;\n if (now > 0) {\n claimedUrlParams.set(param, now);\n } else {\n claimedUrlParams.delete(param);\n }\n });\n });\n }\n\n effect((onCleanup) => {\n if (!this.urlParam() || !this.resolveRouting()) {\n this.urlParams.set(null);\n\n return;\n }\n const subscription = this.route!.queryParamMap.subscribe((map) =>\n this.urlParams.set(map),\n );\n onCleanup(() => subscription.unsubscribe());\n });\n\n // URL -> tab. Re-runs when the tabs arrive and on Back/Forward; the equality check stops a loop with `writeUrl`.\n effect(() => {\n const param = this.urlParam();\n const params = this.urlParams();\n const tabs = this.tabs();\n if (!param || !params || tabs.length === 0) {\n return;\n }\n const target = params.get(param) ?? this.rememberedName();\n const found = target\n ? tabs.findIndex((tab) => this.tabName(tab) === target)\n : 0;\n const index = found < 0 ? 0 : found;\n if (index !== this.selectedIndex()) {\n this.selectedIndex.set(index);\n }\n });\n }\n\n /** Resolves the router pair on first use; false outside a routed context, which makes `urlParam` inert. */\n private resolveRouting(): boolean {\n this.router ??= this.injector.get(Router, null);\n this.route ??= this.injector.get(ActivatedRoute, null);\n\n return !!this.router && !!this.route;\n }\n\n /** The tab's name in the URL, deliberately NOT what `tabClosed` emits. A slug derives from\n * display copy, so renaming a tab breaks saved links unless `value` is set. */\n private tabName(tab: TabComponent): string {\n return tab.value() ?? slugify(tab.label());\n }\n\n /** Storage key for `rememberLastTab`: the path plus the parameter name, which keeps two strips on one path apart. */\n private memoryKey(): string | null {\n const param = this.urlParam();\n if (!this.rememberLastTab() || !param || !this.resolveRouting()) {\n return null;\n }\n\n return `ds-tabs:${this.router!.url.split('?')[0]}:${param}`;\n }\n\n /** Guarded: Safari private mode throws on write, and a quota error must not take the strip down. */\n private rememberedName(): string | null {\n const key = this.memoryKey();\n if (!key) {\n return null;\n }\n try {\n return sessionStorage.getItem(key);\n } catch {\n return null;\n }\n }\n\n private remember(index: number): void {\n const key = this.memoryKey();\n const tab = this.tabs()[index];\n if (!key || !tab) {\n return;\n }\n try {\n // Stored for the first tab too (it writes no parameter), or going back to tab one would be forgotten.\n sessionStorage.setItem(key, this.tabName(tab));\n } catch {\n // Storage unavailable: the strip stops remembering.\n }\n }\n\n private writeUrl(index: number): void {\n this.remember(index);\n const param = this.urlParam();\n if (!param || !this.resolveRouting()) {\n return;\n }\n const tab = this.tabs()[index];\n void this.router!.navigate([], {\n relativeTo: this.route,\n queryParams: { [param]: index === 0 || !tab ? null : this.tabName(tab) },\n queryParamsHandling: 'merge',\n replaceUrl: true,\n });\n }\n\n private readonly activatedIndices = signal<ReadonlySet<number>>(new Set([0]));\n\n protected tabId(index: number): string {\n return `${this.uid}-tab-${index}`;\n }\n\n protected panelId(index: number): string {\n return `${this.uid}-panel-${index}`;\n }\n\n protected readonly tablistClasses = computed(() => {\n const parts = ['tabs'];\n if (this.variant() === 'pills') {\n parts.push('pills');\n }\n if (this.scrollable()) {\n parts.push('scrollable');\n }\n if (this.orientation() === 'vertical') {\n parts.push('vertical');\n }\n\n return parts.join(' ');\n });\n\n protected isPanelVisible(index: number): boolean {\n if (!this.lazy()) {\n return index === this.selectedIndex();\n }\n\n return this.activatedIndices().has(index);\n }\n\n protected tabClasses(index: number, disabled: boolean): string {\n const parts = ['tab'];\n if (index === this.selectedIndex()) {\n parts.push('active');\n }\n if (disabled) {\n parts.push('disabled');\n }\n\n return parts.join(' ');\n }\n\n protected select(index: number, disabled: boolean): void {\n if (disabled) {\n return;\n }\n this.selectedIndex.set(index);\n this.writeUrl(index);\n if (this.lazy()) {\n this.activatedIndices.update((previous) => {\n if (previous.has(index)) {\n return previous;\n }\n\n return new Set([...previous, index]);\n });\n }\n if (this.scrollable()) {\n setTimeout(() => {\n const button = this.host.nativeElement.querySelector(\n `#${this.tabId(index)}`,\n ) as HTMLElement | null;\n button?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n });\n }\n }\n\n protected updateScrollArrows(): void {\n const strip = this.tablist().nativeElement;\n const scrolled = Math.abs(strip.scrollLeft);\n const hidden = strip.scrollWidth - strip.clientWidth;\n // Against the row, not the strip: the arrows narrow the strip, and a strip\n // measured against its own width would keep them for tabs that fit without them.\n this.overflowing.set(\n strip.scrollWidth > strip.parentElement!.clientWidth + 1,\n );\n this.canScrollPrevious.set(scrolled > 1);\n this.canScrollNext.set(scrolled < hidden - 1);\n }\n\n protected scrollPage(towardEnd: boolean): void {\n const strip = this.tablist().nativeElement;\n const mirror = getComputedStyle(strip).direction === 'rtl' ? -1 : 1;\n const inlineStart = (rect: DOMRect): number =>\n mirror === 1 ? rect.left : -rect.right;\n const inlineEnd = (rect: DOMRect): number =>\n mirror === 1 ? rect.right : -rect.left;\n const view = strip.getBoundingClientRect();\n const tabRects = Array.from(strip.children, (tab) =>\n tab.getBoundingClientRect(),\n );\n const step = towardEnd ? 1 : -1;\n let distance = 0;\n if (towardEnd) {\n const next = tabRects.find(\n (rect) => inlineEnd(rect) > inlineEnd(view) + 1,\n );\n distance = next ? inlineStart(next) - inlineStart(view) : 0;\n } else {\n const previous = tabRects\n .reverse()\n .find((rect) => inlineStart(rect) < inlineStart(view) - 1);\n distance = previous ? inlineEnd(previous) - inlineEnd(view) : 0;\n }\n // A tab wider than the strip is already aligned, so move a full width.\n if (distance * step < 1) {\n distance = step * strip.clientWidth;\n }\n strip.scrollBy({ left: mirror * distance });\n }\n\n protected onCloseClick(event: MouseEvent, index: number): void {\n event.stopPropagation();\n this.closeTab(index);\n }\n\n private closeTab(index: number): void {\n const tab = this.tabs()[index];\n if (!tab) {\n return;\n }\n this.tabClosed.emit(tab.value() ?? tab.label());\n }\n\n /** Roving keyboard navigation across the tablist (APG automatic activation).\n Arrow axis follows orientation: Left/Right for horizontal, Up/Down for vertical. */\n protected onKeydown(event: KeyboardEvent, index: number): void {\n const count = this.tabs().length;\n if (!count) {\n return;\n }\n if (this.closable() && event.key === 'Delete') {\n event.preventDefault();\n this.closeTab(index);\n\n return;\n }\n const isVertical = this.orientation() === 'vertical';\n const forwardKey = isVertical ? 'ArrowDown' : 'ArrowRight';\n const backwardKey = isVertical ? 'ArrowUp' : 'ArrowLeft';\n // Both axes stay active (cross-axis keys too), per the APG roving tabindex recommendation.\n const forward =\n event.key === forwardKey ||\n (!isVertical && event.key === 'ArrowDown') ||\n (isVertical && event.key === 'ArrowRight');\n const backward =\n event.key === backwardKey ||\n (!isVertical && event.key === 'ArrowUp') ||\n (isVertical && event.key === 'ArrowLeft');\n\n let next: number;\n if (forward) {\n next = (index + 1) % count;\n } else if (backward) {\n next = (index - 1 + count) % count;\n } else if (event.key === 'Home') {\n next = 0;\n } else if (event.key === 'End') {\n next = count - 1;\n } else {\n return;\n }\n event.preventDefault();\n const step = backward || event.key === 'End' ? -1 : 1;\n let guard = 0;\n while (this.tabs()[next]?.disabled() && guard < count) {\n next = (next + step + count) % count;\n guard++;\n }\n this.select(next, this.tabs()[next]?.disabled() ?? false);\n setTimeout(() => {\n const element = this.host.nativeElement.querySelector(\n `#${this.tabId(next)}`,\n ) as HTMLElement | null;\n element?.focus();\n });\n }\n}\n","@if (showScrollArrows()) {\n <button\n type=\"button\"\n class=\"scroll-arrow\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class.at-edge]=\"!canScrollPrevious()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"scrollPage(false)\">\n <ds-icon\n name=\"chevronLeft\"\n [size]=\"16\">\n </ds-icon>\n </button>\n}\n\n<div\n #tablist\n role=\"tablist\"\n [class]=\"tablistClasses()\"\n [attr.aria-orientation]=\"orientation()\"\n (scroll)=\"updateScrollArrows()\">\n @for (tab of tabs(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n [id]=\"tabId($index)\"\n [class]=\"tabClasses($index, tab.disabled())\"\n [attr.aria-selected]=\"$index === selectedIndex()\"\n [attr.aria-controls]=\"panelId($index)\"\n [attr.tabindex]=\"$index === selectedIndex() ? 0 : -1\"\n [disabled]=\"tab.disabled()\"\n (click)=\"select($index, tab.disabled())\"\n (keydown)=\"onKeydown($event, $index)\">\n @if (tab.icon()) {\n <ds-icon\n [name]=\"tab.icon()!\"\n [size]=\"14\">\n </ds-icon>\n }\n\n <span>\n {{ tab.label() }}\n </span>\n\n @if (tab.count() !== null) {\n <span class=\"badge\">\n {{ tab.count() }}\n </span>\n }\n\n @if (closable()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- mouse affordance; keyboard closes the focused tab via Delete (see onKeydown) -->\n <span\n class=\"tab-close\"\n [attr.aria-label]=\"intl().tabs.close(tab.label())\"\n (click)=\"onCloseClick($event, $index)\">\n <ds-icon\n name=\"x\"\n [size]=\"12\">\n </ds-icon>\n </span>\n }\n </button>\n }\n</div>\n\n@if (showScrollArrows()) {\n <button\n type=\"button\"\n class=\"scroll-arrow\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [class.at-edge]=\"!canScrollNext()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"scrollPage(true)\">\n <ds-icon\n name=\"chevronRight\"\n [size]=\"16\">\n </ds-icon>\n </button>\n}\n\n@for (tab of tabs(); track $index) {\n @if (isPanelVisible($index)) {\n <div\n class=\"panel\"\n role=\"tabpanel\"\n tabindex=\"0\"\n [id]=\"panelId($index)\"\n [attr.aria-labelledby]=\"tabId($index)\"\n [hidden]=\"$index !== selectedIndex()\">\n <ng-container *ngTemplateOutlet=\"tab.content()\"></ng-container>\n </div>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAmBa,YAAY,CAAA;;AAEd,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;AAEhC,IAAA,IAAI,GAAG,KAAK,CAAkB,IAAI,2EAAC;;AAEnC,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;;IAElC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;AAClC,IAAA,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAuB,SAAS,CAAC;wGAX3D,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA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AAA,EAAA,IAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,SAAS,wFAYb,YAAY,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEjHxD;;AAEG;;;;"}
|
|
@@ -3,7 +3,7 @@ import { inject, input, booleanAttribute, output, computed, ViewEncapsulation, C
|
|
|
3
3
|
import { Overlay } from '@angular/cdk/overlay';
|
|
4
4
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
5
5
|
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
|
6
|
-
import { DS_INTL, DS_CONFIG, devWarn } from '@ids-group-ltd/ids-design-system/core';
|
|
6
|
+
import { DS_INTL, DS_CONFIG, devWarn, addDevWarningSink } from '@ids-group-ltd/ids-design-system/core';
|
|
7
7
|
import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
|
|
8
8
|
import { SpinnerComponent } from '@ids-group-ltd/ids-design-system/components/spinner';
|
|
9
9
|
|
|
@@ -341,6 +341,7 @@ const SETTLED_SUCCESS_MS = 4000;
|
|
|
341
341
|
const SETTLED_ERROR_MS = 6000;
|
|
342
342
|
// Must outlast the loop that fires a burst.
|
|
343
343
|
const ANNOUNCE_COALESCE_MS = 120;
|
|
344
|
+
const DEV_WARNING_MS = 10000;
|
|
344
345
|
class ToastService {
|
|
345
346
|
overlay = inject(Overlay);
|
|
346
347
|
toastConfig = inject(DS_CONFIG).toast;
|
|
@@ -353,6 +354,18 @@ class ToastService {
|
|
|
353
354
|
announceTimer;
|
|
354
355
|
scrimWatcher = null;
|
|
355
356
|
constructor() {
|
|
357
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
358
|
+
if (this.toastConfig?.mirrorDevWarnings ?? true) {
|
|
359
|
+
// Deferred: a warning raised inside an effect or a render hook must not build the toast region there.
|
|
360
|
+
const unregister = addDevWarningSink((message) => setTimeout(() => this.show({
|
|
361
|
+
title: 'Dev warning',
|
|
362
|
+
body: message,
|
|
363
|
+
variant: 'warning',
|
|
364
|
+
durationMs: DEV_WARNING_MS,
|
|
365
|
+
})));
|
|
366
|
+
inject(DestroyRef).onDestroy(unregister);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
356
369
|
inject(DestroyRef).onDestroy(() => {
|
|
357
370
|
clearTimeout(this.announceTimer);
|
|
358
371
|
this.scrimWatcher?.disconnect();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-toast.mjs","sources":["../../../src/lib/components/toast/toast.config.ts","../../../src/lib/components/toast/toast.component.ts","../../../src/lib/components/toast/toast.component.html","../../../src/lib/components/toast/toast-region.component.ts","../../../src/lib/components/toast/toast-region.component.html","../../../src/lib/components/toast/toast.service.ts","../../../src/lib/components/toast/ids-group-ltd-ids-design-system-components-toast.ts"],"sourcesContent":["import type { DsToastPosition } from '@ids-group-ltd/ids-design-system/core';\n\nexport const DS_TOAST_POSITION_DEFAULT: DsToastPosition = {\n horizontalPosition: 'right',\n verticalPosition: 'top',\n offset: 'var(--space-6)',\n};\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { SpinnerComponent } from '@ids-group-ltd/ids-design-system/components/spinner';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport type { ToastAction, ToastVariant } from './toast.types';\n\n/**\n * Single toast pill, rendered by ToastRegion for service-driven toasts or placed inline as a specimen.\n */\n@Component({\n selector: 'ds-toast',\n standalone: true,\n imports: [IconComponent, SpinnerComponent],\n templateUrl: './toast.component.html',\n styleUrl: './toast.component.scss',\n // Keeps a static `title` attribute from becoming a native tooltip on the host.\n host: { '[attr.title]': 'null' },\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class ToastComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Severity: drives colour and the default icon or spinner. */\n readonly variant = input<ToastVariant>('info');\n /** Optional bold heading above the message. */\n readonly title = input<string>('');\n /** Message text; the same field as `ToastOptions.body`. */\n readonly body = input<string>('');\n /** Show a close button that emits `closed`. */\n readonly dismissible = input(false, { transform: booleanAttribute });\n /** Override the variant's default icon. */\n readonly icon = input<IconName | null>(null);\n /** Optional action button rendered before the dismiss control. */\n readonly action = input<ToastAction | null>(null);\n /** Fires when the toast is dismissed or its action is invoked. */\n readonly closed = output<void>();\n\n protected readonly isLoading = computed(() => this.variant() === 'loading');\n\n protected onAction(action: ToastAction): void {\n action.handler();\n this.closed.emit();\n }\n\n protected readonly classes = computed(() => `toast ${this.variant()}`);\n\n protected readonly defaultIcon = computed<IconName>(() => {\n switch (this.variant()) {\n case 'success':\n return 'success';\n case 'warning':\n return 'warn';\n case 'error':\n return 'error';\n default:\n return 'info';\n }\n });\n\n protected onDismiss(): void {\n this.closed.emit();\n }\n}\n","<!-- No role or aria-live: a region created with its text already in it announces nothing;\n ToastService speaks through the CDK LiveAnnouncer. A hand-placed <ds-toast> is silent. -->\n<div [class]=\"classes()\">\n @if (isLoading()) {\n <!-- aria-hidden because ds-spinner is a role=\"status\" of its own: the message is\n announced by ToastService, and a nested live region would speak twice. -->\n <ds-spinner\n class=\"icon\"\n size=\"sm\"\n aria-hidden=\"true\" />\n } @else {\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"16\" />\n }\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n {{ body() }}\n <ng-content></ng-content>\n </div>\n\n @if (action(); as act) {\n <button\n type=\"button\"\n class=\"action\"\n (click)=\"onAction(act)\">\n {{ act.label }}\n </button>\n }\n\n <span class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </span>\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"intl().dialog.dismiss\"\n (click)=\"onDismiss()\">\n <ds-icon\n name=\"x\"\n [size]=\"14\" />\n </button>\n }\n</div>\n","import {\n DestroyRef,\n ElementRef,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { DS_CONFIG, DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { DS_TOAST_POSITION_DEFAULT } from './toast.config';\nimport { ToastComponent } from './toast.component';\nimport type { ToastEntry } from './toast.types';\n\n// Fallback floor; leaveDuration() reads the real length off the node.\nconst LEAVE_FALLBACK_MS = 180;\n\n// Grace period once the pointer leaves a toast whose clock ran out under it.\nconst MIN_RESUME_MS = 600;\n\nconst DEFAULT_MAX_VISIBLE = 5;\n\nconst QUEUE_COUNT_CAP = 99;\n\n@Component({\n selector: 'ds-toast-region',\n standalone: true,\n imports: [ToastComponent],\n templateUrl: './toast-region.component.html',\n styleUrl: './toast-region.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'region',\n '[attr.aria-label]': 'intl().toast.region',\n '(mouseenter)': 'onHover(true)',\n '(mouseleave)': 'onHover(false)',\n '(focusin)': 'onFocusWithin(true)',\n '(focusout)': 'onFocusWithin($event)',\n '[class.stack-newest-last]': '!newestFirst',\n },\n})\nexport class ToastRegionComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Cap on concurrently visible toasts. Extras are queued and shown as\n * earlier ones dismiss. `0` = unlimited. */\n readonly maxVisible = input<number>(DEFAULT_MAX_VISIBLE);\n /** Show a `+N` strip while toasts wait behind `maxVisible`. */\n readonly showQueueCount = input(true, { transform: booleanAttribute });\n\n protected readonly visibleEntries = signal<readonly ToastEntry[]>([]);\n protected readonly leaving = signal<ReadonlySet<number>>(new Set());\n\n private readonly pendingQueue = signal<readonly ToastEntry[]>([]);\n\n protected readonly queuedLabel = computed(() => {\n const waiting = this.pendingQueue().length;\n if (waiting === 0 || !this.showQueueCount()) {\n return null;\n }\n\n return waiting > QUEUE_COUNT_CAP ? `+${QUEUE_COUNT_CAP}+` : `+${waiting}`;\n });\n private readonly timers = new Map<number, number>();\n private readonly leaveTimers = new Map<number, number>();\n private readonly remaining = new Map<number, number>();\n private readonly startedAt = new Map<number, number>();\n private hovered = false;\n private focusWithin = false;\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly position = inject(DS_CONFIG).toast?.position;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() =>\n this.maxVisible() < 0\n ? `<ds-toast-region> maxVisible is ${this.maxVisible()}; a negative cap means unlimited, which is what 0 says. Pass 0 if that is the intent.`\n : null,\n );\n }\n effect(() => {\n this.maxVisible();\n this.drainQueue();\n });\n // An uncancelled timer fires into a destroyed component.\n inject(DestroyRef).onDestroy(() => {\n this.timers.forEach((timer) => window.clearTimeout(timer));\n this.leaveTimers.forEach((timer) => window.clearTimeout(timer));\n this.timers.clear();\n this.leaveTimers.clear();\n });\n }\n\n /** Newest goes NEAREST the anchor; DOM order is the visual and reading order. */\n protected readonly newestFirst =\n (this.position?.verticalPosition ??\n DS_TOAST_POSITION_DEFAULT.verticalPosition) === 'top';\n\n add(entry: ToastEntry): void {\n const limit = this.maxVisible();\n if (limit > 0 && this.visibleEntries().length >= limit) {\n this.pendingQueue.update((queue) => [...queue, entry]);\n\n return;\n }\n\n this.show(entry);\n }\n\n private show(entry: ToastEntry): void {\n const before = this.measureTops();\n this.visibleEntries.update((existing) =>\n this.newestFirst ? [entry, ...existing] : [...existing, entry],\n );\n this.arm(entry.id, entry.durationMs);\n this.slideNeighbours(before);\n }\n\n /** FLIP, not an absolute stack: that collapses the region to zero height inside the content-sized CDK pane. */\n private slideNeighbours(before: Map<number, number>): void {\n if (!before.size) {\n return;\n }\n requestAnimationFrame(() => {\n const nodes = this.toastNodes();\n const deltas: [HTMLElement, number][] = [];\n for (const [id, node] of nodes) {\n const previousTop = before.get(id);\n if (previousTop === undefined) {\n continue;\n }\n const delta = previousTop - node.getBoundingClientRect().top;\n if (delta) {\n deltas.push([node, delta]);\n }\n }\n for (const [node, delta] of deltas) {\n node.style.setProperty('--_toast-shift', `${delta}px`);\n node.classList.add('shifting');\n }\n requestAnimationFrame(() => {\n for (const [node] of deltas) {\n node.classList.remove('shifting');\n node.style.removeProperty('--_toast-shift');\n }\n });\n });\n }\n\n private toastNodes(): Map<number, HTMLElement> {\n const nodes = new Map<number, HTMLElement>();\n const elements =\n this.host.nativeElement.querySelectorAll<HTMLElement>('ds-toast');\n this.visibleEntries().forEach((entry, index) => {\n const node = elements[index];\n if (node) {\n nodes.set(entry.id, node);\n }\n });\n\n return nodes;\n }\n\n private measureTops(): Map<number, number> {\n const tops = new Map<number, number>();\n for (const [id, node] of this.toastNodes()) {\n tops.set(id, node.getBoundingClientRect().top);\n }\n\n return tops;\n }\n\n private arm(id: number, remaining: number): void {\n if (remaining <= 0) {\n return;\n }\n this.remaining.set(id, remaining);\n // drainQueue arms from a timeout, with no user event nearby, so bank the pause state here.\n if (this.hovered || this.focusWithin) {\n this.startedAt.delete(id);\n\n return;\n }\n this.startedAt.set(id, Date.now());\n const existing = this.timers.get(id);\n if (existing !== undefined) {\n window.clearTimeout(existing);\n }\n this.timers.set(\n id,\n window.setTimeout(() => this.remove(id), remaining),\n );\n }\n\n private clearCountdown(id: number): void {\n const timer = this.timers.get(id);\n if (timer !== undefined) {\n window.clearTimeout(timer);\n this.timers.delete(id);\n }\n this.remaining.delete(id);\n this.startedAt.delete(id);\n }\n\n protected onHover(entered: boolean): void {\n this.hovered = entered;\n this.syncPause();\n }\n\n // `focusout` also fires when focus moves BETWEEN elements inside the region; the containment check avoids re-flooring at MIN_RESUME_MS.\n protected onFocusWithin(event: FocusEvent | true): void {\n this.focusWithin =\n event === true ||\n (event.relatedTarget instanceof Node &&\n this.host.nativeElement.contains(event.relatedTarget));\n this.syncPause();\n }\n\n private syncPause(): void {\n const shouldPause = this.hovered || this.focusWithin;\n if (shouldPause === this.paused) {\n return;\n }\n if (shouldPause) {\n this.pauseAll();\n } else {\n this.resumeAll();\n }\n }\n\n private get paused(): boolean {\n return this.timers.size === 0 && this.remaining.size > 0;\n }\n\n private pauseAll(): void {\n const now = Date.now();\n for (const [id, timer] of this.timers) {\n window.clearTimeout(timer);\n const left =\n (this.remaining.get(id) ?? 0) - (now - (this.startedAt.get(id) ?? now));\n this.remaining.set(id, Math.max(left, MIN_RESUME_MS));\n }\n this.timers.clear();\n }\n\n private resumeAll(): void {\n for (const [id, left] of [...this.remaining]) {\n this.arm(id, left);\n }\n }\n\n /** Replaces fields of a visible or queued toast in place. Patching `durationMs`\n * restarts the clock; on a QUEUED toast it takes effect on promotion. */\n update(\n id: number,\n patch: Partial<\n Pick<\n ToastEntry,\n 'body' | 'title' | 'variant' | 'dismissible' | 'action' | 'durationMs'\n >\n >,\n ): void {\n const inVisible = this.visibleEntries().some((entry) => entry.id === id);\n if (inVisible) {\n this.visibleEntries.update((entries) =>\n entries.map((entry) =>\n entry.id === id ? { ...entry, ...patch } : entry,\n ),\n );\n if (patch.durationMs !== undefined) {\n this.clearCountdown(id);\n this.arm(id, patch.durationMs);\n }\n\n return;\n }\n this.pendingQueue.update((queue) =>\n queue.map((entry) => (entry.id === id ? { ...entry, ...patch } : entry)),\n );\n }\n\n remove(id: number): void {\n // A `ToastRef` outlives its toast, so dismiss() can arrive for an id nothing holds.\n const isVisible = this.visibleEntries().some((entry) => entry.id === id);\n const queued = this.pendingQueue().some((entry) => entry.id === id);\n if (!isVisible && !queued) {\n return;\n }\n\n this.clearCountdown(id);\n if (queued) {\n this.pendingQueue.update((queue) =>\n queue.filter((entry) => entry.id !== id),\n );\n\n return;\n }\n if (this.leaving().has(id)) {\n return;\n }\n this.leaving.update((set) => new Set(set).add(id));\n this.leaveTimers.set(\n id,\n window.setTimeout(() => {\n this.leaveTimers.delete(id);\n this.visibleEntries.update((existing) =>\n existing.filter((entry) => entry.id !== id),\n );\n this.leaving.update((set) => {\n const next = new Set(set);\n next.delete(id);\n\n return next;\n });\n this.drainQueue();\n }, this.leaveDuration(id)),\n );\n }\n\n /** The leave transition length is a public token, so read it off the node. Reduced\n * motion zeroes it, so the floor applies only when there is nothing to measure. */\n private leaveDuration(id: number): number {\n const node = this.toastNodes().get(id);\n if (!node) {\n return LEAVE_FALLBACK_MS;\n }\n const declared = getComputedStyle(node)\n .transitionDuration.split(',')\n .map((part) => parseFloat(part) * 1000)\n .filter((ms) => !Number.isNaN(ms));\n\n return declared.length ? Math.max(...declared) : LEAVE_FALLBACK_MS;\n }\n\n protected isLeaving(id: number): boolean {\n return this.leaving().has(id);\n }\n\n clear(): void {\n this.timers.forEach((timer) => window.clearTimeout(timer));\n this.leaveTimers.forEach((timer) => window.clearTimeout(timer));\n this.timers.clear();\n this.leaveTimers.clear();\n this.remaining.clear();\n this.startedAt.clear();\n this.visibleEntries.set([]);\n this.leaving.set(new Set());\n this.pendingQueue.set([]);\n }\n\n private drainQueue(): void {\n while (this.pendingQueue().length) {\n const limit = this.maxVisible();\n if (limit > 0 && this.visibleEntries().length >= limit) {\n return;\n }\n const [next, ...rest] = this.pendingQueue();\n this.pendingQueue.set(rest);\n this.show(next);\n }\n }\n}\n","@if (queuedLabel(); as label) {\n <!-- aria-hidden: ToastService already announced every toast, queued ones included. -->\n <div\n class=\"queue-count\"\n aria-hidden=\"true\">\n {{ label }}\n </div>\n}\n\n@for (entry of visibleEntries(); track entry.id) {\n <ds-toast\n [variant]=\"entry.variant\"\n [title]=\"entry.title ?? ''\"\n [body]=\"entry.body\"\n [dismissible]=\"entry.dismissible\"\n [action]=\"entry.action ?? null\"\n [class.leaving]=\"isLeaving(entry.id)\"\n (closed)=\"remove(entry.id)\" />\n}\n","import { ComponentRef, DestroyRef, Injectable, inject } from '@angular/core';\nimport {\n Overlay,\n OverlayRef,\n GlobalPositionStrategy,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\nimport { ToastRegionComponent } from './toast-region.component';\nimport { DS_TOAST_POSITION_DEFAULT } from './toast.config';\nimport type {\n ToastEntry,\n ToastVariant,\n ToastOptions,\n ToastPromiseMessages,\n ToastRef,\n} from './toast.types';\n\nconst SETTLED_SUCCESS_MS = 4000;\nconst SETTLED_ERROR_MS = 6000;\n\n// Must outlast the loop that fires a burst.\nconst ANNOUNCE_COALESCE_MS = 120;\n\n@Injectable({ providedIn: 'root' })\nexport class ToastService {\n private readonly overlay = inject(Overlay);\n private readonly toastConfig = inject(DS_CONFIG).toast;\n private readonly announcer = inject(LiveAnnouncer);\n private overlayRef: OverlayRef | null = null;\n private regionRef: ComponentRef<ToastRegionComponent> | null = null;\n private nextId = 1;\n private pendingAnnouncements: string[] = [];\n private pendingAssertive = false;\n private announceTimer: number | undefined;\n private scrimWatcher: MutationObserver | null = null;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n clearTimeout(this.announceTimer);\n this.scrimWatcher?.disconnect();\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.regionRef = null;\n });\n }\n\n show(opts: ToastOptions): ToastRef {\n this.ensureRegion();\n const id = this.nextId++;\n const variant = opts.variant ?? 'info';\n // An `action` toast cannot expire: the region is the last child of `body`, so a\n // keyboard user cannot reach the button in time.\n const durationMs =\n variant === 'loading' || opts.action ? 0 : (opts.durationMs ?? 5000);\n const entry: ToastEntry = {\n id,\n title: opts.title,\n body: opts.body,\n variant,\n // Nothing that cannot expire may also be unclosable, or it holds a slot for the page's life.\n dismissible: durationMs > 0 ? (opts.dismissible ?? true) : true,\n action: opts.action,\n durationMs,\n };\n // The region runs the countdown: a toast queued behind `maxVisible` would expire unseen if started here.\n this.regionRef!.instance.add(entry);\n this.announce(variant, entry.body, entry.title);\n\n return {\n id,\n dismiss: () => this.regionRef?.instance.remove(id),\n };\n }\n\n /** Shows a loading toast for the duration of `source`; resolution and rejection turn the\n * same toast into a success/error variant with its own auto-dismiss delay.\n *\n * Returns `source` itself, so the caller still owns rejection handling. */\n promise<T>(\n source: Promise<T>,\n messages: ToastPromiseMessages<T>,\n ): Promise<T> {\n const ref = this.show({\n body: messages.loading,\n variant: 'loading',\n durationMs: 0,\n });\n\n source.then(\n (value) => {\n const successBody =\n typeof messages.success === 'function'\n ? messages.success(value)\n : messages.success;\n this.regionRef?.instance.update(ref.id, {\n body: successBody,\n variant: 'success',\n dismissible: true,\n durationMs: SETTLED_SUCCESS_MS,\n });\n this.announce('success', successBody);\n },\n (reason: unknown) => {\n const errorBody =\n typeof messages.error === 'function'\n ? messages.error(reason)\n : messages.error;\n this.regionRef?.instance.update(ref.id, {\n body: errorBody,\n variant: 'error',\n dismissible: true,\n durationMs: SETTLED_ERROR_MS,\n });\n this.announce('error', errorBody);\n },\n );\n\n return source;\n }\n\n /** The announcement must NOT ride the visual toast: `aria-live` on an element created\n * together with its text announces nothing in NVDA or JAWS.\n *\n * Serialising a burst does not work either: `announce()` clears the region and writes\n * on a timeout, so the next message wipes the previous one. One region change carrying\n * every message is the only shape that survives. */\n private announce(variant: ToastVariant, body: string, title?: string): void {\n const spoken = [title, body].filter(Boolean).join('. ');\n if (!spoken) {\n return;\n }\n this.pendingAnnouncements.push(spoken);\n if (variant === 'error' || variant === 'warning') {\n this.pendingAssertive = true;\n }\n clearTimeout(this.announceTimer);\n this.announceTimer = window.setTimeout(() => {\n const message = this.pendingAnnouncements.join('. ');\n const politeness = this.pendingAssertive ? 'assertive' : 'polite';\n this.pendingAnnouncements = [];\n this.pendingAssertive = false;\n this.announcer.announce(message, politeness);\n }, ANNOUNCE_COALESCE_MS);\n }\n\n dismissAll(): void {\n this.regionRef?.instance.clear();\n }\n\n private ensureRegion(): void {\n if (this.overlayRef) {\n return;\n }\n this.overlayRef = this.overlay.create({\n hasBackdrop: false,\n panelClass: 'ds-toast-panel',\n positionStrategy: this.buildPositionStrategy(),\n });\n this.regionRef = this.overlayRef.attach(\n new ComponentPortal(ToastRegionComponent),\n );\n // `>= 0`, not truthiness: 0 asks for an uncapped stack and must not read as \"unset\".\n const maxVisible = this.toastConfig?.maxVisible;\n if (typeof maxVisible === 'number' && maxVisible >= 0) {\n this.regionRef.setInput('maxVisible', maxVisible);\n }\n const showQueueCount = this.toastConfig?.showQueueCount;\n if (typeof showQueueCount === 'boolean') {\n this.regionRef.setInput('showQueueCount', showQueueCount);\n }\n this.keepAboveScrims();\n }\n\n /** Keeps the toast above a scrim opened AFTER it. `--layer-toast` cannot: CDK overlay hosts\n * are `popover=\"manual\"` and the top layer paints in show order, ignoring z-index.\n * Scrimmed overlays only: `--layer-tooltip` sits above the toast. */\n private keepAboveScrims(): void {\n const host = this.overlayRef?.hostElement;\n const container = host?.parentElement;\n if (!host || !container || typeof host.showPopover !== 'function') {\n return;\n }\n this.scrimWatcher = new MutationObserver((records) => {\n const scrimAppeared = records.some((record) =>\n [...record.addedNodes].some(\n (node) =>\n node instanceof HTMLElement &&\n node !== host &&\n (node.classList.contains('cdk-overlay-backdrop') ||\n node.querySelector?.('.cdk-overlay-backdrop')),\n ),\n );\n if (!scrimAppeared || !host.isConnected) {\n return;\n }\n // The top layer has no \"raise\"; re-showing is the only lever.\n try {\n host.hidePopover();\n host.showPopover();\n } catch {\n // The host may not be showing, and hidePopover() throws when it is not.\n }\n });\n this.scrimWatcher.observe(container, { childList: true, subtree: true });\n }\n\n private buildPositionStrategy(): GlobalPositionStrategy {\n const config = {\n ...DS_TOAST_POSITION_DEFAULT,\n ...this.toastConfig?.position,\n };\n const strategy = this.overlay.position().global();\n if (config.verticalPosition === 'top') {\n strategy.top(config.offset);\n } else {\n strategy.bottom(config.offset);\n }\n if (config.horizontalPosition === 'left') {\n strategy.left(config.offset);\n } else if (config.horizontalPosition === 'right') {\n strategy.right(config.offset);\n } else {\n strategy.centerHorizontally();\n }\n\n return strategy;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEO,MAAM,yBAAyB,GAAoB;AACxD,IAAA,kBAAkB,EAAE,OAAO;AAC3B,IAAA,gBAAgB,EAAE,KAAK;AACvB,IAAA,MAAM,EAAE,gBAAgB;;;ACU1B;;AAEG;MAWU,cAAc,CAAA;AACN,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;;AAGhC,IAAA,OAAO,GAAG,KAAK,CAAe,MAAM,8EAAC;;AAErC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;;IAExB,WAAW,GAAG,KAAK,CAAC,KAAK,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAE3D,IAAA,IAAI,GAAG,KAAK,CAAkB,IAAI,2EAAC;;AAEnC,IAAA,MAAM,GAAG,KAAK,CAAqB,IAAI,6EAAC;;IAExC,MAAM,GAAG,MAAM,EAAQ;AAEb,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,KAAK,SAAS,gFAAC;AAEjE,IAAA,QAAQ,CAAC,MAAmB,EAAA;QACpC,MAAM,CAAC,OAAO,EAAE;AAChB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;IACpB;AAEmB,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAA,MAAA,EAAS,IAAI,CAAC,OAAO,EAAE,CAAA,CAAE,8EAAC;AAEnD,IAAA,WAAW,GAAG,QAAQ,CAAW,MAAK;AACvD,QAAA,QAAQ,IAAI,CAAC,OAAO,EAAE;AACpB,YAAA,KAAK,SAAS;AACZ,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M,CAAC;QAC7B;aAAO;AACL,YAAA,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;QAChC;AACA,QAAA,IAAI,MAAM,CAAC,kBAAkB,KAAK,MAAM,EAAE;AACxC,YAAA,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QAC9B;AAAO,aAAA,IAAI,MAAM,CAAC,kBAAkB,KAAK,OAAO,EAAE;AAChD,YAAA,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;QAC/B;aAAO;YACL,QAAQ,CAAC,kBAAkB,EAAE;QAC/B;AAEA,QAAA,OAAO,QAAQ;IACjB;wGA1MW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA;;4FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACzBlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-toast.mjs","sources":["../../../src/lib/components/toast/toast.config.ts","../../../src/lib/components/toast/toast.component.ts","../../../src/lib/components/toast/toast.component.html","../../../src/lib/components/toast/toast-region.component.ts","../../../src/lib/components/toast/toast-region.component.html","../../../src/lib/components/toast/toast.service.ts","../../../src/lib/components/toast/ids-group-ltd-ids-design-system-components-toast.ts"],"sourcesContent":["import type { DsToastPosition } from '@ids-group-ltd/ids-design-system/core';\n\nexport const DS_TOAST_POSITION_DEFAULT: DsToastPosition = {\n horizontalPosition: 'right',\n verticalPosition: 'top',\n offset: 'var(--space-6)',\n};\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { SpinnerComponent } from '@ids-group-ltd/ids-design-system/components/spinner';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport type { ToastAction, ToastVariant } from './toast.types';\n\n/**\n * Single toast pill, rendered by ToastRegion for service-driven toasts or placed inline as a specimen.\n */\n@Component({\n selector: 'ds-toast',\n standalone: true,\n imports: [IconComponent, SpinnerComponent],\n templateUrl: './toast.component.html',\n styleUrl: './toast.component.scss',\n // Keeps a static `title` attribute from becoming a native tooltip on the host.\n host: { '[attr.title]': 'null' },\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class ToastComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Severity: drives colour and the default icon or spinner. */\n readonly variant = input<ToastVariant>('info');\n /** Optional bold heading above the message. */\n readonly title = input<string>('');\n /** Message text; the same field as `ToastOptions.body`. */\n readonly body = input<string>('');\n /** Show a close button that emits `closed`. */\n readonly dismissible = input(false, { transform: booleanAttribute });\n /** Override the variant's default icon. */\n readonly icon = input<IconName | null>(null);\n /** Optional action button rendered before the dismiss control. */\n readonly action = input<ToastAction | null>(null);\n /** Fires when the toast is dismissed or its action is invoked. */\n readonly closed = output<void>();\n\n protected readonly isLoading = computed(() => this.variant() === 'loading');\n\n protected onAction(action: ToastAction): void {\n action.handler();\n this.closed.emit();\n }\n\n protected readonly classes = computed(() => `toast ${this.variant()}`);\n\n protected readonly defaultIcon = computed<IconName>(() => {\n switch (this.variant()) {\n case 'success':\n return 'success';\n case 'warning':\n return 'warn';\n case 'error':\n return 'error';\n default:\n return 'info';\n }\n });\n\n protected onDismiss(): void {\n this.closed.emit();\n }\n}\n","<!-- No role or aria-live: a region created with its text already in it announces nothing;\n ToastService speaks through the CDK LiveAnnouncer. A hand-placed <ds-toast> is silent. -->\n<div [class]=\"classes()\">\n @if (isLoading()) {\n <!-- aria-hidden because ds-spinner is a role=\"status\" of its own: the message is\n announced by ToastService, and a nested live region would speak twice. -->\n <ds-spinner\n class=\"icon\"\n size=\"sm\"\n aria-hidden=\"true\" />\n } @else {\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"16\" />\n }\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n {{ body() }}\n <ng-content></ng-content>\n </div>\n\n @if (action(); as act) {\n <button\n type=\"button\"\n class=\"action\"\n (click)=\"onAction(act)\">\n {{ act.label }}\n </button>\n }\n\n <span class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </span>\n\n @if (dismissible()) {\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"intl().dialog.dismiss\"\n (click)=\"onDismiss()\">\n <ds-icon\n name=\"x\"\n [size]=\"14\" />\n </button>\n }\n</div>\n","import {\n DestroyRef,\n ElementRef,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { DS_CONFIG, DS_INTL } from '@ids-group-ltd/ids-design-system/core';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { DS_TOAST_POSITION_DEFAULT } from './toast.config';\nimport { ToastComponent } from './toast.component';\nimport type { ToastEntry } from './toast.types';\n\n// Fallback floor; leaveDuration() reads the real length off the node.\nconst LEAVE_FALLBACK_MS = 180;\n\n// Grace period once the pointer leaves a toast whose clock ran out under it.\nconst MIN_RESUME_MS = 600;\n\nconst DEFAULT_MAX_VISIBLE = 5;\n\nconst QUEUE_COUNT_CAP = 99;\n\n@Component({\n selector: 'ds-toast-region',\n standalone: true,\n imports: [ToastComponent],\n templateUrl: './toast-region.component.html',\n styleUrl: './toast-region.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'region',\n '[attr.aria-label]': 'intl().toast.region',\n '(mouseenter)': 'onHover(true)',\n '(mouseleave)': 'onHover(false)',\n '(focusin)': 'onFocusWithin(true)',\n '(focusout)': 'onFocusWithin($event)',\n '[class.stack-newest-last]': '!newestFirst',\n },\n})\nexport class ToastRegionComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Cap on concurrently visible toasts. Extras are queued and shown as\n * earlier ones dismiss. `0` = unlimited. */\n readonly maxVisible = input<number>(DEFAULT_MAX_VISIBLE);\n /** Show a `+N` strip while toasts wait behind `maxVisible`. */\n readonly showQueueCount = input(true, { transform: booleanAttribute });\n\n protected readonly visibleEntries = signal<readonly ToastEntry[]>([]);\n protected readonly leaving = signal<ReadonlySet<number>>(new Set());\n\n private readonly pendingQueue = signal<readonly ToastEntry[]>([]);\n\n protected readonly queuedLabel = computed(() => {\n const waiting = this.pendingQueue().length;\n if (waiting === 0 || !this.showQueueCount()) {\n return null;\n }\n\n return waiting > QUEUE_COUNT_CAP ? `+${QUEUE_COUNT_CAP}+` : `+${waiting}`;\n });\n private readonly timers = new Map<number, number>();\n private readonly leaveTimers = new Map<number, number>();\n private readonly remaining = new Map<number, number>();\n private readonly startedAt = new Map<number, number>();\n private hovered = false;\n private focusWithin = false;\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly position = inject(DS_CONFIG).toast?.position;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() =>\n this.maxVisible() < 0\n ? `<ds-toast-region> maxVisible is ${this.maxVisible()}; a negative cap means unlimited, which is what 0 says. Pass 0 if that is the intent.`\n : null,\n );\n }\n effect(() => {\n this.maxVisible();\n this.drainQueue();\n });\n // An uncancelled timer fires into a destroyed component.\n inject(DestroyRef).onDestroy(() => {\n this.timers.forEach((timer) => window.clearTimeout(timer));\n this.leaveTimers.forEach((timer) => window.clearTimeout(timer));\n this.timers.clear();\n this.leaveTimers.clear();\n });\n }\n\n /** Newest goes NEAREST the anchor; DOM order is the visual and reading order. */\n protected readonly newestFirst =\n (this.position?.verticalPosition ??\n DS_TOAST_POSITION_DEFAULT.verticalPosition) === 'top';\n\n add(entry: ToastEntry): void {\n const limit = this.maxVisible();\n if (limit > 0 && this.visibleEntries().length >= limit) {\n this.pendingQueue.update((queue) => [...queue, entry]);\n\n return;\n }\n\n this.show(entry);\n }\n\n private show(entry: ToastEntry): void {\n const before = this.measureTops();\n this.visibleEntries.update((existing) =>\n this.newestFirst ? [entry, ...existing] : [...existing, entry],\n );\n this.arm(entry.id, entry.durationMs);\n this.slideNeighbours(before);\n }\n\n /** FLIP, not an absolute stack: that collapses the region to zero height inside the content-sized CDK pane. */\n private slideNeighbours(before: Map<number, number>): void {\n if (!before.size) {\n return;\n }\n requestAnimationFrame(() => {\n const nodes = this.toastNodes();\n const deltas: [HTMLElement, number][] = [];\n for (const [id, node] of nodes) {\n const previousTop = before.get(id);\n if (previousTop === undefined) {\n continue;\n }\n const delta = previousTop - node.getBoundingClientRect().top;\n if (delta) {\n deltas.push([node, delta]);\n }\n }\n for (const [node, delta] of deltas) {\n node.style.setProperty('--_toast-shift', `${delta}px`);\n node.classList.add('shifting');\n }\n requestAnimationFrame(() => {\n for (const [node] of deltas) {\n node.classList.remove('shifting');\n node.style.removeProperty('--_toast-shift');\n }\n });\n });\n }\n\n private toastNodes(): Map<number, HTMLElement> {\n const nodes = new Map<number, HTMLElement>();\n const elements =\n this.host.nativeElement.querySelectorAll<HTMLElement>('ds-toast');\n this.visibleEntries().forEach((entry, index) => {\n const node = elements[index];\n if (node) {\n nodes.set(entry.id, node);\n }\n });\n\n return nodes;\n }\n\n private measureTops(): Map<number, number> {\n const tops = new Map<number, number>();\n for (const [id, node] of this.toastNodes()) {\n tops.set(id, node.getBoundingClientRect().top);\n }\n\n return tops;\n }\n\n private arm(id: number, remaining: number): void {\n if (remaining <= 0) {\n return;\n }\n this.remaining.set(id, remaining);\n // drainQueue arms from a timeout, with no user event nearby, so bank the pause state here.\n if (this.hovered || this.focusWithin) {\n this.startedAt.delete(id);\n\n return;\n }\n this.startedAt.set(id, Date.now());\n const existing = this.timers.get(id);\n if (existing !== undefined) {\n window.clearTimeout(existing);\n }\n this.timers.set(\n id,\n window.setTimeout(() => this.remove(id), remaining),\n );\n }\n\n private clearCountdown(id: number): void {\n const timer = this.timers.get(id);\n if (timer !== undefined) {\n window.clearTimeout(timer);\n this.timers.delete(id);\n }\n this.remaining.delete(id);\n this.startedAt.delete(id);\n }\n\n protected onHover(entered: boolean): void {\n this.hovered = entered;\n this.syncPause();\n }\n\n // `focusout` also fires when focus moves BETWEEN elements inside the region; the containment check avoids re-flooring at MIN_RESUME_MS.\n protected onFocusWithin(event: FocusEvent | true): void {\n this.focusWithin =\n event === true ||\n (event.relatedTarget instanceof Node &&\n this.host.nativeElement.contains(event.relatedTarget));\n this.syncPause();\n }\n\n private syncPause(): void {\n const shouldPause = this.hovered || this.focusWithin;\n if (shouldPause === this.paused) {\n return;\n }\n if (shouldPause) {\n this.pauseAll();\n } else {\n this.resumeAll();\n }\n }\n\n private get paused(): boolean {\n return this.timers.size === 0 && this.remaining.size > 0;\n }\n\n private pauseAll(): void {\n const now = Date.now();\n for (const [id, timer] of this.timers) {\n window.clearTimeout(timer);\n const left =\n (this.remaining.get(id) ?? 0) - (now - (this.startedAt.get(id) ?? now));\n this.remaining.set(id, Math.max(left, MIN_RESUME_MS));\n }\n this.timers.clear();\n }\n\n private resumeAll(): void {\n for (const [id, left] of [...this.remaining]) {\n this.arm(id, left);\n }\n }\n\n /** Replaces fields of a visible or queued toast in place. Patching `durationMs`\n * restarts the clock; on a QUEUED toast it takes effect on promotion. */\n update(\n id: number,\n patch: Partial<\n Pick<\n ToastEntry,\n 'body' | 'title' | 'variant' | 'dismissible' | 'action' | 'durationMs'\n >\n >,\n ): void {\n const inVisible = this.visibleEntries().some((entry) => entry.id === id);\n if (inVisible) {\n this.visibleEntries.update((entries) =>\n entries.map((entry) =>\n entry.id === id ? { ...entry, ...patch } : entry,\n ),\n );\n if (patch.durationMs !== undefined) {\n this.clearCountdown(id);\n this.arm(id, patch.durationMs);\n }\n\n return;\n }\n this.pendingQueue.update((queue) =>\n queue.map((entry) => (entry.id === id ? { ...entry, ...patch } : entry)),\n );\n }\n\n remove(id: number): void {\n // A `ToastRef` outlives its toast, so dismiss() can arrive for an id nothing holds.\n const isVisible = this.visibleEntries().some((entry) => entry.id === id);\n const queued = this.pendingQueue().some((entry) => entry.id === id);\n if (!isVisible && !queued) {\n return;\n }\n\n this.clearCountdown(id);\n if (queued) {\n this.pendingQueue.update((queue) =>\n queue.filter((entry) => entry.id !== id),\n );\n\n return;\n }\n if (this.leaving().has(id)) {\n return;\n }\n this.leaving.update((set) => new Set(set).add(id));\n this.leaveTimers.set(\n id,\n window.setTimeout(() => {\n this.leaveTimers.delete(id);\n this.visibleEntries.update((existing) =>\n existing.filter((entry) => entry.id !== id),\n );\n this.leaving.update((set) => {\n const next = new Set(set);\n next.delete(id);\n\n return next;\n });\n this.drainQueue();\n }, this.leaveDuration(id)),\n );\n }\n\n /** The leave transition length is a public token, so read it off the node. Reduced\n * motion zeroes it, so the floor applies only when there is nothing to measure. */\n private leaveDuration(id: number): number {\n const node = this.toastNodes().get(id);\n if (!node) {\n return LEAVE_FALLBACK_MS;\n }\n const declared = getComputedStyle(node)\n .transitionDuration.split(',')\n .map((part) => parseFloat(part) * 1000)\n .filter((ms) => !Number.isNaN(ms));\n\n return declared.length ? Math.max(...declared) : LEAVE_FALLBACK_MS;\n }\n\n protected isLeaving(id: number): boolean {\n return this.leaving().has(id);\n }\n\n clear(): void {\n this.timers.forEach((timer) => window.clearTimeout(timer));\n this.leaveTimers.forEach((timer) => window.clearTimeout(timer));\n this.timers.clear();\n this.leaveTimers.clear();\n this.remaining.clear();\n this.startedAt.clear();\n this.visibleEntries.set([]);\n this.leaving.set(new Set());\n this.pendingQueue.set([]);\n }\n\n private drainQueue(): void {\n while (this.pendingQueue().length) {\n const limit = this.maxVisible();\n if (limit > 0 && this.visibleEntries().length >= limit) {\n return;\n }\n const [next, ...rest] = this.pendingQueue();\n this.pendingQueue.set(rest);\n this.show(next);\n }\n }\n}\n","@if (queuedLabel(); as label) {\n <!-- aria-hidden: ToastService already announced every toast, queued ones included. -->\n <div\n class=\"queue-count\"\n aria-hidden=\"true\">\n {{ label }}\n </div>\n}\n\n@for (entry of visibleEntries(); track entry.id) {\n <ds-toast\n [variant]=\"entry.variant\"\n [title]=\"entry.title ?? ''\"\n [body]=\"entry.body\"\n [dismissible]=\"entry.dismissible\"\n [action]=\"entry.action ?? null\"\n [class.leaving]=\"isLeaving(entry.id)\"\n (closed)=\"remove(entry.id)\" />\n}\n","import { ComponentRef, DestroyRef, Injectable, inject } from '@angular/core';\nimport {\n Overlay,\n OverlayRef,\n GlobalPositionStrategy,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { LiveAnnouncer } from '@angular/cdk/a11y';\nimport {\n DS_CONFIG,\n addDevWarningSink,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { ToastRegionComponent } from './toast-region.component';\nimport { DS_TOAST_POSITION_DEFAULT } from './toast.config';\nimport type {\n ToastEntry,\n ToastVariant,\n ToastOptions,\n ToastPromiseMessages,\n ToastRef,\n} from './toast.types';\n\nconst SETTLED_SUCCESS_MS = 4000;\nconst SETTLED_ERROR_MS = 6000;\n\n// Must outlast the loop that fires a burst.\nconst ANNOUNCE_COALESCE_MS = 120;\nconst DEV_WARNING_MS = 10000;\n\n@Injectable({ providedIn: 'root' })\nexport class ToastService {\n private readonly overlay = inject(Overlay);\n private readonly toastConfig = inject(DS_CONFIG).toast;\n private readonly announcer = inject(LiveAnnouncer);\n private overlayRef: OverlayRef | null = null;\n private regionRef: ComponentRef<ToastRegionComponent> | null = null;\n private nextId = 1;\n private pendingAnnouncements: string[] = [];\n private pendingAssertive = false;\n private announceTimer: number | undefined;\n private scrimWatcher: MutationObserver | null = null;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (this.toastConfig?.mirrorDevWarnings ?? true) {\n // Deferred: a warning raised inside an effect or a render hook must not build the toast region there.\n const unregister = addDevWarningSink((message) =>\n setTimeout(() =>\n this.show({\n title: 'Dev warning',\n body: message,\n variant: 'warning',\n durationMs: DEV_WARNING_MS,\n }),\n ),\n );\n inject(DestroyRef).onDestroy(unregister);\n }\n }\n inject(DestroyRef).onDestroy(() => {\n clearTimeout(this.announceTimer);\n this.scrimWatcher?.disconnect();\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.regionRef = null;\n });\n }\n\n show(opts: ToastOptions): ToastRef {\n this.ensureRegion();\n const id = this.nextId++;\n const variant = opts.variant ?? 'info';\n // An `action` toast cannot expire: the region is the last child of `body`, so a\n // keyboard user cannot reach the button in time.\n const durationMs =\n variant === 'loading' || opts.action ? 0 : (opts.durationMs ?? 5000);\n const entry: ToastEntry = {\n id,\n title: opts.title,\n body: opts.body,\n variant,\n // Nothing that cannot expire may also be unclosable, or it holds a slot for the page's life.\n dismissible: durationMs > 0 ? (opts.dismissible ?? true) : true,\n action: opts.action,\n durationMs,\n };\n // The region runs the countdown: a toast queued behind `maxVisible` would expire unseen if started here.\n this.regionRef!.instance.add(entry);\n this.announce(variant, entry.body, entry.title);\n\n return {\n id,\n dismiss: () => this.regionRef?.instance.remove(id),\n };\n }\n\n /** Shows a loading toast for the duration of `source`; resolution and rejection turn the\n * same toast into a success/error variant with its own auto-dismiss delay.\n *\n * Returns `source` itself, so the caller still owns rejection handling. */\n promise<T>(\n source: Promise<T>,\n messages: ToastPromiseMessages<T>,\n ): Promise<T> {\n const ref = this.show({\n body: messages.loading,\n variant: 'loading',\n durationMs: 0,\n });\n\n source.then(\n (value) => {\n const successBody =\n typeof messages.success === 'function'\n ? messages.success(value)\n : messages.success;\n this.regionRef?.instance.update(ref.id, {\n body: successBody,\n variant: 'success',\n dismissible: true,\n durationMs: SETTLED_SUCCESS_MS,\n });\n this.announce('success', successBody);\n },\n (reason: unknown) => {\n const errorBody =\n typeof messages.error === 'function'\n ? messages.error(reason)\n : messages.error;\n this.regionRef?.instance.update(ref.id, {\n body: errorBody,\n variant: 'error',\n dismissible: true,\n durationMs: SETTLED_ERROR_MS,\n });\n this.announce('error', errorBody);\n },\n );\n\n return source;\n }\n\n /** The announcement must NOT ride the visual toast: `aria-live` on an element created\n * together with its text announces nothing in NVDA or JAWS.\n *\n * Serialising a burst does not work either: `announce()` clears the region and writes\n * on a timeout, so the next message wipes the previous one. One region change carrying\n * every message is the only shape that survives. */\n private announce(variant: ToastVariant, body: string, title?: string): void {\n const spoken = [title, body].filter(Boolean).join('. ');\n if (!spoken) {\n return;\n }\n this.pendingAnnouncements.push(spoken);\n if (variant === 'error' || variant === 'warning') {\n this.pendingAssertive = true;\n }\n clearTimeout(this.announceTimer);\n this.announceTimer = window.setTimeout(() => {\n const message = this.pendingAnnouncements.join('. ');\n const politeness = this.pendingAssertive ? 'assertive' : 'polite';\n this.pendingAnnouncements = [];\n this.pendingAssertive = false;\n this.announcer.announce(message, politeness);\n }, ANNOUNCE_COALESCE_MS);\n }\n\n dismissAll(): void {\n this.regionRef?.instance.clear();\n }\n\n private ensureRegion(): void {\n if (this.overlayRef) {\n return;\n }\n this.overlayRef = this.overlay.create({\n hasBackdrop: false,\n panelClass: 'ds-toast-panel',\n positionStrategy: this.buildPositionStrategy(),\n });\n this.regionRef = this.overlayRef.attach(\n new ComponentPortal(ToastRegionComponent),\n );\n // `>= 0`, not truthiness: 0 asks for an uncapped stack and must not read as \"unset\".\n const maxVisible = this.toastConfig?.maxVisible;\n if (typeof maxVisible === 'number' && maxVisible >= 0) {\n this.regionRef.setInput('maxVisible', maxVisible);\n }\n const showQueueCount = this.toastConfig?.showQueueCount;\n if (typeof showQueueCount === 'boolean') {\n this.regionRef.setInput('showQueueCount', showQueueCount);\n }\n this.keepAboveScrims();\n }\n\n /** Keeps the toast above a scrim opened AFTER it. `--layer-toast` cannot: CDK overlay hosts\n * are `popover=\"manual\"` and the top layer paints in show order, ignoring z-index.\n * Scrimmed overlays only: `--layer-tooltip` sits above the toast. */\n private keepAboveScrims(): void {\n const host = this.overlayRef?.hostElement;\n const container = host?.parentElement;\n if (!host || !container || typeof host.showPopover !== 'function') {\n return;\n }\n this.scrimWatcher = new MutationObserver((records) => {\n const scrimAppeared = records.some((record) =>\n [...record.addedNodes].some(\n (node) =>\n node instanceof HTMLElement &&\n node !== host &&\n (node.classList.contains('cdk-overlay-backdrop') ||\n node.querySelector?.('.cdk-overlay-backdrop')),\n ),\n );\n if (!scrimAppeared || !host.isConnected) {\n return;\n }\n // The top layer has no \"raise\"; re-showing is the only lever.\n try {\n host.hidePopover();\n host.showPopover();\n } catch {\n // The host may not be showing, and hidePopover() throws when it is not.\n }\n });\n this.scrimWatcher.observe(container, { childList: true, subtree: true });\n }\n\n private buildPositionStrategy(): GlobalPositionStrategy {\n const config = {\n ...DS_TOAST_POSITION_DEFAULT,\n ...this.toastConfig?.position,\n };\n const strategy = this.overlay.position().global();\n if (config.verticalPosition === 'top') {\n strategy.top(config.offset);\n } else {\n strategy.bottom(config.offset);\n }\n if (config.horizontalPosition === 'left') {\n strategy.left(config.offset);\n } else if (config.horizontalPosition === 'right') {\n strategy.right(config.offset);\n } else {\n strategy.centerHorizontally();\n }\n\n return strategy;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEO,MAAM,yBAAyB,GAAoB;AACxD,IAAA,kBAAkB,EAAE,OAAO;AAC3B,IAAA,gBAAgB,EAAE,KAAK;AACvB,IAAA,MAAM,EAAE,gBAAgB;;;ACU1B;;AAEG;MAWU,cAAc,CAAA;AACN,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;;AAGhC,IAAA,OAAO,GAAG,KAAK,CAAe,MAAM,8EAAC;;AAErC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;;IAExB,WAAW,GAAG,KAAK,CAAC,KAAK,mFAAI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,YAAA,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QAC9B;AAAO,aAAA,IAAI,MAAM,CAAC,kBAAkB,KAAK,OAAO,EAAE;AAChD,YAAA,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;QAC/B;aAAO;YACL,QAAQ,CAAC,kBAAkB,EAAE;QAC/B;AAEA,QAAA,OAAO,QAAQ;IACjB;wGA1NW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA;;4FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC7BlC;;AAEG;;;;"}
|
|
@@ -3,11 +3,11 @@ import { ViewEncapsulation, Component } from '@angular/core';
|
|
|
3
3
|
|
|
4
4
|
class TopBarComponent {
|
|
5
5
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TopBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: TopBarComponent, isStandalone: true, selector: "ds-topbar", ngImport: i0, template: "<header class=\"topbar\">\n <div class=\"title\">\n <ng-content select=\"[title]\"></ng-content>\n </div>\n\n <ng-content select=\"[breadcrumbs]\"></ng-content>\n\n <div class=\"spacer\">\n <ng-content select=\"[search]\"></ng-content>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n</header>\n", styles: [":host{--_topbar-height: var(--ds-topbar-height, var(--topbar-h));--_topbar-bg-color: var(--ds-topbar-bg-color, var(--surface-default));--_topbar-border: var(--ds-topbar-border, var(--border-divider));--_topbar-title-text-color: var(--ds-topbar-title-text-color, var(--text-primary));--_topbar-crumb-text-color: var(--ds-topbar-crumb-text-color, var(--
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: TopBarComponent, isStandalone: true, selector: "ds-topbar", ngImport: i0, template: "<header class=\"topbar\">\n <div class=\"title\">\n <ng-content select=\"[title]\"></ng-content>\n </div>\n\n <ng-content select=\"[breadcrumbs]\"></ng-content>\n\n <div class=\"spacer\">\n <ng-content select=\"[search]\"></ng-content>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n</header>\n", styles: [":host{--_topbar-height: var(--ds-topbar-height, var(--topbar-h));--_topbar-bg-color: var(--ds-topbar-bg-color, var(--surface-default));--_topbar-border: var(--ds-topbar-border, var(--border-divider));--_topbar-title-text-color: var(--ds-topbar-title-text-color, var(--text-primary));--_topbar-crumb-text-color: var(--ds-topbar-crumb-text-color, var(--ds-breadcrumbs-label-color));--_topbar-crumb-hover-text-color: var(--ds-topbar-crumb-hover-text-color, var(--ds-breadcrumbs-label-color-hover));--_topbar-crumb-separator-icon-color: var(--ds-topbar-crumb-separator-icon-color, var(--ds-breadcrumbs-separator-icon-color));--_topbar-crumb-current-text-color: var(--ds-topbar-crumb-current-text-color, var(--ds-breadcrumbs-current-label-color));display:block}.topbar{--ds-breadcrumbs-label-color: var(--_topbar-crumb-text-color);--ds-breadcrumbs-label-color-hover: var(--_topbar-crumb-hover-text-color);--ds-breadcrumbs-separator-icon-color: var(--_topbar-crumb-separator-icon-color);--ds-breadcrumbs-current-label-color: var(--_topbar-crumb-current-text-color);display:flex;align-items:center;gap:var(--space-4);height:var(--_topbar-height);padding:0 var(--space-6);background-color:var(--_topbar-bg-color);border-bottom:var(--border-width-default) solid var(--_topbar-border)}.topbar .title{font:var(--font-weight-bold) var(--font-size-h5)/var(--line-height-snug) var(--font-sans);color:var(--_topbar-title-text-color)}.topbar .spacer{flex:1;min-width:0}.topbar .actions{display:flex;align-items:center;gap:var(--space-2);margin-left:auto}\n"] });
|
|
7
7
|
}
|
|
8
8
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TopBarComponent, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
|
-
args: [{ selector: 'ds-topbar', standalone: true, encapsulation: ViewEncapsulation.Emulated, template: "<header class=\"topbar\">\n <div class=\"title\">\n <ng-content select=\"[title]\"></ng-content>\n </div>\n\n <ng-content select=\"[breadcrumbs]\"></ng-content>\n\n <div class=\"spacer\">\n <ng-content select=\"[search]\"></ng-content>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n</header>\n", styles: [":host{--_topbar-height: var(--ds-topbar-height, var(--topbar-h));--_topbar-bg-color: var(--ds-topbar-bg-color, var(--surface-default));--_topbar-border: var(--ds-topbar-border, var(--border-divider));--_topbar-title-text-color: var(--ds-topbar-title-text-color, var(--text-primary));--_topbar-crumb-text-color: var(--ds-topbar-crumb-text-color, var(--
|
|
10
|
+
args: [{ selector: 'ds-topbar', standalone: true, encapsulation: ViewEncapsulation.Emulated, template: "<header class=\"topbar\">\n <div class=\"title\">\n <ng-content select=\"[title]\"></ng-content>\n </div>\n\n <ng-content select=\"[breadcrumbs]\"></ng-content>\n\n <div class=\"spacer\">\n <ng-content select=\"[search]\"></ng-content>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n</header>\n", styles: [":host{--_topbar-height: var(--ds-topbar-height, var(--topbar-h));--_topbar-bg-color: var(--ds-topbar-bg-color, var(--surface-default));--_topbar-border: var(--ds-topbar-border, var(--border-divider));--_topbar-title-text-color: var(--ds-topbar-title-text-color, var(--text-primary));--_topbar-crumb-text-color: var(--ds-topbar-crumb-text-color, var(--ds-breadcrumbs-label-color));--_topbar-crumb-hover-text-color: var(--ds-topbar-crumb-hover-text-color, var(--ds-breadcrumbs-label-color-hover));--_topbar-crumb-separator-icon-color: var(--ds-topbar-crumb-separator-icon-color, var(--ds-breadcrumbs-separator-icon-color));--_topbar-crumb-current-text-color: var(--ds-topbar-crumb-current-text-color, var(--ds-breadcrumbs-current-label-color));display:block}.topbar{--ds-breadcrumbs-label-color: var(--_topbar-crumb-text-color);--ds-breadcrumbs-label-color-hover: var(--_topbar-crumb-hover-text-color);--ds-breadcrumbs-separator-icon-color: var(--_topbar-crumb-separator-icon-color);--ds-breadcrumbs-current-label-color: var(--_topbar-crumb-current-text-color);display:flex;align-items:center;gap:var(--space-4);height:var(--_topbar-height);padding:0 var(--space-6);background-color:var(--_topbar-bg-color);border-bottom:var(--border-width-default) solid var(--_topbar-border)}.topbar .title{font:var(--font-weight-bold) var(--font-size-h5)/var(--line-height-snug) var(--font-sans);color:var(--_topbar-title-text-color)}.topbar .spacer{flex:1;min-width:0}.topbar .actions{display:flex;align-items:center;gap:var(--space-2);margin-left:auto}\n"] }]
|
|
11
11
|
}] });
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-topbar.mjs","sources":["../../../src/lib/components/topbar/topbar.component.ts","../../../src/lib/components/topbar/topbar.component.html","../../../src/lib/components/topbar/ids-group-ltd-ids-design-system-components-topbar.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ds-topbar',\n standalone: true,\n templateUrl: './topbar.component.html',\n styleUrl: './topbar.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class TopBarComponent {}\n","<header class=\"topbar\">\n <div class=\"title\">\n <ng-content select=\"[title]\"></ng-content>\n </div>\n\n <ng-content select=\"[breadcrumbs]\"></ng-content>\n\n <div class=\"spacer\">\n <ng-content select=\"[search]\"></ng-content>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n</header>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MASa,eAAe,CAAA;wGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,qECT5B,yWAeA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-topbar.mjs","sources":["../../../src/lib/components/topbar/topbar.component.ts","../../../src/lib/components/topbar/topbar.component.html","../../../src/lib/components/topbar/ids-group-ltd-ids-design-system-components-topbar.ts"],"sourcesContent":["import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ds-topbar',\n standalone: true,\n templateUrl: './topbar.component.html',\n styleUrl: './topbar.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class TopBarComponent {}\n","<header class=\"topbar\">\n <div class=\"title\">\n <ng-content select=\"[title]\"></ng-content>\n </div>\n\n <ng-content select=\"[breadcrumbs]\"></ng-content>\n\n <div class=\"spacer\">\n <ng-content select=\"[search]\"></ng-content>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n</header>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MASa,eAAe,CAAA;wGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,qECT5B,yWAeA,EAAA,MAAA,EAAA,CAAA,sgDAAA,CAAA,EAAA,CAAA;;4FDNa,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,aAAA,EAGD,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,yWAAA,EAAA,MAAA,EAAA,CAAA,sgDAAA,CAAA,EAAA;;;AEP3C;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, computed, signal, PLATFORM_ID, DestroyRef, effect, InjectionToken, ElementRef, afterNextRender, NgZone, untracked, afterRenderEffect, TemplateRef, Directive, Injector,
|
|
3
|
-
import { DS_CONFIG, injectDsLocale, DS_INTL, resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';
|
|
2
|
+
import { inject, computed, signal, PLATFORM_ID, DestroyRef, effect, InjectionToken, ElementRef, afterNextRender, NgZone, untracked, afterRenderEffect, TemplateRef, Directive, Injector, input, booleanAttribute, numberAttribute, DOCUMENT } from '@angular/core';
|
|
3
|
+
import { DS_CONFIG, reportDevWarning, injectDsLocale, DS_INTL, resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';
|
|
4
4
|
import { isPlatformBrowser } from '@angular/common';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { NgForm, FormGroupDirective, NgControl } from '@angular/forms';
|
|
@@ -233,14 +233,20 @@ function elementWidth(host) {
|
|
|
233
233
|
if (!isPlatformBrowser(inject(PLATFORM_ID))) {
|
|
234
234
|
return width.asReadonly();
|
|
235
235
|
}
|
|
236
|
-
|
|
236
|
+
inject(DestroyRef).onDestroy(watchElementWidth(host.nativeElement, width));
|
|
237
|
+
return width.asReadonly();
|
|
238
|
+
}
|
|
239
|
+
/** Writes `element`'s rounded content width into `width` on every change, through the one observer
|
|
240
|
+
* every chart shares. Returns the call that stops it.
|
|
241
|
+
*
|
|
242
|
+
* @internal */
|
|
243
|
+
function watchElementWidth(element, width) {
|
|
237
244
|
widths.set(element, width);
|
|
238
245
|
sharedObserver().observe(element);
|
|
239
|
-
|
|
246
|
+
return () => {
|
|
240
247
|
sharedObserver().unobserve(element);
|
|
241
248
|
widths.delete(element);
|
|
242
|
-
}
|
|
243
|
-
return width.asReadonly();
|
|
249
|
+
};
|
|
244
250
|
}
|
|
245
251
|
/** `read(host)` as a signal, re-read whenever the host's width changes, so a geometry token re-pointed
|
|
246
252
|
* at a breakpoint reaches the chart. `initial` until the host is laid out, and under SSR.
|
|
@@ -1422,8 +1428,8 @@ function textFor(errors, messages) {
|
|
|
1422
1428
|
return text;
|
|
1423
1429
|
}
|
|
1424
1430
|
}
|
|
1425
|
-
if (
|
|
1426
|
-
|
|
1431
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
1432
|
+
reportDevWarning(`[ds-field] The control is invalid but no message could be resolved for ${errors
|
|
1427
1433
|
.map((error) => `"${error.kind}"`)
|
|
1428
1434
|
.join(', ')}, so the field paints the state with NO message under it. Give the validator a message — required(path, { message: '…' }) or { myError: 'text' } — or map the kind in provideDsConfig({ field: { errorMessages: … } }).`);
|
|
1429
1435
|
}
|
|
@@ -2311,7 +2317,9 @@ class ProjectionDroppedDirective {
|
|
|
2311
2317
|
const selector = this.dsProjectionDropped();
|
|
2312
2318
|
const reason = this.reason() ||
|
|
2313
2319
|
`the caption comes from the [label] input only, so \`<${selector}>Some text</${selector}>\` shows no caption at all. Move the text into [label].`;
|
|
2314
|
-
|
|
2320
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
2321
|
+
reportDevWarning(`[${selector}] Projected content renders nothing — ${reason}`);
|
|
2322
|
+
}
|
|
2315
2323
|
});
|
|
2316
2324
|
}
|
|
2317
2325
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ProjectionDroppedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -2398,5 +2406,5 @@ function createTypeAhead() {
|
|
|
2398
2406
|
* Generated bundle index. Do not edit.
|
|
2399
2407
|
*/
|
|
2400
2408
|
|
|
2401
|
-
export { CHART_HEAT_COLORS, CHART_HOVER_DELAY_MS, CHART_RAMP_COLORS, CHART_RENDER_GATE_PASSED, CHART_SERIES_COLORS, CHART_TOOLTIP_LINGER_MS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChartBase, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chartDwell, chartRenderGate, chartValueFormat, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, formatWholePercent, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, linePath, lineSegments, linearScale, listenForMarkFocus, lttbDecimate, markAt, markOf, minMaxDecimate, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, readOnHostResize, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge };
|
|
2409
|
+
export { CHART_HEAT_COLORS, CHART_HOVER_DELAY_MS, CHART_RAMP_COLORS, CHART_RENDER_GATE_PASSED, CHART_SERIES_COLORS, CHART_TOOLTIP_LINGER_MS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChartBase, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chartDwell, chartRenderGate, chartValueFormat, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, formatWholePercent, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, linePath, lineSegments, linearScale, listenForMarkFocus, lttbDecimate, markAt, markOf, minMaxDecimate, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, readOnHostResize, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge, watchElementWidth };
|
|
2402
2410
|
//# sourceMappingURL=ids-group-ltd-ids-design-system-components.mjs.map
|