@slotted/angular 0.0.0-stage → 0.1.0-beta.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/LICENSE +21 -0
- package/README.md +51 -2
- package/docs/AGENTS.snippet.md +10 -0
- package/docs/accordion.json +345 -0
- package/docs/accordion.md +207 -0
- package/docs/action-bar.json +421 -0
- package/docs/action-bar.md +364 -0
- package/docs/action-sheet.json +210 -0
- package/docs/action-sheet.md +19 -0
- package/docs/alert.json +407 -0
- package/docs/alert.md +239 -0
- package/docs/app-shell.examples.md +349 -0
- package/docs/app-shell.json +835 -0
- package/docs/app-shell.md +214 -0
- package/docs/aspect-ratio.json +159 -0
- package/docs/aspect-ratio.md +134 -0
- package/docs/attachment.json +486 -0
- package/docs/attachment.md +253 -0
- package/docs/avatar-group.json +208 -0
- package/docs/avatar-group.md +130 -0
- package/docs/avatar.json +342 -0
- package/docs/avatar.md +142 -0
- package/docs/badge.json +334 -0
- package/docs/badge.md +138 -0
- package/docs/breadcrumb.json +368 -0
- package/docs/breadcrumb.md +237 -0
- package/docs/button-group.json +158 -0
- package/docs/button-group.md +72 -0
- package/docs/button.examples.md +621 -0
- package/docs/button.json +977 -0
- package/docs/button.md +200 -0
- package/docs/calendar.json +592 -0
- package/docs/calendar.md +242 -0
- package/docs/card.json +283 -0
- package/docs/card.md +130 -0
- package/docs/carousel.json +560 -0
- package/docs/carousel.md +357 -0
- package/docs/cascader.json +933 -0
- package/docs/cascader.md +379 -0
- package/docs/chart.examples.md +582 -0
- package/docs/chart.json +1359 -0
- package/docs/chart.md +187 -0
- package/docs/checkbox-group.examples.md +612 -0
- package/docs/checkbox-group.json +395 -0
- package/docs/checkbox-group.md +106 -0
- package/docs/checkbox.examples.md +546 -0
- package/docs/checkbox.json +506 -0
- package/docs/checkbox.md +104 -0
- package/docs/code-block.json +616 -0
- package/docs/code-block.md +303 -0
- package/docs/collapsible.json +456 -0
- package/docs/collapsible.md +261 -0
- package/docs/color-picker.json +523 -0
- package/docs/color-picker.md +201 -0
- package/docs/column-manager.json +486 -0
- package/docs/column-manager.md +277 -0
- package/docs/combobox.examples.md +1732 -0
- package/docs/combobox.json +1250 -0
- package/docs/combobox.md +209 -0
- package/docs/command-palette.json +800 -0
- package/docs/command-palette.md +419 -0
- package/docs/container.json +156 -0
- package/docs/container.md +92 -0
- package/docs/context-menu.json +231 -0
- package/docs/context-menu.md +176 -0
- package/docs/currency-field.examples.md +321 -0
- package/docs/currency-field.json +649 -0
- package/docs/currency-field.md +128 -0
- package/docs/dashboard-grid.json +680 -0
- package/docs/dashboard-grid.md +265 -0
- package/docs/data-grid.examples.md +3064 -0
- package/docs/data-grid.json +1577 -0
- package/docs/data-grid.md +237 -0
- package/docs/data-grid.props.md +81 -0
- package/docs/data-list.json +685 -0
- package/docs/data-list.md +327 -0
- package/docs/date-field.json +490 -0
- package/docs/date-field.md +235 -0
- package/docs/date-picker.examples.md +1226 -0
- package/docs/date-picker.json +696 -0
- package/docs/date-picker.md +121 -0
- package/docs/date-range-picker.examples.md +1300 -0
- package/docs/date-range-picker.json +903 -0
- package/docs/date-range-picker.md +142 -0
- package/docs/datetime-field.json +665 -0
- package/docs/datetime-field.md +337 -0
- package/docs/datetime-picker.examples.md +1269 -0
- package/docs/datetime-picker.json +928 -0
- package/docs/datetime-picker.md +150 -0
- package/docs/datetime-range-picker.examples.md +225 -0
- package/docs/datetime-range-picker.json +1015 -0
- package/docs/datetime-range-picker.md +162 -0
- package/docs/description-list.json +471 -0
- package/docs/description-list.md +268 -0
- package/docs/detail-panel.json +530 -0
- package/docs/detail-panel.md +361 -0
- package/docs/dialog.examples.md +2467 -0
- package/docs/dialog.json +1141 -0
- package/docs/dialog.md +217 -0
- package/docs/dialog.props.md +63 -0
- package/docs/divider.json +148 -0
- package/docs/divider.md +83 -0
- package/docs/drawer.examples.md +1929 -0
- package/docs/drawer.json +753 -0
- package/docs/drawer.md +199 -0
- package/docs/entity-picker.json +946 -0
- package/docs/entity-picker.md +365 -0
- package/docs/event-calendar.examples.md +308 -0
- package/docs/event-calendar.json +1202 -0
- package/docs/event-calendar.md +201 -0
- package/docs/field-group.json +333 -0
- package/docs/field-group.md +181 -0
- package/docs/field.examples.md +676 -0
- package/docs/field.json +528 -0
- package/docs/field.md +127 -0
- package/docs/filter-bar.json +817 -0
- package/docs/filter-bar.md +380 -0
- package/docs/form.json +378 -0
- package/docs/form.md +235 -0
- package/docs/fullscreen.json +395 -0
- package/docs/fullscreen.md +225 -0
- package/docs/grid.json +176 -0
- package/docs/grid.md +74 -0
- package/docs/highlight.json +279 -0
- package/docs/highlight.md +210 -0
- package/docs/hover-card.json +254 -0
- package/docs/hover-card.md +213 -0
- package/docs/icon.json +173 -0
- package/docs/icon.md +101 -0
- package/docs/image.json +476 -0
- package/docs/image.md +254 -0
- package/docs/import-export-center.json +836 -0
- package/docs/import-export-center.md +345 -0
- package/docs/index.md +141 -0
- package/docs/inline-message.json +312 -0
- package/docs/inline-message.md +191 -0
- package/docs/inline.json +149 -0
- package/docs/inline.md +72 -0
- package/docs/kbd.json +350 -0
- package/docs/kbd.md +210 -0
- package/docs/link.json +264 -0
- package/docs/link.md +167 -0
- package/docs/list-item.json +463 -0
- package/docs/list-item.md +236 -0
- package/docs/list.json +321 -0
- package/docs/list.md +185 -0
- package/docs/listbox.json +807 -0
- package/docs/listbox.md +413 -0
- package/docs/loading-overlay.json +440 -0
- package/docs/loading-overlay.md +248 -0
- package/docs/markdown.json +461 -0
- package/docs/markdown.md +266 -0
- package/docs/menu.examples.md +1651 -0
- package/docs/menu.json +922 -0
- package/docs/menu.md +155 -0
- package/docs/menubar.json +292 -0
- package/docs/menubar.md +173 -0
- package/docs/message-scroller.json +401 -0
- package/docs/message-scroller.md +212 -0
- package/docs/message.json +862 -0
- package/docs/message.md +473 -0
- package/docs/multi-select.examples.md +1922 -0
- package/docs/multi-select.json +1314 -0
- package/docs/multi-select.md +213 -0
- package/docs/navigation-menu.json +529 -0
- package/docs/navigation-menu.md +329 -0
- package/docs/notification-center.json +664 -0
- package/docs/notification-center.md +372 -0
- package/docs/number-field.examples.md +1078 -0
- package/docs/number-field.json +668 -0
- package/docs/number-field.md +137 -0
- package/docs/otp-input.json +479 -0
- package/docs/otp-input.md +291 -0
- package/docs/page-header.json +574 -0
- package/docs/page-header.md +338 -0
- package/docs/page.json +332 -0
- package/docs/page.md +184 -0
- package/docs/pagination.json +434 -0
- package/docs/pagination.md +238 -0
- package/docs/popover.examples.md +1235 -0
- package/docs/popover.json +656 -0
- package/docs/popover.md +199 -0
- package/docs/progress-indicator.json +501 -0
- package/docs/progress-indicator.md +329 -0
- package/docs/prompt-composer.json +498 -0
- package/docs/prompt-composer.md +278 -0
- package/docs/prose.json +357 -0
- package/docs/prose.md +226 -0
- package/docs/radio-group.examples.md +626 -0
- package/docs/radio-group.json +541 -0
- package/docs/radio-group.md +112 -0
- package/docs/rating.json +1053 -0
- package/docs/rating.md +435 -0
- package/docs/result-state.json +376 -0
- package/docs/result-state.md +286 -0
- package/docs/saved-views.json +384 -0
- package/docs/saved-views.md +242 -0
- package/docs/scroll-area.json +120 -0
- package/docs/scroll-area.md +8 -0
- package/docs/section.json +344 -0
- package/docs/section.md +208 -0
- package/docs/segmented-control.json +429 -0
- package/docs/segmented-control.md +240 -0
- package/docs/select.examples.md +1214 -0
- package/docs/select.json +1147 -0
- package/docs/select.md +199 -0
- package/docs/side-navigation.json +632 -0
- package/docs/side-navigation.md +430 -0
- package/docs/skeleton.json +358 -0
- package/docs/skeleton.md +223 -0
- package/docs/slider.json +522 -0
- package/docs/slider.md +261 -0
- package/docs/sparkline.json +426 -0
- package/docs/sparkline.md +206 -0
- package/docs/split-button.json +361 -0
- package/docs/split-button.md +275 -0
- package/docs/splitter.json +142 -0
- package/docs/splitter.md +14 -0
- package/docs/stack.json +135 -0
- package/docs/stack.md +74 -0
- package/docs/stat-card.json +529 -0
- package/docs/stat-card.md +270 -0
- package/docs/status-indicator.json +314 -0
- package/docs/status-indicator.md +197 -0
- package/docs/stepper.json +451 -0
- package/docs/stepper.md +250 -0
- package/docs/switch.json +451 -0
- package/docs/switch.md +508 -0
- package/docs/table-of-contents.json +553 -0
- package/docs/table-of-contents.md +289 -0
- package/docs/table.examples.md +1981 -0
- package/docs/table.json +1059 -0
- package/docs/table.md +290 -0
- package/docs/tabs.examples.md +1370 -0
- package/docs/tabs.json +661 -0
- package/docs/tabs.md +211 -0
- package/docs/tag.json +813 -0
- package/docs/tag.md +241 -0
- package/docs/tags-input.json +771 -0
- package/docs/tags-input.md +361 -0
- package/docs/text-field.examples.md +821 -0
- package/docs/text-field.json +604 -0
- package/docs/text-field.md +125 -0
- package/docs/textarea.examples.md +612 -0
- package/docs/textarea.json +440 -0
- package/docs/textarea.md +98 -0
- package/docs/time-field.json +584 -0
- package/docs/time-field.md +291 -0
- package/docs/time-picker.json +679 -0
- package/docs/time-picker.md +315 -0
- package/docs/time-range-picker.examples.md +191 -0
- package/docs/time-range-picker.json +924 -0
- package/docs/time-range-picker.md +152 -0
- package/docs/timeline.json +839 -0
- package/docs/timeline.md +401 -0
- package/docs/toast.json +642 -0
- package/docs/toast.md +311 -0
- package/docs/toggle-group.json +417 -0
- package/docs/toggle-group.md +255 -0
- package/docs/toggle.json +326 -0
- package/docs/toggle.md +222 -0
- package/docs/toolbar.json +380 -0
- package/docs/toolbar.md +240 -0
- package/docs/tooltip.examples.md +664 -0
- package/docs/tooltip.json +604 -0
- package/docs/tooltip.md +146 -0
- package/docs/top-navigation.examples.md +287 -0
- package/docs/top-navigation.json +648 -0
- package/docs/top-navigation.md +138 -0
- package/docs/tour.json +759 -0
- package/docs/tour.md +337 -0
- package/docs/transfer.json +746 -0
- package/docs/transfer.md +273 -0
- package/docs/tree.json +918 -0
- package/docs/tree.md +397 -0
- package/docs/typography.json +317 -0
- package/docs/typography.md +107 -0
- package/docs/upload.examples.md +358 -0
- package/docs/upload.json +1103 -0
- package/docs/upload.md +166 -0
- package/docs/visually-hidden.json +71 -0
- package/docs/visually-hidden.md +42 -0
- package/docs/wizard.json +724 -0
- package/docs/wizard.md +295 -0
- package/fesm2022/slotted-angular-accordion.mjs +247 -0
- package/fesm2022/slotted-angular-accordion.mjs.map +1 -0
- package/fesm2022/slotted-angular-action-bar.mjs +639 -0
- package/fesm2022/slotted-angular-action-bar.mjs.map +1 -0
- package/fesm2022/slotted-angular-action-sheet.mjs +749 -0
- package/fesm2022/slotted-angular-action-sheet.mjs.map +1 -0
- package/fesm2022/slotted-angular-alert.mjs +427 -0
- package/fesm2022/slotted-angular-alert.mjs.map +1 -0
- package/fesm2022/slotted-angular-app-shell.mjs +1334 -0
- package/fesm2022/slotted-angular-app-shell.mjs.map +1 -0
- package/fesm2022/slotted-angular-aspect-ratio.mjs +63 -0
- package/fesm2022/slotted-angular-aspect-ratio.mjs.map +1 -0
- package/fesm2022/slotted-angular-attachment.mjs +595 -0
- package/fesm2022/slotted-angular-attachment.mjs.map +1 -0
- package/fesm2022/slotted-angular-avatar-group.mjs +230 -0
- package/fesm2022/slotted-angular-avatar-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-avatar.mjs +330 -0
- package/fesm2022/slotted-angular-avatar.mjs.map +1 -0
- package/fesm2022/slotted-angular-badge.mjs +255 -0
- package/fesm2022/slotted-angular-badge.mjs.map +1 -0
- package/fesm2022/slotted-angular-breadcrumb.mjs +544 -0
- package/fesm2022/slotted-angular-breadcrumb.mjs.map +1 -0
- package/fesm2022/slotted-angular-button-group.mjs +146 -0
- package/fesm2022/slotted-angular-button-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-button.mjs +692 -0
- package/fesm2022/slotted-angular-button.mjs.map +1 -0
- package/fesm2022/slotted-angular-calendar.mjs +916 -0
- package/fesm2022/slotted-angular-calendar.mjs.map +1 -0
- package/fesm2022/slotted-angular-card.mjs +225 -0
- package/fesm2022/slotted-angular-card.mjs.map +1 -0
- package/fesm2022/slotted-angular-carousel.mjs +840 -0
- package/fesm2022/slotted-angular-carousel.mjs.map +1 -0
- package/fesm2022/slotted-angular-cascader.mjs +1839 -0
- package/fesm2022/slotted-angular-cascader.mjs.map +1 -0
- package/fesm2022/slotted-angular-chart.mjs +974 -0
- package/fesm2022/slotted-angular-chart.mjs.map +1 -0
- package/fesm2022/slotted-angular-checkbox-group.mjs +283 -0
- package/fesm2022/slotted-angular-checkbox-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-checkbox.mjs +468 -0
- package/fesm2022/slotted-angular-checkbox.mjs.map +1 -0
- package/fesm2022/slotted-angular-code-block.mjs +476 -0
- package/fesm2022/slotted-angular-code-block.mjs.map +1 -0
- package/fesm2022/slotted-angular-collapsible.mjs +479 -0
- package/fesm2022/slotted-angular-collapsible.mjs.map +1 -0
- package/fesm2022/slotted-angular-color-picker.mjs +910 -0
- package/fesm2022/slotted-angular-color-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-column-manager.mjs +1037 -0
- package/fesm2022/slotted-angular-column-manager.mjs.map +1 -0
- package/fesm2022/slotted-angular-combobox.mjs +1480 -0
- package/fesm2022/slotted-angular-combobox.mjs.map +1 -0
- package/fesm2022/slotted-angular-command-palette.mjs +1283 -0
- package/fesm2022/slotted-angular-command-palette.mjs.map +1 -0
- package/fesm2022/slotted-angular-container.mjs +105 -0
- package/fesm2022/slotted-angular-container.mjs.map +1 -0
- package/fesm2022/slotted-angular-context-menu.mjs +221 -0
- package/fesm2022/slotted-angular-context-menu.mjs.map +1 -0
- package/fesm2022/slotted-angular-currency-field.mjs +1131 -0
- package/fesm2022/slotted-angular-currency-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-dashboard-grid.mjs +1928 -0
- package/fesm2022/slotted-angular-dashboard-grid.mjs.map +1 -0
- package/fesm2022/slotted-angular-data-grid.mjs +6697 -0
- package/fesm2022/slotted-angular-data-grid.mjs.map +1 -0
- package/fesm2022/slotted-angular-data-list.mjs +1418 -0
- package/fesm2022/slotted-angular-data-list.mjs.map +1 -0
- package/fesm2022/slotted-angular-date-field.mjs +772 -0
- package/fesm2022/slotted-angular-date-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-date-picker.mjs +690 -0
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-date-range-picker.mjs +1150 -0
- package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-datetime-field.mjs +1058 -0
- package/fesm2022/slotted-angular-datetime-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-datetime-picker.mjs +1362 -0
- package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-datetime-range-picker.mjs +1872 -0
- package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-description-list.mjs +545 -0
- package/fesm2022/slotted-angular-description-list.mjs.map +1 -0
- package/fesm2022/slotted-angular-detail-panel.mjs +754 -0
- package/fesm2022/slotted-angular-detail-panel.mjs.map +1 -0
- package/fesm2022/slotted-angular-dialog.mjs +980 -0
- package/fesm2022/slotted-angular-dialog.mjs.map +1 -0
- package/fesm2022/slotted-angular-divider.mjs +76 -0
- package/fesm2022/slotted-angular-divider.mjs.map +1 -0
- package/fesm2022/slotted-angular-drawer.mjs +1397 -0
- package/fesm2022/slotted-angular-drawer.mjs.map +1 -0
- package/fesm2022/slotted-angular-entity-picker.mjs +1987 -0
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-event-calendar.mjs +2934 -0
- package/fesm2022/slotted-angular-event-calendar.mjs.map +1 -0
- package/fesm2022/slotted-angular-field-group.mjs +301 -0
- package/fesm2022/slotted-angular-field-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-field.mjs +928 -0
- package/fesm2022/slotted-angular-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-filter-bar.mjs +3107 -0
- package/fesm2022/slotted-angular-filter-bar.mjs.map +1 -0
- package/fesm2022/slotted-angular-form.mjs +592 -0
- package/fesm2022/slotted-angular-form.mjs.map +1 -0
- package/fesm2022/slotted-angular-fullscreen.mjs +314 -0
- package/fesm2022/slotted-angular-fullscreen.mjs.map +1 -0
- package/fesm2022/slotted-angular-grid.mjs +58 -0
- package/fesm2022/slotted-angular-grid.mjs.map +1 -0
- package/fesm2022/slotted-angular-highlight.mjs +123 -0
- package/fesm2022/slotted-angular-highlight.mjs.map +1 -0
- package/fesm2022/slotted-angular-hover-card.mjs +326 -0
- package/fesm2022/slotted-angular-hover-card.mjs.map +1 -0
- package/fesm2022/slotted-angular-i18n.mjs +75 -0
- package/fesm2022/slotted-angular-i18n.mjs.map +1 -0
- package/fesm2022/slotted-angular-icon.mjs +232 -0
- package/fesm2022/slotted-angular-icon.mjs.map +1 -0
- package/fesm2022/slotted-angular-image.mjs +442 -0
- package/fesm2022/slotted-angular-image.mjs.map +1 -0
- package/fesm2022/slotted-angular-import-export-center.mjs +1792 -0
- package/fesm2022/slotted-angular-import-export-center.mjs.map +1 -0
- package/fesm2022/slotted-angular-inline-message.mjs +280 -0
- package/fesm2022/slotted-angular-inline-message.mjs.map +1 -0
- package/fesm2022/slotted-angular-inline.mjs +52 -0
- package/fesm2022/slotted-angular-inline.mjs.map +1 -0
- package/fesm2022/slotted-angular-kbd.mjs +284 -0
- package/fesm2022/slotted-angular-kbd.mjs.map +1 -0
- package/fesm2022/slotted-angular-link.mjs +182 -0
- package/fesm2022/slotted-angular-link.mjs.map +1 -0
- package/fesm2022/slotted-angular-list-item.mjs +367 -0
- package/fesm2022/slotted-angular-list-item.mjs.map +1 -0
- package/fesm2022/slotted-angular-list.mjs +256 -0
- package/fesm2022/slotted-angular-list.mjs.map +1 -0
- package/fesm2022/slotted-angular-listbox.mjs +1274 -0
- package/fesm2022/slotted-angular-listbox.mjs.map +1 -0
- package/fesm2022/slotted-angular-loading-overlay.mjs +451 -0
- package/fesm2022/slotted-angular-loading-overlay.mjs.map +1 -0
- package/fesm2022/slotted-angular-markdown.mjs +914 -0
- package/fesm2022/slotted-angular-markdown.mjs.map +1 -0
- package/fesm2022/slotted-angular-menu.mjs +1211 -0
- package/fesm2022/slotted-angular-menu.mjs.map +1 -0
- package/fesm2022/slotted-angular-menubar.mjs +230 -0
- package/fesm2022/slotted-angular-menubar.mjs.map +1 -0
- package/fesm2022/slotted-angular-message-scroller.mjs +378 -0
- package/fesm2022/slotted-angular-message-scroller.mjs.map +1 -0
- package/fesm2022/slotted-angular-message.mjs +866 -0
- package/fesm2022/slotted-angular-message.mjs.map +1 -0
- package/fesm2022/slotted-angular-multi-select.mjs +1939 -0
- package/fesm2022/slotted-angular-multi-select.mjs.map +1 -0
- package/fesm2022/slotted-angular-navigation-menu.mjs +770 -0
- package/fesm2022/slotted-angular-navigation-menu.mjs.map +1 -0
- package/fesm2022/slotted-angular-notification-center.mjs +1172 -0
- package/fesm2022/slotted-angular-notification-center.mjs.map +1 -0
- package/fesm2022/slotted-angular-number-field.mjs +966 -0
- package/fesm2022/slotted-angular-number-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-otp-input.mjs +629 -0
- package/fesm2022/slotted-angular-otp-input.mjs.map +1 -0
- package/fesm2022/slotted-angular-page-header.mjs +788 -0
- package/fesm2022/slotted-angular-page-header.mjs.map +1 -0
- package/fesm2022/slotted-angular-page.mjs +255 -0
- package/fesm2022/slotted-angular-page.mjs.map +1 -0
- package/fesm2022/slotted-angular-pagination.mjs +562 -0
- package/fesm2022/slotted-angular-pagination.mjs.map +1 -0
- package/fesm2022/slotted-angular-popover.mjs +799 -0
- package/fesm2022/slotted-angular-popover.mjs.map +1 -0
- package/fesm2022/slotted-angular-progress-indicator.mjs +572 -0
- package/fesm2022/slotted-angular-progress-indicator.mjs.map +1 -0
- package/fesm2022/slotted-angular-prompt-composer.mjs +596 -0
- package/fesm2022/slotted-angular-prompt-composer.mjs.map +1 -0
- package/fesm2022/slotted-angular-prose.mjs +314 -0
- package/fesm2022/slotted-angular-prose.mjs.map +1 -0
- package/fesm2022/slotted-angular-radio-group.mjs +469 -0
- package/fesm2022/slotted-angular-radio-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-rating.mjs +1174 -0
- package/fesm2022/slotted-angular-rating.mjs.map +1 -0
- package/fesm2022/slotted-angular-result-state.mjs +330 -0
- package/fesm2022/slotted-angular-result-state.mjs.map +1 -0
- package/fesm2022/slotted-angular-saved-views.mjs +877 -0
- package/fesm2022/slotted-angular-saved-views.mjs.map +1 -0
- package/fesm2022/slotted-angular-scroll-area.mjs +294 -0
- package/fesm2022/slotted-angular-scroll-area.mjs.map +1 -0
- package/fesm2022/slotted-angular-section.mjs +266 -0
- package/fesm2022/slotted-angular-section.mjs.map +1 -0
- package/fesm2022/slotted-angular-segmented-control.mjs +454 -0
- package/fesm2022/slotted-angular-segmented-control.mjs.map +1 -0
- package/fesm2022/slotted-angular-select.mjs +1899 -0
- package/fesm2022/slotted-angular-select.mjs.map +1 -0
- package/fesm2022/slotted-angular-side-navigation.mjs +1042 -0
- package/fesm2022/slotted-angular-side-navigation.mjs.map +1 -0
- package/fesm2022/slotted-angular-skeleton.mjs +316 -0
- package/fesm2022/slotted-angular-skeleton.mjs.map +1 -0
- package/fesm2022/slotted-angular-slider.mjs +586 -0
- package/fesm2022/slotted-angular-slider.mjs.map +1 -0
- package/fesm2022/slotted-angular-sparkline.mjs +235 -0
- package/fesm2022/slotted-angular-sparkline.mjs.map +1 -0
- package/fesm2022/slotted-angular-split-button.mjs +331 -0
- package/fesm2022/slotted-angular-split-button.mjs.map +1 -0
- package/fesm2022/slotted-angular-splitter.mjs +516 -0
- package/fesm2022/slotted-angular-splitter.mjs.map +1 -0
- package/fesm2022/slotted-angular-stack.mjs +48 -0
- package/fesm2022/slotted-angular-stack.mjs.map +1 -0
- package/fesm2022/slotted-angular-stat-card.mjs +478 -0
- package/fesm2022/slotted-angular-stat-card.mjs.map +1 -0
- package/fesm2022/slotted-angular-status-indicator.mjs +155 -0
- package/fesm2022/slotted-angular-status-indicator.mjs.map +1 -0
- package/fesm2022/slotted-angular-stepper.mjs +536 -0
- package/fesm2022/slotted-angular-stepper.mjs.map +1 -0
- package/fesm2022/slotted-angular-switch.mjs +447 -0
- package/fesm2022/slotted-angular-switch.mjs.map +1 -0
- package/fesm2022/slotted-angular-table-of-contents.mjs +750 -0
- package/fesm2022/slotted-angular-table-of-contents.mjs.map +1 -0
- package/fesm2022/slotted-angular-table.mjs +2518 -0
- package/fesm2022/slotted-angular-table.mjs.map +1 -0
- package/fesm2022/slotted-angular-tabs.mjs +829 -0
- package/fesm2022/slotted-angular-tabs.mjs.map +1 -0
- package/fesm2022/slotted-angular-tag.mjs +595 -0
- package/fesm2022/slotted-angular-tag.mjs.map +1 -0
- package/fesm2022/slotted-angular-tags-input.mjs +1211 -0
- package/fesm2022/slotted-angular-tags-input.mjs.map +1 -0
- package/fesm2022/slotted-angular-text-field.mjs +674 -0
- package/fesm2022/slotted-angular-text-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-textarea.mjs +275 -0
- package/fesm2022/slotted-angular-textarea.mjs.map +1 -0
- package/fesm2022/slotted-angular-theme.mjs +45 -0
- package/fesm2022/slotted-angular-theme.mjs.map +1 -0
- package/fesm2022/slotted-angular-time-field.mjs +895 -0
- package/fesm2022/slotted-angular-time-field.mjs.map +1 -0
- package/fesm2022/slotted-angular-time-picker.mjs +856 -0
- package/fesm2022/slotted-angular-time-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-time-range-picker.mjs +1534 -0
- package/fesm2022/slotted-angular-time-range-picker.mjs.map +1 -0
- package/fesm2022/slotted-angular-timeline.mjs +928 -0
- package/fesm2022/slotted-angular-timeline.mjs.map +1 -0
- package/fesm2022/slotted-angular-toast.mjs +917 -0
- package/fesm2022/slotted-angular-toast.mjs.map +1 -0
- package/fesm2022/slotted-angular-toggle-group.mjs +311 -0
- package/fesm2022/slotted-angular-toggle-group.mjs.map +1 -0
- package/fesm2022/slotted-angular-toggle.mjs +162 -0
- package/fesm2022/slotted-angular-toggle.mjs.map +1 -0
- package/fesm2022/slotted-angular-toolbar.mjs +536 -0
- package/fesm2022/slotted-angular-toolbar.mjs.map +1 -0
- package/fesm2022/slotted-angular-tooltip.mjs +798 -0
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -0
- package/fesm2022/slotted-angular-top-navigation.mjs +1308 -0
- package/fesm2022/slotted-angular-top-navigation.mjs.map +1 -0
- package/fesm2022/slotted-angular-tour.mjs +1330 -0
- package/fesm2022/slotted-angular-tour.mjs.map +1 -0
- package/fesm2022/slotted-angular-transfer.mjs +1406 -0
- package/fesm2022/slotted-angular-transfer.mjs.map +1 -0
- package/fesm2022/slotted-angular-tree.mjs +1448 -0
- package/fesm2022/slotted-angular-tree.mjs.map +1 -0
- package/fesm2022/slotted-angular-typography.mjs +184 -0
- package/fesm2022/slotted-angular-typography.mjs.map +1 -0
- package/fesm2022/slotted-angular-upload.mjs +1523 -0
- package/fesm2022/slotted-angular-upload.mjs.map +1 -0
- package/fesm2022/slotted-angular-visually-hidden.mjs +32 -0
- package/fesm2022/slotted-angular-visually-hidden.mjs.map +1 -0
- package/fesm2022/slotted-angular-wizard.mjs +1715 -0
- package/fesm2022/slotted-angular-wizard.mjs.map +1 -0
- package/fesm2022/slotted-angular.mjs +4 -0
- package/fesm2022/slotted-angular.mjs.map +1 -0
- package/package.json +537 -3
- package/types/slotted-angular-accordion.d.ts +156 -0
- package/types/slotted-angular-accordion.d.ts.map +1 -0
- package/types/slotted-angular-action-bar.d.ts +291 -0
- package/types/slotted-angular-action-bar.d.ts.map +1 -0
- package/types/slotted-angular-action-sheet.d.ts +294 -0
- package/types/slotted-angular-action-sheet.d.ts.map +1 -0
- package/types/slotted-angular-alert.d.ts +214 -0
- package/types/slotted-angular-alert.d.ts.map +1 -0
- package/types/slotted-angular-app-shell.d.ts +549 -0
- package/types/slotted-angular-app-shell.d.ts.map +1 -0
- package/types/slotted-angular-aspect-ratio.d.ts +57 -0
- package/types/slotted-angular-aspect-ratio.d.ts.map +1 -0
- package/types/slotted-angular-attachment.d.ts +294 -0
- package/types/slotted-angular-attachment.d.ts.map +1 -0
- package/types/slotted-angular-avatar-group.d.ts +119 -0
- package/types/slotted-angular-avatar-group.d.ts.map +1 -0
- package/types/slotted-angular-avatar.d.ts +202 -0
- package/types/slotted-angular-avatar.d.ts.map +1 -0
- package/types/slotted-angular-badge.d.ts +166 -0
- package/types/slotted-angular-badge.d.ts.map +1 -0
- package/types/slotted-angular-breadcrumb.d.ts +251 -0
- package/types/slotted-angular-breadcrumb.d.ts.map +1 -0
- package/types/slotted-angular-button-group.d.ts +89 -0
- package/types/slotted-angular-button-group.d.ts.map +1 -0
- package/types/slotted-angular-button.d.ts +390 -0
- package/types/slotted-angular-button.d.ts.map +1 -0
- package/types/slotted-angular-calendar.d.ts +280 -0
- package/types/slotted-angular-calendar.d.ts.map +1 -0
- package/types/slotted-angular-card.d.ts +140 -0
- package/types/slotted-angular-card.d.ts.map +1 -0
- package/types/slotted-angular-carousel.d.ts +288 -0
- package/types/slotted-angular-carousel.d.ts.map +1 -0
- package/types/slotted-angular-cascader.d.ts +351 -0
- package/types/slotted-angular-cascader.d.ts.map +1 -0
- package/types/slotted-angular-chart.d.ts +319 -0
- package/types/slotted-angular-chart.d.ts.map +1 -0
- package/types/slotted-angular-checkbox-group.d.ts +156 -0
- package/types/slotted-angular-checkbox-group.d.ts.map +1 -0
- package/types/slotted-angular-checkbox.d.ts +197 -0
- package/types/slotted-angular-checkbox.d.ts.map +1 -0
- package/types/slotted-angular-code-block.d.ts +158 -0
- package/types/slotted-angular-code-block.d.ts.map +1 -0
- package/types/slotted-angular-collapsible.d.ts +272 -0
- package/types/slotted-angular-collapsible.d.ts.map +1 -0
- package/types/slotted-angular-color-picker.d.ts +181 -0
- package/types/slotted-angular-color-picker.d.ts.map +1 -0
- package/types/slotted-angular-column-manager.d.ts +200 -0
- package/types/slotted-angular-column-manager.d.ts.map +1 -0
- package/types/slotted-angular-combobox.d.ts +449 -0
- package/types/slotted-angular-combobox.d.ts.map +1 -0
- package/types/slotted-angular-command-palette.d.ts +256 -0
- package/types/slotted-angular-command-palette.d.ts.map +1 -0
- package/types/slotted-angular-container.d.ts +84 -0
- package/types/slotted-angular-container.d.ts.map +1 -0
- package/types/slotted-angular-context-menu.d.ts +84 -0
- package/types/slotted-angular-context-menu.d.ts.map +1 -0
- package/types/slotted-angular-currency-field.d.ts +480 -0
- package/types/slotted-angular-currency-field.d.ts.map +1 -0
- package/types/slotted-angular-dashboard-grid.d.ts +341 -0
- package/types/slotted-angular-dashboard-grid.d.ts.map +1 -0
- package/types/slotted-angular-data-grid.d.ts +1077 -0
- package/types/slotted-angular-data-grid.d.ts.map +1 -0
- package/types/slotted-angular-data-list.d.ts +272 -0
- package/types/slotted-angular-data-list.d.ts.map +1 -0
- package/types/slotted-angular-date-field.d.ts +320 -0
- package/types/slotted-angular-date-field.d.ts.map +1 -0
- package/types/slotted-angular-date-picker.d.ts +224 -0
- package/types/slotted-angular-date-picker.d.ts.map +1 -0
- package/types/slotted-angular-date-range-picker.d.ts +310 -0
- package/types/slotted-angular-date-range-picker.d.ts.map +1 -0
- package/types/slotted-angular-datetime-field.d.ts +362 -0
- package/types/slotted-angular-datetime-field.d.ts.map +1 -0
- package/types/slotted-angular-datetime-picker.d.ts +370 -0
- package/types/slotted-angular-datetime-picker.d.ts.map +1 -0
- package/types/slotted-angular-datetime-range-picker.d.ts +459 -0
- package/types/slotted-angular-datetime-range-picker.d.ts.map +1 -0
- package/types/slotted-angular-description-list.d.ts +281 -0
- package/types/slotted-angular-description-list.d.ts.map +1 -0
- package/types/slotted-angular-detail-panel.d.ts +240 -0
- package/types/slotted-angular-detail-panel.d.ts.map +1 -0
- package/types/slotted-angular-dialog.d.ts +497 -0
- package/types/slotted-angular-dialog.d.ts.map +1 -0
- package/types/slotted-angular-divider.d.ts +40 -0
- package/types/slotted-angular-divider.d.ts.map +1 -0
- package/types/slotted-angular-drawer.d.ts +532 -0
- package/types/slotted-angular-drawer.d.ts.map +1 -0
- package/types/slotted-angular-entity-picker.d.ts +338 -0
- package/types/slotted-angular-entity-picker.d.ts.map +1 -0
- package/types/slotted-angular-event-calendar.d.ts +574 -0
- package/types/slotted-angular-event-calendar.d.ts.map +1 -0
- package/types/slotted-angular-field-group.d.ts +152 -0
- package/types/slotted-angular-field-group.d.ts.map +1 -0
- package/types/slotted-angular-field.d.ts +535 -0
- package/types/slotted-angular-field.d.ts.map +1 -0
- package/types/slotted-angular-filter-bar.d.ts +573 -0
- package/types/slotted-angular-filter-bar.d.ts.map +1 -0
- package/types/slotted-angular-form.d.ts +298 -0
- package/types/slotted-angular-form.d.ts.map +1 -0
- package/types/slotted-angular-fullscreen.d.ts +145 -0
- package/types/slotted-angular-fullscreen.d.ts.map +1 -0
- package/types/slotted-angular-grid.d.ts +50 -0
- package/types/slotted-angular-grid.d.ts.map +1 -0
- package/types/slotted-angular-highlight.d.ts +93 -0
- package/types/slotted-angular-highlight.d.ts.map +1 -0
- package/types/slotted-angular-hover-card.d.ts +140 -0
- package/types/slotted-angular-hover-card.d.ts.map +1 -0
- package/types/slotted-angular-i18n.d.ts +46 -0
- package/types/slotted-angular-i18n.d.ts.map +1 -0
- package/types/slotted-angular-icon.d.ts +94 -0
- package/types/slotted-angular-icon.d.ts.map +1 -0
- package/types/slotted-angular-image.d.ts +251 -0
- package/types/slotted-angular-image.d.ts.map +1 -0
- package/types/slotted-angular-import-export-center.d.ts +351 -0
- package/types/slotted-angular-import-export-center.d.ts.map +1 -0
- package/types/slotted-angular-inline-message.d.ts +195 -0
- package/types/slotted-angular-inline-message.d.ts.map +1 -0
- package/types/slotted-angular-inline.d.ts +41 -0
- package/types/slotted-angular-inline.d.ts.map +1 -0
- package/types/slotted-angular-kbd.d.ts +174 -0
- package/types/slotted-angular-kbd.d.ts.map +1 -0
- package/types/slotted-angular-link.d.ts +94 -0
- package/types/slotted-angular-link.d.ts.map +1 -0
- package/types/slotted-angular-list-item.d.ts +210 -0
- package/types/slotted-angular-list-item.d.ts.map +1 -0
- package/types/slotted-angular-list.d.ts +176 -0
- package/types/slotted-angular-list.d.ts.map +1 -0
- package/types/slotted-angular-listbox.d.ts +470 -0
- package/types/slotted-angular-listbox.d.ts.map +1 -0
- package/types/slotted-angular-loading-overlay.d.ts +219 -0
- package/types/slotted-angular-loading-overlay.d.ts.map +1 -0
- package/types/slotted-angular-markdown.d.ts +172 -0
- package/types/slotted-angular-markdown.d.ts.map +1 -0
- package/types/slotted-angular-menu.d.ts +448 -0
- package/types/slotted-angular-menu.d.ts.map +1 -0
- package/types/slotted-angular-menubar.d.ts +90 -0
- package/types/slotted-angular-menubar.d.ts.map +1 -0
- package/types/slotted-angular-message-scroller.d.ts +151 -0
- package/types/slotted-angular-message-scroller.d.ts.map +1 -0
- package/types/slotted-angular-message.d.ts +348 -0
- package/types/slotted-angular-message.d.ts.map +1 -0
- package/types/slotted-angular-multi-select.d.ts +462 -0
- package/types/slotted-angular-multi-select.d.ts.map +1 -0
- package/types/slotted-angular-navigation-menu.d.ts +309 -0
- package/types/slotted-angular-navigation-menu.d.ts.map +1 -0
- package/types/slotted-angular-notification-center.d.ts +318 -0
- package/types/slotted-angular-notification-center.d.ts.map +1 -0
- package/types/slotted-angular-number-field.d.ts +402 -0
- package/types/slotted-angular-number-field.d.ts.map +1 -0
- package/types/slotted-angular-otp-input.d.ts +286 -0
- package/types/slotted-angular-otp-input.d.ts.map +1 -0
- package/types/slotted-angular-page-header.d.ts +334 -0
- package/types/slotted-angular-page-header.d.ts.map +1 -0
- package/types/slotted-angular-page.d.ts +141 -0
- package/types/slotted-angular-page.d.ts.map +1 -0
- package/types/slotted-angular-pagination.d.ts +213 -0
- package/types/slotted-angular-pagination.d.ts.map +1 -0
- package/types/slotted-angular-popover.d.ts +366 -0
- package/types/slotted-angular-popover.d.ts.map +1 -0
- package/types/slotted-angular-progress-indicator.d.ts +312 -0
- package/types/slotted-angular-progress-indicator.d.ts.map +1 -0
- package/types/slotted-angular-prompt-composer.d.ts +242 -0
- package/types/slotted-angular-prompt-composer.d.ts.map +1 -0
- package/types/slotted-angular-prose.d.ts +171 -0
- package/types/slotted-angular-prose.d.ts.map +1 -0
- package/types/slotted-angular-radio-group.d.ts +268 -0
- package/types/slotted-angular-radio-group.d.ts.map +1 -0
- package/types/slotted-angular-rating.d.ts +374 -0
- package/types/slotted-angular-rating.d.ts.map +1 -0
- package/types/slotted-angular-result-state.d.ts +217 -0
- package/types/slotted-angular-result-state.d.ts.map +1 -0
- package/types/slotted-angular-saved-views.d.ts +198 -0
- package/types/slotted-angular-saved-views.d.ts.map +1 -0
- package/types/slotted-angular-scroll-area.d.ts +186 -0
- package/types/slotted-angular-scroll-area.d.ts.map +1 -0
- package/types/slotted-angular-section.d.ts +143 -0
- package/types/slotted-angular-section.d.ts.map +1 -0
- package/types/slotted-angular-segmented-control.d.ts +251 -0
- package/types/slotted-angular-segmented-control.d.ts.map +1 -0
- package/types/slotted-angular-select.d.ts +507 -0
- package/types/slotted-angular-select.d.ts.map +1 -0
- package/types/slotted-angular-side-navigation.d.ts +373 -0
- package/types/slotted-angular-side-navigation.d.ts.map +1 -0
- package/types/slotted-angular-skeleton.d.ts +198 -0
- package/types/slotted-angular-skeleton.d.ts.map +1 -0
- package/types/slotted-angular-slider.d.ts +216 -0
- package/types/slotted-angular-slider.d.ts.map +1 -0
- package/types/slotted-angular-sparkline.d.ts +106 -0
- package/types/slotted-angular-sparkline.d.ts.map +1 -0
- package/types/slotted-angular-split-button.d.ts +180 -0
- package/types/slotted-angular-split-button.d.ts.map +1 -0
- package/types/slotted-angular-splitter.d.ts +206 -0
- package/types/slotted-angular-splitter.d.ts.map +1 -0
- package/types/slotted-angular-stack.d.ts +38 -0
- package/types/slotted-angular-stack.d.ts.map +1 -0
- package/types/slotted-angular-stat-card.d.ts +232 -0
- package/types/slotted-angular-stat-card.d.ts.map +1 -0
- package/types/slotted-angular-status-indicator.d.ts +106 -0
- package/types/slotted-angular-status-indicator.d.ts.map +1 -0
- package/types/slotted-angular-stepper.d.ts +198 -0
- package/types/slotted-angular-stepper.d.ts.map +1 -0
- package/types/slotted-angular-switch.d.ts +243 -0
- package/types/slotted-angular-switch.d.ts.map +1 -0
- package/types/slotted-angular-table-of-contents.d.ts +210 -0
- package/types/slotted-angular-table-of-contents.d.ts.map +1 -0
- package/types/slotted-angular-table.d.ts +888 -0
- package/types/slotted-angular-table.d.ts.map +1 -0
- package/types/slotted-angular-tabs.d.ts +340 -0
- package/types/slotted-angular-tabs.d.ts.map +1 -0
- package/types/slotted-angular-tag.d.ts +279 -0
- package/types/slotted-angular-tag.d.ts.map +1 -0
- package/types/slotted-angular-tags-input.d.ts +302 -0
- package/types/slotted-angular-tags-input.d.ts.map +1 -0
- package/types/slotted-angular-text-field.d.ts +334 -0
- package/types/slotted-angular-text-field.d.ts.map +1 -0
- package/types/slotted-angular-textarea.d.ts +150 -0
- package/types/slotted-angular-textarea.d.ts.map +1 -0
- package/types/slotted-angular-theme.d.ts +26 -0
- package/types/slotted-angular-theme.d.ts.map +1 -0
- package/types/slotted-angular-time-field.d.ts +300 -0
- package/types/slotted-angular-time-field.d.ts.map +1 -0
- package/types/slotted-angular-time-picker.d.ts +260 -0
- package/types/slotted-angular-time-picker.d.ts.map +1 -0
- package/types/slotted-angular-time-range-picker.d.ts +401 -0
- package/types/slotted-angular-time-range-picker.d.ts.map +1 -0
- package/types/slotted-angular-timeline.d.ts +329 -0
- package/types/slotted-angular-timeline.d.ts.map +1 -0
- package/types/slotted-angular-toast.d.ts +340 -0
- package/types/slotted-angular-toast.d.ts.map +1 -0
- package/types/slotted-angular-toggle-group.d.ts +167 -0
- package/types/slotted-angular-toggle-group.d.ts.map +1 -0
- package/types/slotted-angular-toggle.d.ts +106 -0
- package/types/slotted-angular-toggle.d.ts.map +1 -0
- package/types/slotted-angular-toolbar.d.ts +252 -0
- package/types/slotted-angular-toolbar.d.ts.map +1 -0
- package/types/slotted-angular-tooltip.d.ts +388 -0
- package/types/slotted-angular-tooltip.d.ts.map +1 -0
- package/types/slotted-angular-top-navigation.d.ts +442 -0
- package/types/slotted-angular-top-navigation.d.ts.map +1 -0
- package/types/slotted-angular-tour.d.ts +440 -0
- package/types/slotted-angular-tour.d.ts.map +1 -0
- package/types/slotted-angular-transfer.d.ts +296 -0
- package/types/slotted-angular-transfer.d.ts.map +1 -0
- package/types/slotted-angular-tree.d.ts +499 -0
- package/types/slotted-angular-tree.d.ts.map +1 -0
- package/types/slotted-angular-typography.d.ts +89 -0
- package/types/slotted-angular-typography.d.ts.map +1 -0
- package/types/slotted-angular-upload.d.ts +365 -0
- package/types/slotted-angular-upload.d.ts.map +1 -0
- package/types/slotted-angular-visually-hidden.d.ts +19 -0
- package/types/slotted-angular-visually-hidden.d.ts.map +1 -0
- package/types/slotted-angular-wizard.d.ts +441 -0
- package/types/slotted-angular-wizard.d.ts.map +1 -0
- package/types/slotted-angular.d.ts +3 -0
- package/types/slotted-angular.d.ts.map +1 -0
|
@@ -0,0 +1,1448 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, Injectable, input, booleanAttribute, numberAttribute, ElementRef, signal, contentChildren, computed, afterEveryRender, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive, model, output, contentChild, DestroyRef, afterNextRender, forwardRef } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
5
|
+
import { createTreeCollection, createFilter, virtualWindow, indeterminateKeys, cascadeSelection, nextSelection, moveIndex } from '@slotted/core/collection';
|
|
6
|
+
import { createControllable } from '@slotted/core/state';
|
|
7
|
+
import { createTypeahead, isPrintable } from '@slotted/core/typeahead';
|
|
8
|
+
import { SlGlyph, SlIcon } from '@slotted/angular/icon';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* `expandOn` is `row` because the band is a larger target than any chevron and
|
|
12
|
+
* it is what a file browser does. `selectionIndicator` is `auto` rather than a
|
|
13
|
+
* mode, because the right mark depends on the mode beside it: a box for a set
|
|
14
|
+
* the reader ticks, a highlight for the one thing they chose. `loop` is off,
|
|
15
|
+
* for the reason `listbox` states.
|
|
16
|
+
*/
|
|
17
|
+
const FALLBACK = {
|
|
18
|
+
disallowEmptySelection: false,
|
|
19
|
+
disallowSelectAll: false,
|
|
20
|
+
expandOn: 'row',
|
|
21
|
+
focusMode: 'auto',
|
|
22
|
+
guides: true,
|
|
23
|
+
itemSize: 32,
|
|
24
|
+
loop: false,
|
|
25
|
+
navigateDisabled: false,
|
|
26
|
+
overscan: 4,
|
|
27
|
+
pageSize: 10,
|
|
28
|
+
selectOnFocus: false,
|
|
29
|
+
selectionBehavior: 'toggle',
|
|
30
|
+
selectionCascade: 'none',
|
|
31
|
+
selectionIndicator: 'auto',
|
|
32
|
+
selectionMode: 'single',
|
|
33
|
+
size: 'md',
|
|
34
|
+
structure: 'auto',
|
|
35
|
+
typeahead: true,
|
|
36
|
+
typeaheadTimeout: 500,
|
|
37
|
+
variant: 'plain',
|
|
38
|
+
virtual: false,
|
|
39
|
+
};
|
|
40
|
+
const TREE_DEFAULTS = new InjectionToken('slotted tree defaults', {
|
|
41
|
+
providedIn: 'root',
|
|
42
|
+
factory: () => FALLBACK,
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* An application decides once how its trees behave, rather than repeating
|
|
46
|
+
* twenty inputs on every hierarchy in a product. A tree that states any of them
|
|
47
|
+
* itself still wins: an explicit input is never overridden by the token.
|
|
48
|
+
*/
|
|
49
|
+
function provideTreeDefaults(defaults) {
|
|
50
|
+
return {
|
|
51
|
+
provide: TREE_DEFAULTS,
|
|
52
|
+
useFactory: () => ({ ...FALLBACK, ...defaults }),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** What a tree behaves as here, before it states anything of its own. */
|
|
56
|
+
function injectTreeDefaults() {
|
|
57
|
+
return inject(TREE_DEFAULTS);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* `aria-activedescendant` names a node by its id, and a node's own label names
|
|
61
|
+
* the node, so every node needs two ids and the same strings have to be
|
|
62
|
+
* produced on the server and in the browser. A counter held by the injector
|
|
63
|
+
* produces them; `Math.random` would not match for hydration.
|
|
64
|
+
*/
|
|
65
|
+
class SlTreeIdFactory {
|
|
66
|
+
count = 0;
|
|
67
|
+
next() {
|
|
68
|
+
this.count += 1;
|
|
69
|
+
return `slotted-tree-${this.count}`;
|
|
70
|
+
}
|
|
71
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeIdFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
72
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeIdFactory, providedIn: 'root' });
|
|
73
|
+
}
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeIdFactory, decorators: [{
|
|
75
|
+
type: Injectable,
|
|
76
|
+
args: [{ providedIn: 'root' }]
|
|
77
|
+
}] });
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* What a part asks the tree around it.
|
|
81
|
+
*
|
|
82
|
+
* It is an abstract class rather than an interface so it can be the injection
|
|
83
|
+
* token as well as the type, and it exists in a file of its own so the parts do
|
|
84
|
+
* not import the component that renders them: the component's own template
|
|
85
|
+
* applies the node component, and a direct import each way is a cycle.
|
|
86
|
+
*/
|
|
87
|
+
class SlTreeContext {
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** The selector the tree reads its visible rows through, in DOM order. */
|
|
91
|
+
const NODE_SELECTOR = "[data-part='node']";
|
|
92
|
+
/**
|
|
93
|
+
* One node, and the facts the tree reads back off it.
|
|
94
|
+
*
|
|
95
|
+
* The visible collection is read from the DOM rather than from a registry, as
|
|
96
|
+
* `listbox` and `menu` already do: document order is reading order, a collapsed
|
|
97
|
+
* branch renders no group and therefore contributes no rows, and nothing has to
|
|
98
|
+
* be registered, unregistered or ordered by mount time. The flattening a tree
|
|
99
|
+
* would otherwise need is the browser's own.
|
|
100
|
+
*
|
|
101
|
+
* `aria-disabled` and never the native attribute: the pattern needs a disabled
|
|
102
|
+
* node to keep its place in the set, and `navigateDisabled` is what decides
|
|
103
|
+
* whether the arrows land on it.
|
|
104
|
+
*/
|
|
105
|
+
class SlTreeNode {
|
|
106
|
+
/** The key this node selects and expands by. */
|
|
107
|
+
value = input.required(/* @ts-ignore */
|
|
108
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
109
|
+
/** The node's name, when it is a plain string. */
|
|
110
|
+
label = input('', /* @ts-ignore */
|
|
111
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
112
|
+
/**
|
|
113
|
+
* Whether this node has children that have not been rendered yet. A branch
|
|
114
|
+
* says so before it can prove it, which is what makes lazy loading possible.
|
|
115
|
+
*/
|
|
116
|
+
hasChildren = input(false, { ...(ngDevMode ? { debugName: "hasChildren" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
117
|
+
/** Whether the children are on their way. Writes `aria-busy` on the group. */
|
|
118
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
119
|
+
/** Unstated rather than `false`, so the node defers to the tree. */
|
|
120
|
+
disabled = input(undefined, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: (state) => (state === undefined ? undefined : booleanAttribute(state)) });
|
|
121
|
+
/**
|
|
122
|
+
* What typeahead matches and what a reader hears. Defaults to the label's own
|
|
123
|
+
* text, which is wrong exactly when the label holds a mark or a number.
|
|
124
|
+
*/
|
|
125
|
+
textValue = input(undefined, /* @ts-ignore */
|
|
126
|
+
...(ngDevMode ? [{ debugName: "textValue" }] : /* istanbul ignore next */ []));
|
|
127
|
+
/** Whether a query matched this node's own name or one below it. */
|
|
128
|
+
match = input(undefined, /* @ts-ignore */
|
|
129
|
+
...(ngDevMode ? [{ debugName: "match" }] : /* istanbul ignore next */ []));
|
|
130
|
+
/**
|
|
131
|
+
* Rendered at its own place on the canvas whether or not the window covers
|
|
132
|
+
* it. The tree pins the active node and the range anchor; nothing else sets
|
|
133
|
+
* it, because an `aria-activedescendant` whose target has been recycled names
|
|
134
|
+
* an id that is not in the document.
|
|
135
|
+
*/
|
|
136
|
+
pinned = input(false, { ...(ngDevMode ? { debugName: "pinned" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
137
|
+
/** Where the node sits on the canvas, in pixels. Windowed rows only. */
|
|
138
|
+
offset = input(undefined, { ...(ngDevMode ? { debugName: "offset" } : /* istanbul ignore next */ {}), transform: (state) => (state === undefined ? undefined : numberAttribute(state)) });
|
|
139
|
+
/**
|
|
140
|
+
* How deep the node sits, stated only by the flat shape. Everywhere else the
|
|
141
|
+
* markup says it: a node inside another is one level deeper, and the number
|
|
142
|
+
* is a fact about the tree rather than one more thing a consumer can get
|
|
143
|
+
* wrong.
|
|
144
|
+
*/
|
|
145
|
+
level = input(undefined, { ...(ngDevMode ? { debugName: "level" } : /* istanbul ignore next */ {}), transform: (state) => (state === undefined ? undefined : numberAttribute(state)) });
|
|
146
|
+
tree = inject(SlTreeContext);
|
|
147
|
+
/**
|
|
148
|
+
* The node this one is written inside, found through the element injector
|
|
149
|
+
* rather than through a context signal: projected content keeps the injector
|
|
150
|
+
* of the place it was declared, which is exactly the nesting the depth is
|
|
151
|
+
* counted from.
|
|
152
|
+
*/
|
|
153
|
+
parent = inject(SlTreeNode, { optional: true, skipSelf: true });
|
|
154
|
+
host = inject(ElementRef);
|
|
155
|
+
/**
|
|
156
|
+
* The nodes this one is rendered inside, counted in the document once it is
|
|
157
|
+
* attached. A template that calls itself declares every instance at the root,
|
|
158
|
+
* so the injector finds no parent for any of them and the whole tree would
|
|
159
|
+
* draw flat; the document still nests them, and so does the level the
|
|
160
|
+
* platform reports.
|
|
161
|
+
*/
|
|
162
|
+
renderedDepth = signal(null, /* @ts-ignore */
|
|
163
|
+
...(ngDevMode ? [{ debugName: "renderedDepth" }] : /* istanbul ignore next */ []));
|
|
164
|
+
/**
|
|
165
|
+
* The nodes written inside this one. Angular creates projected content with
|
|
166
|
+
* the parent's own view and only decides where to place it, so the query
|
|
167
|
+
* answers a branch that is closed and whose group is therefore not rendered —
|
|
168
|
+
* which is what keeps a collapsed branch a branch.
|
|
169
|
+
*/
|
|
170
|
+
childNodes = contentChildren(SlTreeNode, { ...(ngDevMode ? { debugName: "childNodes" } : /* istanbul ignore next */ {}), descendants: true });
|
|
171
|
+
/** A branch is a node that holds children or says it will. */
|
|
172
|
+
branch = computed(() => this.hasChildren() || this.childNodes().length > 0, /* @ts-ignore */
|
|
173
|
+
...(ngDevMode ? [{ debugName: "branch" }] : /* istanbul ignore next */ []));
|
|
174
|
+
/**
|
|
175
|
+
* Annotated rather than inferred: the depth of a node reads the depth of the
|
|
176
|
+
* node it is written inside, and an inferred type would be defined in terms
|
|
177
|
+
* of itself.
|
|
178
|
+
*/
|
|
179
|
+
depth = computed(() => this.level() ?? this.renderedDepth() ?? (this.parent === null ? 0 : this.parent.depth() + 1), /* @ts-ignore */
|
|
180
|
+
...(ngDevMode ? [{ debugName: "depth" }] : /* istanbul ignore next */ []));
|
|
181
|
+
expanded = computed(() => this.branch() && this.tree.isExpanded(this.value()), /* @ts-ignore */
|
|
182
|
+
...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
|
|
183
|
+
selected = computed(() => this.tree.isSelected(this.value()), /* @ts-ignore */
|
|
184
|
+
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
185
|
+
indeterminate = computed(() => this.tree.isIndeterminate(this.value()), /* @ts-ignore */
|
|
186
|
+
...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
|
|
187
|
+
holdsSelection = computed(() => !this.expanded() && this.tree.holdsSelection(this.value()), /* @ts-ignore */
|
|
188
|
+
...(ngDevMode ? [{ debugName: "holdsSelection" }] : /* istanbul ignore next */ []));
|
|
189
|
+
current = computed(() => this.tree.isActive(this.value()), /* @ts-ignore */
|
|
190
|
+
...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
|
|
191
|
+
id = computed(() => this.tree.nodeId(this.value()), /* @ts-ignore */
|
|
192
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
193
|
+
labelId = computed(() => this.tree.labelId(this.value()), /* @ts-ignore */
|
|
194
|
+
...(ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []));
|
|
195
|
+
resolvedDisabled = computed(() => (this.disabled() ?? false) === true || this.tree.treeDisabled() === true, /* @ts-ignore */
|
|
196
|
+
...(ngDevMode ? [{ debugName: "resolvedDisabled" }] : /* istanbul ignore next */ []));
|
|
197
|
+
ariaExpanded = computed(() => this.branch() ? (this.expanded() ? 'true' : 'false') : null, /* @ts-ignore */
|
|
198
|
+
...(ngDevMode ? [{ debugName: "ariaExpanded" }] : /* istanbul ignore next */ []));
|
|
199
|
+
chosen = computed(() => this.tree.selection() === 'none' ? null : this.selected() ? 'true' : 'false', /* @ts-ignore */
|
|
200
|
+
...(ngDevMode ? [{ debugName: "chosen" }] : /* istanbul ignore next */ []));
|
|
201
|
+
ariaSelected = computed(() => this.tree.indicatorMode() === 'checkbox' ? null : this.chosen(), /* @ts-ignore */
|
|
202
|
+
...(ngDevMode ? [{ debugName: "ariaSelected" }] : /* istanbul ignore next */ []));
|
|
203
|
+
ariaChecked = computed(() => this.tree.indicatorMode() === 'checkbox' ? this.chosen() : null, /* @ts-ignore */
|
|
204
|
+
...(ngDevMode ? [{ debugName: "ariaChecked" }] : /* istanbul ignore next */ []));
|
|
205
|
+
/**
|
|
206
|
+
* The level the node reports is the tree's answer and not the depth it was
|
|
207
|
+
* handed: the depth places the row, and the property is written only where
|
|
208
|
+
* the nesting no longer says it.
|
|
209
|
+
*/
|
|
210
|
+
levelAttr = computed(() => this.tree.levelOf(this.value()), /* @ts-ignore */
|
|
211
|
+
...(ngDevMode ? [{ debugName: "levelAttr" }] : /* istanbul ignore next */ []));
|
|
212
|
+
setSize = computed(() => this.tree.setSizeOf(this.value()), /* @ts-ignore */
|
|
213
|
+
...(ngDevMode ? [{ debugName: "setSize" }] : /* istanbul ignore next */ []));
|
|
214
|
+
posInSet = computed(() => this.tree.posInSetOf(this.value()), /* @ts-ignore */
|
|
215
|
+
...(ngDevMode ? [{ debugName: "posInSet" }] : /* istanbul ignore next */ []));
|
|
216
|
+
tabIndex = computed(() => this.tree.nodeTabIndex(this.value()), /* @ts-ignore */
|
|
217
|
+
...(ngDevMode ? [{ debugName: "tabIndex" }] : /* istanbul ignore next */ []));
|
|
218
|
+
constructor() {
|
|
219
|
+
/*
|
|
220
|
+
* Projected content is created with the parent's view, before a closed
|
|
221
|
+
* branch has placed its group in the document, so one read at creation
|
|
222
|
+
* finds no ancestor. The count waits until the node is attached, and stops
|
|
223
|
+
* there: a view is never moved to another parent.
|
|
224
|
+
*/
|
|
225
|
+
const measure = afterEveryRender({
|
|
226
|
+
read: () => {
|
|
227
|
+
const element = this.host.nativeElement;
|
|
228
|
+
const root = element.closest("[data-ui='tree']");
|
|
229
|
+
if (root === null)
|
|
230
|
+
return;
|
|
231
|
+
let depth = 0;
|
|
232
|
+
let node = element.parentElement?.closest(NODE_SELECTOR);
|
|
233
|
+
while (node && root.contains(node)) {
|
|
234
|
+
depth += 1;
|
|
235
|
+
node = node.parentElement?.closest(NODE_SELECTOR);
|
|
236
|
+
}
|
|
237
|
+
this.renderedDepth.set(depth);
|
|
238
|
+
measure.destroy();
|
|
239
|
+
},
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
onRowClick(event) {
|
|
243
|
+
if (this.resolvedDisabled())
|
|
244
|
+
return;
|
|
245
|
+
this.tree.press(this.value(), event);
|
|
246
|
+
}
|
|
247
|
+
onExpanderClick(event) {
|
|
248
|
+
event.stopPropagation();
|
|
249
|
+
if (!this.branch() || this.resolvedDisabled())
|
|
250
|
+
return;
|
|
251
|
+
this.tree.pressExpander(this.value(), event);
|
|
252
|
+
}
|
|
253
|
+
onIndicatorClick(event) {
|
|
254
|
+
event.stopPropagation();
|
|
255
|
+
if (this.resolvedDisabled())
|
|
256
|
+
return;
|
|
257
|
+
this.tree.pressIndicator(this.value(), event);
|
|
258
|
+
}
|
|
259
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeNode, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
260
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlTreeNode, isStandalone: true, selector: "li[slTreeNode]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hasChildren: { classPropertyName: "hasChildren", publicName: "hasChildren", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, textValue: { classPropertyName: "textValue", publicName: "textValue", isSignal: true, isRequired: false, transformFunction: null }, match: { classPropertyName: "match", publicName: "match", isSignal: true, isRequired: false, transformFunction: null }, pinned: { classPropertyName: "pinned", publicName: "pinned", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-part": "node", "role": "treeitem" }, properties: { "attr.id": "id()", "attr.data-key": "value()", "attr.data-depth": "depth()", "style.--slotted-tree-depth": "depth()", "style.--slotted-tree-row-offset.px": "offset()", "attr.data-text-value": "textValue() ?? null", "attr.data-branch": "branch() ? '' : null", "attr.data-expanded": "expanded() ? '' : null", "attr.data-selected": "selected() ? '' : null", "attr.data-selected-within": "holdsSelection() ? '' : null", "attr.data-indeterminate": "indeterminate() ? '' : null", "attr.data-current": "current() ? '' : null", "attr.data-disabled": "resolvedDisabled() ? '' : null", "attr.data-loading": "loading() ? '' : null", "attr.data-match": "match() ?? null", "attr.data-pinned": "pinned() ? '' : null", "attr.aria-labelledby": "labelId()", "attr.aria-expanded": "ariaExpanded()", "attr.aria-selected": "ariaSelected()", "attr.aria-checked": "ariaChecked()", "attr.aria-disabled": "resolvedDisabled() ? 'true' : null", "attr.aria-level": "levelAttr()", "attr.aria-setsize": "setSize()", "attr.aria-posinset": "posInSet()", "attr.tabindex": "tabIndex()" } }, queries: [{ propertyName: "childNodes", predicate: SlTreeNode, descendants: true, isSignal: true }], exportAs: ["slTreeNode"], ngImport: i0, template: `<div data-part="row" (click)="onRowClick($event)">
|
|
261
|
+
@if (tree.showGuides() && depth() > 0) {
|
|
262
|
+
<span data-part="guide" aria-hidden="true"></span>
|
|
263
|
+
}
|
|
264
|
+
@if (branch() && loading()) {
|
|
265
|
+
<!-- The wait stands in the chevron's own cell, so a branch that starts
|
|
266
|
+
fetching moves neither its own name nor the rows below it. -->
|
|
267
|
+
<span data-part="loader" data-ui="spinner" aria-hidden="true"></span>
|
|
268
|
+
} @else {
|
|
269
|
+
<span data-part="expander" aria-hidden="true" (click)="onExpanderClick($event)">
|
|
270
|
+
<!-- A leaf keeps the box and draws nothing in it. -->
|
|
271
|
+
@if (branch()) {
|
|
272
|
+
<span slIcon><svg slGlyph name="chevron-right"></svg></span>
|
|
273
|
+
}
|
|
274
|
+
</span>
|
|
275
|
+
}
|
|
276
|
+
@if (tree.indicatorMode() === 'checkbox') {
|
|
277
|
+
<!-- The dash outranks the check: a branch partly chosen shows the state
|
|
278
|
+
its children are in. -->
|
|
279
|
+
<span data-part="indicator" aria-hidden="true" (click)="onIndicatorClick($event)"
|
|
280
|
+
><span slIcon><svg slGlyph [name]="indeterminate() ? 'minus' : 'check'"></svg></span
|
|
281
|
+
></span>
|
|
282
|
+
}
|
|
283
|
+
<ng-content select="[slTreeIcon]" />
|
|
284
|
+
<span data-part="label" [attr.id]="labelId()"
|
|
285
|
+
>{{ label() }}<ng-content select="[slTreeLabel]"
|
|
286
|
+
/></span>
|
|
287
|
+
<ng-content select="[slTreeDescription]" />
|
|
288
|
+
<ng-content select="[slTreeMeta]" />
|
|
289
|
+
<ng-content select="[slTreeActions]" />
|
|
290
|
+
</div>
|
|
291
|
+
@if (branch() && expanded()) {
|
|
292
|
+
<!-- The group is placed only while the branch is open. One kept in the
|
|
293
|
+
DOM and merely hidden would put every descendant of every closed
|
|
294
|
+
branch into the reading order the root counts.
|
|
295
|
+
|
|
296
|
+
The element is the consumer's rather than this template's, and the
|
|
297
|
+
reason is the HTML parser: Angular parses a template as HTML, where
|
|
298
|
+
an li closes the li before it, so a node written inside a node needs
|
|
299
|
+
the list between them. React has no such rule and needs no such
|
|
300
|
+
element, and the asymmetry is written in the design rather than
|
|
301
|
+
levelled away. -->
|
|
302
|
+
<ng-content select="[slTreeGroup]" />
|
|
303
|
+
}
|
|
304
|
+
<ng-content />`, isInline: true, dependencies: [{ kind: "component", type: SlGlyph, selector: "svg[slGlyph]", inputs: ["name", "solid"] }, { kind: "component", type: SlIcon, selector: "[slIcon]", inputs: ["directional", "label", "size", "tone"], exportAs: ["slIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
305
|
+
}
|
|
306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeNode, decorators: [{
|
|
307
|
+
type: Component,
|
|
308
|
+
args: [{
|
|
309
|
+
selector: 'li[slTreeNode]',
|
|
310
|
+
standalone: true,
|
|
311
|
+
exportAs: 'slTreeNode',
|
|
312
|
+
imports: [SlGlyph, SlIcon],
|
|
313
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
314
|
+
encapsulation: ViewEncapsulation.None,
|
|
315
|
+
template: `<div data-part="row" (click)="onRowClick($event)">
|
|
316
|
+
@if (tree.showGuides() && depth() > 0) {
|
|
317
|
+
<span data-part="guide" aria-hidden="true"></span>
|
|
318
|
+
}
|
|
319
|
+
@if (branch() && loading()) {
|
|
320
|
+
<!-- The wait stands in the chevron's own cell, so a branch that starts
|
|
321
|
+
fetching moves neither its own name nor the rows below it. -->
|
|
322
|
+
<span data-part="loader" data-ui="spinner" aria-hidden="true"></span>
|
|
323
|
+
} @else {
|
|
324
|
+
<span data-part="expander" aria-hidden="true" (click)="onExpanderClick($event)">
|
|
325
|
+
<!-- A leaf keeps the box and draws nothing in it. -->
|
|
326
|
+
@if (branch()) {
|
|
327
|
+
<span slIcon><svg slGlyph name="chevron-right"></svg></span>
|
|
328
|
+
}
|
|
329
|
+
</span>
|
|
330
|
+
}
|
|
331
|
+
@if (tree.indicatorMode() === 'checkbox') {
|
|
332
|
+
<!-- The dash outranks the check: a branch partly chosen shows the state
|
|
333
|
+
its children are in. -->
|
|
334
|
+
<span data-part="indicator" aria-hidden="true" (click)="onIndicatorClick($event)"
|
|
335
|
+
><span slIcon><svg slGlyph [name]="indeterminate() ? 'minus' : 'check'"></svg></span
|
|
336
|
+
></span>
|
|
337
|
+
}
|
|
338
|
+
<ng-content select="[slTreeIcon]" />
|
|
339
|
+
<span data-part="label" [attr.id]="labelId()"
|
|
340
|
+
>{{ label() }}<ng-content select="[slTreeLabel]"
|
|
341
|
+
/></span>
|
|
342
|
+
<ng-content select="[slTreeDescription]" />
|
|
343
|
+
<ng-content select="[slTreeMeta]" />
|
|
344
|
+
<ng-content select="[slTreeActions]" />
|
|
345
|
+
</div>
|
|
346
|
+
@if (branch() && expanded()) {
|
|
347
|
+
<!-- The group is placed only while the branch is open. One kept in the
|
|
348
|
+
DOM and merely hidden would put every descendant of every closed
|
|
349
|
+
branch into the reading order the root counts.
|
|
350
|
+
|
|
351
|
+
The element is the consumer's rather than this template's, and the
|
|
352
|
+
reason is the HTML parser: Angular parses a template as HTML, where
|
|
353
|
+
an li closes the li before it, so a node written inside a node needs
|
|
354
|
+
the list between them. React has no such rule and needs no such
|
|
355
|
+
element, and the asymmetry is written in the design rather than
|
|
356
|
+
levelled away. -->
|
|
357
|
+
<ng-content select="[slTreeGroup]" />
|
|
358
|
+
}
|
|
359
|
+
<ng-content />`,
|
|
360
|
+
host: {
|
|
361
|
+
'data-part': 'node',
|
|
362
|
+
role: 'treeitem',
|
|
363
|
+
'[attr.id]': 'id()',
|
|
364
|
+
'[attr.data-key]': 'value()',
|
|
365
|
+
'[attr.data-depth]': 'depth()',
|
|
366
|
+
'[style.--slotted-tree-depth]': 'depth()',
|
|
367
|
+
'[style.--slotted-tree-row-offset.px]': 'offset()',
|
|
368
|
+
'[attr.data-text-value]': 'textValue() ?? null',
|
|
369
|
+
'[attr.data-branch]': "branch() ? '' : null",
|
|
370
|
+
'[attr.data-expanded]': "expanded() ? '' : null",
|
|
371
|
+
'[attr.data-selected]': "selected() ? '' : null",
|
|
372
|
+
'[attr.data-selected-within]': "holdsSelection() ? '' : null",
|
|
373
|
+
'[attr.data-indeterminate]': "indeterminate() ? '' : null",
|
|
374
|
+
'[attr.data-current]': "current() ? '' : null",
|
|
375
|
+
'[attr.data-disabled]': "resolvedDisabled() ? '' : null",
|
|
376
|
+
'[attr.data-loading]': "loading() ? '' : null",
|
|
377
|
+
'[attr.data-match]': 'match() ?? null',
|
|
378
|
+
'[attr.data-pinned]': "pinned() ? '' : null",
|
|
379
|
+
'[attr.aria-labelledby]': 'labelId()',
|
|
380
|
+
'[attr.aria-expanded]': 'ariaExpanded()',
|
|
381
|
+
'[attr.aria-selected]': 'ariaSelected()',
|
|
382
|
+
'[attr.aria-checked]': 'ariaChecked()',
|
|
383
|
+
'[attr.aria-disabled]': "resolvedDisabled() ? 'true' : null",
|
|
384
|
+
'[attr.aria-level]': 'levelAttr()',
|
|
385
|
+
'[attr.aria-setsize]': 'setSize()',
|
|
386
|
+
'[attr.aria-posinset]': 'posInSet()',
|
|
387
|
+
'[attr.tabindex]': 'tabIndex()',
|
|
388
|
+
},
|
|
389
|
+
}]
|
|
390
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hasChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasChildren", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], textValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "textValue", required: false }] }], match: [{ type: i0.Input, args: [{ isSignal: true, alias: "match", required: false }] }], pinned: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinned", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], childNodes: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SlTreeNode), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
391
|
+
/**
|
|
392
|
+
* The list a branch's children are written in.
|
|
393
|
+
*
|
|
394
|
+
* It exists because Angular parses a template as HTML: an `li` closes the `li`
|
|
395
|
+
* before it, so a node written inside a node needs the list between them. The
|
|
396
|
+
* node decides whether the group is placed; the consumer decides what element
|
|
397
|
+
* it is.
|
|
398
|
+
*/
|
|
399
|
+
class SlTreeGroup {
|
|
400
|
+
/** Whether the children are still on their way. */
|
|
401
|
+
busy = input(false, { ...(ngDevMode ? { debugName: "busy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
402
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
403
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: SlTreeGroup, isStandalone: true, selector: "ul[slTreeGroup]", inputs: { busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-part": "group", "role": "group" }, properties: { "attr.aria-busy": "busy() ? 'true' : null" } }, ngImport: i0 });
|
|
404
|
+
}
|
|
405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeGroup, decorators: [{
|
|
406
|
+
type: Directive,
|
|
407
|
+
args: [{
|
|
408
|
+
selector: 'ul[slTreeGroup]',
|
|
409
|
+
standalone: true,
|
|
410
|
+
host: {
|
|
411
|
+
'data-part': 'group',
|
|
412
|
+
role: 'group',
|
|
413
|
+
'[attr.aria-busy]': "busy() ? 'true' : null",
|
|
414
|
+
},
|
|
415
|
+
}]
|
|
416
|
+
}], propDecorators: { busy: [{ type: i0.Input, args: [{ isSignal: true, alias: "busy", required: false }] }] } });
|
|
417
|
+
/** The node's leading picture, which the consumer owns whole. */
|
|
418
|
+
class SlTreeIcon {
|
|
419
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
420
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlTreeIcon, isStandalone: true, selector: "[slTreeIcon]", host: { attributes: { "data-part": "icon", "aria-hidden": "true" } }, ngImport: i0 });
|
|
421
|
+
}
|
|
422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeIcon, decorators: [{
|
|
423
|
+
type: Directive,
|
|
424
|
+
args: [{
|
|
425
|
+
selector: '[slTreeIcon]',
|
|
426
|
+
standalone: true,
|
|
427
|
+
host: { 'data-part': 'icon', 'aria-hidden': 'true' },
|
|
428
|
+
}]
|
|
429
|
+
}] });
|
|
430
|
+
/** The node's name, when it is richer than a string. */
|
|
431
|
+
class SlTreeLabel {
|
|
432
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
433
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlTreeLabel, isStandalone: true, selector: "[slTreeLabel]", ngImport: i0 });
|
|
434
|
+
}
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeLabel, decorators: [{
|
|
436
|
+
type: Directive,
|
|
437
|
+
args: [{ selector: '[slTreeLabel]', standalone: true }]
|
|
438
|
+
}] });
|
|
439
|
+
/** A second line under the name. */
|
|
440
|
+
class SlTreeDescription {
|
|
441
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
442
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlTreeDescription, isStandalone: true, selector: "[slTreeDescription]", host: { attributes: { "data-part": "description" } }, ngImport: i0 });
|
|
443
|
+
}
|
|
444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeDescription, decorators: [{
|
|
445
|
+
type: Directive,
|
|
446
|
+
args: [{
|
|
447
|
+
selector: '[slTreeDescription]',
|
|
448
|
+
standalone: true,
|
|
449
|
+
host: { 'data-part': 'description' },
|
|
450
|
+
}]
|
|
451
|
+
}] });
|
|
452
|
+
/** The trailing count, size or badge. */
|
|
453
|
+
class SlTreeMeta {
|
|
454
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeMeta, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
455
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlTreeMeta, isStandalone: true, selector: "[slTreeMeta]", host: { attributes: { "data-part": "meta" } }, ngImport: i0 });
|
|
456
|
+
}
|
|
457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeMeta, decorators: [{
|
|
458
|
+
type: Directive,
|
|
459
|
+
args: [{ selector: '[slTreeMeta]', standalone: true, host: { 'data-part': 'meta' } }]
|
|
460
|
+
}] });
|
|
461
|
+
/** The trailing controls. They stay in the DOM and stay reachable. */
|
|
462
|
+
class SlTreeActions {
|
|
463
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
464
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlTreeActions, isStandalone: true, selector: "[slTreeActions]", host: { attributes: { "data-part": "actions" } }, ngImport: i0 });
|
|
465
|
+
}
|
|
466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeActions, decorators: [{
|
|
467
|
+
type: Directive,
|
|
468
|
+
args: [{ selector: '[slTreeActions]', standalone: true, host: { 'data-part': 'actions' } }]
|
|
469
|
+
}] });
|
|
470
|
+
/** What the tree shows when it holds nothing. */
|
|
471
|
+
class SlTreeEmpty {
|
|
472
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeEmpty, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
473
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlTreeEmpty, isStandalone: true, selector: "[slTreeEmpty]", host: { attributes: { "data-part": "empty" } }, ngImport: i0 });
|
|
474
|
+
}
|
|
475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTreeEmpty, decorators: [{
|
|
476
|
+
type: Directive,
|
|
477
|
+
args: [{ selector: '[slTreeEmpty]', standalone: true, host: { 'data-part': 'empty' } }]
|
|
478
|
+
}] });
|
|
479
|
+
|
|
480
|
+
function toKeys(value) {
|
|
481
|
+
if (value === undefined || value === null)
|
|
482
|
+
return [];
|
|
483
|
+
return typeof value === 'string' ? [value] : value;
|
|
484
|
+
}
|
|
485
|
+
function same(a, b) {
|
|
486
|
+
return a.length === b.length && a.every((key, index) => key === b[index]);
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* A hierarchy the reader opens, walks and chooses from.
|
|
490
|
+
*
|
|
491
|
+
* ── Where the visible list comes from ───────────────────────────────────
|
|
492
|
+
*
|
|
493
|
+
* From the DOM, in document order, which is the flattening a tree would
|
|
494
|
+
* otherwise have to keep in step with the expanded set. A collapsed branch
|
|
495
|
+
* renders no group and therefore contributes no rows, so what the keyboard
|
|
496
|
+
* counts and what the reader sees cannot disagree.
|
|
497
|
+
*
|
|
498
|
+
* `nodes` is a second thing and not a replacement: it is the hierarchy the tree
|
|
499
|
+
* holds, and it answers the three questions the DOM cannot — what is under a
|
|
500
|
+
* branch that is closed, which a cascade needs; what every branch is, which
|
|
501
|
+
* `expandAll` opens; and what matches a query, whose ancestors the filter
|
|
502
|
+
* keeps.
|
|
503
|
+
*
|
|
504
|
+
* ── Three mutable values ────────────────────────────────────────────────
|
|
505
|
+
*
|
|
506
|
+
* The pattern is explicit that focus and selection are two: "DOM focus (the
|
|
507
|
+
* active element) is functionally distinct from the selected state". Expansion
|
|
508
|
+
* is the third and belongs to neither.
|
|
509
|
+
*/
|
|
510
|
+
class SlTree {
|
|
511
|
+
/* ── The three values a reader moves ─────────────────────────────────── */
|
|
512
|
+
value = model(null, /* @ts-ignore */
|
|
513
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
514
|
+
expandedKeys = model([], /* @ts-ignore */
|
|
515
|
+
...(ngDevMode ? [{ debugName: "expandedKeys" }] : /* istanbul ignore next */ []));
|
|
516
|
+
activeKey = model(null, /* @ts-ignore */
|
|
517
|
+
...(ngDevMode ? [{ debugName: "activeKey" }] : /* istanbul ignore next */ []));
|
|
518
|
+
/** The request behind each move, carrying the reason a boolean cannot say. */
|
|
519
|
+
valueRequest = output();
|
|
520
|
+
expandedKeysRequest = output();
|
|
521
|
+
activeKeyRequest = output();
|
|
522
|
+
/** A node was activated: pressed, or `Enter` on the keyboard. */
|
|
523
|
+
nodeActivate = output();
|
|
524
|
+
/* ── The axes ────────────────────────────────────────────────────────── */
|
|
525
|
+
defaults = injectTreeDefaults();
|
|
526
|
+
size = input(this.defaults.size, /* @ts-ignore */
|
|
527
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
528
|
+
variant = input(this.defaults.variant, /* @ts-ignore */
|
|
529
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
530
|
+
structure = input(this.defaults.structure, /* @ts-ignore */
|
|
531
|
+
...(ngDevMode ? [{ debugName: "structure" }] : /* istanbul ignore next */ []));
|
|
532
|
+
selectionMode = input(this.defaults.selectionMode, /* @ts-ignore */
|
|
533
|
+
...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
|
|
534
|
+
selectionBehavior = input(this.defaults.selectionBehavior, /* @ts-ignore */
|
|
535
|
+
...(ngDevMode ? [{ debugName: "selectionBehavior" }] : /* istanbul ignore next */ []));
|
|
536
|
+
selectionIndicator = input(this.defaults.selectionIndicator, /* @ts-ignore */
|
|
537
|
+
...(ngDevMode ? [{ debugName: "selectionIndicator" }] : /* istanbul ignore next */ []));
|
|
538
|
+
selectionCascade = input(this.defaults.selectionCascade, /* @ts-ignore */
|
|
539
|
+
...(ngDevMode ? [{ debugName: "selectionCascade" }] : /* istanbul ignore next */ []));
|
|
540
|
+
expandOn = input(this.defaults.expandOn, /* @ts-ignore */
|
|
541
|
+
...(ngDevMode ? [{ debugName: "expandOn" }] : /* istanbul ignore next */ []));
|
|
542
|
+
focusMode = input(this.defaults.focusMode, /* @ts-ignore */
|
|
543
|
+
...(ngDevMode ? [{ debugName: "focusMode" }] : /* istanbul ignore next */ []));
|
|
544
|
+
guides = input(this.defaults.guides, { ...(ngDevMode ? { debugName: "guides" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
545
|
+
loop = input(this.defaults.loop, { ...(ngDevMode ? { debugName: "loop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
546
|
+
typeahead = input(this.defaults.typeahead, { ...(ngDevMode ? { debugName: "typeahead" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
547
|
+
typeaheadTimeout = input(this.defaults.typeaheadTimeout, { ...(ngDevMode ? { debugName: "typeaheadTimeout" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
548
|
+
selectOnFocus = input(this.defaults.selectOnFocus, { ...(ngDevMode ? { debugName: "selectOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
549
|
+
navigateDisabled = input(this.defaults.navigateDisabled, { ...(ngDevMode ? { debugName: "navigateDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
550
|
+
disallowEmptySelection = input(this.defaults.disallowEmptySelection, { ...(ngDevMode ? { debugName: "disallowEmptySelection" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
551
|
+
disallowSelectAll = input(this.defaults.disallowSelectAll, { ...(ngDevMode ? { debugName: "disallowSelectAll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
552
|
+
pageSize = input(this.defaults.pageSize, { ...(ngDevMode ? { debugName: "pageSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
553
|
+
virtual = input(this.defaults.virtual, { ...(ngDevMode ? { debugName: "virtual" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
554
|
+
itemSize = input(this.defaults.itemSize, { ...(ngDevMode ? { debugName: "itemSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
555
|
+
overscan = input(this.defaults.overscan, { ...(ngDevMode ? { debugName: "overscan" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
556
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
557
|
+
readOnly = input(false, { ...(ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
558
|
+
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
559
|
+
invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
560
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
561
|
+
ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
562
|
+
ariaLabelledBy = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
563
|
+
/* ── The hierarchy, when the tree was handed one ─────────────────────── */
|
|
564
|
+
nodes = input(undefined, /* @ts-ignore */
|
|
565
|
+
...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
|
|
566
|
+
getKey = input(undefined, /* @ts-ignore */
|
|
567
|
+
...(ngDevMode ? [{ debugName: "getKey" }] : /* istanbul ignore next */ []));
|
|
568
|
+
getLabel = input(undefined, /* @ts-ignore */
|
|
569
|
+
...(ngDevMode ? [{ debugName: "getLabel" }] : /* istanbul ignore next */ []));
|
|
570
|
+
getChildren = input(undefined, /* @ts-ignore */
|
|
571
|
+
...(ngDevMode ? [{ debugName: "getChildren" }] : /* istanbul ignore next */ []));
|
|
572
|
+
getLevel = input(undefined, /* @ts-ignore */
|
|
573
|
+
...(ngDevMode ? [{ debugName: "getLevel" }] : /* istanbul ignore next */ []));
|
|
574
|
+
hasChildren = input(undefined, /* @ts-ignore */
|
|
575
|
+
...(ngDevMode ? [{ debugName: "hasChildren" }] : /* istanbul ignore next */ []));
|
|
576
|
+
getChildrenCount = input(undefined, /* @ts-ignore */
|
|
577
|
+
...(ngDevMode ? [{ debugName: "getChildrenCount" }] : /* istanbul ignore next */ []));
|
|
578
|
+
isNodeDisabled = input(undefined, /* @ts-ignore */
|
|
579
|
+
...(ngDevMode ? [{ debugName: "isNodeDisabled" }] : /* istanbul ignore next */ []));
|
|
580
|
+
isNodeLoading = input(undefined, /* @ts-ignore */
|
|
581
|
+
...(ngDevMode ? [{ debugName: "isNodeLoading" }] : /* istanbul ignore next */ []));
|
|
582
|
+
/**
|
|
583
|
+
* A query the tree filters by. The consumer owns the string and the control
|
|
584
|
+
* it is typed into; the tree keeps the ancestors of every hit.
|
|
585
|
+
*/
|
|
586
|
+
query = input(undefined, /* @ts-ignore */
|
|
587
|
+
...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
588
|
+
/** The row's content, re-rendered per node rather than projected once. */
|
|
589
|
+
nodeContent = contentChild('slTreeNodeContent', /* @ts-ignore */
|
|
590
|
+
...(ngDevMode ? [{ debugName: "nodeContent" }] : /* istanbul ignore next */ []));
|
|
591
|
+
host = inject(ElementRef);
|
|
592
|
+
ids = inject(SlTreeIdFactory);
|
|
593
|
+
base = this.ids.next();
|
|
594
|
+
typeaheadHandle = createTypeahead({
|
|
595
|
+
timeout: this.defaults.typeaheadTimeout,
|
|
596
|
+
});
|
|
597
|
+
constructor() {
|
|
598
|
+
const destroyRef = inject(DestroyRef);
|
|
599
|
+
destroyRef.onDestroy(() => this.typeaheadHandle.destroy());
|
|
600
|
+
/**
|
|
601
|
+
* The viewport is measured as soon as there is one, and again whenever it
|
|
602
|
+
* changes size — not only when the reader scrolls.
|
|
603
|
+
*
|
|
604
|
+
* Measuring on `scroll` alone left the window with a viewport of nought
|
|
605
|
+
* until the first scroll, and a window of nought renders one row: a tree of
|
|
606
|
+
* four thousand showed its first name and nothing else until the reader
|
|
607
|
+
* nudged the wheel, at which point the rest appeared at once. It is the
|
|
608
|
+
* kind of defect that only exists on the first paint, which is exactly
|
|
609
|
+
* where a reader meets it.
|
|
610
|
+
*/
|
|
611
|
+
afterNextRender(() => this.measure());
|
|
612
|
+
const root = this.host.nativeElement;
|
|
613
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
614
|
+
const observer = new ResizeObserver(() => this.measure());
|
|
615
|
+
observer.observe(root);
|
|
616
|
+
destroyRef.onDestroy(() => observer.disconnect());
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
measure() {
|
|
620
|
+
const root = this.host.nativeElement;
|
|
621
|
+
this.viewportSize.set(root.clientHeight);
|
|
622
|
+
this.scrollOffset.set(root.scrollTop);
|
|
623
|
+
}
|
|
624
|
+
/* ── What the axes resolve to ────────────────────────────────────────── */
|
|
625
|
+
selection = computed(() => this.selectionMode(), /* @ts-ignore */
|
|
626
|
+
...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
|
|
627
|
+
treeDisabled = computed(() => this.disabled() || this.formDisabled(), /* @ts-ignore */
|
|
628
|
+
...(ngDevMode ? [{ debugName: "treeDisabled" }] : /* istanbul ignore next */ []));
|
|
629
|
+
showGuides = computed(() => this.guides(), /* @ts-ignore */
|
|
630
|
+
...(ngDevMode ? [{ debugName: "showGuides" }] : /* istanbul ignore next */ []));
|
|
631
|
+
expandOnRow = computed(() => this.expandOn(), /* @ts-ignore */
|
|
632
|
+
...(ngDevMode ? [{ debugName: "expandOnRow" }] : /* istanbul ignore next */ []));
|
|
633
|
+
/**
|
|
634
|
+
* `auto` reads the mode beside it: a box for a set the reader ticks, a
|
|
635
|
+
* highlight for the one thing they chose, and neither when nothing is
|
|
636
|
+
* selectable. The pattern's own note recommends exactly this convention.
|
|
637
|
+
*/
|
|
638
|
+
indicatorMode = computed(() => {
|
|
639
|
+
const stated = this.selectionIndicator();
|
|
640
|
+
if (stated !== 'auto')
|
|
641
|
+
return stated;
|
|
642
|
+
if (this.selection() === 'multiple')
|
|
643
|
+
return 'checkbox';
|
|
644
|
+
return this.selection() === 'single' ? 'highlight' : 'none';
|
|
645
|
+
}, /* @ts-ignore */
|
|
646
|
+
...(ngDevMode ? [{ debugName: "indicatorMode" }] : /* istanbul ignore next */ []));
|
|
647
|
+
/**
|
|
648
|
+
* The flat shape is the windowed one, and it is the handed collection's
|
|
649
|
+
* alone: a slice of rows cannot preserve nesting, and a node written in a
|
|
650
|
+
* template cannot render its children as its own siblings.
|
|
651
|
+
*/
|
|
652
|
+
structureMode = computed(() => {
|
|
653
|
+
if (this.collection() === undefined)
|
|
654
|
+
return 'nested';
|
|
655
|
+
const stated = this.structure();
|
|
656
|
+
if (stated !== 'auto')
|
|
657
|
+
return stated;
|
|
658
|
+
return this.virtual() ? 'flat' : 'nested';
|
|
659
|
+
}, /* @ts-ignore */
|
|
660
|
+
...(ngDevMode ? [{ debugName: "structureMode" }] : /* istanbul ignore next */ []));
|
|
661
|
+
mode = computed(() => {
|
|
662
|
+
const stated = this.focusMode();
|
|
663
|
+
if (stated !== 'auto')
|
|
664
|
+
return stated;
|
|
665
|
+
return this.virtual() && this.collection() !== undefined ? 'activedescendant' : 'roving';
|
|
666
|
+
}, /* @ts-ignore */
|
|
667
|
+
...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
668
|
+
collection = computed(() => {
|
|
669
|
+
const held = this.nodes();
|
|
670
|
+
const key = this.getKey();
|
|
671
|
+
if (held === undefined || key === undefined)
|
|
672
|
+
return undefined;
|
|
673
|
+
const level = this.getLevel();
|
|
674
|
+
return createTreeCollection({
|
|
675
|
+
...(level === undefined ? { roots: held } : { items: held, getLevel: level }),
|
|
676
|
+
getKey: key,
|
|
677
|
+
...(this.getLabel() === undefined ? {} : { getLabel: this.getLabel() }),
|
|
678
|
+
...(this.getChildren() === undefined ? {} : { getChildren: this.getChildren() }),
|
|
679
|
+
...(this.hasChildren() === undefined ? {} : { hasChildren: this.hasChildren() }),
|
|
680
|
+
...(this.getChildrenCount() === undefined
|
|
681
|
+
? {}
|
|
682
|
+
: { getChildrenCount: this.getChildrenCount() }),
|
|
683
|
+
...(this.isNodeDisabled() === undefined
|
|
684
|
+
? {}
|
|
685
|
+
: { isDisabled: this.isNodeDisabled() }),
|
|
686
|
+
});
|
|
687
|
+
}, /* @ts-ignore */
|
|
688
|
+
...(ngDevMode ? [{ debugName: "collection" }] : /* istanbul ignore next */ []));
|
|
689
|
+
selected = computed(() => toKeys(this.value()), /* @ts-ignore */
|
|
690
|
+
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
691
|
+
/* ── The filter ─────────────────────────────────────────────────────── */
|
|
692
|
+
filtered = computed(() => {
|
|
693
|
+
const held = this.collection();
|
|
694
|
+
const query = this.query();
|
|
695
|
+
if (held === undefined || query === undefined || query.trim() === '')
|
|
696
|
+
return undefined;
|
|
697
|
+
const filter = createFilter();
|
|
698
|
+
const hits = new Set();
|
|
699
|
+
for (const node of held.nodes)
|
|
700
|
+
if (filter.contains(node.label, query))
|
|
701
|
+
hits.add(node.key);
|
|
702
|
+
const kept = new Set(hits);
|
|
703
|
+
for (const key of hits)
|
|
704
|
+
for (const ancestor of held.ancestorsOf(key))
|
|
705
|
+
kept.add(ancestor);
|
|
706
|
+
return { hits, kept };
|
|
707
|
+
}, /* @ts-ignore */
|
|
708
|
+
...(ngDevMode ? [{ debugName: "filtered" }] : /* istanbul ignore next */ []));
|
|
709
|
+
/* ── The window ─────────────────────────────────────────────────────── */
|
|
710
|
+
viewportSize = signal(0, /* @ts-ignore */
|
|
711
|
+
...(ngDevMode ? [{ debugName: "viewportSize" }] : /* istanbul ignore next */ []));
|
|
712
|
+
scrollOffset = signal(0, /* @ts-ignore */
|
|
713
|
+
...(ngDevMode ? [{ debugName: "scrollOffset" }] : /* istanbul ignore next */ []));
|
|
714
|
+
visible = computed(() => {
|
|
715
|
+
const held = this.collection();
|
|
716
|
+
return held === undefined ? [] : held.visible(this.expandedKeys());
|
|
717
|
+
}, /* @ts-ignore */
|
|
718
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
719
|
+
windowed = computed(() => this.virtual() && this.collection() !== undefined, /* @ts-ignore */
|
|
720
|
+
...(ngDevMode ? [{ debugName: "windowed" }] : /* istanbul ignore next */ []));
|
|
721
|
+
slice = computed(() => {
|
|
722
|
+
if (!this.windowed())
|
|
723
|
+
return undefined;
|
|
724
|
+
const rows = this.visible();
|
|
725
|
+
const activeIndex = rows.findIndex((node) => node.key === this.activeKey());
|
|
726
|
+
const anchorIndex = rows.findIndex((node) => node.key === this.anchor);
|
|
727
|
+
return virtualWindow({
|
|
728
|
+
itemCount: rows.length,
|
|
729
|
+
itemSize: this.itemSize(),
|
|
730
|
+
overscan: this.overscan(),
|
|
731
|
+
pinned: [activeIndex, anchorIndex].filter((index) => index !== -1),
|
|
732
|
+
scrollOffset: this.scrollOffset(),
|
|
733
|
+
viewportSize: this.viewportSize(),
|
|
734
|
+
});
|
|
735
|
+
}, /* @ts-ignore */
|
|
736
|
+
...(ngDevMode ? [{ debugName: "slice" }] : /* istanbul ignore next */ []));
|
|
737
|
+
canvasSize = computed(() => {
|
|
738
|
+
const slice = this.slice();
|
|
739
|
+
return slice === undefined ? null : `${slice.totalSize}px`;
|
|
740
|
+
}, /* @ts-ignore */
|
|
741
|
+
...(ngDevMode ? [{ debugName: "canvasSize" }] : /* istanbul ignore next */ []));
|
|
742
|
+
canvasOffset = computed(() => {
|
|
743
|
+
const slice = this.slice();
|
|
744
|
+
return slice === undefined ? null : `${slice.startOffset}px`;
|
|
745
|
+
}, /* @ts-ignore */
|
|
746
|
+
...(ngDevMode ? [{ debugName: "canvasOffset" }] : /* istanbul ignore next */ []));
|
|
747
|
+
onScroll() {
|
|
748
|
+
this.measure();
|
|
749
|
+
}
|
|
750
|
+
/* ── The render plan ────────────────────────────────────────────────── */
|
|
751
|
+
plan = computed(() => {
|
|
752
|
+
const held = this.collection();
|
|
753
|
+
if (held === undefined)
|
|
754
|
+
return [];
|
|
755
|
+
const label = (item) => {
|
|
756
|
+
const read = this.getLabel();
|
|
757
|
+
return read === undefined
|
|
758
|
+
? (this.getKey()(item) ?? '')
|
|
759
|
+
: read(item);
|
|
760
|
+
};
|
|
761
|
+
const loading = this.isNodeLoading();
|
|
762
|
+
const filtered = this.filtered();
|
|
763
|
+
const flat = this.structureMode() === 'flat';
|
|
764
|
+
const entry = (node, offset) => ({
|
|
765
|
+
key: node.key,
|
|
766
|
+
item: node.item,
|
|
767
|
+
label: label(node.item),
|
|
768
|
+
level: node.level,
|
|
769
|
+
disabled: node.disabled,
|
|
770
|
+
branch: node.hasChildren,
|
|
771
|
+
loading: loading?.(node.item) === true,
|
|
772
|
+
match: filtered === undefined ? undefined : filtered.hits.has(node.key) ? 'hit' : 'ancestor',
|
|
773
|
+
offset,
|
|
774
|
+
children: [],
|
|
775
|
+
});
|
|
776
|
+
if (flat) {
|
|
777
|
+
const rows = this.visible();
|
|
778
|
+
const slice = this.slice();
|
|
779
|
+
if (slice === undefined)
|
|
780
|
+
return rows.map((node) => entry(node, undefined));
|
|
781
|
+
const inside = rows
|
|
782
|
+
.slice(slice.startIndex, slice.endIndex)
|
|
783
|
+
.map((node) => entry(node, undefined));
|
|
784
|
+
const pinned = [...slice.pinnedBefore, ...slice.pinnedAfter]
|
|
785
|
+
.map((index) => ({ index, node: rows[index] }))
|
|
786
|
+
.filter((row) => row.node !== undefined)
|
|
787
|
+
.map((row) => entry(row.node, row.index * this.itemSize()));
|
|
788
|
+
return [...pinned, ...inside];
|
|
789
|
+
}
|
|
790
|
+
const walk = (keys) => keys
|
|
791
|
+
.map((key) => held.nodeFor(key))
|
|
792
|
+
.filter((node) => node !== undefined)
|
|
793
|
+
.filter((node) => filtered === undefined || filtered.kept.has(node.key))
|
|
794
|
+
.map((node) => {
|
|
795
|
+
const row = entry(node, undefined);
|
|
796
|
+
if (node.hasChildren && this.isExpanded(node.key))
|
|
797
|
+
row.children = walk(node.children);
|
|
798
|
+
return row;
|
|
799
|
+
});
|
|
800
|
+
return walk(held.roots);
|
|
801
|
+
}, /* @ts-ignore */
|
|
802
|
+
...(ngDevMode ? [{ debugName: "plan" }] : /* istanbul ignore next */ []));
|
|
803
|
+
holdsNothing = computed(() => {
|
|
804
|
+
const held = this.collection();
|
|
805
|
+
if (held === undefined)
|
|
806
|
+
return false;
|
|
807
|
+
const filtered = this.filtered();
|
|
808
|
+
return held.nodes.length === 0 || (filtered !== undefined && filtered.kept.size === 0);
|
|
809
|
+
}, /* @ts-ignore */
|
|
810
|
+
...(ngDevMode ? [{ debugName: "holdsNothing" }] : /* istanbul ignore next */ []));
|
|
811
|
+
/* ── What every part reads ──────────────────────────────────────────── */
|
|
812
|
+
positions = computed(() => this.structureMode() === 'flat' ? this.collection() : undefined, /* @ts-ignore */
|
|
813
|
+
...(ngDevMode ? [{ debugName: "positions" }] : /* istanbul ignore next */ []));
|
|
814
|
+
indeterminateSet = computed(() => {
|
|
815
|
+
const held = this.collection();
|
|
816
|
+
if (this.selectionCascade() !== 'descendants' || held === undefined)
|
|
817
|
+
return new Set();
|
|
818
|
+
return new Set(indeterminateKeys(held, this.selected()));
|
|
819
|
+
}, /* @ts-ignore */
|
|
820
|
+
...(ngDevMode ? [{ debugName: "indeterminateSet" }] : /* istanbul ignore next */ []));
|
|
821
|
+
isSelected(key) {
|
|
822
|
+
return this.selected().includes(key);
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* A branch the reader opened, or one a query is holding open.
|
|
826
|
+
*
|
|
827
|
+
* A filter that asked for the expansion instead would move the reader's own
|
|
828
|
+
* set and have to put it back when the query emptied, and a reader who
|
|
829
|
+
* cleared a search would find branches open that they never opened. Holding
|
|
830
|
+
* the path open for as long as the query lasts keeps the set the reader owns
|
|
831
|
+
* untouched, and keeps `aria-expanded` telling the truth about what is on
|
|
832
|
+
* screen.
|
|
833
|
+
*/
|
|
834
|
+
isExpanded(key) {
|
|
835
|
+
if (this.expandedKeys().includes(key))
|
|
836
|
+
return true;
|
|
837
|
+
const filtered = this.filtered();
|
|
838
|
+
return filtered !== undefined && filtered.kept.has(key) && !filtered.hits.has(key);
|
|
839
|
+
}
|
|
840
|
+
isActive(key) {
|
|
841
|
+
return this.activeKey() === key;
|
|
842
|
+
}
|
|
843
|
+
isIndeterminate(key) {
|
|
844
|
+
return this.indeterminateSet().has(key);
|
|
845
|
+
}
|
|
846
|
+
holdsSelection(key) {
|
|
847
|
+
const held = this.collection();
|
|
848
|
+
if (held === undefined || this.isSelected(key))
|
|
849
|
+
return false;
|
|
850
|
+
return held.descendantsOf(key).some((child) => this.isSelected(child));
|
|
851
|
+
}
|
|
852
|
+
nodeId(key) {
|
|
853
|
+
return `${this.base}-node-${key}`;
|
|
854
|
+
}
|
|
855
|
+
labelId(key) {
|
|
856
|
+
return `${this.base}-label-${key}`;
|
|
857
|
+
}
|
|
858
|
+
nodeTabIndex(key) {
|
|
859
|
+
if (this.mode() === 'activedescendant')
|
|
860
|
+
return null;
|
|
861
|
+
if (this.activeKey() === null)
|
|
862
|
+
return -1;
|
|
863
|
+
return this.activeKey() === key ? 0 : -1;
|
|
864
|
+
}
|
|
865
|
+
levelOf(key) {
|
|
866
|
+
const node = this.positions()?.nodeFor(key);
|
|
867
|
+
return node === undefined ? null : node.level + 1;
|
|
868
|
+
}
|
|
869
|
+
setSizeOf(key) {
|
|
870
|
+
return this.positions()?.nodeFor(key)?.setSize ?? null;
|
|
871
|
+
}
|
|
872
|
+
posInSetOf(key) {
|
|
873
|
+
return this.positions()?.nodeFor(key)?.posInSet ?? null;
|
|
874
|
+
}
|
|
875
|
+
activeDescendant = computed(() => {
|
|
876
|
+
const key = this.activeKey();
|
|
877
|
+
return this.mode() === 'activedescendant' && key !== null ? this.nodeId(key) : null;
|
|
878
|
+
}, /* @ts-ignore */
|
|
879
|
+
...(ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []));
|
|
880
|
+
canvasTabIndex = computed(() => this.mode() === 'activedescendant' || this.activeKey() === null ? 0 : -1, /* @ts-ignore */
|
|
881
|
+
...(ngDevMode ? [{ debugName: "canvasTabIndex" }] : /* istanbul ignore next */ []));
|
|
882
|
+
/* ── The rows, read from the DOM ────────────────────────────────────── */
|
|
883
|
+
canvas() {
|
|
884
|
+
return this.host.nativeElement.querySelector("[data-part='canvas']");
|
|
885
|
+
}
|
|
886
|
+
readRows() {
|
|
887
|
+
const canvas = this.canvas();
|
|
888
|
+
if (canvas === null)
|
|
889
|
+
return [];
|
|
890
|
+
return [...canvas.querySelectorAll(NODE_SELECTOR)].map((element) => ({
|
|
891
|
+
key: element.dataset['key'] ?? '',
|
|
892
|
+
depth: Number(element.dataset['depth'] ?? 0),
|
|
893
|
+
branch: element.dataset['branch'] !== undefined,
|
|
894
|
+
disabled: element.getAttribute('aria-disabled') === 'true',
|
|
895
|
+
label: element.dataset['textValue'] ??
|
|
896
|
+
element.querySelector("[data-part='label']")?.textContent?.trim() ??
|
|
897
|
+
'',
|
|
898
|
+
element,
|
|
899
|
+
}));
|
|
900
|
+
}
|
|
901
|
+
parentOf(rows, index) {
|
|
902
|
+
const depth = rows[index]?.depth ?? 0;
|
|
903
|
+
for (let step = index - 1; step >= 0; step -= 1) {
|
|
904
|
+
if (rows[step].depth < depth)
|
|
905
|
+
return step;
|
|
906
|
+
}
|
|
907
|
+
return -1;
|
|
908
|
+
}
|
|
909
|
+
renderedDescendants(rows, index) {
|
|
910
|
+
const depth = rows[index]?.depth ?? 0;
|
|
911
|
+
const held = [];
|
|
912
|
+
for (let step = index + 1; step < rows.length; step += 1) {
|
|
913
|
+
const row = rows[step];
|
|
914
|
+
if (row.depth <= depth)
|
|
915
|
+
break;
|
|
916
|
+
held.push(row.key);
|
|
917
|
+
}
|
|
918
|
+
return held;
|
|
919
|
+
}
|
|
920
|
+
/* ── Moving the three values ────────────────────────────────────────── */
|
|
921
|
+
anchor = undefined;
|
|
922
|
+
requestValue(keys, reason, source) {
|
|
923
|
+
const outward = (held) => this.selection() === 'multiple' ? held : (held[0] ?? null);
|
|
924
|
+
let cancelled = false;
|
|
925
|
+
const state = createControllable({
|
|
926
|
+
initial: this.selected(),
|
|
927
|
+
equals: same,
|
|
928
|
+
onRequest: (request) => {
|
|
929
|
+
const outwardRequest = {
|
|
930
|
+
value: outward(request.value),
|
|
931
|
+
previous: outward(request.previous),
|
|
932
|
+
reason: request.reason,
|
|
933
|
+
source: request.source,
|
|
934
|
+
get cancelled() {
|
|
935
|
+
return request.cancelled;
|
|
936
|
+
},
|
|
937
|
+
cancel: () => request.cancel(),
|
|
938
|
+
};
|
|
939
|
+
this.valueRequest.emit(outwardRequest);
|
|
940
|
+
cancelled = request.cancelled;
|
|
941
|
+
},
|
|
942
|
+
});
|
|
943
|
+
state.request(keys, reason, source);
|
|
944
|
+
if (cancelled)
|
|
945
|
+
return;
|
|
946
|
+
this.value.set(outward(keys));
|
|
947
|
+
this.onChange(outward(keys));
|
|
948
|
+
this.onTouched();
|
|
949
|
+
}
|
|
950
|
+
requestExpanded(keys, reason, source) {
|
|
951
|
+
let cancelled = false;
|
|
952
|
+
const state = createControllable({
|
|
953
|
+
initial: this.expandedKeys(),
|
|
954
|
+
equals: same,
|
|
955
|
+
onRequest: (request) => {
|
|
956
|
+
this.expandedKeysRequest.emit(request);
|
|
957
|
+
cancelled = request.cancelled;
|
|
958
|
+
},
|
|
959
|
+
});
|
|
960
|
+
state.request(keys, reason, source);
|
|
961
|
+
if (!cancelled)
|
|
962
|
+
this.expandedKeys.set(keys);
|
|
963
|
+
}
|
|
964
|
+
requestActive(key, reason, source) {
|
|
965
|
+
let cancelled = false;
|
|
966
|
+
const state = createControllable({
|
|
967
|
+
initial: this.activeKey(),
|
|
968
|
+
onRequest: (request) => {
|
|
969
|
+
this.activeKeyRequest.emit(request);
|
|
970
|
+
cancelled = request.cancelled;
|
|
971
|
+
},
|
|
972
|
+
});
|
|
973
|
+
state.request(key, reason, source);
|
|
974
|
+
if (!cancelled)
|
|
975
|
+
this.activeKey.set(key);
|
|
976
|
+
}
|
|
977
|
+
setExpanded(key, open, reason, source) {
|
|
978
|
+
const held = this.expandedKeys();
|
|
979
|
+
if (held.includes(key) === open)
|
|
980
|
+
return;
|
|
981
|
+
const next = open ? [...held, key] : held.filter((candidate) => candidate !== key);
|
|
982
|
+
/* Closing a branch that holds the active node moves the active node to the
|
|
983
|
+
branch, and that request goes out first: a consumer that accepts one and
|
|
984
|
+
refuses the other is left with a coherent pair, where the reverse order
|
|
985
|
+
would strand the keyboard on an element the next render removes. */
|
|
986
|
+
const active = this.activeKey();
|
|
987
|
+
if (!open && active !== null && active !== key) {
|
|
988
|
+
const rows = this.readRows();
|
|
989
|
+
const index = rows.findIndex((row) => row.key === key);
|
|
990
|
+
if (index !== -1 && this.renderedDescendants(rows, index).includes(active)) {
|
|
991
|
+
this.requestActive(key, reason === 'programmatic' ? 'programmatic' : reason, source);
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
this.requestExpanded(next, reason, source);
|
|
995
|
+
}
|
|
996
|
+
applySelection(key, event, intent, reason) {
|
|
997
|
+
if (this.selection() === 'none' || this.readOnly())
|
|
998
|
+
return;
|
|
999
|
+
const held = this.collection();
|
|
1000
|
+
const rows = this.readRows();
|
|
1001
|
+
if (this.selectionCascade() === 'descendants' &&
|
|
1002
|
+
held !== undefined &&
|
|
1003
|
+
(intent === 'toggle' || intent === 'replace')) {
|
|
1004
|
+
const result = cascadeSelection({
|
|
1005
|
+
collection: held,
|
|
1006
|
+
selected: this.selected(),
|
|
1007
|
+
key,
|
|
1008
|
+
action: 'toggle',
|
|
1009
|
+
});
|
|
1010
|
+
if (result.changed)
|
|
1011
|
+
this.requestValue(result.selected, reason, event);
|
|
1012
|
+
return;
|
|
1013
|
+
}
|
|
1014
|
+
const result = nextSelection({
|
|
1015
|
+
action: intent,
|
|
1016
|
+
mode: this.selection(),
|
|
1017
|
+
behavior: this.selectionBehavior(),
|
|
1018
|
+
selected: this.selected(),
|
|
1019
|
+
keys: rows.filter((row) => !row.disabled).map((row) => row.key),
|
|
1020
|
+
key,
|
|
1021
|
+
anchor: this.anchor ?? key,
|
|
1022
|
+
disabled: (candidate) => rows.find((row) => row.key === candidate)?.disabled === true,
|
|
1023
|
+
disallowEmpty: this.disallowEmptySelection(),
|
|
1024
|
+
disallowSelectAll: this.disallowSelectAll(),
|
|
1025
|
+
});
|
|
1026
|
+
this.anchor = result.anchor;
|
|
1027
|
+
if (result.changed)
|
|
1028
|
+
this.requestValue(result.selected, reason, event);
|
|
1029
|
+
}
|
|
1030
|
+
/* ── The pointer ────────────────────────────────────────────────────── */
|
|
1031
|
+
press(key, event) {
|
|
1032
|
+
if (this.treeDisabled())
|
|
1033
|
+
return;
|
|
1034
|
+
const rows = this.readRows();
|
|
1035
|
+
const row = rows.find((candidate) => candidate.key === key);
|
|
1036
|
+
if (row === undefined || row.disabled)
|
|
1037
|
+
return;
|
|
1038
|
+
this.requestActive(key, 'pointer', event);
|
|
1039
|
+
if (row.branch && this.expandOn() === 'row') {
|
|
1040
|
+
this.setExpanded(key, !this.isExpanded(key), 'pointer', event);
|
|
1041
|
+
}
|
|
1042
|
+
if (this.selection() !== 'none') {
|
|
1043
|
+
const intent = event.shiftKey
|
|
1044
|
+
? 'range'
|
|
1045
|
+
: event.ctrlKey || event.metaKey
|
|
1046
|
+
? 'toggle'
|
|
1047
|
+
: this.selectionBehavior() === 'replace'
|
|
1048
|
+
? 'replace'
|
|
1049
|
+
: 'toggle';
|
|
1050
|
+
this.applySelection(key, event, intent, 'pointer');
|
|
1051
|
+
}
|
|
1052
|
+
this.nodeActivate.emit({ key, reason: 'pointer' });
|
|
1053
|
+
}
|
|
1054
|
+
pressExpander(key, event) {
|
|
1055
|
+
if (this.treeDisabled())
|
|
1056
|
+
return;
|
|
1057
|
+
this.requestActive(key, 'pointer', event);
|
|
1058
|
+
this.setExpanded(key, !this.isExpanded(key), 'pointer', event);
|
|
1059
|
+
}
|
|
1060
|
+
pressIndicator(key, event) {
|
|
1061
|
+
if (this.treeDisabled())
|
|
1062
|
+
return;
|
|
1063
|
+
this.requestActive(key, 'pointer', event);
|
|
1064
|
+
this.applySelection(key, event, 'toggle', 'pointer');
|
|
1065
|
+
}
|
|
1066
|
+
/* ── The keyboard ───────────────────────────────────────────────────── */
|
|
1067
|
+
moveTo(rows, index, event) {
|
|
1068
|
+
const row = rows[index];
|
|
1069
|
+
if (row === undefined)
|
|
1070
|
+
return;
|
|
1071
|
+
this.requestActive(row.key, 'keyboard', event);
|
|
1072
|
+
row.element.focus();
|
|
1073
|
+
if (this.selectOnFocus())
|
|
1074
|
+
this.applySelection(row.key, event, 'replace', 'keyboard');
|
|
1075
|
+
}
|
|
1076
|
+
move(rows, intent, event) {
|
|
1077
|
+
const next = moveIndex({
|
|
1078
|
+
enabled: rows.map((row) => this.navigateDisabled() || !row.disabled),
|
|
1079
|
+
from: rows.findIndex((row) => row.key === this.activeKey()),
|
|
1080
|
+
intent,
|
|
1081
|
+
loop: this.loop(),
|
|
1082
|
+
page: this.pageSize(),
|
|
1083
|
+
});
|
|
1084
|
+
if (next !== -1)
|
|
1085
|
+
this.moveTo(rows, next, event);
|
|
1086
|
+
}
|
|
1087
|
+
onKeyDown(event) {
|
|
1088
|
+
if (event.defaultPrevented || this.treeDisabled())
|
|
1089
|
+
return;
|
|
1090
|
+
/* Arrow navigation stands down while focus is inside a control the reader
|
|
1091
|
+
is typing in, which is what makes an inline rename composable. */
|
|
1092
|
+
const target = event.target;
|
|
1093
|
+
if (target.closest('input, textarea, [contenteditable="true"]') !== null)
|
|
1094
|
+
return;
|
|
1095
|
+
const rows = this.readRows();
|
|
1096
|
+
if (rows.length === 0)
|
|
1097
|
+
return;
|
|
1098
|
+
const index = rows.findIndex((row) => row.key === this.activeKey());
|
|
1099
|
+
const row = index === -1 ? undefined : rows[index];
|
|
1100
|
+
const canvas = this.canvas();
|
|
1101
|
+
const rtl = canvas !== null && getComputedStyle(canvas).direction === 'rtl';
|
|
1102
|
+
const forward = rtl ? 'ArrowLeft' : 'ArrowRight';
|
|
1103
|
+
const backward = rtl ? 'ArrowRight' : 'ArrowLeft';
|
|
1104
|
+
const take = () => {
|
|
1105
|
+
event.preventDefault();
|
|
1106
|
+
event.stopPropagation();
|
|
1107
|
+
};
|
|
1108
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
1109
|
+
take();
|
|
1110
|
+
const intent = event.key === 'ArrowDown' ? 'next' : 'previous';
|
|
1111
|
+
if (event.shiftKey && this.selection() === 'multiple') {
|
|
1112
|
+
const next = moveIndex({
|
|
1113
|
+
enabled: rows.map((candidate) => this.navigateDisabled() || !candidate.disabled),
|
|
1114
|
+
from: index,
|
|
1115
|
+
intent,
|
|
1116
|
+
loop: this.loop(),
|
|
1117
|
+
});
|
|
1118
|
+
if (next !== -1) {
|
|
1119
|
+
this.moveTo(rows, next, event);
|
|
1120
|
+
this.applySelection(rows[next].key, event, 'toggle', 'keyboard');
|
|
1121
|
+
}
|
|
1122
|
+
return;
|
|
1123
|
+
}
|
|
1124
|
+
this.move(rows, intent, event);
|
|
1125
|
+
return;
|
|
1126
|
+
}
|
|
1127
|
+
if (event.key === 'Home' || event.key === 'End') {
|
|
1128
|
+
take();
|
|
1129
|
+
const edge = event.key === 'Home' ? 0 : rows.length - 1;
|
|
1130
|
+
if (event.ctrlKey && event.shiftKey && row !== undefined) {
|
|
1131
|
+
this.anchor = rows[edge].key;
|
|
1132
|
+
this.applySelection(row.key, event, 'range', 'keyboard');
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
this.move(rows, event.key === 'Home' ? 'first' : 'last', event);
|
|
1136
|
+
return;
|
|
1137
|
+
}
|
|
1138
|
+
if (event.key === 'PageDown' || event.key === 'PageUp') {
|
|
1139
|
+
take();
|
|
1140
|
+
this.move(rows, event.key === 'PageDown' ? 'pageDown' : 'pageUp', event);
|
|
1141
|
+
return;
|
|
1142
|
+
}
|
|
1143
|
+
if (event.key === forward) {
|
|
1144
|
+
take();
|
|
1145
|
+
if (row === undefined || !row.branch)
|
|
1146
|
+
return;
|
|
1147
|
+
if (!this.isExpanded(row.key)) {
|
|
1148
|
+
this.setExpanded(row.key, true, 'keyboard', event);
|
|
1149
|
+
return;
|
|
1150
|
+
}
|
|
1151
|
+
if (index + 1 < rows.length && rows[index + 1].depth > row.depth) {
|
|
1152
|
+
this.moveTo(rows, index + 1, event);
|
|
1153
|
+
}
|
|
1154
|
+
return;
|
|
1155
|
+
}
|
|
1156
|
+
if (event.key === backward) {
|
|
1157
|
+
take();
|
|
1158
|
+
if (row === undefined)
|
|
1159
|
+
return;
|
|
1160
|
+
if (row.branch && this.isExpanded(row.key)) {
|
|
1161
|
+
this.setExpanded(row.key, false, 'keyboard', event);
|
|
1162
|
+
return;
|
|
1163
|
+
}
|
|
1164
|
+
const parent = this.parentOf(rows, index);
|
|
1165
|
+
if (parent !== -1)
|
|
1166
|
+
this.moveTo(rows, parent, event);
|
|
1167
|
+
return;
|
|
1168
|
+
}
|
|
1169
|
+
if (event.key === 'Enter') {
|
|
1170
|
+
take();
|
|
1171
|
+
if (row === undefined)
|
|
1172
|
+
return;
|
|
1173
|
+
if (row.branch && this.expandOn() === 'row') {
|
|
1174
|
+
this.setExpanded(row.key, !this.isExpanded(row.key), 'keyboard', event);
|
|
1175
|
+
}
|
|
1176
|
+
if (this.selection() !== 'none')
|
|
1177
|
+
this.applySelection(row.key, event, 'replace', 'keyboard');
|
|
1178
|
+
this.nodeActivate.emit({ key: row.key, reason: 'keyboard' });
|
|
1179
|
+
return;
|
|
1180
|
+
}
|
|
1181
|
+
if (event.key === ' ') {
|
|
1182
|
+
take();
|
|
1183
|
+
if (row === undefined)
|
|
1184
|
+
return;
|
|
1185
|
+
this.applySelection(row.key, event, event.shiftKey ? 'range' : 'toggle', 'keyboard');
|
|
1186
|
+
return;
|
|
1187
|
+
}
|
|
1188
|
+
if ((event.key === 'a' || event.key === 'A') && (event.ctrlKey || event.metaKey)) {
|
|
1189
|
+
take();
|
|
1190
|
+
this.applySelection(row?.key ?? '', event, 'all', 'keyboard');
|
|
1191
|
+
return;
|
|
1192
|
+
}
|
|
1193
|
+
if (event.key === '*') {
|
|
1194
|
+
take();
|
|
1195
|
+
if (row === undefined)
|
|
1196
|
+
return;
|
|
1197
|
+
const parent = this.parentOf(rows, index);
|
|
1198
|
+
const siblings = rows
|
|
1199
|
+
.filter((candidate, step) => candidate.depth === row.depth && this.parentOf(rows, step) === parent)
|
|
1200
|
+
.filter((candidate) => candidate.branch)
|
|
1201
|
+
.map((candidate) => candidate.key);
|
|
1202
|
+
const next = [...new Set([...this.expandedKeys(), ...siblings])];
|
|
1203
|
+
if (!same(next, this.expandedKeys()))
|
|
1204
|
+
this.requestExpanded(next, 'keyboard', event);
|
|
1205
|
+
return;
|
|
1206
|
+
}
|
|
1207
|
+
if (!this.typeahead() || !isPrintable(event.key) || event.ctrlKey || event.metaKey)
|
|
1208
|
+
return;
|
|
1209
|
+
const match = this.typeaheadHandle.match(event.key, rows.map((candidate) => candidate.label), index);
|
|
1210
|
+
if (match === -1)
|
|
1211
|
+
return;
|
|
1212
|
+
take();
|
|
1213
|
+
this.moveTo(rows, match, event);
|
|
1214
|
+
}
|
|
1215
|
+
onFocusIn(event) {
|
|
1216
|
+
if (event.target !== this.canvas() || this.mode() === 'activedescendant')
|
|
1217
|
+
return;
|
|
1218
|
+
const rows = this.readRows();
|
|
1219
|
+
/* The pattern: the selected node when there is one, otherwise the first. */
|
|
1220
|
+
const wanted = rows.find((row) => this.isSelected(row.key) && !row.disabled) ??
|
|
1221
|
+
rows.find((row) => !row.disabled);
|
|
1222
|
+
if (wanted === undefined)
|
|
1223
|
+
return;
|
|
1224
|
+
this.requestActive(wanted.key, 'keyboard', event);
|
|
1225
|
+
wanted.element.focus();
|
|
1226
|
+
}
|
|
1227
|
+
/* ── The imperative surface ─────────────────────────────────────────── */
|
|
1228
|
+
focus() {
|
|
1229
|
+
const rows = this.readRows();
|
|
1230
|
+
const wanted = rows.find((row) => row.key === this.activeKey()) ?? rows[0];
|
|
1231
|
+
(wanted?.element ?? this.canvas())?.focus();
|
|
1232
|
+
}
|
|
1233
|
+
expand(key) {
|
|
1234
|
+
const held = this.collection();
|
|
1235
|
+
const path = held === undefined ? [] : held.ancestorsOf(key);
|
|
1236
|
+
const next = [...new Set([...this.expandedKeys(), ...path, key])];
|
|
1237
|
+
if (!same(next, this.expandedKeys()))
|
|
1238
|
+
this.requestExpanded(next, 'programmatic', undefined);
|
|
1239
|
+
}
|
|
1240
|
+
collapse(key) {
|
|
1241
|
+
this.setExpanded(key, false, 'programmatic', undefined);
|
|
1242
|
+
}
|
|
1243
|
+
expandAll() {
|
|
1244
|
+
const held = this.collection();
|
|
1245
|
+
if (held === undefined)
|
|
1246
|
+
return;
|
|
1247
|
+
this.requestExpanded(held.branchKeys, 'programmatic', undefined);
|
|
1248
|
+
}
|
|
1249
|
+
collapseAll() {
|
|
1250
|
+
this.requestExpanded([], 'programmatic', undefined);
|
|
1251
|
+
}
|
|
1252
|
+
scrollToKey(key, align = 'nearest') {
|
|
1253
|
+
this.expand(key);
|
|
1254
|
+
const row = this.readRows().find((candidate) => candidate.key === key);
|
|
1255
|
+
row?.element.scrollIntoView({ block: align === 'nearest' ? 'nearest' : align });
|
|
1256
|
+
}
|
|
1257
|
+
/* ── Reactive Forms ─────────────────────────────────────────────────── */
|
|
1258
|
+
formDisabled = signal(false, /* @ts-ignore */
|
|
1259
|
+
...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
|
|
1260
|
+
onChange = () => { };
|
|
1261
|
+
onTouched = () => { };
|
|
1262
|
+
writeValue(value) {
|
|
1263
|
+
this.value.set(value ?? null);
|
|
1264
|
+
}
|
|
1265
|
+
registerOnChange(fn) {
|
|
1266
|
+
this.onChange = fn;
|
|
1267
|
+
}
|
|
1268
|
+
registerOnTouched(fn) {
|
|
1269
|
+
this.onTouched = fn;
|
|
1270
|
+
}
|
|
1271
|
+
setDisabledState(state) {
|
|
1272
|
+
this.formDisabled.set(state);
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* The family owns validity only for `required`, which is the one rule it can
|
|
1276
|
+
* decide from the value alone: everything else about a hierarchy is the
|
|
1277
|
+
* consumer's own.
|
|
1278
|
+
*/
|
|
1279
|
+
validate(control) {
|
|
1280
|
+
if (!this.required())
|
|
1281
|
+
return null;
|
|
1282
|
+
return toKeys(control.value).length === 0 ? { required: true } : null;
|
|
1283
|
+
}
|
|
1284
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTree, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1285
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlTree, isStandalone: true, selector: "[slTree]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, expandedKeys: { classPropertyName: "expandedKeys", publicName: "expandedKeys", isSignal: true, isRequired: false, transformFunction: null }, activeKey: { classPropertyName: "activeKey", publicName: "activeKey", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, structure: { classPropertyName: "structure", publicName: "structure", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selectionBehavior: { classPropertyName: "selectionBehavior", publicName: "selectionBehavior", isSignal: true, isRequired: false, transformFunction: null }, selectionIndicator: { classPropertyName: "selectionIndicator", publicName: "selectionIndicator", isSignal: true, isRequired: false, transformFunction: null }, selectionCascade: { classPropertyName: "selectionCascade", publicName: "selectionCascade", isSignal: true, isRequired: false, transformFunction: null }, expandOn: { classPropertyName: "expandOn", publicName: "expandOn", isSignal: true, isRequired: false, transformFunction: null }, focusMode: { classPropertyName: "focusMode", publicName: "focusMode", isSignal: true, isRequired: false, transformFunction: null }, guides: { classPropertyName: "guides", publicName: "guides", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: true, isRequired: false, transformFunction: null }, typeaheadTimeout: { classPropertyName: "typeaheadTimeout", publicName: "typeaheadTimeout", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, navigateDisabled: { classPropertyName: "navigateDisabled", publicName: "navigateDisabled", isSignal: true, isRequired: false, transformFunction: null }, disallowEmptySelection: { classPropertyName: "disallowEmptySelection", publicName: "disallowEmptySelection", isSignal: true, isRequired: false, transformFunction: null }, disallowSelectAll: { classPropertyName: "disallowSelectAll", publicName: "disallowSelectAll", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, virtual: { classPropertyName: "virtual", publicName: "virtual", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, overscan: { classPropertyName: "overscan", publicName: "overscan", 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 }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, getKey: { classPropertyName: "getKey", publicName: "getKey", isSignal: true, isRequired: false, transformFunction: null }, getLabel: { classPropertyName: "getLabel", publicName: "getLabel", isSignal: true, isRequired: false, transformFunction: null }, getChildren: { classPropertyName: "getChildren", publicName: "getChildren", isSignal: true, isRequired: false, transformFunction: null }, getLevel: { classPropertyName: "getLevel", publicName: "getLevel", isSignal: true, isRequired: false, transformFunction: null }, hasChildren: { classPropertyName: "hasChildren", publicName: "hasChildren", isSignal: true, isRequired: false, transformFunction: null }, getChildrenCount: { classPropertyName: "getChildrenCount", publicName: "getChildrenCount", isSignal: true, isRequired: false, transformFunction: null }, isNodeDisabled: { classPropertyName: "isNodeDisabled", publicName: "isNodeDisabled", isSignal: true, isRequired: false, transformFunction: null }, isNodeLoading: { classPropertyName: "isNodeLoading", publicName: "isNodeLoading", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", expandedKeys: "expandedKeysChange", activeKey: "activeKeyChange", valueRequest: "valueRequest", expandedKeysRequest: "expandedKeysRequest", activeKeyRequest: "activeKeyRequest", nodeActivate: "nodeActivate" }, host: { attributes: { "data-ui": "tree", "data-part": "root" }, listeners: { "scroll": "onScroll()" }, properties: { "attr.data-size": "size()", "attr.data-variant": "variant()", "attr.data-structure": "structureMode()", "attr.data-indicator": "indicatorMode()", "attr.data-expand-on": "expandOnRow()", "attr.data-selection": "selection()", "attr.data-focus-mode": "mode()", "attr.data-guides": "showGuides() ? \"true\" : \"false\"", "attr.data-disabled": "treeDisabled() ? \"\" : null", "attr.data-readonly": "readOnly() ? \"\" : null", "attr.data-invalid": "invalid() ? \"\" : null", "attr.data-required": "required() ? \"\" : null", "attr.data-loading": "loading() ? \"\" : null" } }, providers: [
|
|
1286
|
+
{ provide: SlTreeContext, useExisting: forwardRef(() => SlTree) },
|
|
1287
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SlTree), multi: true },
|
|
1288
|
+
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => SlTree), multi: true },
|
|
1289
|
+
], queries: [{ propertyName: "nodeContent", first: true, predicate: ["slTreeNodeContent"], descendants: true, isSignal: true }], exportAs: ["slTree"], ngImport: i0, template: `<ul
|
|
1290
|
+
data-part="canvas"
|
|
1291
|
+
role="tree"
|
|
1292
|
+
#canvas
|
|
1293
|
+
[attr.aria-label]="ariaLabel()"
|
|
1294
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1295
|
+
[attr.aria-multiselectable]="selection() === 'multiple' ? 'true' : null"
|
|
1296
|
+
[attr.aria-activedescendant]="activeDescendant()"
|
|
1297
|
+
[attr.aria-busy]="loading() ? 'true' : null"
|
|
1298
|
+
[attr.aria-disabled]="treeDisabled() ? 'true' : null"
|
|
1299
|
+
[attr.aria-invalid]="invalid() ? 'true' : null"
|
|
1300
|
+
[attr.aria-required]="required() ? 'true' : null"
|
|
1301
|
+
[attr.tabindex]="canvasTabIndex()"
|
|
1302
|
+
[style.--_canvas-size]="canvasSize()"
|
|
1303
|
+
[style.--_canvas-offset]="canvasOffset()"
|
|
1304
|
+
(keydown)="onKeyDown($event)"
|
|
1305
|
+
(focusin)="onFocusIn($event)"
|
|
1306
|
+
>
|
|
1307
|
+
@if (plan(); as rows) {
|
|
1308
|
+
@for (node of rows; track node.key) {
|
|
1309
|
+
<ng-container
|
|
1310
|
+
[ngTemplateOutlet]="nodeRow"
|
|
1311
|
+
[ngTemplateOutletContext]="{ $implicit: node }"
|
|
1312
|
+
/>
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
<ng-content />
|
|
1316
|
+
</ul>
|
|
1317
|
+
@if (holdsNothing()) {
|
|
1318
|
+
<ng-content select="[slTreeEmpty]" />
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
<ng-template #nodeRow let-node>
|
|
1322
|
+
<li
|
|
1323
|
+
slTreeNode
|
|
1324
|
+
[value]="node.key"
|
|
1325
|
+
[label]="node.label"
|
|
1326
|
+
[level]="node.level"
|
|
1327
|
+
[hasChildren]="node.branch"
|
|
1328
|
+
[disabled]="node.disabled"
|
|
1329
|
+
[loading]="node.loading"
|
|
1330
|
+
[match]="node.match"
|
|
1331
|
+
[textValue]="node.label"
|
|
1332
|
+
[pinned]="node.offset !== undefined"
|
|
1333
|
+
[offset]="node.offset"
|
|
1334
|
+
>
|
|
1335
|
+
@if (nodeContent(); as content) {
|
|
1336
|
+
<ng-container
|
|
1337
|
+
[ngTemplateOutlet]="content"
|
|
1338
|
+
[ngTemplateOutletContext]="{ $implicit: node.item, key: node.key }"
|
|
1339
|
+
/>
|
|
1340
|
+
}
|
|
1341
|
+
@if (node.children.length > 0) {
|
|
1342
|
+
<ul slTreeGroup [busy]="node.loading">
|
|
1343
|
+
@for (child of node.children; track child.key) {
|
|
1344
|
+
<ng-container
|
|
1345
|
+
[ngTemplateOutlet]="nodeRow"
|
|
1346
|
+
[ngTemplateOutletContext]="{ $implicit: child }"
|
|
1347
|
+
/>
|
|
1348
|
+
}
|
|
1349
|
+
</ul>
|
|
1350
|
+
}
|
|
1351
|
+
</li>
|
|
1352
|
+
</ng-template>`, isInline: true, styles: ["@layer slotted.components{[data-ui=tree]{--_surface: var(--slotted-tree-surface, var(--slotted-surface, #ffffff));--_text: var(--slotted-tree-text, var(--slotted-text, #0f172a));--_muted: var(--slotted-tree-text-muted, var(--slotted-text-muted, #5b6b7f));--_border-color: var(--slotted-tree-border-color, var(--slotted-control-border-color));--_border-width: var(--slotted-border-width-thin, 1px);--_radius: var(--slotted-tree-radius, var(--slotted-radius-md, 6px));--_shadow: var(--slotted-tree-shadow, var(--slotted-control-shadow));--_highlight: var(--slotted-tree-highlight, var(--slotted-tone-secondary-subtle-hover));--_highlight-active: var( --slotted-tree-highlight-active, var(--slotted-tone-secondary-subtle-active) );--_selected-surface: var(--slotted-tree-selected-surface, var(--slotted-tone-accent-surface));--_selected-text: var(--slotted-tree-selected-text, var(--slotted-tone-accent-text));--_selected-edge: var(--slotted-tree-selected-edge, var(--slotted-tone-accent-border));--_guide-color: var( --slotted-tree-guide-color, color-mix(in oklab, var(--slotted-border-strong) 60%, var(--slotted-border-subtle)) );--_indent: var( --slotted-tree-indent, calc(var(--_icon-size) / 2 + var(--slotted-space-4, .5rem)) );--_inset-block: var(--slotted-tree-padding-block, var(--slotted-space-2, .25rem));--_inset-inline: var(--slotted-tree-padding-inline, var(--slotted-space-2, .25rem));--_row-inset: var(--slotted-control-padding-inline-md, .8125rem);--_row-height: var(--slotted-control-height-md, 34px);--_font-size: var(--slotted-control-font-size-md, 13px);--_secondary-font-size: var(--slotted-control-font-size-sm, 12px);--_icon-size: var(--slotted-control-icon-size-md, 16px);--_gap: var(--slotted-control-gap-md, .5rem);--_check-size: var(--slotted-selection-size-md, 16px);--_rows: var(--slotted-tree-rows, 12);--_measure: var(--slotted-tree-measure, 28rem);box-sizing:border-box;color:var(--_text);container-name:slotted-tree;container-type:inline-size;display:block;font-family:var(--slotted-font-family-sans);font-size:var(--_font-size);inline-size:100%;max-inline-size:var(--_measure);text-align:start}[data-ui=tree][data-size=sm]{--_row-inset: var(--slotted-control-padding-inline-sm, .625rem);--_row-height: var(--slotted-control-height-sm, 30px);--_font-size: var(--slotted-control-font-size-sm, 12px);--_secondary-font-size: var(--slotted-font-size-xs, .75rem);--_icon-size: var(--slotted-control-icon-size-sm, 14px);--_gap: var(--slotted-control-gap-sm, .375rem);--_check-size: var(--slotted-selection-size-sm, 14px)}[data-ui=tree][data-size=lg]{--_row-inset: var(--slotted-control-padding-inline-lg, 1rem);--_row-height: var(--slotted-control-height-lg, 38px);--_font-size: var(--slotted-control-font-size-lg, 14px);--_secondary-font-size: var(--slotted-control-font-size-md, 13px);--_icon-size: var(--slotted-control-icon-size-lg, 18px);--_gap: var(--slotted-control-gap-lg, .5rem);--_check-size: var(--slotted-selection-size-lg, 18px)}[data-ui=tree][data-variant=framed]{background-color:var(--_surface);border:var(--_border-width) solid var(--_border-color);border-radius:var(--_radius);box-shadow:var(--_shadow)}[data-ui=tree] [data-part=canvas]{max-block-size:calc(var(--_rows) * var(--_row-height) + 2 * var(--_inset-block));outline:none;overflow:auto;padding-block:var(--_inset-block);padding-inline:0}[data-ui=tree] :is([data-part=canvas],[data-part=group]){list-style:none;margin-block:0;margin-inline:0;padding-inline:0}[data-ui=tree] [data-part=group]{padding-block:0;padding-inline:0}[data-ui=tree] [data-part=node]{display:block;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;outline:none}[data-ui=tree] [data-part=row]{align-items:center;background-color:transparent;color:inherit;cursor:pointer;display:flex;min-block-size:var(--_row-height);outline:none;padding-block:0;padding-inline:calc(var(--_inset-inline) + var(--slotted-tree-depth, 0) * var(--_indent)) var(--_row-inset);position:relative;transition:background-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard)),color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard));-webkit-user-select:none;user-select:none}[data-ui=tree] [data-part=guide]{background-image:repeating-linear-gradient(to right,var(--_guide-color) 0 var(--_border-width),transparent var(--_border-width) var(--_indent));inline-size:calc(var(--slotted-tree-depth, 0) * var(--_indent));inset-block:0;inset-inline-start:calc(var(--_inset-inline) + var(--_icon-size) / 2);pointer-events:none;position:absolute}[data-ui=tree] [data-part=guide]:dir(rtl){background-image:repeating-linear-gradient(to left,var(--_guide-color) 0 var(--_border-width),transparent var(--_border-width) var(--_indent))}[data-ui=tree][data-guides=false] [data-part=guide]{background-image:none}[data-ui=tree] [data-part=expander]{--slotted-icon-size: var(--_icon-size);block-size:var(--_icon-size);color:var(--_muted);display:flex;flex:none;inline-size:var(--_icon-size);margin-inline-end:var(--_gap)}[data-ui=tree] [data-part=expander]>[data-ui=icon]{transition:rotate var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard))}[data-ui=tree] [data-part=expander]:dir(rtl)>[data-ui=icon]{rotate:180deg}[data-ui=tree] [data-part=node][data-expanded]>[data-part=row] [data-part=expander]>[data-ui=icon]{rotate:90deg}[data-ui=tree][data-expand-on=expander] [data-part=node][data-branch]>[data-part=row] [data-part=expander]{box-sizing:content-box;cursor:pointer;margin-block:calc((var(--slotted-target-min, 24px) - var(--_icon-size)) / -2);margin-inline-end:calc(var(--_gap) - (var(--slotted-target-min, 24px) - var(--_icon-size)) / 2);margin-inline-start:calc((var(--slotted-target-min, 24px) - var(--_icon-size)) / -2);padding-block:calc((var(--slotted-target-min, 24px) - var(--_icon-size)) / 2);padding-inline:calc((var(--slotted-target-min, 24px) - var(--_icon-size)) / 2)}[data-ui=tree][data-selection=none][data-expand-on=expander] [data-part=row],[data-ui=tree][data-selection=none] [data-part=node]:not([data-branch])>[data-part=row]{cursor:default}[data-ui=tree][data-readonly] [data-part=row]{cursor:default}[data-ui=tree] [data-part=indicator]{--_mark-inset: var(--slotted-tree-mark-inset, 2px);--_check-border: var(--slotted-border-width-medium, 1.5px);--_mark-size: calc(var(--_check-size) - 2 * var(--_mark-inset));--slotted-icon-size: var(--_mark-size);background-color:var(--_surface);block-size:var(--_check-size);border:var(--_check-border) solid var(--slotted-border-strong);border-radius:var(--slotted-radius-xs, 2px);box-sizing:border-box;cursor:pointer;flex:none;inline-size:var(--_check-size);margin-inline-end:var(--_gap);position:relative;transition:background-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard)),border-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard))}[data-ui=tree] [data-part=indicator]>[data-ui=icon]{clip-path:inset(0% 100% 0% 0%);color:var(--slotted-tone-accent-on-solid);inset-block-start:calc(var(--_mark-inset) - var(--_check-border));inset-inline-start:calc(var(--_mark-inset) - var(--_check-border));opacity:0;pointer-events:none;position:absolute;transition:clip-path var(--slotted-duration-medium) var(--slotted-control-transition-easing, var(--slotted-easing-standard)),opacity var(--slotted-duration-medium) var(--slotted-control-transition-easing, var(--slotted-easing-standard))}[data-ui=tree] [data-part=node]:is([data-selected],[data-indeterminate])>[data-part=row] [data-part=indicator]{background-color:var(--slotted-tone-accent-solid);border-color:var(--slotted-tone-accent-solid)}[data-ui=tree] [data-part=node]:is([data-selected],[data-indeterminate])>[data-part=row] [data-part=indicator]>[data-ui=icon]{clip-path:inset(0% 0% 0% 0%);opacity:1}[data-ui=tree] [data-part=node][data-disabled]>[data-part=row] [data-part=indicator]{background-color:var(--slotted-disabled-background, Canvas);border-color:var(--slotted-disabled-border, GrayText);cursor:not-allowed}[data-ui=tree]:is([data-indicator=highlight],[data-indicator=none]) [data-part=indicator]{display:none}[data-ui=tree] [data-part=icon]{block-size:var(--_icon-size);color:var(--_muted);flex:none;inline-size:var(--_icon-size);margin-inline-end:var(--_gap)}[data-ui=tree][data-part=root]:has([data-part=icon]) [data-part=row]:not(:has([data-part=icon])) [data-part=label]{margin-inline-start:calc(var(--_icon-size) + var(--_gap))}[data-ui=tree] :is([data-part=label],[data-part=description],[data-part=meta],[data-part=empty]){unicode-bidi:plaintext}[data-ui=tree] [data-part=label]{flex:0 1 auto;line-height:var(--slotted-line-height-sm, 1.45);min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-ui=tree] [data-part=label]:has([data-ui=skeleton]){flex:1 1 auto;max-inline-size:62%}[data-ui=tree] [data-part=node]:nth-child(2n)>[data-part=row] [data-part=label]:has([data-ui=skeleton]){max-inline-size:44%}[data-ui=tree] [data-part=node]:nth-child(3n)>[data-part=row] [data-part=label]:has([data-ui=skeleton]){max-inline-size:73%}[data-ui=tree] [data-part=label] mark{background-color:color-mix(in oklab,var(--slotted-tone-accent-text) calc(var(--slotted-highlight-tint-opacity, .075) * 100%),transparent);color:inherit;font-weight:var(--slotted-font-weight-semibold, 600)}[data-ui=tree] [data-part=node][data-selected]>[data-part=row] [data-part=label] mark{background-color:transparent}[data-ui=tree] [data-part=description]{color:var(--_muted);margin-inline-start:var(--_gap);flex:0 1 auto;font-size:var(--_secondary-font-size);min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-ui=tree] [data-part=meta]{color:var(--_muted);flex:none;font-size:var(--_secondary-font-size);font-variant-numeric:tabular-nums;margin-inline-start:auto;padding-inline-start:var(--_gap)}[data-ui=tree] [data-part=loader]{--slotted-spinner-size: var(--_icon-size);block-size:var(--_icon-size);color:var(--_muted);flex:none;inline-size:var(--_icon-size);margin-inline-end:var(--_gap)}[data-ui=tree] [data-part=actions]{align-items:center;display:flex;flex:none;gap:var(--slotted-space-1, .125rem);margin-inline-start:auto;padding-inline-start:var(--_gap)}[data-ui=tree] [data-part=meta]~[data-part=actions]{margin-inline-start:0}[data-ui=tree] [data-part=empty]{color:var(--_muted);padding-block:var(--slotted-space-5, .75rem);padding-inline:var(--_row-inset);text-align:center}[data-ui=tree] [data-part=node]:not([data-disabled]):not([data-loading])>[data-part=row]:hover{background-color:var(--_highlight)}[data-ui=tree] [data-part=node]:not([data-disabled]):not([data-loading])>[data-part=row]:active{background-color:var(--_highlight-active)}[data-ui=tree] [data-part=node][data-current]:not([data-disabled])>[data-part=row]{background-color:var(--_highlight)}[data-ui=tree] [data-part=node][data-selected]:not([data-disabled])>[data-part=row]{background-color:var(--_selected-surface);color:var(--_selected-text)}[data-ui=tree] [data-part=node][data-selected]:not([data-disabled])>[data-part=row] :is([data-part=icon],[data-part=meta],[data-part=expander]){color:inherit}[data-ui=tree] [data-part=node][data-selected-within]:not([data-selected]):not([data-disabled])>[data-part=row]{color:var(--_selected-text)}[data-ui=tree] [data-part=node][data-selected-within]:not([data-selected]):not([data-disabled])>[data-part=row] [data-part=expander]{color:inherit}[data-ui=tree] [data-part=node][data-disabled]>[data-part=row]{color:var(--slotted-disabled-foreground, GrayText);cursor:not-allowed}[data-ui=tree] [data-part=node][data-disabled]>[data-part=row] :is([data-part=icon],[data-part=meta],[data-part=expander],[data-part=description]){color:inherit}[data-ui=tree] [data-part=node][data-loading]>[data-part=row]{cursor:progress}[data-ui=tree] [data-part=node]:focus-visible>[data-part=row],[data-ui=tree] [data-part=canvas]:focus-visible [data-part=node][data-current]>[data-part=row]{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);outline-offset:calc(-1 * var(--slotted-focus-ring-width, 2px))}[data-ui=tree][data-invalid]{--slotted-focus-ring-color: var(--slotted-focus-ring-color-invalid);--_border-color: var(--slotted-tone-danger-border);--_invalid-edge-width: var(--slotted-control-invalid-edge-width, 1px);--_shadow: inset 0 0 0 var(--_invalid-edge-width) var(--slotted-tone-danger-border)}[data-ui=tree][data-disabled]{color:var(--slotted-disabled-foreground, GrayText)}[data-ui=tree][data-disabled][data-variant=framed]{background-color:var(--slotted-disabled-background, Canvas);border-color:var(--slotted-disabled-border, GrayText);box-shadow:none}[data-ui=tree][data-structure=flat]{max-block-size:calc(var(--_rows) * var(--_row-height) + 2 * var(--_inset-block));overflow:auto}[data-ui=tree][data-structure=flat] [data-part=canvas]{block-size:var(--_canvas-size, auto);max-block-size:none;overflow:visible;padding-block-start:calc(var(--_inset-block) + var(--_canvas-offset, 0px));position:relative}[data-ui=tree] [data-part=node][data-pinned]{inset-block-start:var(--slotted-tree-row-offset, 0px);inset-inline:0;position:absolute}@container slotted-tree (max-width: 320px){[data-ui=tree] [data-part=canvas]{--_indent: calc(var(--_icon-size) / 2 + var(--slotted-space-3, .375rem))}}@container slotted-tree (max-width: 240px){[data-ui=tree] [data-part=canvas]{--_indent: calc(var(--_icon-size) / 2 + var(--slotted-space-2, .25rem));--_row-inset: var(--slotted-control-padding-inline-sm, .625rem)}[data-ui=tree] [data-part=description]{display:none}}@media(forced-colors:active){[data-ui=tree] [data-part=node][data-selected]>[data-part=row]{background-color:Highlight;color:HighlightText;forced-color-adjust:none}[data-ui=tree] [data-part=node][data-disabled]>[data-part=row]{color:GrayText}[data-ui=tree] [data-part=indicator]>[data-ui=icon]{forced-color-adjust:none}}@media(forced-colors:active){[data-ui=tree][data-variant=framed][data-invalid]{outline:var(--_invalid-edge-width) solid CanvasText;outline-offset:calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)))}}}\n", "@layer slotted.components{[data-ui=highlight] [data-part=match]{background-color:var( --slotted-highlight-background, color-mix( in oklab, var(--slotted-tone-accent-text) calc(var(--slotted-highlight-tint-opacity, .075) * 100%), transparent ) );-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:var(--slotted-radius-none, 0px);color:var(--slotted-highlight-color, var(--slotted-tone-accent-text));font-weight:inherit;letter-spacing:inherit;padding:0;text-decoration-color:var(--slotted-highlight-rule-color, var(--slotted-tone-accent-border));text-decoration-line:underline;text-decoration-thickness:var(--slotted-border-width-thin, 1px);text-underline-offset:var(--slotted-space-1, .125rem)}[data-ui=highlight] [data-part=match][data-current]{background-color:var(--slotted-highlight-current-background, var(--slotted-tone-accent-solid));color:var(--slotted-highlight-current-color, var(--slotted-tone-accent-on-solid));text-decoration-line:none}[data-ui=highlight]:is([data-disabled],[data-disabled] *) [data-part=match]{background-color:var(--slotted-highlight-disabled-background, transparent);color:inherit;text-decoration-line:underline}@media(forced-colors:active){[data-ui=highlight] [data-part=match],[data-ui=highlight]:is([data-disabled],[data-disabled] *) [data-part=match]{background-color:Mark;color:MarkText;forced-color-adjust:none}[data-ui=highlight] [data-part=match][data-current]{background-color:Highlight;color:HighlightText}}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SlTreeGroup, selector: "ul[slTreeGroup]", inputs: ["busy"] }, { kind: "component", type: SlTreeNode, selector: "li[slTreeNode]", inputs: ["value", "label", "hasChildren", "loading", "disabled", "textValue", "match", "pinned", "offset", "level"], exportAs: ["slTreeNode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1353
|
+
}
|
|
1354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlTree, decorators: [{
|
|
1355
|
+
type: Component,
|
|
1356
|
+
args: [{ selector: '[slTree]', standalone: true, exportAs: 'slTree', imports: [NgTemplateOutlet, SlTreeGroup, SlTreeNode], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
1357
|
+
{ provide: SlTreeContext, useExisting: forwardRef(() => SlTree) },
|
|
1358
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SlTree), multi: true },
|
|
1359
|
+
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => SlTree), multi: true },
|
|
1360
|
+
], template: `<ul
|
|
1361
|
+
data-part="canvas"
|
|
1362
|
+
role="tree"
|
|
1363
|
+
#canvas
|
|
1364
|
+
[attr.aria-label]="ariaLabel()"
|
|
1365
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1366
|
+
[attr.aria-multiselectable]="selection() === 'multiple' ? 'true' : null"
|
|
1367
|
+
[attr.aria-activedescendant]="activeDescendant()"
|
|
1368
|
+
[attr.aria-busy]="loading() ? 'true' : null"
|
|
1369
|
+
[attr.aria-disabled]="treeDisabled() ? 'true' : null"
|
|
1370
|
+
[attr.aria-invalid]="invalid() ? 'true' : null"
|
|
1371
|
+
[attr.aria-required]="required() ? 'true' : null"
|
|
1372
|
+
[attr.tabindex]="canvasTabIndex()"
|
|
1373
|
+
[style.--_canvas-size]="canvasSize()"
|
|
1374
|
+
[style.--_canvas-offset]="canvasOffset()"
|
|
1375
|
+
(keydown)="onKeyDown($event)"
|
|
1376
|
+
(focusin)="onFocusIn($event)"
|
|
1377
|
+
>
|
|
1378
|
+
@if (plan(); as rows) {
|
|
1379
|
+
@for (node of rows; track node.key) {
|
|
1380
|
+
<ng-container
|
|
1381
|
+
[ngTemplateOutlet]="nodeRow"
|
|
1382
|
+
[ngTemplateOutletContext]="{ $implicit: node }"
|
|
1383
|
+
/>
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
<ng-content />
|
|
1387
|
+
</ul>
|
|
1388
|
+
@if (holdsNothing()) {
|
|
1389
|
+
<ng-content select="[slTreeEmpty]" />
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
<ng-template #nodeRow let-node>
|
|
1393
|
+
<li
|
|
1394
|
+
slTreeNode
|
|
1395
|
+
[value]="node.key"
|
|
1396
|
+
[label]="node.label"
|
|
1397
|
+
[level]="node.level"
|
|
1398
|
+
[hasChildren]="node.branch"
|
|
1399
|
+
[disabled]="node.disabled"
|
|
1400
|
+
[loading]="node.loading"
|
|
1401
|
+
[match]="node.match"
|
|
1402
|
+
[textValue]="node.label"
|
|
1403
|
+
[pinned]="node.offset !== undefined"
|
|
1404
|
+
[offset]="node.offset"
|
|
1405
|
+
>
|
|
1406
|
+
@if (nodeContent(); as content) {
|
|
1407
|
+
<ng-container
|
|
1408
|
+
[ngTemplateOutlet]="content"
|
|
1409
|
+
[ngTemplateOutletContext]="{ $implicit: node.item, key: node.key }"
|
|
1410
|
+
/>
|
|
1411
|
+
}
|
|
1412
|
+
@if (node.children.length > 0) {
|
|
1413
|
+
<ul slTreeGroup [busy]="node.loading">
|
|
1414
|
+
@for (child of node.children; track child.key) {
|
|
1415
|
+
<ng-container
|
|
1416
|
+
[ngTemplateOutlet]="nodeRow"
|
|
1417
|
+
[ngTemplateOutletContext]="{ $implicit: child }"
|
|
1418
|
+
/>
|
|
1419
|
+
}
|
|
1420
|
+
</ul>
|
|
1421
|
+
}
|
|
1422
|
+
</li>
|
|
1423
|
+
</ng-template>`, host: {
|
|
1424
|
+
'data-ui': 'tree',
|
|
1425
|
+
'data-part': 'root',
|
|
1426
|
+
'[attr.data-size]': 'size()',
|
|
1427
|
+
'[attr.data-variant]': 'variant()',
|
|
1428
|
+
'[attr.data-structure]': 'structureMode()',
|
|
1429
|
+
'[attr.data-indicator]': 'indicatorMode()',
|
|
1430
|
+
'[attr.data-expand-on]': 'expandOnRow()',
|
|
1431
|
+
'[attr.data-selection]': 'selection()',
|
|
1432
|
+
'[attr.data-focus-mode]': 'mode()',
|
|
1433
|
+
'[attr.data-guides]': 'showGuides() ? "true" : "false"',
|
|
1434
|
+
'[attr.data-disabled]': 'treeDisabled() ? "" : null',
|
|
1435
|
+
'[attr.data-readonly]': 'readOnly() ? "" : null',
|
|
1436
|
+
'[attr.data-invalid]': 'invalid() ? "" : null',
|
|
1437
|
+
'[attr.data-required]': 'required() ? "" : null',
|
|
1438
|
+
'[attr.data-loading]': 'loading() ? "" : null',
|
|
1439
|
+
'(scroll)': 'onScroll()',
|
|
1440
|
+
}, styles: ["@layer slotted.components{[data-ui=tree]{--_surface: var(--slotted-tree-surface, var(--slotted-surface, #ffffff));--_text: var(--slotted-tree-text, var(--slotted-text, #0f172a));--_muted: var(--slotted-tree-text-muted, var(--slotted-text-muted, #5b6b7f));--_border-color: var(--slotted-tree-border-color, var(--slotted-control-border-color));--_border-width: var(--slotted-border-width-thin, 1px);--_radius: var(--slotted-tree-radius, var(--slotted-radius-md, 6px));--_shadow: var(--slotted-tree-shadow, var(--slotted-control-shadow));--_highlight: var(--slotted-tree-highlight, var(--slotted-tone-secondary-subtle-hover));--_highlight-active: var( --slotted-tree-highlight-active, var(--slotted-tone-secondary-subtle-active) );--_selected-surface: var(--slotted-tree-selected-surface, var(--slotted-tone-accent-surface));--_selected-text: var(--slotted-tree-selected-text, var(--slotted-tone-accent-text));--_selected-edge: var(--slotted-tree-selected-edge, var(--slotted-tone-accent-border));--_guide-color: var( --slotted-tree-guide-color, color-mix(in oklab, var(--slotted-border-strong) 60%, var(--slotted-border-subtle)) );--_indent: var( --slotted-tree-indent, calc(var(--_icon-size) / 2 + var(--slotted-space-4, .5rem)) );--_inset-block: var(--slotted-tree-padding-block, var(--slotted-space-2, .25rem));--_inset-inline: var(--slotted-tree-padding-inline, var(--slotted-space-2, .25rem));--_row-inset: var(--slotted-control-padding-inline-md, .8125rem);--_row-height: var(--slotted-control-height-md, 34px);--_font-size: var(--slotted-control-font-size-md, 13px);--_secondary-font-size: var(--slotted-control-font-size-sm, 12px);--_icon-size: var(--slotted-control-icon-size-md, 16px);--_gap: var(--slotted-control-gap-md, .5rem);--_check-size: var(--slotted-selection-size-md, 16px);--_rows: var(--slotted-tree-rows, 12);--_measure: var(--slotted-tree-measure, 28rem);box-sizing:border-box;color:var(--_text);container-name:slotted-tree;container-type:inline-size;display:block;font-family:var(--slotted-font-family-sans);font-size:var(--_font-size);inline-size:100%;max-inline-size:var(--_measure);text-align:start}[data-ui=tree][data-size=sm]{--_row-inset: var(--slotted-control-padding-inline-sm, .625rem);--_row-height: var(--slotted-control-height-sm, 30px);--_font-size: var(--slotted-control-font-size-sm, 12px);--_secondary-font-size: var(--slotted-font-size-xs, .75rem);--_icon-size: var(--slotted-control-icon-size-sm, 14px);--_gap: var(--slotted-control-gap-sm, .375rem);--_check-size: var(--slotted-selection-size-sm, 14px)}[data-ui=tree][data-size=lg]{--_row-inset: var(--slotted-control-padding-inline-lg, 1rem);--_row-height: var(--slotted-control-height-lg, 38px);--_font-size: var(--slotted-control-font-size-lg, 14px);--_secondary-font-size: var(--slotted-control-font-size-md, 13px);--_icon-size: var(--slotted-control-icon-size-lg, 18px);--_gap: var(--slotted-control-gap-lg, .5rem);--_check-size: var(--slotted-selection-size-lg, 18px)}[data-ui=tree][data-variant=framed]{background-color:var(--_surface);border:var(--_border-width) solid var(--_border-color);border-radius:var(--_radius);box-shadow:var(--_shadow)}[data-ui=tree] [data-part=canvas]{max-block-size:calc(var(--_rows) * var(--_row-height) + 2 * var(--_inset-block));outline:none;overflow:auto;padding-block:var(--_inset-block);padding-inline:0}[data-ui=tree] :is([data-part=canvas],[data-part=group]){list-style:none;margin-block:0;margin-inline:0;padding-inline:0}[data-ui=tree] [data-part=group]{padding-block:0;padding-inline:0}[data-ui=tree] [data-part=node]{display:block;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;outline:none}[data-ui=tree] [data-part=row]{align-items:center;background-color:transparent;color:inherit;cursor:pointer;display:flex;min-block-size:var(--_row-height);outline:none;padding-block:0;padding-inline:calc(var(--_inset-inline) + var(--slotted-tree-depth, 0) * var(--_indent)) var(--_row-inset);position:relative;transition:background-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard)),color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard));-webkit-user-select:none;user-select:none}[data-ui=tree] [data-part=guide]{background-image:repeating-linear-gradient(to right,var(--_guide-color) 0 var(--_border-width),transparent var(--_border-width) var(--_indent));inline-size:calc(var(--slotted-tree-depth, 0) * var(--_indent));inset-block:0;inset-inline-start:calc(var(--_inset-inline) + var(--_icon-size) / 2);pointer-events:none;position:absolute}[data-ui=tree] [data-part=guide]:dir(rtl){background-image:repeating-linear-gradient(to left,var(--_guide-color) 0 var(--_border-width),transparent var(--_border-width) var(--_indent))}[data-ui=tree][data-guides=false] [data-part=guide]{background-image:none}[data-ui=tree] [data-part=expander]{--slotted-icon-size: var(--_icon-size);block-size:var(--_icon-size);color:var(--_muted);display:flex;flex:none;inline-size:var(--_icon-size);margin-inline-end:var(--_gap)}[data-ui=tree] [data-part=expander]>[data-ui=icon]{transition:rotate var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard))}[data-ui=tree] [data-part=expander]:dir(rtl)>[data-ui=icon]{rotate:180deg}[data-ui=tree] [data-part=node][data-expanded]>[data-part=row] [data-part=expander]>[data-ui=icon]{rotate:90deg}[data-ui=tree][data-expand-on=expander] [data-part=node][data-branch]>[data-part=row] [data-part=expander]{box-sizing:content-box;cursor:pointer;margin-block:calc((var(--slotted-target-min, 24px) - var(--_icon-size)) / -2);margin-inline-end:calc(var(--_gap) - (var(--slotted-target-min, 24px) - var(--_icon-size)) / 2);margin-inline-start:calc((var(--slotted-target-min, 24px) - var(--_icon-size)) / -2);padding-block:calc((var(--slotted-target-min, 24px) - var(--_icon-size)) / 2);padding-inline:calc((var(--slotted-target-min, 24px) - var(--_icon-size)) / 2)}[data-ui=tree][data-selection=none][data-expand-on=expander] [data-part=row],[data-ui=tree][data-selection=none] [data-part=node]:not([data-branch])>[data-part=row]{cursor:default}[data-ui=tree][data-readonly] [data-part=row]{cursor:default}[data-ui=tree] [data-part=indicator]{--_mark-inset: var(--slotted-tree-mark-inset, 2px);--_check-border: var(--slotted-border-width-medium, 1.5px);--_mark-size: calc(var(--_check-size) - 2 * var(--_mark-inset));--slotted-icon-size: var(--_mark-size);background-color:var(--_surface);block-size:var(--_check-size);border:var(--_check-border) solid var(--slotted-border-strong);border-radius:var(--slotted-radius-xs, 2px);box-sizing:border-box;cursor:pointer;flex:none;inline-size:var(--_check-size);margin-inline-end:var(--_gap);position:relative;transition:background-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard)),border-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard))}[data-ui=tree] [data-part=indicator]>[data-ui=icon]{clip-path:inset(0% 100% 0% 0%);color:var(--slotted-tone-accent-on-solid);inset-block-start:calc(var(--_mark-inset) - var(--_check-border));inset-inline-start:calc(var(--_mark-inset) - var(--_check-border));opacity:0;pointer-events:none;position:absolute;transition:clip-path var(--slotted-duration-medium) var(--slotted-control-transition-easing, var(--slotted-easing-standard)),opacity var(--slotted-duration-medium) var(--slotted-control-transition-easing, var(--slotted-easing-standard))}[data-ui=tree] [data-part=node]:is([data-selected],[data-indeterminate])>[data-part=row] [data-part=indicator]{background-color:var(--slotted-tone-accent-solid);border-color:var(--slotted-tone-accent-solid)}[data-ui=tree] [data-part=node]:is([data-selected],[data-indeterminate])>[data-part=row] [data-part=indicator]>[data-ui=icon]{clip-path:inset(0% 0% 0% 0%);opacity:1}[data-ui=tree] [data-part=node][data-disabled]>[data-part=row] [data-part=indicator]{background-color:var(--slotted-disabled-background, Canvas);border-color:var(--slotted-disabled-border, GrayText);cursor:not-allowed}[data-ui=tree]:is([data-indicator=highlight],[data-indicator=none]) [data-part=indicator]{display:none}[data-ui=tree] [data-part=icon]{block-size:var(--_icon-size);color:var(--_muted);flex:none;inline-size:var(--_icon-size);margin-inline-end:var(--_gap)}[data-ui=tree][data-part=root]:has([data-part=icon]) [data-part=row]:not(:has([data-part=icon])) [data-part=label]{margin-inline-start:calc(var(--_icon-size) + var(--_gap))}[data-ui=tree] :is([data-part=label],[data-part=description],[data-part=meta],[data-part=empty]){unicode-bidi:plaintext}[data-ui=tree] [data-part=label]{flex:0 1 auto;line-height:var(--slotted-line-height-sm, 1.45);min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-ui=tree] [data-part=label]:has([data-ui=skeleton]){flex:1 1 auto;max-inline-size:62%}[data-ui=tree] [data-part=node]:nth-child(2n)>[data-part=row] [data-part=label]:has([data-ui=skeleton]){max-inline-size:44%}[data-ui=tree] [data-part=node]:nth-child(3n)>[data-part=row] [data-part=label]:has([data-ui=skeleton]){max-inline-size:73%}[data-ui=tree] [data-part=label] mark{background-color:color-mix(in oklab,var(--slotted-tone-accent-text) calc(var(--slotted-highlight-tint-opacity, .075) * 100%),transparent);color:inherit;font-weight:var(--slotted-font-weight-semibold, 600)}[data-ui=tree] [data-part=node][data-selected]>[data-part=row] [data-part=label] mark{background-color:transparent}[data-ui=tree] [data-part=description]{color:var(--_muted);margin-inline-start:var(--_gap);flex:0 1 auto;font-size:var(--_secondary-font-size);min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-ui=tree] [data-part=meta]{color:var(--_muted);flex:none;font-size:var(--_secondary-font-size);font-variant-numeric:tabular-nums;margin-inline-start:auto;padding-inline-start:var(--_gap)}[data-ui=tree] [data-part=loader]{--slotted-spinner-size: var(--_icon-size);block-size:var(--_icon-size);color:var(--_muted);flex:none;inline-size:var(--_icon-size);margin-inline-end:var(--_gap)}[data-ui=tree] [data-part=actions]{align-items:center;display:flex;flex:none;gap:var(--slotted-space-1, .125rem);margin-inline-start:auto;padding-inline-start:var(--_gap)}[data-ui=tree] [data-part=meta]~[data-part=actions]{margin-inline-start:0}[data-ui=tree] [data-part=empty]{color:var(--_muted);padding-block:var(--slotted-space-5, .75rem);padding-inline:var(--_row-inset);text-align:center}[data-ui=tree] [data-part=node]:not([data-disabled]):not([data-loading])>[data-part=row]:hover{background-color:var(--_highlight)}[data-ui=tree] [data-part=node]:not([data-disabled]):not([data-loading])>[data-part=row]:active{background-color:var(--_highlight-active)}[data-ui=tree] [data-part=node][data-current]:not([data-disabled])>[data-part=row]{background-color:var(--_highlight)}[data-ui=tree] [data-part=node][data-selected]:not([data-disabled])>[data-part=row]{background-color:var(--_selected-surface);color:var(--_selected-text)}[data-ui=tree] [data-part=node][data-selected]:not([data-disabled])>[data-part=row] :is([data-part=icon],[data-part=meta],[data-part=expander]){color:inherit}[data-ui=tree] [data-part=node][data-selected-within]:not([data-selected]):not([data-disabled])>[data-part=row]{color:var(--_selected-text)}[data-ui=tree] [data-part=node][data-selected-within]:not([data-selected]):not([data-disabled])>[data-part=row] [data-part=expander]{color:inherit}[data-ui=tree] [data-part=node][data-disabled]>[data-part=row]{color:var(--slotted-disabled-foreground, GrayText);cursor:not-allowed}[data-ui=tree] [data-part=node][data-disabled]>[data-part=row] :is([data-part=icon],[data-part=meta],[data-part=expander],[data-part=description]){color:inherit}[data-ui=tree] [data-part=node][data-loading]>[data-part=row]{cursor:progress}[data-ui=tree] [data-part=node]:focus-visible>[data-part=row],[data-ui=tree] [data-part=canvas]:focus-visible [data-part=node][data-current]>[data-part=row]{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);outline-offset:calc(-1 * var(--slotted-focus-ring-width, 2px))}[data-ui=tree][data-invalid]{--slotted-focus-ring-color: var(--slotted-focus-ring-color-invalid);--_border-color: var(--slotted-tone-danger-border);--_invalid-edge-width: var(--slotted-control-invalid-edge-width, 1px);--_shadow: inset 0 0 0 var(--_invalid-edge-width) var(--slotted-tone-danger-border)}[data-ui=tree][data-disabled]{color:var(--slotted-disabled-foreground, GrayText)}[data-ui=tree][data-disabled][data-variant=framed]{background-color:var(--slotted-disabled-background, Canvas);border-color:var(--slotted-disabled-border, GrayText);box-shadow:none}[data-ui=tree][data-structure=flat]{max-block-size:calc(var(--_rows) * var(--_row-height) + 2 * var(--_inset-block));overflow:auto}[data-ui=tree][data-structure=flat] [data-part=canvas]{block-size:var(--_canvas-size, auto);max-block-size:none;overflow:visible;padding-block-start:calc(var(--_inset-block) + var(--_canvas-offset, 0px));position:relative}[data-ui=tree] [data-part=node][data-pinned]{inset-block-start:var(--slotted-tree-row-offset, 0px);inset-inline:0;position:absolute}@container slotted-tree (max-width: 320px){[data-ui=tree] [data-part=canvas]{--_indent: calc(var(--_icon-size) / 2 + var(--slotted-space-3, .375rem))}}@container slotted-tree (max-width: 240px){[data-ui=tree] [data-part=canvas]{--_indent: calc(var(--_icon-size) / 2 + var(--slotted-space-2, .25rem));--_row-inset: var(--slotted-control-padding-inline-sm, .625rem)}[data-ui=tree] [data-part=description]{display:none}}@media(forced-colors:active){[data-ui=tree] [data-part=node][data-selected]>[data-part=row]{background-color:Highlight;color:HighlightText;forced-color-adjust:none}[data-ui=tree] [data-part=node][data-disabled]>[data-part=row]{color:GrayText}[data-ui=tree] [data-part=indicator]>[data-ui=icon]{forced-color-adjust:none}}@media(forced-colors:active){[data-ui=tree][data-variant=framed][data-invalid]{outline:var(--_invalid-edge-width) solid CanvasText;outline-offset:calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)))}}}\n", "@layer slotted.components{[data-ui=highlight] [data-part=match]{background-color:var( --slotted-highlight-background, color-mix( in oklab, var(--slotted-tone-accent-text) calc(var(--slotted-highlight-tint-opacity, .075) * 100%), transparent ) );-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:var(--slotted-radius-none, 0px);color:var(--slotted-highlight-color, var(--slotted-tone-accent-text));font-weight:inherit;letter-spacing:inherit;padding:0;text-decoration-color:var(--slotted-highlight-rule-color, var(--slotted-tone-accent-border));text-decoration-line:underline;text-decoration-thickness:var(--slotted-border-width-thin, 1px);text-underline-offset:var(--slotted-space-1, .125rem)}[data-ui=highlight] [data-part=match][data-current]{background-color:var(--slotted-highlight-current-background, var(--slotted-tone-accent-solid));color:var(--slotted-highlight-current-color, var(--slotted-tone-accent-on-solid));text-decoration-line:none}[data-ui=highlight]:is([data-disabled],[data-disabled] *) [data-part=match]{background-color:var(--slotted-highlight-disabled-background, transparent);color:inherit;text-decoration-line:underline}@media(forced-colors:active){[data-ui=highlight] [data-part=match],[data-ui=highlight]:is([data-disabled],[data-disabled] *) [data-part=match]{background-color:Mark;color:MarkText;forced-color-adjust:none}[data-ui=highlight] [data-part=match][data-current]{background-color:Highlight;color:HighlightText}}}\n"] }]
|
|
1441
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], expandedKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedKeys", required: false }] }, { type: i0.Output, args: ["expandedKeysChange"] }], activeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeKey", required: false }] }, { type: i0.Output, args: ["activeKeyChange"] }], valueRequest: [{ type: i0.Output, args: ["valueRequest"] }], expandedKeysRequest: [{ type: i0.Output, args: ["expandedKeysRequest"] }], activeKeyRequest: [{ type: i0.Output, args: ["activeKeyRequest"] }], nodeActivate: [{ type: i0.Output, args: ["nodeActivate"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], structure: [{ type: i0.Input, args: [{ isSignal: true, alias: "structure", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], selectionBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionBehavior", required: false }] }], selectionIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionIndicator", required: false }] }], selectionCascade: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionCascade", required: false }] }], expandOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandOn", required: false }] }], focusMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusMode", required: false }] }], guides: [{ type: i0.Input, args: [{ isSignal: true, alias: "guides", required: false }] }], loop: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], typeahead: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeahead", required: false }] }], typeaheadTimeout: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeaheadTimeout", required: false }] }], selectOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnFocus", required: false }] }], navigateDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigateDisabled", required: false }] }], disallowEmptySelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "disallowEmptySelection", required: false }] }], disallowSelectAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "disallowSelectAll", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], virtual: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtual", required: false }] }], itemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemSize", required: false }] }], overscan: [{ type: i0.Input, args: [{ isSignal: true, alias: "overscan", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }], getKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "getKey", required: false }] }], getLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "getLabel", required: false }] }], getChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "getChildren", required: false }] }], getLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "getLevel", required: false }] }], hasChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasChildren", required: false }] }], getChildrenCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "getChildrenCount", required: false }] }], isNodeDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isNodeDisabled", required: false }] }], isNodeLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isNodeLoading", required: false }] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }], nodeContent: [{ type: i0.ContentChild, args: ['slTreeNodeContent', { isSignal: true }] }] } });
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* Generated bundle index. Do not edit.
|
|
1445
|
+
*/
|
|
1446
|
+
|
|
1447
|
+
export { SlTree, SlTreeActions, SlTreeContext, SlTreeDescription, SlTreeEmpty, SlTreeGroup, SlTreeIcon, SlTreeIdFactory, SlTreeLabel, SlTreeMeta, SlTreeNode, TREE_DEFAULTS, injectTreeDefaults, provideTreeDefaults };
|
|
1448
|
+
//# sourceMappingURL=slotted-angular-tree.mjs.map
|