@ids-group-ltd/ids-design-system 0.11.2 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +119 -2
- package/components.md +27 -12
- package/design-system.md +135 -1
- package/docs/agent/INDEX.md +98 -0
- package/docs/agent/domain/ds-w3w.md +10 -0
- package/docs/agent/feedback/ds-alert.md +9 -0
- package/docs/agent/feedback/ds-avatar-group.md +7 -0
- package/docs/agent/feedback/ds-avatar.md +6 -0
- package/docs/agent/feedback/ds-badge.md +7 -0
- package/docs/agent/feedback/ds-banner.md +10 -0
- package/docs/agent/feedback/ds-empty-state.md +7 -0
- package/docs/agent/feedback/ds-progress.md +7 -0
- package/docs/agent/feedback/ds-skeleton.md +6 -0
- package/docs/agent/feedback/ds-spinner.md +6 -0
- package/docs/agent/feedback/ds-stat.md +7 -0
- package/docs/agent/feedback/ds-status-dot.md +6 -0
- package/docs/agent/feedback/ds-tag.md +8 -0
- package/docs/agent/feedback/ds-toast.md +12 -0
- package/docs/agent/forms/ds-autocomplete.md +9 -0
- package/docs/agent/forms/ds-button.md +14 -0
- package/docs/agent/forms/ds-checkbox.md +6 -0
- package/docs/agent/forms/ds-date-picker.md +7 -0
- package/docs/agent/forms/ds-dropzone.md +10 -0
- package/docs/agent/forms/ds-icon-button.md +10 -0
- package/docs/agent/forms/ds-input.md +22 -0
- package/docs/agent/forms/ds-multi-select.md +6 -0
- package/docs/agent/forms/ds-number-stepper.md +8 -0
- package/docs/agent/forms/ds-radio.md +6 -0
- package/docs/agent/forms/ds-search.md +10 -0
- package/docs/agent/forms/ds-select.md +7 -0
- package/docs/agent/forms/ds-switch.md +6 -0
- package/docs/agent/forms/ds-textarea.md +9 -0
- package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +21 -0
- package/docs/agent/foundations/global-helper-classes.md +18 -0
- package/docs/agent/foundations/grid.md +35 -0
- package/docs/agent/foundations/tokens.md +47 -0
- package/docs/agent/navigation/ds-app-layout.md +10 -0
- package/docs/agent/navigation/ds-auth-layout.md +9 -0
- package/docs/agent/navigation/ds-breadcrumbs.md +7 -0
- package/docs/agent/navigation/ds-divider.md +9 -0
- package/docs/agent/navigation/ds-page-footer.md +7 -0
- package/docs/agent/navigation/ds-page-header.md +8 -0
- package/docs/agent/navigation/ds-pagination.md +7 -0
- package/docs/agent/navigation/ds-sidenav-group.md +8 -0
- package/docs/agent/navigation/ds-sidenav-item.md +9 -0
- package/docs/agent/navigation/ds-sidenav.md +9 -0
- package/docs/agent/navigation/ds-stepper.md +6 -0
- package/docs/agent/navigation/ds-tabs.md +9 -0
- package/docs/agent/navigation/ds-topbar.md +8 -0
- package/docs/agent/overlays/ds-bottom-sheet.md +9 -0
- package/docs/agent/overlays/ds-drawer.md +9 -0
- package/docs/agent/overlays/ds-menu.md +8 -0
- package/docs/agent/overlays/ds-modal-card.md +6 -0
- package/docs/agent/overlays/ds-modal.md +8 -0
- package/docs/agent/overlays/ds-popover.md +6 -0
- package/docs/agent/overlays/ds-tooltip.md +8 -0
- package/docs/agent/platform/breadcrumbs-service.md +30 -0
- package/docs/agent/platform/ds-config.md +60 -0
- package/docs/agent/platform/ds-icon-registry.md +23 -0
- package/docs/agent/platform/toast-service.md +19 -0
- package/docs/agent/surfaces/ds-accordion.md +8 -0
- package/docs/agent/surfaces/ds-card.md +10 -0
- package/docs/agent/tables/ds-table.md +15 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +262 -338
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.11.3.json +152 -0
- package/package.json +1 -1
- package/styles/_dropdown-overlay.scss +25 -32
- package/styles/_ds-color.scss +31 -12
- package/styles/_tokens-charts.scss +2 -3
- package/styles/_tokens.scss +158 -321
- package/themes/README.md +32 -1
- package/themes/_base-palette.scss +35 -76
- package/themes/_semantic.scss +5 -2
- package/types/ids-group-ltd-ids-design-system.d.ts +115 -190
|
@@ -21,17 +21,14 @@ const DS_CONFIG = new InjectionToken('DS_CONFIG', {
|
|
|
21
21
|
*
|
|
22
22
|
* providers: [provideDsConfig({ control: { size: 'sm' } })]
|
|
23
23
|
*
|
|
24
|
-
* Works at the app root, on a `Route`, or on a component/directive — the
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* Works at the app root, on a `Route`, or on a component/directive — the config
|
|
25
|
+
* resolves through the element-injector chain, so a subtree can differ from the
|
|
26
|
+
* app. Component inputs (e.g. `<ds-card padding="lg">`) still win.
|
|
27
27
|
*
|
|
28
|
-
* A nested call MERGES with the config above it
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* ONE call per injector, though: two in the SAME `providers` array both resolve
|
|
33
|
-
* their parent with `skipSelf`, so the later one wins and the earlier is silently
|
|
34
|
-
* lost. Merging happens across injector levels, not within one array.
|
|
28
|
+
* A nested call MERGES with the config above it section by section; only the keys
|
|
29
|
+
* you name are replaced. ONE call per injector, though: two in the SAME
|
|
30
|
+
* `providers` array both resolve their parent with `skipSelf`, so the later wins
|
|
31
|
+
* and the earlier is silently lost.
|
|
35
32
|
*/
|
|
36
33
|
function provideDsConfig(config) {
|
|
37
34
|
return { provide: DS_CONFIG, useFactory: () => inheritDsConfig(config) };
|
|
@@ -39,9 +36,9 @@ function provideDsConfig(config) {
|
|
|
39
36
|
/**
|
|
40
37
|
* The factory body behind `provideDsConfig`, exported so a directive can put the
|
|
41
38
|
* provider in its metadata as a plain object literal. Calling `provideDsConfig`
|
|
42
|
-
* there instead
|
|
43
|
-
* side-effectful and costs the consumer its tree-shaking (measured at +566 kB
|
|
44
|
-
* into the eager chunk).
|
|
39
|
+
* there instead runs at module-evaluation time, which makes the module
|
|
40
|
+
* side-effectful and costs the consumer its tree-shaking (measured at +566 kB
|
|
41
|
+
* moved into the eager chunk).
|
|
45
42
|
*
|
|
46
43
|
* Must be called from an injection context.
|
|
47
44
|
*/
|
|
@@ -1722,10 +1719,8 @@ function resolveBrandValue(value, key) {
|
|
|
1722
1719
|
* MFA — and the counterpart to `ds-app-layout`, which only ever covers the
|
|
1723
1720
|
* screens behind the login.
|
|
1724
1721
|
*
|
|
1725
|
-
*
|
|
1726
|
-
*
|
|
1727
|
-
* box: they nest a `100vh` wrapper inside a `100dvh` one and scroll a page whose
|
|
1728
|
-
* content fits. Here the host is the only one, and it also carries the safe-area
|
|
1722
|
+
* The host is the ONLY full-height box — nesting a `100vh` wrapper inside a
|
|
1723
|
+
* `100dvh` one scrolls a page whose content fits — and it carries the safe-area
|
|
1729
1724
|
* insets a notched phone in landscape needs.
|
|
1730
1725
|
*
|
|
1731
1726
|
* The brand row takes the same CONTRACT as `ds-sidenav` — a `brand` string gets a
|
|
@@ -1753,10 +1748,9 @@ function resolveBrandValue(value, key) {
|
|
|
1753
1748
|
class AuthLayoutComponent {
|
|
1754
1749
|
/** Wordmark beside the letter-mark tile. For a logo image/SVG, project it into
|
|
1755
1750
|
* the `[brand]` slot instead; for a two-tone wordmark use `[dsBrandName]`.
|
|
1756
|
-
* Unset falls back to `DS_CONFIG.brand.name
|
|
1757
|
-
*
|
|
1758
|
-
*
|
|
1759
|
-
* screen no brand row. */
|
|
1751
|
+
* Unset falls back to `DS_CONFIG.brand.name`. Each field resolves on its own, so
|
|
1752
|
+
* `brand=""` drops the wordmark but a `logoLetter` in the config still paints its
|
|
1753
|
+
* tile; clear both to give one screen no brand row. */
|
|
1760
1754
|
brand = input(null, ...(ngDevMode ? [{ debugName: "brand" }] : /* istanbul ignore next */ []));
|
|
1761
1755
|
/** Letter-mark glyph when it differs from the brand's first letter (e.g. an
|
|
1762
1756
|
* "A" tile beside the "MyAdmin" wordmark). Empty = first letter of `brand`;
|
|
@@ -1774,14 +1768,12 @@ class AuthLayoutComponent {
|
|
|
1774
1768
|
cardElevation = input('raised', ...(ngDevMode ? [{ debugName: "cardElevation" }] : /* istanbul ignore next */ []));
|
|
1775
1769
|
/** Card padding, passed through to `ds-card`. `md` tightens a short form. */
|
|
1776
1770
|
cardPadding = input('lg', ...(ngDevMode ? [{ debugName: "cardPadding" }] : /* istanbul ignore next */ []));
|
|
1777
|
-
/** Announce the card as the page's `main` landmark.
|
|
1778
|
-
*
|
|
1779
|
-
*
|
|
1780
|
-
*
|
|
1781
|
-
*
|
|
1782
|
-
* own violation. */
|
|
1771
|
+
/** Announce the card as the page's `main` landmark. `ds-card` renders an
|
|
1772
|
+
* `<article>`, which is NOT a landmark, so by default a screen-reader user has
|
|
1773
|
+
* nothing to jump to — set `'main'` on a standalone auth page. Opt-in because
|
|
1774
|
+
* the layout is also embedded inside pages that already own a `main`, and two
|
|
1775
|
+
* `main`s is its own violation. */
|
|
1783
1776
|
landmark = input('none', ...(ngDevMode ? [{ debugName: "landmark" }] : /* istanbul ignore next */ []));
|
|
1784
|
-
/** Projected `[dsBrandName]` wordmark markup, when the consumer provides one. */
|
|
1785
1777
|
brandNameRef = contentChild(BrandNameDirective, ...(ngDevMode ? [{ debugName: "brandNameRef" }] : /* istanbul ignore next */ []));
|
|
1786
1778
|
hasBrandName = computed(() => !!this.brandNameRef(), ...(ngDevMode ? [{ debugName: "hasBrandName" }] : /* istanbul ignore next */ []));
|
|
1787
1779
|
/** Spread, not `charAt(0)`: the latter indexes UTF-16 code UNITS, so a brand
|
|
@@ -1796,16 +1788,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
1796
1788
|
args: [{ selector: 'ds-auth-layout', standalone: true, imports: [CardComponent], encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"auth\">\n <header class=\"masthead\">\n <div class=\"brand\">\n <ng-content select=\"[brand]\"></ng-content>\n\n @if (letterGlyph() || brandName()) {\n <span\n class=\"mark\"\n aria-hidden=\"true\"\n >\n {{ markGlyph() }}\n </span>\n }\n\n @if (brandName() || hasBrandName()) {\n <span class=\"brand-name\">\n @if (hasBrandName()) {\n <ng-content select=\"[dsBrandName]\"></ng-content>\n } @else {\n {{ brandName() }}\n }\n </span>\n }\n </div>\n\n @if (taglineText()) {\n <p class=\"tagline\">\n {{ taglineText() }}\n </p>\n }\n </header>\n\n <ds-card\n class=\"card\"\n [attr.role]=\"landmark() === 'main' ? 'main' : null\"\n [elevation]=\"cardElevation()\"\n [padding]=\"cardPadding()\"\n >\n <ng-content></ng-content>\n </ds-card>\n\n <footer class=\"support\">\n <ng-content select=\"[dsAuthSupport]\"></ng-content>\n </footer>\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_auth-min-height: var(--ds-auth-layout-min-height, 100dvh);--_auth-bg-color: var(--ds-auth-layout-bg-color, var(--surface-canvas));--_auth-gap: var(--ds-auth-layout-gap, clamp(var(--space-4), 4svh, var(--space-8)));--_auth-pad-block: var(--ds-auth-layout-pad-block, clamp(var(--space-4), 5svh, var(--space-10)));--_auth-mark-size: var(--ds-auth-layout-mark-size, clamp(var(--space-6), 4svh, var(--space-8)));--_auth-mark-radius: var(--ds-auth-layout-mark-radius, var(--ds-radius-control));--_auth-card-max-width: var(--ds-auth-layout-card-max-width, var(--auth-card-w));--_auth-mark-bg-color: var(--ds-auth-layout-mark-bg-color, var(--accent));--_auth-mark-label-color: var(--ds-auth-layout-mark-label-color, var(--accent-on));box-sizing:border-box;display:flex;min-height:var(--_auth-min-height);background-color:var(--_auth-bg-color);padding-block:calc(var(--_auth-pad-block) + env(safe-area-inset-top,0px)) calc(var(--_auth-pad-block) + env(safe-area-inset-bottom,0px));padding-left:calc(var(--space-4) + env(safe-area-inset-left,0px));padding-right:calc(var(--space-4) + env(safe-area-inset-right,0px))}.auth{display:flex;flex-direction:column;align-items:center;gap:var(--_auth-gap);margin:auto;width:100%;max-width:var(--_auth-card-max-width)}.masthead{display:flex;flex-direction:column;align-items:center;gap:clamp(var(--space-1),1svh,var(--space-2))}.masthead:has(>.brand:not(:has(*))):not(:has(>.tagline)){display:none}.brand{display:inline-flex;align-items:center;gap:var(--space-2)}.brand:not(:has(*)){display:none}.brand ::ng-deep>[brand]{max-height:var(--ds-auth-layout-brand-max-height, none)}.mark{display:grid;place-items:center;width:var(--_auth-mark-size);height:var(--_auth-mark-size);flex-shrink:0;border-radius:var(--_auth-mark-radius);background-color:var(--_auth-mark-bg-color);color:var(--_auth-mark-label-color);font:var(--font-weight-bold) var(--font-size-m)/1 var(--font-sans)}.brand-name{font:var(--font-weight-extrabold) var(--font-size-h4)/var(--line-height-snug) var(--font-sans);color:var(--text-primary)}.tagline{margin:0;color:var(--text-secondary);font-size:var(--font-size-s);text-align:center}.card{width:100%}.support{color:var(--text-tertiary);font-size:var(--font-size-xs);text-align:center}.support:empty{display:none}\n"] }]
|
|
1797
1789
|
}], propDecorators: { brand: [{ type: i0.Input, args: [{ isSignal: true, alias: "brand", required: false }] }], logoLetter: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoLetter", required: false }] }], tagline: [{ type: i0.Input, args: [{ isSignal: true, alias: "tagline", required: false }] }], cardElevation: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardElevation", required: false }] }], cardPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardPadding", required: false }] }], landmark: [{ type: i0.Input, args: [{ isSignal: true, alias: "landmark", required: false }] }], brandNameRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BrandNameDirective), { isSignal: true }] }] } });
|
|
1798
1790
|
|
|
1799
|
-
/**
|
|
1800
|
-
*
|
|
1801
|
-
* tokens the component names for itself.
|
|
1802
|
-
*
|
|
1803
|
-
* A pane lives under `<body>`, so nothing page- or component-scoped reaches it:
|
|
1804
|
-
* a consumer who squared `--ds-radius-panel` got a square app with round
|
|
1805
|
-
* dropdowns, and the only fix was re-declaring the roles on `.ds-overlay-pane`
|
|
1806
|
-
* globally — a recipe every rebranding consumer had to rediscover. Roles belong
|
|
1807
|
-
* with the motion tokens, which have always travelled this way.
|
|
1808
|
-
*/
|
|
1791
|
+
/** The theme's role layer, forwarded onto every portaled pane alongside whatever
|
|
1792
|
+
* tokens the component names for itself. */
|
|
1809
1793
|
const ROLE_TOKENS = [
|
|
1810
1794
|
'--ds-radius-inner',
|
|
1811
1795
|
'--ds-radius-control',
|
|
@@ -1825,26 +1809,14 @@ const OVERLAY_MOTION_TOKENS = [
|
|
|
1825
1809
|
'--ds-overlay-enter-offset',
|
|
1826
1810
|
'--ds-overlay-enter-scale',
|
|
1827
1811
|
];
|
|
1828
|
-
/**
|
|
1829
|
-
*
|
|
1830
|
-
* class, so every connected picker needs it and none of them needs it differently. */
|
|
1812
|
+
/** Styles `dropdownOverlay()`'s default panel class, so every connected picker
|
|
1813
|
+
* gets it whether or not it names panel tokens of its own. */
|
|
1831
1814
|
const DROPDOWN_PANEL_TOKENS = ['--ds-dropdown-panel-radius'];
|
|
1832
|
-
// Breathing room between a trigger and its panel. Negative when the panel flips
|
|
1833
|
-
// above, so the gap reads the same from either side.
|
|
1834
1815
|
const DROPDOWN_GAP = 4;
|
|
1835
1816
|
/**
|
|
1836
|
-
* The geometry every DS dropdown shares
|
|
1837
|
-
*
|
|
1838
|
-
*
|
|
1839
|
-
*
|
|
1840
|
-
* `select`, `multi-select` and `autocomplete` each carried a byte-identical copy
|
|
1841
|
-
* of this, which meant three places to change and three chances to drift. Width
|
|
1842
|
-
* is deliberately NOT set here — each caller has its own policy (exact trigger
|
|
1843
|
-
* width, or the trigger as a floor) and that is a real difference, not
|
|
1844
|
-
* duplication.
|
|
1845
|
-
*
|
|
1846
|
-
* Returns the strategy alongside the config because `prepareOverlayEnter` needs
|
|
1847
|
-
* the strategy itself, not just the config that holds it.
|
|
1817
|
+
* The geometry every DS dropdown shares. Width is deliberately NOT set here —
|
|
1818
|
+
* each caller has its own policy (the exact trigger width, or the trigger as a
|
|
1819
|
+
* floor).
|
|
1848
1820
|
*/
|
|
1849
1821
|
function dropdownOverlay(overlay, trigger, panelClass = ['ds-dropdown-panel', 'ds-overlay-pane']) {
|
|
1850
1822
|
const positionStrategy = overlay
|
|
@@ -1884,25 +1856,12 @@ function dropdownOverlay(overlay, trigger, panelClass = ['ds-dropdown-panel', 'd
|
|
|
1884
1856
|
const LEAVE_TIMEOUT_MS = 400;
|
|
1885
1857
|
/**
|
|
1886
1858
|
* Close a DS overlay panel — instantly on a `'select'`, with a short fade on a
|
|
1887
|
-
* `'dismiss'`.
|
|
1888
|
-
*
|
|
1889
|
-
*
|
|
1890
|
-
* cut, because ~120ms of fade after picking an option reads as the
|
|
1891
|
-
* panel lagging behind a decision the user has already made. A dismissal is the
|
|
1892
|
-
* opposite: nothing was chosen, so the fade reads as the panel backing out rather
|
|
1893
|
-
* than as delay. Defaults to `'select'`, so a call site that says nothing keeps
|
|
1894
|
-
* closing instantly.
|
|
1895
|
-
*
|
|
1896
|
-
* Applied in each panel's `close()`:
|
|
1897
|
-
* - select, autocomplete, multi-select, date-picker, time-picker, color-picker,
|
|
1898
|
-
* popover — each passing `'dismiss'` from its Escape / outside-press / scroll
|
|
1899
|
-
* paths and nothing from its selection paths.
|
|
1859
|
+
* `'dismiss'`. A fade after a deliberate pick reads as the panel lagging behind a
|
|
1860
|
+
* decision already made; on a dismissal nothing was chosen, so the same fade reads
|
|
1861
|
+
* as the panel backing out.
|
|
1900
1862
|
*
|
|
1901
|
-
* NOTE:
|
|
1902
|
-
*
|
|
1903
|
-
* would leave a panel floating over the next screen. `ModalService` likewise
|
|
1904
|
-
* disposes directly: a modal's leave belongs to its own scrim-and-card animation,
|
|
1905
|
-
* not to this panel fade.
|
|
1863
|
+
* NOTE: teardown paths dispose directly instead — a destroyed host has no time to
|
|
1864
|
+
* animate, and `ModalService` owns its own scrim-and-card leave.
|
|
1906
1865
|
*/
|
|
1907
1866
|
function disposeWithLeave(overlayRef, cause = 'select') {
|
|
1908
1867
|
if (!overlayRef) {
|
|
@@ -1936,13 +1895,11 @@ function disposeWithLeave(overlayRef, cause = 'select') {
|
|
|
1936
1895
|
}
|
|
1937
1896
|
/**
|
|
1938
1897
|
* Forward a portaled panel's public `--ds-*` override tokens from the component
|
|
1939
|
-
* host onto the overlay pane. The
|
|
1940
|
-
*
|
|
1941
|
-
*
|
|
1942
|
-
*
|
|
1943
|
-
*
|
|
1944
|
-
* fall through to the panel's own `var(--ds-*, <default>)` fallback. Call once
|
|
1945
|
-
* per open, right after `overlay.create()`.
|
|
1898
|
+
* host onto the overlay pane. The pane is portaled into `document.body`, outside
|
|
1899
|
+
* `:host`, so custom properties a consumer sets via `ds-x { … }` never inherit
|
|
1900
|
+
* down to it. Only non-empty values are set, so an unset token still falls
|
|
1901
|
+
* through to the panel's own `var(--ds-*, <default>)`. Call once per open, right
|
|
1902
|
+
* after `overlay.create()`.
|
|
1946
1903
|
*/
|
|
1947
1904
|
function forwardOverlayTokens(overlayRef, host, tokens) {
|
|
1948
1905
|
const hostStyle = getComputedStyle(host);
|
|
@@ -1980,13 +1937,10 @@ function overlayPlacementOf(overlayY, overlayX) {
|
|
|
1980
1937
|
return 'left';
|
|
1981
1938
|
}
|
|
1982
1939
|
/**
|
|
1983
|
-
* Prime a `ds-overlay-pane` for its enter animation
|
|
1984
|
-
*
|
|
1985
|
-
*
|
|
1986
|
-
*
|
|
1987
|
-
* `afterNextRender`, so the stamp still lands before the first painted frame.
|
|
1988
|
-
* Until it does (or with no strategy passed) the CSS default applies: entering
|
|
1989
|
-
* from above, i.e. today's behaviour for a panel below its trigger.
|
|
1940
|
+
* Prime a `ds-overlay-pane` for its enter animation. Call right after
|
|
1941
|
+
* `overlay.create()` — CDK applies the position in `afterNextRender`, so the
|
|
1942
|
+
* placement stamp still lands before the first painted frame. Until it does (or
|
|
1943
|
+
* with no strategy passed) the CSS default applies: entering from above.
|
|
1990
1944
|
*
|
|
1991
1945
|
* The subscription needs no teardown — disposing the overlay disposes the
|
|
1992
1946
|
* strategy, which completes `positionChanges`.
|
|
@@ -2014,8 +1968,7 @@ function closeOnOutsidePointer(overlayRef, isInsideTrigger, close) {
|
|
|
2014
1968
|
* observe `window` + registered `cdkScrollable`s, so they miss a plain
|
|
2015
1969
|
* `overflow:auto` container (e.g. an app's scrolling `<main>`); this listens on
|
|
2016
1970
|
* the document in the CAPTURE phase, which catches the non-bubbling `scroll`
|
|
2017
|
-
* event from ANY nested container. A scroll inside the panel itself is ignored.
|
|
2018
|
-
* Returns a teardown to remove the listener. */
|
|
1971
|
+
* event from ANY nested container. A scroll inside the panel itself is ignored. */
|
|
2019
1972
|
function closeOnScroll(overlayRef, close) {
|
|
2020
1973
|
const onScroll = (event) => {
|
|
2021
1974
|
const target = event.target;
|
|
@@ -2036,13 +1989,11 @@ function closeOnScroll(overlayRef, close) {
|
|
|
2036
1989
|
doc.addEventListener('scroll', onScroll, true);
|
|
2037
1990
|
return () => doc.removeEventListener('scroll', onScroll, true);
|
|
2038
1991
|
}
|
|
2039
|
-
/** True when keyboard focus currently sits inside the overlay pane. Read
|
|
2040
|
-
* BEFORE disposing
|
|
2041
|
-
*
|
|
2042
|
-
*
|
|
2043
|
-
*
|
|
2044
|
-
* (mousedown moved it out of the pane first), so this returns false there and
|
|
2045
|
-
* focus is correctly left alone. */
|
|
1992
|
+
/** True when keyboard focus currently sits inside the overlay pane. Read it
|
|
1993
|
+
* BEFORE disposing, to decide whether the close has to refocus the trigger
|
|
1994
|
+
* rather than strand focus on `<body>`. An outside-pointer close leaves focus on
|
|
1995
|
+
* the clicked element (mousedown moved it out of the pane first), so this
|
|
1996
|
+
* returns false there and focus is correctly left alone. */
|
|
2046
1997
|
function focusIsInside(overlayRef) {
|
|
2047
1998
|
const doc = overlayRef.overlayElement.ownerDocument;
|
|
2048
1999
|
return overlayRef.overlayElement.contains(doc.activeElement);
|
|
@@ -2300,9 +2251,7 @@ function buildPositions(placement, align, offsetPx) {
|
|
|
2300
2251
|
* It is NOT projection support: the probe exists so the warning can see that
|
|
2301
2252
|
* content arrived, and then hides it.
|
|
2302
2253
|
*
|
|
2303
|
-
* `ds-filter-bar` is the only host today.
|
|
2304
|
-
* this exists, and is not any more — `ds-checkbox`, `ds-radio` and `ds-switch`
|
|
2305
|
-
* render a projected caption since 0.8.0 and dropped the probe with that release.
|
|
2254
|
+
* `ds-filter-bar` is the only host today.
|
|
2306
2255
|
*
|
|
2307
2256
|
* `reason` replaces the default `[label]` wording for a host that drops content
|
|
2308
2257
|
* for a different reason — `ds-filter-bar` drops anything that carries neither of
|
|
@@ -4390,8 +4339,7 @@ class SelectComponent extends DsControlValueAccessor {
|
|
|
4390
4339
|
/** Flat options or option groups rendered in the dropdown panel. */
|
|
4391
4340
|
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
4392
4341
|
/** Public panel tokens forwarded onto the portaled overlay pane on open, so a
|
|
4393
|
-
* consumer's `ds-select { --ds-dropdown-panel-*: … }` reaches it.
|
|
4394
|
-
* tokens can only be set globally: the pane is portaled out of this component. */
|
|
4342
|
+
* consumer's `ds-select { --ds-dropdown-panel-*: … }` reaches it. */
|
|
4395
4343
|
panelTokens = [
|
|
4396
4344
|
'--ds-dropdown-panel-bg-color',
|
|
4397
4345
|
'--ds-dropdown-panel-minw',
|
|
@@ -4435,8 +4383,6 @@ class SelectComponent extends DsControlValueAccessor {
|
|
|
4435
4383
|
* by NAME — a `readonly()` rule was reaching nothing before this existed.
|
|
4436
4384
|
*/
|
|
4437
4385
|
readonlyBinding = input(false, { ...(ngDevMode ? { debugName: "readonlyBinding" } : /* istanbul ignore next */ {}),
|
|
4438
|
-
// The alias IS the point: signal forms binds by name, and the contract
|
|
4439
|
-
// spells it `readonly` where the DS spells it `readOnly`.
|
|
4440
4386
|
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
4441
4387
|
alias: 'readonly',
|
|
4442
4388
|
transform: booleanAttribute });
|
|
@@ -4486,7 +4432,6 @@ class SelectComponent extends DsControlValueAccessor {
|
|
|
4486
4432
|
return this.open() && index >= 0 ? this.optionId(index) : null;
|
|
4487
4433
|
}, ...(ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []));
|
|
4488
4434
|
resolvedAriaLabel = computed(() => this.label() ? null : this.ariaLabel() || this.placeholder() || null, ...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
4489
|
-
/** Effective disabled — own `disabled` input OR the reactive-forms state. */
|
|
4490
4435
|
isDisabled = computed(() => this.disabled() || this.formDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
4491
4436
|
trigger = viewChild.required('trigger');
|
|
4492
4437
|
panelTpl = viewChild.required('panel');
|
|
@@ -4494,9 +4439,8 @@ class SelectComponent extends DsControlValueAccessor {
|
|
|
4494
4439
|
open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
4495
4440
|
activeIndex = signal(-1, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
4496
4441
|
overlayRef = null;
|
|
4497
|
-
//
|
|
4498
|
-
//
|
|
4499
|
-
// group-level disable. Index of an entry here corresponds to `activeIndex`.
|
|
4442
|
+
// An entry's index here IS `activeIndex` — group headers are not entries, so
|
|
4443
|
+
// keyboard nav never lands on one.
|
|
4500
4444
|
flatOptions = computed(() => {
|
|
4501
4445
|
const out = [];
|
|
4502
4446
|
for (const item of this.options()) {
|
|
@@ -4558,8 +4502,6 @@ class SelectComponent extends DsControlValueAccessor {
|
|
|
4558
4502
|
isOptionGroup(item) {
|
|
4559
4503
|
return isSelectOptionGroup(item);
|
|
4560
4504
|
}
|
|
4561
|
-
// Resolve the flat-index for a given option so click/hover/selection
|
|
4562
|
-
// map back to the same indices keyboard nav uses (no double bookkeeping).
|
|
4563
4505
|
flatIndexOf(opt) {
|
|
4564
4506
|
return this.flatOptions().findIndex(({ option }) => option === opt);
|
|
4565
4507
|
}
|
|
@@ -4593,8 +4535,6 @@ class SelectComponent extends DsControlValueAccessor {
|
|
|
4593
4535
|
prepareOverlayEnter(this.overlayRef, this.host.nativeElement, positionStrategy);
|
|
4594
4536
|
forwardOverlayTokens(this.overlayRef, this.host.nativeElement, this.panelTokens);
|
|
4595
4537
|
closeOnOutsidePointer(this.overlayRef, (target) => this.trigger().nativeElement.contains(target), () => this.close('dismiss'));
|
|
4596
|
-
// No backdrop catches a page scroll and CDK's scroll strategies miss a plain
|
|
4597
|
-
// overflow container, so close on any outside scroll ourselves.
|
|
4598
4538
|
const removeScrollClose = closeOnScroll(this.overlayRef, () => this.close('dismiss'));
|
|
4599
4539
|
const detaching = this.overlayRef;
|
|
4600
4540
|
this.overlayRef.detachments().subscribe(() => {
|
|
@@ -4619,8 +4559,6 @@ class SelectComponent extends DsControlValueAccessor {
|
|
|
4619
4559
|
this.markTouched();
|
|
4620
4560
|
}
|
|
4621
4561
|
ngOnDestroy() {
|
|
4622
|
-
// Host torn down while open → close() never runs. Dispose the overlay so
|
|
4623
|
-
// its pane and event subscriptions don't leak.
|
|
4624
4562
|
this.overlayRef?.dispose();
|
|
4625
4563
|
this.overlayRef = null;
|
|
4626
4564
|
}
|
|
@@ -4639,9 +4577,7 @@ class SelectComponent extends DsControlValueAccessor {
|
|
|
4639
4577
|
}
|
|
4640
4578
|
/**
|
|
4641
4579
|
* Empties the selection from outside — a "reset filters" button, a form the app
|
|
4642
|
-
* clears itself.
|
|
4643
|
-
* in-trigger button, so an app with its own reset had to write the empty value
|
|
4644
|
-
* by hand and guess what "empty" is for this control.
|
|
4580
|
+
* clears itself.
|
|
4645
4581
|
*
|
|
4646
4582
|
* Deliberately does NOT move focus: the caller may be navigating away, and
|
|
4647
4583
|
* stealing focus back into a field they just left is worse than leaving it.
|
|
@@ -5555,8 +5491,7 @@ function sortableOf(value) {
|
|
|
5555
5491
|
}
|
|
5556
5492
|
return value;
|
|
5557
5493
|
}
|
|
5558
|
-
/** Both sides are known non-blank here.
|
|
5559
|
-
* anything else falls back to text, where `numeric: true` keeps "item 10" after
|
|
5494
|
+
/** Both sides are known non-blank here. `numeric: true` keeps "item 10" after
|
|
5560
5495
|
* "item 9" instead of before it. */
|
|
5561
5496
|
function compareSortValues(first, second) {
|
|
5562
5497
|
if (first instanceof Date && second instanceof Date) {
|
|
@@ -5571,8 +5506,7 @@ function compareSortValues(first, second) {
|
|
|
5571
5506
|
return Number(firstText) - Number(secondText);
|
|
5572
5507
|
}
|
|
5573
5508
|
// `sensitivity: 'base'` so "Ångström" sorts next to "Angstrom" and casing does
|
|
5574
|
-
// not split a column into two runs
|
|
5575
|
-
// reorders when an app moves off its own comparator onto this one.
|
|
5509
|
+
// not split a column into two runs.
|
|
5576
5510
|
return firstText.localeCompare(secondText, undefined, {
|
|
5577
5511
|
numeric: true,
|
|
5578
5512
|
sensitivity: 'base',
|
|
@@ -5902,8 +5836,6 @@ class TableComponent {
|
|
|
5902
5836
|
new Set(this.columns()
|
|
5903
5837
|
.filter((col) => col.hidden)
|
|
5904
5838
|
.map((col) => col.key)), ...(ngDevMode ? [{ debugName: "effectiveHiddenKeys" }] : /* istanbul ignore next */ []));
|
|
5905
|
-
/** Columns in the user-controlled order — `columnOrder` first (dropping
|
|
5906
|
-
* unknown keys), then any declared column the order omitted. */
|
|
5907
5839
|
orderedColumns = computed(() => {
|
|
5908
5840
|
const order = this.columnOrder();
|
|
5909
5841
|
const columns = this.columns();
|
|
@@ -5927,12 +5859,9 @@ class TableComponent {
|
|
|
5927
5859
|
}
|
|
5928
5860
|
return out;
|
|
5929
5861
|
}, ...(ngDevMode ? [{ debugName: "orderedColumns" }] : /* istanbul ignore next */ []));
|
|
5930
|
-
/** Columns actually rendered — reordered, then hidden ones skipped. */
|
|
5931
5862
|
visibleColumns = computed(() => this.orderedColumns().filter((col) => !this.effectiveHiddenKeys().has(col.key)), ...(ngDevMode ? [{ debugName: "visibleColumns" }] : /* istanbul ignore next */ []));
|
|
5932
|
-
/** Columns the user may toggle — drives the header column picker. */
|
|
5933
5863
|
hideableColumns = computed(() => this.columns().filter((col) => col.hideable), ...(ngDevMode ? [{ debugName: "hideableColumns" }] : /* istanbul ignore next */ []));
|
|
5934
5864
|
hasColumnPicker = computed(() => this.hideableColumns().length > 0 || this.reorderableColumns(), ...(ngDevMode ? [{ debugName: "hasColumnPicker" }] : /* istanbul ignore next */ []));
|
|
5935
|
-
/** The trailing utility column hosts the picker button and/or row kebabs. */
|
|
5936
5865
|
hasUtilityColumn = computed(() => this.hasRowActions() || this.hasColumnPicker(), ...(ngDevMode ? [{ debugName: "hasUtilityColumn" }] : /* istanbul ignore next */ []));
|
|
5937
5866
|
isColumnVisible(col) {
|
|
5938
5867
|
return !this.effectiveHiddenKeys().has(col.key);
|
|
@@ -5986,19 +5915,15 @@ class TableComponent {
|
|
|
5986
5915
|
}
|
|
5987
5916
|
return map;
|
|
5988
5917
|
}, ...(ngDevMode ? [{ debugName: "headerFilterByKey" }] : /* istanbul ignore next */ []));
|
|
5989
|
-
/** The projected filter for a column, when the host supplied one. */
|
|
5990
5918
|
headerFilterFor(col) {
|
|
5991
5919
|
return this.headerFilterByKey().get(col.key);
|
|
5992
5920
|
}
|
|
5993
|
-
/** A projected filter makes the column filterable on its own — the host does
|
|
5994
|
-
* not also have to mark it `filter: 'set'` to get the header button. */
|
|
5995
5921
|
hasColumnFilter(col) {
|
|
5996
5922
|
if (this.filterModeResolved() === 'none') {
|
|
5997
5923
|
return false;
|
|
5998
5924
|
}
|
|
5999
5925
|
return col.filter === 'set' || !!this.headerFilterFor(col);
|
|
6000
5926
|
}
|
|
6001
|
-
/** A column is "actively filtered" when at least one of its values is unchecked. */
|
|
6002
5927
|
isColumnFiltered(col) {
|
|
6003
5928
|
// A projected filter owns its own criterion, so only the host can say
|
|
6004
5929
|
// whether it is set; the table still draws the highlight.
|
|
@@ -6009,7 +5934,6 @@ class TableComponent {
|
|
|
6009
5934
|
const allowed = this.columnFilters().get(col.key);
|
|
6010
5935
|
return !!allowed && allowed.size < this.optionsFor(col).length;
|
|
6011
5936
|
}
|
|
6012
|
-
/** The checklist's domain: what the host declared, else what is in hand. */
|
|
6013
5937
|
optionsFor(col) {
|
|
6014
5938
|
const supplied = this.columnFilterOptions().get(col.key);
|
|
6015
5939
|
if (supplied) {
|
|
@@ -6021,7 +5945,6 @@ class TableComponent {
|
|
|
6021
5945
|
}
|
|
6022
5946
|
return [...seen].sort((a, b) => a.localeCompare(b));
|
|
6023
5947
|
}
|
|
6024
|
-
/** Distinct values of the open column, narrowed by the popover search box. */
|
|
6025
5948
|
filterValues = computed(() => {
|
|
6026
5949
|
const col = this.filterColumn();
|
|
6027
5950
|
if (!col) {
|
|
@@ -6081,8 +6004,6 @@ class TableComponent {
|
|
|
6081
6004
|
}
|
|
6082
6005
|
this.columnFilters.set(next);
|
|
6083
6006
|
}
|
|
6084
|
-
/** Context handed to a projected header filter. Rebuilt per open, which is
|
|
6085
|
-
* cheap and keeps `close` bound to the popover that is actually showing. */
|
|
6086
6007
|
headerFilterContext(col) {
|
|
6087
6008
|
return {
|
|
6088
6009
|
$implicit: col,
|
|
@@ -6139,9 +6060,8 @@ class TableComponent {
|
|
|
6139
6060
|
static RESIZE_PAGE = 64;
|
|
6140
6061
|
static MIN_COLUMN_WIDTH = 48;
|
|
6141
6062
|
resizeState = null;
|
|
6142
|
-
/**
|
|
6143
|
-
*
|
|
6144
|
-
* class instead, see `fitsContent`. */
|
|
6063
|
+
/** `'content'` is not a pixel value — it is carried by a class instead, see
|
|
6064
|
+
* `fitsContent`. */
|
|
6145
6065
|
columnWidth(col) {
|
|
6146
6066
|
const dragged = this.columnWidths().get(col.key);
|
|
6147
6067
|
if (dragged !== undefined) {
|
|
@@ -6188,8 +6108,7 @@ class TableComponent {
|
|
|
6188
6108
|
* drag changes one column and leaves the others where they were — the
|
|
6189
6109
|
* auto-sized geometry is kept rather than lost at the first grab.
|
|
6190
6110
|
*
|
|
6191
|
-
*
|
|
6192
|
-
* it reads the header row that is actually on screen rather than assuming a
|
|
6111
|
+
* Reads the header row that is actually on screen rather than assuming a
|
|
6193
6112
|
* column order.
|
|
6194
6113
|
*/
|
|
6195
6114
|
lockMeasuredWidths(from) {
|
|
@@ -6273,9 +6192,6 @@ class TableComponent {
|
|
|
6273
6192
|
max: focused.max,
|
|
6274
6193
|
};
|
|
6275
6194
|
}
|
|
6276
|
-
/** Current rendered width for the keyboard resize path. Falls back to the DOM
|
|
6277
|
-
* when the column was auto-sized and has neither an override nor a declared
|
|
6278
|
-
* width. */
|
|
6279
6195
|
resolvedColumnWidth(col, from) {
|
|
6280
6196
|
const known = this.columnWidth(col);
|
|
6281
6197
|
if (known !== null) {
|
|
@@ -6283,12 +6199,6 @@ class TableComponent {
|
|
|
6283
6199
|
}
|
|
6284
6200
|
return from?.closest('th')?.offsetWidth ?? TableComponent.MIN_COLUMN_WIDTH;
|
|
6285
6201
|
}
|
|
6286
|
-
/**
|
|
6287
|
-
* Keyboard resizing. A drag handle that only answers to a pointer makes a
|
|
6288
|
-
* resizable column unusable without a mouse, which is an a11y gap rather than
|
|
6289
|
-
* a missing nicety — hence Arrow for fine steps, PageUp/PageDown for coarse
|
|
6290
|
-
* ones and Home to hand the column back to automatic sizing.
|
|
6291
|
-
*/
|
|
6292
6202
|
onResizeKey(col, event) {
|
|
6293
6203
|
const target = event.target;
|
|
6294
6204
|
const step = TableComponent.RESIZE_STEP;
|
|
@@ -6311,13 +6221,10 @@ class TableComponent {
|
|
|
6311
6221
|
this.stepColumnWidth(col, delta, target.closest('th'));
|
|
6312
6222
|
}
|
|
6313
6223
|
/**
|
|
6314
|
-
*
|
|
6315
|
-
*
|
|
6316
|
-
*
|
|
6317
|
-
*
|
|
6318
|
-
* passed when the caller has it — the panel does not, so it is looked up by
|
|
6319
|
-
* `data-col-key`, and the measurement matters: stepping an auto-sized column
|
|
6320
|
-
* has to start from what it currently RENDERS, not from the minimum.
|
|
6224
|
+
* The header cell is passed when the caller has it — the column panel does
|
|
6225
|
+
* not, so it is looked up by `data-col-key`, and the measurement matters:
|
|
6226
|
+
* stepping an auto-sized column has to start from what it currently RENDERS,
|
|
6227
|
+
* not from the minimum.
|
|
6321
6228
|
*/
|
|
6322
6229
|
stepColumnWidth(col, delta, from) {
|
|
6323
6230
|
const header = from ?? this.headerCellFor(col);
|
|
@@ -6341,9 +6248,6 @@ class TableComponent {
|
|
|
6341
6248
|
this.stepColumnWidth(col, delta, null);
|
|
6342
6249
|
}
|
|
6343
6250
|
resizeStep = TableComponent.RESIZE_STEP;
|
|
6344
|
-
/** Client-side filter over the full data set — combines the `filterQuery`
|
|
6345
|
-
* substring search with any per-column set filters. Sorting and pagination
|
|
6346
|
-
* run on the filtered rows. */
|
|
6347
6251
|
filteredData = computed(() => {
|
|
6348
6252
|
const query = this.filterQuery().trim().toLowerCase();
|
|
6349
6253
|
// In 'server' mode the host has already filtered; running the set filters
|
|
@@ -6372,7 +6276,6 @@ class TableComponent {
|
|
|
6372
6276
|
return activeSetFilters.every(({ col, allowed }) => allowed.has(this.cellValue(row, col)));
|
|
6373
6277
|
});
|
|
6374
6278
|
}, ...(ngDevMode ? [{ debugName: "filteredData" }] : /* istanbul ignore next */ []));
|
|
6375
|
-
/** Client-side sort over the filtered data set — only in `'client'` mode. */
|
|
6376
6279
|
sortedData = computed(() => {
|
|
6377
6280
|
const rows = this.filteredData();
|
|
6378
6281
|
if (this.sortModeResolved() !== 'client') {
|
|
@@ -6404,7 +6307,6 @@ class TableComponent {
|
|
|
6404
6307
|
return compareSortValues(aValue, bValue) * direction;
|
|
6405
6308
|
});
|
|
6406
6309
|
}, ...(ngDevMode ? [{ debugName: "sortedData" }] : /* istanbul ignore next */ []));
|
|
6407
|
-
/** Current page's slice of the sorted rows, when paginating. */
|
|
6408
6310
|
pagedData = computed(() => {
|
|
6409
6311
|
const size = this.pageSize();
|
|
6410
6312
|
// Server-side paging (`total` set): the host already sliced to one page.
|
|
@@ -6414,15 +6316,12 @@ class TableComponent {
|
|
|
6414
6316
|
const start = (this.page() - 1) * size;
|
|
6415
6317
|
return this.sortedData().slice(start, start + size);
|
|
6416
6318
|
}, ...(ngDevMode ? [{ debugName: "pagedData" }] : /* istanbul ignore next */ []));
|
|
6417
|
-
/**
|
|
6418
|
-
* Virtual mode windows this further; `rowSlots` is what the loop walks. */
|
|
6319
|
+
/** Virtual mode windows this further; `rowSlots` is what the loop walks. */
|
|
6419
6320
|
displayData = computed(() => this.pageSize() !== null ? this.pagedData() : this.sortedData(), ...(ngDevMode ? [{ debugName: "displayData" }] : /* istanbul ignore next */ []));
|
|
6420
6321
|
/**
|
|
6421
6322
|
* The single live-region line. Loading wins while it lasts — a sort
|
|
6422
6323
|
* announcement over rows that are being replaced tells the reader about a
|
|
6423
|
-
* state they cannot inspect yet.
|
|
6424
|
-
* row range, which are the two things a sighted user reads off the header and
|
|
6425
|
-
* the pager and a screen-reader user was told nothing about.
|
|
6324
|
+
* state they cannot inspect yet.
|
|
6426
6325
|
*
|
|
6427
6326
|
* `aria-live="polite"` does not announce a region's INITIAL content, so the
|
|
6428
6327
|
* unsorted first render is silent; only real changes speak.
|
|
@@ -6485,7 +6384,6 @@ class TableComponent {
|
|
|
6485
6384
|
virtualCount = computed(() => this.lazy()
|
|
6486
6385
|
? (this.total() ?? this.displayData().length)
|
|
6487
6386
|
: this.displayData().length, ...(ngDevMode ? [{ debugName: "virtualCount" }] : /* istanbul ignore next */ []));
|
|
6488
|
-
/** `null` when not virtualizing — the row loop then walks `displayData()` whole. */
|
|
6489
6387
|
virtualWindow = computed(() => {
|
|
6490
6388
|
if (!this.virtualizing()) {
|
|
6491
6389
|
return null;
|
|
@@ -6542,7 +6440,6 @@ class TableComponent {
|
|
|
6542
6440
|
const sel = this.selectedIds();
|
|
6543
6441
|
return data.some((row) => sel.has(this.rowKey(row))) && !this.allSelected();
|
|
6544
6442
|
}, ...(ngDevMode ? [{ debugName: "someSelected" }] : /* istanbul ignore next */ []));
|
|
6545
|
-
/** Select-all is page-scoped only when paginating. */
|
|
6546
6443
|
selectAllLabel = computed(() => this.pageSize() !== null
|
|
6547
6444
|
? 'Select all rows on this page'
|
|
6548
6445
|
: 'Select all rows', ...(ngDevMode ? [{ debugName: "selectAllLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -6562,8 +6459,6 @@ class TableComponent {
|
|
|
6562
6459
|
: `Expand all rows${scope}`;
|
|
6563
6460
|
}, ...(ngDevMode ? [{ debugName: "expandAllLabel" }] : /* istanbul ignore next */ []));
|
|
6564
6461
|
skeletonArray = computed(() => Array(this.skeletonRows()).fill(0), ...(ngDevMode ? [{ debugName: "skeletonArray" }] : /* istanbul ignore next */ []));
|
|
6565
|
-
/** Colspan of a full-width row (expansion panel, empty state): data cols +
|
|
6566
|
-
* optional select/expand/actions cols. */
|
|
6567
6462
|
expandedColspan = computed(() => {
|
|
6568
6463
|
let count = this.visibleColumns().length;
|
|
6569
6464
|
if (this.selectable()) {
|
|
@@ -6578,14 +6473,14 @@ class TableComponent {
|
|
|
6578
6473
|
return count;
|
|
6579
6474
|
}, ...(ngDevMode ? [{ debugName: "expandedColspan" }] : /* istanbul ignore next */ []));
|
|
6580
6475
|
hasRowActions = computed(() => this.rowActions().length > 0, ...(ngDevMode ? [{ debugName: "hasRowActions" }] : /* istanbul ignore next */ []));
|
|
6581
|
-
/** Row whose kebab menu is open — drives the per-row `disabled` predicates. */
|
|
6582
6476
|
menuRow = signal(null, ...(ngDevMode ? [{ debugName: "menuRow" }] : /* istanbul ignore next */ []));
|
|
6583
6477
|
rowMenuPopover = viewChild('rowMenuPopover', ...(ngDevMode ? [{ debugName: "rowMenuPopover" }] : /* istanbul ignore next */ []));
|
|
6584
6478
|
columnPickerPopover = viewChild('columnPickerPopover', ...(ngDevMode ? [{ debugName: "columnPickerPopover" }] : /* istanbul ignore next */ []));
|
|
6585
6479
|
columnSheetOpen = signal(false, ...(ngDevMode ? [{ debugName: "columnSheetOpen" }] : /* istanbul ignore next */ []));
|
|
6586
6480
|
coarsePointerState = signal(false, ...(ngDevMode ? [{ debugName: "coarsePointerState" }] : /* istanbul ignore next */ []));
|
|
6587
6481
|
/** Whether the column panel opens as a sheet and the drag handle stands down.
|
|
6588
|
-
* Keyed on the pointer, not the viewport — see
|
|
6482
|
+
* Keyed on the pointer, not the viewport — see the matching media query in
|
|
6483
|
+
* `table.component.scss`. */
|
|
6589
6484
|
coarsePointer = this.coarsePointerState.asReadonly();
|
|
6590
6485
|
columnPickerOpened = computed(() => this.coarsePointer()
|
|
6591
6486
|
? this.columnSheetOpen()
|
|
@@ -6600,8 +6495,6 @@ class TableComponent {
|
|
|
6600
6495
|
hasTruncate = computed(() => this.columns().some((col) => col.truncate), ...(ngDevMode ? [{ debugName: "hasTruncate" }] : /* istanbul ignore next */ []));
|
|
6601
6496
|
cellTextPopover = viewChild('cellTextPopover', ...(ngDevMode ? [{ debugName: "cellTextPopover" }] : /* istanbul ignore next */ []));
|
|
6602
6497
|
cellPopoverText = signal('', ...(ngDevMode ? [{ debugName: "cellPopoverText" }] : /* istanbul ignore next */ []));
|
|
6603
|
-
/** Click on a `truncate` cell: when the text is actually clipped, show the
|
|
6604
|
-
* full value in a popover; otherwise let the click fall through to the row. */
|
|
6605
6498
|
onCellClipClick(row, col, event) {
|
|
6606
6499
|
const element = event.currentTarget;
|
|
6607
6500
|
if (!TableComponent.isClipped(element)) {
|
|
@@ -6663,26 +6556,20 @@ class TableComponent {
|
|
|
6663
6556
|
}
|
|
6664
6557
|
this.saveLayout(key, order, widths, hidden);
|
|
6665
6558
|
});
|
|
6666
|
-
//
|
|
6667
|
-
//
|
|
6668
|
-
// unbound is how it says so — so that is where the reminder goes. Only when
|
|
6669
|
-
// the mode was never DECLARED.
|
|
6559
|
+
// A table holding ALL its rows is the exception, and `total` unbound is how
|
|
6560
|
+
// it says so — so that is where the reminder goes.
|
|
6670
6561
|
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
6671
6562
|
devWarn(() => this.sortMode() === null &&
|
|
6672
6563
|
this.total() === null &&
|
|
6673
6564
|
this.columns().some((col) => col.sortable)
|
|
6674
6565
|
? '[ds-table] sortable columns default to sortMode="server", so a header click only emits (sortChange) and the table reorders nothing itself. This table binds no `total`, which usually means it holds every row — declare sortMode="client" to sort them in place.'
|
|
6675
6566
|
: null);
|
|
6676
|
-
// Same trap one column over: a header filter defaults to the server too, so
|
|
6677
|
-
// the checklist tracks a selection and runs no local pass.
|
|
6678
6567
|
devWarn(() => this.filterMode() === null &&
|
|
6679
6568
|
this.total() === null &&
|
|
6680
6569
|
this.columns().some((col) => col.filter === 'set')
|
|
6681
6570
|
? '[ds-table] a header filter defaults to filterMode="server", so ticking a value only updates `columnFilters` and filters nothing locally. This table binds no `total`, which usually means it holds every row — declare filterMode="client" to filter them in place.'
|
|
6682
6571
|
: null);
|
|
6683
6572
|
}
|
|
6684
|
-
// Virtual mode's two measurements. Only wired while virtualizing, so a
|
|
6685
|
-
// normal table pays for neither the scroll listener nor the observer.
|
|
6686
6573
|
effect((onCleanup) => {
|
|
6687
6574
|
if (!this.virtualizing()) {
|
|
6688
6575
|
return;
|
|
@@ -6755,8 +6642,8 @@ class TableComponent {
|
|
|
6755
6642
|
? '[ds-table] virtualScroll with pageSize paginates a window of a page. Virtual scrolling is what pagination was for on a long list — pick one.'
|
|
6756
6643
|
: null);
|
|
6757
6644
|
}
|
|
6758
|
-
//
|
|
6759
|
-
//
|
|
6645
|
+
// Assigning an equal scrollLeft fires no scroll event, so the two mirrors
|
|
6646
|
+
// can't loop.
|
|
6760
6647
|
effect((onCleanup) => {
|
|
6761
6648
|
const proxy = this.hscrollProxy()?.nativeElement;
|
|
6762
6649
|
if (!proxy) {
|
|
@@ -6773,6 +6660,8 @@ class TableComponent {
|
|
|
6773
6660
|
proxy.addEventListener('scroll', fromProxy, { passive: true });
|
|
6774
6661
|
const measure = () => {
|
|
6775
6662
|
this.hscrollContentWidth.set(wrap.scrollWidth);
|
|
6663
|
+
// Both are rounded integers, so a fractional layout width makes an
|
|
6664
|
+
// unscrollable wrap report one px more than it holds.
|
|
6776
6665
|
this.hscrollNeeded.set(wrap.scrollWidth > wrap.clientWidth + 1);
|
|
6777
6666
|
};
|
|
6778
6667
|
// The wrap's own box never changes with content — watch the table too
|
|
@@ -7024,7 +6913,6 @@ class TableComponent {
|
|
|
7024
6913
|
event.preventDefault();
|
|
7025
6914
|
this.rowClicked.emit(row);
|
|
7026
6915
|
}
|
|
7027
|
-
/** Accessible name for an interactive row, taken from the first visible column. */
|
|
7028
6916
|
rowAriaLabel(row) {
|
|
7029
6917
|
const first = this.visibleColumns()[0];
|
|
7030
6918
|
return first ? this.cellValue(row, first) : '';
|
|
@@ -7038,11 +6926,9 @@ class TableComponent {
|
|
|
7038
6926
|
}
|
|
7039
6927
|
return String(row.id ?? '');
|
|
7040
6928
|
}
|
|
7041
|
-
/** Whether this column's header is an actual sort control right now. */
|
|
7042
6929
|
sortableCol(col) {
|
|
7043
6930
|
return !!col.sortable && this.sortModeResolved() !== 'none';
|
|
7044
6931
|
}
|
|
7045
|
-
/** `aria-sort` value for a header: only meaningful on sortable columns. */
|
|
7046
6932
|
ariaSort(col) {
|
|
7047
6933
|
if (!this.sortableCol(col)) {
|
|
7048
6934
|
return null;
|
|
@@ -7186,8 +7072,6 @@ class TableComponent {
|
|
|
7186
7072
|
this.exportStatusState.set('Export ready');
|
|
7187
7073
|
}
|
|
7188
7074
|
catch (error) {
|
|
7189
|
-
// Swallowing this is what made a failed export indistinguishable from a
|
|
7190
|
-
// slow one: the button re-enabled and no file ever arrived.
|
|
7191
7075
|
this.exportStatusState.set('Export failed');
|
|
7192
7076
|
this.exportFailed.emit(error);
|
|
7193
7077
|
}
|
|
@@ -7211,7 +7095,7 @@ class TableComponent {
|
|
|
7211
7095
|
}
|
|
7212
7096
|
}
|
|
7213
7097
|
/** Deterministic per-cell width so skeleton rows look organic but stable
|
|
7214
|
-
* across re-renders.
|
|
7098
|
+
* across re-renders. */
|
|
7215
7099
|
skeletonWidth(col, rowIndex) {
|
|
7216
7100
|
const seed = `${col.key}-${rowIndex}`;
|
|
7217
7101
|
let hash = 0;
|
|
@@ -7736,9 +7620,6 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
7736
7620
|
inGroup = inFieldGroup();
|
|
7737
7621
|
constructor() {
|
|
7738
7622
|
super();
|
|
7739
|
-
// Renders through toFieldText so the field is fixed-width `_`-padded once any
|
|
7740
|
-
// digit exists (even a partial range pads the empty end date), but genuinely
|
|
7741
|
-
// empty ('') when untouched.
|
|
7742
7623
|
effect(() => {
|
|
7743
7624
|
const spec = this.formatSpec();
|
|
7744
7625
|
const value = this.value();
|
|
@@ -7829,7 +7710,7 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
7829
7710
|
success = input('', { ...(ngDevMode ? { debugName: "success" } : /* istanbul ignore next */ {}), transform: trimmedText });
|
|
7830
7711
|
/** Accessible name when no visible `label` is provided. */
|
|
7831
7712
|
ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
7832
|
-
/**
|
|
7713
|
+
/** Lower bound for the year dropdown in the calendar header. */
|
|
7833
7714
|
minYear = input(new Date().getFullYear() - 100, ...(ngDevMode ? [{ debugName: "minYear" }] : /* istanbul ignore next */ []));
|
|
7834
7715
|
/** Upper bound for the year dropdown in the calendar header. */
|
|
7835
7716
|
maxYear = input(new Date().getFullYear() + 10, ...(ngDevMode ? [{ debugName: "maxYear" }] : /* istanbul ignore next */ []));
|
|
@@ -7851,7 +7732,8 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
7851
7732
|
* the panel shows its month and grid focus lands on its exact day.
|
|
7852
7733
|
* Never written to `value` — selection stays with the user. */
|
|
7853
7734
|
defaultDate = input(null, ...(ngDevMode ? [{ debugName: "defaultDate" }] : /* istanbul ignore next */ []));
|
|
7854
|
-
/** Allow masked manual typing. When false the
|
|
7735
|
+
/** Allow masked manual typing. When false the field is read-only and a date can
|
|
7736
|
+
* only be picked from the calendar. */
|
|
7855
7737
|
allowInput = input(true, { ...(ngDevMode ? { debugName: "allowInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
7856
7738
|
isDisabled = computed(() => this.disabled() || this.formDisabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
7857
7739
|
hintId = computed(() => this.message().text ? `${this.uid}-hint` : null, ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
|
|
@@ -7888,15 +7770,12 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
7888
7770
|
resolvedLocale = computed(() => this.locale() ?? this.config.datePicker?.locale ?? 'en-US', ...(ngDevMode ? [{ debugName: "resolvedLocale" }] : /* istanbul ignore next */ []));
|
|
7889
7771
|
resolvedFirstDay = computed(() => this.firstDayOfWeek() ?? this.config.datePicker?.firstDayOfWeek ?? 1, ...(ngDevMode ? [{ debugName: "resolvedFirstDay" }] : /* istanbul ignore next */ []));
|
|
7890
7772
|
formatSpec = computed(() => resolveDateFormat(this.resolvedLocale(), this.dateFormat() ?? this.config.datePicker?.dateFormat), ...(ngDevMode ? [{ debugName: "formatSpec" }] : /* istanbul ignore next */ []));
|
|
7891
|
-
/** Slot/literal layout for the current mode — single date or doubled range. */
|
|
7892
7773
|
layout = computed(() => this.mode() === 'range'
|
|
7893
7774
|
? rangeFieldLayout(this.formatSpec())
|
|
7894
7775
|
: singleFieldLayout(this.formatSpec()), ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
7895
7776
|
monthNames = computed(() => monthLabels(this.resolvedLocale()), ...(ngDevMode ? [{ debugName: "monthNames" }] : /* istanbul ignore next */ []));
|
|
7896
7777
|
weekdays = computed(() => weekdayLabels(this.resolvedLocale(), this.resolvedFirstDay()), ...(ngDevMode ? [{ debugName: "weekdays" }] : /* istanbul ignore next */ []));
|
|
7897
|
-
/** Full weekday names for the grid column headers' accessible names. */
|
|
7898
7778
|
weekdaysFull = computed(() => weekdayLabels(this.resolvedLocale(), this.resolvedFirstDay(), 'long'), ...(ngDevMode ? [{ debugName: "weekdaysFull" }] : /* istanbul ignore next */ []));
|
|
7899
|
-
/** Localized "Month YYYY" caption — the grid's accessible name + live label. */
|
|
7900
7779
|
monthYearLabel = computed(() => `${this.monthNames()[this.viewMonthIndex()]} ${this.viewYear()}`, ...(ngDevMode ? [{ debugName: "monthYearLabel" }] : /* istanbul ignore next */ []));
|
|
7901
7780
|
uid = `ds-datepicker-${++nextId$7}`;
|
|
7902
7781
|
labelId = `${this.uid}-label`;
|
|
@@ -7993,7 +7872,6 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
7993
7872
|
const element = this.overlayRef.overlayElement.querySelector(`[data-day="${this.dayKey(f)}"]`);
|
|
7994
7873
|
element?.focus();
|
|
7995
7874
|
}
|
|
7996
|
-
/** Full, unambiguous date for a day cell's accessible name. */
|
|
7997
7875
|
dayLabel(cell) {
|
|
7998
7876
|
return fullDateLabel(cell.date, this.resolvedLocale());
|
|
7999
7877
|
}
|
|
@@ -8026,9 +7904,7 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8026
7904
|
focusTrigger() {
|
|
8027
7905
|
this.inputEl().nativeElement.focus();
|
|
8028
7906
|
}
|
|
8029
|
-
/** Text shown in the field: masked single value, or the combined range string. */
|
|
8030
7907
|
fieldText = computed(() => this.mode() === 'single' ? this.inputText() : this.rangeText(), ...(ngDevMode ? [{ debugName: "fieldText" }] : /* istanbul ignore next */ []));
|
|
8031
|
-
/** Format-mask placeholder (single) or the doubled range mask. */
|
|
8032
7908
|
fieldPlaceholder = computed(() => this.mode() === 'single'
|
|
8033
7909
|
? this.formatSpec().mask
|
|
8034
7910
|
: rangeMask(this.formatSpec()), ...(ngDevMode ? [{ debugName: "fieldPlaceholder" }] : /* istanbul ignore next */ []));
|
|
@@ -8038,14 +7914,11 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8038
7914
|
* `font-family: var(--font-mono)` keeps every glyph equal width, so the
|
|
8039
7915
|
* width never shifts as you type. */
|
|
8040
7916
|
fieldSize = computed(() => this.fieldPlaceholder().length + 1, ...(ngDevMode ? [{ debugName: "fieldSize" }] : /* istanbul ignore next */ []));
|
|
8041
|
-
/** Per-slot overlay runs: digits at normal weight, unfilled positions
|
|
8042
|
-
* (format letters or `_` padding) muted — see displayParts(). */
|
|
8043
7917
|
displaySlots = computed(() => displayParts(parseFieldText(this.fieldText(), this.layout()), this.layout()), ...(ngDevMode ? [{ debugName: "displaySlots" }] : /* istanbul ignore next */ []));
|
|
8044
7918
|
monthMenuOpen = signal(false, ...(ngDevMode ? [{ debugName: "monthMenuOpen" }] : /* istanbul ignore next */ []));
|
|
8045
7919
|
yearMenuOpen = signal(false, ...(ngDevMode ? [{ debugName: "yearMenuOpen" }] : /* istanbul ignore next */ []));
|
|
8046
7920
|
viewMonthIndex = computed(() => this.viewMonth().getMonth(), ...(ngDevMode ? [{ debugName: "viewMonthIndex" }] : /* istanbul ignore next */ []));
|
|
8047
7921
|
viewYear = computed(() => this.viewMonth().getFullYear(), ...(ngDevMode ? [{ debugName: "viewYear" }] : /* istanbul ignore next */ []));
|
|
8048
|
-
/** First year shown in the year grid; paged by YEAR_PAGE_SIZE within [minYear, maxYear]. */
|
|
8049
7922
|
yearPageStart = signal(0, ...(ngDevMode ? [{ debugName: "yearPageStart" }] : /* istanbul ignore next */ []));
|
|
8050
7923
|
yearsOnPage = computed(() => {
|
|
8051
7924
|
const start = this.yearPageStart();
|
|
@@ -8134,6 +8007,8 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8134
8007
|
const cells = [];
|
|
8135
8008
|
const today = new Date();
|
|
8136
8009
|
const todayKey = today.toDateString();
|
|
8010
|
+
// Six weeks of seven days, whatever the month: a fixed cell count keeps the
|
|
8011
|
+
// panel from changing height as you page through the year.
|
|
8137
8012
|
for (let i = 0; i < 42; i++) {
|
|
8138
8013
|
const d = new Date(gridStart);
|
|
8139
8014
|
d.setDate(d.getDate() + i);
|
|
@@ -8154,7 +8029,6 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8154
8029
|
}
|
|
8155
8030
|
return cells;
|
|
8156
8031
|
}, ...(ngDevMode ? [{ debugName: "daysGrid" }] : /* istanbul ignore next */ []));
|
|
8157
|
-
/** daysGrid split into rows of 7 for the grid's `role="row"` structure. */
|
|
8158
8032
|
weeksGrid = computed(() => {
|
|
8159
8033
|
const cells = this.daysGrid();
|
|
8160
8034
|
const weeks = [];
|
|
@@ -8213,10 +8087,9 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8213
8087
|
forwardOverlayTokens(this.overlayRef, this.host.nativeElement, this.panelTokens);
|
|
8214
8088
|
// The anchor, not the host: a stretched host's empty width must dismiss.
|
|
8215
8089
|
closeOnOutsidePointer(this.overlayRef, (target) => this.anchor().nativeElement.contains(target), () => this.close('dismiss'));
|
|
8216
|
-
// No backdrop catches a page scroll, and CDK's scroll strategies don't see a
|
|
8217
|
-
// plain overflow container — so close on any outside scroll ourselves. Sync
|
|
8218
|
-
// state on every detach so a stray CDK detach can't wedge the reopen guard.
|
|
8219
8090
|
const removeScrollClose = closeOnScroll(this.overlayRef, () => this.close('dismiss'));
|
|
8091
|
+
// Sync state on EVERY detach, so a stray CDK detach cannot leave a stale
|
|
8092
|
+
// `overlayRef` wedging this method's reopen guard.
|
|
8220
8093
|
this.overlayRef.detachments().subscribe(() => {
|
|
8221
8094
|
removeScrollClose();
|
|
8222
8095
|
this.overlayRef = null;
|
|
@@ -8232,7 +8105,6 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8232
8105
|
const portal = new TemplatePortal(this.panelTpl(), this.vcr);
|
|
8233
8106
|
this.overlayRef.attach(portal);
|
|
8234
8107
|
this.isOpen.set(true);
|
|
8235
|
-
// Seed grid focus on the selected day (or today) and move focus into it.
|
|
8236
8108
|
const selected = this.mode() === 'single'
|
|
8237
8109
|
? this.value()
|
|
8238
8110
|
: (this.value()?.[0] ?? null);
|
|
@@ -8260,18 +8132,15 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8260
8132
|
}
|
|
8261
8133
|
}
|
|
8262
8134
|
ngOnDestroy() {
|
|
8263
|
-
// Host torn down while open → close() never runs. Dispose the overlay so
|
|
8264
|
-
// its pane and event subscriptions don't leak.
|
|
8265
8135
|
this.overlayRef?.dispose();
|
|
8266
8136
|
this.overlayRef = null;
|
|
8267
8137
|
}
|
|
8268
8138
|
/**
|
|
8269
8139
|
* Also the calendar glyph's handler. A POINTER open must not drag focus into
|
|
8270
8140
|
* the day grid: the reader did not ask to leave a field they may want to type
|
|
8271
|
-
* in
|
|
8272
|
-
*
|
|
8273
|
-
*
|
|
8274
|
-
* calls `open(true)` and enters the grid however the panel was opened.
|
|
8141
|
+
* in. So focus follows what the field IS — typeable, and the caret stays;
|
|
8142
|
+
* read-only, and the grid is the only thing worth focusing. The keyboard path is
|
|
8143
|
+
* unaffected: ArrowDown on the field calls `open(true)`.
|
|
8275
8144
|
*/
|
|
8276
8145
|
onFieldClick() {
|
|
8277
8146
|
this.open(!this.allowInput());
|
|
@@ -8290,16 +8159,13 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8290
8159
|
if (this.mobileEdit) {
|
|
8291
8160
|
const { value, caret } = this.mobileEdit;
|
|
8292
8161
|
this.mobileEdit = null;
|
|
8293
|
-
// beforeinput already applied the segment edit; overwrite whatever the
|
|
8294
|
-
// native change did with the intended fixed-width value + caret.
|
|
8295
8162
|
this.writeBackText(element, value, caret);
|
|
8296
8163
|
return;
|
|
8297
8164
|
}
|
|
8298
8165
|
this.commitRaw(element, element.value);
|
|
8299
8166
|
}
|
|
8300
8167
|
/** Physical-keyboard editing (desktop): typed digits fill the caret's slot;
|
|
8301
|
-
* Backspace/Delete never shift digits across a separator.
|
|
8302
|
-
* shared segment editor. */
|
|
8168
|
+
* Backspace/Delete never shift digits across a separator. */
|
|
8303
8169
|
onFieldKeydown(event) {
|
|
8304
8170
|
if (!this.allowInput()) {
|
|
8305
8171
|
return;
|
|
@@ -8359,10 +8225,8 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8359
8225
|
};
|
|
8360
8226
|
queueMicrotask(() => (this.mobileEdit = null));
|
|
8361
8227
|
}
|
|
8362
|
-
/**
|
|
8363
|
-
*
|
|
8364
|
-
* selection is cleared through the model so `_` placeholders are never
|
|
8365
|
-
* natively erased — only digits are editable. Shared by keydown + beforeinput. */
|
|
8228
|
+
/** A selection is cleared through the model so `_` placeholders are never
|
|
8229
|
+
* natively erased — only digits are editable. */
|
|
8366
8230
|
runSegmentEdit(element, kind, digit, caretOverride) {
|
|
8367
8231
|
const layout = this.layout();
|
|
8368
8232
|
const segments = parseFieldText(element.value, layout);
|
|
@@ -8423,10 +8287,9 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8423
8287
|
countDigits(text) {
|
|
8424
8288
|
return text.replace(/\D/g, '').length;
|
|
8425
8289
|
}
|
|
8426
|
-
/**
|
|
8427
|
-
*
|
|
8428
|
-
*
|
|
8429
|
-
* empty when no digits remain. */
|
|
8290
|
+
/** The fallback for any `input` event with no preceding handled `beforeinput`
|
|
8291
|
+
* (IME, autofill, a suggestion): `raw` is re-read as a flat digit stream and
|
|
8292
|
+
* redistributed over the slots, since its own layout cannot be trusted. */
|
|
8430
8293
|
commitRaw(element, raw) {
|
|
8431
8294
|
const layout = this.layout();
|
|
8432
8295
|
const capacity = layout.slots.reduce((sum, slot) => sum + slot.maxLength, 0);
|
|
@@ -8440,7 +8303,6 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8440
8303
|
const text = this.toFieldText(segments, layout);
|
|
8441
8304
|
this.applyEditedText(element, text, this.caretAfterFill(segments, layout));
|
|
8442
8305
|
}
|
|
8443
|
-
/** Write masked text + caret into the DOM, then parse and validate it. */
|
|
8444
8306
|
applyEditedText(element, text, caret) {
|
|
8445
8307
|
this.editing = true;
|
|
8446
8308
|
this.writeBackText(element, text, caret);
|
|
@@ -8493,19 +8355,17 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8493
8355
|
this.typedInvalid.set(true);
|
|
8494
8356
|
}
|
|
8495
8357
|
}
|
|
8496
|
-
/**
|
|
8497
|
-
*
|
|
8498
|
-
*
|
|
8499
|
-
* the same string, which leaves the caret untouched. */
|
|
8358
|
+
/** Writing `value` parks the caret at the end, so the explicit range has to
|
|
8359
|
+
* follow it; the later `[value]` binding writes the same string, which leaves
|
|
8360
|
+
* the caret untouched. */
|
|
8500
8361
|
writeBackText(element, text, caret) {
|
|
8501
8362
|
if (element.value !== text) {
|
|
8502
8363
|
element.value = text;
|
|
8503
8364
|
}
|
|
8504
8365
|
element.setSelectionRange(caret, caret);
|
|
8505
8366
|
}
|
|
8506
|
-
/** Caret just past the last digit
|
|
8507
|
-
*
|
|
8508
|
-
* once every slot is full. Empty segments naturally resolve to 0. */
|
|
8367
|
+
/** Caret just past the last digit a flat digit stream filled — the first slot
|
|
8368
|
+
* short of its max length, or the very end once every slot is full. */
|
|
8509
8369
|
caretAfterFill(segments, layout) {
|
|
8510
8370
|
for (let slot = 0; slot < segments.length; slot++) {
|
|
8511
8371
|
if (segments[slot].length < layout.slots[slot].maxLength) {
|
|
@@ -8515,7 +8375,8 @@ class DatePickerComponent extends DsControlValueAccessor {
|
|
|
8515
8375
|
const last = segments.length - 1;
|
|
8516
8376
|
return slotToCaret(layout, last, layout.slots[last].maxLength);
|
|
8517
8377
|
}
|
|
8518
|
-
/**
|
|
8378
|
+
/** `commit` is the blur pass: only then is the field text rewritten from the
|
|
8379
|
+
* parsed value, and a half-filled range written through to `value`. */
|
|
8519
8380
|
applyRangeText(text, spec, commit) {
|
|
8520
8381
|
if (this.countDigits(text) === 0) {
|
|
8521
8382
|
this.rangeInvalid.set(false);
|
|
@@ -10253,11 +10114,11 @@ class BannerComponent {
|
|
|
10253
10114
|
this.closed.emit();
|
|
10254
10115
|
}
|
|
10255
10116
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: BannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10256
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: BannerComponent, isStandalone: true, selector: "ds-banner", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, accentRail: { classPropertyName: "accentRail", publicName: "accentRail", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "class.no-rail": "this.noRail", "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\"\n >\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <!-- Wrapped so `:empty` can answer \"is there a body?\" \u2014 projected content is\n usually a bare text node, which no selector can otherwise tell from\n nothing at all. -->\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;min-width:0}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-pad-y: var(--ds-banner-pad-y, var(--space-3));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--ds-radius-control));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-body-font-size: var(--ds-banner-body-font-size, var(--font-size-s));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));--_banner-enter-keyframes: var(--ds-banner-enter-keyframes, ds-slide-in);--_banner-enter-duration: var(--ds-banner-enter-duration, var(--ds-motion-enter-surface-duration));--_banner-enter-easing: var(--ds-banner-enter-easing, var(--ds-motion-enter-surface-easing));--_banner-enter-offset: var(--ds-banner-enter-offset, 4px);--_ds-enter-y: calc(-1 * var(--_banner-enter-offset));--_ds-enter-scale: var(--ds-banner-enter-scale, .96);display:flex;gap:var(--space-3);text-align:start;padding:var(--_banner-pad-y) var(--_banner-pad-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation-name:var(--_banner-enter-keyframes);animation-duration:var(--_banner-enter-duration);animation-timing-function:var(--_banner-enter-easing)}@media(prefers-reduced-motion:reduce){.banner{--_banner-enter-duration: 0ms}}:host(:not(.no-rail)) .banner{border-left:var(--_banner-bar-width) solid var(--_banner-bar)}.banner.success{--_banner-bar: var(--ds-banner-bar, var(--success));--_banner-bg-color: var(--ds-banner-bg-color, var(--success-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--success-text))}.banner.warning{--_banner-bar: var(--ds-banner-bar, var(--warning));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.severe{--_banner-bar: var(--ds-banner-bar, var(--warning-hover));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-muted));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.error{--_banner-bar: var(--ds-banner-bar, var(--error));--_banner-bg-color: var(--ds-banner-bg-color, var(--error-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--error-text))}.banner.neutral{--_banner-bar: var(--ds-banner-bar, var(--border-strong));--_banner-bg-color: var(--ds-banner-bg-color, var(--surface-secondary));--_banner-text-color: var(--ds-banner-text-color, var(--text-secondary))}.banner .icon{flex-shrink:0;color:inherit;
|
|
10117
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: BannerComponent, isStandalone: true, selector: "ds-banner", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, accentRail: { classPropertyName: "accentRail", publicName: "accentRail", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "class.no-rail": "this.noRail", "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\"\n >\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <!-- Wrapped so `:empty` can answer \"is there a body?\" \u2014 projected content is\n usually a bare text node, which no selector can otherwise tell from\n nothing at all. -->\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;min-width:0}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-pad-y: var(--ds-banner-pad-y, var(--space-3));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--ds-radius-control));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-body-font-size: var(--ds-banner-body-font-size, var(--font-size-s));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));--_banner-enter-keyframes: var(--ds-banner-enter-keyframes, ds-slide-in);--_banner-enter-duration: var(--ds-banner-enter-duration, var(--ds-motion-enter-surface-duration));--_banner-enter-easing: var(--ds-banner-enter-easing, var(--ds-motion-enter-surface-easing));--_banner-enter-offset: var(--ds-banner-enter-offset, 4px);--_ds-enter-y: calc(-1 * var(--_banner-enter-offset));--_ds-enter-scale: var(--ds-banner-enter-scale, .96);display:flex;gap:var(--space-3);text-align:start;padding:var(--_banner-pad-y) var(--_banner-pad-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation-name:var(--_banner-enter-keyframes);animation-duration:var(--_banner-enter-duration);animation-timing-function:var(--_banner-enter-easing)}@media(prefers-reduced-motion:reduce){.banner{--_banner-enter-duration: 0ms}}:host(:not(.no-rail)) .banner{border-left:var(--_banner-bar-width) solid var(--_banner-bar)}.banner.success{--_banner-bar: var(--ds-banner-bar, var(--success));--_banner-bg-color: var(--ds-banner-bg-color, var(--success-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--success-text))}.banner.warning{--_banner-bar: var(--ds-banner-bar, var(--warning));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.severe{--_banner-bar: var(--ds-banner-bar, var(--warning-hover));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-muted));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.error{--_banner-bar: var(--ds-banner-bar, var(--error));--_banner-bg-color: var(--ds-banner-bg-color, var(--error-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--error-text))}.banner.neutral{--_banner-bar: var(--ds-banner-bar, var(--border-strong));--_banner-bg-color: var(--ds-banner-bg-color, var(--surface-secondary));--_banner-text-color: var(--ds-banner-text-color, var(--text-secondary))}.banner .icon{flex-shrink:0;color:inherit;align-self:center}.banner .body{flex:1;min-width:0}.banner .title{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_banner-title-text-color);margin:0}.banner .text:not(:empty){display:block;margin-top:var(--space-1);font-size:var(--_banner-body-font-size)}.banner .close{background:none;border:0;cursor:pointer;color:var(--_banner-close-icon-color)}.banner .close:hover{color:var(--_banner-close-icon-color-hover)}.banner .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.banner .actions{display:flex;gap:var(--space-2)}.banner .actions:empty{display:none}.banner.layout-stacked{flex-wrap:wrap;align-items:flex-start}.banner.layout-stacked .actions{flex-basis:100%;margin-top:var(--space-2);padding-left:calc(var(--icon-lg) + var(--space-3))}.banner.layout-row{align-items:center}.banner.layout-row .body{flex:1;min-width:0}.banner.layout-row .actions{flex-shrink:0}.banner.compact{align-items:center;--_banner-pad-y: var(--ds-banner-pad-y, var(--space-2));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-3))}.banner.compact .title{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
10257
10118
|
}
|
|
10258
10119
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: BannerComponent, decorators: [{
|
|
10259
10120
|
type: Component,
|
|
10260
|
-
args: [{ selector: 'ds-banner', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\"\n >\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <!-- Wrapped so `:empty` can answer \"is there a body?\" \u2014 projected content is\n usually a bare text node, which no selector can otherwise tell from\n nothing at all. -->\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;min-width:0}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-pad-y: var(--ds-banner-pad-y, var(--space-3));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--ds-radius-control));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-body-font-size: var(--ds-banner-body-font-size, var(--font-size-s));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));--_banner-enter-keyframes: var(--ds-banner-enter-keyframes, ds-slide-in);--_banner-enter-duration: var(--ds-banner-enter-duration, var(--ds-motion-enter-surface-duration));--_banner-enter-easing: var(--ds-banner-enter-easing, var(--ds-motion-enter-surface-easing));--_banner-enter-offset: var(--ds-banner-enter-offset, 4px);--_ds-enter-y: calc(-1 * var(--_banner-enter-offset));--_ds-enter-scale: var(--ds-banner-enter-scale, .96);display:flex;gap:var(--space-3);text-align:start;padding:var(--_banner-pad-y) var(--_banner-pad-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation-name:var(--_banner-enter-keyframes);animation-duration:var(--_banner-enter-duration);animation-timing-function:var(--_banner-enter-easing)}@media(prefers-reduced-motion:reduce){.banner{--_banner-enter-duration: 0ms}}:host(:not(.no-rail)) .banner{border-left:var(--_banner-bar-width) solid var(--_banner-bar)}.banner.success{--_banner-bar: var(--ds-banner-bar, var(--success));--_banner-bg-color: var(--ds-banner-bg-color, var(--success-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--success-text))}.banner.warning{--_banner-bar: var(--ds-banner-bar, var(--warning));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.severe{--_banner-bar: var(--ds-banner-bar, var(--warning-hover));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-muted));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.error{--_banner-bar: var(--ds-banner-bar, var(--error));--_banner-bg-color: var(--ds-banner-bg-color, var(--error-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--error-text))}.banner.neutral{--_banner-bar: var(--ds-banner-bar, var(--border-strong));--_banner-bg-color: var(--ds-banner-bg-color, var(--surface-secondary));--_banner-text-color: var(--ds-banner-text-color, var(--text-secondary))}.banner .icon{flex-shrink:0;color:inherit;
|
|
10121
|
+
args: [{ selector: 'ds-banner', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\"\n >\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <!-- Wrapped so `:empty` can answer \"is there a body?\" \u2014 projected content is\n usually a bare text node, which no selector can otherwise tell from\n nothing at all. -->\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;min-width:0}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-pad-y: var(--ds-banner-pad-y, var(--space-3));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--ds-radius-control));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-body-font-size: var(--ds-banner-body-font-size, var(--font-size-s));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));--_banner-enter-keyframes: var(--ds-banner-enter-keyframes, ds-slide-in);--_banner-enter-duration: var(--ds-banner-enter-duration, var(--ds-motion-enter-surface-duration));--_banner-enter-easing: var(--ds-banner-enter-easing, var(--ds-motion-enter-surface-easing));--_banner-enter-offset: var(--ds-banner-enter-offset, 4px);--_ds-enter-y: calc(-1 * var(--_banner-enter-offset));--_ds-enter-scale: var(--ds-banner-enter-scale, .96);display:flex;gap:var(--space-3);text-align:start;padding:var(--_banner-pad-y) var(--_banner-pad-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation-name:var(--_banner-enter-keyframes);animation-duration:var(--_banner-enter-duration);animation-timing-function:var(--_banner-enter-easing)}@media(prefers-reduced-motion:reduce){.banner{--_banner-enter-duration: 0ms}}:host(:not(.no-rail)) .banner{border-left:var(--_banner-bar-width) solid var(--_banner-bar)}.banner.success{--_banner-bar: var(--ds-banner-bar, var(--success));--_banner-bg-color: var(--ds-banner-bg-color, var(--success-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--success-text))}.banner.warning{--_banner-bar: var(--ds-banner-bar, var(--warning));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.severe{--_banner-bar: var(--ds-banner-bar, var(--warning-hover));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-muted));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.error{--_banner-bar: var(--ds-banner-bar, var(--error));--_banner-bg-color: var(--ds-banner-bg-color, var(--error-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--error-text))}.banner.neutral{--_banner-bar: var(--ds-banner-bar, var(--border-strong));--_banner-bg-color: var(--ds-banner-bg-color, var(--surface-secondary));--_banner-text-color: var(--ds-banner-text-color, var(--text-secondary))}.banner .icon{flex-shrink:0;color:inherit;align-self:center}.banner .body{flex:1;min-width:0}.banner .title{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_banner-title-text-color);margin:0}.banner .text:not(:empty){display:block;margin-top:var(--space-1);font-size:var(--_banner-body-font-size)}.banner .close{background:none;border:0;cursor:pointer;color:var(--_banner-close-icon-color)}.banner .close:hover{color:var(--_banner-close-icon-color-hover)}.banner .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.banner .actions{display:flex;gap:var(--space-2)}.banner .actions:empty{display:none}.banner.layout-stacked{flex-wrap:wrap;align-items:flex-start}.banner.layout-stacked .actions{flex-basis:100%;margin-top:var(--space-2);padding-left:calc(var(--icon-lg) + var(--space-3))}.banner.layout-row{align-items:center}.banner.layout-row .body{flex:1;min-width:0}.banner.layout-row .actions{flex-shrink:0}.banner.compact{align-items:center;--_banner-pad-y: var(--ds-banner-pad-y, var(--space-2));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-3))}.banner.compact .title{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}\n"] }]
|
|
10261
10122
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], accentRail: [{ type: i0.Input, args: [{ isSignal: true, alias: "accentRail", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], noRail: [{
|
|
10262
10123
|
type: HostBinding,
|
|
10263
10124
|
args: ['class.no-rail']
|
|
@@ -10306,11 +10167,11 @@ class AlertComponent {
|
|
|
10306
10167
|
this.closed.emit();
|
|
10307
10168
|
}
|
|
10308
10169
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10309
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: AlertComponent, isStandalone: true, selector: "ds-alert", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"a-icon\"\n [name]=\"resolvedIcon()\"\n [size]=\"16\"\n >\n </ds-icon>\n\n <div class=\"a-body\">\n @if (title()) {\n <div class=\"a-title\">\n {{ title() }}\n </div>\n }\n\n <div class=\"a-msg\">\n <ng-content />\n </div>\n\n <div class=\"a-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"a-close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex}.alert{--_alert-bg-color: var(--ds-alert-bg-color, var(--info-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--info-text));--_alert-title-text-color: var(--ds-alert-title-text-color, var(--text-primary));--_alert-close-icon-color: var(--ds-alert-close-icon-color, var(--icon-default));--_alert-close-icon-color-hover: var(--ds-alert-close-icon-color-hover, var(--icon-strong));--_alert-pad-y: var(--ds-alert-pad-y, var(--space-2));--_alert-pad-x: var(--ds-alert-pad-x, var(--space-3));--_alert-radius: var(--ds-alert-radius, var(--ds-radius-control));--_alert-enter-keyframes: var(--ds-alert-enter-keyframes, ds-slide-in);--_alert-enter-duration: var(--ds-alert-enter-duration, var(--ds-motion-enter-surface-duration));--_alert-enter-easing: var(--ds-alert-enter-easing, var(--ds-motion-enter-surface-easing));--_alert-enter-offset: var(--ds-alert-enter-offset, 2px);--_ds-enter-y: calc(-1 * var(--_alert-enter-offset));--_ds-enter-scale: var(--ds-alert-enter-scale, .96);display:inline-flex;align-items:flex-start;gap:var(--space-2);padding:var(--_alert-pad-y) var(--_alert-pad-x);border-radius:var(--_alert-radius);background-color:var(--_alert-bg-color);color:var(--_alert-text-color);animation-name:var(--_alert-enter-keyframes);animation-duration:var(--_alert-enter-duration);animation-timing-function:var(--_alert-enter-easing)}@media(prefers-reduced-motion:reduce){.alert{--_alert-enter-duration: 0ms}}.alert.success{--_alert-bg-color: var(--ds-alert-bg-color, var(--success-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--success-text))}.alert.warning{--_alert-bg-color: var(--ds-alert-bg-color, var(--warning-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--warning-text))}.alert.error{--_alert-bg-color: var(--ds-alert-bg-color, var(--error-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--error-text))}.alert.neutral{--_alert-bg-color: var(--ds-alert-bg-color, var(--surface-secondary));--_alert-text-color: var(--ds-alert-text-color, var(--text-secondary))}.alert .a-icon{flex-shrink:0;color:inherit;
|
|
10170
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: AlertComponent, isStandalone: true, selector: "ds-alert", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"a-icon\"\n [name]=\"resolvedIcon()\"\n [size]=\"16\"\n >\n </ds-icon>\n\n <div class=\"a-body\">\n @if (title()) {\n <div class=\"a-title\">\n {{ title() }}\n </div>\n }\n\n <div class=\"a-msg\">\n <ng-content />\n </div>\n\n <div class=\"a-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"a-close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex}.alert{--_alert-bg-color: var(--ds-alert-bg-color, var(--info-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--info-text));--_alert-title-text-color: var(--ds-alert-title-text-color, var(--text-primary));--_alert-close-icon-color: var(--ds-alert-close-icon-color, var(--icon-default));--_alert-close-icon-color-hover: var(--ds-alert-close-icon-color-hover, var(--icon-strong));--_alert-pad-y: var(--ds-alert-pad-y, var(--space-2));--_alert-pad-x: var(--ds-alert-pad-x, var(--space-3));--_alert-radius: var(--ds-alert-radius, var(--ds-radius-control));--_alert-enter-keyframes: var(--ds-alert-enter-keyframes, ds-slide-in);--_alert-enter-duration: var(--ds-alert-enter-duration, var(--ds-motion-enter-surface-duration));--_alert-enter-easing: var(--ds-alert-enter-easing, var(--ds-motion-enter-surface-easing));--_alert-enter-offset: var(--ds-alert-enter-offset, 2px);--_ds-enter-y: calc(-1 * var(--_alert-enter-offset));--_ds-enter-scale: var(--ds-alert-enter-scale, .96);display:inline-flex;align-items:flex-start;gap:var(--space-2);padding:var(--_alert-pad-y) var(--_alert-pad-x);border-radius:var(--_alert-radius);background-color:var(--_alert-bg-color);color:var(--_alert-text-color);animation-name:var(--_alert-enter-keyframes);animation-duration:var(--_alert-enter-duration);animation-timing-function:var(--_alert-enter-easing)}@media(prefers-reduced-motion:reduce){.alert{--_alert-enter-duration: 0ms}}.alert.success{--_alert-bg-color: var(--ds-alert-bg-color, var(--success-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--success-text))}.alert.warning{--_alert-bg-color: var(--ds-alert-bg-color, var(--warning-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--warning-text))}.alert.error{--_alert-bg-color: var(--ds-alert-bg-color, var(--error-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--error-text))}.alert.neutral{--_alert-bg-color: var(--ds-alert-bg-color, var(--surface-secondary));--_alert-text-color: var(--ds-alert-text-color, var(--text-secondary))}.alert .a-icon{flex-shrink:0;color:inherit;align-self:center}.alert .a-body{flex:1;min-width:0}.alert .a-title{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_alert-title-text-color);margin:0 0 var(--space-1)}.alert .a-actions{display:flex;gap:var(--space-2);margin-top:var(--space-2)}.alert .a-actions:empty{display:none}.alert .a-close{background:none;border:0;cursor:pointer;padding:0;color:var(--_alert-close-icon-color);flex-shrink:0}.alert .a-close:hover{color:var(--_alert-close-icon-color-hover)}.alert .a-close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
10310
10171
|
}
|
|
10311
10172
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AlertComponent, decorators: [{
|
|
10312
10173
|
type: Component,
|
|
10313
|
-
args: [{ selector: 'ds-alert', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"a-icon\"\n [name]=\"resolvedIcon()\"\n [size]=\"16\"\n >\n </ds-icon>\n\n <div class=\"a-body\">\n @if (title()) {\n <div class=\"a-title\">\n {{ title() }}\n </div>\n }\n\n <div class=\"a-msg\">\n <ng-content />\n </div>\n\n <div class=\"a-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"a-close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex}.alert{--_alert-bg-color: var(--ds-alert-bg-color, var(--info-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--info-text));--_alert-title-text-color: var(--ds-alert-title-text-color, var(--text-primary));--_alert-close-icon-color: var(--ds-alert-close-icon-color, var(--icon-default));--_alert-close-icon-color-hover: var(--ds-alert-close-icon-color-hover, var(--icon-strong));--_alert-pad-y: var(--ds-alert-pad-y, var(--space-2));--_alert-pad-x: var(--ds-alert-pad-x, var(--space-3));--_alert-radius: var(--ds-alert-radius, var(--ds-radius-control));--_alert-enter-keyframes: var(--ds-alert-enter-keyframes, ds-slide-in);--_alert-enter-duration: var(--ds-alert-enter-duration, var(--ds-motion-enter-surface-duration));--_alert-enter-easing: var(--ds-alert-enter-easing, var(--ds-motion-enter-surface-easing));--_alert-enter-offset: var(--ds-alert-enter-offset, 2px);--_ds-enter-y: calc(-1 * var(--_alert-enter-offset));--_ds-enter-scale: var(--ds-alert-enter-scale, .96);display:inline-flex;align-items:flex-start;gap:var(--space-2);padding:var(--_alert-pad-y) var(--_alert-pad-x);border-radius:var(--_alert-radius);background-color:var(--_alert-bg-color);color:var(--_alert-text-color);animation-name:var(--_alert-enter-keyframes);animation-duration:var(--_alert-enter-duration);animation-timing-function:var(--_alert-enter-easing)}@media(prefers-reduced-motion:reduce){.alert{--_alert-enter-duration: 0ms}}.alert.success{--_alert-bg-color: var(--ds-alert-bg-color, var(--success-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--success-text))}.alert.warning{--_alert-bg-color: var(--ds-alert-bg-color, var(--warning-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--warning-text))}.alert.error{--_alert-bg-color: var(--ds-alert-bg-color, var(--error-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--error-text))}.alert.neutral{--_alert-bg-color: var(--ds-alert-bg-color, var(--surface-secondary));--_alert-text-color: var(--ds-alert-text-color, var(--text-secondary))}.alert .a-icon{flex-shrink:0;color:inherit;
|
|
10174
|
+
args: [{ selector: 'ds-alert', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"a-icon\"\n [name]=\"resolvedIcon()\"\n [size]=\"16\"\n >\n </ds-icon>\n\n <div class=\"a-body\">\n @if (title()) {\n <div class=\"a-title\">\n {{ title() }}\n </div>\n }\n\n <div class=\"a-msg\">\n <ng-content />\n </div>\n\n <div class=\"a-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"a-close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: [":host{display:inline-flex}.alert{--_alert-bg-color: var(--ds-alert-bg-color, var(--info-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--info-text));--_alert-title-text-color: var(--ds-alert-title-text-color, var(--text-primary));--_alert-close-icon-color: var(--ds-alert-close-icon-color, var(--icon-default));--_alert-close-icon-color-hover: var(--ds-alert-close-icon-color-hover, var(--icon-strong));--_alert-pad-y: var(--ds-alert-pad-y, var(--space-2));--_alert-pad-x: var(--ds-alert-pad-x, var(--space-3));--_alert-radius: var(--ds-alert-radius, var(--ds-radius-control));--_alert-enter-keyframes: var(--ds-alert-enter-keyframes, ds-slide-in);--_alert-enter-duration: var(--ds-alert-enter-duration, var(--ds-motion-enter-surface-duration));--_alert-enter-easing: var(--ds-alert-enter-easing, var(--ds-motion-enter-surface-easing));--_alert-enter-offset: var(--ds-alert-enter-offset, 2px);--_ds-enter-y: calc(-1 * var(--_alert-enter-offset));--_ds-enter-scale: var(--ds-alert-enter-scale, .96);display:inline-flex;align-items:flex-start;gap:var(--space-2);padding:var(--_alert-pad-y) var(--_alert-pad-x);border-radius:var(--_alert-radius);background-color:var(--_alert-bg-color);color:var(--_alert-text-color);animation-name:var(--_alert-enter-keyframes);animation-duration:var(--_alert-enter-duration);animation-timing-function:var(--_alert-enter-easing)}@media(prefers-reduced-motion:reduce){.alert{--_alert-enter-duration: 0ms}}.alert.success{--_alert-bg-color: var(--ds-alert-bg-color, var(--success-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--success-text))}.alert.warning{--_alert-bg-color: var(--ds-alert-bg-color, var(--warning-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--warning-text))}.alert.error{--_alert-bg-color: var(--ds-alert-bg-color, var(--error-subtitle));--_alert-text-color: var(--ds-alert-text-color, var(--error-text))}.alert.neutral{--_alert-bg-color: var(--ds-alert-bg-color, var(--surface-secondary));--_alert-text-color: var(--ds-alert-text-color, var(--text-secondary))}.alert .a-icon{flex-shrink:0;color:inherit;align-self:center}.alert .a-body{flex:1;min-width:0}.alert .a-title{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_alert-title-text-color);margin:0 0 var(--space-1)}.alert .a-actions{display:flex;gap:var(--space-2);margin-top:var(--space-2)}.alert .a-actions:empty{display:none}.alert .a-close{background:none;border:0;cursor:pointer;padding:0;color:var(--_alert-close-icon-color);flex-shrink:0}.alert .a-close:hover{color:var(--_alert-close-icon-color-hover)}.alert .a-close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}\n"] }]
|
|
10314
10175
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], ariaRole: [{
|
|
10315
10176
|
type: HostBinding,
|
|
10316
10177
|
args: ['attr.role']
|
|
@@ -10529,11 +10390,11 @@ class AccordionItemComponent {
|
|
|
10529
10390
|
this.expanded.set(false);
|
|
10530
10391
|
}
|
|
10531
10392
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10532
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: AccordionItemComponent, isStandalone: true, selector: "ds-accordion-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"head\"\n [id]=\"headId\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"bodyId\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggle()\"\n>\n <span>\n {{ title() }}\n </span>\n\n <ng-content select=\"[badge]\"></ng-content>\n\n <ds-icon\n name=\"chevronRight\"\n class=\"chev\"\n [size]=\"16\"\n />\n</button>\n\n<div\n class=\"body\"\n role=\"region\"\n [id]=\"bodyId\"\n [attr.aria-labelledby]=\"headId\"\n [class.is-open]=\"expanded()\"\n [attr.inert]=\"expanded() ? null : ''\"\n>\n <div class=\"body-inner\">\n <div class=\"body-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{--_accordion-header-bg-color: var(--ds-accordion-header-bg-color, var(--surface-default));--_accordion-header-text-color: var(--ds-accordion-header-text-color, var(--text-primary));--_accordion-header-hover-bg-color: var(--ds-accordion-header-hover-bg-color, var(--surface-secondary));--_accordion-divider-color: var(--ds-accordion-divider-color, var(--border-divider));--_accordion-chevron-color: var(--ds-accordion-chevron-color, var(--icon-default));--_accordion-body-text-color: var(--ds-accordion-body-text-color, var(--text-secondary));display:block}:host+:host{border-top:var(--border-width-default) solid var(--_accordion-divider-color)}:host .head{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-3) var(--space-4);border:0;background:var(--_accordion-header-bg-color);text-align:left;cursor:pointer;font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_accordion-header-text-color)}:host .head:hover:not(:disabled){background:var(--_accordion-header-hover-bg-color)}:host .head:active:not(:disabled){background:var(--surface-muted)}:host .head:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:-2px}:host .head .chev{margin-left:auto;transition:transform var(--duration-base) var(--ease-standard);color:var(--_accordion-chevron-color)}:host .head[aria-expanded=true] .chev{transform:rotate(90deg)}:host .head:disabled{cursor:not-allowed;color:var(--text-disabled)}:host .head:disabled .chev{color:var(--
|
|
10393
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: AccordionItemComponent, isStandalone: true, selector: "ds-accordion-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"head\"\n [id]=\"headId\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"bodyId\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggle()\"\n>\n <span>\n {{ title() }}\n </span>\n\n <ng-content select=\"[badge]\"></ng-content>\n\n <ds-icon\n name=\"chevronRight\"\n class=\"chev\"\n [size]=\"16\"\n />\n</button>\n\n<div\n class=\"body\"\n role=\"region\"\n [id]=\"bodyId\"\n [attr.aria-labelledby]=\"headId\"\n [class.is-open]=\"expanded()\"\n [attr.inert]=\"expanded() ? null : ''\"\n>\n <div class=\"body-inner\">\n <div class=\"body-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{--_accordion-header-bg-color: var(--ds-accordion-header-bg-color, var(--surface-default));--_accordion-header-text-color: var(--ds-accordion-header-text-color, var(--text-primary));--_accordion-header-hover-bg-color: var(--ds-accordion-header-hover-bg-color, var(--surface-secondary));--_accordion-divider-color: var(--ds-accordion-divider-color, var(--border-divider));--_accordion-chevron-color: var(--ds-accordion-chevron-color, var(--icon-default));--_accordion-body-text-color: var(--ds-accordion-body-text-color, var(--text-secondary));display:block}:host+:host{border-top:var(--border-width-default) solid var(--_accordion-divider-color)}:host .head{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-3) var(--space-4);border:0;background:var(--_accordion-header-bg-color);text-align:left;cursor:pointer;font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_accordion-header-text-color)}:host .head:hover:not(:disabled){background:var(--_accordion-header-hover-bg-color)}:host .head:active:not(:disabled){background:var(--surface-muted)}:host .head:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:-2px}:host .head .chev{margin-left:auto;transition:transform var(--duration-base) var(--ease-standard);color:var(--_accordion-chevron-color)}:host .head[aria-expanded=true] .chev{transform:rotate(90deg)}:host .head:disabled{cursor:not-allowed;color:var(--text-disabled)}:host .head:disabled .chev{color:var(--text-disabled)}:host .body{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-base) var(--ease-standard)}:host .body.is-open{grid-template-rows:1fr}@media(prefers-reduced-motion:reduce){:host .body{transition:none}}:host .body-inner{overflow:hidden;min-height:0}:host .body-content{padding:var(--space-2) var(--space-4) var(--space-4);color:var(--_accordion-body-text-color);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
10533
10394
|
}
|
|
10534
10395
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
10535
10396
|
type: Component,
|
|
10536
|
-
args: [{ selector: 'ds-accordion-item', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<button\n type=\"button\"\n class=\"head\"\n [id]=\"headId\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"bodyId\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggle()\"\n>\n <span>\n {{ title() }}\n </span>\n\n <ng-content select=\"[badge]\"></ng-content>\n\n <ds-icon\n name=\"chevronRight\"\n class=\"chev\"\n [size]=\"16\"\n />\n</button>\n\n<div\n class=\"body\"\n role=\"region\"\n [id]=\"bodyId\"\n [attr.aria-labelledby]=\"headId\"\n [class.is-open]=\"expanded()\"\n [attr.inert]=\"expanded() ? null : ''\"\n>\n <div class=\"body-inner\">\n <div class=\"body-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{--_accordion-header-bg-color: var(--ds-accordion-header-bg-color, var(--surface-default));--_accordion-header-text-color: var(--ds-accordion-header-text-color, var(--text-primary));--_accordion-header-hover-bg-color: var(--ds-accordion-header-hover-bg-color, var(--surface-secondary));--_accordion-divider-color: var(--ds-accordion-divider-color, var(--border-divider));--_accordion-chevron-color: var(--ds-accordion-chevron-color, var(--icon-default));--_accordion-body-text-color: var(--ds-accordion-body-text-color, var(--text-secondary));display:block}:host+:host{border-top:var(--border-width-default) solid var(--_accordion-divider-color)}:host .head{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-3) var(--space-4);border:0;background:var(--_accordion-header-bg-color);text-align:left;cursor:pointer;font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_accordion-header-text-color)}:host .head:hover:not(:disabled){background:var(--_accordion-header-hover-bg-color)}:host .head:active:not(:disabled){background:var(--surface-muted)}:host .head:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:-2px}:host .head .chev{margin-left:auto;transition:transform var(--duration-base) var(--ease-standard);color:var(--_accordion-chevron-color)}:host .head[aria-expanded=true] .chev{transform:rotate(90deg)}:host .head:disabled{cursor:not-allowed;color:var(--text-disabled)}:host .head:disabled .chev{color:var(--
|
|
10397
|
+
args: [{ selector: 'ds-accordion-item', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<button\n type=\"button\"\n class=\"head\"\n [id]=\"headId\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"bodyId\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggle()\"\n>\n <span>\n {{ title() }}\n </span>\n\n <ng-content select=\"[badge]\"></ng-content>\n\n <ds-icon\n name=\"chevronRight\"\n class=\"chev\"\n [size]=\"16\"\n />\n</button>\n\n<div\n class=\"body\"\n role=\"region\"\n [id]=\"bodyId\"\n [attr.aria-labelledby]=\"headId\"\n [class.is-open]=\"expanded()\"\n [attr.inert]=\"expanded() ? null : ''\"\n>\n <div class=\"body-inner\">\n <div class=\"body-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{--_accordion-header-bg-color: var(--ds-accordion-header-bg-color, var(--surface-default));--_accordion-header-text-color: var(--ds-accordion-header-text-color, var(--text-primary));--_accordion-header-hover-bg-color: var(--ds-accordion-header-hover-bg-color, var(--surface-secondary));--_accordion-divider-color: var(--ds-accordion-divider-color, var(--border-divider));--_accordion-chevron-color: var(--ds-accordion-chevron-color, var(--icon-default));--_accordion-body-text-color: var(--ds-accordion-body-text-color, var(--text-secondary));display:block}:host+:host{border-top:var(--border-width-default) solid var(--_accordion-divider-color)}:host .head{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-3) var(--space-4);border:0;background:var(--_accordion-header-bg-color);text-align:left;cursor:pointer;font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_accordion-header-text-color)}:host .head:hover:not(:disabled){background:var(--_accordion-header-hover-bg-color)}:host .head:active:not(:disabled){background:var(--surface-muted)}:host .head:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:-2px}:host .head .chev{margin-left:auto;transition:transform var(--duration-base) var(--ease-standard);color:var(--_accordion-chevron-color)}:host .head[aria-expanded=true] .chev{transform:rotate(90deg)}:host .head:disabled{cursor:not-allowed;color:var(--text-disabled)}:host .head:disabled .chev{color:var(--text-disabled)}:host .body{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-base) var(--ease-standard)}:host .body.is-open{grid-template-rows:1fr}@media(prefers-reduced-motion:reduce){:host .body{transition:none}}:host .body-inner{overflow:hidden;min-height:0}:host .body-content{padding:var(--space-2) var(--space-4) var(--space-4);color:var(--_accordion-body-text-color);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans)}\n"] }]
|
|
10537
10398
|
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
10538
10399
|
|
|
10539
10400
|
class AccordionComponent {
|
|
@@ -10685,15 +10546,18 @@ class ToastComponent {
|
|
|
10685
10546
|
this.closed.emit();
|
|
10686
10547
|
}
|
|
10687
10548
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10688
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ToastComponent, isStandalone: true, selector: "ds-toast", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "<div\n aria-atomic=\"true\"\n [class]=\"classes()\"\n [attr.role]=\"role()\"\n [attr.aria-live]=\"role() === 'alert' ? 'assertive' : 'polite'\"\n>\n @if (isLoading()) {\n <ds-spinner\n class=\"icon\"\n size=\"sm\"\n />\n } @else {\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"16\"\n />\n }\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n {{ message() }}\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 >\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 aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_toast-leave-duration: var(--ds-toast-leave-duration, var(--duration-base));--_toast-leave-easing: var(--ds-toast-leave-easing, var(--ease-standard));display:block;transition:opacity var(--_toast-leave-duration) var(--_toast-leave-easing),transform var(--_toast-leave-duration) var(--_toast-leave-easing)}:host(.leaving){opacity:0;transform:translateY(calc(var(--space-2) * -1));pointer-events:none}.toast{--_toast-bg-color: var(--ds-toast-bg-color, var(--surface-overlay));--_toast-border: var(--ds-toast-border, var(--border-default));--_toast-focus-shadow: var(--ds-toast-focus-shadow, var(--ds-control-focus-shadow));--_toast-bar-color: var(--ds-toast-bar-color, var(--accent));--_toast-icon-color: var(--ds-toast-icon-color, var(--accent));--_toast-enter-keyframes: var(--ds-toast-enter-keyframes, ds-slide-in);--_toast-enter-duration: var(--ds-toast-enter-duration, var(--ds-motion-enter-large-duration));--_toast-enter-easing: var(--ds-toast-enter-easing, var(--ds-motion-enter-large-easing));--_toast-enter-offset: var(--ds-toast-enter-offset, var(--space-2));--_toast-min-width: var(--ds-toast-min-width, var(--toast-minw));--_toast-max-width: var(--ds-toast-max-width, var(--toast-maxw));--_ds-enter-y: var(--_toast-enter-offset);--_ds-enter-scale: var(--ds-toast-enter-scale, .96);display:flex;align-items:flex-start;gap:var(--space-3);background-color:var(--_toast-bg-color);border:var(--border-width-default) solid var(--_toast-border);border-left:var(--toast-bar-w) solid var(--_toast-bar-color);border-radius:var(--radius-lg);padding:var(--space-3) var(--space-4);box-shadow:var(--shadow-toast);min-width:var(--_toast-min-width);max-width:var(--_toast-max-width);animation-name:var(--_toast-enter-keyframes);animation-duration:var(--_toast-enter-duration);animation-timing-function:var(--_toast-enter-easing)}@media(prefers-reduced-motion:reduce){.toast{--_toast-enter-duration: 0ms}}.toast .icon{color:var(--_toast-icon-color);flex-shrink:0;
|
|
10549
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ToastComponent, isStandalone: true, selector: "ds-toast", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "<div\n aria-atomic=\"true\"\n [class]=\"classes()\"\n [attr.role]=\"role()\"\n [attr.aria-live]=\"role() === 'alert' ? 'assertive' : 'polite'\"\n>\n @if (isLoading()) {\n <ds-spinner\n class=\"icon\"\n size=\"sm\"\n />\n } @else {\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"16\"\n />\n }\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n {{ message() }}\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 >\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 aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_toast-leave-duration: var(--ds-toast-leave-duration, var(--duration-base));--_toast-leave-easing: var(--ds-toast-leave-easing, var(--ease-standard));display:block;transition:opacity var(--_toast-leave-duration) var(--_toast-leave-easing),transform var(--_toast-leave-duration) var(--_toast-leave-easing)}:host(.leaving){opacity:0;transform:translateY(calc(var(--space-2) * -1));pointer-events:none}.toast{--_toast-bg-color: var(--ds-toast-bg-color, var(--surface-overlay));--_toast-border: var(--ds-toast-border, var(--border-default));--_toast-focus-shadow: var(--ds-toast-focus-shadow, var(--ds-control-focus-shadow));--_toast-bar-color: var(--ds-toast-bar-color, var(--accent));--_toast-icon-color: var(--ds-toast-icon-color, var(--accent));--_toast-enter-keyframes: var(--ds-toast-enter-keyframes, ds-slide-in);--_toast-enter-duration: var(--ds-toast-enter-duration, var(--ds-motion-enter-large-duration));--_toast-enter-easing: var(--ds-toast-enter-easing, var(--ds-motion-enter-large-easing));--_toast-enter-offset: var(--ds-toast-enter-offset, var(--space-2));--_toast-min-width: var(--ds-toast-min-width, var(--toast-minw));--_toast-max-width: var(--ds-toast-max-width, var(--toast-maxw));--_ds-enter-y: var(--_toast-enter-offset);--_ds-enter-scale: var(--ds-toast-enter-scale, .96);display:flex;align-items:flex-start;gap:var(--space-3);background-color:var(--_toast-bg-color);border:var(--border-width-default) solid var(--_toast-border);border-left:var(--toast-bar-w) solid var(--_toast-bar-color);border-radius:var(--radius-lg);padding:var(--space-3) var(--space-4);box-shadow:var(--shadow-toast);min-width:var(--_toast-min-width);max-width:var(--_toast-max-width);animation-name:var(--_toast-enter-keyframes);animation-duration:var(--_toast-enter-duration);animation-timing-function:var(--_toast-enter-easing)}@media(prefers-reduced-motion:reduce){.toast{--_toast-enter-duration: 0ms}}.toast .icon{color:var(--_toast-icon-color);flex-shrink:0;align-self:center}.toast .body{flex:1;min-width:0;overflow-wrap:anywhere;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-secondary)}.toast .title{font-weight:var(--font-weight-bold);color:var(--text-primary);margin-bottom:var(--space-0-5)}.toast .close{border:0;background:transparent;color:var(--icon-default);cursor:pointer;padding:var(--space-0-5)}.toast .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.toast .action{flex-shrink:0;align-self:center;border:0;background:transparent;color:var(--accent-strong);font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);cursor:pointer;padding:var(--space-1) var(--space-2);border-radius:var(--ds-radius-inner)}.toast .action:hover{background:var(--surface-secondary)}.toast .action:focus-visible{outline:none;box-shadow:var(--_toast-focus-shadow)}.toast .actions{display:inline-flex;align-items:center;gap:var(--space-2);flex-shrink:0}.toast .actions:empty{display:none}.toast.info{--_toast-bg-color: var(--ds-toast-bg-color-info, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-info, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--accent));--_toast-icon-color: var(--ds-toast-icon-color, var(--accent));border-left-color:var(--_toast-bar-color)}.toast.success{--_toast-bg-color: var(--ds-toast-bg-color-success, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-success, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--success));--_toast-icon-color: var(--ds-toast-icon-color, var(--success));border-left-color:var(--_toast-bar-color)}.toast.success .icon{color:var(--_toast-icon-color)}.toast.warning{--_toast-bg-color: var(--ds-toast-bg-color-warning, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-warning, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--warning-hover));--_toast-icon-color: var(--ds-toast-icon-color, var(--warning-hover));border-left-color:var(--_toast-bar-color)}.toast.warning .icon{color:var(--_toast-icon-color)}.toast.error{--_toast-bg-color: var(--ds-toast-bg-color-error, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-error, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--error));--_toast-icon-color: var(--ds-toast-icon-color, var(--error));border-left-color:var(--_toast-bar-color)}.toast.error .icon{color:var(--_toast-icon-color)}.toast.loading{border-left-color:var(--accent)}.toast.loading .icon{color:var(--accent)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "component", type: SpinnerComponent, selector: "ds-spinner", inputs: ["size"] }] });
|
|
10689
10550
|
}
|
|
10690
10551
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ToastComponent, decorators: [{
|
|
10691
10552
|
type: Component,
|
|
10692
|
-
args: [{ selector: 'ds-toast', standalone: true, imports: [IconComponent, SpinnerComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div\n aria-atomic=\"true\"\n [class]=\"classes()\"\n [attr.role]=\"role()\"\n [attr.aria-live]=\"role() === 'alert' ? 'assertive' : 'polite'\"\n>\n @if (isLoading()) {\n <ds-spinner\n class=\"icon\"\n size=\"sm\"\n />\n } @else {\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"16\"\n />\n }\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n {{ message() }}\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 >\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 aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_toast-leave-duration: var(--ds-toast-leave-duration, var(--duration-base));--_toast-leave-easing: var(--ds-toast-leave-easing, var(--ease-standard));display:block;transition:opacity var(--_toast-leave-duration) var(--_toast-leave-easing),transform var(--_toast-leave-duration) var(--_toast-leave-easing)}:host(.leaving){opacity:0;transform:translateY(calc(var(--space-2) * -1));pointer-events:none}.toast{--_toast-bg-color: var(--ds-toast-bg-color, var(--surface-overlay));--_toast-border: var(--ds-toast-border, var(--border-default));--_toast-focus-shadow: var(--ds-toast-focus-shadow, var(--ds-control-focus-shadow));--_toast-bar-color: var(--ds-toast-bar-color, var(--accent));--_toast-icon-color: var(--ds-toast-icon-color, var(--accent));--_toast-enter-keyframes: var(--ds-toast-enter-keyframes, ds-slide-in);--_toast-enter-duration: var(--ds-toast-enter-duration, var(--ds-motion-enter-large-duration));--_toast-enter-easing: var(--ds-toast-enter-easing, var(--ds-motion-enter-large-easing));--_toast-enter-offset: var(--ds-toast-enter-offset, var(--space-2));--_toast-min-width: var(--ds-toast-min-width, var(--toast-minw));--_toast-max-width: var(--ds-toast-max-width, var(--toast-maxw));--_ds-enter-y: var(--_toast-enter-offset);--_ds-enter-scale: var(--ds-toast-enter-scale, .96);display:flex;align-items:flex-start;gap:var(--space-3);background-color:var(--_toast-bg-color);border:var(--border-width-default) solid var(--_toast-border);border-left:var(--toast-bar-w) solid var(--_toast-bar-color);border-radius:var(--radius-lg);padding:var(--space-3) var(--space-4);box-shadow:var(--shadow-toast);min-width:var(--_toast-min-width);max-width:var(--_toast-max-width);animation-name:var(--_toast-enter-keyframes);animation-duration:var(--_toast-enter-duration);animation-timing-function:var(--_toast-enter-easing)}@media(prefers-reduced-motion:reduce){.toast{--_toast-enter-duration: 0ms}}.toast .icon{color:var(--_toast-icon-color);flex-shrink:0;
|
|
10553
|
+
args: [{ selector: 'ds-toast', standalone: true, imports: [IconComponent, SpinnerComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div\n aria-atomic=\"true\"\n [class]=\"classes()\"\n [attr.role]=\"role()\"\n [attr.aria-live]=\"role() === 'alert' ? 'assertive' : 'polite'\"\n>\n @if (isLoading()) {\n <ds-spinner\n class=\"icon\"\n size=\"sm\"\n />\n } @else {\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"16\"\n />\n }\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n {{ message() }}\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 >\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 aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"14\"\n />\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{--_toast-leave-duration: var(--ds-toast-leave-duration, var(--duration-base));--_toast-leave-easing: var(--ds-toast-leave-easing, var(--ease-standard));display:block;transition:opacity var(--_toast-leave-duration) var(--_toast-leave-easing),transform var(--_toast-leave-duration) var(--_toast-leave-easing)}:host(.leaving){opacity:0;transform:translateY(calc(var(--space-2) * -1));pointer-events:none}.toast{--_toast-bg-color: var(--ds-toast-bg-color, var(--surface-overlay));--_toast-border: var(--ds-toast-border, var(--border-default));--_toast-focus-shadow: var(--ds-toast-focus-shadow, var(--ds-control-focus-shadow));--_toast-bar-color: var(--ds-toast-bar-color, var(--accent));--_toast-icon-color: var(--ds-toast-icon-color, var(--accent));--_toast-enter-keyframes: var(--ds-toast-enter-keyframes, ds-slide-in);--_toast-enter-duration: var(--ds-toast-enter-duration, var(--ds-motion-enter-large-duration));--_toast-enter-easing: var(--ds-toast-enter-easing, var(--ds-motion-enter-large-easing));--_toast-enter-offset: var(--ds-toast-enter-offset, var(--space-2));--_toast-min-width: var(--ds-toast-min-width, var(--toast-minw));--_toast-max-width: var(--ds-toast-max-width, var(--toast-maxw));--_ds-enter-y: var(--_toast-enter-offset);--_ds-enter-scale: var(--ds-toast-enter-scale, .96);display:flex;align-items:flex-start;gap:var(--space-3);background-color:var(--_toast-bg-color);border:var(--border-width-default) solid var(--_toast-border);border-left:var(--toast-bar-w) solid var(--_toast-bar-color);border-radius:var(--radius-lg);padding:var(--space-3) var(--space-4);box-shadow:var(--shadow-toast);min-width:var(--_toast-min-width);max-width:var(--_toast-max-width);animation-name:var(--_toast-enter-keyframes);animation-duration:var(--_toast-enter-duration);animation-timing-function:var(--_toast-enter-easing)}@media(prefers-reduced-motion:reduce){.toast{--_toast-enter-duration: 0ms}}.toast .icon{color:var(--_toast-icon-color);flex-shrink:0;align-self:center}.toast .body{flex:1;min-width:0;overflow-wrap:anywhere;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-secondary)}.toast .title{font-weight:var(--font-weight-bold);color:var(--text-primary);margin-bottom:var(--space-0-5)}.toast .close{border:0;background:transparent;color:var(--icon-default);cursor:pointer;padding:var(--space-0-5)}.toast .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.toast .action{flex-shrink:0;align-self:center;border:0;background:transparent;color:var(--accent-strong);font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans);cursor:pointer;padding:var(--space-1) var(--space-2);border-radius:var(--ds-radius-inner)}.toast .action:hover{background:var(--surface-secondary)}.toast .action:focus-visible{outline:none;box-shadow:var(--_toast-focus-shadow)}.toast .actions{display:inline-flex;align-items:center;gap:var(--space-2);flex-shrink:0}.toast .actions:empty{display:none}.toast.info{--_toast-bg-color: var(--ds-toast-bg-color-info, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-info, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--accent));--_toast-icon-color: var(--ds-toast-icon-color, var(--accent));border-left-color:var(--_toast-bar-color)}.toast.success{--_toast-bg-color: var(--ds-toast-bg-color-success, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-success, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--success));--_toast-icon-color: var(--ds-toast-icon-color, var(--success));border-left-color:var(--_toast-bar-color)}.toast.success .icon{color:var(--_toast-icon-color)}.toast.warning{--_toast-bg-color: var(--ds-toast-bg-color-warning, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-warning, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--warning-hover));--_toast-icon-color: var(--ds-toast-icon-color, var(--warning-hover));border-left-color:var(--_toast-bar-color)}.toast.warning .icon{color:var(--_toast-icon-color)}.toast.error{--_toast-bg-color: var(--ds-toast-bg-color-error, var(--ds-toast-bg-color, var(--surface-overlay)));--_toast-border: var(--ds-toast-border-error, var(--ds-toast-border, var(--border-default)));--_toast-bar-color: var(--ds-toast-bar-color, var(--error));--_toast-icon-color: var(--ds-toast-icon-color, var(--error));border-left-color:var(--_toast-bar-color)}.toast.error .icon{color:var(--_toast-icon-color)}.toast.loading{border-left-color:var(--accent)}.toast.loading .icon{color:var(--accent)}\n"] }]
|
|
10693
10554
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
10694
10555
|
|
|
10695
10556
|
// Must match the leave transition on :host in toast.component.scss (--duration-base).
|
|
10696
10557
|
const LEAVE_DURATION_MS = 180;
|
|
10558
|
+
// A toast whose clock ran out while the pointer was over it should not vanish the
|
|
10559
|
+
// instant the pointer leaves — the reader gets this much to see it go.
|
|
10560
|
+
const MIN_RESUME_MS = 600;
|
|
10697
10561
|
class ToastRegionComponent {
|
|
10698
10562
|
/** Cap on concurrently visible toasts. Extras are queued and shown as
|
|
10699
10563
|
* earlier ones dismiss. 0 = unlimited (default). */
|
|
@@ -10702,6 +10566,11 @@ class ToastRegionComponent {
|
|
|
10702
10566
|
leaving = signal(new Set(), ...(ngDevMode ? [{ debugName: "leaving" }] : /* istanbul ignore next */ []));
|
|
10703
10567
|
pendingQueue = [];
|
|
10704
10568
|
timers = new Map();
|
|
10569
|
+
remaining = new Map();
|
|
10570
|
+
startedAt = new Map();
|
|
10571
|
+
hovered = false;
|
|
10572
|
+
focusWithin = false;
|
|
10573
|
+
host = inject(ElementRef);
|
|
10705
10574
|
position = inject(DS_TOAST_POSITION, { optional: true });
|
|
10706
10575
|
/** Newest goes NEAREST the anchor, so the toast that just fired appears where the
|
|
10707
10576
|
* stack is pinned rather than at the far end of a list the reader has to hunt
|
|
@@ -10717,13 +10586,24 @@ class ToastRegionComponent {
|
|
|
10717
10586
|
}
|
|
10718
10587
|
show(entry) {
|
|
10719
10588
|
this.visibleEntries.update((existing) => this.newestFirst ? [entry, ...existing] : [...existing, entry]);
|
|
10720
|
-
this.
|
|
10589
|
+
this.arm(entry.id, entry.durationMs);
|
|
10721
10590
|
}
|
|
10722
|
-
|
|
10723
|
-
if (
|
|
10591
|
+
arm(id, remaining) {
|
|
10592
|
+
if (remaining <= 0) {
|
|
10593
|
+
return;
|
|
10594
|
+
}
|
|
10595
|
+
this.remaining.set(id, remaining);
|
|
10596
|
+
// A toast can be armed with no user event anywhere near it — promoteFromQueue runs from a
|
|
10597
|
+
// timeout — so this has to bank rather than trust that a pause event will follow.
|
|
10598
|
+
if (this.hovered || this.focusWithin) {
|
|
10599
|
+
this.startedAt.delete(id);
|
|
10724
10600
|
return;
|
|
10725
10601
|
}
|
|
10726
|
-
this.
|
|
10602
|
+
this.startedAt.set(id, Date.now());
|
|
10603
|
+
const existing = this.timers.get(id);
|
|
10604
|
+
if (existing !== undefined)
|
|
10605
|
+
window.clearTimeout(existing);
|
|
10606
|
+
this.timers.set(id, window.setTimeout(() => this.remove(id), remaining));
|
|
10727
10607
|
}
|
|
10728
10608
|
clearCountdown(id) {
|
|
10729
10609
|
const timer = this.timers.get(id);
|
|
@@ -10731,12 +10611,68 @@ class ToastRegionComponent {
|
|
|
10731
10611
|
window.clearTimeout(timer);
|
|
10732
10612
|
this.timers.delete(id);
|
|
10733
10613
|
}
|
|
10614
|
+
this.remaining.delete(id);
|
|
10615
|
+
this.startedAt.delete(id);
|
|
10616
|
+
}
|
|
10617
|
+
/** A toast holding the pointer or the keyboard is being read or acted on, so its
|
|
10618
|
+
* clock stops. Without this the only control for an `action` can be destroyed
|
|
10619
|
+
* while the user is reaching for it — and the region sits last in tab order, so
|
|
10620
|
+
* reaching it takes longer than the default five seconds on any real page. */
|
|
10621
|
+
onHover(entered) {
|
|
10622
|
+
this.hovered = entered;
|
|
10623
|
+
this.syncPause();
|
|
10624
|
+
}
|
|
10625
|
+
// `focusout` bubbles, so it also fires when focus moves BETWEEN elements inside the region —
|
|
10626
|
+
// tabbing from the action to the close button. Without the containment check that reads as
|
|
10627
|
+
// leaving, and every round trip re-floors the remainder at MIN_RESUME_MS.
|
|
10628
|
+
onFocusWithin(event) {
|
|
10629
|
+
this.focusWithin =
|
|
10630
|
+
event === true ||
|
|
10631
|
+
(event.relatedTarget instanceof Node &&
|
|
10632
|
+
this.host.nativeElement.contains(event.relatedTarget));
|
|
10633
|
+
this.syncPause();
|
|
10634
|
+
}
|
|
10635
|
+
syncPause() {
|
|
10636
|
+
const shouldPause = this.hovered || this.focusWithin;
|
|
10637
|
+
if (shouldPause === this.paused) {
|
|
10638
|
+
return;
|
|
10639
|
+
}
|
|
10640
|
+
if (shouldPause)
|
|
10641
|
+
this.pauseAll();
|
|
10642
|
+
else
|
|
10643
|
+
this.resumeAll();
|
|
10644
|
+
}
|
|
10645
|
+
get paused() {
|
|
10646
|
+
return this.timers.size === 0 && this.remaining.size > 0;
|
|
10647
|
+
}
|
|
10648
|
+
pauseAll() {
|
|
10649
|
+
const now = Date.now();
|
|
10650
|
+
for (const [id, timer] of this.timers) {
|
|
10651
|
+
window.clearTimeout(timer);
|
|
10652
|
+
const left = (this.remaining.get(id) ?? 0) - (now - (this.startedAt.get(id) ?? now));
|
|
10653
|
+
this.remaining.set(id, Math.max(left, MIN_RESUME_MS));
|
|
10654
|
+
}
|
|
10655
|
+
this.timers.clear();
|
|
10734
10656
|
}
|
|
10735
|
-
|
|
10657
|
+
resumeAll() {
|
|
10658
|
+
for (const [id, left] of [...this.remaining]) {
|
|
10659
|
+
this.arm(id, left);
|
|
10660
|
+
}
|
|
10661
|
+
}
|
|
10662
|
+
/** Replace fields of an already-visible or queued toast in place.
|
|
10663
|
+
*
|
|
10664
|
+
* Patching `durationMs` restarts the clock, and for a QUEUED toast it only takes
|
|
10665
|
+
* effect on promotion — which is the whole point: `promise()` patches a loading
|
|
10666
|
+
* toast (duration 0) into a settled one, and if that toast is still behind the cap
|
|
10667
|
+
* its new duration must not start burning down while it is invisible. */
|
|
10736
10668
|
update(id, patch) {
|
|
10737
10669
|
const inVisible = this.visibleEntries().some((entry) => entry.id === id);
|
|
10738
10670
|
if (inVisible) {
|
|
10739
10671
|
this.visibleEntries.update((entries) => entries.map((entry) => entry.id === id ? { ...entry, ...patch } : entry));
|
|
10672
|
+
if (patch.durationMs !== undefined) {
|
|
10673
|
+
this.clearCountdown(id);
|
|
10674
|
+
this.arm(id, patch.durationMs);
|
|
10675
|
+
}
|
|
10740
10676
|
return;
|
|
10741
10677
|
}
|
|
10742
10678
|
const queueIndex = this.pendingQueue.findIndex((entry) => entry.id === id);
|
|
@@ -10774,6 +10710,8 @@ class ToastRegionComponent {
|
|
|
10774
10710
|
clear() {
|
|
10775
10711
|
this.timers.forEach((timer) => window.clearTimeout(timer));
|
|
10776
10712
|
this.timers.clear();
|
|
10713
|
+
this.remaining.clear();
|
|
10714
|
+
this.startedAt.clear();
|
|
10777
10715
|
this.visibleEntries.set([]);
|
|
10778
10716
|
this.leaving.set(new Set());
|
|
10779
10717
|
this.pendingQueue.length = 0;
|
|
@@ -10789,16 +10727,23 @@ class ToastRegionComponent {
|
|
|
10789
10727
|
this.show(this.pendingQueue.shift());
|
|
10790
10728
|
}
|
|
10791
10729
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ToastRegionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10792
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ToastRegionComponent, isStandalone: true, selector: "ds-toast-region", inputs: { maxVisible: { classPropertyName: "maxVisible", publicName: "maxVisible", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "region", "aria-label": "Notifications" } }, ngImport: i0, template: "@for (entry of visibleEntries(); track entry.id) {\n <ds-toast\n [variant]=\"entry.variant\"\n [title]=\"entry.title ?? ''\"\n [message]=\"entry.body\"\n [dismissible]=\"entry.dismissible\"\n [action]=\"entry.action ?? null\"\n [class.leaving]=\"isLeaving(entry.id)\"\n (closed)=\"remove(entry.id)\"\n />\n}\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;gap:var(--space-2)}\n"], dependencies: [{ kind: "component", type: ToastComponent, selector: "ds-toast", inputs: ["variant", "title", "message", "dismissible", "icon", "action"], outputs: ["closed"] }] });
|
|
10730
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: ToastRegionComponent, isStandalone: true, selector: "ds-toast-region", inputs: { maxVisible: { classPropertyName: "maxVisible", publicName: "maxVisible", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "region", "aria-label": "Notifications" }, listeners: { "mouseenter": "onHover(true)", "mouseleave": "onHover(false)", "focusin": "onFocusWithin(true)", "focusout": "onFocusWithin($event)" } }, ngImport: i0, template: "@for (entry of visibleEntries(); track entry.id) {\n <ds-toast\n [variant]=\"entry.variant\"\n [title]=\"entry.title ?? ''\"\n [message]=\"entry.body\"\n [dismissible]=\"entry.dismissible\"\n [action]=\"entry.action ?? null\"\n [class.leaving]=\"isLeaving(entry.id)\"\n (closed)=\"remove(entry.id)\"\n />\n}\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;gap:var(--space-2)}\n"], dependencies: [{ kind: "component", type: ToastComponent, selector: "ds-toast", inputs: ["variant", "title", "message", "dismissible", "icon", "action"], outputs: ["closed"] }] });
|
|
10793
10731
|
}
|
|
10794
10732
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ToastRegionComponent, decorators: [{
|
|
10795
10733
|
type: Component,
|
|
10796
10734
|
args: [{ selector: 'ds-toast-region', standalone: true, imports: [ToastComponent], encapsulation: ViewEncapsulation.Emulated, host: {
|
|
10797
10735
|
role: 'region',
|
|
10798
10736
|
'aria-label': 'Notifications',
|
|
10737
|
+
'(mouseenter)': 'onHover(true)',
|
|
10738
|
+
'(mouseleave)': 'onHover(false)',
|
|
10739
|
+
'(focusin)': 'onFocusWithin(true)',
|
|
10740
|
+
'(focusout)': 'onFocusWithin($event)',
|
|
10799
10741
|
}, template: "@for (entry of visibleEntries(); track entry.id) {\n <ds-toast\n [variant]=\"entry.variant\"\n [title]=\"entry.title ?? ''\"\n [message]=\"entry.body\"\n [dismissible]=\"entry.dismissible\"\n [action]=\"entry.action ?? null\"\n [class.leaving]=\"isLeaving(entry.id)\"\n (closed)=\"remove(entry.id)\"\n />\n}\n", styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;gap:var(--space-2)}\n"] }]
|
|
10800
10742
|
}], propDecorators: { maxVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisible", required: false }] }] } });
|
|
10801
10743
|
|
|
10744
|
+
// An error stays longer than a success: it usually needs reading, and often acting on.
|
|
10745
|
+
const SETTLED_SUCCESS_MS = 4000;
|
|
10746
|
+
const SETTLED_ERROR_MS = 6000;
|
|
10802
10747
|
class ToastService {
|
|
10803
10748
|
overlay = inject(Overlay);
|
|
10804
10749
|
position = inject(DS_TOAST_POSITION, { optional: true });
|
|
@@ -10810,14 +10755,18 @@ class ToastService {
|
|
|
10810
10755
|
this.ensureRegion();
|
|
10811
10756
|
const id = this.nextId++;
|
|
10812
10757
|
const variant = opts.variant ?? 'info';
|
|
10813
|
-
// Loading toasts never auto-dismiss (0 = indefinite).
|
|
10814
|
-
|
|
10758
|
+
// Loading toasts never auto-dismiss (0 = indefinite). Nor does one carrying an
|
|
10759
|
+
// `action`: that button is the only way to take the action, the region sits last
|
|
10760
|
+
// in tab order, and a keyboard user cannot reach it inside five seconds.
|
|
10761
|
+
const durationMs = variant === 'loading' || opts.action ? 0 : (opts.durationMs ?? 5000);
|
|
10815
10762
|
const entry = {
|
|
10816
10763
|
id,
|
|
10817
10764
|
title: opts.title,
|
|
10818
10765
|
body: opts.body,
|
|
10819
10766
|
variant,
|
|
10820
|
-
|
|
10767
|
+
// Nothing that cannot expire may also be unclosable, or it holds a slot for the
|
|
10768
|
+
// life of the page — which is how a hung promise blocked the whole region.
|
|
10769
|
+
dismissible: durationMs > 0 ? (opts.dismissible ?? true) : true,
|
|
10821
10770
|
action: opts.action,
|
|
10822
10771
|
durationMs,
|
|
10823
10772
|
};
|
|
@@ -10829,15 +10778,23 @@ class ToastService {
|
|
|
10829
10778
|
dismiss: () => this.regionRef?.instance.remove(id),
|
|
10830
10779
|
};
|
|
10831
10780
|
}
|
|
10832
|
-
/** Show a loading toast for the duration of `
|
|
10833
|
-
* reflected in-place (same toast, no stack-up) as success/error variants
|
|
10781
|
+
/** Show a loading toast for the duration of `source`. Resolution and rejection are
|
|
10782
|
+
* reflected in-place (same toast, no stack-up) as success/error variants, each with
|
|
10783
|
+
* its own auto-dismiss delay.
|
|
10784
|
+
*
|
|
10785
|
+
* Returns `source` itself, so the caller still owns rejection handling — an
|
|
10786
|
+
* un-`catch`ed call produces an unhandled rejection exactly as it would without a
|
|
10787
|
+
* toast. */
|
|
10834
10788
|
promise(source, messages) {
|
|
10835
10789
|
const ref = this.show({
|
|
10836
10790
|
body: messages.loading,
|
|
10837
10791
|
variant: 'loading',
|
|
10838
|
-
dismissible: false,
|
|
10839
10792
|
durationMs: 0,
|
|
10840
10793
|
});
|
|
10794
|
+
// The settled duration is handed to the REGION rather than run here, because only
|
|
10795
|
+
// the region knows when the toast becomes visible. Run from here it burned down
|
|
10796
|
+
// while the toast was still queued behind `maxVisible`, and the result was spliced
|
|
10797
|
+
// out of the queue before anyone saw it.
|
|
10841
10798
|
source.then((value) => {
|
|
10842
10799
|
const successBody = typeof messages.success === 'function'
|
|
10843
10800
|
? messages.success(value)
|
|
@@ -10846,8 +10803,8 @@ class ToastService {
|
|
|
10846
10803
|
body: successBody,
|
|
10847
10804
|
variant: 'success',
|
|
10848
10805
|
dismissible: true,
|
|
10806
|
+
durationMs: SETTLED_SUCCESS_MS,
|
|
10849
10807
|
});
|
|
10850
|
-
window.setTimeout(() => ref.dismiss(), 4000);
|
|
10851
10808
|
}, (reason) => {
|
|
10852
10809
|
const errorBody = typeof messages.error === 'function'
|
|
10853
10810
|
? messages.error(reason)
|
|
@@ -10856,8 +10813,8 @@ class ToastService {
|
|
|
10856
10813
|
body: errorBody,
|
|
10857
10814
|
variant: 'error',
|
|
10858
10815
|
dismissible: true,
|
|
10816
|
+
durationMs: SETTLED_ERROR_MS,
|
|
10859
10817
|
});
|
|
10860
|
-
window.setTimeout(() => ref.dismiss(), 6000);
|
|
10861
10818
|
});
|
|
10862
10819
|
return source;
|
|
10863
10820
|
}
|
|
@@ -11095,17 +11052,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
11095
11052
|
*
|
|
11096
11053
|
* INVARIANT: nothing here may measure something the cut itself changes, or the
|
|
11097
11054
|
* measurement feeds back into its own input and the split never settles — a hung
|
|
11098
|
-
* page, not a wrong number. Hence the
|
|
11099
|
-
*
|
|
11055
|
+
* page, not a wrong number. Hence the budget comes off the trigger's PARENT
|
|
11056
|
+
* content box (the trigger's own width is the fallback for when there is no usable
|
|
11057
|
+
* parent), never the row, and the "+N more" marker gets a fixed reserve rather
|
|
11058
|
+
* than a measurement.
|
|
11100
11059
|
*
|
|
11101
|
-
* The caller owes two things
|
|
11102
|
-
*
|
|
11103
|
-
*
|
|
11060
|
+
* The caller owes two things: chips carry `data-chip`, and they sit in a row of
|
|
11061
|
+
* their own that is a direct child of the trigger. `enabled` gates the whole thing
|
|
11062
|
+
* because measuring forces layout.
|
|
11104
11063
|
*/
|
|
11105
11064
|
/**
|
|
11106
|
-
*
|
|
11107
|
-
*
|
|
11108
|
-
* case it carries the same feedback and measuring it would buy nothing.
|
|
11065
|
+
* Null when there is no usable parent — a detached node, or one that hugs its
|
|
11066
|
+
* content too, which carries the same feedback loop the trigger does.
|
|
11109
11067
|
*/
|
|
11110
11068
|
function hostContentWidth(host) {
|
|
11111
11069
|
if (!host || host.clientWidth === 0) {
|
|
@@ -11131,10 +11089,7 @@ function reservedWidth(element) {
|
|
|
11131
11089
|
: element.offsetWidth;
|
|
11132
11090
|
}
|
|
11133
11091
|
function chipFit(count, chipRow, enabled,
|
|
11134
|
-
/** The whole selection, which `count` may already cap.
|
|
11135
|
-
* the marker's room only when there is genuinely nothing left to announce —
|
|
11136
|
-
* with a numeric cap there always is, and letting it spend anyway clipped the
|
|
11137
|
-
* "+N more" text itself. */
|
|
11092
|
+
/** The whole selection, which `count` may already cap. */
|
|
11138
11093
|
selectionSize = count) {
|
|
11139
11094
|
const available = signal(0, ...(ngDevMode ? [{ debugName: "available" }] : /* istanbul ignore next */ []));
|
|
11140
11095
|
const gap = signal(0, ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
|
|
@@ -11144,9 +11099,8 @@ selectionSize = count) {
|
|
|
11144
11099
|
/** `count` at that render, so a stale cache is never trusted. */
|
|
11145
11100
|
const measuredFor = signal(-1, ...(ngDevMode ? [{ debugName: "measuredFor" }] : /* istanbul ignore next */ []));
|
|
11146
11101
|
/** Geometry the last measure ran against, to skip one that would repeat it.
|
|
11147
|
-
* Each forces layout:
|
|
11148
|
-
*
|
|
11149
|
-
* wrapping default. */
|
|
11102
|
+
* Each forces layout: without this guard a single docs page load measured 214
|
|
11103
|
+
* times across seven pickers. */
|
|
11150
11104
|
let lastWidth = -1;
|
|
11151
11105
|
let lastCount = -1;
|
|
11152
11106
|
const measure = (row) => {
|
|
@@ -11154,12 +11108,11 @@ selectionSize = count) {
|
|
|
11154
11108
|
if (!trigger) {
|
|
11155
11109
|
return;
|
|
11156
11110
|
}
|
|
11157
|
-
//
|
|
11158
|
-
//
|
|
11159
|
-
//
|
|
11160
|
-
//
|
|
11161
|
-
//
|
|
11162
|
-
// are the same number, so nothing changes there.
|
|
11111
|
+
// A trigger that hugs its content (`width: fit-content`, which both compact
|
|
11112
|
+
// modes set) has a width decided by the chips this cut removes, so reading it
|
|
11113
|
+
// feeds the result back into its own input. The parent's content box is the
|
|
11114
|
+
// space actually available and does not move when the chips do; for a `fill`
|
|
11115
|
+
// trigger the two are the same number.
|
|
11163
11116
|
const host = trigger.parentElement;
|
|
11164
11117
|
const budget = hostContentWidth(host) ?? trigger.clientWidth;
|
|
11165
11118
|
const width = budget;
|
|
@@ -11479,7 +11432,6 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
11479
11432
|
isGroup(item) {
|
|
11480
11433
|
return isDsOptionGroup(item);
|
|
11481
11434
|
}
|
|
11482
|
-
/** Whether to show the "Create «text»" row at the bottom of the panel. */
|
|
11483
11435
|
showCreateRow = computed(() => {
|
|
11484
11436
|
if (!this.allowCreate()) {
|
|
11485
11437
|
return false;
|
|
@@ -11491,7 +11443,6 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
11491
11443
|
const lowerText = text.toLowerCase();
|
|
11492
11444
|
return !this.allOptions().some((option) => option.label.toLowerCase() === lowerText);
|
|
11493
11445
|
}, ...(ngDevMode ? [{ debugName: "showCreateRow" }] : /* istanbul ignore next */ []));
|
|
11494
|
-
/** Flat list of visible options used for keyboard navigation index. */
|
|
11495
11446
|
visibleOptions = computed(() => this.filteredOptions(), ...(ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []));
|
|
11496
11447
|
/** The visible label wins the accessible name when there is one — otherwise the
|
|
11497
11448
|
* placeholder would announce over it, and `placeholder` always carries a default. */
|
|
@@ -11506,14 +11457,13 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
11506
11457
|
}, ...(ngDevMode ? [{ debugName: "selectedTags" }] : /* istanbul ignore next */ []));
|
|
11507
11458
|
chipsMode = computed(() => this.maxVisibleChips() ?? 'fit', ...(ngDevMode ? [{ debugName: "chipsMode" }] : /* istanbul ignore next */ []));
|
|
11508
11459
|
showsEveryChip = computed(() => this.chipsMode() === 'all', ...(ngDevMode ? [{ debugName: "showsEveryChip" }] : /* istanbul ignore next */ []));
|
|
11509
|
-
/** True for
|
|
11510
|
-
*
|
|
11460
|
+
/** True for a number as well as `'fit'`: a number is a ceiling, not a promise,
|
|
11461
|
+
* so the row still measures. */
|
|
11511
11462
|
fitsChipsToWidth = computed(() => !this.showsEveryChip(), ...(ngDevMode ? [{ debugName: "fitsChipsToWidth" }] : /* istanbul ignore next */ []));
|
|
11512
|
-
/** How many chips the row is ASKED to render before measuring
|
|
11513
|
-
*
|
|
11514
|
-
*
|
|
11515
|
-
*
|
|
11516
|
-
* never fills, and the fit fell back to "show them all" without a word. */
|
|
11463
|
+
/** How many chips the row is ASKED to render before measuring. It has to be the
|
|
11464
|
+
* ceiling and not the selection: the measurement caches chip widths from a
|
|
11465
|
+
* render that holds them all, so with a numeric cap that render never happens,
|
|
11466
|
+
* the cache never fills, and the fit silently falls back to showing them all. */
|
|
11517
11467
|
chipBudget = computed(() => {
|
|
11518
11468
|
const max = this.chipsMode();
|
|
11519
11469
|
const total = this.selectedTags().length;
|
|
@@ -11573,22 +11523,20 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
11573
11523
|
}
|
|
11574
11524
|
return parts.join(' ');
|
|
11575
11525
|
}
|
|
11576
|
-
/**
|
|
11577
|
-
* every option is disabled. */
|
|
11526
|
+
/** -1 when nothing is pickable and there is no create row to fall back on. */
|
|
11578
11527
|
firstEnabledIndex() {
|
|
11579
11528
|
const index = this.visibleOptions().findIndex((option) => !option.disabled);
|
|
11580
11529
|
if (index >= 0) {
|
|
11581
11530
|
return index;
|
|
11582
11531
|
}
|
|
11583
|
-
// With nothing pickable
|
|
11584
|
-
//
|
|
11585
|
-
//
|
|
11532
|
+
// With nothing pickable the create row IS the list; a -1 cursor would leave
|
|
11533
|
+
// Enter doing nothing after typing a new name, until an ArrowDown nobody knows
|
|
11534
|
+
// to press.
|
|
11586
11535
|
return this.showCreateRow() ? this.visibleOptions().length : -1;
|
|
11587
11536
|
}
|
|
11588
|
-
/**
|
|
11589
|
-
* row
|
|
11590
|
-
*
|
|
11591
|
-
* reachable. Returns -1 when every option is disabled. */
|
|
11537
|
+
/** Steps OVER a disabled option rather than landing on it. `step` is +1/-1; the
|
|
11538
|
+
* create row (past the last option) is always reachable, and -1 comes back when
|
|
11539
|
+
* every option is disabled. */
|
|
11592
11540
|
nextEnabledIndex(from, step, slots) {
|
|
11593
11541
|
if (!slots) {
|
|
11594
11542
|
return -1;
|
|
@@ -11603,7 +11551,6 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
11603
11551
|
}
|
|
11604
11552
|
return -1;
|
|
11605
11553
|
}
|
|
11606
|
-
/** Flat index of the given option within the visible (filtered) list. */
|
|
11607
11554
|
flatIndexOf(option) {
|
|
11608
11555
|
return this.visibleOptions().findIndex((opt) => opt === option);
|
|
11609
11556
|
}
|
|
@@ -11660,7 +11607,6 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
11660
11607
|
return;
|
|
11661
11608
|
}
|
|
11662
11609
|
const visibleCount = this.visibleOptions().length;
|
|
11663
|
-
// Create row adds one extra navigable slot at the end.
|
|
11664
11610
|
const totalSlots = visibleCount + (this.showCreateRow() ? 1 : 0);
|
|
11665
11611
|
switch (event.key) {
|
|
11666
11612
|
case 'ArrowDown':
|
|
@@ -11742,8 +11688,6 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
11742
11688
|
}
|
|
11743
11689
|
const triggerElement = this.trigger().nativeElement;
|
|
11744
11690
|
const { positionStrategy, config: overlayConfig } = dropdownOverlay(this.overlay, triggerElement);
|
|
11745
|
-
// Content-width trigger can be narrow — let the panel size to its options
|
|
11746
|
-
// with the trigger as the floor; fill mode keeps the exact trigger width.
|
|
11747
11691
|
const triggerWidth = triggerElement.getBoundingClientRect().width;
|
|
11748
11692
|
if (this.width() === 'content') {
|
|
11749
11693
|
overlayConfig.minWidth = triggerWidth;
|
|
@@ -11755,8 +11699,6 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
11755
11699
|
prepareOverlayEnter(this.overlayRef, this.host.nativeElement, positionStrategy);
|
|
11756
11700
|
forwardOverlayTokens(this.overlayRef, this.host.nativeElement, this.panelTokens);
|
|
11757
11701
|
closeOnOutsidePointer(this.overlayRef, (target) => this.trigger().nativeElement.contains(target), () => this.close('dismiss'));
|
|
11758
|
-
// No backdrop catches a page scroll and CDK's scroll strategies miss a plain
|
|
11759
|
-
// overflow container, so close on any outside scroll ourselves.
|
|
11760
11702
|
const removeScrollClose = closeOnScroll(this.overlayRef, () => this.close('dismiss'));
|
|
11761
11703
|
const detaching = this.overlayRef;
|
|
11762
11704
|
this.overlayRef.detachments().subscribe(() => {
|
|
@@ -11778,11 +11720,10 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
11778
11720
|
this.overlayRef = null;
|
|
11779
11721
|
this.setOpen(false);
|
|
11780
11722
|
this.activeIndex.set(-1);
|
|
11781
|
-
//
|
|
11782
|
-
//
|
|
11783
|
-
//
|
|
11784
|
-
//
|
|
11785
|
-
// mode, where the input never collapses and the text stays honest.
|
|
11723
|
+
// The input collapses to zero width whenever a label is on display, so
|
|
11724
|
+
// anything left in `query` goes INVISIBLE while it still narrows the next
|
|
11725
|
+
// open. Never in multi mode, where the input keeps its width and the text
|
|
11726
|
+
// stays honest.
|
|
11786
11727
|
if (this.displayLabel()) {
|
|
11787
11728
|
this.query.set('');
|
|
11788
11729
|
}
|
|
@@ -11798,9 +11739,7 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
11798
11739
|
*
|
|
11799
11740
|
* `value.set(null)` alone is not enough from outside: the typed query is
|
|
11800
11741
|
* component state with no input bound to it, so the text stays on screen after
|
|
11801
|
-
* the value goes.
|
|
11802
|
-
* ends up querying the inner `<input>` and dispatching a synthetic `input`
|
|
11803
|
-
* event.
|
|
11742
|
+
* the value goes.
|
|
11804
11743
|
*
|
|
11805
11744
|
* Deliberately does NOT move focus — the caller may be navigating away, and
|
|
11806
11745
|
* stealing focus back into a field they just left is worse than leaving it.
|
|
@@ -11813,8 +11752,6 @@ class AutocompleteComponent extends DsControlValueAccessor {
|
|
|
11813
11752
|
}
|
|
11814
11753
|
}
|
|
11815
11754
|
ngOnDestroy() {
|
|
11816
|
-
// Host torn down while open → close() never runs. Dispose the overlay so
|
|
11817
|
-
// its pane and event subscriptions don't leak.
|
|
11818
11755
|
this.overlayRef?.dispose();
|
|
11819
11756
|
this.overlayRef = null;
|
|
11820
11757
|
}
|
|
@@ -13189,9 +13126,8 @@ class MultiSelectComponent extends DsControlValueAccessor {
|
|
|
13189
13126
|
if (raw === null || raw === undefined) {
|
|
13190
13127
|
return null;
|
|
13191
13128
|
}
|
|
13192
|
-
// A bare attribute
|
|
13193
|
-
//
|
|
13194
|
-
// `<ds-multi-select searchable>` unable to override a config that said false.
|
|
13129
|
+
// A bare attribute arrives as '' and has to beat the config default, which
|
|
13130
|
+
// treating it as "unset" would not.
|
|
13195
13131
|
if (raw === '') {
|
|
13196
13132
|
return true;
|
|
13197
13133
|
}
|
|
@@ -13329,24 +13265,18 @@ class MultiSelectComponent extends DsControlValueAccessor {
|
|
|
13329
13265
|
triggerActiveDescendant = computed(() => this.showsSearch() ? null : this.activeDescendant(), ...(ngDevMode ? [{ debugName: "triggerActiveDescendant" }] : /* istanbul ignore next */ []));
|
|
13330
13266
|
triggerCaption = computed(() => this.label() || this.ariaLabel() || this.placeholder(), ...(ngDevMode ? [{ debugName: "triggerCaption" }] : /* istanbul ignore next */ []));
|
|
13331
13267
|
allOptions = computed(() => flattenDsOptions(this.options()), ...(ngDevMode ? [{ debugName: "allOptions" }] : /* istanbul ignore next */ []));
|
|
13332
|
-
// Selected options in the source order, so chip order is stable.
|
|
13333
13268
|
selectedOptions = computed(() => {
|
|
13334
13269
|
const selected = this.value();
|
|
13335
13270
|
return this.allOptions().filter((option) => selected.includes(option.value));
|
|
13336
13271
|
}, ...(ngDevMode ? [{ debugName: "selectedOptions" }] : /* istanbul ignore next */ []));
|
|
13337
13272
|
chipsMode = computed(() => this.maxVisibleChips() ?? 'fit', ...(ngDevMode ? [{ debugName: "chipsMode" }] : /* istanbul ignore next */ []));
|
|
13338
13273
|
showsEveryChip = computed(() => this.chipsMode() === 'all', ...(ngDevMode ? [{ debugName: "showsEveryChip" }] : /* istanbul ignore next */ []));
|
|
13339
|
-
/** True for BOTH `'fit'` and a number: a number is a ceiling, not a promise
|
|
13340
|
-
*
|
|
13341
|
-
* wide enough for. Without that, a phone-width trigger honoured the count and
|
|
13342
|
-
* wrapped the text input onto a second line, which is the one thing the cap
|
|
13343
|
-
* exists to prevent. */
|
|
13274
|
+
/** True for BOTH `'fit'` and a number: a number is a ceiling, not a promise, so
|
|
13275
|
+
* the row still measures and shows only what the trigger is wide enough for. */
|
|
13344
13276
|
fitsChipsToWidth = computed(() => !this.showsEveryChip(), ...(ngDevMode ? [{ debugName: "fitsChipsToWidth" }] : /* istanbul ignore next */ []));
|
|
13345
13277
|
/** How many chips the row is ASKED to render before measuring: everything for
|
|
13346
|
-
* `'fit'`, the ceiling for a number. It
|
|
13347
|
-
*
|
|
13348
|
-
* holds them all — with a numeric cap that render never happens, the cache
|
|
13349
|
-
* never fills, and the fit fell back to "show them all" without a word. */
|
|
13278
|
+
* `'fit'`, the ceiling for a number. It must be the ceiling and not the selection —
|
|
13279
|
+
* the width cache only fills from a render that holds every chip. */
|
|
13350
13280
|
chipBudget = computed(() => {
|
|
13351
13281
|
const max = this.chipsMode();
|
|
13352
13282
|
const total = this.selectedOptions().length;
|
|
@@ -13413,7 +13343,6 @@ class MultiSelectComponent extends DsControlValueAccessor {
|
|
|
13413
13343
|
message = this.fieldMessage.message;
|
|
13414
13344
|
controlState = this.fieldMessage.controlState;
|
|
13415
13345
|
invalidResolved = this.fieldMessage.invalid;
|
|
13416
|
-
// Select-all reflects the currently filter-matching, enabled options.
|
|
13417
13346
|
enabledFiltered() {
|
|
13418
13347
|
return this.filteredOptions().filter((option) => !option.disabled);
|
|
13419
13348
|
}
|
|
@@ -13487,17 +13416,14 @@ class MultiSelectComponent extends DsControlValueAccessor {
|
|
|
13487
13416
|
event.stopPropagation();
|
|
13488
13417
|
this.clear();
|
|
13489
13418
|
this.markTouched();
|
|
13490
|
-
// The button that ran this is
|
|
13491
|
-
//
|
|
13419
|
+
// The button that ran this is destroyed with the chips, so focus would fall
|
|
13420
|
+
// to <body>.
|
|
13492
13421
|
this.trigger().nativeElement.focus();
|
|
13493
13422
|
}
|
|
13494
13423
|
/**
|
|
13495
13424
|
* Empties the selection from outside — a "reset filters" button, a form the app
|
|
13496
|
-
* clears itself.
|
|
13497
|
-
*
|
|
13498
|
-
*
|
|
13499
|
-
* Deliberately does NOT move focus: the caller may be navigating away, and
|
|
13500
|
-
* stealing focus back into a field they just left is worse than leaving it.
|
|
13425
|
+
* clears itself. Deliberately does NOT move focus: the caller may be navigating
|
|
13426
|
+
* away.
|
|
13501
13427
|
*/
|
|
13502
13428
|
clear() {
|
|
13503
13429
|
this.value.set([]);
|
|
@@ -13508,8 +13434,8 @@ class MultiSelectComponent extends DsControlValueAccessor {
|
|
|
13508
13434
|
}
|
|
13509
13435
|
removeValue(value) {
|
|
13510
13436
|
this.value.set(this.value().filter((entry) => entry !== value));
|
|
13511
|
-
// The close button that ran this is
|
|
13512
|
-
//
|
|
13437
|
+
// The close button that ran this is destroyed with its chip, so focus would
|
|
13438
|
+
// fall to <body>.
|
|
13513
13439
|
this.trigger().nativeElement.focus();
|
|
13514
13440
|
}
|
|
13515
13441
|
constructor() {
|
|
@@ -13556,10 +13482,8 @@ class MultiSelectComponent extends DsControlValueAccessor {
|
|
|
13556
13482
|
if (this.isDisabled()) {
|
|
13557
13483
|
return;
|
|
13558
13484
|
}
|
|
13559
|
-
// With no filter row
|
|
13560
|
-
//
|
|
13561
|
-
// on Enter, or Enter would toggle the panel shut instead of picking the active
|
|
13562
|
-
// row and there would be no keyboard way to select at all.
|
|
13485
|
+
// With no filter row the trigger runs the input's handler, and must take Enter
|
|
13486
|
+
// first — otherwise Enter toggles the panel instead of picking the active row.
|
|
13563
13487
|
if (this.open() && !this.showsSearch()) {
|
|
13564
13488
|
this.onSearchKeydown(event);
|
|
13565
13489
|
return;
|