@ids-group-ltd/ids-design-system 0.13.4 → 0.14.0
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 +258 -0
- package/components.md +24 -14
- package/docs/agent/INDEX.md +1 -1
- package/docs/agent/charts/column-series-component.md +1 -1
- package/docs/agent/charts/ds-chart.md +3 -1
- package/docs/agent/charts/ds-line-chart.md +1 -1
- package/docs/agent/charts/line-series-component.md +1 -1
- package/docs/agent/forms/ds-search.md +1 -1
- package/docs/agent/forms/ds-switch.md +4 -2
- package/docs/agent/forms/ds-textarea.md +1 -0
- package/docs/agent/navigation/ds-pagination.md +2 -2
- package/docs/agent/platform/ds-config.md +2 -1
- package/docs/agent/tables/ds-cell-template.md +1 -1
- package/docs/agent/tables/ds-table.md +4 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +26 -19
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs +13 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-data-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
- 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 +27 -14
- 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 +366 -81
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +4 -4
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +8 -17
- 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 +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
- 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 +6 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +42 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +17 -9
- 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 +8 -17
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +27 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +4 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +23 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +20 -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 +2 -2
- 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.mjs +30 -22
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +21 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +1 -1
- 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 +91 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +2 -3
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.12.2.json +4 -1
- package/migrations/0.13.3.json +32 -10
- package/migrations/0.13.4.json +1630 -132
- package/migrations/0.14.0.json +591 -0
- package/migrations/0.5.0.json +10 -4
- package/migrations/0.7.0.json +5 -2
- package/migrations/0.9.0.json +5 -2
- package/migrations/README.md +7 -2
- package/package.json +1 -1
- package/styles/_chart-frame.scss +4 -4
- package/styles/_chart-motion.scss +17 -10
- package/styles/_overlay-motion.scss +14 -6
- package/styles/_skeleton-shimmer.scss +4 -1
- package/styles/_tokens.scss +1 -1
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +3 -5
- package/types/ids-group-ltd-ids-design-system-components-chart-data-table.d.ts +3 -0
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +11 -3
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +125 -26
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +3 -5
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +4 -0
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +15 -10
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +1 -4
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +7 -1
- package/types/ids-group-ltd-ids-design-system-components-search.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +1 -0
- package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +10 -1
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +35 -24
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +13 -0
- package/types/ids-group-ltd-ids-design-system-components.d.ts +46 -3
- package/types/ids-group-ltd-ids-design-system-core.d.ts +13 -4
- package/types/ids-group-ltd-ids-design-system.d.ts +1 -1
|
@@ -23,7 +23,7 @@ class TagComponent {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: TagComponent, isStandalone: true, selector: "ds-tag", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", toggled: "toggled" }, host: { listeners: { "click": "onClick()" }, properties: { "class.neutral": "variant() === 'neutral'", "class.closable": "closable()", "class.interactive": "interactive()", "class.is-active": "selected()" } }, ngImport: i0, template: "<ng-content></ng-content>\n\n@if (closable()) {\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"$event.stopPropagation(); closed.emit()\">\n <ds-icon\n name=\"x\"\n [size]=\"12\" />\n </button>\n}\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_tag-padding-y: var(--ds-tag-padding-y, var(--tag-pad-y));--_tag-padding-x: var(--ds-tag-padding-x, var(--tag-pad-x));--_tag-radius: var(--ds-tag-radius, var(--ds-radius-control));--_tag-bg-color: var(--ds-tag-bg-color, var(--accent));--_tag-label-color: var(--ds-tag-label-color, var(--accent-on));--_tag-
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: TagComponent, isStandalone: true, selector: "ds-tag", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", toggled: "toggled" }, host: { listeners: { "click": "onClick()" }, properties: { "class.neutral": "variant() === 'neutral'", "class.closable": "closable()", "class.interactive": "interactive()", "class.is-active": "selected()" } }, ngImport: i0, template: "<ng-content></ng-content>\n\n@if (closable()) {\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"$event.stopPropagation(); closed.emit()\">\n <ds-icon\n name=\"x\"\n [size]=\"12\" />\n </button>\n}\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_tag-padding-y: var(--ds-tag-padding-y, var(--tag-pad-y));--_tag-padding-x: var(--ds-tag-padding-x, var(--tag-pad-x));--_tag-radius: var(--ds-tag-radius, var(--ds-radius-control));--_tag-bg-color: var(--ds-tag-bg-color, var(--accent));--_tag-label-color: var(--ds-tag-label-color, var(--accent-on));--_tag-font-weight: var(--ds-tag-font-weight, var(--font-weight-bold));--_tag-font-size: var(--ds-tag-font-size, var(--font-size-xs));--_tag-line-height: var(--ds-tag-line-height, var(--line-height-base));--_tag-hover-bg-color: var(--ds-tag-hover-bg-color, var(--surface-muted));--_tag-hover-label-color: var(--ds-tag-hover-label-color, var(--text-primary));--_tag-active-bg-color: var(--ds-tag-active-bg-color, var(--accent-muted));--_tag-active-label-color: var(--ds-tag-active-label-color, var(--accent-strong));--_tag-active-border: var(--ds-tag-active-border, var(--accent));display:inline-flex;align-items:center;gap:var(--tag-gap);padding:var(--_tag-padding-y) var(--_tag-padding-x);border-radius:var(--_tag-radius);background-color:var(--_tag-bg-color);color:var(--_tag-label-color);font:var(--_tag-font-weight) var(--_tag-font-size)/var(--_tag-line-height) var(--font-sans)}:host(.closable){padding-right:var(--tag-pad-x-close)}:host(.neutral){--_tag-bg-color: var(--ds-tag-bg-color, var(--surface-secondary));--_tag-label-color: var(--ds-tag-label-color, var(--text-primary));--_tag-border-color: var(--ds-tag-border-color, var(--border-divider));background-color:var(--_tag-bg-color);color:var(--_tag-label-color);border:var(--border-width-default) solid var(--_tag-border-color);padding:calc(var(--_tag-padding-y) - var(--border-width-default)) calc(var(--_tag-padding-x) - var(--border-width-default))}:host(.neutral.closable){padding-right:calc(var(--tag-pad-x-close) - var(--border-width-default))}:host(.interactive){cursor:pointer;-webkit-user-select:none;user-select:none;transition:background var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard)}:host(.interactive:hover):not(.is-active){background-color:var(--_tag-hover-bg-color);color:var(--_tag-hover-label-color)}:host(.interactive.is-active){background-color:var(--_tag-active-bg-color);color:var(--_tag-active-label-color);box-shadow:inset 0 0 0 var(--border-width-default) var(--_tag-active-border)}.close{display:inline-flex;align-items:center;justify-content:center;border:0;color:inherit;font:inherit;cursor:pointer;border-radius:var(--ds-radius-inner);padding:var(--tag-close-pad);margin-left:var(--tag-close-pad);background:color-mix(in oklab,currentcolor calc(var(--opacity-state-hover) * 100%),transparent);transition:background-color var(--duration-fast) var(--ease-standard)}.close:hover{background:color-mix(in oklab,currentcolor calc(var(--opacity-state-pressed) * 100%),transparent)}.close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.close:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:1px;animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
27
27
|
}
|
|
28
28
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TagComponent, decorators: [{
|
|
29
29
|
type: Component,
|
|
@@ -33,7 +33,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
33
33
|
'[class.interactive]': 'interactive()',
|
|
34
34
|
'[class.is-active]': 'selected()',
|
|
35
35
|
'(click)': 'onClick()',
|
|
36
|
-
}, template: "<ng-content></ng-content>\n\n@if (closable()) {\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"$event.stopPropagation(); closed.emit()\">\n <ds-icon\n name=\"x\"\n [size]=\"12\" />\n </button>\n}\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_tag-padding-y: var(--ds-tag-padding-y, var(--tag-pad-y));--_tag-padding-x: var(--ds-tag-padding-x, var(--tag-pad-x));--_tag-radius: var(--ds-tag-radius, var(--ds-radius-control));--_tag-bg-color: var(--ds-tag-bg-color, var(--accent));--_tag-label-color: var(--ds-tag-label-color, var(--accent-on));--_tag-
|
|
36
|
+
}, template: "<ng-content></ng-content>\n\n@if (closable()) {\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"$event.stopPropagation(); closed.emit()\">\n <ds-icon\n name=\"x\"\n [size]=\"12\" />\n </button>\n}\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_tag-padding-y: var(--ds-tag-padding-y, var(--tag-pad-y));--_tag-padding-x: var(--ds-tag-padding-x, var(--tag-pad-x));--_tag-radius: var(--ds-tag-radius, var(--ds-radius-control));--_tag-bg-color: var(--ds-tag-bg-color, var(--accent));--_tag-label-color: var(--ds-tag-label-color, var(--accent-on));--_tag-font-weight: var(--ds-tag-font-weight, var(--font-weight-bold));--_tag-font-size: var(--ds-tag-font-size, var(--font-size-xs));--_tag-line-height: var(--ds-tag-line-height, var(--line-height-base));--_tag-hover-bg-color: var(--ds-tag-hover-bg-color, var(--surface-muted));--_tag-hover-label-color: var(--ds-tag-hover-label-color, var(--text-primary));--_tag-active-bg-color: var(--ds-tag-active-bg-color, var(--accent-muted));--_tag-active-label-color: var(--ds-tag-active-label-color, var(--accent-strong));--_tag-active-border: var(--ds-tag-active-border, var(--accent));display:inline-flex;align-items:center;gap:var(--tag-gap);padding:var(--_tag-padding-y) var(--_tag-padding-x);border-radius:var(--_tag-radius);background-color:var(--_tag-bg-color);color:var(--_tag-label-color);font:var(--_tag-font-weight) var(--_tag-font-size)/var(--_tag-line-height) var(--font-sans)}:host(.closable){padding-right:var(--tag-pad-x-close)}:host(.neutral){--_tag-bg-color: var(--ds-tag-bg-color, var(--surface-secondary));--_tag-label-color: var(--ds-tag-label-color, var(--text-primary));--_tag-border-color: var(--ds-tag-border-color, var(--border-divider));background-color:var(--_tag-bg-color);color:var(--_tag-label-color);border:var(--border-width-default) solid var(--_tag-border-color);padding:calc(var(--_tag-padding-y) - var(--border-width-default)) calc(var(--_tag-padding-x) - var(--border-width-default))}:host(.neutral.closable){padding-right:calc(var(--tag-pad-x-close) - var(--border-width-default))}:host(.interactive){cursor:pointer;-webkit-user-select:none;user-select:none;transition:background var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard),box-shadow var(--duration-fast) var(--ease-standard)}:host(.interactive:hover):not(.is-active){background-color:var(--_tag-hover-bg-color);color:var(--_tag-hover-label-color)}:host(.interactive.is-active){background-color:var(--_tag-active-bg-color);color:var(--_tag-active-label-color);box-shadow:inset 0 0 0 var(--border-width-default) var(--_tag-active-border)}.close{display:inline-flex;align-items:center;justify-content:center;border:0;color:inherit;font:inherit;cursor:pointer;border-radius:var(--ds-radius-inner);padding:var(--tag-close-pad);margin-left:var(--tag-close-pad);background:color-mix(in oklab,currentcolor calc(var(--opacity-state-hover) * 100%),transparent);transition:background-color var(--duration-fast) var(--ease-standard)}.close:hover{background:color-mix(in oklab,currentcolor calc(var(--opacity-state-pressed) * 100%),transparent)}.close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.close:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:1px;animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}\n"] }]
|
|
37
37
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], toggled: [{ type: i0.Output, args: ["toggled"] }] } });
|
|
38
38
|
|
|
39
39
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-tag.mjs","sources":["../../../src/lib/components/tag/tag.component.ts","../../../src/lib/components/tag/tag.component.html","../../../src/lib/components/tag/ids-group-ltd-ids-design-system-components-tag.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { TagVariant } from './tag.types';\n\n@Component({\n selector: 'ds-tag',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './tag.component.html',\n styleUrl: './tag.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.neutral]': \"variant() === 'neutral'\",\n '[class.closable]': 'closable()',\n '[class.interactive]': 'interactive()',\n '[class.is-active]': 'selected()',\n '(click)': 'onClick()',\n },\n})\nexport class TagComponent {\n /** Fill style — `solid` for high-emphasis, `neutral` for low-emphasis chips. */\n readonly variant = input<TagVariant>('solid');\n /** Shows a close button that emits `closed`. */\n readonly closable = input(false, { transform: booleanAttribute });\n /** Makes the tag clickable, emitting `toggled` on click. */\n readonly interactive = input(false, { transform: booleanAttribute });\n /** Applies the active/selected visual state. */\n readonly selected = input(false, { transform: booleanAttribute });\n /** Accessible label for the close button (e.g. \"Remove Source filter\"). */\n readonly closeLabel = input<string>('Remove');\n /** Fires when the close button is clicked. */\n readonly closed = output<void>();\n /** Fires on click when `interactive` is true. */\n readonly toggled = output<void>();\n\n protected onClick(): void {\n if (this.interactive()) {\n this.toggled.emit();\n }\n }\n}\n","<ng-content></ng-content>\n\n@if (closable()) {\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"$event.stopPropagation(); closed.emit()\">\n <ds-icon\n name=\"x\"\n [size]=\"12\" />\n </button>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAyBa,YAAY,CAAA;;AAEd,IAAA,OAAO,GAAG,KAAK,CAAa,OAAO,8EAAC;;IAEpC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAExD,WAAW,GAAG,KAAK,CAAC,KAAK,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAE3D,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;AAExD,IAAA,UAAU,GAAG,KAAK,CAAS,QAAQ,iFAAC;;IAEpC,MAAM,GAAG,MAAM,EAAQ;;IAEvB,OAAO,GAAG,MAA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A,EAAA,gBAAA,EAAA,YAAA,EAAA,mBAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzBzB,kRAaA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-tag.mjs","sources":["../../../src/lib/components/tag/tag.component.ts","../../../src/lib/components/tag/tag.component.html","../../../src/lib/components/tag/ids-group-ltd-ids-design-system-components-tag.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { TagVariant } from './tag.types';\n\n@Component({\n selector: 'ds-tag',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './tag.component.html',\n styleUrl: './tag.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.neutral]': \"variant() === 'neutral'\",\n '[class.closable]': 'closable()',\n '[class.interactive]': 'interactive()',\n '[class.is-active]': 'selected()',\n '(click)': 'onClick()',\n },\n})\nexport class TagComponent {\n /** Fill style — `solid` for high-emphasis, `neutral` for low-emphasis chips. */\n readonly variant = input<TagVariant>('solid');\n /** Shows a close button that emits `closed`. */\n readonly closable = input(false, { transform: booleanAttribute });\n /** Makes the tag clickable, emitting `toggled` on click. */\n readonly interactive = input(false, { transform: booleanAttribute });\n /** Applies the active/selected visual state. */\n readonly selected = input(false, { transform: booleanAttribute });\n /** Accessible label for the close button (e.g. \"Remove Source filter\"). */\n readonly closeLabel = input<string>('Remove');\n /** Fires when the close button is clicked. */\n readonly closed = output<void>();\n /** Fires on click when `interactive` is true. */\n readonly toggled = output<void>();\n\n protected onClick(): void {\n if (this.interactive()) {\n this.toggled.emit();\n }\n }\n}\n","<ng-content></ng-content>\n\n@if (closable()) {\n <button\n type=\"button\"\n class=\"close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"$event.stopPropagation(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jC,wBAAA,SAAS,EAAE,WAAW;AACvB,qBAAA,EAAA,QAAA,EAAA,kRAAA,EAAA,MAAA,EAAA,CAAA,8gIAAA,CAAA,EAAA;;;AEvBH;;AAEG;;;;"}
|
|
@@ -129,6 +129,27 @@ class TextareaComponent extends DsControlValueAccessor {
|
|
|
129
129
|
focus(options) {
|
|
130
130
|
this.control()?.nativeElement.focus(options);
|
|
131
131
|
}
|
|
132
|
+
/** Index of the first selected character of the native textarea; 0 before the view exists. */
|
|
133
|
+
get selectionStart() {
|
|
134
|
+
return this.control()?.nativeElement.selectionStart ?? 0;
|
|
135
|
+
}
|
|
136
|
+
/** Index after the last selected character of the native textarea; 0 before the view exists. */
|
|
137
|
+
get selectionEnd() {
|
|
138
|
+
return this.control()?.nativeElement.selectionEnd ?? 0;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Mirrors `HTMLTextAreaElement.setSelectionRange`. Does not move focus - call
|
|
142
|
+
* `focus()` first when the selection has to be visible. A value written through
|
|
143
|
+
* `value` reaches the element a microtask later and drops the caret to the end,
|
|
144
|
+
* so after `value.set(...)` set the range from a `setTimeout`, not synchronously.
|
|
145
|
+
*/
|
|
146
|
+
setSelectionRange(start, end, direction) {
|
|
147
|
+
this.control()?.nativeElement.setSelectionRange(start, end, direction);
|
|
148
|
+
}
|
|
149
|
+
/** Selects the whole text, as `HTMLTextAreaElement.select()` does. */
|
|
150
|
+
select() {
|
|
151
|
+
this.control()?.nativeElement.select();
|
|
152
|
+
}
|
|
132
153
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
133
154
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: TextareaComponent, isStandalone: true, selector: "ds-textarea", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, readonlyBinding: { classPropertyName: "readonlyBinding", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, success: { classPropertyName: "success", publicName: "success", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, autosize: { classPropertyName: "autosize", publicName: "autosize", isSignal: true, isRequired: false, transformFunction: null }, minRows: { classPropertyName: "minRows", publicName: "minRows", isSignal: true, isRequired: false, transformFunction: null }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "attr.data-field-state": "controlState()" } }, providers: [
|
|
134
155
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-textarea.mjs","sources":["../../../src/lib/components/textarea/textarea.component.ts","../../../src/lib/components/textarea/textarea.component.html","../../../src/lib/components/textarea/ids-group-ltd-ids-design-system-components-textarea.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n viewChild,\n} from '@angular/core';\nimport { optionalBound } from '@ids-group-ltd/ids-design-system/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport type { TextareaResize } from './textarea.types';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldClickFocusDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-textarea',\n standalone: true,\n imports: [FormsModule, FieldMessageComponent, FieldClickFocusDirective],\n templateUrl: './textarea.component.html',\n styleUrl: './textarea.component.scss',\n host: {\n '[attr.data-field-state]': 'controlState()',\n },\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TextareaComponent),\n multi: true,\n },\n ],\n})\nexport class TextareaComponent extends DsControlValueAccessor<string> {\n private readonly control =\n viewChild<ElementRef<HTMLTextAreaElement>>('control');\n\n /** Text value, two-way bound. */\n readonly value = model<string>('');\n /** Field height — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Label shown above the field. */\n readonly label = input<string>('');\n /** Placeholder shown when empty. */\n readonly placeholder = input<string>('');\n /** Disables the field and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Prevents editing while still allowing focus and selection. */\n readonly readOnly = input(false, { transform: booleanAttribute });\n /**\n * The contract spelling of `readOnly`, a second input because signal forms binds\n * by NAME — a `readonly()` rule was reaching nothing before this existed.\n */\n readonly readonlyBinding = input(false, {\n // The alias IS the point: signal forms binds by name, and the contract\n // spells it `readonly` where the DS spells it `readOnly`.\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'readonly',\n transform: booleanAttribute,\n });\n protected readonly isReadOnly = computed(\n () => this.readOnly() || this.readonlyBinding(),\n );\n /** Confirmation text, shown when there is no error or warning — and it paints\n * the field's success border. A string like `warning`: the text IS the state. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Marks the field required — shows an asterisk and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Shows an \"(optional)\" marker next to the label (ignored when `required`). */\n readonly optional = input(false, { transform: booleanAttribute });\n /** Native `rows` attribute — visible line count. */\n readonly rows = input<number>(3);\n /** Native `name` attribute. */\n readonly name = input<string | null>(null);\n /** Grows the field with content instead of scrolling; forces `resize` to none. */\n readonly autosize = input(false, { transform: booleanAttribute });\n /** Minimum height in lines when `autosize`. */\n readonly minRows = input<number | null>(null);\n /** Maximum height in lines when `autosize`, beyond which it scrolls. */\n readonly maxRows = input<number | null>(null);\n /** Native CSS `resize` behaviour — ignored when `autosize`. */\n readonly resize = input<TextareaResize>('vertical');\n /** Accessible name when no visible `label` is provided. */\n readonly ariaLabel = input<string | null>(null);\n /** Hard character cap — applies the native maxlength attribute and shows a\n * live \"{current}/{max}\" counter below the field. */\n readonly maxLength = input<number | null, number | null | undefined>(null, {\n transform: optionalBound,\n });\n\n // Signal forms binds these by name; without them a `pattern()` or `minLength()`\n // rule validated in the form model while the native element advertised nothing.\n /** Native `minlength` attribute. */\n readonly minLength = input<number | null, number | null | undefined>(null, {\n transform: optionalBound,\n });\n /** Native `pattern` attribute — signal forms sends the schema's RegExp list. */\n readonly pattern = input<\n readonly RegExp[],\n readonly RegExp[] | string | undefined\n >([], {\n transform: (value) =>\n value === undefined\n ? []\n : typeof value === 'string'\n ? [new RegExp(value)]\n : value,\n });\n /** A native `pattern` takes ONE expression; the schema can carry several, so\n * they are ANDed with lookaheads rather than silently dropping all but one. */\n protected readonly patternAttribute = computed(() => {\n const expressions = this.pattern();\n if (!expressions.length) {\n return null;\n }\n\n return (\n expressions.map((expression) => `(?=${expression.source})`).join('') +\n '.*'\n );\n });\n protected readonly uid = nextControlId('ds-textarea');\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || this.placeholder() || null,\n );\n\n /** Effective disabled — own `disabled` input OR the reactive-forms state. */\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly currentLength = computed(() => this.value().length);\n protected readonly counterId = computed(() =>\n this.maxLength() !== null ? `${this.uid}-counter` : null,\n );\n\n protected readonly wrapperClasses = computed(() => {\n const parts = ['field'];\n if (this.sizeResolved() === 'sm') {\n parts.push('sm');\n }\n if (this.sizeResolved() === 'lg') {\n parts.push('lg');\n }\n if (this.invalidResolved()) {\n parts.push('error');\n }\n if (this.isDisabled()) {\n parts.push('disabled');\n }\n if (this.isReadOnly()) {\n parts.push('read-only');\n }\n if (this.autosize()) {\n parts.push('autosize');\n }\n\n return parts.join(' ');\n });\n\n protected readonly autosizeMinHeight = computed(() =>\n this.autosize() && this.minRows() ? `${this.minRows()}lh` : null,\n );\n protected readonly autosizeMaxHeight = computed(() =>\n this.autosize() && this.maxRows() ? `${this.maxRows()}lh` : null,\n );\n\n // Autosize grows with content, so a manual resize handle conflicts — force none.\n protected readonly effectiveResize = computed<TextareaResize>(() =>\n this.autosize() ? 'none' : this.resize(),\n );\n\n /** Move keyboard focus to the native textarea — public so a host can drive it\n * deliberately, e.g. focusing the first invalid field on a failed submit. */\n override focus(options?: FocusOptions): void {\n this.control()?.nativeElement.focus(options);\n }\n}\n","<div [class]=\"wrapperClasses()\">\n @if (label()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\">\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\">\n (optional)\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus>\n <textarea\n #control\n [id]=\"uid\"\n [rows]=\"rows()\"\n [attr.name]=\"name()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"maxLength()\"\n [attr.minlength]=\"minLength()\"\n [attr.pattern]=\"patternAttribute()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"isReadOnly()\"\n [required]=\"required()\"\n [style.resize]=\"effectiveResize()\"\n [style.min-height]=\"autosizeMinHeight()\"\n [style.max-height]=\"autosizeMaxHeight()\"\n [style.overflow-y]=\"autosize() && maxRows() ? 'auto' : null\"\n [(ngModel)]=\"value\"\n (blur)=\"markTouched()\">\n </textarea>\n </div>\n\n @if (\n reserveMessageResolved() ||\n message().text ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [id]=\"counterId()\">\n {{ currentLength() }}/{{ maxLength() }}\n </span>\n }\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA2CM,MAAO,iBAAkB,SAAQ,sBAA8B,CAAA;AAClD,IAAA,OAAO,GACtB,SAAS,CAAkC,SAAS,8EAAC;;AAG9C,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AAClC;AACiE;AACxD,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;IACjC,YAAY,GAAG,iBAAiB,CACvC,IAAI,CAAC,IAAI,EACT,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,EAChC,IAAc,CACf;;AAEQ,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,kFAAC;;IAE/B,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAExD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACjE;;;AAGG;IACM,eAAe,GAAG,KAAK,CAAC,KAAK,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,8BAAA,EAAA,CAAA;;;;AAIpC,QAAA,KAAK,EAAE,UAAU;QACjB,SAAS,EAAE,gBAAgB,EAAA,CAC3B;AACiB,IAAA,UAAU,GAAG,QAAQ,CACtC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,eAAe,EAAE,iFAChD;AACD;AACkF;IACzE,OAAO,GAAG,KAAK,CAAoC,EAAE,+EAC5D,SAAS,EAAE,WAAW,EAAA,CACtB;;IA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,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE7CxD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-textarea.mjs","sources":["../../../src/lib/components/textarea/textarea.component.ts","../../../src/lib/components/textarea/textarea.component.html","../../../src/lib/components/textarea/ids-group-ltd-ids-design-system-components-textarea.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n input,\n model,\n viewChild,\n} from '@angular/core';\nimport { optionalBound } from '@ids-group-ltd/ids-design-system/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport type { TextareaResize } from './textarea.types';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { nextControlId } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldClickFocusDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-textarea',\n standalone: true,\n imports: [FormsModule, FieldMessageComponent, FieldClickFocusDirective],\n templateUrl: './textarea.component.html',\n styleUrl: './textarea.component.scss',\n host: {\n '[attr.data-field-state]': 'controlState()',\n },\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TextareaComponent),\n multi: true,\n },\n ],\n})\nexport class TextareaComponent extends DsControlValueAccessor<string> {\n private readonly control =\n viewChild<ElementRef<HTMLTextAreaElement>>('control');\n\n /** Text value, two-way bound. */\n readonly value = model<string>('');\n /** Field height — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Label shown above the field. */\n readonly label = input<string>('');\n /** Placeholder shown when empty. */\n readonly placeholder = input<string>('');\n /** Disables the field and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Prevents editing while still allowing focus and selection. */\n readonly readOnly = input(false, { transform: booleanAttribute });\n /**\n * The contract spelling of `readOnly`, a second input because signal forms binds\n * by NAME — a `readonly()` rule was reaching nothing before this existed.\n */\n readonly readonlyBinding = input(false, {\n // The alias IS the point: signal forms binds by name, and the contract\n // spells it `readonly` where the DS spells it `readOnly`.\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'readonly',\n transform: booleanAttribute,\n });\n protected readonly isReadOnly = computed(\n () => this.readOnly() || this.readonlyBinding(),\n );\n /** Confirmation text, shown when there is no error or warning — and it paints\n * the field's success border. A string like `warning`: the text IS the state. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Marks the field required — shows an asterisk and sets `aria-required`. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Shows an \"(optional)\" marker next to the label (ignored when `required`). */\n readonly optional = input(false, { transform: booleanAttribute });\n /** Native `rows` attribute — visible line count. */\n readonly rows = input<number>(3);\n /** Native `name` attribute. */\n readonly name = input<string | null>(null);\n /** Grows the field with content instead of scrolling; forces `resize` to none. */\n readonly autosize = input(false, { transform: booleanAttribute });\n /** Minimum height in lines when `autosize`. */\n readonly minRows = input<number | null>(null);\n /** Maximum height in lines when `autosize`, beyond which it scrolls. */\n readonly maxRows = input<number | null>(null);\n /** Native CSS `resize` behaviour — ignored when `autosize`. */\n readonly resize = input<TextareaResize>('vertical');\n /** Accessible name when no visible `label` is provided. */\n readonly ariaLabel = input<string | null>(null);\n /** Hard character cap — applies the native maxlength attribute and shows a\n * live \"{current}/{max}\" counter below the field. */\n readonly maxLength = input<number | null, number | null | undefined>(null, {\n transform: optionalBound,\n });\n\n // Signal forms binds these by name; without them a `pattern()` or `minLength()`\n // rule validated in the form model while the native element advertised nothing.\n /** Native `minlength` attribute. */\n readonly minLength = input<number | null, number | null | undefined>(null, {\n transform: optionalBound,\n });\n /** Native `pattern` attribute — signal forms sends the schema's RegExp list. */\n readonly pattern = input<\n readonly RegExp[],\n readonly RegExp[] | string | undefined\n >([], {\n transform: (value) =>\n value === undefined\n ? []\n : typeof value === 'string'\n ? [new RegExp(value)]\n : value,\n });\n /** A native `pattern` takes ONE expression; the schema can carry several, so\n * they are ANDed with lookaheads rather than silently dropping all but one. */\n protected readonly patternAttribute = computed(() => {\n const expressions = this.pattern();\n if (!expressions.length) {\n return null;\n }\n\n return (\n expressions.map((expression) => `(?=${expression.source})`).join('') +\n '.*'\n );\n });\n protected readonly uid = nextControlId('ds-textarea');\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n disabled: () => this.isDisabled(),\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || this.placeholder() || null,\n );\n\n /** Effective disabled — own `disabled` input OR the reactive-forms state. */\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n\n protected readonly currentLength = computed(() => this.value().length);\n protected readonly counterId = computed(() =>\n this.maxLength() !== null ? `${this.uid}-counter` : null,\n );\n\n protected readonly wrapperClasses = computed(() => {\n const parts = ['field'];\n if (this.sizeResolved() === 'sm') {\n parts.push('sm');\n }\n if (this.sizeResolved() === 'lg') {\n parts.push('lg');\n }\n if (this.invalidResolved()) {\n parts.push('error');\n }\n if (this.isDisabled()) {\n parts.push('disabled');\n }\n if (this.isReadOnly()) {\n parts.push('read-only');\n }\n if (this.autosize()) {\n parts.push('autosize');\n }\n\n return parts.join(' ');\n });\n\n protected readonly autosizeMinHeight = computed(() =>\n this.autosize() && this.minRows() ? `${this.minRows()}lh` : null,\n );\n protected readonly autosizeMaxHeight = computed(() =>\n this.autosize() && this.maxRows() ? `${this.maxRows()}lh` : null,\n );\n\n // Autosize grows with content, so a manual resize handle conflicts — force none.\n protected readonly effectiveResize = computed<TextareaResize>(() =>\n this.autosize() ? 'none' : this.resize(),\n );\n\n /** Move keyboard focus to the native textarea — public so a host can drive it\n * deliberately, e.g. focusing the first invalid field on a failed submit. */\n override focus(options?: FocusOptions): void {\n this.control()?.nativeElement.focus(options);\n }\n\n /** Index of the first selected character of the native textarea; 0 before the view exists. */\n get selectionStart(): number {\n return this.control()?.nativeElement.selectionStart ?? 0;\n }\n\n /** Index after the last selected character of the native textarea; 0 before the view exists. */\n get selectionEnd(): number {\n return this.control()?.nativeElement.selectionEnd ?? 0;\n }\n\n /**\n * Mirrors `HTMLTextAreaElement.setSelectionRange`. Does not move focus - call\n * `focus()` first when the selection has to be visible. A value written through\n * `value` reaches the element a microtask later and drops the caret to the end,\n * so after `value.set(...)` set the range from a `setTimeout`, not synchronously.\n */\n setSelectionRange(\n start: number,\n end: number,\n direction?: 'forward' | 'backward' | 'none',\n ): void {\n this.control()?.nativeElement.setSelectionRange(start, end, direction);\n }\n\n /** Selects the whole text, as `HTMLTextAreaElement.select()` does. */\n select(): void {\n this.control()?.nativeElement.select();\n }\n}\n","<div [class]=\"wrapperClasses()\">\n @if (label()) {\n <label\n class=\"label\"\n [attr.for]=\"uid\">\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\">\n (optional)\n </span>\n }\n </label>\n }\n\n <div\n class=\"control\"\n dsFieldClickFocus>\n <textarea\n #control\n [id]=\"uid\"\n [rows]=\"rows()\"\n [attr.name]=\"name()\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.maxlength]=\"maxLength()\"\n [attr.minlength]=\"minLength()\"\n [attr.pattern]=\"patternAttribute()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"isReadOnly()\"\n [required]=\"required()\"\n [style.resize]=\"effectiveResize()\"\n [style.min-height]=\"autosizeMinHeight()\"\n [style.max-height]=\"autosizeMaxHeight()\"\n [style.overflow-y]=\"autosize() && maxRows() ? 'auto' : null\"\n [(ngModel)]=\"value\"\n (blur)=\"markTouched()\">\n </textarea>\n </div>\n\n @if (\n reserveMessageResolved() ||\n message().text ||\n maxLength() !== null\n ) {\n <div class=\"field-footer\">\n <ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n\n @if (maxLength() !== null) {\n <span\n class=\"char-counter\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n [id]=\"counterId()\">\n {{ currentLength() }}/{{ maxLength() }}\n </span>\n }\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AA2CM,MAAO,iBAAkB,SAAQ,sBAA8B,CAAA;AAClD,IAAA,OAAO,GACtB,SAAS,CAAkC,SAAS,8EAAC;;AAG9C,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AAClC;AACiE;AACxD,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,2EAAC;IACjC,YAAY,GAAG,iBAAiB,CACvC,IAAI,CAAC,IAAI,EACT,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,EAAE,IAAI,EAChC,IAAc,CACf;;AAEQ,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,kFAAC;;IAE/B,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAExD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACjE;;;AAGG;IACM,eAAe,GAAG,KAAK,CAAC,KAAK,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,8BAAA,EAAA,CAAA;;;;AAIpC,QAAA,KAAK,EAAE,UAAU;QACjB,SAAS,EAAE,gBAAgB,EAAA,CAC3B;AACiB,IAAA,UAAU,GAAG,QAAQ,CACtC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CA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AAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE7CxD;;AAEG;;;;"}
|
|
@@ -229,7 +229,7 @@ class WaterfallChartComponent {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: WaterfallChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
232
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: WaterfallChartComponent, isStandalone: true, selector: "ds-waterfall-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, showValues: { classPropertyName: "showValues", publicName: "showValues", isSignal: true, isRequired: false, transformFunction: null }, showConnectors: { classPropertyName: "showConnectors", publicName: "showConnectors", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, tickCount: { classPropertyName: "tickCount", publicName: "tickCount", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, frame: { classPropertyName: "frame", publicName: "frame", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { barClicked: "barClicked" }, host: { properties: { "class.framed": "frameResolved() === 'auto'" } }, exportAs: ["dsWaterfallChart"], ngImport: i0, template: "<figure class=\"waterfall-chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonBars(); track $index) {\n <ds-skeleton height=\"var(--_waterfall-chart-skeleton-height)\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"valueFormatResolved()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\">\n <svg:g\n dsWaterfallMarks\n [steps]=\"steps()\"\n [labelValues]=\"labelValues()\"\n [showValues]=\"showValues()\"\n [showConnectors]=\"showConnectors()\"\n [valueFormat]=\"valueFormatResolved()\" />\n\n <svg:g\n dsColumnSeries\n showValues=\"false\"\n [data]=\"points()\"\n [offsets]=\"offsets()\"\n [interactive]=\"interactive()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n </ds-chart>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"['Step', 'Direction', 'Value', 'Running total']\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table{-webkit-user-select:text;user-select:text}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}.empty.is-error,.empty-text.is-error{color:var(--error)}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.waterfall-chart{--_waterfall-chart-connector-color: var(--ds-waterfall-chart-connector-color, var(--ds-chart-axis-line-color));--_waterfall-chart-skeleton-height: var(--ds-waterfall-chart-skeleton-height, 40px);margin:0}.empty{display:grid;place-items:center;min-block-size:240px;margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.skeleton{display:grid;gap:var(--space-2)}\n"], dependencies: [{ kind: "component", type: ChartComponent, selector: "ds-chart", inputs: ["categories", "tickCount", "min", "max", "cursor", "cursorPin", "tooltipLingerMs", "maxSecondary", "plotHeight", "axisGutter", "valueSpace", "caption", "interactive", "summary", "frame", "loading", "emptyText", "error", "errorText", "valueFormat", "secondaryAxisMode", "axisColor", "secondaryAxisColor", "axisLabel", "secondaryAxisLabel"], exportAs: ["dsChart"] }, { kind: "component", type: ColumnSeriesComponent, selector: "g[dsColumnSeries]", inputs: ["data", "showValues", "interactive", "pinOnClick", "dimOthers", "staggerMs", "partOfWhole", "tooltip", "tooltipAnchor", "tooltipLingerMs", "valueFormat", "columnWidthRatio", "slot", "slotCount", "offsets", "seriesColor", "seriesFill", "seriesLabel"], outputs: ["pointClicked"], exportAs: ["dsColumnSeries"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "component", type: WaterfallMarksComponent, selector: "g[dsWaterfallMarks]", inputs: ["steps", "labelValues", "showValues", "showConnectors", "valueFormat", "columnWidthRatio"] }, { kind: "component", type: ChartDataTableComponent, selector: "ds-chart-data-table", inputs: ["columns", "rows", "caption", "open", "rowHeader"], outputs: ["toggled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
232
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: WaterfallChartComponent, isStandalone: true, selector: "ds-waterfall-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, showValues: { classPropertyName: "showValues", publicName: "showValues", isSignal: true, isRequired: false, transformFunction: null }, showConnectors: { classPropertyName: "showConnectors", publicName: "showConnectors", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, tickCount: { classPropertyName: "tickCount", publicName: "tickCount", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, frame: { classPropertyName: "frame", publicName: "frame", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, valueFormat: { classPropertyName: "valueFormat", publicName: "valueFormat", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { barClicked: "barClicked" }, host: { properties: { "class.framed": "frameResolved() === 'auto'" } }, exportAs: ["dsWaterfallChart"], ngImport: i0, template: "<figure class=\"waterfall-chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonBars(); track $index) {\n <ds-skeleton height=\"var(--_waterfall-chart-skeleton-height)\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"valueFormatResolved()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\">\n <svg:g\n dsWaterfallMarks\n [steps]=\"steps()\"\n [labelValues]=\"labelValues()\"\n [showValues]=\"showValues()\"\n [showConnectors]=\"showConnectors()\"\n [valueFormat]=\"valueFormatResolved()\" />\n\n <svg:g\n dsColumnSeries\n showValues=\"false\"\n [data]=\"points()\"\n [offsets]=\"offsets()\"\n [interactive]=\"interactive()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n </ds-chart>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"['Step', 'Direction', 'Value', 'Running total']\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{display:block;-webkit-user-select:none;user-select:none}:host(.framed){padding:var(--ds-chart-frame-padding);background:var(--ds-chart-frame-bg-color);border:var(--ds-chart-frame-border-width) solid var(--ds-chart-frame-border-color);border-radius:var(--ds-chart-frame-radius)}.data-table,.stage-table{-webkit-user-select:text;user-select:text}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}.empty.is-error,.empty-text.is-error{color:var(--error)}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.waterfall-chart{--_waterfall-chart-connector-color: var(--ds-waterfall-chart-connector-color, var(--ds-chart-axis-line-color));--_waterfall-chart-skeleton-height: var(--ds-waterfall-chart-skeleton-height, 40px);margin:0}.empty{display:grid;place-items:center;min-block-size:240px;margin:0;color:var(--text-secondary);text-align:center;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.skeleton{display:grid;gap:var(--space-2)}\n"], dependencies: [{ kind: "component", type: ChartComponent, selector: "ds-chart", inputs: ["categories", "tickCount", "min", "max", "cursor", "cursorPin", "tooltipLingerMs", "maxSecondary", "plotHeight", "axisGutter", "valueSpace", "caption", "interactive", "summary", "frame", "loading", "emptyText", "error", "errorText", "valueFormat", "secondaryAxisMode", "axisColor", "secondaryAxisColor", "axisLabel", "secondaryAxisLabel", "tooltipTemplate", "tooltipExtraGap"], exportAs: ["dsChart"] }, { kind: "component", type: ColumnSeriesComponent, selector: "g[dsColumnSeries]", inputs: ["data", "showValues", "interactive", "pinOnClick", "dimOthers", "staggerMs", "partOfWhole", "tooltip", "tooltipAnchor", "tooltipLingerMs", "valueFormat", "columnWidthRatio", "slot", "slotCount", "offsets", "seriesColor", "seriesFill", "seriesLabel", "seriesKey", "highlighted"], outputs: ["pointClicked"], exportAs: ["dsColumnSeries"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "component", type: WaterfallMarksComponent, selector: "g[dsWaterfallMarks]", inputs: ["steps", "labelValues", "showValues", "showConnectors", "valueFormat", "columnWidthRatio"] }, { kind: "component", type: ChartDataTableComponent, selector: "ds-chart-data-table", inputs: ["columns", "rows", "caption", "open", "rowHeader"], outputs: ["toggled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
233
233
|
}
|
|
234
234
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: WaterfallChartComponent, decorators: [{
|
|
235
235
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-waterfall-chart.mjs","sources":["../../../src/lib/components/waterfall-chart/waterfall-chart.math.ts","../../../src/lib/components/waterfall-chart/waterfall-marks.component.ts","../../../src/lib/components/waterfall-chart/waterfall-marks.component.html","../../../src/lib/components/waterfall-chart/waterfall-chart.component.ts","../../../src/lib/components/waterfall-chart/waterfall-chart.component.html","../../../src/lib/components/waterfall-chart/ids-group-ltd-ids-design-system-components-waterfall-chart.ts"],"sourcesContent":["import type {\n WaterfallChartBar,\n WaterfallChartStep,\n} from './waterfall-chart.types';\n\n/** Where each bar spans, walking the running sum from zero.\n *\n * Every row adds its own value to the sum, including a total - a closing total carries `0` and so\n * prints the sum reached. A delta then spans from the sum before it to the sum after; a total or a\n * subtotal stands on zero and reaches the sum, which is what makes it a figure rather than a\n * change. A non-finite reading adds nothing rather than poisoning every bar after it.\n *\n * @internal */\nexport function waterfallSteps(\n data: readonly WaterfallChartBar[],\n): readonly WaterfallChartStep[] {\n let running = 0;\n\n return data.map((datum) => {\n const from = running;\n const value = Number.isFinite(datum.value) ? datum.value : 0;\n running += value;\n const standsOnZero = datum.kind === 'total' || datum.kind === 'subtotal';\n\n return {\n label: datum.label,\n from: standsOnZero ? 0 : from,\n to: running,\n direction: standsOnZero ? 'total' : value < 0 ? 'decrease' : 'increase',\n };\n });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\nimport { CHART_SCALES } from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ChartValueFormat } from '@ids-group-ltd/ids-design-system/core';\nimport type { WaterfallChartStep } from './waterfall-chart.types';\n\n/** Distance from a bar's own tip to its value label's baseline. */\nconst VALUE_LABEL_GAP = 8;\n\n/**\n * The two things a waterfall needs that a column series cannot carry: the dashed rule chaining one\n * bar to the next, and a value label that prints its own sign.\n *\n * The label lives here rather than on the column series because the sign is not a property of the\n * number - a delta of `130` reads `+130` and a total of `800` reads `800` - and a series-wide\n * formatter sees only the value, never which of the two it is holding.\n *\n * Hosted on a `<g>` rather than an element of its own: an element the SVG specification does not\n * know is not rendered, and neither are its descendants. Written as `<svg:g dsWaterfallMarks>`.\n *\n * @internal\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsWaterfallMarks]',\n standalone: true,\n templateUrl: './waterfall-marks.component.html',\n styleUrl: './waterfall-marks.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WaterfallMarksComponent {\n private readonly scales = inject(CHART_SCALES);\n\n readonly steps = input<readonly WaterfallChartStep[]>([]);\n\n /** The reading each label prints: a delta's own change, a total's running sum. */\n readonly labelValues = input<readonly number[]>([]);\n\n readonly showValues = input(true);\n\n readonly showConnectors = input(true);\n\n readonly valueFormat = input<ChartValueFormat>((value) => String(value));\n\n /** The share of a category's band the bars take, so the connector starts where the bar ends. */\n readonly columnWidthRatio = input(0.8, { transform: numberAttribute });\n\n protected readonly markWidth = computed(\n () => this.scales.bandWidth() * this.columnWidthRatio(),\n );\n\n /** One rule per gap between two bars, drawn at the level they share - the level the left bar\n * ended on. Without it the bars read as five separate columns instead of one chain. */\n protected readonly connectors = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const steps = this.steps();\n const half = this.markWidth() / 2;\n\n return steps.slice(0, -1).map((step, index) => ({\n key: `${index}-${step.label}`,\n x1: toX(index) + half,\n x2: toX(index + 1) - half,\n y: toY(step.to),\n }));\n });\n\n protected readonly labels = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const format = this.valueFormat();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => {\n const reading = values[index] ?? step.to - step.from;\n const tip = Math.min(toY(step.from), toY(step.to));\n const sign = step.direction === 'increase' && reading > 0 ? '+' : '';\n\n return {\n key: `${index}-${step.label}`,\n x: toX(index),\n y: tip - VALUE_LABEL_GAP,\n text: `${sign}${format(reading, 'tooltip')}`,\n };\n });\n });\n}\n","<svg:g\n class=\"waterfall-marks\"\n aria-hidden=\"true\">\n @if (showConnectors()) {\n @for (connector of connectors(); track connector.key) {\n <svg:line\n class=\"connector\"\n [attr.x1]=\"connector.x1\"\n [attr.x2]=\"connector.x2\"\n [attr.y1]=\"connector.y\"\n [attr.y2]=\"connector.y\" />\n }\n }\n\n @if (showValues()) {\n @for (label of labels(); track label.key) {\n <svg:text\n class=\"value\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"label.y\">\n {{ label.text }}\n </svg:text>\n }\n }\n</svg:g>\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n output,\n} from '@angular/core';\nimport {\n ChartComponent,\n ColumnSeriesComponent,\n} from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ColumnSeriesPoint } from '@ids-group-ltd/ids-design-system/components/chart';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { waterfallSteps } from './waterfall-chart.math';\nimport { WaterfallMarksComponent } from './waterfall-marks.component';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport { resolveChartDefaults } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n WaterfallChartBar,\n WaterfallChartStep,\n} from './waterfall-chart.types';\n\n/** What each direction is painted with. A total is the neutral series colour because it is not a\n * change at all, and reading it as one is the mistake the three-colour scheme exists to prevent. */\nconst DIRECTION_COLORS: Record<WaterfallChartStep['direction'], string> = {\n increase: 'var(--ds-chart-positive-color)',\n decrease: 'var(--ds-chart-negative-color)',\n total: 'var(--ds-chart-series-default-color)',\n};\n\nconst DIRECTION_WORDS: Record<WaterfallChartStep['direction'], string> = {\n increase: 'increase',\n decrease: 'decrease',\n total: 'total',\n};\n\n/**\n * A running total, bar by bar: what a figure started at, what moved it, and what it ended at.\n *\n * The one chart in the family that cannot be a mode on another, because it needs three things at\n * once - an accumulating level, bars pinned to zero for the totals, and its own three-colour\n * semantic. Colour never carries that semantic alone: every bar's label prints its own sign and\n * every bar's accessible name says \"increase\" or \"decrease\" in words.\n */\n@Component({\n selector: 'ds-waterfall-chart',\n standalone: true,\n exportAs: 'dsWaterfallChart',\n imports: [\n ChartComponent,\n ColumnSeriesComponent,\n SkeletonComponent,\n WaterfallMarksComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './waterfall-chart.component.html',\n styleUrl: './waterfall-chart.component.scss',\n host: {\n '[class.framed]': \"frameResolved() === 'auto'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WaterfallChartComponent {\n /** The bars in the order they are read, which is the order they happened in - a waterfall is\n * never sorted, because the sequence is the meaning. */\n readonly data = input<readonly WaterfallChartBar[]>([]);\n\n /** Prints each bar's own reading above it, with its sign. */\n readonly showValues = input(true, { transform: booleanAttribute });\n\n /** The dashed rule chaining one bar to the next at the level they share. Without it the bars\n * read as separate columns rather than as one running total. */\n readonly showConnectors = input(true, { transform: booleanAttribute });\n\n /** Printed above the plot as the visible title, and reused as the annex table's caption. */\n readonly caption = input<string | null>(null);\n\n /** The accessible name. Generated from the steps when omitted, naming each one's direction in\n * words and the figure the chain ends at. */\n readonly summary = input<string | null>(null);\n\n /** A hint, not a count. Ticks snap to a round step. */\n readonly tickCount = input(5, { transform: numberAttribute });\n\n /** Turns on the click affordance and the keyboard route. `barClicked` fires whether or not\n * this is set. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** `'auto'` draws the bordered, padded box; `'none'` leaves it bare for a chart inside a card\n * the page has already drawn. Unset falls back to `DS_CONFIG.chart.frame`. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** The annex table under the plot. Unset falls back to `DS_CONFIG.chart.dataTable`, then\n * `'none'`. It prints each step's direction, its own reading and the running total. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Skeleton bars at the real count, so the page does not resize when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n\n /** Separate from an empty `data`: \"the request failed\" and \"there is nothing to show\" read the\n * same and mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_CONFIG.chart.emptyText`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shown in place of the plot while `error` is set. Unset falls back to\n * `DS_CONFIG.chart.errorText`. */\n readonly errorText = input<string | null>(null);\n\n /** Formats every value the chart prints - the axis ticks, the bar labels and the annex table.\n * The sign a delta carries is added around it, so a formatter never has to know about one. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n /** The clicked datum, as it was given. Fires on click and on Enter or Space. */\n readonly barClicked = output<WaterfallChartBar>();\n\n private readonly defaults = resolveChartDefaults(this);\n readonly frameResolved = this.defaults.frame;\n readonly dataTableResolved = this.defaults.dataTable;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n protected readonly steps = computed(() => waterfallSteps(this.data()));\n\n protected readonly categories = computed(() =>\n this.steps().map((step) => step.label),\n );\n\n protected readonly offsets = computed(() =>\n this.steps().map((step) => ({ from: step.from, to: step.to })),\n );\n\n /** What each bar's label prints: a delta's own change, a total's running sum. The two are\n * different readings and only one of them takes a sign. */\n protected readonly labelValues = computed(() =>\n this.steps().map((step, index) =>\n step.direction === 'total' ? step.to : (this.data()[index]?.value ?? 0),\n ),\n );\n\n protected readonly points = computed<readonly ColumnSeriesPoint[]>(() => {\n const format = this.valueFormatResolved();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => {\n const datum = this.data()[index];\n const reading = values[index];\n const sign = step.direction === 'increase' && reading > 0 ? '+' : '';\n\n return {\n id: datum?.id ?? String(index),\n // The word is what carries the meaning where colour cannot - forced colours, a monochrome\n // print, a reader who cannot tell the two hues apart, and every screen reader.\n label: `${step.label}, ${DIRECTION_WORDS[step.direction]} ${sign}${format(reading, 'tooltip')}`,\n value: reading,\n color: DIRECTION_COLORS[step.direction],\n };\n });\n });\n\n protected readonly accessibleName = computed(() => {\n const given = this.summary();\n if (given) {\n return given;\n }\n const steps = this.steps();\n if (steps.length === 0) {\n return this.caption() ?? 'Waterfall chart';\n }\n const format = this.valueFormatResolved();\n const last = steps[steps.length - 1];\n const spoken = steps\n .map(\n (step, index) =>\n `${step.label} ${DIRECTION_WORDS[step.direction]} ${format(this.labelValues()[index], 'tooltip')}`,\n )\n .join(', ');\n\n return `${this.caption() ?? 'Waterfall'}: ${spoken}. Ends at ${format(last.to, 'tooltip')}.`;\n });\n\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.tableRows().map((row) => ({\n key: row.key,\n cells: [\n row.label,\n row.direction,\n row.formattedValue,\n row.formattedRunningTotal,\n ],\n })),\n );\n\n protected readonly tableRows = computed(() => {\n const format = this.valueFormatResolved();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => ({\n key: `${index}-${step.label}`,\n label: step.label,\n direction: DIRECTION_WORDS[step.direction],\n formattedValue: format(values[index], 'tooltip'),\n formattedRunningTotal: format(step.to, 'tooltip'),\n }));\n });\n\n protected readonly skeletonBars = computed(() =>\n Array.from({ length: Math.max(this.data().length, 5) }),\n );\n\n protected onPointClicked(point: ColumnSeriesPoint): void {\n const datum = this.data().find(\n (entry, index) => (entry.id ?? String(index)) === point.id,\n );\n if (datum) {\n this.barClicked.emit(datum);\n }\n }\n}\n","<figure class=\"waterfall-chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonBars(); track $index) {\n <ds-skeleton height=\"var(--_waterfall-chart-skeleton-height)\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"valueFormatResolved()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\">\n <svg:g\n dsWaterfallMarks\n [steps]=\"steps()\"\n [labelValues]=\"labelValues()\"\n [showValues]=\"showValues()\"\n [showConnectors]=\"showConnectors()\"\n [valueFormat]=\"valueFormatResolved()\" />\n\n <svg:g\n dsColumnSeries\n showValues=\"false\"\n [data]=\"points()\"\n [offsets]=\"offsets()\"\n [interactive]=\"interactive()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n </ds-chart>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"['Step', 'Direction', 'Value', 'Running total']\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAKA;;;;;;;AAOgB;AACV,SAAU,cAAc,CAC5B,IAAkC,EAAA;IAElC,IAAI,OAAO,GAAG,CAAC;AAEf,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,KAAI;QACxB,MAAM,IAAI,GAAG,OAAO;QACpB,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC;QAC5D,OAAO,IAAI,KAAK;AAChB,QAAA,M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,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,gpDAAA,EAAA,MAAA,EAAA,CAAA,++GAAA,CAAA,EAAA;;;AEtEjD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-waterfall-chart.mjs","sources":["../../../src/lib/components/waterfall-chart/waterfall-chart.math.ts","../../../src/lib/components/waterfall-chart/waterfall-marks.component.ts","../../../src/lib/components/waterfall-chart/waterfall-marks.component.html","../../../src/lib/components/waterfall-chart/waterfall-chart.component.ts","../../../src/lib/components/waterfall-chart/waterfall-chart.component.html","../../../src/lib/components/waterfall-chart/ids-group-ltd-ids-design-system-components-waterfall-chart.ts"],"sourcesContent":["import type {\n WaterfallChartBar,\n WaterfallChartStep,\n} from './waterfall-chart.types';\n\n/** Where each bar spans, walking the running sum from zero.\n *\n * Every row adds its own value to the sum, including a total - a closing total carries `0` and so\n * prints the sum reached. A delta then spans from the sum before it to the sum after; a total or a\n * subtotal stands on zero and reaches the sum, which is what makes it a figure rather than a\n * change. A non-finite reading adds nothing rather than poisoning every bar after it.\n *\n * @internal */\nexport function waterfallSteps(\n data: readonly WaterfallChartBar[],\n): readonly WaterfallChartStep[] {\n let running = 0;\n\n return data.map((datum) => {\n const from = running;\n const value = Number.isFinite(datum.value) ? datum.value : 0;\n running += value;\n const standsOnZero = datum.kind === 'total' || datum.kind === 'subtotal';\n\n return {\n label: datum.label,\n from: standsOnZero ? 0 : from,\n to: running,\n direction: standsOnZero ? 'total' : value < 0 ? 'decrease' : 'increase',\n };\n });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n numberAttribute,\n} from '@angular/core';\nimport { CHART_SCALES } from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ChartValueFormat } from '@ids-group-ltd/ids-design-system/core';\nimport type { WaterfallChartStep } from './waterfall-chart.types';\n\n/** Distance from a bar's own tip to its value label's baseline. */\nconst VALUE_LABEL_GAP = 8;\n\n/**\n * The two things a waterfall needs that a column series cannot carry: the dashed rule chaining one\n * bar to the next, and a value label that prints its own sign.\n *\n * The label lives here rather than on the column series because the sign is not a property of the\n * number - a delta of `130` reads `+130` and a total of `800` reads `800` - and a series-wide\n * formatter sees only the value, never which of the two it is holding.\n *\n * Hosted on a `<g>` rather than an element of its own: an element the SVG specification does not\n * know is not rendered, and neither are its descendants. Written as `<svg:g dsWaterfallMarks>`.\n *\n * @internal\n */\n@Component({\n // The repository's `component-selector` rule asks for an element selector, and one cannot work\n // inside a canvas - see the same exemption on `g[dsColumnSeries]`.\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'g[dsWaterfallMarks]',\n standalone: true,\n templateUrl: './waterfall-marks.component.html',\n styleUrl: './waterfall-marks.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WaterfallMarksComponent {\n private readonly scales = inject(CHART_SCALES);\n\n readonly steps = input<readonly WaterfallChartStep[]>([]);\n\n /** The reading each label prints: a delta's own change, a total's running sum. */\n readonly labelValues = input<readonly number[]>([]);\n\n readonly showValues = input(true);\n\n readonly showConnectors = input(true);\n\n readonly valueFormat = input<ChartValueFormat>((value) => String(value));\n\n /** The share of a category's band the bars take, so the connector starts where the bar ends. */\n readonly columnWidthRatio = input(0.8, { transform: numberAttribute });\n\n protected readonly markWidth = computed(\n () => this.scales.bandWidth() * this.columnWidthRatio(),\n );\n\n /** One rule per gap between two bars, drawn at the level they share - the level the left bar\n * ended on. Without it the bars read as five separate columns instead of one chain. */\n protected readonly connectors = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const steps = this.steps();\n const half = this.markWidth() / 2;\n\n return steps.slice(0, -1).map((step, index) => ({\n key: `${index}-${step.label}`,\n x1: toX(index) + half,\n x2: toX(index + 1) - half,\n y: toY(step.to),\n }));\n });\n\n protected readonly labels = computed(() => {\n const toX = this.scales.xPosition();\n const toY = this.scales.yPosition();\n const format = this.valueFormat();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => {\n const reading = values[index] ?? step.to - step.from;\n const tip = Math.min(toY(step.from), toY(step.to));\n const sign = step.direction === 'increase' && reading > 0 ? '+' : '';\n\n return {\n key: `${index}-${step.label}`,\n x: toX(index),\n y: tip - VALUE_LABEL_GAP,\n text: `${sign}${format(reading, 'tooltip')}`,\n };\n });\n });\n}\n","<svg:g\n class=\"waterfall-marks\"\n aria-hidden=\"true\">\n @if (showConnectors()) {\n @for (connector of connectors(); track connector.key) {\n <svg:line\n class=\"connector\"\n [attr.x1]=\"connector.x1\"\n [attr.x2]=\"connector.x2\"\n [attr.y1]=\"connector.y\"\n [attr.y2]=\"connector.y\" />\n }\n }\n\n @if (showValues()) {\n @for (label of labels(); track label.key) {\n <svg:text\n class=\"value\"\n text-anchor=\"middle\"\n [attr.x]=\"label.x\"\n [attr.y]=\"label.y\">\n {{ label.text }}\n </svg:text>\n }\n }\n</svg:g>\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n output,\n} from '@angular/core';\nimport {\n ChartComponent,\n ColumnSeriesComponent,\n} from '@ids-group-ltd/ids-design-system/components/chart';\nimport type { ColumnSeriesPoint } from '@ids-group-ltd/ids-design-system/components/chart';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport type {\n ChartDataTable,\n ChartFrame,\n ChartValueFormat,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { waterfallSteps } from './waterfall-chart.math';\nimport { WaterfallMarksComponent } from './waterfall-marks.component';\nimport { ChartDataTableComponent } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport type { ChartDataRow } from '@ids-group-ltd/ids-design-system/components/chart-data-table';\nimport { resolveChartDefaults } from '@ids-group-ltd/ids-design-system/components';\nimport type {\n WaterfallChartBar,\n WaterfallChartStep,\n} from './waterfall-chart.types';\n\n/** What each direction is painted with. A total is the neutral series colour because it is not a\n * change at all, and reading it as one is the mistake the three-colour scheme exists to prevent. */\nconst DIRECTION_COLORS: Record<WaterfallChartStep['direction'], string> = {\n increase: 'var(--ds-chart-positive-color)',\n decrease: 'var(--ds-chart-negative-color)',\n total: 'var(--ds-chart-series-default-color)',\n};\n\nconst DIRECTION_WORDS: Record<WaterfallChartStep['direction'], string> = {\n increase: 'increase',\n decrease: 'decrease',\n total: 'total',\n};\n\n/**\n * A running total, bar by bar: what a figure started at, what moved it, and what it ended at.\n *\n * The one chart in the family that cannot be a mode on another, because it needs three things at\n * once - an accumulating level, bars pinned to zero for the totals, and its own three-colour\n * semantic. Colour never carries that semantic alone: every bar's label prints its own sign and\n * every bar's accessible name says \"increase\" or \"decrease\" in words.\n */\n@Component({\n selector: 'ds-waterfall-chart',\n standalone: true,\n exportAs: 'dsWaterfallChart',\n imports: [\n ChartComponent,\n ColumnSeriesComponent,\n SkeletonComponent,\n WaterfallMarksComponent,\n ChartDataTableComponent,\n ],\n templateUrl: './waterfall-chart.component.html',\n styleUrl: './waterfall-chart.component.scss',\n host: {\n '[class.framed]': \"frameResolved() === 'auto'\",\n },\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WaterfallChartComponent {\n /** The bars in the order they are read, which is the order they happened in - a waterfall is\n * never sorted, because the sequence is the meaning. */\n readonly data = input<readonly WaterfallChartBar[]>([]);\n\n /** Prints each bar's own reading above it, with its sign. */\n readonly showValues = input(true, { transform: booleanAttribute });\n\n /** The dashed rule chaining one bar to the next at the level they share. Without it the bars\n * read as separate columns rather than as one running total. */\n readonly showConnectors = input(true, { transform: booleanAttribute });\n\n /** Printed above the plot as the visible title, and reused as the annex table's caption. */\n readonly caption = input<string | null>(null);\n\n /** The accessible name. Generated from the steps when omitted, naming each one's direction in\n * words and the figure the chain ends at. */\n readonly summary = input<string | null>(null);\n\n /** A hint, not a count. Ticks snap to a round step. */\n readonly tickCount = input(5, { transform: numberAttribute });\n\n /** Turns on the click affordance and the keyboard route. `barClicked` fires whether or not\n * this is set. */\n readonly interactive = input(false, { transform: booleanAttribute });\n\n /** `'auto'` draws the bordered, padded box; `'none'` leaves it bare for a chart inside a card\n * the page has already drawn. Unset falls back to `DS_CONFIG.chart.frame`. */\n readonly frame = input<ChartFrame | null>(null);\n\n /** The annex table under the plot. Unset falls back to `DS_CONFIG.chart.dataTable`, then\n * `'none'`. It prints each step's direction, its own reading and the running total. */\n readonly dataTable = input<ChartDataTable | null>(null);\n\n /** Skeleton bars at the real count, so the page does not resize when the data lands. */\n readonly loading = input(false, { transform: booleanAttribute });\n\n /** Separate from an empty `data`: \"the request failed\" and \"there is nothing to show\" read the\n * same and mean opposite things. */\n readonly error = input(false, { transform: booleanAttribute });\n\n /** Shown in place of the plot when `data` is empty. Unset falls back to\n * `DS_CONFIG.chart.emptyText`. */\n readonly emptyText = input<string | null>(null);\n\n /** Shown in place of the plot while `error` is set. Unset falls back to\n * `DS_CONFIG.chart.errorText`. */\n readonly errorText = input<string | null>(null);\n\n /** Formats every value the chart prints - the axis ticks, the bar labels and the annex table.\n * The sign a delta carries is added around it, so a formatter never has to know about one. */\n readonly valueFormat = input<ChartValueFormat | null>(null);\n\n /** The clicked datum, as it was given. Fires on click and on Enter or Space. */\n readonly barClicked = output<WaterfallChartBar>();\n\n private readonly defaults = resolveChartDefaults(this);\n readonly frameResolved = this.defaults.frame;\n readonly dataTableResolved = this.defaults.dataTable;\n readonly emptyTextResolved = this.defaults.emptyText;\n readonly errorTextResolved = this.defaults.errorText;\n readonly valueFormatResolved = this.defaults.valueFormat;\n\n protected readonly isEmpty = computed(() => this.data().length === 0);\n\n protected readonly steps = computed(() => waterfallSteps(this.data()));\n\n protected readonly categories = computed(() =>\n this.steps().map((step) => step.label),\n );\n\n protected readonly offsets = computed(() =>\n this.steps().map((step) => ({ from: step.from, to: step.to })),\n );\n\n /** What each bar's label prints: a delta's own change, a total's running sum. The two are\n * different readings and only one of them takes a sign. */\n protected readonly labelValues = computed(() =>\n this.steps().map((step, index) =>\n step.direction === 'total' ? step.to : (this.data()[index]?.value ?? 0),\n ),\n );\n\n protected readonly points = computed<readonly ColumnSeriesPoint[]>(() => {\n const format = this.valueFormatResolved();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => {\n const datum = this.data()[index];\n const reading = values[index];\n const sign = step.direction === 'increase' && reading > 0 ? '+' : '';\n\n return {\n id: datum?.id ?? String(index),\n // The word is what carries the meaning where colour cannot - forced colours, a monochrome\n // print, a reader who cannot tell the two hues apart, and every screen reader.\n label: `${step.label}, ${DIRECTION_WORDS[step.direction]} ${sign}${format(reading, 'tooltip')}`,\n value: reading,\n color: DIRECTION_COLORS[step.direction],\n };\n });\n });\n\n protected readonly accessibleName = computed(() => {\n const given = this.summary();\n if (given) {\n return given;\n }\n const steps = this.steps();\n if (steps.length === 0) {\n return this.caption() ?? 'Waterfall chart';\n }\n const format = this.valueFormatResolved();\n const last = steps[steps.length - 1];\n const spoken = steps\n .map(\n (step, index) =>\n `${step.label} ${DIRECTION_WORDS[step.direction]} ${format(this.labelValues()[index], 'tooltip')}`,\n )\n .join(', ');\n\n return `${this.caption() ?? 'Waterfall'}: ${spoken}. Ends at ${format(last.to, 'tooltip')}.`;\n });\n\n protected readonly dataTableRows = computed<readonly ChartDataRow[]>(() =>\n this.tableRows().map((row) => ({\n key: row.key,\n cells: [\n row.label,\n row.direction,\n row.formattedValue,\n row.formattedRunningTotal,\n ],\n })),\n );\n\n protected readonly tableRows = computed(() => {\n const format = this.valueFormatResolved();\n const values = this.labelValues();\n\n return this.steps().map((step, index) => ({\n key: `${index}-${step.label}`,\n label: step.label,\n direction: DIRECTION_WORDS[step.direction],\n formattedValue: format(values[index], 'tooltip'),\n formattedRunningTotal: format(step.to, 'tooltip'),\n }));\n });\n\n protected readonly skeletonBars = computed(() =>\n Array.from({ length: Math.max(this.data().length, 5) }),\n );\n\n protected onPointClicked(point: ColumnSeriesPoint): void {\n const datum = this.data().find(\n (entry, index) => (entry.id ?? String(index)) === point.id,\n );\n if (datum) {\n this.barClicked.emit(datum);\n }\n }\n}\n","<figure class=\"waterfall-chart\">\n @if (caption()) {\n <figcaption>\n {{ caption() }}\n </figcaption>\n }\n\n @if (error()) {\n <p\n class=\"empty is-error\"\n role=\"status\">\n {{ errorTextResolved() }}\n </p>\n } @else if (loading()) {\n <div\n class=\"skeleton\"\n aria-hidden=\"true\">\n @for (placeholder of skeletonBars(); track $index) {\n <ds-skeleton height=\"var(--_waterfall-chart-skeleton-height)\" />\n }\n </div>\n } @else if (isEmpty()) {\n <p class=\"empty\">\n {{ emptyTextResolved() }}\n </p>\n } @else {\n <ds-chart\n frame=\"none\"\n [categories]=\"categories()\"\n [tickCount]=\"tickCount()\"\n [valueFormat]=\"valueFormatResolved()\"\n [interactive]=\"interactive()\"\n [summary]=\"accessibleName()\">\n <svg:g\n dsWaterfallMarks\n [steps]=\"steps()\"\n [labelValues]=\"labelValues()\"\n [showValues]=\"showValues()\"\n [showConnectors]=\"showConnectors()\"\n [valueFormat]=\"valueFormatResolved()\" />\n\n <svg:g\n dsColumnSeries\n showValues=\"false\"\n [data]=\"points()\"\n [offsets]=\"offsets()\"\n [interactive]=\"interactive()\"\n [valueFormat]=\"valueFormatResolved()\"\n (pointClicked)=\"onPointClicked($event)\" />\n </ds-chart>\n\n @if (dataTableResolved() !== 'none') {\n <ds-chart-data-table\n [columns]=\"['Step', 'Direction', 'Value', 'Running total']\"\n [rows]=\"dataTableRows()\"\n [caption]=\"caption()\"\n [open]=\"dataTableResolved() === 'visible'\" />\n }\n }\n</figure>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAKA;;;;;;;AAOgB;AACV,SAAU,cAAc,CAC5B,IAAkC,EAAA;IAElC,IAAI,OAAO,GAAG,CAAC;AAEf,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,KAAI;QACxB,MAAM,IAAI,GA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AA,EACN,kBAAkB,EAAA,OAAA,EACnB;wBACP,cAAc;wBACd,qBAAqB;wBACrB,iBAAiB;wBACjB,uBAAuB;wBACvB,uBAAuB;qBACxB,EAAA,IAAA,EAGK;AACJ,wBAAA,gBAAgB,EAAE,4BAA4B;AAC/C,qBAAA,EAAA,aAAA,EACc,iBAAiB,CAAC,QAAQ,EAAA,eAAA,EACxB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,gpDAAA,EAAA,MAAA,EAAA,CAAA,++GAAA,CAAA,EAAA;;;AEtEjD;;AAEG;;;;"}
|
|
@@ -115,11 +115,16 @@ function defaultChartFormat(value, location) {
|
|
|
115
115
|
return '—';
|
|
116
116
|
}
|
|
117
117
|
return location === 'tick'
|
|
118
|
-
?
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
118
|
+
? compactFormatter().format(value)
|
|
119
|
+
: numberFormatter(undefined).format(value);
|
|
120
|
+
}
|
|
121
|
+
let cachedCompactFormatter = null;
|
|
122
|
+
function compactFormatter() {
|
|
123
|
+
cachedCompactFormatter ??= new Intl.NumberFormat(undefined, {
|
|
124
|
+
notation: 'compact',
|
|
125
|
+
maximumFractionDigits: 1,
|
|
126
|
+
});
|
|
127
|
+
return cachedCompactFormatter;
|
|
123
128
|
}
|
|
124
129
|
/** @internal */
|
|
125
130
|
function formatPercent(value, total) {
|
|
@@ -219,13 +224,27 @@ function elementWidth(host) {
|
|
|
219
224
|
if (!isPlatformBrowser(inject(PLATFORM_ID))) {
|
|
220
225
|
return width.asReadonly();
|
|
221
226
|
}
|
|
222
|
-
const
|
|
223
|
-
|
|
227
|
+
const element = host.nativeElement;
|
|
228
|
+
widths.set(element, width);
|
|
229
|
+
sharedObserver().observe(element);
|
|
230
|
+
inject(DestroyRef).onDestroy(() => {
|
|
231
|
+
sharedObserver().unobserve(element);
|
|
232
|
+
widths.delete(element);
|
|
224
233
|
});
|
|
225
|
-
observer.observe(host.nativeElement);
|
|
226
|
-
inject(DestroyRef).onDestroy(() => observer.disconnect());
|
|
227
234
|
return width.asReadonly();
|
|
228
235
|
}
|
|
236
|
+
const widths = new WeakMap();
|
|
237
|
+
let observer = null;
|
|
238
|
+
// One observer for every chart on the page, so a resize is one callback with every entry in it
|
|
239
|
+
// rather than one callback per chart.
|
|
240
|
+
function sharedObserver() {
|
|
241
|
+
observer ??= new ResizeObserver((entries) => {
|
|
242
|
+
for (const entry of entries) {
|
|
243
|
+
widths.get(entry.target)?.set(Math.round(entry.contentRect.width));
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
return observer;
|
|
247
|
+
}
|
|
229
248
|
|
|
230
249
|
/** A label turned 45 degrees takes this fraction of its width across the axis. 45 is where the
|
|
231
250
|
* policy stops: past it the eye has to tilt rather than glance. */
|
|
@@ -673,6 +692,15 @@ function staggerDelay(index, stepMs) {
|
|
|
673
692
|
}
|
|
674
693
|
return Math.min(index * stepMs, STAGGER_CAP_MS);
|
|
675
694
|
}
|
|
695
|
+
/** Starts a mark's exit, bound as `(animate.leave)="leaveMark($event)"`: `_chart-motion.scss`
|
|
696
|
+
* animates `.mark-leave`, and Angular removes the mark on its `animationend`. The function form,
|
|
697
|
+
* not `animate.leave="mark-leave"`: the class form calls `getAnimations()` once per leaving mark,
|
|
698
|
+
* and in Chrome that call costs more the more animations are running.
|
|
699
|
+
*
|
|
700
|
+
* @internal */
|
|
701
|
+
function leaveMark(event) {
|
|
702
|
+
event.target.classList.add('mark-leave');
|
|
703
|
+
}
|
|
676
704
|
|
|
677
705
|
/** Where a roving tabindex lands after `key`, or `null` when the key does not traverse.
|
|
678
706
|
*
|
|
@@ -716,6 +744,40 @@ function focusMark(scope, index, within = '') {
|
|
|
716
744
|
target.focus();
|
|
717
745
|
}
|
|
718
746
|
}
|
|
747
|
+
/** @internal */
|
|
748
|
+
function rovingMarks(count) {
|
|
749
|
+
const roving = signal(0, ...(ngDevMode ? [{ debugName: "roving" }] : /* istanbul ignore next */ []));
|
|
750
|
+
return {
|
|
751
|
+
tabStop: computed(() => Math.min(roving(), Math.max(0, count() - 1))),
|
|
752
|
+
focus: (index) => roving.set(index),
|
|
753
|
+
navigate(event, index, scope) {
|
|
754
|
+
const next = nextRovingIndex(event.key, index, count());
|
|
755
|
+
if (next === null) {
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
758
|
+
event.preventDefault();
|
|
759
|
+
roving.set(next);
|
|
760
|
+
focusMark(scope, next);
|
|
761
|
+
},
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
/** The mark an event on the marks' parent came from - the nearest `[data-mark-index]` inside that
|
|
765
|
+
* parent - for a chart that listens once per series rather than once per mark. `null` when the
|
|
766
|
+
* event did not start on a mark.
|
|
767
|
+
*
|
|
768
|
+
* @internal */
|
|
769
|
+
function markOf(event) {
|
|
770
|
+
const scope = event.currentTarget;
|
|
771
|
+
const target = event.target;
|
|
772
|
+
if (!(scope instanceof Element) || !(target instanceof Element)) {
|
|
773
|
+
return null;
|
|
774
|
+
}
|
|
775
|
+
const element = target.closest('[data-mark-index]');
|
|
776
|
+
if (!element || !scope.contains(element)) {
|
|
777
|
+
return null;
|
|
778
|
+
}
|
|
779
|
+
return { element, index: Number(element.getAttribute('data-mark-index')) };
|
|
780
|
+
}
|
|
719
781
|
|
|
720
782
|
function trendOf(values) {
|
|
721
783
|
const first = values[0];
|
|
@@ -1354,6 +1416,12 @@ function focusOwnControl(host, options) {
|
|
|
1354
1416
|
host.querySelector(TRIGGER_ELEMENTS);
|
|
1355
1417
|
target?.focus(options);
|
|
1356
1418
|
}
|
|
1419
|
+
function blurOwnControl(host) {
|
|
1420
|
+
const active = host.ownerDocument.activeElement;
|
|
1421
|
+
if (active instanceof HTMLElement && host.contains(active)) {
|
|
1422
|
+
active.blur();
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1357
1425
|
/**
|
|
1358
1426
|
* Shared `ControlValueAccessor` for DS form controls whose value is a signal
|
|
1359
1427
|
* `model()`. Bridges that model with Angular forms (reactive `formControl` /
|
|
@@ -1382,6 +1450,15 @@ class DsControlValueAccessor extends DsFieldBase {
|
|
|
1382
1450
|
focus(options) {
|
|
1383
1451
|
focusOwnControl(this.hostElement.nativeElement, options);
|
|
1384
1452
|
}
|
|
1453
|
+
/**
|
|
1454
|
+
* The counterpart of `focus()`: drops focus if it sits anywhere inside this
|
|
1455
|
+
* control - the input, a picker trigger, the OTP cell that has it - so no
|
|
1456
|
+
* subclass overrides it. A portaled panel is outside the host and is left alone.
|
|
1457
|
+
* For a host that navigates away after `clear()`, which keeps focus on purpose.
|
|
1458
|
+
*/
|
|
1459
|
+
blur() {
|
|
1460
|
+
blurOwnControl(this.hostElement.nativeElement);
|
|
1461
|
+
}
|
|
1385
1462
|
bridge = valueControlBridge(() => this.value);
|
|
1386
1463
|
/** Driven by the forms API via `setDisabledState`. */
|
|
1387
1464
|
formDisabled = this.bridge.formDisabled;
|
|
@@ -1434,6 +1511,10 @@ class DsBooleanControlValueAccessor extends DsFieldBase {
|
|
|
1434
1511
|
focus(options) {
|
|
1435
1512
|
focusOwnControl(this.hostElement.nativeElement, options);
|
|
1436
1513
|
}
|
|
1514
|
+
/** The counterpart of `focus()` - see `DsControlValueAccessor.blur`. */
|
|
1515
|
+
blur() {
|
|
1516
|
+
blurOwnControl(this.hostElement.nativeElement);
|
|
1517
|
+
}
|
|
1437
1518
|
/** Driven by the forms API via `setDisabledState`. */
|
|
1438
1519
|
formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
|
|
1439
1520
|
// Separate from the control's `touched`, which only exists once `NgControl`
|
|
@@ -2275,5 +2356,5 @@ function resolveChartDefaults(inputs) {
|
|
|
2275
2356
|
* Generated bundle index. Do not edit.
|
|
2276
2357
|
*/
|
|
2277
2358
|
|
|
2278
|
-
export { CHART_HEAT_COLORS, CHART_RAMP_COLORS, CHART_SERIES_COLORS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, defaultChartFormat, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, forwardOverlayTokens, labelInterval, largestRemainder, linePath, lineSegments, linearScale, lttbDecimate, markAt, minMaxDecimate, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge };
|
|
2359
|
+
export { CHART_HEAT_COLORS, CHART_RAMP_COLORS, CHART_SERIES_COLORS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, defaultChartFormat, describeSeries, describeShare, disposeWithLeave, domainMinOf, dropdownOverlay, dsAriaCurrent, dsDestination, elementWidth, focusIsInside, focusMark, formatPercent, formatTick, formatValue, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, linePath, lineSegments, linearScale, lttbDecimate, markAt, markOf, minMaxDecimate, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointScale, polylinePoints, prepareOverlayEnter, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, staggerDelay, tickStep, tickValues, trimmedText, valueControlBridge };
|
|
2279
2360
|
//# sourceMappingURL=ids-group-ltd-ids-design-system-components.mjs.map
|