@slotted/angular 0.0.0-stage → 0.1.0-beta.1
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,1715 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken, inject, booleanAttribute, input, TemplateRef, Directive, forwardRef, ElementRef, DestroyRef, model, numberAttribute, output, contentChildren, contentChild, Injector, viewChild, computed, signal, untracked, effect, afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { ControlContainer } from '@angular/forms';
|
|
5
|
+
import { isDirty, hasErrors, normaliseErrors } from '@slotted/core/form';
|
|
6
|
+
import { wizardMessages } from '@slotted/core/i18n';
|
|
7
|
+
import { createControllable } from '@slotted/core/state';
|
|
8
|
+
import { formValues, clampStep, replacementStep, stepPosition, previousStep, nextDestination, stepComplete, assertUniqueSteps, reachableStep, firstIncomplete, includedValues, createSnapshot } from '@slotted/core/wizard';
|
|
9
|
+
import { SlAlert, SlAlertContent, SlAlertDescription, SlAlertTitle } from '@slotted/angular/alert';
|
|
10
|
+
import { SlButton } from '@slotted/angular/button';
|
|
11
|
+
import { SlForm } from '@slotted/angular/form';
|
|
12
|
+
import { injectMessages, injectLocale } from '@slotted/angular/i18n';
|
|
13
|
+
import { SlGlyph, SlIcon } from '@slotted/angular/icon';
|
|
14
|
+
import { SlSkeleton } from '@slotted/angular/skeleton';
|
|
15
|
+
import { SlStepper, SlStepperList, SlStepperStep } from '@slotted/angular/stepper';
|
|
16
|
+
import { SlTag } from '@slotted/angular/tag';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* `linear` is on: the wave's scope says direct navigation depends on the
|
|
20
|
+
* steps already completed. `delay` and `minDuration` are the loading-states
|
|
21
|
+
* pair, so a restore that answers in eighty milliseconds draws nothing.
|
|
22
|
+
*/
|
|
23
|
+
const WIZARD_FALLBACK = {
|
|
24
|
+
delay: 200,
|
|
25
|
+
level: 2,
|
|
26
|
+
linear: true,
|
|
27
|
+
minDuration: 400,
|
|
28
|
+
progress: 'start',
|
|
29
|
+
scroll: 'ancestor',
|
|
30
|
+
};
|
|
31
|
+
const WIZARD_DEFAULTS = new InjectionToken('slotted wizard defaults', {
|
|
32
|
+
providedIn: 'root',
|
|
33
|
+
factory: () => WIZARD_FALLBACK,
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* An application decides once how its wizards lay out. A wizard that states
|
|
37
|
+
* any of it itself still wins. Its words come from the language in force
|
|
38
|
+
* (`provideSlotted`).
|
|
39
|
+
*/
|
|
40
|
+
function provideWizardDefaults(defaults) {
|
|
41
|
+
return {
|
|
42
|
+
provide: WIZARD_DEFAULTS,
|
|
43
|
+
useFactory: () => ({ ...WIZARD_FALLBACK, ...defaults }),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function injectWizardDefaults() {
|
|
47
|
+
return inject(WIZARD_DEFAULTS);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
let counter = 0;
|
|
51
|
+
const EMPTY = {};
|
|
52
|
+
const isPromise = (candidate) => typeof candidate === 'object' && candidate !== null && 'then' in candidate;
|
|
53
|
+
const optionalBoolean = (raw) => (raw === undefined ? undefined : booleanAttribute(raw));
|
|
54
|
+
function without(map, name) {
|
|
55
|
+
if (!Object.hasOwn(map, name))
|
|
56
|
+
return map;
|
|
57
|
+
const next = { ...map };
|
|
58
|
+
delete next[name];
|
|
59
|
+
return next;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* One step: its name, its label and its content, which is rendered only while
|
|
63
|
+
* it is the current step. A branch is `@if` around the template; the wizard
|
|
64
|
+
* reacts to the list changing under the reader by the rules of the design
|
|
65
|
+
* (§5.6).
|
|
66
|
+
*/
|
|
67
|
+
class SlWizardStep {
|
|
68
|
+
name = input.required({ ...(ngDevMode ? { debugName: "name" } : /* istanbul ignore next */ {}), alias: 'slWizardStep' });
|
|
69
|
+
label = input.required(/* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
71
|
+
description = input(undefined, /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
73
|
+
optional = input(false, { ...(ngDevMode ? { debugName: "optional" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
74
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
75
|
+
/** Runs after the platform's and Reactive Forms' own validation pass. */
|
|
76
|
+
validate = input(undefined, /* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "validate" }] : /* istanbul ignore next */ []));
|
|
78
|
+
/** The answers to accept instead of the form's values. */
|
|
79
|
+
values = input(undefined, /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []));
|
|
81
|
+
template = inject(TemplateRef);
|
|
82
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
83
|
+
return context !== null;
|
|
84
|
+
}
|
|
85
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardStep, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
86
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: SlWizardStep, isStandalone: true, selector: "ng-template[slWizardStep]", inputs: { name: { classPropertyName: "name", publicName: "slWizardStep", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, validate: { classPropertyName: "validate", publicName: "validate", isSignal: true, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["slWizardStep"], ngImport: i0 });
|
|
87
|
+
}
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardStep, decorators: [{
|
|
89
|
+
type: Directive,
|
|
90
|
+
args: [{ selector: 'ng-template[slWizardStep]', standalone: true, exportAs: 'slWizardStep' }]
|
|
91
|
+
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "slWizardStep", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], validate: [{ type: i0.Input, args: [{ isSignal: true, alias: "validate", required: false }] }], values: [{ type: i0.Input, args: [{ isSignal: true, alias: "values", required: false }] }] } });
|
|
92
|
+
/** What stands in place of the step and the actions after an accepted submission. */
|
|
93
|
+
class SlWizardComplete {
|
|
94
|
+
template = inject(TemplateRef);
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardComplete, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
96
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlWizardComplete, isStandalone: true, selector: "ng-template[slWizardComplete]", ngImport: i0 });
|
|
97
|
+
}
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardComplete, decorators: [{
|
|
99
|
+
type: Directive,
|
|
100
|
+
args: [{ selector: 'ng-template[slWizardComplete]', standalone: true }]
|
|
101
|
+
}] });
|
|
102
|
+
/** A row of actions of the consumer's own, in place of the default one. */
|
|
103
|
+
class SlWizardActions {
|
|
104
|
+
template = inject(TemplateRef);
|
|
105
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
106
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlWizardActions, isStandalone: true, selector: "ng-template[slWizardActions]", ngImport: i0 });
|
|
107
|
+
}
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardActions, decorators: [{
|
|
109
|
+
type: Directive,
|
|
110
|
+
args: [{ selector: 'ng-template[slWizardActions]', standalone: true }]
|
|
111
|
+
}] });
|
|
112
|
+
/** The group of actions that leave the flow, at the start of the row. */
|
|
113
|
+
class SlWizardActionsStart {
|
|
114
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardActionsStart, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
115
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlWizardActionsStart, isStandalone: true, selector: "[slWizardActionsStart]", host: { attributes: { "data-part": "actions-start" } }, ngImport: i0 });
|
|
116
|
+
}
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardActionsStart, decorators: [{
|
|
118
|
+
type: Directive,
|
|
119
|
+
args: [{
|
|
120
|
+
selector: '[slWizardActionsStart]',
|
|
121
|
+
standalone: true,
|
|
122
|
+
host: { 'data-part': 'actions-start' },
|
|
123
|
+
}]
|
|
124
|
+
}] });
|
|
125
|
+
/** The group of actions that move the flow, at the end of the row. */
|
|
126
|
+
class SlWizardActionsEnd {
|
|
127
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardActionsEnd, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
128
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlWizardActionsEnd, isStandalone: true, selector: "[slWizardActionsEnd]", host: { attributes: { "data-part": "actions-end" } }, ngImport: i0 });
|
|
129
|
+
}
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardActionsEnd, decorators: [{
|
|
131
|
+
type: Directive,
|
|
132
|
+
args: [{
|
|
133
|
+
selector: '[slWizardActionsEnd]',
|
|
134
|
+
standalone: true,
|
|
135
|
+
host: { 'data-part': 'actions-end' },
|
|
136
|
+
}]
|
|
137
|
+
}] });
|
|
138
|
+
/**
|
|
139
|
+
* The step's form. It is the consumer's `form[slForm]`, because
|
|
140
|
+
* `formControlName` resolves its `ControlContainer` through the injector of
|
|
141
|
+
* the template it is written in, and a form the wizard rendered would not be
|
|
142
|
+
* that one. With a `FormGroup` on it, the group's raw value is the step's
|
|
143
|
+
* answers and its pending status holds the step; without one, `FormData`.
|
|
144
|
+
*/
|
|
145
|
+
class SlWizardForm {
|
|
146
|
+
wizard = inject(forwardRef(() => SlWizard));
|
|
147
|
+
form = inject(SlForm, { self: true });
|
|
148
|
+
container = inject(ControlContainer, { optional: true, self: true });
|
|
149
|
+
element = inject(ElementRef).nativeElement;
|
|
150
|
+
constructor() {
|
|
151
|
+
this.wizard.registerForm(this);
|
|
152
|
+
inject(DestroyRef).onDestroy(() => this.wizard.unregisterForm(this));
|
|
153
|
+
const subscription = this.form.formSubmit.subscribe(({ event, values, errors, pending }) => {
|
|
154
|
+
const control = this.container?.control;
|
|
155
|
+
const run = () => this.wizard.commit(control?.getRawValue() ?? values, event);
|
|
156
|
+
if (control?.pending === true) {
|
|
157
|
+
pending(new Promise((resolve) => {
|
|
158
|
+
const watch = control.statusChanges.subscribe((status) => {
|
|
159
|
+
if (status === 'PENDING')
|
|
160
|
+
return;
|
|
161
|
+
watch.unsubscribe();
|
|
162
|
+
if (status === 'INVALID') {
|
|
163
|
+
this.form.validateNow();
|
|
164
|
+
resolve(undefined);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const answer = run();
|
|
168
|
+
if (isPromise(answer))
|
|
169
|
+
void answer.then(resolve);
|
|
170
|
+
else
|
|
171
|
+
resolve(answer);
|
|
172
|
+
});
|
|
173
|
+
}));
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const answer = run();
|
|
177
|
+
if (isPromise(answer))
|
|
178
|
+
pending(answer);
|
|
179
|
+
else if (answer !== undefined)
|
|
180
|
+
errors(answer);
|
|
181
|
+
});
|
|
182
|
+
inject(DestroyRef).onDestroy(() => subscription.unsubscribe());
|
|
183
|
+
}
|
|
184
|
+
/** What is typed now, whatever has been accepted. */
|
|
185
|
+
typed() {
|
|
186
|
+
const control = this.container?.control;
|
|
187
|
+
if (control !== null && control !== undefined)
|
|
188
|
+
return control.getRawValue();
|
|
189
|
+
return formValues(new FormData(this.element));
|
|
190
|
+
}
|
|
191
|
+
dirty() {
|
|
192
|
+
const control = this.container?.control;
|
|
193
|
+
return control !== null && control !== undefined ? control.dirty : isDirty(this.element);
|
|
194
|
+
}
|
|
195
|
+
submit() {
|
|
196
|
+
this.element.requestSubmit();
|
|
197
|
+
}
|
|
198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardForm, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
199
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlWizardForm, isStandalone: true, selector: "form[slWizardForm]", host: { properties: { "attr.id": "wizard.formId", "attr.aria-labelledby": "wizard.titleId" } }, exportAs: ["slWizardForm"], ngImport: i0 });
|
|
200
|
+
}
|
|
201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardForm, decorators: [{
|
|
202
|
+
type: Directive,
|
|
203
|
+
args: [{
|
|
204
|
+
selector: 'form[slWizardForm]',
|
|
205
|
+
standalone: true,
|
|
206
|
+
exportAs: 'slWizardForm',
|
|
207
|
+
host: {
|
|
208
|
+
'[attr.id]': 'wizard.formId',
|
|
209
|
+
'[attr.aria-labelledby]': 'wizard.titleId',
|
|
210
|
+
},
|
|
211
|
+
}]
|
|
212
|
+
}], ctorParameters: () => [] });
|
|
213
|
+
/**
|
|
214
|
+
* A flow of steps that accumulates answers.
|
|
215
|
+
*
|
|
216
|
+
* **The steps are the templates the consumer writes**, and a branch is `@if`
|
|
217
|
+
* around one. The wizard reacts to the list changing under the reader by the
|
|
218
|
+
* eight rules of the design (§5.6): the current step is never moved because a
|
|
219
|
+
* step appeared before it, a current step that left the list gives way to the
|
|
220
|
+
* next one still present, and an absent step keeps its answers without
|
|
221
|
+
* submitting them.
|
|
222
|
+
*
|
|
223
|
+
* **Each step's form is the consumer's `form[slForm][slWizardForm]`**, so a
|
|
224
|
+
* `FormGroup` lives in the consumer's component, keeps what was typed across
|
|
225
|
+
* steps, and validates through Reactive Forms before the step's own
|
|
226
|
+
* `validate`. The next button stands outside the form and submits it through
|
|
227
|
+
* the platform's `form` attribute.
|
|
228
|
+
*
|
|
229
|
+
* **It holds accepted answers, not typed ones.** A step is complete exactly
|
|
230
|
+
* when its name is in `value`.
|
|
231
|
+
*/
|
|
232
|
+
class SlWizard {
|
|
233
|
+
/** The current step's name. Two-way; a router binds it. */
|
|
234
|
+
step = model(undefined, /* @ts-ignore */
|
|
235
|
+
...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
236
|
+
/** The accepted answers, by step name. Two-way. */
|
|
237
|
+
value = model(undefined, /* @ts-ignore */
|
|
238
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
239
|
+
/** Whether the compact list of steps is open. Two-way. */
|
|
240
|
+
progressOpen = model(false, /* @ts-ignore */
|
|
241
|
+
...(ngDevMode ? [{ debugName: "progressOpen" }] : /* istanbul ignore next */ []));
|
|
242
|
+
/** The step an unbound wizard starts on, read once and clamped to one in reach. */
|
|
243
|
+
defaultStep = input(undefined, /* @ts-ignore */
|
|
244
|
+
...(ngDevMode ? [{ debugName: "defaultStep" }] : /* istanbul ignore next */ []));
|
|
245
|
+
defaultValue = input(undefined, /* @ts-ignore */
|
|
246
|
+
...(ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
247
|
+
/** Whether an unbound compact list starts open, read once. */
|
|
248
|
+
defaultProgressOpen = input(false, { ...(ngDevMode ? { debugName: "defaultProgressOpen" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
249
|
+
progress = input(undefined, /* @ts-ignore */
|
|
250
|
+
...(ngDevMode ? [{ debugName: "progress" }] : /* istanbul ignore next */ []));
|
|
251
|
+
scroll = input(undefined, /* @ts-ignore */
|
|
252
|
+
...(ngDevMode ? [{ debugName: "scroll" }] : /* istanbul ignore next */ []));
|
|
253
|
+
linear = input(undefined, { ...(ngDevMode ? { debugName: "linear" } : /* istanbul ignore next */ {}), transform: optionalBoolean });
|
|
254
|
+
level = input(undefined, /* @ts-ignore */
|
|
255
|
+
...(ngDevMode ? [{ debugName: "level" }] : /* istanbul ignore next */ []));
|
|
256
|
+
/**
|
|
257
|
+
* Words laid over the catalog of the language in force, key by key: the
|
|
258
|
+
* name of the list of steps (`progress`), the position, the actions, the
|
|
259
|
+
* draft status and the failures.
|
|
260
|
+
*/
|
|
261
|
+
messages = input(undefined, /* @ts-ignore */
|
|
262
|
+
...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
|
|
263
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
264
|
+
/** An error of the consumer's own, shown above the step; it wins over a failed submission. */
|
|
265
|
+
error = input(undefined, /* @ts-ignore */
|
|
266
|
+
...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
267
|
+
/** Called with the answers of the steps present, once the last step is accepted. */
|
|
268
|
+
submitWizard = input(undefined, /* @ts-ignore */
|
|
269
|
+
...(ngDevMode ? [{ debugName: "submitWizard" }] : /* istanbul ignore next */ []));
|
|
270
|
+
persistence = input(undefined, /* @ts-ignore */
|
|
271
|
+
...(ngDevMode ? [{ debugName: "persistence" }] : /* istanbul ignore next */ []));
|
|
272
|
+
/** The flow's version; a draft of another version is not restored. */
|
|
273
|
+
version = input(undefined, /* @ts-ignore */
|
|
274
|
+
...(ngDevMode ? [{ debugName: "version" }] : /* istanbul ignore next */ []));
|
|
275
|
+
/** Defaults to `step` when `persistence` is given, `none` otherwise. */
|
|
276
|
+
autosave = input(undefined, /* @ts-ignore */
|
|
277
|
+
...(ngDevMode ? [{ debugName: "autosave" }] : /* istanbul ignore next */ []));
|
|
278
|
+
guardUnsaved = input(false, { ...(ngDevMode ? { debugName: "guardUnsaved" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
279
|
+
/**
|
|
280
|
+
* Shows the cancel action. An Angular output cannot say whether anything
|
|
281
|
+
* listens to it, which is how the React binding decides; here it is stated.
|
|
282
|
+
*/
|
|
283
|
+
cancellable = input(false, { ...(ngDevMode ? { debugName: "cancellable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
284
|
+
/** Shows the save-draft action without `persistence`, for a `(draftSave)` of the consumer's own. */
|
|
285
|
+
draftable = input(false, { ...(ngDevMode ? { debugName: "draftable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
286
|
+
delay = input(undefined, { ...(ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {}), transform: (raw) => (raw === undefined ? undefined : numberAttribute(raw)) });
|
|
287
|
+
minDuration = input(undefined, { ...(ngDevMode ? { debugName: "minDuration" } : /* istanbul ignore next */ {}), transform: (raw) => (raw === undefined ? undefined : numberAttribute(raw)) });
|
|
288
|
+
/** One output per transition, carrying its reason and `cancel()`. */
|
|
289
|
+
stepChangeRequest = output();
|
|
290
|
+
valueChangeRequest = output();
|
|
291
|
+
progressOpenChangeRequest = output();
|
|
292
|
+
/** Asked by the cancel action; the family closes nothing itself. */
|
|
293
|
+
cancelRequest = output();
|
|
294
|
+
/** A draft was written, before `persistence` keeps it. */
|
|
295
|
+
draftSave = output();
|
|
296
|
+
/** The submission was accepted. */
|
|
297
|
+
completed = output();
|
|
298
|
+
steps = contentChildren(SlWizardStep, /* @ts-ignore */
|
|
299
|
+
...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
|
|
300
|
+
completeTemplate = contentChild(SlWizardComplete, /* @ts-ignore */
|
|
301
|
+
...(ngDevMode ? [{ debugName: "completeTemplate" }] : /* istanbul ignore next */ []));
|
|
302
|
+
actionsTemplate = contentChild(SlWizardActions, /* @ts-ignore */
|
|
303
|
+
...(ngDevMode ? [{ debugName: "actionsTemplate" }] : /* istanbul ignore next */ []));
|
|
304
|
+
defaults = injectWizardDefaults();
|
|
305
|
+
injector = inject(Injector);
|
|
306
|
+
titleRef = viewChild('title', /* @ts-ignore */
|
|
307
|
+
...(ngDevMode ? [{ debugName: "titleRef" }] : /* istanbul ignore next */ []));
|
|
308
|
+
alertRef = viewChild('alert', { ...(ngDevMode ? { debugName: "alertRef" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
309
|
+
completeRef = viewChild('complete', /* @ts-ignore */
|
|
310
|
+
...(ngDevMode ? [{ debugName: "completeRef" }] : /* istanbul ignore next */ []));
|
|
311
|
+
toggleRef = viewChild('toggle', /* @ts-ignore */
|
|
312
|
+
...(ngDevMode ? [{ debugName: "toggleRef" }] : /* istanbul ignore next */ []));
|
|
313
|
+
id = `slotted-wizard-${(counter += 1)}`;
|
|
314
|
+
formId = `${this.id}-form`;
|
|
315
|
+
titleId = `${this.id}-title`;
|
|
316
|
+
listId = `${this.id}-list`;
|
|
317
|
+
/** The family's words in the language in force, with this wizard's `messages` laid over them. */
|
|
318
|
+
t = injectMessages(wizardMessages, this.messages);
|
|
319
|
+
/** The locale in force: what the hour a draft was saved is written in. */
|
|
320
|
+
locale = injectLocale();
|
|
321
|
+
/**
|
|
322
|
+
* The list of steps is a stepper named by this family's `progress`: the
|
|
323
|
+
* written word is handed over as a message function, so the stepper never
|
|
324
|
+
* reads it as message grammar again.
|
|
325
|
+
*/
|
|
326
|
+
stepperMessages = computed(() => {
|
|
327
|
+
const progress = this.t('progress');
|
|
328
|
+
return { label: () => progress };
|
|
329
|
+
}, /* @ts-ignore */
|
|
330
|
+
...(ngDevMode ? [{ debugName: "stepperMessages" }] : /* istanbul ignore next */ []));
|
|
331
|
+
resolvedProgress = computed(() => this.progress() ?? this.defaults.progress, /* @ts-ignore */
|
|
332
|
+
...(ngDevMode ? [{ debugName: "resolvedProgress" }] : /* istanbul ignore next */ []));
|
|
333
|
+
resolvedScroll = computed(() => this.scroll() ?? this.defaults.scroll, /* @ts-ignore */
|
|
334
|
+
...(ngDevMode ? [{ debugName: "resolvedScroll" }] : /* istanbul ignore next */ []));
|
|
335
|
+
resolvedLinear = computed(() => this.linear() ?? this.defaults.linear, /* @ts-ignore */
|
|
336
|
+
...(ngDevMode ? [{ debugName: "resolvedLinear" }] : /* istanbul ignore next */ []));
|
|
337
|
+
resolvedLevel = computed(() => this.level() ?? this.defaults.level, /* @ts-ignore */
|
|
338
|
+
...(ngDevMode ? [{ debugName: "resolvedLevel" }] : /* istanbul ignore next */ []));
|
|
339
|
+
resolvedAutosave = computed(() => this.autosave() ?? (this.persistence() === undefined ? 'none' : 'step'), /* @ts-ignore */
|
|
340
|
+
...(ngDevMode ? [{ debugName: "resolvedAutosave" }] : /* istanbul ignore next */ []));
|
|
341
|
+
entries = computed(() => this.steps().map((step) => ({ disabled: step.disabled(), name: step.name() })), /* @ts-ignore */
|
|
342
|
+
...(ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []));
|
|
343
|
+
accepted = computed(() => this.value() ?? EMPTY, /* @ts-ignore */
|
|
344
|
+
...(ngDevMode ? [{ debugName: "accepted" }] : /* istanbul ignore next */ []));
|
|
345
|
+
drafts = signal(EMPTY, /* @ts-ignore */
|
|
346
|
+
...(ngDevMode ? [{ debugName: "drafts" }] : /* istanbul ignore next */ []));
|
|
347
|
+
invalid = signal(new Set(), /* @ts-ignore */
|
|
348
|
+
...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
349
|
+
pending = signal(undefined, /* @ts-ignore */
|
|
350
|
+
...(ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []));
|
|
351
|
+
phase = signal('editing', /* @ts-ignore */
|
|
352
|
+
...(ngDevMode ? [{ debugName: "phase" }] : /* istanbul ignore next */ []));
|
|
353
|
+
failure = signal(undefined, /* @ts-ignore */
|
|
354
|
+
...(ngDevMode ? [{ debugName: "failure" }] : /* istanbul ignore next */ []));
|
|
355
|
+
draftState = signal('idle', /* @ts-ignore */
|
|
356
|
+
...(ngDevMode ? [{ debugName: "draftState" }] : /* istanbul ignore next */ []));
|
|
357
|
+
savedAt = signal(undefined, /* @ts-ignore */
|
|
358
|
+
...(ngDevMode ? [{ debugName: "savedAt" }] : /* istanbul ignore next */ []));
|
|
359
|
+
restoring = signal(false, /* @ts-ignore */
|
|
360
|
+
...(ngDevMode ? [{ debugName: "restoring" }] : /* istanbul ignore next */ []));
|
|
361
|
+
skeleton = signal(false, /* @ts-ignore */
|
|
362
|
+
...(ngDevMode ? [{ debugName: "skeleton" }] : /* istanbul ignore next */ []));
|
|
363
|
+
returnTo = signal(undefined, /* @ts-ignore */
|
|
364
|
+
...(ngDevMode ? [{ debugName: "returnTo" }] : /* istanbul ignore next */ []));
|
|
365
|
+
epoch = signal(0, /* @ts-ignore */
|
|
366
|
+
...(ngDevMode ? [{ debugName: "epoch" }] : /* istanbul ignore next */ []));
|
|
367
|
+
stepErrors = signal({}, /* @ts-ignore */
|
|
368
|
+
...(ngDevMode ? [{ debugName: "stepErrors" }] : /* istanbul ignore next */ []));
|
|
369
|
+
form = signal(undefined, /* @ts-ignore */
|
|
370
|
+
...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
|
|
371
|
+
/** The list before its last change, for a current step that left it. */
|
|
372
|
+
previousEntries = [];
|
|
373
|
+
/** The step the family itself last wrote, so a router's write can be told apart. */
|
|
374
|
+
ownWrite;
|
|
375
|
+
validation;
|
|
376
|
+
jumpTarget;
|
|
377
|
+
focusNext;
|
|
378
|
+
initialised = false;
|
|
379
|
+
usable(name) {
|
|
380
|
+
return this.entries().some((entry) => entry.name === name && entry.disabled !== true);
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* The step shown. A requested step that is absent gives way to the next one
|
|
384
|
+
* still present in the old order (decision 2 shows that one at once); the
|
|
385
|
+
* current step is never moved because a step appeared before it (decision 1).
|
|
386
|
+
*/
|
|
387
|
+
current = computed(() => {
|
|
388
|
+
const requested = this.step();
|
|
389
|
+
const entries = this.entries();
|
|
390
|
+
if (this.usable(requested))
|
|
391
|
+
return requested;
|
|
392
|
+
const before = untracked(() => this.previousEntries);
|
|
393
|
+
const linear = this.resolvedLinear();
|
|
394
|
+
return requested === undefined
|
|
395
|
+
? clampStep({ linear, requested, steps: entries, value: this.accepted() })
|
|
396
|
+
: (replacementStep({ after: entries, before, current: requested }) ??
|
|
397
|
+
clampStep({ linear, requested, steps: entries, value: this.accepted() }));
|
|
398
|
+
}, /* @ts-ignore */
|
|
399
|
+
...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
|
|
400
|
+
/**
|
|
401
|
+
* After an accepted submission the flow has no current step: the stepper is
|
|
402
|
+
* given the index past the last, so every header reads complete. Left on the
|
|
403
|
+
* last step, that header kept its number, because a current step outranks a
|
|
404
|
+
* complete one.
|
|
405
|
+
*/
|
|
406
|
+
finished = computed(() => this.phase() === 'complete', /* @ts-ignore */
|
|
407
|
+
...(ngDevMode ? [{ debugName: "finished" }] : /* istanbul ignore next */ []));
|
|
408
|
+
currentIndex = computed(() => Math.max(0, this.entries().findIndex((entry) => entry.name === this.current())), /* @ts-ignore */
|
|
409
|
+
...(ngDevMode ? [{ debugName: "currentIndex" }] : /* istanbul ignore next */ []));
|
|
410
|
+
currentStep = computed(() => this.steps().find((step) => step.name() === this.current()), /* @ts-ignore */
|
|
411
|
+
...(ngDevMode ? [{ debugName: "currentStep" }] : /* istanbul ignore next */ []));
|
|
412
|
+
optionalStep = computed(() => this.currentStep()?.optional() === true, /* @ts-ignore */
|
|
413
|
+
...(ngDevMode ? [{ debugName: "optionalStep" }] : /* istanbul ignore next */ []));
|
|
414
|
+
position = computed(() => stepPosition(this.entries(), this.current()), /* @ts-ignore */
|
|
415
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
416
|
+
positionText = computed(() => this.t('position', { index: this.position().index, count: this.position().count }), /* @ts-ignore */
|
|
417
|
+
...(ngDevMode ? [{ debugName: "positionText" }] : /* istanbul ignore next */ []));
|
|
418
|
+
isFirst = computed(() => {
|
|
419
|
+
const current = this.current();
|
|
420
|
+
return current === undefined || previousStep({ current, steps: this.entries() }) === undefined;
|
|
421
|
+
}, /* @ts-ignore */
|
|
422
|
+
...(ngDevMode ? [{ debugName: "isFirst" }] : /* istanbul ignore next */ []));
|
|
423
|
+
returning = computed(() => {
|
|
424
|
+
const back = this.returnTo();
|
|
425
|
+
return back !== undefined && this.entries().some((entry) => entry.name === back);
|
|
426
|
+
}, /* @ts-ignore */
|
|
427
|
+
...(ngDevMode ? [{ debugName: "returning" }] : /* istanbul ignore next */ []));
|
|
428
|
+
isFinal = computed(() => {
|
|
429
|
+
const current = this.current();
|
|
430
|
+
if (current === undefined)
|
|
431
|
+
return false;
|
|
432
|
+
return (nextDestination({
|
|
433
|
+
current,
|
|
434
|
+
returnTo: this.returnTo(),
|
|
435
|
+
steps: this.entries(),
|
|
436
|
+
value: { ...this.accepted(), [current]: {} },
|
|
437
|
+
}).kind === 'submit');
|
|
438
|
+
}, /* @ts-ignore */
|
|
439
|
+
...(ngDevMode ? [{ debugName: "isFinal" }] : /* istanbul ignore next */ []));
|
|
440
|
+
nextLabel = computed(() => this.t(this.returning() ? 'return' : this.isFinal() ? 'submit' : 'next'), /* @ts-ignore */
|
|
441
|
+
...(ngDevMode ? [{ debugName: "nextLabel" }] : /* istanbul ignore next */ []));
|
|
442
|
+
busy = computed(() => this.pending() !== undefined || this.phase() === 'submitting', /* @ts-ignore */
|
|
443
|
+
...(ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []));
|
|
444
|
+
hasForm = computed(() => this.form() !== undefined, /* @ts-ignore */
|
|
445
|
+
...(ngDevMode ? [{ debugName: "hasForm" }] : /* istanbul ignore next */ []));
|
|
446
|
+
canCancel = computed(() => this.cancellable(), /* @ts-ignore */
|
|
447
|
+
...(ngDevMode ? [{ debugName: "canCancel" }] : /* istanbul ignore next */ []));
|
|
448
|
+
canSaveDraft = computed(() => this.draftable() || this.persistence() !== undefined, /* @ts-ignore */
|
|
449
|
+
...(ngDevMode ? [{ debugName: "canSaveDraft" }] : /* istanbul ignore next */ []));
|
|
450
|
+
errorShown = computed(() => this.error() !== undefined || this.failure() !== undefined, /* @ts-ignore */
|
|
451
|
+
...(ngDevMode ? [{ debugName: "errorShown" }] : /* istanbul ignore next */ []));
|
|
452
|
+
renderKey = computed(() => `${this.current() ?? ''}-${this.epoch()}`, /* @ts-ignore */
|
|
453
|
+
...(ngDevMode ? [{ debugName: "renderKey" }] : /* istanbul ignore next */ []));
|
|
454
|
+
stepContext = computed(() => {
|
|
455
|
+
const name = this.current() ?? '';
|
|
456
|
+
const values = this.drafts()[name] ?? this.accepted()[name] ?? {};
|
|
457
|
+
return {
|
|
458
|
+
$implicit: values,
|
|
459
|
+
complete: stepComplete(this.accepted(), name),
|
|
460
|
+
errors: this.stepErrors()[name],
|
|
461
|
+
name,
|
|
462
|
+
optional: this.optionalStep(),
|
|
463
|
+
values,
|
|
464
|
+
};
|
|
465
|
+
}, /* @ts-ignore */
|
|
466
|
+
...(ngDevMode ? [{ debugName: "stepContext" }] : /* istanbul ignore next */ []));
|
|
467
|
+
constructor() {
|
|
468
|
+
/* A resolved step that differs from the requested one is written back. */
|
|
469
|
+
effect(() => {
|
|
470
|
+
const current = this.current();
|
|
471
|
+
const requested = this.step();
|
|
472
|
+
const entries = this.entries();
|
|
473
|
+
untracked(() => {
|
|
474
|
+
this.previousEntries = entries;
|
|
475
|
+
if (!this.initialised)
|
|
476
|
+
return;
|
|
477
|
+
assertUniqueSteps(entries);
|
|
478
|
+
if (current === undefined || current === requested)
|
|
479
|
+
return;
|
|
480
|
+
this.leave();
|
|
481
|
+
this.requestStep(current, 'programmatic', undefined, false);
|
|
482
|
+
});
|
|
483
|
+
});
|
|
484
|
+
/* A step a router wrote on its own is clamped to one in reach. */
|
|
485
|
+
effect(() => {
|
|
486
|
+
const requested = this.step();
|
|
487
|
+
untracked(() => {
|
|
488
|
+
if (!this.initialised || requested === undefined || requested === this.ownWrite)
|
|
489
|
+
return;
|
|
490
|
+
const clamped = clampStep({
|
|
491
|
+
linear: this.resolvedLinear(),
|
|
492
|
+
requested,
|
|
493
|
+
steps: this.entries(),
|
|
494
|
+
value: this.accepted(),
|
|
495
|
+
});
|
|
496
|
+
if (clamped !== undefined && clamped !== requested) {
|
|
497
|
+
this.requestStep(clamped, 'programmatic', undefined, false);
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
});
|
|
501
|
+
/* Focus follows the step, the failure or the completion, after render. */
|
|
502
|
+
effect(() => {
|
|
503
|
+
this.current();
|
|
504
|
+
this.phase();
|
|
505
|
+
this.failure();
|
|
506
|
+
untracked(() => {
|
|
507
|
+
const target = this.focusNext;
|
|
508
|
+
if (target === undefined)
|
|
509
|
+
return;
|
|
510
|
+
afterNextRender(() => {
|
|
511
|
+
if (this.focusNext !== target)
|
|
512
|
+
return;
|
|
513
|
+
const element = target === 'alert'
|
|
514
|
+
? this.alertRef()?.nativeElement
|
|
515
|
+
: target === 'complete'
|
|
516
|
+
? this.completeRef()?.nativeElement
|
|
517
|
+
: this.titleRef()?.nativeElement;
|
|
518
|
+
if (element === undefined)
|
|
519
|
+
return;
|
|
520
|
+
this.focusNext = undefined;
|
|
521
|
+
element.focus();
|
|
522
|
+
}, { injector: this.injector });
|
|
523
|
+
});
|
|
524
|
+
});
|
|
525
|
+
const destroyRef = inject(DestroyRef);
|
|
526
|
+
const onBeforeUnload = (event) => {
|
|
527
|
+
if (this.guardUnsaved() && this.dirty())
|
|
528
|
+
event.preventDefault();
|
|
529
|
+
};
|
|
530
|
+
if (typeof window !== 'undefined') {
|
|
531
|
+
window.addEventListener('beforeunload', onBeforeUnload);
|
|
532
|
+
destroyRef.onDestroy(() => window.removeEventListener('beforeunload', onBeforeUnload));
|
|
533
|
+
}
|
|
534
|
+
destroyRef.onDestroy(() => this.validation?.abort());
|
|
535
|
+
}
|
|
536
|
+
ngAfterContentInit() {
|
|
537
|
+
assertUniqueSteps(this.entries());
|
|
538
|
+
if (this.defaultProgressOpen() && !this.progressOpen())
|
|
539
|
+
this.progressOpen.set(true);
|
|
540
|
+
const loaded = this.persistence()?.load();
|
|
541
|
+
const snapshot = isPromise(loaded) ? undefined : loaded;
|
|
542
|
+
/* A restored value is requested in either mode, so a consumer that derives
|
|
543
|
+
a branch from it — through [(value)] or (valueChangeRequest) — hears it. */
|
|
544
|
+
if (snapshot !== undefined)
|
|
545
|
+
this.requestValue(snapshot.value, 'programmatic');
|
|
546
|
+
else if (this.value() === undefined)
|
|
547
|
+
this.value.set(this.defaultValue() ?? EMPTY);
|
|
548
|
+
if (snapshot !== undefined) {
|
|
549
|
+
this.drafts.set(snapshot.drafts);
|
|
550
|
+
this.resolveRestored(snapshot.step);
|
|
551
|
+
}
|
|
552
|
+
const requested = snapshot?.step ?? this.step() ?? this.defaultStep();
|
|
553
|
+
const start = clampStep({
|
|
554
|
+
linear: this.resolvedLinear(),
|
|
555
|
+
requested,
|
|
556
|
+
steps: this.entries(),
|
|
557
|
+
value: this.accepted(),
|
|
558
|
+
});
|
|
559
|
+
if (start !== undefined && start !== this.step()) {
|
|
560
|
+
if (this.step() === undefined) {
|
|
561
|
+
this.ownWrite = start;
|
|
562
|
+
this.step.set(start);
|
|
563
|
+
}
|
|
564
|
+
else
|
|
565
|
+
this.requestStep(start, 'programmatic', undefined, false);
|
|
566
|
+
}
|
|
567
|
+
this.initialised = true;
|
|
568
|
+
if (isPromise(loaded))
|
|
569
|
+
this.restore(loaded);
|
|
570
|
+
}
|
|
571
|
+
/* ── Requests ──────────────────────────────────────────────────────── */
|
|
572
|
+
requestStep(next, reason, source, focus = true) {
|
|
573
|
+
const from = this.current();
|
|
574
|
+
if (next === from && next === this.step())
|
|
575
|
+
return false;
|
|
576
|
+
let cancelled = false;
|
|
577
|
+
const state = createControllable({
|
|
578
|
+
initial: this.step() ?? from ?? next,
|
|
579
|
+
onRequest: (raw) => {
|
|
580
|
+
this.stepChangeRequest.emit(this.wrap(raw, reason));
|
|
581
|
+
cancelled = raw.cancelled;
|
|
582
|
+
},
|
|
583
|
+
});
|
|
584
|
+
const moved = state.request(next, reason, source);
|
|
585
|
+
if (!moved || cancelled)
|
|
586
|
+
return false;
|
|
587
|
+
this.ownWrite = next;
|
|
588
|
+
this.step.set(next);
|
|
589
|
+
if (focus)
|
|
590
|
+
this.focusNext = 'title';
|
|
591
|
+
return true;
|
|
592
|
+
}
|
|
593
|
+
requestValue(next, reason, source) {
|
|
594
|
+
let cancelled = false;
|
|
595
|
+
const state = createControllable({
|
|
596
|
+
initial: this.accepted(),
|
|
597
|
+
onRequest: (raw) => {
|
|
598
|
+
this.valueChangeRequest.emit(this.wrap(raw, reason));
|
|
599
|
+
cancelled = raw.cancelled;
|
|
600
|
+
},
|
|
601
|
+
});
|
|
602
|
+
if (!state.request(next, reason, source) || cancelled)
|
|
603
|
+
return false;
|
|
604
|
+
this.value.set(next);
|
|
605
|
+
return true;
|
|
606
|
+
}
|
|
607
|
+
requestOpen(next, reason, source) {
|
|
608
|
+
let cancelled = false;
|
|
609
|
+
const state = createControllable({
|
|
610
|
+
initial: this.progressOpen(),
|
|
611
|
+
onRequest: (raw) => {
|
|
612
|
+
this.progressOpenChangeRequest.emit(this.wrap(raw, reason));
|
|
613
|
+
cancelled = raw.cancelled;
|
|
614
|
+
},
|
|
615
|
+
});
|
|
616
|
+
if (!state.request(next, reason, source) || cancelled)
|
|
617
|
+
return;
|
|
618
|
+
this.progressOpen.set(next);
|
|
619
|
+
}
|
|
620
|
+
wrap(raw, reason) {
|
|
621
|
+
return {
|
|
622
|
+
cancel: () => raw.cancel(),
|
|
623
|
+
get cancelled() {
|
|
624
|
+
return raw.cancelled;
|
|
625
|
+
},
|
|
626
|
+
previous: raw.previous,
|
|
627
|
+
reason,
|
|
628
|
+
source: raw.source,
|
|
629
|
+
value: raw.value,
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
/* ── Forms ─────────────────────────────────────────────────────────── */
|
|
633
|
+
registerForm(form) {
|
|
634
|
+
this.form.set(form);
|
|
635
|
+
}
|
|
636
|
+
unregisterForm(form) {
|
|
637
|
+
if (this.form() === form)
|
|
638
|
+
this.form.set(undefined);
|
|
639
|
+
}
|
|
640
|
+
isComplete(name) {
|
|
641
|
+
return stepComplete(this.accepted(), name);
|
|
642
|
+
}
|
|
643
|
+
isReachable(name) {
|
|
644
|
+
return (this.phase() === 'complete' ||
|
|
645
|
+
reachableStep({
|
|
646
|
+
current: this.current(),
|
|
647
|
+
linear: this.resolvedLinear(),
|
|
648
|
+
steps: this.entries(),
|
|
649
|
+
target: name,
|
|
650
|
+
value: this.accepted(),
|
|
651
|
+
}));
|
|
652
|
+
}
|
|
653
|
+
/* ── The cycle of a step ───────────────────────────────────────────── */
|
|
654
|
+
/**
|
|
655
|
+
* The step's form passed the platform's and Reactive Forms' validation. The
|
|
656
|
+
* step's `validate` runs next; a promise holds the next button in its
|
|
657
|
+
* loading state and is aborted when the reader leaves (decision 4).
|
|
658
|
+
*/
|
|
659
|
+
commit(typed, source) {
|
|
660
|
+
const name = this.current();
|
|
661
|
+
if (name === undefined || this.pending() !== undefined || this.phase() !== 'editing')
|
|
662
|
+
return;
|
|
663
|
+
const step = this.currentStep();
|
|
664
|
+
const answers = step?.values() ?? typed;
|
|
665
|
+
const check = step?.validate();
|
|
666
|
+
if (check === undefined) {
|
|
667
|
+
this.accept(name, answers, source);
|
|
668
|
+
return;
|
|
669
|
+
}
|
|
670
|
+
this.validation?.abort();
|
|
671
|
+
const controller = new AbortController();
|
|
672
|
+
this.validation = controller;
|
|
673
|
+
const found = (errors) => {
|
|
674
|
+
if (controller.signal.aborted)
|
|
675
|
+
return;
|
|
676
|
+
if (this.validation === controller)
|
|
677
|
+
this.validation = undefined;
|
|
678
|
+
this.pending.set(undefined);
|
|
679
|
+
if (errors !== undefined && errors !== null && hasErrors(normaliseErrors(errors))) {
|
|
680
|
+
this.markInvalid(name, true);
|
|
681
|
+
this.jumpTarget = undefined;
|
|
682
|
+
return errors;
|
|
683
|
+
}
|
|
684
|
+
if (this.current() !== name)
|
|
685
|
+
return;
|
|
686
|
+
this.accept(name, answers, source);
|
|
687
|
+
};
|
|
688
|
+
const result = check(answers, { signal: controller.signal, value: this.accepted() });
|
|
689
|
+
if (!isPromise(result))
|
|
690
|
+
return found(result);
|
|
691
|
+
this.pending.set(name);
|
|
692
|
+
return result.then(found, () => {
|
|
693
|
+
if (!controller.signal.aborted)
|
|
694
|
+
this.pending.set(undefined);
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
accept(name, answers, source) {
|
|
698
|
+
const accepted = { ...this.accepted(), [name]: answers };
|
|
699
|
+
if (!this.requestValue(accepted, 'submit', source))
|
|
700
|
+
return;
|
|
701
|
+
const drafts = without(this.drafts(), name);
|
|
702
|
+
this.drafts.set(drafts);
|
|
703
|
+
this.stepErrors.update((errors) => {
|
|
704
|
+
if (!(name in errors))
|
|
705
|
+
return errors;
|
|
706
|
+
const next = { ...errors };
|
|
707
|
+
delete next[name];
|
|
708
|
+
return next;
|
|
709
|
+
});
|
|
710
|
+
this.markInvalid(name, false);
|
|
711
|
+
/**
|
|
712
|
+
* Where the flow goes is decided after the consumer's template has run
|
|
713
|
+
* again with the new value, not now. A step the answer opens — Company
|
|
714
|
+
* after Business, an `@if` over the value — exists only once the view
|
|
715
|
+
* that declares it has been checked; decided here, the destination
|
|
716
|
+
* skipped it and went to the step after.
|
|
717
|
+
*/
|
|
718
|
+
afterNextRender(() => {
|
|
719
|
+
if (this.current() !== name || this.phase() !== 'editing')
|
|
720
|
+
return;
|
|
721
|
+
if (this.resolvedAutosave() === 'step') {
|
|
722
|
+
const destination = nextDestination({
|
|
723
|
+
current: name,
|
|
724
|
+
returnTo: this.returnTo(),
|
|
725
|
+
steps: this.entries(),
|
|
726
|
+
value: accepted,
|
|
727
|
+
});
|
|
728
|
+
void this.write(accepted, drafts, destination.kind === 'step' ? destination.name : name, 'submit', source);
|
|
729
|
+
}
|
|
730
|
+
this.route(accepted, name, source);
|
|
731
|
+
}, { injector: this.injector });
|
|
732
|
+
}
|
|
733
|
+
route(accepted, name, source) {
|
|
734
|
+
const steps = this.entries();
|
|
735
|
+
const jump = this.jumpTarget;
|
|
736
|
+
this.jumpTarget = undefined;
|
|
737
|
+
if (jump !== undefined &&
|
|
738
|
+
reachableStep({
|
|
739
|
+
current: name,
|
|
740
|
+
linear: this.resolvedLinear(),
|
|
741
|
+
steps,
|
|
742
|
+
target: jump,
|
|
743
|
+
value: accepted,
|
|
744
|
+
})) {
|
|
745
|
+
this.requestStep(jump, 'pointer', source);
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
const back = this.returnTo();
|
|
749
|
+
const destination = nextDestination({ current: name, returnTo: back, steps, value: accepted });
|
|
750
|
+
if (back !== undefined && (destination.kind === 'submit' || destination.name === back)) {
|
|
751
|
+
this.returnTo.set(undefined);
|
|
752
|
+
}
|
|
753
|
+
if (back !== undefined && !steps.some((entry) => entry.name === back))
|
|
754
|
+
this.returnTo.set(undefined);
|
|
755
|
+
if (destination.kind === 'step')
|
|
756
|
+
this.requestStep(destination.name, 'submit', source);
|
|
757
|
+
else
|
|
758
|
+
this.submitFlow(accepted, source);
|
|
759
|
+
}
|
|
760
|
+
submitFlow(accepted, source) {
|
|
761
|
+
const open = firstIncomplete({ steps: this.entries(), value: accepted });
|
|
762
|
+
if (open !== undefined) {
|
|
763
|
+
this.requestStep(open, 'submit', source);
|
|
764
|
+
this.failure.set({ message: this.t('incomplete') });
|
|
765
|
+
this.focusNext = 'alert';
|
|
766
|
+
return;
|
|
767
|
+
}
|
|
768
|
+
this.failure.set(undefined);
|
|
769
|
+
this.phase.set('submitting');
|
|
770
|
+
const settle = (answer) => {
|
|
771
|
+
if (typeof answer === 'object' && answer !== null) {
|
|
772
|
+
this.fail(answer, source);
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
this.phase.set('complete');
|
|
776
|
+
this.drafts.set(EMPTY);
|
|
777
|
+
void this.persistence()?.clear();
|
|
778
|
+
this.focusNext = 'complete';
|
|
779
|
+
this.completed.emit(accepted);
|
|
780
|
+
};
|
|
781
|
+
let answer;
|
|
782
|
+
try {
|
|
783
|
+
answer = this.submitWizard()?.(includedValues(accepted, this.entries()), {
|
|
784
|
+
reason: 'submit',
|
|
785
|
+
source,
|
|
786
|
+
value: accepted,
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
catch {
|
|
790
|
+
this.fail({}, source);
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
if (isPromise(answer)) {
|
|
794
|
+
answer.then(settle, () => this.fail({}, source));
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
797
|
+
settle(answer);
|
|
798
|
+
}
|
|
799
|
+
fail(reported, source) {
|
|
800
|
+
this.phase.set('editing');
|
|
801
|
+
this.failure.set(reported);
|
|
802
|
+
const target = reported.step;
|
|
803
|
+
if (target !== undefined && this.entries().some((entry) => entry.name === target)) {
|
|
804
|
+
if (reported.errors !== undefined) {
|
|
805
|
+
this.stepErrors.update((errors) => ({
|
|
806
|
+
...errors,
|
|
807
|
+
[target]: reported.errors,
|
|
808
|
+
}));
|
|
809
|
+
this.markInvalid(target, true);
|
|
810
|
+
}
|
|
811
|
+
if (target === this.current())
|
|
812
|
+
this.epoch.update((epoch) => epoch + 1);
|
|
813
|
+
else
|
|
814
|
+
this.requestStep(target, 'programmatic', source);
|
|
815
|
+
}
|
|
816
|
+
this.focusNext = 'alert';
|
|
817
|
+
}
|
|
818
|
+
/** The errors a failed submission sent back for this step, for its form. */
|
|
819
|
+
errorsFor(name) {
|
|
820
|
+
return this.stepErrors()[name];
|
|
821
|
+
}
|
|
822
|
+
markInvalid(name, invalid) {
|
|
823
|
+
this.invalid.update((names) => {
|
|
824
|
+
if (names.has(name) === invalid)
|
|
825
|
+
return names;
|
|
826
|
+
const next = new Set(names);
|
|
827
|
+
if (invalid)
|
|
828
|
+
next.add(name);
|
|
829
|
+
else
|
|
830
|
+
next.delete(name);
|
|
831
|
+
return next;
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
leave() {
|
|
835
|
+
this.validation?.abort();
|
|
836
|
+
this.validation = undefined;
|
|
837
|
+
this.pending.set(undefined);
|
|
838
|
+
}
|
|
839
|
+
/** What was typed on this step and not accepted, kept for when it returns. */
|
|
840
|
+
stash() {
|
|
841
|
+
const form = this.form();
|
|
842
|
+
const name = this.current();
|
|
843
|
+
if (form === undefined || name === undefined || !form.dirty())
|
|
844
|
+
return this.drafts();
|
|
845
|
+
const next = { ...this.drafts(), [name]: form.typed() };
|
|
846
|
+
this.drafts.set(next);
|
|
847
|
+
return next;
|
|
848
|
+
}
|
|
849
|
+
async write(value, drafts, step, reason, source) {
|
|
850
|
+
const persistence = this.persistence();
|
|
851
|
+
const snapshot = createSnapshot({ drafts, step, value, version: this.version() });
|
|
852
|
+
this.draftState.set('saving');
|
|
853
|
+
try {
|
|
854
|
+
this.draftSave.emit({ reason, snapshot, source });
|
|
855
|
+
await persistence?.save(snapshot);
|
|
856
|
+
this.savedAt.set(new Date(snapshot.savedAt));
|
|
857
|
+
this.draftState.set('saved');
|
|
858
|
+
}
|
|
859
|
+
catch {
|
|
860
|
+
this.draftState.set('failed');
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
restore(load) {
|
|
864
|
+
this.restoring.set(true);
|
|
865
|
+
let shownAt;
|
|
866
|
+
const delay = this.delay() ?? this.defaults.delay;
|
|
867
|
+
const minDuration = this.minDuration() ?? this.defaults.minDuration;
|
|
868
|
+
const timer = setTimeout(() => {
|
|
869
|
+
shownAt = Date.now();
|
|
870
|
+
this.skeleton.set(true);
|
|
871
|
+
}, delay);
|
|
872
|
+
const finish = (snapshot) => {
|
|
873
|
+
clearTimeout(timer);
|
|
874
|
+
const apply = () => {
|
|
875
|
+
this.skeleton.set(false);
|
|
876
|
+
this.restoring.set(false);
|
|
877
|
+
if (snapshot === undefined)
|
|
878
|
+
return;
|
|
879
|
+
this.requestValue(snapshot.value, 'programmatic');
|
|
880
|
+
this.drafts.set(snapshot.drafts);
|
|
881
|
+
this.resolveRestored(snapshot.step);
|
|
882
|
+
};
|
|
883
|
+
const remaining = shownAt === undefined ? 0 : minDuration - (Date.now() - shownAt);
|
|
884
|
+
if (remaining > 0)
|
|
885
|
+
setTimeout(apply, remaining);
|
|
886
|
+
else
|
|
887
|
+
apply();
|
|
888
|
+
};
|
|
889
|
+
load.then(finish, () => finish(undefined));
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* The step a draft was saved on, resolved after the consumer's template has
|
|
893
|
+
* run with the restored value: the step may be one that value opens, and
|
|
894
|
+
* before that render it does not exist.
|
|
895
|
+
*/
|
|
896
|
+
resolveRestored(step) {
|
|
897
|
+
afterNextRender(() => {
|
|
898
|
+
const target = clampStep({
|
|
899
|
+
linear: this.resolvedLinear(),
|
|
900
|
+
requested: step,
|
|
901
|
+
steps: this.entries(),
|
|
902
|
+
value: this.accepted(),
|
|
903
|
+
});
|
|
904
|
+
if (target !== undefined && target !== this.current()) {
|
|
905
|
+
this.requestStep(target, 'programmatic', undefined, false);
|
|
906
|
+
}
|
|
907
|
+
}, { injector: this.injector });
|
|
908
|
+
}
|
|
909
|
+
dirty() {
|
|
910
|
+
const form = this.form();
|
|
911
|
+
return (this.phase() !== 'complete' &&
|
|
912
|
+
((form !== undefined && form.dirty()) ||
|
|
913
|
+
Object.keys(this.drafts()).length > 0 ||
|
|
914
|
+
Object.keys(this.accepted()).length > 0));
|
|
915
|
+
}
|
|
916
|
+
/* ── The moves ─────────────────────────────────────────────────────── */
|
|
917
|
+
/** Submits the current step, as the next button does. */
|
|
918
|
+
next(source) {
|
|
919
|
+
if (this.disabled() || this.phase() !== 'editing')
|
|
920
|
+
return;
|
|
921
|
+
const form = this.form();
|
|
922
|
+
if (form !== undefined) {
|
|
923
|
+
form.submit();
|
|
924
|
+
return;
|
|
925
|
+
}
|
|
926
|
+
const name = this.current();
|
|
927
|
+
if (name !== undefined)
|
|
928
|
+
void this.commit({}, source);
|
|
929
|
+
}
|
|
930
|
+
/** One step back, keeping what was typed. */
|
|
931
|
+
previous(source) {
|
|
932
|
+
const name = this.current();
|
|
933
|
+
if (name === undefined || this.busy() || this.disabled() || this.phase() !== 'editing')
|
|
934
|
+
return;
|
|
935
|
+
const target = previousStep({ current: name, steps: this.entries() });
|
|
936
|
+
if (target === undefined)
|
|
937
|
+
return;
|
|
938
|
+
this.stash();
|
|
939
|
+
this.leave();
|
|
940
|
+
this.requestStep(target, 'pointer', source);
|
|
941
|
+
}
|
|
942
|
+
/** Goes to a step: back freely, forward through a submission of this one. */
|
|
943
|
+
goTo(name, reason = 'programmatic', source) {
|
|
944
|
+
const from = this.current();
|
|
945
|
+
const steps = this.entries();
|
|
946
|
+
if (from === undefined || name === from || this.phase() !== 'editing' || this.disabled())
|
|
947
|
+
return;
|
|
948
|
+
const target = steps.findIndex((entry) => entry.name === name);
|
|
949
|
+
const here = steps.findIndex((entry) => entry.name === from);
|
|
950
|
+
if (target === -1)
|
|
951
|
+
return;
|
|
952
|
+
if (target < here) {
|
|
953
|
+
this.stash();
|
|
954
|
+
this.leave();
|
|
955
|
+
this.requestStep(name, reason, source);
|
|
956
|
+
return;
|
|
957
|
+
}
|
|
958
|
+
if (this.pending() !== undefined)
|
|
959
|
+
return;
|
|
960
|
+
if (!reachableStep({
|
|
961
|
+
current: from,
|
|
962
|
+
linear: this.resolvedLinear(),
|
|
963
|
+
steps,
|
|
964
|
+
target: name,
|
|
965
|
+
value: { ...this.accepted(), [from]: {} },
|
|
966
|
+
})) {
|
|
967
|
+
return;
|
|
968
|
+
}
|
|
969
|
+
this.jumpTarget = name;
|
|
970
|
+
this.next(source);
|
|
971
|
+
if (this.validation === undefined && this.jumpTarget === name)
|
|
972
|
+
this.jumpTarget = undefined;
|
|
973
|
+
}
|
|
974
|
+
/** Goes to a step and comes back here once it is accepted. */
|
|
975
|
+
edit(name, source) {
|
|
976
|
+
const from = this.current();
|
|
977
|
+
if (from === undefined || this.phase() !== 'editing' || this.disabled())
|
|
978
|
+
return;
|
|
979
|
+
this.returnTo.set(from);
|
|
980
|
+
this.stash();
|
|
981
|
+
this.leave();
|
|
982
|
+
this.requestStep(name, 'pointer', source);
|
|
983
|
+
}
|
|
984
|
+
/** Accepts an optional step with no answers. */
|
|
985
|
+
skip(source) {
|
|
986
|
+
const name = this.current();
|
|
987
|
+
if (name === undefined || !this.optionalStep() || this.busy() || this.disabled())
|
|
988
|
+
return;
|
|
989
|
+
if (this.phase() !== 'editing')
|
|
990
|
+
return;
|
|
991
|
+
this.leave();
|
|
992
|
+
this.accept(name, {}, source);
|
|
993
|
+
}
|
|
994
|
+
cancel(source) {
|
|
995
|
+
if (this.phase() === 'submitting')
|
|
996
|
+
return;
|
|
997
|
+
this.cancelRequest.emit({ dirty: this.dirty(), source });
|
|
998
|
+
}
|
|
999
|
+
saveDraft(reason = 'programmatic', source) {
|
|
1000
|
+
const name = this.current();
|
|
1001
|
+
if (name === undefined || this.phase() !== 'editing')
|
|
1002
|
+
return;
|
|
1003
|
+
const drafts = this.stash();
|
|
1004
|
+
void this.write(this.accepted(), drafts, name, reason, source);
|
|
1005
|
+
}
|
|
1006
|
+
clearDraft() {
|
|
1007
|
+
this.draftState.set('idle');
|
|
1008
|
+
this.savedAt.set(undefined);
|
|
1009
|
+
void this.persistence()?.clear();
|
|
1010
|
+
}
|
|
1011
|
+
/** Back to the first step, with no answers, no draft and no error. */
|
|
1012
|
+
reset() {
|
|
1013
|
+
this.leave();
|
|
1014
|
+
this.jumpTarget = undefined;
|
|
1015
|
+
this.returnTo.set(undefined);
|
|
1016
|
+
this.failure.set(undefined);
|
|
1017
|
+
this.phase.set('editing');
|
|
1018
|
+
this.drafts.set(EMPTY);
|
|
1019
|
+
this.stepErrors.set({});
|
|
1020
|
+
this.invalid.set(new Set());
|
|
1021
|
+
this.draftState.set('idle');
|
|
1022
|
+
this.savedAt.set(undefined);
|
|
1023
|
+
this.requestValue(EMPTY, 'clear');
|
|
1024
|
+
const first = clampStep({
|
|
1025
|
+
linear: this.resolvedLinear(),
|
|
1026
|
+
requested: undefined,
|
|
1027
|
+
steps: this.entries(),
|
|
1028
|
+
value: EMPTY,
|
|
1029
|
+
});
|
|
1030
|
+
if (first !== undefined)
|
|
1031
|
+
this.requestStep(first, 'programmatic', undefined);
|
|
1032
|
+
void this.persistence()?.clear();
|
|
1033
|
+
}
|
|
1034
|
+
focus() {
|
|
1035
|
+
this.titleRef()?.nativeElement.focus();
|
|
1036
|
+
}
|
|
1037
|
+
/* ── The progress ──────────────────────────────────────────────────── */
|
|
1038
|
+
onHeader(request) {
|
|
1039
|
+
const target = this.entries()[request.value]?.name;
|
|
1040
|
+
if (target === undefined)
|
|
1041
|
+
return;
|
|
1042
|
+
if (this.progressOpen())
|
|
1043
|
+
this.requestOpen(false, 'select', request.source);
|
|
1044
|
+
this.goTo(target, request.reason === 'keyboard' ? 'keyboard' : 'pointer', request.source);
|
|
1045
|
+
}
|
|
1046
|
+
toggleProgress(event) {
|
|
1047
|
+
this.requestOpen(!this.progressOpen(), event.detail === 0 ? 'keyboard' : 'pointer', event);
|
|
1048
|
+
}
|
|
1049
|
+
onProgressKeydown(event) {
|
|
1050
|
+
if (event.key !== 'Escape' || !this.progressOpen())
|
|
1051
|
+
return;
|
|
1052
|
+
event.preventDefault();
|
|
1053
|
+
this.requestOpen(false, 'escape', event);
|
|
1054
|
+
this.toggleRef()?.nativeElement.focus();
|
|
1055
|
+
}
|
|
1056
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1057
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlWizard, isStandalone: true, selector: "[slWizard]", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, progressOpen: { classPropertyName: "progressOpen", publicName: "progressOpen", isSignal: true, isRequired: false, transformFunction: null }, defaultStep: { classPropertyName: "defaultStep", publicName: "defaultStep", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, defaultProgressOpen: { classPropertyName: "defaultProgressOpen", publicName: "defaultProgressOpen", isSignal: true, isRequired: false, transformFunction: null }, progress: { classPropertyName: "progress", publicName: "progress", isSignal: true, isRequired: false, transformFunction: null }, scroll: { classPropertyName: "scroll", publicName: "scroll", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, submitWizard: { classPropertyName: "submitWizard", publicName: "submitWizard", isSignal: true, isRequired: false, transformFunction: null }, persistence: { classPropertyName: "persistence", publicName: "persistence", isSignal: true, isRequired: false, transformFunction: null }, version: { classPropertyName: "version", publicName: "version", isSignal: true, isRequired: false, transformFunction: null }, autosave: { classPropertyName: "autosave", publicName: "autosave", isSignal: true, isRequired: false, transformFunction: null }, guardUnsaved: { classPropertyName: "guardUnsaved", publicName: "guardUnsaved", isSignal: true, isRequired: false, transformFunction: null }, cancellable: { classPropertyName: "cancellable", publicName: "cancellable", isSignal: true, isRequired: false, transformFunction: null }, draftable: { classPropertyName: "draftable", publicName: "draftable", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, minDuration: { classPropertyName: "minDuration", publicName: "minDuration", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { step: "stepChange", value: "valueChange", progressOpen: "progressOpenChange", stepChangeRequest: "stepChangeRequest", valueChangeRequest: "valueChangeRequest", progressOpenChangeRequest: "progressOpenChangeRequest", cancelRequest: "cancelRequest", draftSave: "draftSave", completed: "completed" }, host: { attributes: { "data-ui": "wizard", "data-part": "root" }, properties: { "attr.data-progress": "resolvedProgress()", "attr.data-scroll": "resolvedScroll()", "attr.data-loading": "phase() === 'submitting' || restoring() ? '' : null", "attr.data-invalid": "errorShown() ? '' : null", "attr.data-complete": "phase() === 'complete' ? '' : null", "attr.data-disabled": "disabled() ? '' : null" } }, queries: [{ propertyName: "steps", predicate: SlWizardStep, isSignal: true }, { propertyName: "completeTemplate", first: true, predicate: SlWizardComplete, descendants: true, isSignal: true }, { propertyName: "actionsTemplate", first: true, predicate: SlWizardActions, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "titleRef", first: true, predicate: ["title"], descendants: true, isSignal: true }, { propertyName: "alertRef", first: true, predicate: ["alert"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "completeRef", first: true, predicate: ["complete"], descendants: true, isSignal: true }, { propertyName: "toggleRef", first: true, predicate: ["toggle"], descendants: true, isSignal: true }], exportAs: ["slWizard"], ngImport: i0, template: `
|
|
1058
|
+
<div data-part="layout">
|
|
1059
|
+
@if (resolvedProgress() !== 'none') {
|
|
1060
|
+
<div
|
|
1061
|
+
data-part="progress"
|
|
1062
|
+
[attr.data-open]="progressOpen() ? '' : null"
|
|
1063
|
+
(keydown)="onProgressKeydown($event)"
|
|
1064
|
+
>
|
|
1065
|
+
<button
|
|
1066
|
+
#toggle
|
|
1067
|
+
data-part="progress-toggle"
|
|
1068
|
+
type="button"
|
|
1069
|
+
[attr.aria-controls]="listId"
|
|
1070
|
+
[attr.aria-expanded]="progressOpen()"
|
|
1071
|
+
(click)="toggleProgress($event)"
|
|
1072
|
+
>
|
|
1073
|
+
<span data-part="progress-position">{{ positionText() }}</span>
|
|
1074
|
+
<span aria-hidden="true" data-part="progress-track">
|
|
1075
|
+
@for (entry of entries(); track entry.name) {
|
|
1076
|
+
<span
|
|
1077
|
+
data-part="progress-segment"
|
|
1078
|
+
[attr.data-complete]="
|
|
1079
|
+
finished() || (entry.name !== current() && isComplete(entry.name)) ? '' : null
|
|
1080
|
+
"
|
|
1081
|
+
[attr.data-current]="!finished() && entry.name === current() ? '' : null"
|
|
1082
|
+
[attr.data-invalid]="invalid().has(entry.name) ? '' : null"
|
|
1083
|
+
></span>
|
|
1084
|
+
}
|
|
1085
|
+
</span>
|
|
1086
|
+
<span slIcon><svg slGlyph name="chevron-down"></svg></span>
|
|
1087
|
+
</button>
|
|
1088
|
+
<div
|
|
1089
|
+
slStepper
|
|
1090
|
+
[messages]="stepperMessages()"
|
|
1091
|
+
[navigation]="phase() === 'complete' ? 'none' : 'button'"
|
|
1092
|
+
[orientation]="resolvedProgress() === 'top' ? 'horizontal' : 'vertical'"
|
|
1093
|
+
[step]="finished() ? entries().length : currentIndex()"
|
|
1094
|
+
(stepChange)="onHeader($event)"
|
|
1095
|
+
>
|
|
1096
|
+
<ol slStepperList [attr.id]="listId">
|
|
1097
|
+
@for (item of steps(); track item.name()) {
|
|
1098
|
+
<li
|
|
1099
|
+
slStepperStep
|
|
1100
|
+
[complete]="phase() === 'complete' || isComplete(item.name())"
|
|
1101
|
+
[description]="item.optional() ? t('optional') : undefined"
|
|
1102
|
+
[disabled]="disabled() || item.disabled() || !isReachable(item.name())"
|
|
1103
|
+
[invalid]="invalid().has(item.name())"
|
|
1104
|
+
[label]="item.label()"
|
|
1105
|
+
[loading]="pending() === item.name()"
|
|
1106
|
+
></li>
|
|
1107
|
+
}
|
|
1108
|
+
</ol>
|
|
1109
|
+
</div>
|
|
1110
|
+
</div>
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
<div data-part="main">
|
|
1114
|
+
@if (errorShown()) {
|
|
1115
|
+
<div data-part="error">
|
|
1116
|
+
<section #alert slAlert live="off" reach="section" tone="danger">
|
|
1117
|
+
<div slAlertContent>
|
|
1118
|
+
<div slAlertTitle>{{ error() ?? t('submitFailed') }}</div>
|
|
1119
|
+
@if (error() === undefined && failure()?.message) {
|
|
1120
|
+
<p slAlertDescription>{{ failure()?.message }}</p>
|
|
1121
|
+
}
|
|
1122
|
+
</div>
|
|
1123
|
+
</section>
|
|
1124
|
+
</div>
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
@if (phase() === 'complete') {
|
|
1128
|
+
<div #complete data-part="complete" tabindex="-1">
|
|
1129
|
+
@if (completeTemplate(); as done) {
|
|
1130
|
+
<ng-container *ngTemplateOutlet="done.template"></ng-container>
|
|
1131
|
+
}
|
|
1132
|
+
</div>
|
|
1133
|
+
} @else {
|
|
1134
|
+
<div data-part="step" [attr.aria-busy]="restoring() ? 'true' : null">
|
|
1135
|
+
@if (restoring()) {
|
|
1136
|
+
@if (skeleton()) {
|
|
1137
|
+
<div aria-hidden="true" data-part="step-header">
|
|
1138
|
+
<div data-part="step-title">
|
|
1139
|
+
<span data-part="position"><span slSkeleton inlineSize="5.5rem"></span></span>
|
|
1140
|
+
<span slSkeleton inlineSize="13rem"></span>
|
|
1141
|
+
</div>
|
|
1142
|
+
</div>
|
|
1143
|
+
<div aria-hidden="true" data-part="skeleton">
|
|
1144
|
+
<div data-label-placement="top" data-part="root" data-size="md" data-ui="field">
|
|
1145
|
+
<span data-part="label"><span slSkeleton inlineSize="7rem"></span></span>
|
|
1146
|
+
<div data-part="control">
|
|
1147
|
+
<span
|
|
1148
|
+
slSkeleton
|
|
1149
|
+
shape="block"
|
|
1150
|
+
blockSize="var(--slotted-control-height-md)"
|
|
1151
|
+
></span>
|
|
1152
|
+
</div>
|
|
1153
|
+
</div>
|
|
1154
|
+
</div>
|
|
1155
|
+
}
|
|
1156
|
+
} @else if (currentStep(); as step) {
|
|
1157
|
+
<div data-part="step-header">
|
|
1158
|
+
@switch (resolvedLevel()) {
|
|
1159
|
+
@case (3) {
|
|
1160
|
+
<h3 #title data-part="step-title" tabindex="-1" [id]="titleId">
|
|
1161
|
+
<ng-container *ngTemplateOutlet="heading; context: { $implicit: step }" />
|
|
1162
|
+
</h3>
|
|
1163
|
+
}
|
|
1164
|
+
@case (4) {
|
|
1165
|
+
<h4 #title data-part="step-title" tabindex="-1" [id]="titleId">
|
|
1166
|
+
<ng-container *ngTemplateOutlet="heading; context: { $implicit: step }" />
|
|
1167
|
+
</h4>
|
|
1168
|
+
}
|
|
1169
|
+
@default {
|
|
1170
|
+
<h2 #title data-part="step-title" tabindex="-1" [id]="titleId">
|
|
1171
|
+
<ng-container *ngTemplateOutlet="heading; context: { $implicit: step }" />
|
|
1172
|
+
</h2>
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
@if (step.description()) {
|
|
1176
|
+
<p data-part="step-description">{{ step.description() }}</p>
|
|
1177
|
+
}
|
|
1178
|
+
</div>
|
|
1179
|
+
@for (key of [renderKey()]; track key) {
|
|
1180
|
+
<ng-container *ngTemplateOutlet="step.template; context: stepContext()" />
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
</div>
|
|
1184
|
+
@if (!restoring()) {
|
|
1185
|
+
<div data-part="actions">
|
|
1186
|
+
@if (actionsTemplate(); as custom) {
|
|
1187
|
+
<ng-container *ngTemplateOutlet="custom.template"></ng-container>
|
|
1188
|
+
} @else {
|
|
1189
|
+
<div slWizardActionsStart>
|
|
1190
|
+
@if (canCancel()) {
|
|
1191
|
+
<button
|
|
1192
|
+
slButton
|
|
1193
|
+
slWizardCancel
|
|
1194
|
+
tone="secondary"
|
|
1195
|
+
variant="ghost"
|
|
1196
|
+
focusableWhenDisabled
|
|
1197
|
+
[disabled]="phase() === 'submitting'"
|
|
1198
|
+
>
|
|
1199
|
+
{{ t('cancel') }}
|
|
1200
|
+
</button>
|
|
1201
|
+
}
|
|
1202
|
+
@if (canSaveDraft()) {
|
|
1203
|
+
<button
|
|
1204
|
+
slButton
|
|
1205
|
+
slWizardSaveDraft
|
|
1206
|
+
tone="secondary"
|
|
1207
|
+
variant="ghost"
|
|
1208
|
+
focusableWhenDisabled
|
|
1209
|
+
[disabled]="disabled() || busy()"
|
|
1210
|
+
[loading]="draftState() === 'saving'"
|
|
1211
|
+
>
|
|
1212
|
+
{{ t('saveDraft') }}
|
|
1213
|
+
</button>
|
|
1214
|
+
<span slWizardDraftStatus></span>
|
|
1215
|
+
}
|
|
1216
|
+
</div>
|
|
1217
|
+
<div slWizardActionsEnd>
|
|
1218
|
+
@if (optionalStep()) {
|
|
1219
|
+
<button
|
|
1220
|
+
slButton
|
|
1221
|
+
slWizardSkip
|
|
1222
|
+
tone="secondary"
|
|
1223
|
+
variant="ghost"
|
|
1224
|
+
focusableWhenDisabled
|
|
1225
|
+
[disabled]="disabled() || busy()"
|
|
1226
|
+
>
|
|
1227
|
+
{{ t('skip') }}
|
|
1228
|
+
</button>
|
|
1229
|
+
}
|
|
1230
|
+
@if (!isFirst()) {
|
|
1231
|
+
<button
|
|
1232
|
+
slButton
|
|
1233
|
+
slWizardPrevious
|
|
1234
|
+
tone="secondary"
|
|
1235
|
+
variant="outline"
|
|
1236
|
+
focusableWhenDisabled
|
|
1237
|
+
[disabled]="disabled() || busy()"
|
|
1238
|
+
>
|
|
1239
|
+
{{ t('previous') }}
|
|
1240
|
+
</button>
|
|
1241
|
+
}
|
|
1242
|
+
<button
|
|
1243
|
+
slButton
|
|
1244
|
+
slWizardNext
|
|
1245
|
+
tone="accent"
|
|
1246
|
+
variant="solid"
|
|
1247
|
+
focusableWhenDisabled
|
|
1248
|
+
[disabled]="disabled()"
|
|
1249
|
+
[loading]="busy()"
|
|
1250
|
+
[type]="hasForm() ? 'submit' : 'button'"
|
|
1251
|
+
>
|
|
1252
|
+
{{ nextLabel() }}
|
|
1253
|
+
</button>
|
|
1254
|
+
</div>
|
|
1255
|
+
}
|
|
1256
|
+
</div>
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
</div>
|
|
1260
|
+
</div>
|
|
1261
|
+
|
|
1262
|
+
<ng-template #heading let-step>
|
|
1263
|
+
<span data-part="position">{{ positionText() }}</span>
|
|
1264
|
+
{{ step.label() }}
|
|
1265
|
+
@if (step.optional()) {
|
|
1266
|
+
<span data-part="optional"
|
|
1267
|
+
>{{ ' '
|
|
1268
|
+
}}<span slTag shape="pill" size="sm" tone="secondary" variant="soft">{{
|
|
1269
|
+
t('optional')
|
|
1270
|
+
}}</span>
|
|
1271
|
+
</span>
|
|
1272
|
+
}
|
|
1273
|
+
</ng-template>
|
|
1274
|
+
`, isInline: true, styles: ["@layer slotted.components{[data-ui=wizard]{--_text: var(--slotted-text, CanvasText);--_muted: var(--slotted-text-muted, GrayText);--_rule: var(--slotted-wizard-border, var(--slotted-border-subtle, ButtonBorder));--_rule-size: var(--slotted-border-width-thin, 1px);--_progress-size: var(--slotted-wizard-progress-inline-size, 14rem);--_gap: var(--slotted-wizard-gap, var(--slotted-space-9, 2rem));--_rhythm: var(--slotted-wizard-rhythm, var(--slotted-space-8, 1.5rem));--_header-gap: var(--slotted-wizard-header-gap, var(--slotted-space-6, 1rem));--_action-gap: var(--slotted-control-gap-md, var(--slotted-space-3, .375rem));--_ground: var(--slotted-page-ground, var(--slotted-surface, Canvas));--_ring-room: calc( var(--slotted-focus-ring-width, 2px) + var(--slotted-focus-ring-offset, 2px) );color:var(--_text);container-name:slotted-wizard;container-type:inline-size;display:flex;flex-direction:column;font-family:var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif);min-inline-size:0}[data-ui=wizard]>[data-part=layout]{display:grid;gap:var(--_gap);grid-template-columns:minmax(0,1fr);min-inline-size:0}[data-ui=wizard][data-progress=start]>[data-part=layout]{align-items:start;grid-template-columns:var(--_progress-size) minmax(0,1fr)}[data-ui=wizard][data-progress=none]>[data-part=layout]>[data-part=progress]{display:none}[data-ui=wizard]>[data-part=layout]>[data-part=progress]{display:flex;flex-direction:column;gap:var(--slotted-space-4, .5rem);min-inline-size:0}[data-ui=wizard][data-progress=start]:not([data-scroll=self])>[data-part=layout]>[data-part=progress]{inset-block-start:var(--slotted-page-sticky-top, 0px);position:sticky}[data-ui=wizard][data-progress=top]>[data-part=layout]>[data-part=progress]{border-block-end:var(--_rule-size) solid var(--_rule);padding-block-end:var(--_rhythm)}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]{align-items:center;appearance:none;background-color:var(--slotted-control-surface, Field);border:var(--slotted-control-border-width, 1px) solid var(--slotted-control-border-color, ButtonBorder);border-radius:var(--slotted-control-radius, 6px);box-shadow:var(--slotted-control-shadow, none);color:inherit;column-gap:var(--slotted-space-5, .75rem);cursor:pointer;display:none;font:inherit;grid-template-areas:\"position icon\" \"track icon\";grid-template-columns:minmax(0,1fr) auto;inline-size:100%;margin:0;min-block-size:var(--slotted-control-height-lg, 2.75rem);padding-block:var(--slotted-space-4, .5rem);padding-inline:var(--slotted-control-padding-inline-md, .75rem);row-gap:var(--slotted-space-3, .375rem);text-align:start;transition:border-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard, ease)),box-shadow var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard, ease))}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]:hover:not(:disabled):not([data-disabled]){border-color:var( --slotted-wizard-toggle-hover-border-color, var(--slotted-tone-accent-border) )}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]:active:not(:disabled):not([data-disabled]){background-color:var( --slotted-wizard-toggle-active-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]:focus-visible{box-shadow:var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px) var(--slotted-focus-ring-color, Highlight);outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]>[data-part=progress-position]{font-size:var(--slotted-font-size-sm, .8125rem);font-weight:var(--slotted-font-weight-medium, 500);grid-area:position;line-height:var(--slotted-line-height-sm, 1.45)}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]>[data-part=progress-track]{align-items:center;block-size:var(--slotted-space-2, .25rem);display:flex;gap:var(--slotted-space-1, .125rem);grid-area:track;min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]>[data-part=progress-track]>[data-part=progress-segment]{background-color:var( --slotted-wizard-segment-color, var(--slotted-control-border-color, ButtonBorder) );block-size:100%;border-radius:var(--slotted-radius-full, 9999px);flex:1 1 0;transition:background-color var(--slotted-duration-medium) var(--slotted-easing-standard, ease)}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]>[data-part=progress-track]>[data-part=progress-segment]:is([data-complete],[data-current]){background-color:var( --slotted-wizard-segment-color-complete, var(--slotted-tone-accent-solid, Highlight) )}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]>[data-part=progress-track]>[data-part=progress-segment][data-invalid]{background-color:var( --slotted-wizard-segment-color-invalid, var(--slotted-tone-danger-solid, Mark) )}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]>[data-ui=icon]{color:var(--_muted);grid-area:icon;transition:rotate var(--slotted-duration-short) var(--slotted-easing-standard, ease)}[data-ui=wizard]>[data-part=layout]>[data-part=progress][data-open]>[data-part=progress-toggle]>[data-ui=icon]{rotate:180deg}[data-ui=wizard]>[data-part=layout]>[data-part=main]{display:flex;flex-direction:column;gap:var(--_rhythm);min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=error]{min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]{display:flex;flex-direction:column;gap:var(--_header-gap);min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]{display:flex;flex-direction:column;gap:var(--slotted-space-2, .25rem);min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]>[data-part=step-title]{font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) );font-size:var(--slotted-font-size-2xl, 1.25rem);font-weight:var(--slotted-font-weight-semibold, 600);line-height:var(--slotted-line-height-2xl, 1.4);margin:0;outline:none;overflow-wrap:anywhere}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]>[data-part=step-title]>[data-part=position]{color:var(--_muted);display:block;font-size:var(--slotted-font-size-sm, .8125rem);font-weight:var(--slotted-font-weight-medium, 500);line-height:var(--slotted-line-height-sm, 1.45);margin-block-end:var(--slotted-space-1, .125rem)}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]>[data-part=step-title]>[data-part=optional]{margin-inline-start:var(--slotted-space-1, .125rem);vertical-align:middle}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]>[data-part=step-description]{color:var(--_muted);font-size:var(--slotted-font-size-md, .875rem);line-height:var(--slotted-line-height-md, 1.5);margin:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=skeleton]{display:flex;flex-direction:column;min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]{align-items:center;border-block-start:var(--_rule-size) solid var(--_rule);display:flex;flex-wrap:wrap;gap:var(--_action-gap) var(--_gap);justify-content:space-between;padding-block-start:var(--_rhythm)}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>:is([data-part=actions-start],[data-part=actions-end]){align-items:center;display:flex;flex-wrap:wrap;gap:var(--_action-gap);min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>[data-part=actions-start]{align-items:baseline}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>[data-part=actions-end]{justify-content:flex-end;margin-inline-start:auto}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>[data-part=actions-start]>[data-ui=button][data-variant=ghost]:first-child{flex:none;max-inline-size:none;margin-inline-start:calc(var(--slotted-control-padding-inline-md, .75rem) * -1)}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>[data-part=actions-start]>[data-part=draft-status]{color:var(--_muted);font-size:var(--slotted-font-size-sm, .8125rem);line-height:var(--slotted-line-height-sm, 1.45)}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>[data-part=actions-start]>[data-part=draft-status]:empty{display:none}[data-ui=wizard] [data-part=edit]{appearance:none;background:none;border:0;border-radius:var(--slotted-radius-xs, 2px);color:var(--slotted-wizard-edit-color, var(--slotted-tone-accent-text, LinkText));cursor:pointer;font:inherit;font-weight:var(--slotted-font-weight-medium, 500);margin:0;padding:0;text-decoration-line:none;text-decoration-thickness:var(--slotted-border-width-thin, 1px);text-underline-offset:.2em}[data-ui=wizard] [data-part=edit]:hover:not(:disabled):not([aria-disabled=true]){text-decoration-line:underline}[data-ui=wizard] [data-part=edit]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui=wizard] [data-part=edit]:is(:disabled,[aria-disabled=true]){color:var(--slotted-disabled-foreground, GrayText);cursor:not-allowed}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=complete]{min-inline-size:0;outline:none}[data-ui=wizard][data-scroll=self]{block-size:100%;min-block-size:0}[data-ui=wizard][data-scroll=self]>[data-part=layout]{block-size:100%;min-block-size:0}[data-ui=wizard][data-scroll=self]>[data-part=layout]>[data-part=progress]{max-block-size:100%;overflow:auto;padding:var(--_ring-room)}[data-ui=wizard][data-scroll=self]>[data-part=layout]>[data-part=main]{block-size:100%;gap:0;min-block-size:0}[data-ui=wizard][data-scroll=self]>[data-part=layout]>[data-part=main]>:is([data-part=step],[data-part=complete]){flex:1 1 auto;min-block-size:0;overflow:auto;overscroll-behavior:contain;padding-block:var(--_ring-room) var(--_rhythm);padding-inline:var(--_ring-room)}[data-ui=wizard][data-scroll=self]>[data-part=layout]>[data-part=main]>[data-part=error]{padding-block-end:var(--_rhythm);padding-inline:var(--_ring-room)}[data-ui=wizard][data-scroll=self]>[data-part=layout]>[data-part=main]>[data-part=actions]{background-color:var(--_ground);flex:none;padding-block-end:0;padding-inline:var(--_ring-room)}@container slotted-wizard (width < 600px){[data-ui=wizard]>[data-part=layout]{gap:var(--_rhythm)}[data-ui=wizard][data-progress=start]>[data-part=layout]{grid-template-columns:minmax(0,1fr)}[data-ui=wizard][data-progress]>[data-part=layout]>[data-part=progress]{border-block-end:0;padding-block-end:0;position:static}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]{display:grid}[data-ui=wizard]>[data-part=layout]>[data-part=progress]:not([data-open])>[data-ui=stepper]{display:none}[data-ui=wizard]>[data-part=layout]>[data-part=progress][data-open]>[data-ui=stepper]{background-color:var(--slotted-surface-sunken, Canvas);border-radius:var(--slotted-control-radius, 6px);padding:var(--slotted-space-5, .75rem)}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>:is([data-part=actions-start],[data-part=actions-end]){inline-size:100%}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>[data-part=actions-end]>[data-ui=button]:not([data-variant=ghost]){flex:1 1 0}[data-ui=wizard][data-progress=start]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]>[data-part=step-title]>[data-part=position],[data-ui=wizard][data-progress=top]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]>[data-part=step-title]>[data-part=position]{block-size:1px;clip-path:inset(50%);inline-size:1px;margin:0;overflow:hidden;position:absolute;white-space:nowrap}}}\n", "@layer slotted.components{[data-ui=field][data-part=root]{--_font-size: var(--slotted-control-font-size-md, 13px);--_control-block-size: var(--slotted-control-height-md, 34px);--_row-gap: var(--slotted-field-row-gap, var(--slotted-space-3, .375rem));--_column-gap: var(--slotted-field-column-gap, var(--slotted-space-5, .75rem));align-content:start;container-name:slotted-field;container-type:inline-size;display:grid;font-family:var(--slotted-field-font-family, var(--slotted-control-font-family, sans-serif));grid-template-columns:minmax(0,var(--slotted-field-label-inline-size, 12rem)) minmax(0,1fr) auto;min-inline-size:0;row-gap:var(--_row-gap)}[data-ui=field][data-part=root]>*{grid-column:1 / -1}[data-ui=field]>[data-part=control]{min-inline-size:0}[data-ui=field][data-part=root][data-size=sm]{--_help-glyph: max( var(--slotted-field-icon-size-min, 14px), var(--slotted-control-icon-size-sm, 14px) );--_help-inner-size: var(--slotted-control-inner-size-sm, 22px);--_font-size: var(--slotted-control-font-size-sm, 12px);--_control-block-size: var(--slotted-control-height-sm, 30px)}[data-ui=field][data-part=root][data-size=md]{--_help-glyph: max( var(--slotted-field-icon-size-min, 14px), var(--slotted-control-icon-size-sm, 14px) );--_help-inner-size: var(--slotted-control-inner-size-sm, 22px);--_font-size: var(--slotted-control-font-size-md, 13px);--_control-block-size: var(--slotted-control-height-md, 34px)}[data-ui=field][data-part=root][data-size=lg]{--_help-glyph: max( var(--slotted-field-icon-size-min, 14px), var(--slotted-control-icon-size-md, 16px) );--_help-inner-size: var(--slotted-control-inner-size-md, 24px);--_font-size: var(--slotted-control-font-size-lg, 14px);--_control-block-size: var(--slotted-control-height-lg, 38px)}[data-ui=field]>[data-part=label],[data-ui=field]>[data-part=header]>[data-part=label]{color:var(--slotted-field-label-color, var(--slotted-text));font-size:var(--_font-size);font-weight:var(--slotted-field-label-font-weight, var(--slotted-font-weight-medium, 500));line-height:var(--slotted-field-line-height, var(--slotted-line-height-sm, 1.45));min-inline-size:0;overflow-wrap:anywhere;transition:color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing)}[data-ui=field]>[data-part=label],[data-ui=field]>[data-part=header]{grid-column:1 / -1;grid-row:1}[data-ui=field][data-part=root]:has(>[data-part=counter])>[data-part=label]{grid-column:1 / 3}[data-ui=field]>[data-part=label]>[data-part=mark],[data-ui=field]>[data-part=header]>[data-part=label]>[data-part=mark]{color:var(--slotted-field-mark-color, var(--slotted-tone-danger-text));margin-inline-start:var(--slotted-field-mark-gap, var(--slotted-space-2, .25rem));overflow-wrap:normal;unicode-bidi:isolate}[data-ui=field]:is([data-necessity=optional],[data-necessity=words])>[data-part=label]>[data-part=mark],[data-ui=field]:is([data-necessity=optional],[data-necessity=words])>[data-part=header]>[data-part=label]>[data-part=mark]{color:var(--slotted-field-mark-text-color, var(--slotted-text-muted));font-size:var(--slotted-control-font-size-sm, 12px);font-weight:var(--slotted-font-weight-regular, 400)}[data-ui=field]>[data-part=header]{align-items:baseline;column-gap:var(--slotted-field-header-gap, var(--slotted-space-3, .375rem));display:flex;flex-wrap:wrap;font-size:var(--_font-size);line-height:var(--slotted-field-line-height, var(--slotted-line-height-sm, 1.45));min-inline-size:0}[data-ui=field]>[data-part=header]>[data-part=label]{flex:0 1 auto}[data-ui=field]>[data-part=header]>[data-part=action],[data-ui=field]>[data-part=header]>[data-part=counter]{margin-inline-start:auto}[data-ui=field]>[data-part=header]>[data-part=action]~[data-part=counter]{margin-inline-start:var(--slotted-space-3, .375rem)}[data-ui=field]>[data-part=header]>[data-part=help]{--_box: max( min(calc(var(--_help-glyph) + 2 * var(--slotted-space-2, .25rem)), var(--_help-inner-size)), 1lh );--slotted-icon-size: var(--_help-glyph);appearance:none;background-color:transparent;block-size:var(--_box);border:0;border-radius:var(--slotted-field-help-radius, var(--slotted-control-radius, 4px));color:var(--slotted-field-help-color, var(--slotted-text-muted));cursor:pointer;display:inline-block;flex:none;font:inherit;inline-size:var(--_box);margin-block:calc((var(--_font-size) * var(--slotted-field-line-height, var(--slotted-line-height-sm, 1.45)) - var(--_box)) / 2);margin-inline-start:calc(var(--slotted-space-1, .125rem) - var(--slotted-field-header-gap, var(--slotted-space-3, .375rem)));padding:0;position:relative;text-align:center;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing)}[data-ui=field]>[data-part=header]>[data-part=help]:before{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-min, 24px)) / 2));position:absolute}[data-ui=field]>[data-part=header]>[data-part=help]>[data-ui=icon]{vertical-align:calc(((1cap + 1ex) / 2 - var(--_help-glyph)) / 2)}[data-ui=field]>[data-part=header]>[data-part=help]:enabled:hover,[data-ui=field]>[data-part=header]>[data-part=help][data-open]{background-color:var( --slotted-field-help-surface-hover, var(--slotted-tone-secondary-subtle-hover, ButtonFace) )}[data-ui=field]>[data-part=header]>[data-part=help]:enabled:active{background-color:var( --slotted-field-help-surface-active, var(--slotted-tone-secondary-subtle-active, ButtonFace) )}[data-ui=field]>[data-part=header]>[data-part=help]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui=field]>[data-part=header]>[data-part=indicator]{align-items:center;align-self:center;column-gap:var(--slotted-space-2, .25rem);display:inline-flex;flex-wrap:wrap}[data-ui=field]>[data-part=header]>[data-part=action]{--_rest: var(--slotted-field-action-color, var(--slotted-tone-accent-text, LinkText));align-items:center;appearance:none;background:none;block-size:var(--slotted-target-min, 24px);border:0;border-radius:var(--slotted-field-action-radius, var(--slotted-control-radius, 4px));color:var(--_rest);cursor:pointer;display:inline-flex;flex:none;font-family:inherit;font-size:var(--slotted-control-font-size-sm, 12px);font-weight:var(--slotted-font-weight-regular, 400);line-height:var(--slotted-field-line-height, var(--slotted-line-height-sm, 1.45));margin-block:calc((1lh - var(--slotted-target-min, 24px)) / 2);padding:0;text-decoration-color:transparent;text-decoration-line:underline;text-decoration-thickness:from-font;text-underline-offset:.15em;transition:color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),text-decoration-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);unicode-bidi:plaintext}[data-ui=field]>[data-part=header]>[data-part=action]:not(:disabled,[aria-disabled=true]):hover{color:var( --slotted-field-action-color-hover, color-mix(in oklab, var(--_rest) 65%, var(--slotted-text, CanvasText)) );text-decoration-color:currentColor}[data-ui=field]>[data-part=header]>[data-part=action]:not(:disabled,[aria-disabled=true]):active{color:var( --slotted-field-action-color-active, color-mix(in oklab, var(--_rest) 35%, var(--slotted-text, CanvasText)) );text-decoration-color:currentColor}[data-ui=field]>[data-part=header]>[data-part=action]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px);text-decoration-color:currentColor}[data-ui=field]>[data-part=header]>[data-part=action]:is(:disabled,[aria-disabled=true]){color:var(--slotted-disabled-foreground, GrayText);cursor:not-allowed}@media(pointer:coarse){[data-ui=field]>[data-part=header]>[data-part=action]{position:relative}[data-ui=field]>[data-part=header]>[data-part=help]:before,[data-ui=field]>[data-part=header]>[data-part=action]:before{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-comfortable, 44px)) / 2));position:absolute}}[data-ui=field]>[data-part=counter],[data-ui=field]>[data-part=header]>[data-part=counter]{color:var(--slotted-field-counter-color, var(--slotted-text-muted));font-size:var(--slotted-control-font-size-sm, 12px);font-variant-numeric:tabular-nums;line-height:var(--slotted-field-line-height, var(--slotted-line-height-sm, 1.45));transition:color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing)}[data-ui=field]>[data-part=counter]{align-self:end;grid-column:3;grid-row:1;justify-self:end;padding-inline-start:var(--_column-gap)}[data-ui=field]>[data-part=counter][data-invalid],[data-ui=field]>[data-part=header]>[data-part=counter][data-invalid]{color:var(--slotted-field-counter-invalid-color, var(--slotted-tone-danger-text));font-weight:var(--slotted-font-weight-medium, 500)}[data-ui=field]>[data-ui=inline-message]:not([data-reserve]):has([data-part=text]:empty){display:none}[data-ui=field][data-part=root]>[data-ui=inline-message]{font-size:var(--slotted-font-size-xs, .75rem)}[data-ui=field][data-part=root]>[data-ui=inline-message][data-tone=danger],[data-ui=field][data-part=root]>[data-ui=inline-message][data-tone=success]{font-weight:var(--slotted-font-weight-medium, 500)}@container slotted-field (min-width: 320px){[data-ui=field][data-part=root][data-label-placement=side]>*{align-self:start;grid-column:2 / 3}[data-ui=field][data-part=root][data-label-placement=side]>[data-part=label],[data-ui=field][data-part=root][data-label-placement=side]>[data-part=header]{grid-column:1;grid-row:1;padding-block-start:max(0px,calc((var(--_control-block-size) - 1lh) / 2));padding-inline-end:var(--_column-gap)}[data-ui=field][data-part=root][data-label-placement=side]>[data-part=counter]{grid-column:1;grid-row:2;justify-self:end;padding-inline:0 var(--_column-gap)}[data-ui=field][data-part=root][data-label-placement=side]>[data-part=header]>[data-part=counter]{flex-basis:100%;margin-inline-start:0;text-align:end}}[data-ui=field][data-part=root][data-disabled]>[data-part=label],[data-ui=field][data-part=root][data-disabled]>[data-part=counter],[data-ui=field][data-part=root][data-disabled]>[data-part=header]>[data-part=label],[data-ui=field][data-part=root][data-disabled]>[data-part=header]>[data-part=counter]{color:var(--slotted-disabled-foreground)}[data-ui=field][data-part=root][data-disabled]>[data-part=label]>[data-part=mark],[data-ui=field][data-part=root][data-disabled]>[data-part=header]>[data-part=label]>[data-part=mark]{color:var(--slotted-disabled-foreground)}[data-ui=field][data-part=root][data-disabled]>[data-part=counter][data-invalid],[data-ui=field][data-part=root][data-disabled]>[data-part=header]>[data-part=counter][data-invalid]{color:var(--slotted-disabled-foreground);font-weight:var(--slotted-font-weight-regular, 400)}}\n", "@layer slotted.components{[data-ui=visually-hidden]:not([data-focusable]:focus-within){block-size:1px;border:0;clip-path:inset(50%);inline-size:1px;inset-block-start:0;inset-inline-start:0;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap}}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => SlAlert), selector: "[slAlert]", inputs: ["tone", "variant", "reach", "live", "hideIcon", "dismissible", "messages", "open", "defaultOpen", "restoreFocus"], outputs: ["openChange"], exportAs: ["slAlert"] }, { kind: "directive", type: i0.forwardRef(() => SlAlertContent), selector: "[slAlertContent]", exportAs: ["slAlertContent"] }, { kind: "directive", type: i0.forwardRef(() => SlAlertDescription), selector: "[slAlertDescription]", exportAs: ["slAlertDescription"] }, { kind: "component", type: i0.forwardRef(() => SlAlertTitle), selector: "[slAlertTitle]", exportAs: ["slAlertTitle"] }, { kind: "component", type: i0.forwardRef(() => SlButton), selector: "button[slButton]", inputs: ["disabled", "focusableWhenDisabled", "fullWidth", "loading", "loadingDelay", "messages", "size", "tone", "type", "variant"], exportAs: ["slButton"] }, { kind: "component", type: i0.forwardRef(() => SlGlyph), selector: "svg[slGlyph]", inputs: ["name", "solid"] }, { kind: "component", type: i0.forwardRef(() => SlIcon), selector: "[slIcon]", inputs: ["directional", "label", "size", "tone"], exportAs: ["slIcon"] }, { kind: "component", type: i0.forwardRef(() => SlSkeleton), selector: "[slSkeleton]", inputs: ["shape", "size", "animation", "loading", "inlineSize", "blockSize"], exportAs: ["slSkeleton"] }, { kind: "component", type: i0.forwardRef(() => SlStepper), selector: "[slStepper]", inputs: ["step", "defaultStep", "messages", "orientation", "labelPlacement", "navigation", "linear", "autoComplete"], outputs: ["stepChange"], exportAs: ["slStepper"] }, { kind: "directive", type: i0.forwardRef(() => SlStepperList), selector: "ol[slStepperList]", exportAs: ["slStepperList"] }, { kind: "component", type: i0.forwardRef(() => SlStepperStep), selector: "li[slStepperStep]", inputs: ["label", "description", "complete", "disabled", "invalid", "loading", "href"], exportAs: ["slStepperStep"] }, { kind: "component", type: i0.forwardRef(() => SlTag), selector: "[slTag]", inputs: ["tone", "variant", "size", "shape", "disabled", "removable", "removeDisabled", "messages"], outputs: ["remove"], exportAs: ["slTag"] }, { kind: "directive", type: i0.forwardRef(() => SlWizardNext), selector: "button[slWizardNext]" }, { kind: "directive", type: i0.forwardRef(() => SlWizardPrevious), selector: "button[slWizardPrevious]" }, { kind: "directive", type: i0.forwardRef(() => SlWizardCancel), selector: "button[slWizardCancel]" }, { kind: "directive", type: i0.forwardRef(() => SlWizardSaveDraft), selector: "button[slWizardSaveDraft]" }, { kind: "directive", type: i0.forwardRef(() => SlWizardSkip), selector: "button[slWizardSkip]" }, { kind: "component", type: i0.forwardRef(() => SlWizardDraftStatus), selector: "[slWizardDraftStatus]" }, { kind: "directive", type: i0.forwardRef(() => SlWizardActionsStart), selector: "[slWizardActionsStart]" }, { kind: "directive", type: i0.forwardRef(() => SlWizardActionsEnd), selector: "[slWizardActionsEnd]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1275
|
+
}
|
|
1276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizard, decorators: [{
|
|
1277
|
+
type: Component,
|
|
1278
|
+
args: [{ selector: '[slWizard]', standalone: true, exportAs: 'slWizard', imports: [
|
|
1279
|
+
NgTemplateOutlet,
|
|
1280
|
+
SlAlert,
|
|
1281
|
+
SlAlertContent,
|
|
1282
|
+
SlAlertDescription,
|
|
1283
|
+
SlAlertTitle,
|
|
1284
|
+
SlButton,
|
|
1285
|
+
SlGlyph,
|
|
1286
|
+
SlIcon,
|
|
1287
|
+
SlSkeleton,
|
|
1288
|
+
SlStepper,
|
|
1289
|
+
SlStepperList,
|
|
1290
|
+
SlStepperStep,
|
|
1291
|
+
SlTag,
|
|
1292
|
+
forwardRef(() => SlWizardNext),
|
|
1293
|
+
forwardRef(() => SlWizardPrevious),
|
|
1294
|
+
forwardRef(() => SlWizardCancel),
|
|
1295
|
+
forwardRef(() => SlWizardSaveDraft),
|
|
1296
|
+
forwardRef(() => SlWizardSkip),
|
|
1297
|
+
forwardRef(() => SlWizardDraftStatus),
|
|
1298
|
+
SlWizardActionsStart,
|
|
1299
|
+
SlWizardActionsEnd,
|
|
1300
|
+
], template: `
|
|
1301
|
+
<div data-part="layout">
|
|
1302
|
+
@if (resolvedProgress() !== 'none') {
|
|
1303
|
+
<div
|
|
1304
|
+
data-part="progress"
|
|
1305
|
+
[attr.data-open]="progressOpen() ? '' : null"
|
|
1306
|
+
(keydown)="onProgressKeydown($event)"
|
|
1307
|
+
>
|
|
1308
|
+
<button
|
|
1309
|
+
#toggle
|
|
1310
|
+
data-part="progress-toggle"
|
|
1311
|
+
type="button"
|
|
1312
|
+
[attr.aria-controls]="listId"
|
|
1313
|
+
[attr.aria-expanded]="progressOpen()"
|
|
1314
|
+
(click)="toggleProgress($event)"
|
|
1315
|
+
>
|
|
1316
|
+
<span data-part="progress-position">{{ positionText() }}</span>
|
|
1317
|
+
<span aria-hidden="true" data-part="progress-track">
|
|
1318
|
+
@for (entry of entries(); track entry.name) {
|
|
1319
|
+
<span
|
|
1320
|
+
data-part="progress-segment"
|
|
1321
|
+
[attr.data-complete]="
|
|
1322
|
+
finished() || (entry.name !== current() && isComplete(entry.name)) ? '' : null
|
|
1323
|
+
"
|
|
1324
|
+
[attr.data-current]="!finished() && entry.name === current() ? '' : null"
|
|
1325
|
+
[attr.data-invalid]="invalid().has(entry.name) ? '' : null"
|
|
1326
|
+
></span>
|
|
1327
|
+
}
|
|
1328
|
+
</span>
|
|
1329
|
+
<span slIcon><svg slGlyph name="chevron-down"></svg></span>
|
|
1330
|
+
</button>
|
|
1331
|
+
<div
|
|
1332
|
+
slStepper
|
|
1333
|
+
[messages]="stepperMessages()"
|
|
1334
|
+
[navigation]="phase() === 'complete' ? 'none' : 'button'"
|
|
1335
|
+
[orientation]="resolvedProgress() === 'top' ? 'horizontal' : 'vertical'"
|
|
1336
|
+
[step]="finished() ? entries().length : currentIndex()"
|
|
1337
|
+
(stepChange)="onHeader($event)"
|
|
1338
|
+
>
|
|
1339
|
+
<ol slStepperList [attr.id]="listId">
|
|
1340
|
+
@for (item of steps(); track item.name()) {
|
|
1341
|
+
<li
|
|
1342
|
+
slStepperStep
|
|
1343
|
+
[complete]="phase() === 'complete' || isComplete(item.name())"
|
|
1344
|
+
[description]="item.optional() ? t('optional') : undefined"
|
|
1345
|
+
[disabled]="disabled() || item.disabled() || !isReachable(item.name())"
|
|
1346
|
+
[invalid]="invalid().has(item.name())"
|
|
1347
|
+
[label]="item.label()"
|
|
1348
|
+
[loading]="pending() === item.name()"
|
|
1349
|
+
></li>
|
|
1350
|
+
}
|
|
1351
|
+
</ol>
|
|
1352
|
+
</div>
|
|
1353
|
+
</div>
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
<div data-part="main">
|
|
1357
|
+
@if (errorShown()) {
|
|
1358
|
+
<div data-part="error">
|
|
1359
|
+
<section #alert slAlert live="off" reach="section" tone="danger">
|
|
1360
|
+
<div slAlertContent>
|
|
1361
|
+
<div slAlertTitle>{{ error() ?? t('submitFailed') }}</div>
|
|
1362
|
+
@if (error() === undefined && failure()?.message) {
|
|
1363
|
+
<p slAlertDescription>{{ failure()?.message }}</p>
|
|
1364
|
+
}
|
|
1365
|
+
</div>
|
|
1366
|
+
</section>
|
|
1367
|
+
</div>
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
@if (phase() === 'complete') {
|
|
1371
|
+
<div #complete data-part="complete" tabindex="-1">
|
|
1372
|
+
@if (completeTemplate(); as done) {
|
|
1373
|
+
<ng-container *ngTemplateOutlet="done.template"></ng-container>
|
|
1374
|
+
}
|
|
1375
|
+
</div>
|
|
1376
|
+
} @else {
|
|
1377
|
+
<div data-part="step" [attr.aria-busy]="restoring() ? 'true' : null">
|
|
1378
|
+
@if (restoring()) {
|
|
1379
|
+
@if (skeleton()) {
|
|
1380
|
+
<div aria-hidden="true" data-part="step-header">
|
|
1381
|
+
<div data-part="step-title">
|
|
1382
|
+
<span data-part="position"><span slSkeleton inlineSize="5.5rem"></span></span>
|
|
1383
|
+
<span slSkeleton inlineSize="13rem"></span>
|
|
1384
|
+
</div>
|
|
1385
|
+
</div>
|
|
1386
|
+
<div aria-hidden="true" data-part="skeleton">
|
|
1387
|
+
<div data-label-placement="top" data-part="root" data-size="md" data-ui="field">
|
|
1388
|
+
<span data-part="label"><span slSkeleton inlineSize="7rem"></span></span>
|
|
1389
|
+
<div data-part="control">
|
|
1390
|
+
<span
|
|
1391
|
+
slSkeleton
|
|
1392
|
+
shape="block"
|
|
1393
|
+
blockSize="var(--slotted-control-height-md)"
|
|
1394
|
+
></span>
|
|
1395
|
+
</div>
|
|
1396
|
+
</div>
|
|
1397
|
+
</div>
|
|
1398
|
+
}
|
|
1399
|
+
} @else if (currentStep(); as step) {
|
|
1400
|
+
<div data-part="step-header">
|
|
1401
|
+
@switch (resolvedLevel()) {
|
|
1402
|
+
@case (3) {
|
|
1403
|
+
<h3 #title data-part="step-title" tabindex="-1" [id]="titleId">
|
|
1404
|
+
<ng-container *ngTemplateOutlet="heading; context: { $implicit: step }" />
|
|
1405
|
+
</h3>
|
|
1406
|
+
}
|
|
1407
|
+
@case (4) {
|
|
1408
|
+
<h4 #title data-part="step-title" tabindex="-1" [id]="titleId">
|
|
1409
|
+
<ng-container *ngTemplateOutlet="heading; context: { $implicit: step }" />
|
|
1410
|
+
</h4>
|
|
1411
|
+
}
|
|
1412
|
+
@default {
|
|
1413
|
+
<h2 #title data-part="step-title" tabindex="-1" [id]="titleId">
|
|
1414
|
+
<ng-container *ngTemplateOutlet="heading; context: { $implicit: step }" />
|
|
1415
|
+
</h2>
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
@if (step.description()) {
|
|
1419
|
+
<p data-part="step-description">{{ step.description() }}</p>
|
|
1420
|
+
}
|
|
1421
|
+
</div>
|
|
1422
|
+
@for (key of [renderKey()]; track key) {
|
|
1423
|
+
<ng-container *ngTemplateOutlet="step.template; context: stepContext()" />
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
</div>
|
|
1427
|
+
@if (!restoring()) {
|
|
1428
|
+
<div data-part="actions">
|
|
1429
|
+
@if (actionsTemplate(); as custom) {
|
|
1430
|
+
<ng-container *ngTemplateOutlet="custom.template"></ng-container>
|
|
1431
|
+
} @else {
|
|
1432
|
+
<div slWizardActionsStart>
|
|
1433
|
+
@if (canCancel()) {
|
|
1434
|
+
<button
|
|
1435
|
+
slButton
|
|
1436
|
+
slWizardCancel
|
|
1437
|
+
tone="secondary"
|
|
1438
|
+
variant="ghost"
|
|
1439
|
+
focusableWhenDisabled
|
|
1440
|
+
[disabled]="phase() === 'submitting'"
|
|
1441
|
+
>
|
|
1442
|
+
{{ t('cancel') }}
|
|
1443
|
+
</button>
|
|
1444
|
+
}
|
|
1445
|
+
@if (canSaveDraft()) {
|
|
1446
|
+
<button
|
|
1447
|
+
slButton
|
|
1448
|
+
slWizardSaveDraft
|
|
1449
|
+
tone="secondary"
|
|
1450
|
+
variant="ghost"
|
|
1451
|
+
focusableWhenDisabled
|
|
1452
|
+
[disabled]="disabled() || busy()"
|
|
1453
|
+
[loading]="draftState() === 'saving'"
|
|
1454
|
+
>
|
|
1455
|
+
{{ t('saveDraft') }}
|
|
1456
|
+
</button>
|
|
1457
|
+
<span slWizardDraftStatus></span>
|
|
1458
|
+
}
|
|
1459
|
+
</div>
|
|
1460
|
+
<div slWizardActionsEnd>
|
|
1461
|
+
@if (optionalStep()) {
|
|
1462
|
+
<button
|
|
1463
|
+
slButton
|
|
1464
|
+
slWizardSkip
|
|
1465
|
+
tone="secondary"
|
|
1466
|
+
variant="ghost"
|
|
1467
|
+
focusableWhenDisabled
|
|
1468
|
+
[disabled]="disabled() || busy()"
|
|
1469
|
+
>
|
|
1470
|
+
{{ t('skip') }}
|
|
1471
|
+
</button>
|
|
1472
|
+
}
|
|
1473
|
+
@if (!isFirst()) {
|
|
1474
|
+
<button
|
|
1475
|
+
slButton
|
|
1476
|
+
slWizardPrevious
|
|
1477
|
+
tone="secondary"
|
|
1478
|
+
variant="outline"
|
|
1479
|
+
focusableWhenDisabled
|
|
1480
|
+
[disabled]="disabled() || busy()"
|
|
1481
|
+
>
|
|
1482
|
+
{{ t('previous') }}
|
|
1483
|
+
</button>
|
|
1484
|
+
}
|
|
1485
|
+
<button
|
|
1486
|
+
slButton
|
|
1487
|
+
slWizardNext
|
|
1488
|
+
tone="accent"
|
|
1489
|
+
variant="solid"
|
|
1490
|
+
focusableWhenDisabled
|
|
1491
|
+
[disabled]="disabled()"
|
|
1492
|
+
[loading]="busy()"
|
|
1493
|
+
[type]="hasForm() ? 'submit' : 'button'"
|
|
1494
|
+
>
|
|
1495
|
+
{{ nextLabel() }}
|
|
1496
|
+
</button>
|
|
1497
|
+
</div>
|
|
1498
|
+
}
|
|
1499
|
+
</div>
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
</div>
|
|
1503
|
+
</div>
|
|
1504
|
+
|
|
1505
|
+
<ng-template #heading let-step>
|
|
1506
|
+
<span data-part="position">{{ positionText() }}</span>
|
|
1507
|
+
{{ step.label() }}
|
|
1508
|
+
@if (step.optional()) {
|
|
1509
|
+
<span data-part="optional"
|
|
1510
|
+
>{{ ' '
|
|
1511
|
+
}}<span slTag shape="pill" size="sm" tone="secondary" variant="soft">{{
|
|
1512
|
+
t('optional')
|
|
1513
|
+
}}</span>
|
|
1514
|
+
</span>
|
|
1515
|
+
}
|
|
1516
|
+
</ng-template>
|
|
1517
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1518
|
+
'data-ui': 'wizard',
|
|
1519
|
+
'data-part': 'root',
|
|
1520
|
+
'[attr.data-progress]': 'resolvedProgress()',
|
|
1521
|
+
'[attr.data-scroll]': 'resolvedScroll()',
|
|
1522
|
+
'[attr.data-loading]': "phase() === 'submitting' || restoring() ? '' : null",
|
|
1523
|
+
'[attr.data-invalid]': "errorShown() ? '' : null",
|
|
1524
|
+
'[attr.data-complete]': "phase() === 'complete' ? '' : null",
|
|
1525
|
+
'[attr.data-disabled]': "disabled() ? '' : null",
|
|
1526
|
+
}, styles: ["@layer slotted.components{[data-ui=wizard]{--_text: var(--slotted-text, CanvasText);--_muted: var(--slotted-text-muted, GrayText);--_rule: var(--slotted-wizard-border, var(--slotted-border-subtle, ButtonBorder));--_rule-size: var(--slotted-border-width-thin, 1px);--_progress-size: var(--slotted-wizard-progress-inline-size, 14rem);--_gap: var(--slotted-wizard-gap, var(--slotted-space-9, 2rem));--_rhythm: var(--slotted-wizard-rhythm, var(--slotted-space-8, 1.5rem));--_header-gap: var(--slotted-wizard-header-gap, var(--slotted-space-6, 1rem));--_action-gap: var(--slotted-control-gap-md, var(--slotted-space-3, .375rem));--_ground: var(--slotted-page-ground, var(--slotted-surface, Canvas));--_ring-room: calc( var(--slotted-focus-ring-width, 2px) + var(--slotted-focus-ring-offset, 2px) );color:var(--_text);container-name:slotted-wizard;container-type:inline-size;display:flex;flex-direction:column;font-family:var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif);min-inline-size:0}[data-ui=wizard]>[data-part=layout]{display:grid;gap:var(--_gap);grid-template-columns:minmax(0,1fr);min-inline-size:0}[data-ui=wizard][data-progress=start]>[data-part=layout]{align-items:start;grid-template-columns:var(--_progress-size) minmax(0,1fr)}[data-ui=wizard][data-progress=none]>[data-part=layout]>[data-part=progress]{display:none}[data-ui=wizard]>[data-part=layout]>[data-part=progress]{display:flex;flex-direction:column;gap:var(--slotted-space-4, .5rem);min-inline-size:0}[data-ui=wizard][data-progress=start]:not([data-scroll=self])>[data-part=layout]>[data-part=progress]{inset-block-start:var(--slotted-page-sticky-top, 0px);position:sticky}[data-ui=wizard][data-progress=top]>[data-part=layout]>[data-part=progress]{border-block-end:var(--_rule-size) solid var(--_rule);padding-block-end:var(--_rhythm)}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]{align-items:center;appearance:none;background-color:var(--slotted-control-surface, Field);border:var(--slotted-control-border-width, 1px) solid var(--slotted-control-border-color, ButtonBorder);border-radius:var(--slotted-control-radius, 6px);box-shadow:var(--slotted-control-shadow, none);color:inherit;column-gap:var(--slotted-space-5, .75rem);cursor:pointer;display:none;font:inherit;grid-template-areas:\"position icon\" \"track icon\";grid-template-columns:minmax(0,1fr) auto;inline-size:100%;margin:0;min-block-size:var(--slotted-control-height-lg, 2.75rem);padding-block:var(--slotted-space-4, .5rem);padding-inline:var(--slotted-control-padding-inline-md, .75rem);row-gap:var(--slotted-space-3, .375rem);text-align:start;transition:border-color var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard, ease)),box-shadow var(--slotted-control-transition-duration, var(--slotted-duration-short)) var(--slotted-control-transition-easing, var(--slotted-easing-standard, ease))}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]:hover:not(:disabled):not([data-disabled]){border-color:var( --slotted-wizard-toggle-hover-border-color, var(--slotted-tone-accent-border) )}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]:active:not(:disabled):not([data-disabled]){background-color:var( --slotted-wizard-toggle-active-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]:focus-visible{box-shadow:var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px) var(--slotted-focus-ring-color, Highlight);outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]>[data-part=progress-position]{font-size:var(--slotted-font-size-sm, .8125rem);font-weight:var(--slotted-font-weight-medium, 500);grid-area:position;line-height:var(--slotted-line-height-sm, 1.45)}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]>[data-part=progress-track]{align-items:center;block-size:var(--slotted-space-2, .25rem);display:flex;gap:var(--slotted-space-1, .125rem);grid-area:track;min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]>[data-part=progress-track]>[data-part=progress-segment]{background-color:var( --slotted-wizard-segment-color, var(--slotted-control-border-color, ButtonBorder) );block-size:100%;border-radius:var(--slotted-radius-full, 9999px);flex:1 1 0;transition:background-color var(--slotted-duration-medium) var(--slotted-easing-standard, ease)}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]>[data-part=progress-track]>[data-part=progress-segment]:is([data-complete],[data-current]){background-color:var( --slotted-wizard-segment-color-complete, var(--slotted-tone-accent-solid, Highlight) )}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]>[data-part=progress-track]>[data-part=progress-segment][data-invalid]{background-color:var( --slotted-wizard-segment-color-invalid, var(--slotted-tone-danger-solid, Mark) )}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]>[data-ui=icon]{color:var(--_muted);grid-area:icon;transition:rotate var(--slotted-duration-short) var(--slotted-easing-standard, ease)}[data-ui=wizard]>[data-part=layout]>[data-part=progress][data-open]>[data-part=progress-toggle]>[data-ui=icon]{rotate:180deg}[data-ui=wizard]>[data-part=layout]>[data-part=main]{display:flex;flex-direction:column;gap:var(--_rhythm);min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=error]{min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]{display:flex;flex-direction:column;gap:var(--_header-gap);min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]{display:flex;flex-direction:column;gap:var(--slotted-space-2, .25rem);min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]>[data-part=step-title]{font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) );font-size:var(--slotted-font-size-2xl, 1.25rem);font-weight:var(--slotted-font-weight-semibold, 600);line-height:var(--slotted-line-height-2xl, 1.4);margin:0;outline:none;overflow-wrap:anywhere}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]>[data-part=step-title]>[data-part=position]{color:var(--_muted);display:block;font-size:var(--slotted-font-size-sm, .8125rem);font-weight:var(--slotted-font-weight-medium, 500);line-height:var(--slotted-line-height-sm, 1.45);margin-block-end:var(--slotted-space-1, .125rem)}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]>[data-part=step-title]>[data-part=optional]{margin-inline-start:var(--slotted-space-1, .125rem);vertical-align:middle}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]>[data-part=step-description]{color:var(--_muted);font-size:var(--slotted-font-size-md, .875rem);line-height:var(--slotted-line-height-md, 1.5);margin:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=skeleton]{display:flex;flex-direction:column;min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]{align-items:center;border-block-start:var(--_rule-size) solid var(--_rule);display:flex;flex-wrap:wrap;gap:var(--_action-gap) var(--_gap);justify-content:space-between;padding-block-start:var(--_rhythm)}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>:is([data-part=actions-start],[data-part=actions-end]){align-items:center;display:flex;flex-wrap:wrap;gap:var(--_action-gap);min-inline-size:0}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>[data-part=actions-start]{align-items:baseline}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>[data-part=actions-end]{justify-content:flex-end;margin-inline-start:auto}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>[data-part=actions-start]>[data-ui=button][data-variant=ghost]:first-child{flex:none;max-inline-size:none;margin-inline-start:calc(var(--slotted-control-padding-inline-md, .75rem) * -1)}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>[data-part=actions-start]>[data-part=draft-status]{color:var(--_muted);font-size:var(--slotted-font-size-sm, .8125rem);line-height:var(--slotted-line-height-sm, 1.45)}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>[data-part=actions-start]>[data-part=draft-status]:empty{display:none}[data-ui=wizard] [data-part=edit]{appearance:none;background:none;border:0;border-radius:var(--slotted-radius-xs, 2px);color:var(--slotted-wizard-edit-color, var(--slotted-tone-accent-text, LinkText));cursor:pointer;font:inherit;font-weight:var(--slotted-font-weight-medium, 500);margin:0;padding:0;text-decoration-line:none;text-decoration-thickness:var(--slotted-border-width-thin, 1px);text-underline-offset:.2em}[data-ui=wizard] [data-part=edit]:hover:not(:disabled):not([aria-disabled=true]){text-decoration-line:underline}[data-ui=wizard] [data-part=edit]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui=wizard] [data-part=edit]:is(:disabled,[aria-disabled=true]){color:var(--slotted-disabled-foreground, GrayText);cursor:not-allowed}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=complete]{min-inline-size:0;outline:none}[data-ui=wizard][data-scroll=self]{block-size:100%;min-block-size:0}[data-ui=wizard][data-scroll=self]>[data-part=layout]{block-size:100%;min-block-size:0}[data-ui=wizard][data-scroll=self]>[data-part=layout]>[data-part=progress]{max-block-size:100%;overflow:auto;padding:var(--_ring-room)}[data-ui=wizard][data-scroll=self]>[data-part=layout]>[data-part=main]{block-size:100%;gap:0;min-block-size:0}[data-ui=wizard][data-scroll=self]>[data-part=layout]>[data-part=main]>:is([data-part=step],[data-part=complete]){flex:1 1 auto;min-block-size:0;overflow:auto;overscroll-behavior:contain;padding-block:var(--_ring-room) var(--_rhythm);padding-inline:var(--_ring-room)}[data-ui=wizard][data-scroll=self]>[data-part=layout]>[data-part=main]>[data-part=error]{padding-block-end:var(--_rhythm);padding-inline:var(--_ring-room)}[data-ui=wizard][data-scroll=self]>[data-part=layout]>[data-part=main]>[data-part=actions]{background-color:var(--_ground);flex:none;padding-block-end:0;padding-inline:var(--_ring-room)}@container slotted-wizard (width < 600px){[data-ui=wizard]>[data-part=layout]{gap:var(--_rhythm)}[data-ui=wizard][data-progress=start]>[data-part=layout]{grid-template-columns:minmax(0,1fr)}[data-ui=wizard][data-progress]>[data-part=layout]>[data-part=progress]{border-block-end:0;padding-block-end:0;position:static}[data-ui=wizard]>[data-part=layout]>[data-part=progress]>[data-part=progress-toggle]{display:grid}[data-ui=wizard]>[data-part=layout]>[data-part=progress]:not([data-open])>[data-ui=stepper]{display:none}[data-ui=wizard]>[data-part=layout]>[data-part=progress][data-open]>[data-ui=stepper]{background-color:var(--slotted-surface-sunken, Canvas);border-radius:var(--slotted-control-radius, 6px);padding:var(--slotted-space-5, .75rem)}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>:is([data-part=actions-start],[data-part=actions-end]){inline-size:100%}[data-ui=wizard]>[data-part=layout]>[data-part=main]>[data-part=actions]>[data-part=actions-end]>[data-ui=button]:not([data-variant=ghost]){flex:1 1 0}[data-ui=wizard][data-progress=start]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]>[data-part=step-title]>[data-part=position],[data-ui=wizard][data-progress=top]>[data-part=layout]>[data-part=main]>[data-part=step]>[data-part=step-header]>[data-part=step-title]>[data-part=position]{block-size:1px;clip-path:inset(50%);inline-size:1px;margin:0;overflow:hidden;position:absolute;white-space:nowrap}}}\n", "@layer slotted.components{[data-ui=field][data-part=root]{--_font-size: var(--slotted-control-font-size-md, 13px);--_control-block-size: var(--slotted-control-height-md, 34px);--_row-gap: var(--slotted-field-row-gap, var(--slotted-space-3, .375rem));--_column-gap: var(--slotted-field-column-gap, var(--slotted-space-5, .75rem));align-content:start;container-name:slotted-field;container-type:inline-size;display:grid;font-family:var(--slotted-field-font-family, var(--slotted-control-font-family, sans-serif));grid-template-columns:minmax(0,var(--slotted-field-label-inline-size, 12rem)) minmax(0,1fr) auto;min-inline-size:0;row-gap:var(--_row-gap)}[data-ui=field][data-part=root]>*{grid-column:1 / -1}[data-ui=field]>[data-part=control]{min-inline-size:0}[data-ui=field][data-part=root][data-size=sm]{--_help-glyph: max( var(--slotted-field-icon-size-min, 14px), var(--slotted-control-icon-size-sm, 14px) );--_help-inner-size: var(--slotted-control-inner-size-sm, 22px);--_font-size: var(--slotted-control-font-size-sm, 12px);--_control-block-size: var(--slotted-control-height-sm, 30px)}[data-ui=field][data-part=root][data-size=md]{--_help-glyph: max( var(--slotted-field-icon-size-min, 14px), var(--slotted-control-icon-size-sm, 14px) );--_help-inner-size: var(--slotted-control-inner-size-sm, 22px);--_font-size: var(--slotted-control-font-size-md, 13px);--_control-block-size: var(--slotted-control-height-md, 34px)}[data-ui=field][data-part=root][data-size=lg]{--_help-glyph: max( var(--slotted-field-icon-size-min, 14px), var(--slotted-control-icon-size-md, 16px) );--_help-inner-size: var(--slotted-control-inner-size-md, 24px);--_font-size: var(--slotted-control-font-size-lg, 14px);--_control-block-size: var(--slotted-control-height-lg, 38px)}[data-ui=field]>[data-part=label],[data-ui=field]>[data-part=header]>[data-part=label]{color:var(--slotted-field-label-color, var(--slotted-text));font-size:var(--_font-size);font-weight:var(--slotted-field-label-font-weight, var(--slotted-font-weight-medium, 500));line-height:var(--slotted-field-line-height, var(--slotted-line-height-sm, 1.45));min-inline-size:0;overflow-wrap:anywhere;transition:color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing)}[data-ui=field]>[data-part=label],[data-ui=field]>[data-part=header]{grid-column:1 / -1;grid-row:1}[data-ui=field][data-part=root]:has(>[data-part=counter])>[data-part=label]{grid-column:1 / 3}[data-ui=field]>[data-part=label]>[data-part=mark],[data-ui=field]>[data-part=header]>[data-part=label]>[data-part=mark]{color:var(--slotted-field-mark-color, var(--slotted-tone-danger-text));margin-inline-start:var(--slotted-field-mark-gap, var(--slotted-space-2, .25rem));overflow-wrap:normal;unicode-bidi:isolate}[data-ui=field]:is([data-necessity=optional],[data-necessity=words])>[data-part=label]>[data-part=mark],[data-ui=field]:is([data-necessity=optional],[data-necessity=words])>[data-part=header]>[data-part=label]>[data-part=mark]{color:var(--slotted-field-mark-text-color, var(--slotted-text-muted));font-size:var(--slotted-control-font-size-sm, 12px);font-weight:var(--slotted-font-weight-regular, 400)}[data-ui=field]>[data-part=header]{align-items:baseline;column-gap:var(--slotted-field-header-gap, var(--slotted-space-3, .375rem));display:flex;flex-wrap:wrap;font-size:var(--_font-size);line-height:var(--slotted-field-line-height, var(--slotted-line-height-sm, 1.45));min-inline-size:0}[data-ui=field]>[data-part=header]>[data-part=label]{flex:0 1 auto}[data-ui=field]>[data-part=header]>[data-part=action],[data-ui=field]>[data-part=header]>[data-part=counter]{margin-inline-start:auto}[data-ui=field]>[data-part=header]>[data-part=action]~[data-part=counter]{margin-inline-start:var(--slotted-space-3, .375rem)}[data-ui=field]>[data-part=header]>[data-part=help]{--_box: max( min(calc(var(--_help-glyph) + 2 * var(--slotted-space-2, .25rem)), var(--_help-inner-size)), 1lh );--slotted-icon-size: var(--_help-glyph);appearance:none;background-color:transparent;block-size:var(--_box);border:0;border-radius:var(--slotted-field-help-radius, var(--slotted-control-radius, 4px));color:var(--slotted-field-help-color, var(--slotted-text-muted));cursor:pointer;display:inline-block;flex:none;font:inherit;inline-size:var(--_box);margin-block:calc((var(--_font-size) * var(--slotted-field-line-height, var(--slotted-line-height-sm, 1.45)) - var(--_box)) / 2);margin-inline-start:calc(var(--slotted-space-1, .125rem) - var(--slotted-field-header-gap, var(--slotted-space-3, .375rem)));padding:0;position:relative;text-align:center;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing)}[data-ui=field]>[data-part=header]>[data-part=help]:before{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-min, 24px)) / 2));position:absolute}[data-ui=field]>[data-part=header]>[data-part=help]>[data-ui=icon]{vertical-align:calc(((1cap + 1ex) / 2 - var(--_help-glyph)) / 2)}[data-ui=field]>[data-part=header]>[data-part=help]:enabled:hover,[data-ui=field]>[data-part=header]>[data-part=help][data-open]{background-color:var( --slotted-field-help-surface-hover, var(--slotted-tone-secondary-subtle-hover, ButtonFace) )}[data-ui=field]>[data-part=header]>[data-part=help]:enabled:active{background-color:var( --slotted-field-help-surface-active, var(--slotted-tone-secondary-subtle-active, ButtonFace) )}[data-ui=field]>[data-part=header]>[data-part=help]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui=field]>[data-part=header]>[data-part=indicator]{align-items:center;align-self:center;column-gap:var(--slotted-space-2, .25rem);display:inline-flex;flex-wrap:wrap}[data-ui=field]>[data-part=header]>[data-part=action]{--_rest: var(--slotted-field-action-color, var(--slotted-tone-accent-text, LinkText));align-items:center;appearance:none;background:none;block-size:var(--slotted-target-min, 24px);border:0;border-radius:var(--slotted-field-action-radius, var(--slotted-control-radius, 4px));color:var(--_rest);cursor:pointer;display:inline-flex;flex:none;font-family:inherit;font-size:var(--slotted-control-font-size-sm, 12px);font-weight:var(--slotted-font-weight-regular, 400);line-height:var(--slotted-field-line-height, var(--slotted-line-height-sm, 1.45));margin-block:calc((1lh - var(--slotted-target-min, 24px)) / 2);padding:0;text-decoration-color:transparent;text-decoration-line:underline;text-decoration-thickness:from-font;text-underline-offset:.15em;transition:color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),text-decoration-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);unicode-bidi:plaintext}[data-ui=field]>[data-part=header]>[data-part=action]:not(:disabled,[aria-disabled=true]):hover{color:var( --slotted-field-action-color-hover, color-mix(in oklab, var(--_rest) 65%, var(--slotted-text, CanvasText)) );text-decoration-color:currentColor}[data-ui=field]>[data-part=header]>[data-part=action]:not(:disabled,[aria-disabled=true]):active{color:var( --slotted-field-action-color-active, color-mix(in oklab, var(--_rest) 35%, var(--slotted-text, CanvasText)) );text-decoration-color:currentColor}[data-ui=field]>[data-part=header]>[data-part=action]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px);text-decoration-color:currentColor}[data-ui=field]>[data-part=header]>[data-part=action]:is(:disabled,[aria-disabled=true]){color:var(--slotted-disabled-foreground, GrayText);cursor:not-allowed}@media(pointer:coarse){[data-ui=field]>[data-part=header]>[data-part=action]{position:relative}[data-ui=field]>[data-part=header]>[data-part=help]:before,[data-ui=field]>[data-part=header]>[data-part=action]:before{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-comfortable, 44px)) / 2));position:absolute}}[data-ui=field]>[data-part=counter],[data-ui=field]>[data-part=header]>[data-part=counter]{color:var(--slotted-field-counter-color, var(--slotted-text-muted));font-size:var(--slotted-control-font-size-sm, 12px);font-variant-numeric:tabular-nums;line-height:var(--slotted-field-line-height, var(--slotted-line-height-sm, 1.45));transition:color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing)}[data-ui=field]>[data-part=counter]{align-self:end;grid-column:3;grid-row:1;justify-self:end;padding-inline-start:var(--_column-gap)}[data-ui=field]>[data-part=counter][data-invalid],[data-ui=field]>[data-part=header]>[data-part=counter][data-invalid]{color:var(--slotted-field-counter-invalid-color, var(--slotted-tone-danger-text));font-weight:var(--slotted-font-weight-medium, 500)}[data-ui=field]>[data-ui=inline-message]:not([data-reserve]):has([data-part=text]:empty){display:none}[data-ui=field][data-part=root]>[data-ui=inline-message]{font-size:var(--slotted-font-size-xs, .75rem)}[data-ui=field][data-part=root]>[data-ui=inline-message][data-tone=danger],[data-ui=field][data-part=root]>[data-ui=inline-message][data-tone=success]{font-weight:var(--slotted-font-weight-medium, 500)}@container slotted-field (min-width: 320px){[data-ui=field][data-part=root][data-label-placement=side]>*{align-self:start;grid-column:2 / 3}[data-ui=field][data-part=root][data-label-placement=side]>[data-part=label],[data-ui=field][data-part=root][data-label-placement=side]>[data-part=header]{grid-column:1;grid-row:1;padding-block-start:max(0px,calc((var(--_control-block-size) - 1lh) / 2));padding-inline-end:var(--_column-gap)}[data-ui=field][data-part=root][data-label-placement=side]>[data-part=counter]{grid-column:1;grid-row:2;justify-self:end;padding-inline:0 var(--_column-gap)}[data-ui=field][data-part=root][data-label-placement=side]>[data-part=header]>[data-part=counter]{flex-basis:100%;margin-inline-start:0;text-align:end}}[data-ui=field][data-part=root][data-disabled]>[data-part=label],[data-ui=field][data-part=root][data-disabled]>[data-part=counter],[data-ui=field][data-part=root][data-disabled]>[data-part=header]>[data-part=label],[data-ui=field][data-part=root][data-disabled]>[data-part=header]>[data-part=counter]{color:var(--slotted-disabled-foreground)}[data-ui=field][data-part=root][data-disabled]>[data-part=label]>[data-part=mark],[data-ui=field][data-part=root][data-disabled]>[data-part=header]>[data-part=label]>[data-part=mark]{color:var(--slotted-disabled-foreground)}[data-ui=field][data-part=root][data-disabled]>[data-part=counter][data-invalid],[data-ui=field][data-part=root][data-disabled]>[data-part=header]>[data-part=counter][data-invalid]{color:var(--slotted-disabled-foreground);font-weight:var(--slotted-font-weight-regular, 400)}}\n", "@layer slotted.components{[data-ui=visually-hidden]:not([data-focusable]:focus-within){block-size:1px;border:0;clip-path:inset(50%);inline-size:1px;inset-block-start:0;inset-inline-start:0;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap}}\n"] }]
|
|
1527
|
+
}], ctorParameters: () => [], propDecorators: { step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }, { type: i0.Output, args: ["stepChange"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], progressOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "progressOpen", required: false }] }, { type: i0.Output, args: ["progressOpenChange"] }], defaultStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultStep", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], defaultProgressOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultProgressOpen", required: false }] }], progress: [{ type: i0.Input, args: [{ isSignal: true, alias: "progress", required: false }] }], scroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "scroll", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], submitWizard: [{ type: i0.Input, args: [{ isSignal: true, alias: "submitWizard", required: false }] }], persistence: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistence", required: false }] }], version: [{ type: i0.Input, args: [{ isSignal: true, alias: "version", required: false }] }], autosave: [{ type: i0.Input, args: [{ isSignal: true, alias: "autosave", required: false }] }], guardUnsaved: [{ type: i0.Input, args: [{ isSignal: true, alias: "guardUnsaved", required: false }] }], cancellable: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancellable", required: false }] }], draftable: [{ type: i0.Input, args: [{ isSignal: true, alias: "draftable", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], minDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDuration", required: false }] }], stepChangeRequest: [{ type: i0.Output, args: ["stepChangeRequest"] }], valueChangeRequest: [{ type: i0.Output, args: ["valueChangeRequest"] }], progressOpenChangeRequest: [{ type: i0.Output, args: ["progressOpenChangeRequest"] }], cancelRequest: [{ type: i0.Output, args: ["cancelRequest"] }], draftSave: [{ type: i0.Output, args: ["draftSave"] }], completed: [{ type: i0.Output, args: ["completed"] }], steps: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SlWizardStep), { isSignal: true }] }], completeTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SlWizardComplete), { isSignal: true }] }], actionsTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SlWizardActions), { isSignal: true }] }], titleRef: [{ type: i0.ViewChild, args: ['title', { isSignal: true }] }], alertRef: [{ type: i0.ViewChild, args: ['alert', { ...{ read: ElementRef }, isSignal: true }] }], completeRef: [{ type: i0.ViewChild, args: ['complete', { isSignal: true }] }], toggleRef: [{ type: i0.ViewChild, args: ['toggle', { isSignal: true }] }] } });
|
|
1528
|
+
/* ── The actions ─────────────────────────────────────────────────────── */
|
|
1529
|
+
/**
|
|
1530
|
+
* The next button. On a plain `button` a consumer wrote it submits the step's
|
|
1531
|
+
* form; beside `slButton` in the default row it is `type="submit"` associated
|
|
1532
|
+
* to the form by the platform's `form` attribute. The part is a binding, so it
|
|
1533
|
+
* wins over `slButton`'s static `data-part="root"` and follows the switch to
|
|
1534
|
+
* `submit` on the final step.
|
|
1535
|
+
*/
|
|
1536
|
+
class SlWizardNext {
|
|
1537
|
+
wizard = inject(SlWizard);
|
|
1538
|
+
button = inject(ElementRef).nativeElement;
|
|
1539
|
+
onClick(event) {
|
|
1540
|
+
if (event.defaultPrevented)
|
|
1541
|
+
return;
|
|
1542
|
+
if (this.wizard.busy() || this.wizard.disabled()) {
|
|
1543
|
+
event.preventDefault();
|
|
1544
|
+
return;
|
|
1545
|
+
}
|
|
1546
|
+
if (this.button.type === 'submit' && this.wizard.hasForm())
|
|
1547
|
+
return;
|
|
1548
|
+
this.wizard.next(event);
|
|
1549
|
+
}
|
|
1550
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardNext, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1551
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlWizardNext, isStandalone: true, selector: "button[slWizardNext]", host: { listeners: { "click": "onClick($event)" }, properties: { "attr.data-part": "wizard.isFinal() && !wizard.returning() ? 'submit' : 'next'", "attr.data-final": "wizard.isFinal() && !wizard.returning() ? '' : null", "attr.form": "wizard.hasForm() ? wizard.formId : null" } }, ngImport: i0 });
|
|
1552
|
+
}
|
|
1553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardNext, decorators: [{
|
|
1554
|
+
type: Directive,
|
|
1555
|
+
args: [{
|
|
1556
|
+
selector: 'button[slWizardNext]',
|
|
1557
|
+
standalone: true,
|
|
1558
|
+
host: {
|
|
1559
|
+
'[attr.data-part]': "wizard.isFinal() && !wizard.returning() ? 'submit' : 'next'",
|
|
1560
|
+
'[attr.data-final]': "wizard.isFinal() && !wizard.returning() ? '' : null",
|
|
1561
|
+
'[attr.form]': 'wizard.hasForm() ? wizard.formId : null',
|
|
1562
|
+
'(click)': 'onClick($event)',
|
|
1563
|
+
},
|
|
1564
|
+
}]
|
|
1565
|
+
}] });
|
|
1566
|
+
class SlWizardPrevious {
|
|
1567
|
+
wizard = inject(SlWizard);
|
|
1568
|
+
onClick(event) {
|
|
1569
|
+
if (!event.defaultPrevented)
|
|
1570
|
+
this.wizard.previous(event);
|
|
1571
|
+
}
|
|
1572
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardPrevious, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1573
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlWizardPrevious, isStandalone: true, selector: "button[slWizardPrevious]", host: { listeners: { "click": "onClick($event)" }, properties: { "attr.data-part": "'previous'" } }, ngImport: i0 });
|
|
1574
|
+
}
|
|
1575
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardPrevious, decorators: [{
|
|
1576
|
+
type: Directive,
|
|
1577
|
+
args: [{
|
|
1578
|
+
selector: 'button[slWizardPrevious]',
|
|
1579
|
+
standalone: true,
|
|
1580
|
+
host: { '[attr.data-part]': "'previous'", '(click)': 'onClick($event)' },
|
|
1581
|
+
}]
|
|
1582
|
+
}] });
|
|
1583
|
+
class SlWizardCancel {
|
|
1584
|
+
wizard = inject(SlWizard);
|
|
1585
|
+
onClick(event) {
|
|
1586
|
+
if (!event.defaultPrevented)
|
|
1587
|
+
this.wizard.cancel(event);
|
|
1588
|
+
}
|
|
1589
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardCancel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1590
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlWizardCancel, isStandalone: true, selector: "button[slWizardCancel]", host: { listeners: { "click": "onClick($event)" }, properties: { "attr.data-part": "'cancel'" } }, ngImport: i0 });
|
|
1591
|
+
}
|
|
1592
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardCancel, decorators: [{
|
|
1593
|
+
type: Directive,
|
|
1594
|
+
args: [{
|
|
1595
|
+
selector: 'button[slWizardCancel]',
|
|
1596
|
+
standalone: true,
|
|
1597
|
+
host: { '[attr.data-part]': "'cancel'", '(click)': 'onClick($event)' },
|
|
1598
|
+
}]
|
|
1599
|
+
}] });
|
|
1600
|
+
class SlWizardSaveDraft {
|
|
1601
|
+
wizard = inject(SlWizard);
|
|
1602
|
+
onClick(event) {
|
|
1603
|
+
if (!event.defaultPrevented)
|
|
1604
|
+
this.wizard.saveDraft('pointer', event);
|
|
1605
|
+
}
|
|
1606
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardSaveDraft, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1607
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlWizardSaveDraft, isStandalone: true, selector: "button[slWizardSaveDraft]", host: { listeners: { "click": "onClick($event)" }, properties: { "attr.data-part": "'save-draft'" } }, ngImport: i0 });
|
|
1608
|
+
}
|
|
1609
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardSaveDraft, decorators: [{
|
|
1610
|
+
type: Directive,
|
|
1611
|
+
args: [{
|
|
1612
|
+
selector: 'button[slWizardSaveDraft]',
|
|
1613
|
+
standalone: true,
|
|
1614
|
+
host: { '[attr.data-part]': "'save-draft'", '(click)': 'onClick($event)' },
|
|
1615
|
+
}]
|
|
1616
|
+
}] });
|
|
1617
|
+
class SlWizardSkip {
|
|
1618
|
+
wizard = inject(SlWizard);
|
|
1619
|
+
onClick(event) {
|
|
1620
|
+
if (!event.defaultPrevented)
|
|
1621
|
+
this.wizard.skip(event);
|
|
1622
|
+
}
|
|
1623
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardSkip, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1624
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlWizardSkip, isStandalone: true, selector: "button[slWizardSkip]", host: { listeners: { "click": "onClick($event)" }, properties: { "attr.data-part": "'skip'" } }, ngImport: i0 });
|
|
1625
|
+
}
|
|
1626
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardSkip, decorators: [{
|
|
1627
|
+
type: Directive,
|
|
1628
|
+
args: [{
|
|
1629
|
+
selector: 'button[slWizardSkip]',
|
|
1630
|
+
standalone: true,
|
|
1631
|
+
host: { '[attr.data-part]': "'skip'", '(click)': 'onClick($event)' },
|
|
1632
|
+
}]
|
|
1633
|
+
}] });
|
|
1634
|
+
/** The polite status that says when the draft was saved. */
|
|
1635
|
+
class SlWizardDraftStatus {
|
|
1636
|
+
wizard = inject(SlWizard);
|
|
1637
|
+
text = computed(() => {
|
|
1638
|
+
const t = this.wizard.t;
|
|
1639
|
+
const state = this.wizard.draftState();
|
|
1640
|
+
const savedAt = this.wizard.savedAt();
|
|
1641
|
+
if (state === 'saving')
|
|
1642
|
+
return t('saving');
|
|
1643
|
+
if (state === 'failed')
|
|
1644
|
+
return t('draftFailed');
|
|
1645
|
+
if (state === 'saved' && savedAt !== undefined) {
|
|
1646
|
+
const time = new Intl.DateTimeFormat(this.wizard.locale(), {
|
|
1647
|
+
hour: '2-digit',
|
|
1648
|
+
minute: '2-digit',
|
|
1649
|
+
}).format(savedAt);
|
|
1650
|
+
return t('saved', { time });
|
|
1651
|
+
}
|
|
1652
|
+
return '';
|
|
1653
|
+
}, /* @ts-ignore */
|
|
1654
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
1655
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardDraftStatus, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1656
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: SlWizardDraftStatus, isStandalone: true, selector: "[slWizardDraftStatus]", host: { attributes: { "data-part": "draft-status", "role": "status" } }, ngImport: i0, template: '{{ text() }}', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1657
|
+
}
|
|
1658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardDraftStatus, decorators: [{
|
|
1659
|
+
type: Component,
|
|
1660
|
+
args: [{
|
|
1661
|
+
selector: '[slWizardDraftStatus]',
|
|
1662
|
+
standalone: true,
|
|
1663
|
+
template: '{{ text() }}',
|
|
1664
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1665
|
+
host: { 'data-part': 'draft-status', role: 'status' },
|
|
1666
|
+
}]
|
|
1667
|
+
}] });
|
|
1668
|
+
/**
|
|
1669
|
+
* The control a review step puts beside each answer: it goes to the named
|
|
1670
|
+
* step and sets the return point. Its name is the label and the step's label,
|
|
1671
|
+
* "Change shipping address".
|
|
1672
|
+
*/
|
|
1673
|
+
class SlWizardEdit {
|
|
1674
|
+
wizard = inject(SlWizard);
|
|
1675
|
+
step = input.required({ ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), alias: 'slWizardEdit' });
|
|
1676
|
+
target = computed(() => this.wizard.steps().find((candidate) => candidate.name() === this.step()), /* @ts-ignore */
|
|
1677
|
+
...(ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []));
|
|
1678
|
+
unavailable = computed(() => this.wizard.disabled() || this.wizard.busy() || this.target() === undefined, /* @ts-ignore */
|
|
1679
|
+
...(ngDevMode ? [{ debugName: "unavailable" }] : /* istanbul ignore next */ []));
|
|
1680
|
+
onClick(event) {
|
|
1681
|
+
if (event.defaultPrevented || this.unavailable())
|
|
1682
|
+
return;
|
|
1683
|
+
this.wizard.edit(this.step(), event);
|
|
1684
|
+
}
|
|
1685
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardEdit, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1686
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlWizardEdit, isStandalone: true, selector: "button[slWizardEdit]", inputs: { step: { classPropertyName: "step", publicName: "slWizardEdit", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "data-part": "edit", "type": "button" }, listeners: { "click": "onClick($event)" }, properties: { "attr.aria-disabled": "unavailable() ? 'true' : null" } }, ngImport: i0, template: `<ng-content>{{ wizard.t('edit') }}</ng-content>
|
|
1687
|
+
@if (target(); as step) {
|
|
1688
|
+
{{ ' ' }}<span data-ui="visually-hidden">{{ step.label() }}</span>
|
|
1689
|
+
}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1690
|
+
}
|
|
1691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlWizardEdit, decorators: [{
|
|
1692
|
+
type: Component,
|
|
1693
|
+
args: [{
|
|
1694
|
+
selector: 'button[slWizardEdit]',
|
|
1695
|
+
standalone: true,
|
|
1696
|
+
template: `<ng-content>{{ wizard.t('edit') }}</ng-content>
|
|
1697
|
+
@if (target(); as step) {
|
|
1698
|
+
{{ ' ' }}<span data-ui="visually-hidden">{{ step.label() }}</span>
|
|
1699
|
+
}`,
|
|
1700
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1701
|
+
host: {
|
|
1702
|
+
'data-part': 'edit',
|
|
1703
|
+
type: 'button',
|
|
1704
|
+
'[attr.aria-disabled]': "unavailable() ? 'true' : null",
|
|
1705
|
+
'(click)': 'onClick($event)',
|
|
1706
|
+
},
|
|
1707
|
+
}]
|
|
1708
|
+
}], propDecorators: { step: [{ type: i0.Input, args: [{ isSignal: true, alias: "slWizardEdit", required: true }] }] } });
|
|
1709
|
+
|
|
1710
|
+
/**
|
|
1711
|
+
* Generated bundle index. Do not edit.
|
|
1712
|
+
*/
|
|
1713
|
+
|
|
1714
|
+
export { SlWizard, SlWizardActions, SlWizardActionsEnd, SlWizardActionsStart, SlWizardCancel, SlWizardComplete, SlWizardDraftStatus, SlWizardEdit, SlWizardForm, SlWizardNext, SlWizardPrevious, SlWizardSaveDraft, SlWizardSkip, SlWizardStep, WIZARD_DEFAULTS, WIZARD_FALLBACK, injectWizardDefaults, provideWizardDefaults };
|
|
1715
|
+
//# sourceMappingURL=slotted-angular-wizard.mjs.map
|