@ids-group-ltd/ids-design-system 0.15.0 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +496 -0
- package/components.md +69 -38
- package/docs/agent/INDEX.md +3 -3
- package/docs/agent/charts/column-series-component.md +1 -1
- package/docs/agent/charts/ds-chart.md +1 -1
- package/docs/agent/charts/ds-column-chart.md +2 -1
- package/docs/agent/charts/ds-heatmap-chart.md +2 -1
- package/docs/agent/charts/ds-line-chart.md +3 -3
- package/docs/agent/charts/ds-pie-chart.md +3 -2
- package/docs/agent/charts/ds-scatter-chart.md +2 -1
- package/docs/agent/charts/ds-waterfall-chart.md +1 -1
- package/docs/agent/charts/line-series-component.md +1 -1
- package/docs/agent/feedback/ds-alert.md +1 -0
- package/docs/agent/feedback/ds-banner.md +1 -0
- package/docs/agent/feedback/ds-toast.md +2 -0
- package/docs/agent/forms/ds-autocomplete.md +1 -1
- package/docs/agent/forms/ds-button.md +1 -0
- package/docs/agent/forms/ds-checkbox.md +1 -1
- package/docs/agent/forms/ds-color-picker.md +1 -1
- package/docs/agent/forms/ds-date-picker.md +1 -1
- package/docs/agent/forms/ds-icon-button.md +1 -1
- package/docs/agent/forms/ds-input.md +1 -1
- package/docs/agent/forms/ds-multi-select.md +1 -1
- package/docs/agent/forms/ds-otp-input.md +1 -1
- package/docs/agent/forms/ds-radio-group.md +1 -1
- package/docs/agent/forms/ds-segmented.md +1 -1
- package/docs/agent/forms/ds-select.md +1 -1
- package/docs/agent/forms/ds-slider.md +1 -1
- package/docs/agent/forms/ds-switch.md +1 -1
- package/docs/agent/forms/ds-textarea.md +1 -1
- package/docs/agent/forms/ds-time-picker.md +1 -1
- package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +1 -1
- package/docs/agent/foundations/global-helper-classes.md +1 -1
- package/docs/agent/foundations/tokens.md +1 -1
- package/docs/agent/navigation/ds-pagination.md +2 -1
- package/docs/agent/overlays/ds-definition-term.md +1 -1
- package/docs/agent/overlays/ds-info-hint.md +21 -2
- package/docs/agent/overlays/ds-tooltip-panel.md +1 -1
- package/docs/agent/overlays/ds-tooltip.md +1 -1
- package/docs/agent/tables/ds-table-columns.md +2 -0
- package/docs/agent/tables/ds-table.md +3 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +6 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +10 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +6 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +8 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +7 -17
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +694 -77
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +2190 -1234
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +10 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +15 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +44 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +22 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +44 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +4 -18
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +49 -20
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +5 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-info-hint.mjs +76 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-info-hint.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +11 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +33 -44
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +50 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +10 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +10 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +14 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +102 -27
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +5 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +11 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +123 -23
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +10 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +10 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-show-dirty.mjs +55 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-show-dirty.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +10 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs +3 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +10 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +32 -14
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs +17 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +259 -21
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +15 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +24 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +17 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +32 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +10 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +238 -67
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +9 -2
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.15.0.json +43 -12
- package/migrations/0.15.1.json +745 -0
- package/migrations/0.15.2.json +164 -0
- package/migrations/0.3.0.json +16 -9
- package/package.json +9 -1
- package/schematics/check-overrides/surface.json +48 -1
- package/stylelint/deprecated-tokens.json +7 -0
- package/styles/_chart-frame.scss +14 -0
- package/styles/_chart-interactive.scss +26 -1
- package/styles/_chart-motion.scss +47 -8
- package/styles/_link.scss +30 -12
- package/styles/_tokens.scss +3 -0
- package/themes/README.md +55 -0
- package/themes/_semantic.scss +6 -7
- package/themes/dark/_theme.scss +7 -7
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +5 -4
- package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +4 -4
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +51 -7
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +201 -28
- package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +27 -2
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-field-message.d.ts +19 -2
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +0 -3
- package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +21 -8
- package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +3 -2
- package/types/ids-group-ltd-ids-design-system-components-info-hint.d.ts +13 -4
- package/types/ids-group-ltd-ids-design-system-components-input.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +13 -7
- package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +6 -0
- package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +5 -3
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +24 -7
- package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +2 -1
- package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +39 -7
- package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-show-dirty.d.ts +29 -0
- package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-table-resize.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +51 -11
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +8 -6
- package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components.d.ts +110 -34
- package/types/ids-group-ltd-ids-design-system-core.d.ts +44 -12
- package/types/ids-group-ltd-ids-design-system.d.ts +3 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, computed, signal, PLATFORM_ID, DestroyRef, effect, InjectionToken, ElementRef, afterNextRender, NgZone, untracked, afterRenderEffect, TemplateRef, Directive, Injector, input, booleanAttribute, numberAttribute, DOCUMENT } from '@angular/core';
|
|
3
|
-
import { DS_CONFIG, reportDevWarning, injectDsLocale, DS_INTL
|
|
3
|
+
import { DS_CONFIG, reportDevWarning, resolveWithConfig, injectDsLocale, DS_INTL } from '@ids-group-ltd/ids-design-system/core';
|
|
4
4
|
import { isPlatformBrowser } from '@angular/common';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { NgForm, FormGroupDirective, NgControl } from '@angular/forms';
|
|
@@ -575,16 +575,6 @@ function lineSegments(points) {
|
|
|
575
575
|
}
|
|
576
576
|
return segments;
|
|
577
577
|
}
|
|
578
|
-
/** `''` rather than a partial list when a coordinate is unplottable: one `NaN` voids the whole
|
|
579
|
-
* `points` attribute and the line vanishes silently.
|
|
580
|
-
*
|
|
581
|
-
* @internal */
|
|
582
|
-
function polylinePoints(segment) {
|
|
583
|
-
if (segment.length === 0 || !segment.every(isPlottable)) {
|
|
584
|
-
return '';
|
|
585
|
-
}
|
|
586
|
-
return segment.map((point) => coordinatePair(point)).join(' ');
|
|
587
|
-
}
|
|
588
578
|
/** Fritsch-Carlson tangents: the slope at each reading, clamped so no segment turns back on itself.
|
|
589
579
|
* A zero slope on either side pins the tangent flat, keeping a plateau flat. */
|
|
590
580
|
function monotoneTangents(segment) {
|
|
@@ -734,12 +724,6 @@ function niceDomain(domainMin, domainMax, targetCount) {
|
|
|
734
724
|
max: Math.ceil(domainMax / step) * step,
|
|
735
725
|
};
|
|
736
726
|
}
|
|
737
|
-
/** Distance between two ticks, which `formatTick` needs to pick a precision; a single tick has no step.
|
|
738
|
-
*
|
|
739
|
-
* @internal */
|
|
740
|
-
function tickStep(ticks) {
|
|
741
|
-
return ticks.length > 1 ? ticks[1] - ticks[0] : 0;
|
|
742
|
-
}
|
|
743
727
|
/** @internal */
|
|
744
728
|
function linearScale(domainMin, domainMax, rangeSize) {
|
|
745
729
|
const span = domainMax - domainMin;
|
|
@@ -748,42 +732,6 @@ function linearScale(domainMin, domainMax, rangeSize) {
|
|
|
748
732
|
}
|
|
749
733
|
return (value) => ((value - domainMin) / span) * rangeSize;
|
|
750
734
|
}
|
|
751
|
-
/** Positions for marks that sit at a category rather than inside it (a line's readings): first at
|
|
752
|
-
* the plot's start, last at its end, a single reading in the middle.
|
|
753
|
-
*
|
|
754
|
-
* `step` is the distance between neighbours; at the two ends that slot is half outside the plot and
|
|
755
|
-
* the caller clamps it.
|
|
756
|
-
*
|
|
757
|
-
* @internal */
|
|
758
|
-
function pointScale(count, rangeSize) {
|
|
759
|
-
const total = Number.isFinite(count) && count > 0 ? Math.floor(count) : 0;
|
|
760
|
-
const size = Number.isFinite(rangeSize) && rangeSize > 0 ? rangeSize : 0;
|
|
761
|
-
if (total === 0) {
|
|
762
|
-
return { step: 0, count: 0, position: () => 0, indexAt: () => -1 };
|
|
763
|
-
}
|
|
764
|
-
if (total === 1) {
|
|
765
|
-
return {
|
|
766
|
-
step: size,
|
|
767
|
-
count: 1,
|
|
768
|
-
position: () => size / 2,
|
|
769
|
-
indexAt: () => 0,
|
|
770
|
-
};
|
|
771
|
-
}
|
|
772
|
-
const step = size / (total - 1);
|
|
773
|
-
return {
|
|
774
|
-
step,
|
|
775
|
-
count: total,
|
|
776
|
-
position: (index) => Math.min(Math.max(index, 0), total - 1) * step,
|
|
777
|
-
// Nearest reading, not the slot the pointer is over: the end slots are half-width.
|
|
778
|
-
indexAt: (offset) => {
|
|
779
|
-
if (!Number.isFinite(offset) || step === 0) {
|
|
780
|
-
return -1;
|
|
781
|
-
}
|
|
782
|
-
const index = Math.round(offset / step);
|
|
783
|
-
return Math.min(Math.max(index, 0), total - 1);
|
|
784
|
-
},
|
|
785
|
-
};
|
|
786
|
-
}
|
|
787
735
|
/** @internal */
|
|
788
736
|
function bandScale(count, rangeSize, paddingRatio) {
|
|
789
737
|
if (count <= 0) {
|
|
@@ -846,6 +794,98 @@ function staggerDelay(index, count, stepMs) {
|
|
|
846
794
|
function leaveMark(event) {
|
|
847
795
|
event.target.classList.add('mark-leave');
|
|
848
796
|
}
|
|
797
|
+
// A CSS duration (`300ms`, `0.3s`) in milliseconds; anything unparsable is `0`.
|
|
798
|
+
function cssDurationMs(duration) {
|
|
799
|
+
const value = parseFloat(duration);
|
|
800
|
+
if (!Number.isFinite(value)) {
|
|
801
|
+
return 0;
|
|
802
|
+
}
|
|
803
|
+
return duration.trim().endsWith('ms') ? value : value * 1000;
|
|
804
|
+
}
|
|
805
|
+
/** How far a glide starts in. A glide re-aimed every frame, as a fast pointer re-aims it, otherwise
|
|
806
|
+
* draws its zero-progress frame each time and stands still until the pointer stops. @internal */
|
|
807
|
+
const CHART_GLIDE_HEAD_START_MS = 1000 / 30;
|
|
808
|
+
/** The duration and easing `element` inherits from `--ds-motion-chart-<timing>-*`, or `null` when the
|
|
809
|
+
* duration is zero, as under reduced motion.
|
|
810
|
+
*
|
|
811
|
+
* @internal */
|
|
812
|
+
function chartTiming(element, timing) {
|
|
813
|
+
const style = getComputedStyle(element);
|
|
814
|
+
const duration = cssDurationMs(style.getPropertyValue(`--ds-motion-chart-${timing}-duration`));
|
|
815
|
+
if (duration <= 0) {
|
|
816
|
+
return null;
|
|
817
|
+
}
|
|
818
|
+
return {
|
|
819
|
+
duration,
|
|
820
|
+
easing: style.getPropertyValue(`--ds-motion-chart-${timing}-easing`).trim() ||
|
|
821
|
+
'ease',
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
/** The delay `element` inherits from `--ds-motion-chart-<delay>-delay`, in milliseconds; `0` under
|
|
825
|
+
* reduced motion.
|
|
826
|
+
*
|
|
827
|
+
* @internal */
|
|
828
|
+
function chartDelay(element, delay) {
|
|
829
|
+
return cssDurationMs(getComputedStyle(element).getPropertyValue(`--ds-motion-chart-${delay}-delay`));
|
|
830
|
+
}
|
|
831
|
+
/** Eases `apply` from `from` to `to` on the timing `element` inherits (`--ds-motion-chart-<timing>-*`),
|
|
832
|
+
* for geometry CSS cannot interpolate. A zero duration, as under reduced motion, applies `to` at once.
|
|
833
|
+
* `onDone` runs after the last apply, inside this call when there is no motion. Returns the cancel;
|
|
834
|
+
* a caller starting the next tween cancels this one and passes what it last applied.
|
|
835
|
+
*
|
|
836
|
+
* Frames run in whatever zone the call runs in: call it outside Angular's zone, or every frame is
|
|
837
|
+
* an application tick.
|
|
838
|
+
*
|
|
839
|
+
* @internal */
|
|
840
|
+
function tweenMarks(element, from, to, apply, timing = 'mark', onDone = () => undefined) {
|
|
841
|
+
const eased = chartTiming(element, timing);
|
|
842
|
+
if (!eased ||
|
|
843
|
+
from.length !== to.length ||
|
|
844
|
+
typeof KeyframeEffect === 'undefined') {
|
|
845
|
+
apply(to);
|
|
846
|
+
onDone();
|
|
847
|
+
return () => undefined;
|
|
848
|
+
}
|
|
849
|
+
// A target-less effect is only a clock: it eases by the token's own curve, whatever its form.
|
|
850
|
+
const clock = new Animation(new KeyframeEffect(null, null, {
|
|
851
|
+
...eased,
|
|
852
|
+
delay: -CHART_GLIDE_HEAD_START_MS,
|
|
853
|
+
fill: 'forwards',
|
|
854
|
+
}));
|
|
855
|
+
let frame = 0;
|
|
856
|
+
const step = () => {
|
|
857
|
+
const progress = clock.effect?.getComputedTiming().progress ?? 1;
|
|
858
|
+
apply(to.map((value, index) => from[index] + (value - from[index]) * progress));
|
|
859
|
+
if (clock.playState !== 'finished') {
|
|
860
|
+
frame = requestAnimationFrame(step);
|
|
861
|
+
return;
|
|
862
|
+
}
|
|
863
|
+
onDone();
|
|
864
|
+
};
|
|
865
|
+
clock.play();
|
|
866
|
+
frame = requestAnimationFrame(step);
|
|
867
|
+
return () => {
|
|
868
|
+
cancelAnimationFrame(frame);
|
|
869
|
+
clock.cancel();
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
/** Runs `run` two frames from now, outside Angular's zone; returns the cancel.
|
|
873
|
+
*
|
|
874
|
+
* @internal */
|
|
875
|
+
function afterTwoFrames(zone, run) {
|
|
876
|
+
let first = 0;
|
|
877
|
+
let second = 0;
|
|
878
|
+
// Outside the zone: under zone.js each frame callback is a full application tick.
|
|
879
|
+
zone.runOutsideAngular(() => {
|
|
880
|
+
first = requestAnimationFrame(() => {
|
|
881
|
+
second = requestAnimationFrame(run);
|
|
882
|
+
});
|
|
883
|
+
});
|
|
884
|
+
return () => {
|
|
885
|
+
cancelAnimationFrame(first);
|
|
886
|
+
cancelAnimationFrame(second);
|
|
887
|
+
};
|
|
888
|
+
}
|
|
849
889
|
|
|
850
890
|
/** Marks a chart's skeleton draws when nothing is known about the data. @internal */
|
|
851
891
|
const CHART_SKELETON_COUNT = 5;
|
|
@@ -914,9 +954,11 @@ function skeletonFunnelClips(count) {
|
|
|
914
954
|
|
|
915
955
|
// A chart stays warm from its first answer until the pointer leaves it; one set for the page, as a legend and its plot are one chart.
|
|
916
956
|
const warmCharts = new WeakSet();
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
957
|
+
/** The chart `element` sits in.
|
|
958
|
+
*
|
|
959
|
+
* @internal */
|
|
960
|
+
function chartOf(element) {
|
|
961
|
+
return element ? element.closest('figure') : null;
|
|
920
962
|
}
|
|
921
963
|
function warmUp(chart) {
|
|
922
964
|
if (warmCharts.has(chart)) {
|
|
@@ -931,7 +973,8 @@ function warmUp(chart) {
|
|
|
931
973
|
};
|
|
932
974
|
document.addEventListener('pointerover', coolOnLeave, true);
|
|
933
975
|
}
|
|
934
|
-
/** Call from
|
|
976
|
+
/** Call from an injection context; the caller's own `leave` cancels the wait, and so does destroying
|
|
977
|
+
* the context. `delayMs` is read at each `schedule`.
|
|
935
978
|
*
|
|
936
979
|
* @internal */
|
|
937
980
|
function chartDwell(delayMs) {
|
|
@@ -942,12 +985,14 @@ function chartDwell(delayMs) {
|
|
|
942
985
|
waiting = null;
|
|
943
986
|
}
|
|
944
987
|
};
|
|
988
|
+
inject(DestroyRef).onDestroy(cancel);
|
|
945
989
|
return {
|
|
946
990
|
schedule(target, answer, event) {
|
|
947
991
|
const pointer = typeof PointerEvent !== 'undefined' &&
|
|
948
992
|
event instanceof PointerEvent &&
|
|
949
993
|
event.pointerType !== 'touch';
|
|
950
|
-
const
|
|
994
|
+
const node = event.currentTarget ?? event.target;
|
|
995
|
+
const chart = chartOf(node instanceof Element ? node : null);
|
|
951
996
|
const delay = Math.max(delayMs(), 0);
|
|
952
997
|
if (!pointer || delay === 0 || (chart && warmCharts.has(chart))) {
|
|
953
998
|
cancel();
|
|
@@ -975,6 +1020,22 @@ function chartDwell(delayMs) {
|
|
|
975
1020
|
cancel,
|
|
976
1021
|
};
|
|
977
1022
|
}
|
|
1023
|
+
/** Sets `highlighted` to the item the pointer rests on, after the dwell, and back to `null` when it
|
|
1024
|
+
* leaves. Call from an injection context.
|
|
1025
|
+
*
|
|
1026
|
+
* @internal */
|
|
1027
|
+
function dwellHighlight(highlighted, delayMs) {
|
|
1028
|
+
const dwell = chartDwell(delayMs);
|
|
1029
|
+
return {
|
|
1030
|
+
enter(item, event) {
|
|
1031
|
+
dwell.schedule(item, () => highlighted.set(item), event);
|
|
1032
|
+
},
|
|
1033
|
+
leave() {
|
|
1034
|
+
dwell.cancel();
|
|
1035
|
+
highlighted.set(null);
|
|
1036
|
+
},
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
978
1039
|
|
|
979
1040
|
/** Where a roving tabindex lands after `key`, or `null` when the key does not traverse.
|
|
980
1041
|
* The ends wrap, as in `ds-radio-group`; Home and End jump to either extreme.
|
|
@@ -1031,6 +1092,15 @@ function rovingMarks(count) {
|
|
|
1031
1092
|
},
|
|
1032
1093
|
};
|
|
1033
1094
|
}
|
|
1095
|
+
/** Whether a `pointerout` from `hit` left the mark, rather than crossing into another part of it.
|
|
1096
|
+
*
|
|
1097
|
+
* @internal */
|
|
1098
|
+
function leftMark(event, hit) {
|
|
1099
|
+
const next = event.relatedTarget instanceof Element
|
|
1100
|
+
? event.relatedTarget.closest('[data-mark-index]')
|
|
1101
|
+
: null;
|
|
1102
|
+
return next !== hit.element;
|
|
1103
|
+
}
|
|
1034
1104
|
/** The mark an event on the marks' parent came from (the nearest `[data-mark-index]`), or `null`.
|
|
1035
1105
|
*
|
|
1036
1106
|
* @internal */
|
|
@@ -1315,6 +1385,15 @@ function resolveReserveMessage(reserveMessage, appWideDefaultApplies = () => tru
|
|
|
1315
1385
|
? (config.field?.reserveMessage ?? false)
|
|
1316
1386
|
: false));
|
|
1317
1387
|
}
|
|
1388
|
+
/**
|
|
1389
|
+
* Resolves a field's `showDirty`: the input, then `DS_CONFIG.field.showDirty`, then `false`.
|
|
1390
|
+
*
|
|
1391
|
+
* Call from a field initializer (an injection context).
|
|
1392
|
+
*/
|
|
1393
|
+
function resolveShowDirty(showDirty) {
|
|
1394
|
+
const config = inject(DS_CONFIG);
|
|
1395
|
+
return computed(() => showDirty() ?? config.field?.showDirty ?? false);
|
|
1396
|
+
}
|
|
1318
1397
|
|
|
1319
1398
|
const NO_ERRORS = [];
|
|
1320
1399
|
/**
|
|
@@ -1340,7 +1419,12 @@ function trimmedText(value) {
|
|
|
1340
1419
|
return value?.trim() ?? '';
|
|
1341
1420
|
}
|
|
1342
1421
|
const EMPTY_MESSAGE = { text: '', state: 'default' };
|
|
1343
|
-
const NO_CONTROL = {
|
|
1422
|
+
const NO_CONTROL = {
|
|
1423
|
+
errors: NO_ERRORS,
|
|
1424
|
+
touched: false,
|
|
1425
|
+
pending: false,
|
|
1426
|
+
dirty: false,
|
|
1427
|
+
};
|
|
1344
1428
|
/**
|
|
1345
1429
|
* Resolves the one message a field shows, from every source that can supply one.
|
|
1346
1430
|
*
|
|
@@ -1430,7 +1514,10 @@ function resolveFieldMessage(sources) {
|
|
|
1430
1514
|
}
|
|
1431
1515
|
return sources.success?.() ? 'success' : null;
|
|
1432
1516
|
}, ...(ngDevMode ? [{ debugName: "paintedState" }] : /* istanbul ignore next */ []));
|
|
1433
|
-
|
|
1517
|
+
const pending = computed(() => (sources.pending?.() ?? false) || controlState().pending, ...(ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []));
|
|
1518
|
+
const changed = computed(() => (sources.showDirty?.() ?? false) &&
|
|
1519
|
+
((sources.dirty?.() ?? false) || controlState().dirty), ...(ngDevMode ? [{ debugName: "changed" }] : /* istanbul ignore next */ []));
|
|
1520
|
+
return { message, invalid, controlState: paintedState, pending, changed };
|
|
1434
1521
|
}
|
|
1435
1522
|
/**
|
|
1436
1523
|
* `NgControl` cannot be injected in the constructor (`NG_VALUE_ACCESSOR` points at the field
|
|
@@ -1455,6 +1542,8 @@ function watchNgControl() {
|
|
|
1455
1542
|
const sync = () => state.set({
|
|
1456
1543
|
errors: fromValidationErrors(control.errors),
|
|
1457
1544
|
touched: control.touched || submitted(),
|
|
1545
|
+
pending: control.pending,
|
|
1546
|
+
dirty: control.dirty,
|
|
1458
1547
|
});
|
|
1459
1548
|
// Signal forms bridges an NgControl whose `control` has no `events` stream. Staying at
|
|
1460
1549
|
// NO_CONTROL is deliberate: the component's own inputs carry errors and touched there.
|
|
@@ -1549,6 +1638,26 @@ class DsFieldBase extends DsMessageBase {
|
|
|
1549
1638
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsFieldBase, decorators: [{
|
|
1550
1639
|
type: Directive
|
|
1551
1640
|
}], propDecorators: { errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }] } });
|
|
1641
|
+
/**
|
|
1642
|
+
* The form-state inputs of a DS value control: what signal forms binds by name beyond `errors`
|
|
1643
|
+
* and `touched`. Reactive and template-driven forms are read through `NgControl` instead.
|
|
1644
|
+
* @internal
|
|
1645
|
+
*/
|
|
1646
|
+
class DsFormControlBase extends DsFieldBase {
|
|
1647
|
+
/** Whether an async validator is running. Bound by signal forms; shows a trailing spinner. */
|
|
1648
|
+
pending = input(false, { ...(ngDevMode ? { debugName: "pending" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1649
|
+
/** Whether the user has changed the value. Bound by signal forms; drawn only under `showDirty`. */
|
|
1650
|
+
dirty = input(false, { ...(ngDevMode ? { debugName: "dirty" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1651
|
+
/** Marks a changed value with a dot and a "Changed" line. Unset falls back to
|
|
1652
|
+
* `DS_CONFIG.field.showDirty`, then `false`. */
|
|
1653
|
+
showDirty = input(null, { ...(ngDevMode ? { debugName: "showDirty" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
1654
|
+
showDirtyResolved = resolveShowDirty(this.showDirty);
|
|
1655
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsFormControlBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1656
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: DsFormControlBase, isStandalone: true, inputs: { pending: { classPropertyName: "pending", publicName: "pending", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, showDirty: { classPropertyName: "showDirty", publicName: "showDirty", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
|
|
1657
|
+
}
|
|
1658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsFormControlBase, decorators: [{
|
|
1659
|
+
type: Directive
|
|
1660
|
+
}], propDecorators: { pending: [{ type: i0.Input, args: [{ isSignal: true, alias: "pending", required: false }] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }], showDirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDirty", required: false }] }] } });
|
|
1552
1661
|
|
|
1553
1662
|
/**
|
|
1554
1663
|
* Value elements are searched FIRST: the number stepper renders its decrement button before its
|
|
@@ -1627,7 +1736,7 @@ function blurOwnControl(host) {
|
|
|
1627
1736
|
* `FormControl.disable()` reaches the control, and call `markTouched()` from a blur handler.
|
|
1628
1737
|
* @internal
|
|
1629
1738
|
*/
|
|
1630
|
-
class DsControlValueAccessor extends
|
|
1739
|
+
class DsControlValueAccessor extends DsFormControlBase {
|
|
1631
1740
|
/** Hides the control. Inline `display`: the `hidden` attribute loses to each control's `:host` display. */
|
|
1632
1741
|
hidden = input(false, { ...(ngDevMode ? { debugName: "hidden" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1633
1742
|
hostElement = inject(ElementRef);
|
|
@@ -1674,7 +1783,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
1674
1783
|
* state and call `markTouched()` from a blur handler.
|
|
1675
1784
|
* @internal
|
|
1676
1785
|
*/
|
|
1677
|
-
class DsBooleanControlValueAccessor extends
|
|
1786
|
+
class DsBooleanControlValueAccessor extends DsFormControlBase {
|
|
1678
1787
|
/** Hides the control; see `DsControlValueAccessor.hidden`. */
|
|
1679
1788
|
hidden = input(false, { ...(ngDevMode ? { debugName: "hidden" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1680
1789
|
hostElement = inject(ElementRef);
|
|
@@ -1854,8 +1963,12 @@ const NO_HOVER_DELAY_INPUT = signal(null, ...(ngDevMode ? [{ debugName: "NO_HOVE
|
|
|
1854
1963
|
function optional(input) {
|
|
1855
1964
|
return computed(() => input()?.() ?? null);
|
|
1856
1965
|
}
|
|
1857
|
-
/** Default hover delay, in milliseconds. @internal */
|
|
1858
1966
|
const CHART_HOVER_DELAY_MS = 0;
|
|
1967
|
+
/** How long a pointer rests on a mark before the chart answers, in milliseconds:
|
|
1968
|
+
* `DS_CONFIG.chart.hoverDelayMs`, else `0`. Call from an injection context. @internal */
|
|
1969
|
+
function chartHoverDelayMs() {
|
|
1970
|
+
return resolveWithConfig(NO_HOVER_DELAY_INPUT, (config) => config.chart?.hoverDelayMs, CHART_HOVER_DELAY_MS);
|
|
1971
|
+
}
|
|
1859
1972
|
/** Default tooltip linger, in milliseconds; long enough to cross to the next mark. @internal */
|
|
1860
1973
|
const CHART_TOOLTIP_LINGER_MS = 500;
|
|
1861
1974
|
/** Resolves each input, then `DS_CONFIG.chart`, then the built-in; copy resolves input, then `DS_INTL.chart`.
|
|
@@ -1872,7 +1985,7 @@ function resolveChartDefaults(inputs) {
|
|
|
1872
1985
|
valueFormat: resolveWithConfig(inputs.valueFormat, (config) => config.chart?.valueFormat, chartValueFormat(locale)),
|
|
1873
1986
|
tooltipLingerMs: resolveWithConfig(optional(() => inputs.tooltipLingerMs), (config) => config.chart?.tooltipLingerMs, CHART_TOOLTIP_LINGER_MS),
|
|
1874
1987
|
pinOnClick: resolveWithConfig(optional(() => inputs.pinOnClick), (config) => config.chart?.pinOnClick, true),
|
|
1875
|
-
hoverDelayMs:
|
|
1988
|
+
hoverDelayMs: chartHoverDelayMs(),
|
|
1876
1989
|
tooltipSwatches: resolveWithConfig(optional(() => inputs.tooltipSwatches), (config) => config.chart?.tooltipSwatches, 'auto'),
|
|
1877
1990
|
};
|
|
1878
1991
|
}
|
|
@@ -1904,8 +2017,9 @@ class DsChartBase {
|
|
|
1904
2017
|
/** Whether the tooltip draws a colour dot beside each reading. Unset falls back to
|
|
1905
2018
|
* `DS_CONFIG.chart.tooltipSwatches`, then shows them for two to four readings. */
|
|
1906
2019
|
tooltipSwatches = input(null, { ...(ngDevMode ? { debugName: "tooltipSwatches" } : /* istanbul ignore next */ {}), transform: (value) => value == null ? null : booleanAttribute(value) });
|
|
1907
|
-
/** How long the tooltip stays after the pointer leaves the mark
|
|
1908
|
-
* it at once.
|
|
2020
|
+
/** How long the tooltip stays after the pointer leaves the mark for another part of the chart,
|
|
2021
|
+
* in milliseconds; zero closes it at once. A pointer that leaves the chart closes it at once
|
|
2022
|
+
* whatever this says. Unset falls back to `DS_CONFIG.chart.tooltipLingerMs`, then 500. */
|
|
1909
2023
|
tooltipLingerMs = input(null, { ...(ngDevMode ? { debugName: "tooltipLingerMs" } : /* istanbul ignore next */ {}), transform: (raw) => (raw == null ? null : numberAttribute(raw)) });
|
|
1910
2024
|
/** Holds the clicked mark and its tooltip until a second click, Escape or a press outside.
|
|
1911
2025
|
* Unset falls back to `DS_CONFIG.chart.pinOnClick`, then `true`. The click output fires either way. */
|
|
@@ -1922,6 +2036,13 @@ class DsChartBase {
|
|
|
1922
2036
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsChartBase, decorators: [{
|
|
1923
2037
|
type: Directive
|
|
1924
2038
|
}], propDecorators: { frame: [{ type: i0.Input, args: [{ isSignal: true, alias: "frame", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], valueFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormat", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], tooltipSwatches: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipSwatches", required: false }] }], tooltipLingerMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipLingerMs", required: false }] }], pinOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinOnClick", required: false }] }] } });
|
|
2039
|
+
/** Whether the marks keyed `key` fade while `highlighted` is singled out: only under `dimOthers`,
|
|
2040
|
+
* and never the highlighted marks themselves.
|
|
2041
|
+
*
|
|
2042
|
+
* @internal */
|
|
2043
|
+
function dimmedBy(dimOthers, highlighted, key) {
|
|
2044
|
+
return dimOthers && highlighted !== null && highlighted !== key;
|
|
2045
|
+
}
|
|
1925
2046
|
|
|
1926
2047
|
/**
|
|
1927
2048
|
* Focuses the field's inner `input`/`textarea` when the click lands on the frame chrome
|
|
@@ -1957,6 +2078,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
1957
2078
|
}]
|
|
1958
2079
|
}] });
|
|
1959
2080
|
|
|
2081
|
+
const TABBABLE_CANDIDATES = 'a[href], button, input, select, textarea, [tabindex], [contenteditable="true"]';
|
|
2082
|
+
function isTabbable(element) {
|
|
2083
|
+
return (element.isConnected &&
|
|
2084
|
+
element.tabIndex >= 0 &&
|
|
2085
|
+
!element.disabled &&
|
|
2086
|
+
!element.closest('[inert]') &&
|
|
2087
|
+
element.checkVisibility());
|
|
2088
|
+
}
|
|
2089
|
+
function tabbableNeighbour(leaving, within) {
|
|
2090
|
+
const candidates = Array.from(within.querySelectorAll(TABBABLE_CANDIDATES)).filter((element) => !leaving.contains(element) && isTabbable(element));
|
|
2091
|
+
const following = candidates.find((element) => leaving.compareDocumentPosition(element) &
|
|
2092
|
+
Node.DOCUMENT_POSITION_FOLLOWING);
|
|
2093
|
+
return following ?? candidates.at(-1) ?? null;
|
|
2094
|
+
}
|
|
2095
|
+
/**
|
|
2096
|
+
* When focus is inside `leaving`, which is about to be removed, moves it to the nearest tabbable
|
|
2097
|
+
* element inside `within`: the next one in document order, else the previous one, else `fallback`.
|
|
2098
|
+
* @internal
|
|
2099
|
+
*/
|
|
2100
|
+
function moveFocusOutOf(leaving, within, fallback = null) {
|
|
2101
|
+
if (!leaving.contains(leaving.ownerDocument.activeElement)) {
|
|
2102
|
+
return;
|
|
2103
|
+
}
|
|
2104
|
+
const target = tabbableNeighbour(leaving, within) ??
|
|
2105
|
+
(fallback && isTabbable(fallback) ? fallback : null);
|
|
2106
|
+
target?.focus();
|
|
2107
|
+
}
|
|
2108
|
+
/**
|
|
2109
|
+
* Returns a function that, after the next render, focuses `target()` when focus has fallen to
|
|
2110
|
+
* `<body>` - its element was removed or disabled under it. Focus the app moved elsewhere is left alone.
|
|
2111
|
+
*
|
|
2112
|
+
* Must be called from an injection context.
|
|
2113
|
+
* @internal
|
|
2114
|
+
*/
|
|
2115
|
+
function focusRescue() {
|
|
2116
|
+
const injector = inject(Injector);
|
|
2117
|
+
const documentRef = inject(DOCUMENT);
|
|
2118
|
+
return (target) => afterNextRender(() => {
|
|
2119
|
+
const active = documentRef.activeElement;
|
|
2120
|
+
// A focused control that turns disabled still reads as active until the browser's focus fixup.
|
|
2121
|
+
const lost = !active ||
|
|
2122
|
+
active === documentRef.body ||
|
|
2123
|
+
!active.isConnected ||
|
|
2124
|
+
active.disabled === true;
|
|
2125
|
+
if (lost) {
|
|
2126
|
+
target()?.focus();
|
|
2127
|
+
}
|
|
2128
|
+
}, { injector });
|
|
2129
|
+
}
|
|
2130
|
+
|
|
1960
2131
|
let nextId = 0;
|
|
1961
2132
|
/** Process-wide counter for SSR-safe control ids (no DOM dependency).
|
|
1962
2133
|
* @internal
|
|
@@ -2490,5 +2661,5 @@ function createTypeAhead() {
|
|
|
2490
2661
|
* Generated bundle index. Do not edit.
|
|
2491
2662
|
*/
|
|
2492
2663
|
|
|
2493
|
-
export {
|
|
2664
|
+
export { CHART_GLIDE_HEAD_START_MS, CHART_HEAT_COLORS, CHART_RAMP_COLORS, CHART_RENDER_GATE_PASSED, CHART_SERIES_COLORS, CHART_SKELETON_COUNT, CHART_TOOLTIP_LINGER_MS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChartBase, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsFormControlBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, afterTwoFrames, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chartDelay, chartDwell, chartHoverDelayMs, chartOf, chartRenderGate, chartTiming, chartValueFormat, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, describeSeries, describeShare, dimmedBy, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, dwellHighlight, elementWidth, focusIsInside, focusMark, focusRescue, formatPercent, formatTick, formatValue, formatWholePercent, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, leftMark, linePath, lineSegments, linearScale, listenForEscape, listenForMarkFocus, lttbDecimate, markAt, markOf, minMaxDecimate, moveFocusOutOf, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, prepareOverlayEnter, readOnHostResize, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, skeletonColumnHeights, skeletonFunnelClips, skeletonLineClip, skeletonMarkCount, skeletonWaterfallSteps, staggerDelay, tickValues, trimmedText, tweenMarks, valueControlBridge, watchElementWidth };
|
|
2494
2665
|
//# sourceMappingURL=ids-group-ltd-ids-design-system-components.mjs.map
|