@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,592 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, input, computed, Directive, ElementRef, ViewEncapsulation, ChangeDetectionStrategy, Component, booleanAttribute, output, HostAttributeToken, signal, DestroyRef, forwardRef } from '@angular/core';
|
|
3
|
+
import { ControlContainer } from '@angular/forms';
|
|
4
|
+
import { injectMessages } from '@slotted/angular/i18n';
|
|
5
|
+
import { normaliseErrors, orderErrors, hasErrors, withoutError, mergeErrors, collectValidity, namedControls, isDirty } from '@slotted/core/form';
|
|
6
|
+
import { formMessages } from '@slotted/core/i18n';
|
|
7
|
+
import { createControllable } from '@slotted/core/state';
|
|
8
|
+
|
|
9
|
+
const FALLBACK = {
|
|
10
|
+
align: 'end',
|
|
11
|
+
errorFocus: 'summary',
|
|
12
|
+
nativeValidation: false,
|
|
13
|
+
summary: 'auto',
|
|
14
|
+
summaryDescription: undefined,
|
|
15
|
+
validate: 'submit',
|
|
16
|
+
};
|
|
17
|
+
const FORM_DEFAULTS = new InjectionToken('slotted form defaults', {
|
|
18
|
+
providedIn: 'root',
|
|
19
|
+
factory: () => FALLBACK,
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* An application decides once how its forms behave: when they validate, where
|
|
23
|
+
* focus goes after a failed submit, and how its action row is arranged. A form
|
|
24
|
+
* that states any of them itself still wins. The summary's heading comes from
|
|
25
|
+
* the language in force (`provideSlotted`).
|
|
26
|
+
*/
|
|
27
|
+
function provideFormDefaults(defaults) {
|
|
28
|
+
return {
|
|
29
|
+
provide: FORM_DEFAULTS,
|
|
30
|
+
useFactory: () => ({ ...FALLBACK, ...defaults }),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function injectFormDefaults() {
|
|
34
|
+
return inject(FORM_DEFAULTS);
|
|
35
|
+
}
|
|
36
|
+
const SL_FORM_ERROR_MESSAGES = new InjectionToken('slotted form error messages', { providedIn: 'root', factory: () => ({}) });
|
|
37
|
+
/** Names the sentences the application's own validators are written as. */
|
|
38
|
+
function provideFormErrorMessages(messages) {
|
|
39
|
+
return { provide: SL_FORM_ERROR_MESSAGES, useValue: messages };
|
|
40
|
+
}
|
|
41
|
+
function injectFormErrorMessages() {
|
|
42
|
+
return inject(SL_FORM_ERROR_MESSAGES);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* What the summary needs from the form around it.
|
|
46
|
+
*
|
|
47
|
+
* It is an abstract class rather than an import so the two classes can depend
|
|
48
|
+
* on each other without a cycle — the shape `field` and `text-field` already
|
|
49
|
+
* have.
|
|
50
|
+
*/
|
|
51
|
+
class SlFormOwner {
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The row a form's actions stand in.
|
|
56
|
+
*
|
|
57
|
+
* `inline` can end-align a row of buttons. What it cannot do without a query
|
|
58
|
+
* the consumer writes for every form is the reflow: below the form's own
|
|
59
|
+
* container width every action takes the whole width, in a column, with the
|
|
60
|
+
* primary one first — a reader's thumb is at the bottom of a phone and their
|
|
61
|
+
* eye at the end of a row.
|
|
62
|
+
*/
|
|
63
|
+
class SlFormActions {
|
|
64
|
+
/** Defaults to the form's own `align`, then to the token, then to `end`. */
|
|
65
|
+
align = input(undefined, /* @ts-ignore */
|
|
66
|
+
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
67
|
+
form = inject(SlFormOwner, { optional: true });
|
|
68
|
+
resolvedAlign = computed(() => this.align() ?? this.form?.resolvedAlign() ?? 'end', /* @ts-ignore */
|
|
69
|
+
...(ngDevMode ? [{ debugName: "resolvedAlign" }] : /* istanbul ignore next */ []));
|
|
70
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFormActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
71
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: SlFormActions, isStandalone: true, selector: "[slFormActions]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-ui": "form", "data-part": "actions" }, properties: { "attr.data-align": "resolvedAlign()" } }, exportAs: ["slFormActions"], ngImport: i0 });
|
|
72
|
+
}
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFormActions, decorators: [{
|
|
74
|
+
type: Directive,
|
|
75
|
+
args: [{
|
|
76
|
+
selector: '[slFormActions]',
|
|
77
|
+
standalone: true,
|
|
78
|
+
exportAs: 'slFormActions',
|
|
79
|
+
host: {
|
|
80
|
+
// The family's identifier on the part: its rules reach it by name, never as any descendant.
|
|
81
|
+
'data-ui': 'form',
|
|
82
|
+
'data-part': 'actions',
|
|
83
|
+
'[attr.data-align]': 'resolvedAlign()',
|
|
84
|
+
},
|
|
85
|
+
}]
|
|
86
|
+
}], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }] } });
|
|
87
|
+
|
|
88
|
+
let summaryCounter = 0;
|
|
89
|
+
/**
|
|
90
|
+
* The summary of everything wrong with the form: a focusable region with a
|
|
91
|
+
* heading, and a link per error pointing at the control it is about.
|
|
92
|
+
*
|
|
93
|
+
* It is the GOV.UK error summary, item for item — "move keyboard focus to the
|
|
94
|
+
* error summary", "include the heading", "link to each of the answers that have
|
|
95
|
+
* validation errors", "make sure the error messages in the error summary are
|
|
96
|
+
* worded the same as those which appear next to the inputs". The last one is
|
|
97
|
+
* free here: one map feeds the summary and the field.
|
|
98
|
+
*
|
|
99
|
+
* The form renders this itself under `summary="auto"`. A consumer who wants it
|
|
100
|
+
* somewhere else writes `summary="none"` and puts `slFormSummary` on their own
|
|
101
|
+
* element.
|
|
102
|
+
*/
|
|
103
|
+
class SlFormSummary {
|
|
104
|
+
form = inject(SlFormOwner);
|
|
105
|
+
element = inject(ElementRef).nativeElement;
|
|
106
|
+
ngAfterViewInit() {
|
|
107
|
+
this.form.registerSummary(this.element);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The fragment is not followed. A link that navigated would write the
|
|
111
|
+
* control's identifier into the address bar and add an entry to the history
|
|
112
|
+
* of a page that never left; focusing the control is the whole of what the
|
|
113
|
+
* link is for, and the browser scrolls it into view with the focus.
|
|
114
|
+
*/
|
|
115
|
+
focus(event, id) {
|
|
116
|
+
const target = this.element.ownerDocument.getElementById(id);
|
|
117
|
+
if (target === null)
|
|
118
|
+
return;
|
|
119
|
+
event.preventDefault();
|
|
120
|
+
target.focus();
|
|
121
|
+
}
|
|
122
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFormSummary, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
123
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlFormSummary, isStandalone: true, selector: "[slFormSummary]", host: { attributes: { "data-ui": "form", "data-part": "summary", "role": "alert", "tabindex": "-1" }, properties: { "attr.aria-labelledby": "form.summaryId()" } }, exportAs: ["slFormSummary"], ngImport: i0, template: `<h2 data-part="summary-title" [attr.id]="form.summaryId()">
|
|
124
|
+
{{ form.resolvedSummaryTitle() }}
|
|
125
|
+
</h2>
|
|
126
|
+
@if (form.resolvedSummaryDescription(); as description) {
|
|
127
|
+
<p>{{ description }}</p>
|
|
128
|
+
}
|
|
129
|
+
<ul data-part="summary-list">
|
|
130
|
+
@for (entry of form.entries(); track entry.name) {
|
|
131
|
+
@for (message of entry.messages; track message) {
|
|
132
|
+
<li>
|
|
133
|
+
@if (entry.id) {
|
|
134
|
+
<a
|
|
135
|
+
data-part="summary-item"
|
|
136
|
+
[attr.href]="'#' + entry.id"
|
|
137
|
+
(click)="focus($event, entry.id)"
|
|
138
|
+
>
|
|
139
|
+
{{ message }}
|
|
140
|
+
</a>
|
|
141
|
+
} @else {
|
|
142
|
+
<span data-part="summary-item">{{ message }}</span>
|
|
143
|
+
}
|
|
144
|
+
</li>
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
</ul>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
148
|
+
}
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlFormSummary, decorators: [{
|
|
150
|
+
type: Component,
|
|
151
|
+
args: [{
|
|
152
|
+
selector: '[slFormSummary]',
|
|
153
|
+
standalone: true,
|
|
154
|
+
exportAs: 'slFormSummary',
|
|
155
|
+
template: `<h2 data-part="summary-title" [attr.id]="form.summaryId()">
|
|
156
|
+
{{ form.resolvedSummaryTitle() }}
|
|
157
|
+
</h2>
|
|
158
|
+
@if (form.resolvedSummaryDescription(); as description) {
|
|
159
|
+
<p>{{ description }}</p>
|
|
160
|
+
}
|
|
161
|
+
<ul data-part="summary-list">
|
|
162
|
+
@for (entry of form.entries(); track entry.name) {
|
|
163
|
+
@for (message of entry.messages; track message) {
|
|
164
|
+
<li>
|
|
165
|
+
@if (entry.id) {
|
|
166
|
+
<a
|
|
167
|
+
data-part="summary-item"
|
|
168
|
+
[attr.href]="'#' + entry.id"
|
|
169
|
+
(click)="focus($event, entry.id)"
|
|
170
|
+
>
|
|
171
|
+
{{ message }}
|
|
172
|
+
</a>
|
|
173
|
+
} @else {
|
|
174
|
+
<span data-part="summary-item">{{ message }}</span>
|
|
175
|
+
}
|
|
176
|
+
</li>
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
</ul>`,
|
|
180
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
181
|
+
encapsulation: ViewEncapsulation.None,
|
|
182
|
+
host: {
|
|
183
|
+
// The family's identifier on the part: its rules reach it by name, never as any descendant.
|
|
184
|
+
'data-ui': 'form',
|
|
185
|
+
'data-part': 'summary',
|
|
186
|
+
role: 'alert',
|
|
187
|
+
tabindex: '-1',
|
|
188
|
+
'[attr.aria-labelledby]': 'form.summaryId()',
|
|
189
|
+
},
|
|
190
|
+
}]
|
|
191
|
+
}] });
|
|
192
|
+
/**
|
|
193
|
+
* A form, its errors and its row of actions.
|
|
194
|
+
*
|
|
195
|
+
* **It owns the errors and nothing else.** `docs/component-features.md` § 6 puts
|
|
196
|
+
* the boundary there: the family coordinates submission, validation, global
|
|
197
|
+
* messages and focus "sem possuir o estado de cada framework". Values come from
|
|
198
|
+
* `FormData`, validity from `checkValidity()` and from Reactive Forms, and the
|
|
199
|
+
* values themselves stay with whichever of the two owns them.
|
|
200
|
+
*
|
|
201
|
+
* **`novalidate` is written, and constraint validation still runs.** The
|
|
202
|
+
* attribute stops the browser drawing its own bubble beside a control whose
|
|
203
|
+
* error the `field` is already showing; `checkValidity()` is called explicitly
|
|
204
|
+
* and each control's `validationMessage` is the platform's localized string.
|
|
205
|
+
*
|
|
206
|
+
* **Reactive Forms is the second source.** When there is a `ControlContainer`,
|
|
207
|
+
* every control is marked touched at submit and each failing one becomes a
|
|
208
|
+
* sentence: a built-in validator's through the catalog's `errors.*` messages,
|
|
209
|
+
* an application's own through `SL_FORM_ERROR_MESSAGES`.
|
|
210
|
+
*
|
|
211
|
+
* **Signal Forms needs nothing here.** Angular 22's `[field]` binds a control
|
|
212
|
+
* through its `ControlValueAccessor`, which every Slotted control provides, so
|
|
213
|
+
* they work under it today and this family adds no second integration.
|
|
214
|
+
*/
|
|
215
|
+
class SlForm {
|
|
216
|
+
/**
|
|
217
|
+
* Present means the consumer owns the error map, for the life of the
|
|
218
|
+
* component. Keyed by the `name` attribute of the control each error is about.
|
|
219
|
+
*/
|
|
220
|
+
errorsInput = input(undefined, { ...(ngDevMode ? { debugName: "errorsInput" } : /* istanbul ignore next */ {}), alias: 'errors' });
|
|
221
|
+
/** The errors an uncontrolled form starts from, read once. */
|
|
222
|
+
defaultErrors = input(undefined, /* @ts-ignore */
|
|
223
|
+
...(ngDevMode ? [{ debugName: "defaultErrors" }] : /* istanbul ignore next */ []));
|
|
224
|
+
validate = input(undefined, /* @ts-ignore */
|
|
225
|
+
...(ngDevMode ? [{ debugName: "validate" }] : /* istanbul ignore next */ []));
|
|
226
|
+
errorFocus = input(undefined, /* @ts-ignore */
|
|
227
|
+
...(ngDevMode ? [{ debugName: "errorFocus" }] : /* istanbul ignore next */ []));
|
|
228
|
+
summary = input(undefined, /* @ts-ignore */
|
|
229
|
+
...(ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []));
|
|
230
|
+
summaryDescription = input(undefined, /* @ts-ignore */
|
|
231
|
+
...(ngDevMode ? [{ debugName: "summaryDescription" }] : /* istanbul ignore next */ []));
|
|
232
|
+
align = input(undefined, /* @ts-ignore */
|
|
233
|
+
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
234
|
+
/**
|
|
235
|
+
* Words laid over the catalog of the language in force, key by key: the
|
|
236
|
+
* summary's heading (`summaryTitle`) and the built-in validators' sentences
|
|
237
|
+
* (`errors.*`).
|
|
238
|
+
*/
|
|
239
|
+
messages = input(undefined, /* @ts-ignore */
|
|
240
|
+
...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
|
|
241
|
+
/** Lets the browser draw its own validation bubble. Off by default. */
|
|
242
|
+
nativeValidation = input(undefined, { ...(ngDevMode ? { debugName: "nativeValidation" } : /* istanbul ignore next */ {}), transform: (raw) => (raw === undefined ? undefined : booleanAttribute(raw)) });
|
|
243
|
+
/** Marks the form and every control in it as unavailable. */
|
|
244
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
245
|
+
/**
|
|
246
|
+
* Marks the form busy for work the family did not start — a mutation a
|
|
247
|
+
* consumer's own client is running. It is merged with the family's own
|
|
248
|
+
* submission, so either one puts the root in its busy state.
|
|
249
|
+
*/
|
|
250
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
251
|
+
/**
|
|
252
|
+
* Registers a `beforeunload` guard while anything in the form has been
|
|
253
|
+
* edited. Off by default: a guard nobody asked for is a trap.
|
|
254
|
+
*/
|
|
255
|
+
guardUnsaved = input(false, { ...(ngDevMode ? { debugName: "guardUnsaved" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
256
|
+
/** One output for one transition, carrying the reason and `cancel()`. */
|
|
257
|
+
errorsChange = output();
|
|
258
|
+
/**
|
|
259
|
+
* Emitted when the form submits and nothing is wrong with it. The values are
|
|
260
|
+
* read from `FormData`, and `errors` is how a handler publishes what a server
|
|
261
|
+
* answered.
|
|
262
|
+
*/
|
|
263
|
+
formSubmit = output();
|
|
264
|
+
element = inject(ElementRef).nativeElement;
|
|
265
|
+
defaults = injectFormDefaults();
|
|
266
|
+
errorMessages = injectFormErrorMessages();
|
|
267
|
+
/** The family's words in the language in force, with this form's `messages` laid over them. */
|
|
268
|
+
t = injectMessages(formMessages, this.messages);
|
|
269
|
+
/** The Reactive Forms group around this element, when a consumer wrote one. */
|
|
270
|
+
container = inject(ControlContainer, { optional: true, self: true });
|
|
271
|
+
writtenNoValidate = inject(new HostAttributeToken('novalidate'), {
|
|
272
|
+
optional: true,
|
|
273
|
+
});
|
|
274
|
+
own = signal({}, /* @ts-ignore */
|
|
275
|
+
...(ngDevMode ? [{ debugName: "own" }] : /* istanbul ignore next */ []));
|
|
276
|
+
controls = signal([], /* @ts-ignore */
|
|
277
|
+
...(ngDevMode ? [{ debugName: "controls" }] : /* istanbul ignore next */ []));
|
|
278
|
+
summaryElement = null;
|
|
279
|
+
/** Set when a publish should be followed by the focus a failed submit moves. */
|
|
280
|
+
pendingFocus = false;
|
|
281
|
+
ownSubmitting = signal(false, /* @ts-ignore */
|
|
282
|
+
...(ngDevMode ? [{ debugName: "ownSubmitting" }] : /* istanbul ignore next */ []));
|
|
283
|
+
/** Either the family's own submission or a consumer's own work. */
|
|
284
|
+
submitting = computed(() => this.ownSubmitting() || this.loading(), /* @ts-ignore */
|
|
285
|
+
...(ngDevMode ? [{ debugName: "submitting" }] : /* istanbul ignore next */ []));
|
|
286
|
+
submitted = signal(false, /* @ts-ignore */
|
|
287
|
+
...(ngDevMode ? [{ debugName: "submitted" }] : /* istanbul ignore next */ []));
|
|
288
|
+
external = computed(() => normaliseErrors(this.errorsInput()), /* @ts-ignore */
|
|
289
|
+
...(ngDevMode ? [{ debugName: "external" }] : /* istanbul ignore next */ []));
|
|
290
|
+
controlled = computed(() => this.errorsInput() !== undefined, /* @ts-ignore */
|
|
291
|
+
...(ngDevMode ? [{ debugName: "controlled" }] : /* istanbul ignore next */ []));
|
|
292
|
+
errors = computed(() => (this.controlled() ? this.external() : this.own()), /* @ts-ignore */
|
|
293
|
+
...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
294
|
+
entries = computed(() => orderErrors(this.errors(), this.controls()), /* @ts-ignore */
|
|
295
|
+
...(ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []));
|
|
296
|
+
hasAnyError = computed(() => hasErrors(this.errors()), /* @ts-ignore */
|
|
297
|
+
...(ngDevMode ? [{ debugName: "hasAnyError" }] : /* istanbul ignore next */ []));
|
|
298
|
+
summaryId = signal(`slotted-form-summary-${(summaryCounter += 1)}`, /* @ts-ignore */
|
|
299
|
+
...(ngDevMode ? [{ debugName: "summaryId" }] : /* istanbul ignore next */ []));
|
|
300
|
+
resolvedSummaryTitle = computed(() => this.t('summaryTitle'), /* @ts-ignore */
|
|
301
|
+
...(ngDevMode ? [{ debugName: "resolvedSummaryTitle" }] : /* istanbul ignore next */ []));
|
|
302
|
+
resolvedSummaryDescription = computed(() => this.summaryDescription() ?? this.defaults.summaryDescription, /* @ts-ignore */
|
|
303
|
+
...(ngDevMode ? [{ debugName: "resolvedSummaryDescription" }] : /* istanbul ignore next */ []));
|
|
304
|
+
resolvedAlign = computed(() => this.align() ?? this.defaults.align, /* @ts-ignore */
|
|
305
|
+
...(ngDevMode ? [{ debugName: "resolvedAlign" }] : /* istanbul ignore next */ []));
|
|
306
|
+
resolvedValidate = computed(() => this.validate() ?? this.defaults.validate, /* @ts-ignore */
|
|
307
|
+
...(ngDevMode ? [{ debugName: "resolvedValidate" }] : /* istanbul ignore next */ []));
|
|
308
|
+
resolvedErrorFocus = computed(() => this.errorFocus() ?? this.defaults.errorFocus, /* @ts-ignore */
|
|
309
|
+
...(ngDevMode ? [{ debugName: "resolvedErrorFocus" }] : /* istanbul ignore next */ []));
|
|
310
|
+
resolvedSummary = computed(() => this.summary() ?? this.defaults.summary, /* @ts-ignore */
|
|
311
|
+
...(ngDevMode ? [{ debugName: "resolvedSummary" }] : /* istanbul ignore next */ []));
|
|
312
|
+
resolvedNativeValidation = computed(() => this.nativeValidation() ??
|
|
313
|
+
(this.writtenNoValidate === null ? this.defaults.nativeValidation : false), /* @ts-ignore */
|
|
314
|
+
...(ngDevMode ? [{ debugName: "resolvedNativeValidation" }] : /* istanbul ignore next */ []));
|
|
315
|
+
showsOwnSummary = computed(() => this.resolvedSummary() === 'auto' && this.entries().length > 0, /* @ts-ignore */
|
|
316
|
+
...(ngDevMode ? [{ debugName: "showsOwnSummary" }] : /* istanbul ignore next */ []));
|
|
317
|
+
constructor() {
|
|
318
|
+
this.attachUnloadGuard();
|
|
319
|
+
}
|
|
320
|
+
ngOnInit() {
|
|
321
|
+
this.own.set(normaliseErrors(this.defaultErrors()));
|
|
322
|
+
this.readControls();
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* The summary says when it exists, and takes the focus a failed submit asked
|
|
326
|
+
* for. The move waits for the region rather than racing it: the errors and
|
|
327
|
+
* the element that shows them are published in the same change, and a
|
|
328
|
+
* `focus()` called before the region rendered would land on nothing.
|
|
329
|
+
*/
|
|
330
|
+
registerSummary(element) {
|
|
331
|
+
this.summaryElement = element;
|
|
332
|
+
if (element === null || !this.pendingFocus)
|
|
333
|
+
return;
|
|
334
|
+
this.pendingFocus = false;
|
|
335
|
+
element.focus();
|
|
336
|
+
}
|
|
337
|
+
/** Runs validation now and publishes what it found. */
|
|
338
|
+
validateNow() {
|
|
339
|
+
const found = this.collect();
|
|
340
|
+
this.publish(found, 'programmatic', undefined);
|
|
341
|
+
return found;
|
|
342
|
+
}
|
|
343
|
+
/** Submits as though the submit button had been pressed. */
|
|
344
|
+
submit() {
|
|
345
|
+
this.element.requestSubmit();
|
|
346
|
+
}
|
|
347
|
+
/** Resets the controls and clears the errors. */
|
|
348
|
+
reset() {
|
|
349
|
+
this.element.reset();
|
|
350
|
+
}
|
|
351
|
+
/** Moves focus where a failed submit would have moved it. */
|
|
352
|
+
focusFirstError() {
|
|
353
|
+
const focus = this.resolvedErrorFocus();
|
|
354
|
+
if (focus === 'none')
|
|
355
|
+
return;
|
|
356
|
+
if (focus === 'summary' && this.summaryElement !== null) {
|
|
357
|
+
this.summaryElement.focus();
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
const first = this.entries()[0];
|
|
361
|
+
if (first === undefined)
|
|
362
|
+
return;
|
|
363
|
+
const control = this.element.elements.namedItem(first.name);
|
|
364
|
+
const element = control instanceof RadioNodeList ? control[0] : control;
|
|
365
|
+
if (element instanceof HTMLElement)
|
|
366
|
+
element.focus();
|
|
367
|
+
}
|
|
368
|
+
onSubmit(event) {
|
|
369
|
+
this.submitted.set(true);
|
|
370
|
+
this.readControls();
|
|
371
|
+
if (this.submitting()) {
|
|
372
|
+
/* A second submit while one is pending is refused. */
|
|
373
|
+
event.preventDefault();
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
const found = this.resolvedValidate() === 'none' ? this.external() : this.collect();
|
|
377
|
+
if (hasErrors(found)) {
|
|
378
|
+
event.preventDefault();
|
|
379
|
+
this.publish(found, 'submit', event);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
this.publish({}, 'submit', event);
|
|
383
|
+
event.preventDefault();
|
|
384
|
+
const data = new FormData(this.element);
|
|
385
|
+
const values = {};
|
|
386
|
+
for (const key of new Set(data.keys())) {
|
|
387
|
+
const all = data.getAll(key);
|
|
388
|
+
values[key] = all.length > 1 ? all : all[0];
|
|
389
|
+
}
|
|
390
|
+
this.formSubmit.emit({
|
|
391
|
+
values,
|
|
392
|
+
event,
|
|
393
|
+
errors: (errors) => this.publish(normaliseErrors(errors), 'submit', event),
|
|
394
|
+
pending: (work) => {
|
|
395
|
+
this.ownSubmitting.set(true);
|
|
396
|
+
void work
|
|
397
|
+
.then((settled) => {
|
|
398
|
+
if (settled !== undefined && settled !== null) {
|
|
399
|
+
this.publish(normaliseErrors(settled), 'submit', event);
|
|
400
|
+
}
|
|
401
|
+
})
|
|
402
|
+
.finally(() => this.ownSubmitting.set(false));
|
|
403
|
+
},
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
onReset() {
|
|
407
|
+
this.submitted.set(false);
|
|
408
|
+
this.publish({}, 'clear', undefined);
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* A server error is dropped when the control it names is edited. After a
|
|
412
|
+
* failed submit under `validate="change"`, the whole form is checked again
|
|
413
|
+
* instead, because a reader who has seen the list is fixing it.
|
|
414
|
+
*/
|
|
415
|
+
onInput(event) {
|
|
416
|
+
const name = nameOf(event.target);
|
|
417
|
+
if (name === null)
|
|
418
|
+
return;
|
|
419
|
+
if (this.resolvedValidate() === 'change' && this.submitted()) {
|
|
420
|
+
this.publish(this.collect(), 'keyboard', event, false);
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
const next = withoutError(this.errors(), name);
|
|
424
|
+
if (next !== this.errors())
|
|
425
|
+
this.publish(next, 'keyboard', event, false);
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* On blur only the control that lost focus is checked. Running the whole form
|
|
429
|
+
* would tell a reader that six fields they have not reached yet are wrong,
|
|
430
|
+
* which is the noise `validate="submit"` exists to avoid.
|
|
431
|
+
*/
|
|
432
|
+
onFocusOut(event) {
|
|
433
|
+
if (this.resolvedValidate() !== 'blur')
|
|
434
|
+
return;
|
|
435
|
+
const name = nameOf(event.target);
|
|
436
|
+
if (name === null)
|
|
437
|
+
return;
|
|
438
|
+
const found = this.collect();
|
|
439
|
+
const messages = found[name];
|
|
440
|
+
const next = messages === undefined
|
|
441
|
+
? withoutError(this.errors(), name)
|
|
442
|
+
: mergeErrors(this.errors(), { [name]: messages });
|
|
443
|
+
if (next !== this.errors())
|
|
444
|
+
this.publish(next, 'keyboard', event, false);
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Three sources, latest last: whatever a server sent, the platform's own
|
|
448
|
+
* constraint validation, and Reactive Forms.
|
|
449
|
+
*/
|
|
450
|
+
collect() {
|
|
451
|
+
return mergeErrors(this.external(), collectValidity(this.element), this.angularErrors());
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Every failing control in the group around this form, as a sentence. Angular
|
|
455
|
+
* reports a key and a shape and never a message, because a message is the
|
|
456
|
+
* application's and so is its language; the registry is where it is written.
|
|
457
|
+
*/
|
|
458
|
+
angularErrors() {
|
|
459
|
+
const group = this.container?.control;
|
|
460
|
+
if (group === null || group === undefined)
|
|
461
|
+
return {};
|
|
462
|
+
group.markAllAsTouched();
|
|
463
|
+
const found = {};
|
|
464
|
+
for (const [name, control] of Object.entries(group.controls)) {
|
|
465
|
+
const errors = control.errors;
|
|
466
|
+
if (errors === null || control.disabled)
|
|
467
|
+
continue;
|
|
468
|
+
const messages = Object.entries(errors)
|
|
469
|
+
.map(([key, detail]) => this.errorMessages[key]?.({ name, key, detail }) ?? this.builtInMessage(key, detail))
|
|
470
|
+
.filter((message) => typeof message === 'string');
|
|
471
|
+
if (messages.length > 0)
|
|
472
|
+
found[name] = messages;
|
|
473
|
+
}
|
|
474
|
+
return found;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* The sentence for one of Angular's own validators, from the catalog; for a
|
|
478
|
+
* key the catalog does not know, nothing — the application's validator names
|
|
479
|
+
* its own message through `SL_FORM_ERROR_MESSAGES`.
|
|
480
|
+
*/
|
|
481
|
+
builtInMessage(key, detail) {
|
|
482
|
+
const shape = (detail ?? {});
|
|
483
|
+
switch (key) {
|
|
484
|
+
case 'required':
|
|
485
|
+
return this.t('errors.required');
|
|
486
|
+
case 'email':
|
|
487
|
+
return this.t('errors.email');
|
|
488
|
+
case 'min':
|
|
489
|
+
return this.t('errors.min', { min: Number(shape.min) });
|
|
490
|
+
case 'max':
|
|
491
|
+
return this.t('errors.max', { max: Number(shape.max) });
|
|
492
|
+
case 'minlength':
|
|
493
|
+
return this.t('errors.minlength', { length: Number(shape.requiredLength) });
|
|
494
|
+
case 'maxlength':
|
|
495
|
+
return this.t('errors.maxlength', { length: Number(shape.requiredLength) });
|
|
496
|
+
case 'pattern':
|
|
497
|
+
return this.t('errors.pattern');
|
|
498
|
+
default:
|
|
499
|
+
return undefined;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
readControls() {
|
|
503
|
+
this.controls.set(namedControls(this.element));
|
|
504
|
+
}
|
|
505
|
+
publish(next, reason, source, moveFocus = true) {
|
|
506
|
+
this.readControls();
|
|
507
|
+
let cancelled = false;
|
|
508
|
+
const state = createControllable({
|
|
509
|
+
controlled: undefined,
|
|
510
|
+
initial: this.errors(),
|
|
511
|
+
equals: sameErrors,
|
|
512
|
+
onRequest: (pending) => {
|
|
513
|
+
this.errorsChange.emit(pending);
|
|
514
|
+
cancelled = pending.cancelled;
|
|
515
|
+
},
|
|
516
|
+
});
|
|
517
|
+
state.request(next, reason, source);
|
|
518
|
+
if (cancelled)
|
|
519
|
+
return;
|
|
520
|
+
if (!this.controlled())
|
|
521
|
+
this.own.set(next);
|
|
522
|
+
if (!moveFocus || !hasErrors(next) || this.resolvedErrorFocus() === 'none')
|
|
523
|
+
return;
|
|
524
|
+
/* A summary that has not been rendered yet takes the focus when it is, and
|
|
525
|
+
one that is already on the page takes it now. */
|
|
526
|
+
if (this.resolvedErrorFocus() === 'summary' && this.summaryElement === null) {
|
|
527
|
+
this.pendingFocus = true;
|
|
528
|
+
return;
|
|
529
|
+
}
|
|
530
|
+
this.focusFirstError();
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* The guard nobody else ships. It is off by default, because a page that
|
|
534
|
+
* refuses to close after a reader typed one character is a trap.
|
|
535
|
+
*/
|
|
536
|
+
attachUnloadGuard() {
|
|
537
|
+
const onBeforeUnload = (event) => {
|
|
538
|
+
if (!this.guardUnsaved() || this.submitting())
|
|
539
|
+
return;
|
|
540
|
+
if (!isDirty(this.element))
|
|
541
|
+
return;
|
|
542
|
+
event.preventDefault();
|
|
543
|
+
};
|
|
544
|
+
window.addEventListener('beforeunload', onBeforeUnload);
|
|
545
|
+
inject(DestroyRef).onDestroy(() => window.removeEventListener('beforeunload', onBeforeUnload));
|
|
546
|
+
}
|
|
547
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlForm, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
548
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlForm, isStandalone: true, selector: "form[slForm]", inputs: { errorsInput: { classPropertyName: "errorsInput", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, defaultErrors: { classPropertyName: "defaultErrors", publicName: "defaultErrors", isSignal: true, isRequired: false, transformFunction: null }, validate: { classPropertyName: "validate", publicName: "validate", isSignal: true, isRequired: false, transformFunction: null }, errorFocus: { classPropertyName: "errorFocus", publicName: "errorFocus", isSignal: true, isRequired: false, transformFunction: null }, summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: false, transformFunction: null }, summaryDescription: { classPropertyName: "summaryDescription", publicName: "summaryDescription", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, nativeValidation: { classPropertyName: "nativeValidation", publicName: "nativeValidation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, guardUnsaved: { classPropertyName: "guardUnsaved", publicName: "guardUnsaved", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { errorsChange: "errorsChange", formSubmit: "formSubmit" }, host: { attributes: { "data-ui": "form", "data-part": "root" }, listeners: { "submit": "onSubmit($event)", "reset": "onReset()", "input": "onInput($event)", "focusout": "onFocusOut($event)" }, properties: { "attr.novalidate": "resolvedNativeValidation() ? null : ''", "attr.aria-busy": "submitting() ? 'true' : null", "attr.data-invalid": "hasAnyError() ? '' : null", "attr.data-loading": "submitting() ? '' : null", "attr.data-disabled": "disabled() ? '' : null" } }, providers: [{ provide: SlFormOwner, useExisting: forwardRef(() => SlForm) }], exportAs: ["slForm"], ngImport: i0, template: `@if (showsOwnSummary()) {
|
|
549
|
+
<div slFormSummary></div>
|
|
550
|
+
}
|
|
551
|
+
<ng-content />`, isInline: true, styles: ["@layer slotted.components{[data-ui=form][data-part=root]{--_font-size: var(--slotted-control-font-size-md, 13px);container-name:slotted-form;container-type:inline-size;color:var(--slotted-form-color, var(--slotted-text, CanvasText));display:block;font-family:var(--slotted-control-font-family, system-ui, sans-serif);inline-size:100%;min-inline-size:0}[data-ui=form][data-part=root][data-loading]{cursor:progress}[data-ui=form][data-part=summary]{background-color:var(--slotted-form-summary-background, var(--slotted-tone-danger-surface));border:var(--slotted-control-border-width, 1px) solid var(--slotted-form-summary-border-color, var(--slotted-tone-danger-border));border-inline-start-width:var(--slotted-border-width-thick, 2px);border-radius:var(--slotted-form-summary-radius, var(--slotted-radius-md, 6px));color:var(--slotted-form-summary-color, var(--slotted-tone-danger-text));display:block;font-size:var(--_font-size);margin-block-end:var(--slotted-space-6, 1rem);padding-block:var(--slotted-space-5, .75rem);padding-inline:var(--slotted-space-6, 1rem)}[data-ui=form][data-part=summary]: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=form][data-part=summary]>[data-part=summary-title]{font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) );font-size:var(--_font-size);font-weight:var(--slotted-font-weight-semibold, 600);line-height:var(--slotted-line-height-md, 1.5);margin:0}[data-ui=form][data-part=summary]>[data-part=summary-list]{display:flex;flex-direction:column;gap:var(--slotted-space-2, .25rem);line-height:var(--slotted-line-height-sm, 1.45);list-style:none;margin-block:var(--slotted-space-3, .375rem) 0;max-block-size:calc(12em * var(--slotted-line-height-sm, 1.45));overflow-y:auto;padding-block:var(--slotted-space-1, .125rem);padding-inline-start:0}[data-ui=form][data-part=summary]>[data-part=summary-list]>li>[data-part=summary-item]{color:inherit;text-decoration-line:underline;text-underline-offset:var(--slotted-space-1, .125rem)}[data-ui=form][data-part=summary]>[data-part=summary-list]>li>[data-part=summary-item]:hover:not(:disabled){text-decoration-thickness:var(--slotted-border-width-thick, 2px)}[data-ui=form][data-part=summary]>[data-part=summary-list]>li>[data-part=summary-item]:focus-visible{border-radius:var(--slotted-radius-xs, 2px);outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui=form][data-part=actions]{display:flex;flex-wrap:wrap;gap:var(--slotted-space-4, .5rem);justify-content:flex-end;margin-block-start:var(--slotted-space-8, 1.5rem)}[data-ui=form][data-part=actions][data-align=start]{justify-content:flex-start}[data-ui=form][data-part=actions][data-align=between]{justify-content:space-between}[data-ui=form][data-part=actions][data-align=stretch]>*{flex:1 1 0}@container slotted-form (max-width: 360px){[data-ui=form][data-part=actions]{flex-direction:column-reverse}[data-ui=form][data-part=actions]>*{inline-size:100%}}@media(forced-colors:active){[data-ui=form][data-part=summary]{border-color:CanvasText;border-inline-start-color:Highlight}}}\n"], dependencies: [{ kind: "component", type: SlFormSummary, selector: "[slFormSummary]", exportAs: ["slFormSummary"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
552
|
+
}
|
|
553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlForm, decorators: [{
|
|
554
|
+
type: Component,
|
|
555
|
+
args: [{ selector: 'form[slForm]', standalone: true, exportAs: 'slForm', imports: [SlFormSummary], template: `@if (showsOwnSummary()) {
|
|
556
|
+
<div slFormSummary></div>
|
|
557
|
+
}
|
|
558
|
+
<ng-content />`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: SlFormOwner, useExisting: forwardRef(() => SlForm) }], host: {
|
|
559
|
+
'data-ui': 'form',
|
|
560
|
+
'data-part': 'root',
|
|
561
|
+
'[attr.novalidate]': "resolvedNativeValidation() ? null : ''",
|
|
562
|
+
'[attr.aria-busy]': "submitting() ? 'true' : null",
|
|
563
|
+
'[attr.data-invalid]': "hasAnyError() ? '' : null",
|
|
564
|
+
'[attr.data-loading]': "submitting() ? '' : null",
|
|
565
|
+
'[attr.data-disabled]': "disabled() ? '' : null",
|
|
566
|
+
'(submit)': 'onSubmit($event)',
|
|
567
|
+
'(reset)': 'onReset()',
|
|
568
|
+
'(input)': 'onInput($event)',
|
|
569
|
+
'(focusout)': 'onFocusOut($event)',
|
|
570
|
+
}, styles: ["@layer slotted.components{[data-ui=form][data-part=root]{--_font-size: var(--slotted-control-font-size-md, 13px);container-name:slotted-form;container-type:inline-size;color:var(--slotted-form-color, var(--slotted-text, CanvasText));display:block;font-family:var(--slotted-control-font-family, system-ui, sans-serif);inline-size:100%;min-inline-size:0}[data-ui=form][data-part=root][data-loading]{cursor:progress}[data-ui=form][data-part=summary]{background-color:var(--slotted-form-summary-background, var(--slotted-tone-danger-surface));border:var(--slotted-control-border-width, 1px) solid var(--slotted-form-summary-border-color, var(--slotted-tone-danger-border));border-inline-start-width:var(--slotted-border-width-thick, 2px);border-radius:var(--slotted-form-summary-radius, var(--slotted-radius-md, 6px));color:var(--slotted-form-summary-color, var(--slotted-tone-danger-text));display:block;font-size:var(--_font-size);margin-block-end:var(--slotted-space-6, 1rem);padding-block:var(--slotted-space-5, .75rem);padding-inline:var(--slotted-space-6, 1rem)}[data-ui=form][data-part=summary]: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=form][data-part=summary]>[data-part=summary-title]{font-family:var( --slotted-font-family-heading, var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif) );font-size:var(--_font-size);font-weight:var(--slotted-font-weight-semibold, 600);line-height:var(--slotted-line-height-md, 1.5);margin:0}[data-ui=form][data-part=summary]>[data-part=summary-list]{display:flex;flex-direction:column;gap:var(--slotted-space-2, .25rem);line-height:var(--slotted-line-height-sm, 1.45);list-style:none;margin-block:var(--slotted-space-3, .375rem) 0;max-block-size:calc(12em * var(--slotted-line-height-sm, 1.45));overflow-y:auto;padding-block:var(--slotted-space-1, .125rem);padding-inline-start:0}[data-ui=form][data-part=summary]>[data-part=summary-list]>li>[data-part=summary-item]{color:inherit;text-decoration-line:underline;text-underline-offset:var(--slotted-space-1, .125rem)}[data-ui=form][data-part=summary]>[data-part=summary-list]>li>[data-part=summary-item]:hover:not(:disabled){text-decoration-thickness:var(--slotted-border-width-thick, 2px)}[data-ui=form][data-part=summary]>[data-part=summary-list]>li>[data-part=summary-item]:focus-visible{border-radius:var(--slotted-radius-xs, 2px);outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:var(--slotted-focus-ring-offset, 2px)}[data-ui=form][data-part=actions]{display:flex;flex-wrap:wrap;gap:var(--slotted-space-4, .5rem);justify-content:flex-end;margin-block-start:var(--slotted-space-8, 1.5rem)}[data-ui=form][data-part=actions][data-align=start]{justify-content:flex-start}[data-ui=form][data-part=actions][data-align=between]{justify-content:space-between}[data-ui=form][data-part=actions][data-align=stretch]>*{flex:1 1 0}@container slotted-form (max-width: 360px){[data-ui=form][data-part=actions]{flex-direction:column-reverse}[data-ui=form][data-part=actions]>*{inline-size:100%}}@media(forced-colors:active){[data-ui=form][data-part=summary]{border-color:CanvasText;border-inline-start-color:Highlight}}}\n"] }]
|
|
571
|
+
}], ctorParameters: () => [], propDecorators: { errorsInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], defaultErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultErrors", required: false }] }], validate: [{ type: i0.Input, args: [{ isSignal: true, alias: "validate", required: false }] }], errorFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorFocus", required: false }] }], summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: false }] }], summaryDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "summaryDescription", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], nativeValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "nativeValidation", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], guardUnsaved: [{ type: i0.Input, args: [{ isSignal: true, alias: "guardUnsaved", required: false }] }], errorsChange: [{ type: i0.Output, args: ["errorsChange"] }], formSubmit: [{ type: i0.Output, args: ["formSubmit"] }] } });
|
|
572
|
+
function nameOf(target) {
|
|
573
|
+
if (!(target instanceof HTMLElement))
|
|
574
|
+
return null;
|
|
575
|
+
const name = target.name;
|
|
576
|
+
return typeof name === 'string' && name !== '' ? name : null;
|
|
577
|
+
}
|
|
578
|
+
function sameErrors(a, b) {
|
|
579
|
+
const names = Object.keys(a);
|
|
580
|
+
if (names.length !== Object.keys(b).length)
|
|
581
|
+
return false;
|
|
582
|
+
return names.every((name) => b[name] !== undefined &&
|
|
583
|
+
a[name].length === b[name].length &&
|
|
584
|
+
a[name].every((message, index) => message === b[name][index]));
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Generated bundle index. Do not edit.
|
|
589
|
+
*/
|
|
590
|
+
|
|
591
|
+
export { FORM_DEFAULTS, SL_FORM_ERROR_MESSAGES, SlForm, SlFormActions, SlFormOwner, SlFormSummary, injectFormDefaults, injectFormErrorMessages, provideFormDefaults, provideFormErrorMessages };
|
|
592
|
+
//# sourceMappingURL=slotted-angular-form.mjs.map
|