@ids-group-ltd/ids-design-system 1.1.1 → 1.2.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 +869 -0
- package/agent/INDEX.md +8 -7
- package/agent/charts/ds-scatter-chart.md +1 -1
- package/agent/feedback/ds-badge.md +2 -2
- package/agent/feedback/ds-chat-message.md +1 -1
- package/agent/feedback/ds-chat-step.md +2 -2
- package/agent/feedback/ds-chat-thread.md +1 -1
- package/agent/feedback/ds-empty-state.md +2 -1
- package/agent/feedback/ds-stat.md +1 -1
- package/agent/feedback/ds-toast.md +2 -2
- package/agent/feedback/ds-tree.md +4 -2
- package/agent/forms/ds-button.md +3 -3
- package/agent/forms/ds-chat-input.md +3 -3
- package/agent/forms/ds-dropzone.md +1 -1
- package/agent/forms/ds-icon-button.md +3 -3
- package/agent/forms/ds-number-stepper.md +3 -3
- package/agent/forms/ds-search.md +1 -1
- package/agent/forms/ds-split-button.md +1 -1
- package/agent/foundations/tokens.md +4 -3
- package/agent/navigation/ds-app-layout.md +1 -1
- package/agent/navigation/ds-nav-divider.md +6 -0
- package/agent/navigation/{ds-sidenav-footer.md → ds-nav-footer.md} +3 -3
- package/agent/navigation/{ds-sidenav-group.md → ds-nav-group.md} +2 -2
- package/agent/navigation/{ds-sidenav-item.md → ds-nav-item.md} +6 -6
- package/agent/navigation/ds-nav.md +15 -0
- package/agent/navigation/ds-splitter.md +1 -1
- package/agent/overlays/ds-drawer.md +1 -1
- package/agent/platform/toast-service.md +1 -1
- package/components/README.md +24 -24
- package/components.md +60 -51
- package/design-system.md +8 -7
- package/eslint/deprecated-api.json +108 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge-badge-count-roll.component-BDNXADJZ.mjs +182 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge-badge-count-roll.component-BDNXADJZ.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +37 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +5 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +76 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +2 -2
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs +122 -21
- package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +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-definition-term.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-definition-term.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +65 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +76 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +14 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +6 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-info-hint.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-info-hint.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.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-list.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-nav-footer.mjs +113 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-nav-footer.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-nav.mjs +228 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-nav.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +61 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +36 -4
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +9 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-reveal.mjs +56 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-reveal.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +10 -39
- 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 +7 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +33 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +4 -98
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +11 -179
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +2 -2
- 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-split-button.mjs +3 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +68 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +2 -2
- 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 +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +41 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.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 +6 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +27 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +54 -19
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +8 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +58 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +153 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +25 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +4 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/1.1.1.json +14 -4
- package/migrations/1.1.2.json +143 -0
- package/migrations/1.2.0.json +1433 -0
- package/migrations/README.md +11 -2
- package/package.json +28 -1
- package/schematics/check-overrides/index.cjs +28 -3
- package/schematics/check-overrides/scan.cjs +151 -2
- package/schematics/check-overrides/schema.json +4 -0
- package/schematics/check-overrides/surface.json +397 -73
- package/schematics/collection.json +1 -1
- package/stylelint/deprecated-tokens.json +7 -0
- package/stylelint/index.mjs +17 -3
- package/stylelint/known-tokens.mjs +139 -0
- package/stylelint/report.mjs +185 -0
- package/stylelint/tokens.mjs +160 -0
- package/stylelint/use-tokens.mjs +397 -0
- package/styles/_check-box.scss +6 -5
- package/styles/_dropdown-overlay.scss +6 -8
- package/styles/_ds-color.scss +7 -2
- package/styles/_field-state.scss +4 -2
- package/styles/_focus.scss +12 -5
- package/styles/_link.scss +4 -4
- package/styles/_optical-center.scss +29 -0
- package/styles/_reveal.scss +8 -0
- package/styles/_status.scss +17 -7
- package/styles/_step-marker.scss +192 -6
- package/styles/_surface-level.scss +16 -0
- package/styles/_text-shimmer.scss +21 -0
- package/styles/_theme-activation.scss +17 -4
- package/styles/_tokens.scss +34 -7
- package/styles/ds.scss +1 -0
- package/themes/README.md +16 -21
- package/themes/_semantic.scss +134 -61
- package/themes/dark/_theme.scss +20 -24
- package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +20 -1
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +14 -3
- package/types/ids-group-ltd-ids-design-system-components-chat.d.ts +67 -6
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +9 -1
- package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +28 -2
- package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +7 -2
- package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +8 -5
- package/types/ids-group-ltd-ids-design-system-components-nav-footer.d.ts +88 -0
- package/types/ids-group-ltd-ids-design-system-components-nav.d.ts +152 -0
- package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +21 -3
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +1 -0
- package/types/ids-group-ltd-ids-design-system-components-reveal.d.ts +31 -0
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +2 -8
- package/types/ids-group-ltd-ids-design-system-components-search.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +3 -0
- package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +12 -83
- package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +21 -131
- package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-stat.d.ts +10 -1
- package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +1 -0
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +27 -6
- package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +26 -4
- package/types/ids-group-ltd-ids-design-system-components.d.ts +26 -1
- package/types/ids-group-ltd-ids-design-system-core.d.ts +38 -2
- package/types/ids-group-ltd-ids-design-system.d.ts +10 -7
- package/agent/navigation/ds-sidenav.md +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-tree.mjs","sources":["../../../src/lib/components/tree/tree-label.directive.ts","../../../src/lib/components/tree/tree-trailing.directive.ts","../../../src/lib/components/tree/tree.component.ts","../../../src/lib/components/tree/tree.component.html","../../../src/lib/components/tree/ids-group-ltd-ids-design-system-components-tree.ts"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport type { TreeNode } from './tree.types';\n\n/** What a `dsTreeLabel` template is handed: the row's node, its nesting level (`0` for a root\n * node) and whether the row is selected and disabled. */\nexport interface TreeLabelContext {\n readonly $implicit: TreeNode;\n readonly node: TreeNode;\n readonly level: number;\n readonly selected: boolean;\n readonly disabled: boolean;\n}\n\n/**\n * Content drawn in place of a `ds-tree` row's label, for a label of more than one line or one\n * that mixes styles.\n *\n * ```html\n * <ds-tree [nodes]=\"layers\">\n * <ng-template dsTreeLabel let-node>\n * <span class=\"tag\">{{ tags[node.id] }}</span>\n * <span class=\"text\">{{ node.label }}</span>\n * </ng-template>\n * </ds-tree>\n * ```\n *\n * The row grows to the template's height and the label takes the width between the icon and\n * the trailing content, so an element inside it can cut its text with an ellipsis. The text the\n * template renders is the row's accessible name; a template that draws no text needs a\n * visually hidden element with the name in it. A click inside it selects the row as a click on\n * the default label does.\n */\n@Directive({\n selector: 'ng-template[dsTreeLabel]',\n standalone: true,\n})\nexport class TreeLabelDirective {\n readonly template = inject<TemplateRef<TreeLabelContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _directive: TreeLabelDirective,\n _context: unknown,\n ): _context is TreeLabelContext {\n return true;\n }\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport type { TreeNode } from './tree.types';\n\n/** What a `dsTreeTrailing` template is handed: the row's node, as `$implicit` and again as `node`. */\nexport interface TreeTrailingContext {\n readonly $implicit: TreeNode;\n readonly node: TreeNode;\n}\n\n/**\n * Content drawn at the end of every `ds-tree` row: a badge, a count, a small icon button.\n *\n * ```html\n * <ds-tree [nodes]=\"layers\">\n * <ng-template dsTreeTrailing let-node>\n * <ds-badge size=\"sm\">{{ node.id }}</ds-badge>\n * </ng-template>\n * </ds-tree>\n * ```\n *\n * A click inside it neither selects nor toggles the row. Its controls are tab stops only on\n * the focused row: Tab from that row reaches them, and the other rows' controls stay out of\n * the tab order.\n */\n@Directive({\n selector: 'ng-template[dsTreeTrailing]',\n standalone: true,\n})\nexport class TreeTrailingDirective {\n readonly template = inject<TemplateRef<TreeTrailingContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _directive: TreeTrailingDirective,\n _context: unknown,\n ): _context is TreeTrailingContext {\n return true;\n }\n}\n","import {\n Component,\n ElementRef,\n ViewEncapsulation,\n afterEveryRender,\n computed,\n contentChild,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { TreeLabelDirective } from './tree-label.directive';\nimport { TreeTrailingDirective } from './tree-trailing.directive';\nimport type { TreeNode, TreeSelection } from './tree.types';\n\ninterface VisibleNode {\n node: TreeNode;\n level: number;\n hasChildren: boolean;\n expanded: boolean;\n}\n\nconst FOCUSABLE =\n 'a[href], button, input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\nconst PARKED_TABINDEX = 'data-ds-tree-tabindex';\n\nlet nextId = 0;\n\n@Component({\n selector: 'ds-tree',\n standalone: true,\n imports: [IconComponent, NgTemplateOutlet],\n templateUrl: './tree.component.html',\n styleUrl: './tree.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'tree',\n '[attr.aria-multiselectable]': \"multiple() ? 'true' : null\",\n '(keydown)': 'onKeydown($event)',\n '(pointerleave)': 'hover(null)',\n },\n})\nexport class TreeComponent {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** Root-level nodes; nest via `children`. */\n readonly nodes = input<readonly TreeNode[]>([]);\n /** Ids of the expanded nodes. */\n readonly expandedIds = model<Set<string>>(new Set());\n /** `'multiple'` reads and writes `selectedIds`; `'single'` reads and writes `selectedId`. */\n readonly selection = input<TreeSelection>('single');\n /** Id of the selected node, in `'single'` selection. */\n readonly selectedId = model<string | null>(null);\n /** Ids of the selected nodes, in `'multiple'` selection. */\n readonly selectedIds = model<string[]>([]);\n /** Fires with the node when a row is selected (click or Enter/Space), not when one is deselected. */\n readonly nodeSelected = output<TreeNode>();\n /** Fires with the node under the pointer or newly focused, and `null` when the pointer leaves the tree. */\n readonly nodeHover = output<TreeNode | null>();\n\n protected readonly label = contentChild(TreeLabelDirective);\n protected readonly trailing = contentChild(TreeTrailingDirective);\n protected readonly idPrefix = `ds-tree-${++nextId}`;\n\n private readonly activeId = signal<string | null>(null);\n private hoveredId: string | null = null;\n\n protected readonly multiple = computed(() => this.selection() === 'multiple');\n\n protected readonly visibleNodes = computed<VisibleNode[]>(() => {\n const out: VisibleNode[] = [];\n const walk = (list: readonly TreeNode[], level: number): void => {\n for (const node of list) {\n const hasChildren = !!node.children?.length;\n const expanded = this.isExpanded(node.id);\n out.push({ node, level, hasChildren, expanded });\n if (hasChildren && expanded) {\n walk(node.children ?? [], level + 1);\n }\n }\n };\n walk(this.nodes(), 0);\n\n return out;\n });\n\n protected readonly effectiveActiveId = computed(\n () => this.activeId() ?? this.visibleNodes()[0]?.node.id ?? null,\n );\n\n constructor() {\n // Content inside a trailing template can change without a signal of the tree changing,\n // so its tab stops are re-parked after every render.\n afterEveryRender({ write: () => this.parkTrailingTabStops() });\n }\n\n protected isExpanded(id: string): boolean {\n return this.expandedIds().has(id);\n }\n\n protected isSelected(id: string): boolean {\n return this.multiple()\n ? this.selectedIds().includes(id)\n : this.selectedId() === id;\n }\n\n protected isActive(id: string): boolean {\n return this.effectiveActiveId() === id;\n }\n\n protected onRowClick(entry: VisibleNode, event: MouseEvent): void {\n if (this.fromTrailing(event)) {\n return;\n }\n this.activate(entry, event.shiftKey || event.ctrlKey || event.metaKey);\n }\n\n protected onRowFocus(entry: VisibleNode): void {\n this.activeId.set(entry.node.id);\n this.hover(entry.node);\n }\n\n protected hover(node: TreeNode | null): void {\n const id = node?.id ?? null;\n if (id === this.hoveredId) {\n return;\n }\n this.hoveredId = id;\n this.nodeHover.emit(node);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (this.fromTrailing(event)) {\n return;\n }\n const visible = this.visibleNodes();\n const index = visible.findIndex(\n (entry) => entry.node.id === this.effectiveActiveId(),\n );\n if (index < 0) {\n return;\n }\n const current = visible[index];\n switch (event.key) {\n case 'ArrowDown':\n this.moveActive(index + 1);\n break;\n case 'ArrowUp':\n this.moveActive(index - 1);\n break;\n case 'Home':\n this.moveActive(0);\n break;\n case 'End':\n this.moveActive(visible.length - 1);\n break;\n case 'ArrowRight':\n if (current.hasChildren && !current.expanded) {\n this.toggle(current.node);\n } else if (current.hasChildren) {\n this.moveActive(index + 1);\n }\n break;\n case 'ArrowLeft':\n if (current.hasChildren && current.expanded) {\n this.toggle(current.node);\n } else {\n this.moveToParent(visible, index);\n }\n break;\n case 'Enter':\n case ' ':\n if (!event.repeat) {\n this.activate(\n current,\n event.shiftKey || event.ctrlKey || event.metaKey,\n );\n }\n break;\n default:\n return;\n }\n event.preventDefault();\n }\n\n // A modified activation in multiple selection only adds or removes the node; every other\n // activation selects the node alone and toggles a parent.\n private activate(entry: VisibleNode, modified: boolean): void {\n const node = entry.node;\n if (node.disabled) {\n return;\n }\n this.activeId.set(node.id);\n if (this.multiple() && modified) {\n const ids = this.selectedIds();\n if (ids.includes(node.id)) {\n this.selectedIds.set(ids.filter((id) => id !== node.id));\n } else {\n this.selectedIds.set([...ids, node.id]);\n this.nodeSelected.emit(node);\n }\n\n return;\n }\n if (this.multiple()) {\n this.selectedIds.set([node.id]);\n } else {\n this.selectedId.set(node.id);\n }\n this.nodeSelected.emit(node);\n if (entry.hasChildren) {\n this.toggle(node);\n }\n }\n\n private toggle(node: TreeNode): void {\n if (node.disabled || !node.children?.length) {\n return;\n }\n const next = new Set(this.expandedIds());\n if (next.has(node.id)) {\n next.delete(node.id);\n } else {\n next.add(node.id);\n }\n this.expandedIds.set(next);\n }\n\n private moveActive(targetIndex: number): void {\n const visible = this.visibleNodes();\n if (targetIndex < 0 || targetIndex >= visible.length) {\n return;\n }\n this.focusNode(visible[targetIndex].node.id);\n }\n\n private moveToParent(visible: VisibleNode[], index: number): void {\n const level = visible[index].level;\n for (let i = index - 1; i >= 0; i--) {\n if (visible[i].level < level) {\n this.focusNode(visible[i].node.id);\n\n return;\n }\n }\n }\n\n private focusNode(id: string): void {\n this.activeId.set(id);\n this.host.nativeElement\n .querySelector<HTMLElement>(`[data-node-id=\"${CSS.escape(id)}\"]`)\n ?.focus();\n }\n\n private fromTrailing(event: Event): boolean {\n return (\n event.target instanceof Element && !!event.target.closest('.trailing')\n );\n }\n\n // The tree keeps one tab stop: controls in a trailing template are tabbable on the active\n // row only, and get their own tabindex back when their row becomes active.\n private parkTrailingTabStops(): void {\n const activeId = this.effectiveActiveId();\n for (const area of this.host.nativeElement.querySelectorAll('.trailing')) {\n const onActiveRow =\n area.closest('[data-node-id]')?.getAttribute('data-node-id') ===\n activeId;\n const controls = area.querySelectorAll<HTMLElement>(\n onActiveRow ? `[${PARKED_TABINDEX}]` : FOCUSABLE,\n );\n for (const control of controls) {\n if (onActiveRow) {\n const own = control.getAttribute(PARKED_TABINDEX);\n control.removeAttribute(PARKED_TABINDEX);\n if (own) {\n control.setAttribute('tabindex', own);\n } else {\n control.removeAttribute('tabindex');\n }\n } else if (!control.hasAttribute(PARKED_TABINDEX)) {\n control.setAttribute(\n PARKED_TABINDEX,\n control.getAttribute('tabindex') ?? '',\n );\n control.setAttribute('tabindex', '-1');\n }\n }\n }\n }\n}\n","@for (entry of visibleNodes(); track entry.node.id; let index = $index) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -- Enter and Space reach the host keydown handler, which activates the focused row -->\n <div\n class=\"row\"\n role=\"treeitem\"\n [attr.data-node-id]=\"entry.node.id\"\n [attr.aria-level]=\"entry.level + 1\"\n [attr.aria-expanded]=\"entry.hasChildren ? entry.expanded : null\"\n [attr.aria-selected]=\"isSelected(entry.node.id)\"\n [attr.aria-disabled]=\"entry.node.disabled ? 'true' : null\"\n [attr.aria-labelledby]=\"idPrefix + '-' + index\"\n [attr.aria-describedby]=\"\n trailing() ? idPrefix + '-' + index + '-trailing' : null\n \"\n [attr.tabindex]=\"isActive(entry.node.id) ? 0 : -1\"\n [class.selected]=\"isSelected(entry.node.id)\"\n [style.--_level]=\"entry.level\"\n (click)=\"onRowClick(entry, $event)\"\n (focus)=\"onRowFocus(entry)\"\n (pointerenter)=\"hover(entry.node)\">\n @if (entry.hasChildren) {\n <ds-icon\n class=\"caret\"\n [name]=\"entry.expanded ? 'chevronDown' : 'chevronRight'\"\n [size]=\"16\" />\n } @else if (!entry.node.icon) {\n <span class=\"caret-spacer\"></span>\n }\n\n @if (entry.node.icon; as icon) {\n <ds-icon\n class=\"node-icon\"\n [name]=\"icon\"\n [size]=\"16\" />\n }\n\n @if (label(); as label) {\n <span\n class=\"custom-label\"\n [id]=\"idPrefix + '-' + index\">\n <ng-container\n *ngTemplateOutlet=\"\n label.template;\n context: {\n $implicit: entry.node,\n node: entry.node,\n level: entry.level,\n selected: isSelected(entry.node.id),\n disabled: !!entry.node.disabled,\n }\n \" />\n </span>\n } @else {\n <span\n class=\"label\"\n [id]=\"idPrefix + '-' + index\">\n {{ entry.node.label }}\n </span>\n }\n\n @if (trailing(); as trailing) {\n <span\n class=\"trailing\"\n [id]=\"idPrefix + '-' + index + '-trailing'\">\n <ng-container\n *ngTemplateOutlet=\"\n trailing.template;\n context: { $implicit: entry.node, node: entry.node }\n \" />\n </span>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAaA;;;;;;;;;;;;;;;;;;AAkBG;MAKU,kBAAkB,CAAA;AACpB,IAAA,QAAQ,GAAG,MAAM,CAAgC,WAAW,CAAC;AAEtE,IAAA,OAAO,sBAAsB,CAC3B,UAA8B,EAC9B,QAAiB,EAAA;AAEjB,QAAA,OAAO,IAAI;IACb;wGARW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;AC1BD;;;;;;;;;;;;;;AAcG;MAKU,qBAAqB,CAAA;AACvB,IAAA,QAAQ,GAAG,MAAM,CAAmC,WAAW,CAAC;AAEzE,IAAA,OAAO,sBAAsB,CAC3B,UAAiC,EACjC,QAAiB,EAAA;AAEjB,QAAA,OAAO,IAAI;IACb;wGARW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,6BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;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design-system-components-tree.mjs","sources":["../../../src/lib/components/tree/tree-label.directive.ts","../../../src/lib/components/tree/tree-trailing.directive.ts","../../../src/lib/components/tree/tree.component.ts","../../../src/lib/components/tree/tree.component.html","../../../src/lib/components/tree/ids-group-ltd-ids-design-system-components-tree.ts"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport type { TreeNode } from './tree.types';\n\n/** What a `dsTreeLabel` template is handed: the row's node, its nesting level (`0` for a root\n * node) and whether the row is selected and disabled. */\nexport interface TreeLabelContext {\n readonly $implicit: TreeNode;\n readonly node: TreeNode;\n readonly level: number;\n readonly selected: boolean;\n readonly disabled: boolean;\n}\n\n/**\n * Content drawn in place of a `ds-tree` row's label, for a label of more than one line or one\n * that mixes styles.\n *\n * ```html\n * <ds-tree [nodes]=\"layers\">\n * <ng-template dsTreeLabel let-node>\n * <span class=\"tag\">{{ tags[node.id] }}</span>\n * <span class=\"text\">{{ node.label }}</span>\n * </ng-template>\n * </ds-tree>\n * ```\n *\n * The row grows to the template's height and the label takes the width between the icon and\n * the trailing content, so an element inside it can cut its text with an ellipsis. The text the\n * template renders is the row's accessible name; a template that draws no text needs a\n * visually hidden element with the name in it. A click inside it selects the row as a click on\n * the default label does.\n */\n@Directive({\n selector: 'ng-template[dsTreeLabel]',\n standalone: true,\n})\nexport class TreeLabelDirective {\n readonly template = inject<TemplateRef<TreeLabelContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _directive: TreeLabelDirective,\n _context: unknown,\n ): _context is TreeLabelContext {\n return true;\n }\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport type { TreeNode } from './tree.types';\n\n/** What a `dsTreeTrailing` template is handed: the row's node, as `$implicit` and again as `node`,\n * and whether the row is expanded (`false` for a row without children). */\nexport interface TreeTrailingContext {\n readonly $implicit: TreeNode;\n readonly node: TreeNode;\n readonly expanded: boolean;\n}\n\n/**\n * Content drawn at the end of every `ds-tree` row: a badge, a count, a small icon button.\n *\n * ```html\n * <ds-tree [nodes]=\"layers\">\n * <ng-template dsTreeTrailing let-node>\n * <ds-badge size=\"sm\">{{ node.id }}</ds-badge>\n * </ng-template>\n * </ds-tree>\n * ```\n *\n * `let-expanded=\"expanded\"` reads whether the row is open, to show a folder's count only while it\n * is collapsed. A click inside it neither selects nor toggles the row. Its controls are tab stops only on\n * the focused row: Tab from that row reaches them, and the other rows' controls stay out of\n * the tab order.\n */\n@Directive({\n selector: 'ng-template[dsTreeTrailing]',\n standalone: true,\n})\nexport class TreeTrailingDirective {\n readonly template = inject<TemplateRef<TreeTrailingContext>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _directive: TreeTrailingDirective,\n _context: unknown,\n ): _context is TreeTrailingContext {\n return true;\n }\n}\n","import {\n Component,\n ElementRef,\n ViewEncapsulation,\n afterEveryRender,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport {\n DS_INTL,\n DS_INTL_DEFAULTS,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { TreeLabelDirective } from './tree-label.directive';\nimport { TreeTrailingDirective } from './tree-trailing.directive';\nimport type { TreeNode, TreeSelection, TreeToggleOn } from './tree.types';\n\ninterface VisibleNode {\n node: TreeNode;\n level: number;\n hasChildren: boolean;\n expanded: boolean;\n}\n\nconst FOCUSABLE =\n 'a[href], button, input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\nconst PARKED_TABINDEX = 'data-ds-tree-tabindex';\n\nlet nextId = 0;\n\n@Component({\n selector: 'ds-tree',\n standalone: true,\n imports: [IconComponent, NgTemplateOutlet],\n templateUrl: './tree.component.html',\n styleUrl: './tree.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'tree',\n '[attr.aria-multiselectable]': \"multiple() ? 'true' : null\",\n '[class.is-animated]': 'motion()',\n '(keydown)': 'onKeydown($event)',\n '(pointerleave)': 'hover(null)',\n },\n})\nexport class TreeComponent {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly intl = inject(DS_INTL);\n\n /** Root-level nodes; nest via `children`. */\n readonly nodes = input<readonly TreeNode[]>([]);\n /** Ids of the expanded nodes. */\n readonly expandedIds = model<Set<string>>(new Set());\n /** `'multiple'` reads and writes `selectedIds`; `'single'` reads and writes `selectedId`. */\n readonly selection = input<TreeSelection>('single');\n /** Id of the selected node, in `'single'` selection. */\n readonly selectedId = model<string | null>(null);\n /** Ids of the selected nodes, in `'multiple'` selection. */\n readonly selectedIds = model<string[]>([]);\n /** What expands and collapses a parent. `'row'`: activating the row (click, Enter, Space) selects\n * it and toggles it. `'caret'`: activating the row only selects it, and the chevron is a button of\n * its own that toggles. `'doubleClick'`: a click selects, a double click toggles. In every mode\n * ArrowRight expands and ArrowLeft collapses the focused row. */\n readonly toggleOn = input<TreeToggleOn>('row');\n /** Rows slide open and shut and the chevron turns when the user expands or collapses a parent.\n * Rows of the first render, and rows shown or hidden by `nodes` or `expandedIds` set from outside,\n * appear and go at once, and their chevron turns at once. Off under `prefers-reduced-motion: reduce`. */\n readonly animate = input(true, { transform: booleanAttribute });\n /** Fires with the node when a row is selected (click or Enter/Space), not when one is deselected. */\n readonly nodeSelected = output<TreeNode>();\n /** Fires with the node under the pointer or newly focused, and `null` when the pointer leaves the tree. */\n readonly nodeHover = output<TreeNode | null>();\n\n protected readonly label = contentChild(TreeLabelDirective);\n protected readonly trailing = contentChild(TreeTrailingDirective);\n protected readonly idPrefix = `ds-tree-${++nextId}`;\n\n private readonly activeId = signal<string | null>(null);\n private hoveredId: string | null = null;\n // Rows fold and carets turn only while the tree shows the state the user's own toggle made: the\n // first render, and nodes or expanded ids set from outside, show and remove rows without motion.\n // Dropping the motion a render after the toggle would remove the caret's transition before the\n // browser ever styles the turn.\n private readonly toggled = signal<{\n expandedIds: Set<string>;\n nodes: readonly TreeNode[];\n } | null>(null);\n\n protected readonly motion = computed(() => {\n const toggled = this.toggled();\n\n return (\n this.animate() &&\n toggled?.expandedIds === this.expandedIds() &&\n toggled.nodes === this.nodes()\n );\n });\n protected readonly multiple = computed(() => this.selection() === 'multiple');\n protected readonly labels = computed(() => ({\n ...DS_INTL_DEFAULTS.tree,\n ...this.intl().tree,\n }));\n\n protected readonly visibleNodes = computed<VisibleNode[]>(() => {\n const out: VisibleNode[] = [];\n const walk = (list: readonly TreeNode[], level: number): void => {\n for (const node of list) {\n const hasChildren = !!node.children?.length;\n const expanded = this.isExpanded(node.id);\n out.push({ node, level, hasChildren, expanded });\n if (hasChildren && expanded) {\n walk(node.children ?? [], level + 1);\n }\n }\n };\n walk(this.nodes(), 0);\n\n return out;\n });\n\n protected readonly effectiveActiveId = computed(\n () => this.activeId() ?? this.visibleNodes()[0]?.node.id ?? null,\n );\n\n constructor() {\n // Content inside a trailing template can change without a signal of the tree changing,\n // so its tab stops are re-parked after every render.\n afterEveryRender({ write: () => this.parkTrailingTabStops() });\n }\n\n protected isExpanded(id: string): boolean {\n return this.expandedIds().has(id);\n }\n\n protected isSelected(id: string): boolean {\n return this.multiple()\n ? this.selectedIds().includes(id)\n : this.selectedId() === id;\n }\n\n protected isActive(id: string): boolean {\n return this.effectiveActiveId() === id;\n }\n\n protected onRowClick(entry: VisibleNode, event: MouseEvent): void {\n // The second click of a double click belongs to the toggle, not to a second selection.\n if (\n this.fromTrailing(event) ||\n (this.toggleOn() === 'doubleClick' && event.detail > 1)\n ) {\n return;\n }\n this.activate(entry, event.shiftKey || event.ctrlKey || event.metaKey);\n }\n\n protected onRowDoubleClick(entry: VisibleNode, event: MouseEvent): void {\n if (\n this.toggleOn() !== 'doubleClick' ||\n this.fromTrailing(event) ||\n event.shiftKey ||\n event.ctrlKey ||\n event.metaKey\n ) {\n return;\n }\n this.toggle(entry.node);\n }\n\n protected onCaretClick(entry: VisibleNode, event: MouseEvent): void {\n event.stopPropagation();\n if (entry.node.disabled) {\n return;\n }\n this.focusNode(entry.node.id);\n this.toggle(entry.node);\n }\n\n protected onRowFocus(entry: VisibleNode): void {\n this.activeId.set(entry.node.id);\n this.hover(entry.node);\n }\n\n protected hover(node: TreeNode | null): void {\n const id = node?.id ?? null;\n if (id === this.hoveredId) {\n return;\n }\n this.hoveredId = id;\n this.nodeHover.emit(node);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (this.fromTrailing(event)) {\n return;\n }\n const visible = this.visibleNodes();\n const index = visible.findIndex(\n (entry) => entry.node.id === this.effectiveActiveId(),\n );\n if (index < 0) {\n return;\n }\n const current = visible[index];\n switch (event.key) {\n case 'ArrowDown':\n this.moveActive(index + 1);\n break;\n case 'ArrowUp':\n this.moveActive(index - 1);\n break;\n case 'Home':\n this.moveActive(0);\n break;\n case 'End':\n this.moveActive(visible.length - 1);\n break;\n case 'ArrowRight':\n if (current.hasChildren && !current.expanded) {\n this.toggle(current.node);\n } else if (current.hasChildren) {\n this.moveActive(index + 1);\n }\n break;\n case 'ArrowLeft':\n if (current.hasChildren && current.expanded) {\n this.toggle(current.node);\n } else {\n this.moveToParent(visible, index);\n }\n break;\n case 'Enter':\n case ' ':\n if (!event.repeat) {\n this.activate(\n current,\n event.shiftKey || event.ctrlKey || event.metaKey,\n );\n }\n break;\n default:\n return;\n }\n event.preventDefault();\n }\n\n // A modified activation in multiple selection only adds or removes the node; every other\n // activation selects the node alone, and toggles a parent when the row is the toggle.\n private activate(entry: VisibleNode, modified: boolean): void {\n const node = entry.node;\n if (node.disabled) {\n return;\n }\n this.activeId.set(node.id);\n if (this.multiple() && modified) {\n const ids = this.selectedIds();\n if (ids.includes(node.id)) {\n this.selectedIds.set(ids.filter((id) => id !== node.id));\n } else {\n this.selectedIds.set([...ids, node.id]);\n this.nodeSelected.emit(node);\n }\n\n return;\n }\n if (this.multiple()) {\n this.selectedIds.set([node.id]);\n } else {\n this.selectedId.set(node.id);\n }\n this.nodeSelected.emit(node);\n if (entry.hasChildren && this.toggleOn() === 'row') {\n this.toggle(node);\n }\n }\n\n private toggle(node: TreeNode): void {\n if (node.disabled || !node.children?.length) {\n return;\n }\n const next = new Set(this.expandedIds());\n if (next.has(node.id)) {\n next.delete(node.id);\n } else {\n next.add(node.id);\n }\n this.toggled.set({ expandedIds: next, nodes: this.nodes() });\n this.expandedIds.set(next);\n }\n\n private moveActive(targetIndex: number): void {\n const visible = this.visibleNodes();\n if (targetIndex < 0 || targetIndex >= visible.length) {\n return;\n }\n this.focusNode(visible[targetIndex].node.id);\n }\n\n private moveToParent(visible: VisibleNode[], index: number): void {\n const level = visible[index].level;\n for (let i = index - 1; i >= 0; i--) {\n if (visible[i].level < level) {\n this.focusNode(visible[i].node.id);\n\n return;\n }\n }\n }\n\n private focusNode(id: string): void {\n this.activeId.set(id);\n this.host.nativeElement\n .querySelector<HTMLElement>(\n `.row-shell:not(.is-leaving) > [data-node-id=\"${CSS.escape(id)}\"]`,\n )\n ?.focus();\n }\n\n private fromTrailing(event: Event): boolean {\n return (\n event.target instanceof Element && !!event.target.closest('.trailing')\n );\n }\n\n // The tree keeps one tab stop: controls in a trailing template are tabbable on the active\n // row only, and get their own tabindex back when their row becomes active.\n private parkTrailingTabStops(): void {\n const activeId = this.effectiveActiveId();\n for (const area of this.host.nativeElement.querySelectorAll('.trailing')) {\n const onActiveRow =\n area.closest('[data-node-id]')?.getAttribute('data-node-id') ===\n activeId;\n const controls = area.querySelectorAll<HTMLElement>(\n onActiveRow ? `[${PARKED_TABINDEX}]` : FOCUSABLE,\n );\n for (const control of controls) {\n if (onActiveRow) {\n const own = control.getAttribute(PARKED_TABINDEX);\n control.removeAttribute(PARKED_TABINDEX);\n if (own) {\n control.setAttribute('tabindex', own);\n } else {\n control.removeAttribute('tabindex');\n }\n } else if (!control.hasAttribute(PARKED_TABINDEX)) {\n control.setAttribute(\n PARKED_TABINDEX,\n control.getAttribute('tabindex') ?? '',\n );\n control.setAttribute('tabindex', '-1');\n }\n }\n }\n }\n}\n","@for (entry of visibleNodes(); track entry.node.id; let index = $index) {\n <div\n class=\"row-shell\"\n role=\"none\"\n [animate.enter]=\"motion() ? 'is-entering' : ''\"\n [animate.leave]=\"motion() ? 'is-leaving' : ''\">\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events -- Enter and Space reach the host keydown handler, which activates the focused row -->\n <div\n class=\"row\"\n role=\"treeitem\"\n [attr.data-node-id]=\"entry.node.id\"\n [attr.aria-level]=\"entry.level + 1\"\n [attr.aria-expanded]=\"entry.hasChildren ? entry.expanded : null\"\n [attr.aria-selected]=\"isSelected(entry.node.id)\"\n [attr.aria-disabled]=\"entry.node.disabled ? 'true' : null\"\n [attr.aria-labelledby]=\"idPrefix + '-' + index\"\n [attr.aria-describedby]=\"\n trailing() ? idPrefix + '-' + index + '-trailing' : null\n \"\n [attr.tabindex]=\"isActive(entry.node.id) ? 0 : -1\"\n [class.selected]=\"isSelected(entry.node.id)\"\n [style.--_level]=\"entry.level\"\n (click)=\"onRowClick(entry, $event)\"\n (dblclick)=\"onRowDoubleClick(entry, $event)\"\n (focus)=\"onRowFocus(entry)\"\n (pointerenter)=\"hover(entry.node)\">\n @if (entry.hasChildren && toggleOn() === 'caret') {\n <!-- The row keeps the focus and the tree its one tab stop: ArrowRight and ArrowLeft on the row are the keyboard toggle. -->\n <button\n type=\"button\"\n class=\"caret-button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"\n entry.expanded\n ? labels().collapse(entry.node.label)\n : labels().expand(entry.node.label)\n \"\n [disabled]=\"entry.node.disabled\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onCaretClick(entry, $event)\">\n <ds-icon\n class=\"caret\"\n name=\"chevronRight\"\n [class.expanded]=\"entry.expanded\"\n [size]=\"16\" />\n </button>\n } @else if (entry.hasChildren) {\n <ds-icon\n class=\"caret\"\n name=\"chevronRight\"\n [class.expanded]=\"entry.expanded\"\n [size]=\"16\" />\n } @else if (!entry.node.icon) {\n <span class=\"caret-spacer\"></span>\n }\n\n @if (entry.node.icon; as icon) {\n <ds-icon\n class=\"node-icon\"\n [name]=\"icon\"\n [size]=\"16\" />\n }\n\n @if (label(); as label) {\n <span\n class=\"custom-label\"\n [id]=\"idPrefix + '-' + index\">\n <ng-container\n *ngTemplateOutlet=\"\n label.template;\n context: {\n $implicit: entry.node,\n node: entry.node,\n level: entry.level,\n selected: isSelected(entry.node.id),\n disabled: !!entry.node.disabled,\n }\n \" />\n </span>\n } @else {\n <span\n class=\"label\"\n [id]=\"idPrefix + '-' + index\">\n {{ entry.node.label }}\n </span>\n }\n\n @if (trailing(); as trailing) {\n <span\n class=\"trailing\"\n [id]=\"idPrefix + '-' + index + '-trailing'\">\n <ng-container\n *ngTemplateOutlet=\"\n trailing.template;\n context: {\n $implicit: entry.node,\n node: entry.node,\n expanded: entry.hasChildren && entry.expanded,\n }\n \" />\n </span>\n }\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAaA;;;;;;;;;;;;;;;;;;AAkBG;MAKU,kBAAkB,CAAA;AACpB,IAAA,QAAQ,GAAG,MAAM,CAAgC,WAAW,CAAC;AAEtE,IAAA,OAAO,sBAAsB,CAC3B,UAA8B,EAC9B,QAAiB,EAAA;AAEjB,QAAA,OAAO,IAAI;IACb;wGARW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACxBD;;;;;;;;;;;;;;;AAeG;MAKU,qBAAqB,CAAA;AACvB,IAAA,QAAQ,GAAG,MAAM,CAAm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CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,kBAAkB,0FACf,qBAAqB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEjFlE;;AAEG;;;;"}
|
|
@@ -28,7 +28,7 @@ class W3wComponent {
|
|
|
28
28
|
navigator.clipboard.writeText(`${this.prefix()}${address}`).then(() => this.copied.emit(address), () => undefined);
|
|
29
29
|
}
|
|
30
30
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: W3wComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: W3wComponent, isStandalone: true, selector: "ds-w3w", inputs: { prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, address: { classPropertyName: "address", publicName: "address", isSignal: true, isRequired: true, transformFunction: null }, copyable: { classPropertyName: "copyable", publicName: "copyable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { copied: "copied" }, host: { listeners: { "click": "onCopy()", "keydown.enter": "onCopy()", "keydown.space": "onKeyActivate($event)" }, properties: { "attr.role": "copyable() ? 'button' : null", "attr.tabindex": "copyable() ? 0 : null", "attr.aria-label": "copyable() ? intl().what3words.copy(prefix() + address()) : null" } }, ngImport: i0, template: "<ds-icon\n name=\"map\"\n [size]=\"14\" />\n\n<span class=\"words\">\n <span class=\"mark\">\n {{ prefix() }}\n </span>\n {{ address() }}\n</span>\n\n@if (copyable()) {\n <ds-icon\n name=\"copy\"\n [size]=\"12\" />\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_w3w-bg-color: var(--ds-w3w-bg-color, var(--accent-subtitle));--_w3w-text-color: var(--ds-w3w-text-color, var(--accent));--_w3w-hover-bg-color: var(--ds-w3w-hover-bg-color, var(--accent-muted));--_w3w-mark-color: var(--ds-w3w-mark-color, var(--error));display:inline-flex;align-items:center;gap:var(--space-1-5);padding:var(--space-1) var(--space-2);background:var(--_w3w-bg-color);color:var(--_w3w-text-color);border-radius:var(--radius-
|
|
31
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: W3wComponent, isStandalone: true, selector: "ds-w3w", inputs: { prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, address: { classPropertyName: "address", publicName: "address", isSignal: true, isRequired: true, transformFunction: null }, copyable: { classPropertyName: "copyable", publicName: "copyable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { copied: "copied" }, host: { listeners: { "click": "onCopy()", "keydown.enter": "onCopy()", "keydown.space": "onKeyActivate($event)" }, properties: { "attr.role": "copyable() ? 'button' : null", "attr.tabindex": "copyable() ? 0 : null", "attr.aria-label": "copyable() ? intl().what3words.copy(prefix() + address()) : null" } }, ngImport: i0, template: "<ds-icon\n name=\"map\"\n [size]=\"14\" />\n\n<span class=\"words\">\n <span class=\"mark\">\n {{ prefix() }}\n </span>\n {{ address() }}\n</span>\n\n@if (copyable()) {\n <ds-icon\n name=\"copy\"\n [size]=\"12\" />\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_w3w-bg-color: var(--ds-w3w-bg-color, var(--accent-subtitle));--_w3w-text-color: var(--ds-w3w-text-color, var(--accent));--_w3w-hover-bg-color: var(--ds-w3w-hover-bg-color, var(--accent-muted));--_w3w-mark-color: var(--ds-w3w-mark-color, var(--error));display:inline-flex;align-items:center;gap:var(--space-1-5);padding:var(--space-1) var(--space-2);background:var(--_w3w-bg-color);color:var(--_w3w-text-color);border-radius:var(--ds-radius-control);font-family:var(--font-mono);font-size:var(--font-size-mono);cursor:pointer;transition:background-color var(--duration-fast) var(--ease-standard)}:host:hover{background:var(--_w3w-hover-bg-color)}:host .words{display:inline-flex}:host .mark{color:var(--_w3w-mark-color);font-weight:var(--font-weight-bold)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
32
32
|
}
|
|
33
33
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: W3wComponent, decorators: [{
|
|
34
34
|
type: Component,
|
|
@@ -39,7 +39,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
39
39
|
'(click)': 'onCopy()',
|
|
40
40
|
'(keydown.enter)': 'onCopy()',
|
|
41
41
|
'(keydown.space)': 'onKeyActivate($event)',
|
|
42
|
-
}, template: "<ds-icon\n name=\"map\"\n [size]=\"14\" />\n\n<span class=\"words\">\n <span class=\"mark\">\n {{ prefix() }}\n </span>\n {{ address() }}\n</span>\n\n@if (copyable()) {\n <ds-icon\n name=\"copy\"\n [size]=\"12\" />\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_w3w-bg-color: var(--ds-w3w-bg-color, var(--accent-subtitle));--_w3w-text-color: var(--ds-w3w-text-color, var(--accent));--_w3w-hover-bg-color: var(--ds-w3w-hover-bg-color, var(--accent-muted));--_w3w-mark-color: var(--ds-w3w-mark-color, var(--error));display:inline-flex;align-items:center;gap:var(--space-1-5);padding:var(--space-1) var(--space-2);background:var(--_w3w-bg-color);color:var(--_w3w-text-color);border-radius:var(--radius-
|
|
42
|
+
}, template: "<ds-icon\n name=\"map\"\n [size]=\"14\" />\n\n<span class=\"words\">\n <span class=\"mark\">\n {{ prefix() }}\n </span>\n {{ address() }}\n</span>\n\n@if (copyable()) {\n <ds-icon\n name=\"copy\"\n [size]=\"12\" />\n}\n", styles: [":where(:host){box-sizing:border-box;interpolate-size:allow-keywords}:where(*){box-sizing:border-box}:where(button,input,select,textarea){font-family:inherit}:where(h1,h2,h3,h4,h5,h6){margin:0}:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:where(:host(:focus-visible),:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_w3w-bg-color: var(--ds-w3w-bg-color, var(--accent-subtitle));--_w3w-text-color: var(--ds-w3w-text-color, var(--accent));--_w3w-hover-bg-color: var(--ds-w3w-hover-bg-color, var(--accent-muted));--_w3w-mark-color: var(--ds-w3w-mark-color, var(--error));display:inline-flex;align-items:center;gap:var(--space-1-5);padding:var(--space-1) var(--space-2);background:var(--_w3w-bg-color);color:var(--_w3w-text-color);border-radius:var(--ds-radius-control);font-family:var(--font-mono);font-size:var(--font-size-mono);cursor:pointer;transition:background-color var(--duration-fast) var(--ease-standard)}:host:hover{background:var(--_w3w-hover-bg-color)}:host .words{display:inline-flex}:host .mark{color:var(--_w3w-mark-color);font-weight:var(--font-weight-bold)}\n"] }]
|
|
43
43
|
}], propDecorators: { prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], address: [{ type: i0.Input, args: [{ isSignal: true, alias: "address", required: true }] }], copyable: [{ type: i0.Input, args: [{ isSignal: true, alias: "copyable", required: false }] }], copied: [{ type: i0.Output, args: ["copied"] }] } });
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-w3w.mjs","sources":["../../../src/lib/components/w3w/w3w.component.ts","../../../src/lib/components/w3w/w3w.component.html","../../../src/lib/components/w3w/ids-group-ltd-ids-design-system-components-w3w.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-w3w',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './w3w.component.html',\n styleUrl: './w3w.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[attr.role]': \"copyable() ? 'button' : null\",\n '[attr.tabindex]': 'copyable() ? 0 : null',\n '[attr.aria-label]':\n 'copyable() ? intl().what3words.copy(prefix() + address()) : null',\n '(click)': 'onCopy()',\n '(keydown.enter)': 'onCopy()',\n '(keydown.space)': 'onKeyActivate($event)',\n },\n})\nexport class W3wComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Marker before the address. */\n readonly prefix = input<string>('///');\n /** The three-word address, rendered after `prefix`. */\n readonly address = input.required<string>();\n /** Makes the address clickable/focusable and copies `prefix` + `address` to the clipboard. */\n readonly copyable = input(true, { transform: booleanAttribute });\n /** Fires with `address` after a successful copy. */\n readonly copied = output<string>();\n\n protected onKeyActivate(event: Event): void {\n event.preventDefault();\n this.onCopy();\n }\n\n protected onCopy(): void {\n if (!this.copyable()) {\n return;\n }\n if (typeof navigator === 'undefined' || !navigator.clipboard) {\n return;\n }\n const address = this.address();\n navigator.clipboard.writeText(`${this.prefix()}${address}`).then(\n () => this.copied.emit(address),\n () => undefined,\n );\n }\n}\n","<ds-icon\n name=\"map\"\n [size]=\"14\" />\n\n<span class=\"words\">\n <span class=\"mark\">\n {{ prefix() }}\n </span>\n {{ address() }}\n</span>\n\n@if (copyable()) {\n <ds-icon\n name=\"copy\"\n [size]=\"12\" />\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MA4Ba,YAAY,CAAA;AACJ,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;;AAGhC,IAAA,MAAM,GAAG,KAAK,CAAS,KAAK,6EAAC;;AAE7B,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAU;;IAElC,QAAQ,GAAG,KAAK,CAAC,IAAI,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;IAEvD,MAAM,GAAG,MAAM,EAAU;AAExB,IAAA,aAAa,CAAC,KAAY,EAAA;QAClC,KAAK,CAAC,cAAc,EAAE;QACtB,IAAI,CAAC,MAAM,EAAE;IACf;IAEU,MAAM,GAAA;AACd,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE;YACpB;QACF;QACA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;YAC5D;QACF;AACA,QAAA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AA,CAAA,
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-w3w.mjs","sources":["../../../src/lib/components/w3w/w3w.component.ts","../../../src/lib/components/w3w/w3w.component.html","../../../src/lib/components/w3w/ids-group-ltd-ids-design-system-components-w3w.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { DS_INTL } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-w3w',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './w3w.component.html',\n styleUrl: './w3w.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[attr.role]': \"copyable() ? 'button' : null\",\n '[attr.tabindex]': 'copyable() ? 0 : null',\n '[attr.aria-label]':\n 'copyable() ? intl().what3words.copy(prefix() + address()) : null',\n '(click)': 'onCopy()',\n '(keydown.enter)': 'onCopy()',\n '(keydown.space)': 'onKeyActivate($event)',\n },\n})\nexport class W3wComponent {\n protected readonly intl = inject(DS_INTL);\n\n /** Marker before the address. */\n readonly prefix = input<string>('///');\n /** The three-word address, rendered after `prefix`. */\n readonly address = input.required<string>();\n /** Makes the address clickable/focusable and copies `prefix` + `address` to the clipboard. */\n readonly copyable = input(true, { transform: booleanAttribute });\n /** Fires with `address` after a successful copy. */\n readonly copied = output<string>();\n\n protected onKeyActivate(event: Event): void {\n event.preventDefault();\n this.onCopy();\n }\n\n protected onCopy(): void {\n if (!this.copyable()) {\n return;\n }\n if (typeof navigator === 'undefined' || !navigator.clipboard) {\n return;\n }\n const address = this.address();\n navigator.clipboard.writeText(`${this.prefix()}${address}`).then(\n () => this.copied.emit(address),\n () => undefined,\n );\n }\n}\n","<ds-icon\n name=\"map\"\n [size]=\"14\" />\n\n<span class=\"words\">\n <span class=\"mark\">\n {{ prefix() }}\n </span>\n {{ address() }}\n</span>\n\n@if (copyable()) {\n <ds-icon\n name=\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wBAAA,iBAAiB,EAAE,uBAAuB;AAC3C,qBAAA,EAAA,QAAA,EAAA,4OAAA,EAAA,MAAA,EAAA,CAAA,m2CAAA,CAAA,EAAA;;;AE1BH;;AAEG;;;;"}
|
|
@@ -2162,6 +2162,158 @@ function focusRescue() {
|
|
|
2162
2162
|
}, { injector });
|
|
2163
2163
|
}
|
|
2164
2164
|
|
|
2165
|
+
const SHAPES = 'path, line, polyline, polygon, circle, ellipse, rect';
|
|
2166
|
+
// A glyph centred by its box looks off inside a circle when its strokes are heavier on one side (a
|
|
2167
|
+
// flag, a folder, a check). Each glyph is centred on the point midway between the centre of the box
|
|
2168
|
+
// its strokes span and the centre of their length, so a symmetric glyph lands on its box centre and a
|
|
2169
|
+
// lopsided one moves half the way toward balancing its weight.
|
|
2170
|
+
function opticalOffset(glyph) {
|
|
2171
|
+
const viewBox = glyph.viewBox.baseVal;
|
|
2172
|
+
const size = glyph.width.baseVal.value;
|
|
2173
|
+
if (!viewBox?.width || !size) {
|
|
2174
|
+
return null;
|
|
2175
|
+
}
|
|
2176
|
+
let left = Infinity;
|
|
2177
|
+
let top = Infinity;
|
|
2178
|
+
let right = -Infinity;
|
|
2179
|
+
let bottom = -Infinity;
|
|
2180
|
+
let length = 0;
|
|
2181
|
+
let sumX = 0;
|
|
2182
|
+
let sumY = 0;
|
|
2183
|
+
for (const shape of glyph.querySelectorAll(SHAPES)) {
|
|
2184
|
+
const box = shape.getBBox();
|
|
2185
|
+
left = Math.min(left, box.x);
|
|
2186
|
+
top = Math.min(top, box.y);
|
|
2187
|
+
right = Math.max(right, box.x + box.width);
|
|
2188
|
+
bottom = Math.max(bottom, box.y + box.height);
|
|
2189
|
+
const total = shape.getTotalLength();
|
|
2190
|
+
const steps = Math.max(8, Math.ceil(total * 2));
|
|
2191
|
+
for (let step = 0; step < steps; step++) {
|
|
2192
|
+
const point = shape.getPointAtLength(((step + 0.5) * total) / steps);
|
|
2193
|
+
sumX += (point.x * total) / steps;
|
|
2194
|
+
sumY += (point.y * total) / steps;
|
|
2195
|
+
}
|
|
2196
|
+
length += total;
|
|
2197
|
+
}
|
|
2198
|
+
if (!length) {
|
|
2199
|
+
return null;
|
|
2200
|
+
}
|
|
2201
|
+
const scale = size / viewBox.width;
|
|
2202
|
+
const opticalX = ((left + right) / 2 + sumX / length) / 2;
|
|
2203
|
+
const opticalY = ((top + bottom) / 2 + sumY / length) / 2;
|
|
2204
|
+
return {
|
|
2205
|
+
x: (viewBox.x + viewBox.width / 2 - opticalX) * scale,
|
|
2206
|
+
y: (viewBox.y + viewBox.height / 2 - opticalY) * scale,
|
|
2207
|
+
};
|
|
2208
|
+
}
|
|
2209
|
+
/**
|
|
2210
|
+
* Moves each `ds-icon` inside the host's `.node` marker so its optical centre sits on the marker's centre.
|
|
2211
|
+
* @internal
|
|
2212
|
+
*/
|
|
2213
|
+
function centreMarkerGlyphs(host) {
|
|
2214
|
+
for (const icon of host.querySelectorAll('.node ds-icon')) {
|
|
2215
|
+
const glyph = icon.querySelector('svg');
|
|
2216
|
+
let offset = null;
|
|
2217
|
+
try {
|
|
2218
|
+
offset = glyph ? opticalOffset(glyph) : null;
|
|
2219
|
+
}
|
|
2220
|
+
catch {
|
|
2221
|
+
// getBBox throws on a glyph that is not rendered (Firefox, display: none).
|
|
2222
|
+
}
|
|
2223
|
+
icon.style.translate = offset
|
|
2224
|
+
? `${offset.x.toFixed(2)}px ${offset.y.toFixed(2)}px`
|
|
2225
|
+
: '';
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
/**
|
|
2229
|
+
* Splits each `ds-icon` path inside the host's `.node` marker into one path per stroke and gives every
|
|
2230
|
+
* shape `pathLength="1"`, so the marker can draw its glyph stroke by stroke with a dash offset.
|
|
2231
|
+
* @internal
|
|
2232
|
+
*/
|
|
2233
|
+
function prepareMarkerStrokes(host) {
|
|
2234
|
+
for (const glyph of host.querySelectorAll('.node ds-icon svg')) {
|
|
2235
|
+
for (const path of glyph.querySelectorAll('path')) {
|
|
2236
|
+
// Only an absolute moveto starts a stroke that stands on its own.
|
|
2237
|
+
const strokes = (path.getAttribute('d') ?? '')
|
|
2238
|
+
.split(/(?=M)/)
|
|
2239
|
+
.filter((part) => part.trim());
|
|
2240
|
+
let last = path;
|
|
2241
|
+
for (const stroke of strokes.slice(1)) {
|
|
2242
|
+
const next = path.cloneNode();
|
|
2243
|
+
next.setAttribute('d', stroke);
|
|
2244
|
+
last.after(next);
|
|
2245
|
+
last = next;
|
|
2246
|
+
}
|
|
2247
|
+
if (strokes.length > 1) {
|
|
2248
|
+
path.setAttribute('d', strokes[0]);
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
for (const shape of glyph.querySelectorAll(SHAPES)) {
|
|
2252
|
+
shape.setAttribute('pathLength', '1');
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
const heldArcs = new WeakMap();
|
|
2257
|
+
/**
|
|
2258
|
+
* Reads the running spinner's angle and arc length inside the host's `.node` marker, so the arc that
|
|
2259
|
+
* closes in its place goes on from where the spinner is. Call before the spinner leaves the DOM, then
|
|
2260
|
+
* `startMarkerArc` once the arc renders.
|
|
2261
|
+
* @internal
|
|
2262
|
+
*/
|
|
2263
|
+
function holdMarkerArc(host) {
|
|
2264
|
+
const spinner = host.querySelector('.node ds-spinner');
|
|
2265
|
+
const turn = spinner
|
|
2266
|
+
?.getAnimations()
|
|
2267
|
+
.find((animation) => animation.effect?.getComputedTiming().iterations === Infinity);
|
|
2268
|
+
const period = Number(turn?.effect?.getComputedTiming().duration);
|
|
2269
|
+
if (!spinner || !turn || !period) {
|
|
2270
|
+
host.style.removeProperty('--_step-arc-from');
|
|
2271
|
+
host.style.removeProperty('--_step-arc-length');
|
|
2272
|
+
heldArcs.delete(host);
|
|
2273
|
+
return;
|
|
2274
|
+
}
|
|
2275
|
+
heldArcs.set(host, {
|
|
2276
|
+
angle: ((Number(turn.currentTime) % period) / period) * 360,
|
|
2277
|
+
clock: Number(document.timeline.currentTime),
|
|
2278
|
+
period,
|
|
2279
|
+
});
|
|
2280
|
+
host.style.setProperty('--_step-arc-length', getComputedStyle(spinner).getPropertyValue('--_step-arc-sweep'));
|
|
2281
|
+
}
|
|
2282
|
+
/**
|
|
2283
|
+
* Starts the closing arc at the angle the spinner has turned to since `holdMarkerArc` read it, in the
|
|
2284
|
+
* frame the arc first renders.
|
|
2285
|
+
* @internal
|
|
2286
|
+
*/
|
|
2287
|
+
function startMarkerArc(host) {
|
|
2288
|
+
const held = heldArcs.get(host);
|
|
2289
|
+
const node = host.querySelector('.node');
|
|
2290
|
+
heldArcs.delete(host);
|
|
2291
|
+
if (!held || !node) {
|
|
2292
|
+
return;
|
|
2293
|
+
}
|
|
2294
|
+
const start = () => {
|
|
2295
|
+
const arcs = node
|
|
2296
|
+
.getAnimations({ subtree: true })
|
|
2297
|
+
.filter((animation) => animation.animationName?.includes('ds-step-arc'));
|
|
2298
|
+
if (!arcs.length) {
|
|
2299
|
+
return false;
|
|
2300
|
+
}
|
|
2301
|
+
const now = Number(document.timeline.currentTime);
|
|
2302
|
+
host.style.setProperty('--_step-arc-from', `${(held.angle + ((now - held.clock) / held.period) * 360) % 360}deg`);
|
|
2303
|
+
for (const arc of arcs) {
|
|
2304
|
+
arc.startTime = now;
|
|
2305
|
+
}
|
|
2306
|
+
return true;
|
|
2307
|
+
};
|
|
2308
|
+
if (start()) {
|
|
2309
|
+
return;
|
|
2310
|
+
}
|
|
2311
|
+
// Angular adds the enter class that draws the arc a task after the render.
|
|
2312
|
+
const observer = new MutationObserver(() => start() && observer.disconnect());
|
|
2313
|
+
observer.observe(node, { subtree: true, attributeFilter: ['class'] });
|
|
2314
|
+
setTimeout(() => observer.disconnect(), 1000);
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2165
2317
|
let nextId = 0;
|
|
2166
2318
|
/** Process-wide counter for SSR-safe control ids (no DOM dependency).
|
|
2167
2319
|
* @internal
|
|
@@ -2729,5 +2881,5 @@ function createTypeAhead() {
|
|
|
2729
2881
|
* Generated bundle index. Do not edit.
|
|
2730
2882
|
*/
|
|
2731
2883
|
|
|
2732
|
-
export { CHART_GLIDE_HEAD_START_MS, CHART_HEAT_COLORS, CHART_RAMP_COLORS, CHART_RENDER_GATE_PASSED, CHART_SERIES_COLORS, CHART_SKELETON_COUNT, CHART_TOOLTIP_LINGER_MS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChartBase, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsFormControlBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, afterTwoFrames, announceOptionCount, areaPath, bandPath, bandScale, chartColors, chartDelay, chartDwell, chartHoverDelayMs, chartOf, chartRenderGate, chartTiming, chartValueFormat, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, describeSeries, describeShare, dimmedBy, disposeWithLeave, domainMinOf, dropdownMinWidth, dropdownOverlay, dsAriaCurrent, dsDestination, dwellHighlight, elementWidth, focusIsInside, focusMark, focusRescue, fontsLoaded, formatPercent, formatTick, formatValue, formatWholePercent, forwardOverlayTokens, labelInterval, largestRemainder, leaveMark, leftMark, linePath, lineSegments, linearScale, listenForEscape, listenForMarkFocus, lttbDecimate, markAt, markOf, minMaxDecimate, moveFocusOutOf, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointArrowAtHost, prepareOverlayEnter, readOnHostResize, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, skeletonColumnHeights, skeletonFunnelClips, skeletonLineClip, skeletonMarkCount, skeletonWaterfallSteps, staggerDelay, tickValues, trimmedText, tweenMarks, valueControlBridge, watchElementWidth };
|
|
2884
|
+
export { CHART_GLIDE_HEAD_START_MS, CHART_HEAT_COLORS, CHART_RAMP_COLORS, CHART_RENDER_GATE_PASSED, CHART_SERIES_COLORS, CHART_SKELETON_COUNT, CHART_TOOLTIP_LINGER_MS, DS_FIELD_WARNING_KIND, DsBooleanControlValueAccessor, DsChartBase, DsChipTemplateDirective, DsControlValueAccessor, DsCreateTemplateDirective, DsEmptyTemplateDirective, DsFieldBase, DsFormControlBase, DsGroupLabelTemplateDirective, DsMessageBase, DsOptionTemplateDirective, DsPanelFooterTemplateDirective, DsPanelHeaderTemplateDirective, DsPickerTriggerDirective, DsStaticPreview, FieldClickFocusDirective, ProjectionDroppedDirective, afterTwoFrames, announceOptionCount, areaPath, bandPath, bandScale, centreMarkerGlyphs, chartColors, chartDelay, chartDwell, chartHoverDelayMs, chartOf, chartRenderGate, chartTiming, chartValueFormat, chipFit, clearOnDetach, closeOnOutsidePointer, closeOnScroll, createTypeAhead, decimationTarget, describeSeries, describeShare, dimmedBy, disposeWithLeave, domainMinOf, dropdownMinWidth, dropdownOverlay, dsAriaCurrent, dsDestination, dwellHighlight, elementWidth, focusIsInside, focusMark, focusRescue, fontsLoaded, formatPercent, formatTick, formatValue, formatWholePercent, forwardOverlayTokens, holdMarkerArc, labelInterval, largestRemainder, leaveMark, leftMark, linePath, lineSegments, linearScale, listenForEscape, listenForMarkFocus, lttbDecimate, markAt, markOf, minMaxDecimate, moveFocusOutOf, needsDecimating, nextControlId, nextRovingIndex, niceDomain, overlayPlacementOf, panelClassesOf, pointArrowAtHost, prepareMarkerStrokes, prepareOverlayEnter, readOnHostResize, resolveBrandValue, resolveChartDefaults, resolveFieldMessage, rotationWouldFit, roundStepAtLeast, rovingMarks, scrollActiveOptionIntoView, shareOfTotal, skeletonColumnHeights, skeletonFunnelClips, skeletonLineClip, skeletonMarkCount, skeletonWaterfallSteps, staggerDelay, startMarkerArc, tickValues, trimmedText, tweenMarks, valueControlBridge, watchElementWidth };
|
|
2733
2885
|
//# sourceMappingURL=ids-group-ltd-ids-design-system-components.mjs.map
|