@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,1362 @@
|
|
|
1
|
+
import { createDateTimeFormat, dateBoundsOf, isDateTimeInRange, dayWindow, isTimeInRange, timeList, isTruncated, isSameTime, isSameDate, nowDateTimeIn, nearestIndex, hourJump, isSameDateTime } from '@slotted/core/date';
|
|
2
|
+
import { createDismissableLayer } from '@slotted/core/dismissable-layer';
|
|
3
|
+
import { tabbables } from '@slotted/core/focus';
|
|
4
|
+
import { createPositioner } from '@slotted/core/positioner';
|
|
5
|
+
import { createControllable } from '@slotted/core/state';
|
|
6
|
+
import { createTypeahead, isPrintable } from '@slotted/core/typeahead';
|
|
7
|
+
import * as i0 from '@angular/core';
|
|
8
|
+
import { InjectionToken, inject, Directive, input, booleanAttribute, numberAttribute, output, ElementRef, Injector, DestroyRef, signal, computed, effect, untracked, afterNextRender, TemplateRef, forwardRef, ViewChild, ContentChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
9
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
10
|
+
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
11
|
+
import { injectLocale, injectMessages } from '@slotted/angular/i18n';
|
|
12
|
+
import { SlGlyph, SlIcon } from '@slotted/angular/icon';
|
|
13
|
+
import { datetimePickerMessages } from '@slotted/core/i18n';
|
|
14
|
+
import { SlCalendar } from '@slotted/angular/calendar';
|
|
15
|
+
import { SlDateTimeField, SlDateTimeFieldEnd } from '@slotted/angular/datetime-field';
|
|
16
|
+
import { SlField } from '@slotted/angular/field';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* A whole day at a one-minute step, which is the finest whole-day list any
|
|
20
|
+
* surveyed implementation offers. A day at a one-second step is 86 400 rows and
|
|
21
|
+
* is a configuration mistake rather than a list.
|
|
22
|
+
*/
|
|
23
|
+
const DATE_TIME_PICKER_MAX_OPTIONS = 1440;
|
|
24
|
+
const FALLBACK = {
|
|
25
|
+
calendar: 'gregory',
|
|
26
|
+
closeOnSelect: 'auto',
|
|
27
|
+
granularity: 'minute',
|
|
28
|
+
hourCycle: undefined,
|
|
29
|
+
maxOptions: DATE_TIME_PICKER_MAX_OPTIONS,
|
|
30
|
+
openTo: 'date',
|
|
31
|
+
placement: 'bottom-start',
|
|
32
|
+
size: 'md',
|
|
33
|
+
step: 900,
|
|
34
|
+
timeZone: undefined,
|
|
35
|
+
unavailableOptions: 'disable',
|
|
36
|
+
variant: 'outline',
|
|
37
|
+
};
|
|
38
|
+
const DATE_TIME_PICKER_DEFAULTS = new InjectionToken('slotted datetime picker defaults', { providedIn: 'root', factory: () => FALLBACK });
|
|
39
|
+
/**
|
|
40
|
+
* An application decides once how its datetime pickers behave — which clock
|
|
41
|
+
* they run on, which step the list offers, which surface focus opens on —
|
|
42
|
+
* rather than repeating the same inputs on every control in a form. A control
|
|
43
|
+
* that states any of them itself still wins. The locale that writes them and
|
|
44
|
+
* every word they say come from the language in force (`provideSlotted`).
|
|
45
|
+
*/
|
|
46
|
+
function provideDateTimePickerDefaults(defaults) {
|
|
47
|
+
return {
|
|
48
|
+
provide: DATE_TIME_PICKER_DEFAULTS,
|
|
49
|
+
useFactory: () => ({ ...FALLBACK, ...defaults }),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/** What a datetime picker renders as here, before it states anything itself. */
|
|
53
|
+
function injectDateTimePickerDefaults() {
|
|
54
|
+
return inject(DATE_TIME_PICKER_DEFAULTS);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* What one row of the list draws.
|
|
59
|
+
*
|
|
60
|
+
* The row is the family's — its role, its states, its keyboard and its target
|
|
61
|
+
* size — and what is written inside it is the consumer's. It is a template
|
|
62
|
+
* rather than a projected slot because it is re-rendered once per option, which
|
|
63
|
+
* is exactly the case `references/frameworks.md` names `NgTemplateOutlet` for.
|
|
64
|
+
*
|
|
65
|
+
* The context carries the time as `$implicit`, plus `date`, `label`,
|
|
66
|
+
* `selected`, `current` and `unavailable`.
|
|
67
|
+
*/
|
|
68
|
+
class SlDateTimePickerOption {
|
|
69
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDateTimePickerOption, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
70
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlDateTimePickerOption, isStandalone: true, selector: "[slDateTimePickerOption]", exportAs: ["slDateTimePickerOption"], ngImport: i0 });
|
|
71
|
+
}
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDateTimePickerOption, decorators: [{
|
|
73
|
+
type: Directive,
|
|
74
|
+
args: [{
|
|
75
|
+
selector: '[slDateTimePickerOption]',
|
|
76
|
+
standalone: true,
|
|
77
|
+
exportAs: 'slDateTimePickerOption',
|
|
78
|
+
}]
|
|
79
|
+
}] });
|
|
80
|
+
/**
|
|
81
|
+
* The consumer's own shortcuts, in the head beside `now`.
|
|
82
|
+
*
|
|
83
|
+
* This family ships no list of them: "tomorrow at nine" is a business clock,
|
|
84
|
+
* and a library that guessed at one would be guessing at an industry. What it
|
|
85
|
+
* ships is the row they stand in.
|
|
86
|
+
*/
|
|
87
|
+
class SlDateTimePickerPresets {
|
|
88
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDateTimePickerPresets, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
89
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlDateTimePickerPresets, isStandalone: true, selector: "[slDateTimePickerPresets]", host: { attributes: { "data-part": "presets" } }, exportAs: ["slDateTimePickerPresets"], ngImport: i0 });
|
|
90
|
+
}
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDateTimePickerPresets, decorators: [{
|
|
92
|
+
type: Directive,
|
|
93
|
+
args: [{
|
|
94
|
+
selector: '[slDateTimePickerPresets]',
|
|
95
|
+
standalone: true,
|
|
96
|
+
exportAs: 'slDateTimePickerPresets',
|
|
97
|
+
host: { 'data-part': 'presets' },
|
|
98
|
+
}]
|
|
99
|
+
}] });
|
|
100
|
+
/** The consumer's own actions, under both surfaces. */
|
|
101
|
+
class SlDateTimePickerFooter {
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDateTimePickerFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
103
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlDateTimePickerFooter, isStandalone: true, selector: "[slDateTimePickerFooter]", host: { attributes: { "data-part": "footer" } }, exportAs: ["slDateTimePickerFooter"], ngImport: i0 });
|
|
104
|
+
}
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDateTimePickerFooter, decorators: [{
|
|
106
|
+
type: Directive,
|
|
107
|
+
args: [{
|
|
108
|
+
selector: '[slDateTimePickerFooter]',
|
|
109
|
+
standalone: true,
|
|
110
|
+
exportAs: 'slDateTimePickerFooter',
|
|
111
|
+
host: { 'data-part': 'footer' },
|
|
112
|
+
}]
|
|
113
|
+
}] });
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Below this width, on a finger, the surface is a sheet rather than a popover.
|
|
117
|
+
* §2.7 of `docs/component-features.md` asks for it by name.
|
|
118
|
+
*/
|
|
119
|
+
const SHEET_QUERY = '(max-width: 480px) and (pointer: coarse)';
|
|
120
|
+
/** The surface needs an identifier the trigger can point `aria-controls` at. */
|
|
121
|
+
let sequence = 0;
|
|
122
|
+
/**
|
|
123
|
+
* A datetime field, a trigger, and the only panel in the library that holds two
|
|
124
|
+
* surfaces.
|
|
125
|
+
*
|
|
126
|
+
* **Both surfaces are in the DOM at every width.** A `tablist` that exists on a
|
|
127
|
+
* narrow container and not on a wide one tells assistive technology two
|
|
128
|
+
* different stories about the same component, which is the arrangement Kendo
|
|
129
|
+
* and MUI ship and this family declines. `openTo` decides where focus lands,
|
|
130
|
+
* not what is drawn.
|
|
131
|
+
*
|
|
132
|
+
* **The decision this family owes, in one sentence:** the press that leaves the
|
|
133
|
+
* value incomplete carries focus to the half that is missing, and the press
|
|
134
|
+
* that completes the value closes the panel.
|
|
135
|
+
*
|
|
136
|
+
* **The list answers the day the reader is on**, not a day already committed.
|
|
137
|
+
*
|
|
138
|
+
* **Two pairs of bounds apply at once**, which MUI's own validation page
|
|
139
|
+
* records that it cannot combine.
|
|
140
|
+
*/
|
|
141
|
+
class SlDateTimePicker {
|
|
142
|
+
value = input(undefined, /* @ts-ignore */
|
|
143
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
144
|
+
defaultValue = input(undefined, /* @ts-ignore */
|
|
145
|
+
...(ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
146
|
+
/** Present means the consumer owns whether the surface is showing. */
|
|
147
|
+
open = input(undefined, { ...(ngDevMode ? { debugName: "open" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
|
|
148
|
+
defaultOpen = input(false, { ...(ngDevMode ? { debugName: "defaultOpen" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
149
|
+
/** Where the reader is in the panel. Present means the consumer owns it. */
|
|
150
|
+
highlighted = input(undefined, /* @ts-ignore */
|
|
151
|
+
...(ngDevMode ? [{ debugName: "highlighted" }] : /* istanbul ignore next */ []));
|
|
152
|
+
defaultHighlighted = input(undefined, /* @ts-ignore */
|
|
153
|
+
...(ngDevMode ? [{ debugName: "defaultHighlighted" }] : /* istanbul ignore next */ []));
|
|
154
|
+
min = input(undefined, /* @ts-ignore */
|
|
155
|
+
...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
156
|
+
max = input(undefined, /* @ts-ignore */
|
|
157
|
+
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
158
|
+
/** The earliest time of every day inside the range, beside `min`. */
|
|
159
|
+
minTime = input(undefined, /* @ts-ignore */
|
|
160
|
+
...(ngDevMode ? [{ debugName: "minTime" }] : /* istanbul ignore next */ []));
|
|
161
|
+
/** The latest time of every day inside the range, beside `max`. */
|
|
162
|
+
maxTime = input(undefined, /* @ts-ignore */
|
|
163
|
+
...(ngDevMode ? [{ debugName: "maxTime" }] : /* istanbul ignore next */ []));
|
|
164
|
+
isDateUnavailable = input(undefined, /* @ts-ignore */
|
|
165
|
+
...(ngDevMode ? [{ debugName: "isDateUnavailable" }] : /* istanbul ignore next */ []));
|
|
166
|
+
isTimeUnavailable = input(undefined, /* @ts-ignore */
|
|
167
|
+
...(ngDevMode ? [{ debugName: "isTimeUnavailable" }] : /* istanbul ignore next */ []));
|
|
168
|
+
/** Seconds between two offered times. Ignored when `options` states the list. */
|
|
169
|
+
step = input(undefined, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: (value) => value === undefined || value === null ? undefined : numberAttribute(value) });
|
|
170
|
+
/**
|
|
171
|
+
* The times to offer, stated rather than stepped. A step describes a regular
|
|
172
|
+
* list and a great many real ones are not.
|
|
173
|
+
*/
|
|
174
|
+
options = input(undefined, /* @ts-ignore */
|
|
175
|
+
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
176
|
+
maxOptions = input(undefined, { ...(ngDevMode ? { debugName: "maxOptions" } : /* istanbul ignore next */ {}), transform: (value) => value === undefined || value === null ? undefined : numberAttribute(value) });
|
|
177
|
+
unavailableOptions = input(undefined, /* @ts-ignore */
|
|
178
|
+
...(ngDevMode ? [{ debugName: "unavailableOptions" }] : /* istanbul ignore next */ []));
|
|
179
|
+
/** BCP 47. Writes the field, the grid, the list and the trigger's moment. Unset, the language in force decides. */
|
|
180
|
+
locale = input(undefined, /* @ts-ignore */
|
|
181
|
+
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
182
|
+
timeZone = input(undefined, /* @ts-ignore */
|
|
183
|
+
...(ngDevMode ? [{ debugName: "timeZone" }] : /* istanbul ignore next */ []));
|
|
184
|
+
hourCycle = input(undefined, /* @ts-ignore */
|
|
185
|
+
...(ngDevMode ? [{ debugName: "hourCycle" }] : /* istanbul ignore next */ []));
|
|
186
|
+
granularity = input(undefined, /* @ts-ignore */
|
|
187
|
+
...(ngDevMode ? [{ debugName: "granularity" }] : /* istanbul ignore next */ []));
|
|
188
|
+
calendar = input(undefined, /* @ts-ignore */
|
|
189
|
+
...(ngDevMode ? [{ debugName: "calendar" }] : /* istanbul ignore next */ []));
|
|
190
|
+
firstDayOfWeek = input(undefined, /* @ts-ignore */
|
|
191
|
+
...(ngDevMode ? [{ debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []));
|
|
192
|
+
months = input(undefined, /* @ts-ignore */
|
|
193
|
+
...(ngDevMode ? [{ debugName: "months" }] : /* istanbul ignore next */ []));
|
|
194
|
+
weekNumbers = input(undefined, /* @ts-ignore */
|
|
195
|
+
...(ngDevMode ? [{ debugName: "weekNumbers" }] : /* istanbul ignore next */ []));
|
|
196
|
+
referenceDateTime = input(undefined, /* @ts-ignore */
|
|
197
|
+
...(ngDevMode ? [{ debugName: "referenceDateTime" }] : /* istanbul ignore next */ []));
|
|
198
|
+
size = input(undefined, /* @ts-ignore */
|
|
199
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
200
|
+
variant = input(undefined, /* @ts-ignore */
|
|
201
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
202
|
+
placement = input(undefined, /* @ts-ignore */
|
|
203
|
+
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
204
|
+
openTo = input(undefined, /* @ts-ignore */
|
|
205
|
+
...(ngDevMode ? [{ debugName: "openTo" }] : /* istanbul ignore next */ []));
|
|
206
|
+
closeOnSelect = input(undefined, /* @ts-ignore */
|
|
207
|
+
...(ngDevMode ? [{ debugName: "closeOnSelect" }] : /* istanbul ignore next */ []));
|
|
208
|
+
disabled = input(undefined, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
|
|
209
|
+
readOnly = input(undefined, { ...(ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
|
|
210
|
+
invalid = input(undefined, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
|
|
211
|
+
required = input(undefined, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
|
|
212
|
+
clearable = input(false, { ...(ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
213
|
+
relative = input(undefined, { ...(ngDevMode ? { debugName: "relative" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
|
|
214
|
+
name = input(undefined, /* @ts-ignore */
|
|
215
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
216
|
+
/**
|
|
217
|
+
* Words laid over the catalog of the language in force, key by key: the
|
|
218
|
+
* trigger's two names, the `now` button, what an empty day says and what a
|
|
219
|
+
* cut list says.
|
|
220
|
+
*/
|
|
221
|
+
messages = input(undefined, /* @ts-ignore */
|
|
222
|
+
...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
|
|
223
|
+
valueChange = output();
|
|
224
|
+
openChange = output();
|
|
225
|
+
highlightedChange = output();
|
|
226
|
+
optionTemplate;
|
|
227
|
+
layer;
|
|
228
|
+
triggerRef;
|
|
229
|
+
listRef;
|
|
230
|
+
datePanelRef;
|
|
231
|
+
field;
|
|
232
|
+
calendarRef;
|
|
233
|
+
element = inject(ElementRef).nativeElement;
|
|
234
|
+
defaults = injectDateTimePickerDefaults();
|
|
235
|
+
appLocale = injectLocale();
|
|
236
|
+
/** The family's words in the language in force, with this picker's `messages` laid over them. */
|
|
237
|
+
t = injectMessages(datetimePickerMessages, this.messages);
|
|
238
|
+
injector = inject(Injector);
|
|
239
|
+
destroyRef = inject(DestroyRef);
|
|
240
|
+
enclosing = inject(SlField, { optional: true });
|
|
241
|
+
contentId = `sl-datetime-picker-${String((sequence += 1))}`;
|
|
242
|
+
ownOpen = signal(false, /* @ts-ignore */
|
|
243
|
+
...(ngDevMode ? [{ debugName: "ownOpen" }] : /* istanbul ignore next */ []));
|
|
244
|
+
ownValue = signal(null, /* @ts-ignore */
|
|
245
|
+
...(ngDevMode ? [{ debugName: "ownValue" }] : /* istanbul ignore next */ []));
|
|
246
|
+
/**
|
|
247
|
+
* The half pressed in the panel while the other half is missing. The value
|
|
248
|
+
* stays `null` until the second press writes both, so the half lives here and
|
|
249
|
+
* is forgotten when the panel closes.
|
|
250
|
+
*/
|
|
251
|
+
pendingDate = signal(null, /* @ts-ignore */
|
|
252
|
+
...(ngDevMode ? [{ debugName: "pendingDate" }] : /* istanbul ignore next */ []));
|
|
253
|
+
pendingTime = signal(null, /* @ts-ignore */
|
|
254
|
+
...(ngDevMode ? [{ debugName: "pendingTime" }] : /* istanbul ignore next */ []));
|
|
255
|
+
ownHighlight = signal({
|
|
256
|
+
date: { year: 2000, month: 1, day: 1 },
|
|
257
|
+
time: null,
|
|
258
|
+
}, /* @ts-ignore */
|
|
259
|
+
...(ngDevMode ? [{ debugName: "ownHighlight" }] : /* istanbul ignore next */ []));
|
|
260
|
+
clock = signal({
|
|
261
|
+
date: { year: 2000, month: 1, day: 1 },
|
|
262
|
+
time: { hour: 12, minute: 0, second: 0 },
|
|
263
|
+
}, /* @ts-ignore */
|
|
264
|
+
...(ngDevMode ? [{ debugName: "clock" }] : /* istanbul ignore next */ []));
|
|
265
|
+
view = signal('day', /* @ts-ignore */
|
|
266
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
267
|
+
positioned = signal(false, /* @ts-ignore */
|
|
268
|
+
...(ngDevMode ? [{ debugName: "positioned" }] : /* istanbul ignore next */ []));
|
|
269
|
+
sheet = signal(false, /* @ts-ignore */
|
|
270
|
+
...(ngDevMode ? [{ debugName: "sheet" }] : /* istanbul ignore next */ []));
|
|
271
|
+
formDisabled = signal(undefined, /* @ts-ignore */
|
|
272
|
+
...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
|
|
273
|
+
onChangeFn = () => undefined;
|
|
274
|
+
/** Whether a form model holds the value, and answers a reset through `writeValue`. */
|
|
275
|
+
formBound = false;
|
|
276
|
+
onTouchedFn = () => undefined;
|
|
277
|
+
onValidatorChangeFn = () => undefined;
|
|
278
|
+
/**
|
|
279
|
+
* Whether the next opening moves focus into the panel. Set by a request to
|
|
280
|
+
* open from the trigger or from `openSurface()`, and never by Alt+ArrowDown,
|
|
281
|
+
* which leaves focus in the field, or by a first render that starts open,
|
|
282
|
+
* which would take focus from wherever the page put it.
|
|
283
|
+
*/
|
|
284
|
+
focusOnOpen = false;
|
|
285
|
+
/**
|
|
286
|
+
* Whether the reader has moved the highlight themselves. Until they have, the
|
|
287
|
+
* day the panel is on follows the value and then the reference.
|
|
288
|
+
*/
|
|
289
|
+
movedByReader = false;
|
|
290
|
+
positioner = null;
|
|
291
|
+
dismissable = null;
|
|
292
|
+
typeahead = null;
|
|
293
|
+
isOpen = computed(() => this.open() ?? this.ownOpen(), /* @ts-ignore */
|
|
294
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
295
|
+
held = computed(() => this.value() ?? this.ownValue(), /* @ts-ignore */
|
|
296
|
+
...(ngDevMode ? [{ debugName: "held" }] : /* istanbul ignore next */ []));
|
|
297
|
+
highlight = computed(() => this.highlighted() ?? this.ownHighlight(), /* @ts-ignore */
|
|
298
|
+
...(ngDevMode ? [{ debugName: "highlight" }] : /* istanbul ignore next */ []));
|
|
299
|
+
resolvedLocale = computed(() => this.locale() ?? this.appLocale(), /* @ts-ignore */
|
|
300
|
+
...(ngDevMode ? [{ debugName: "resolvedLocale" }] : /* istanbul ignore next */ []));
|
|
301
|
+
resolvedTimeZone = computed(() => this.timeZone() ?? this.defaults.timeZone, /* @ts-ignore */
|
|
302
|
+
...(ngDevMode ? [{ debugName: "resolvedTimeZone" }] : /* istanbul ignore next */ []));
|
|
303
|
+
resolvedHourCycle = computed(() => this.hourCycle() ?? this.defaults.hourCycle, /* @ts-ignore */
|
|
304
|
+
...(ngDevMode ? [{ debugName: "resolvedHourCycle" }] : /* istanbul ignore next */ []));
|
|
305
|
+
resolvedGranularity = computed(() => this.granularity() ?? this.defaults.granularity, /* @ts-ignore */
|
|
306
|
+
...(ngDevMode ? [{ debugName: "resolvedGranularity" }] : /* istanbul ignore next */ []));
|
|
307
|
+
resolvedCalendar = computed(() => this.calendar() ?? this.defaults.calendar, /* @ts-ignore */
|
|
308
|
+
...(ngDevMode ? [{ debugName: "resolvedCalendar" }] : /* istanbul ignore next */ []));
|
|
309
|
+
resolvedSize = computed(() => this.size() ?? this.enclosing?.resolvedSize() ?? this.defaults.size, /* @ts-ignore */
|
|
310
|
+
...(ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []));
|
|
311
|
+
resolvedVariant = computed(() => this.variant() ?? this.defaults.variant, /* @ts-ignore */
|
|
312
|
+
...(ngDevMode ? [{ debugName: "resolvedVariant" }] : /* istanbul ignore next */ []));
|
|
313
|
+
resolvedPlacement = computed(() => this.placement() ?? this.defaults.placement, /* @ts-ignore */
|
|
314
|
+
...(ngDevMode ? [{ debugName: "resolvedPlacement" }] : /* istanbul ignore next */ []));
|
|
315
|
+
resolvedOpenTo = computed(() => this.openTo() ?? this.defaults.openTo, /* @ts-ignore */
|
|
316
|
+
...(ngDevMode ? [{ debugName: "resolvedOpenTo" }] : /* istanbul ignore next */ []));
|
|
317
|
+
resolvedDisabled = computed(() => this.disabled() ?? this.formDisabled() ?? this.enclosing?.resolvedDisabled(), /* @ts-ignore */
|
|
318
|
+
...(ngDevMode ? [{ debugName: "resolvedDisabled" }] : /* istanbul ignore next */ []));
|
|
319
|
+
resolvedReadOnly = computed(() => this.readOnly() ?? this.enclosing?.resolvedReadOnly(), /* @ts-ignore */
|
|
320
|
+
...(ngDevMode ? [{ debugName: "resolvedReadOnly" }] : /* istanbul ignore next */ []));
|
|
321
|
+
resolvedRequired = computed(() => this.required() ?? this.enclosing?.required(), /* @ts-ignore */
|
|
322
|
+
...(ngDevMode ? [{ debugName: "resolvedRequired" }] : /* istanbul ignore next */ []));
|
|
323
|
+
editable = computed(() => this.resolvedDisabled() !== true && this.resolvedReadOnly() !== true, /* @ts-ignore */
|
|
324
|
+
...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
|
|
325
|
+
format = computed(() => {
|
|
326
|
+
const firstDayOfWeek = this.firstDayOfWeek();
|
|
327
|
+
return createDateTimeFormat({
|
|
328
|
+
granularity: this.resolvedGranularity(),
|
|
329
|
+
hourCycle: this.resolvedHourCycle(),
|
|
330
|
+
locale: this.resolvedLocale(),
|
|
331
|
+
...(firstDayOfWeek === undefined ? {} : { firstDayOfWeek }),
|
|
332
|
+
});
|
|
333
|
+
}, /* @ts-ignore */
|
|
334
|
+
...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
|
|
335
|
+
anchor = computed(() => this.referenceDateTime() ?? this.clock(), /* @ts-ignore */
|
|
336
|
+
...(ngDevMode ? [{ debugName: "anchor" }] : /* istanbul ignore next */ []));
|
|
337
|
+
bounds = computed(() => ({
|
|
338
|
+
max: this.max(),
|
|
339
|
+
maxTime: this.maxTime(),
|
|
340
|
+
min: this.min(),
|
|
341
|
+
minTime: this.minTime(),
|
|
342
|
+
}), /* @ts-ignore */
|
|
343
|
+
...(ngDevMode ? [{ debugName: "bounds" }] : /* istanbul ignore next */ []));
|
|
344
|
+
dateMin = computed(() => dateBoundsOf(this.bounds()).min, /* @ts-ignore */
|
|
345
|
+
...(ngDevMode ? [{ debugName: "dateMin" }] : /* istanbul ignore next */ []));
|
|
346
|
+
dateMax = computed(() => dateBoundsOf(this.bounds()).max, /* @ts-ignore */
|
|
347
|
+
...(ngDevMode ? [{ debugName: "dateMax" }] : /* istanbul ignore next */ []));
|
|
348
|
+
dateValue = computed(() => this.held()?.date ?? this.pendingDate(), /* @ts-ignore */
|
|
349
|
+
...(ngDevMode ? [{ debugName: "dateValue" }] : /* istanbul ignore next */ []));
|
|
350
|
+
/**
|
|
351
|
+
* Validity the family owns, beside the validity the consumer states: both
|
|
352
|
+
* pairs of bounds, and both predicates.
|
|
353
|
+
*/
|
|
354
|
+
resolvedInvalid = computed(() => {
|
|
355
|
+
const value = this.held();
|
|
356
|
+
if (value !== null) {
|
|
357
|
+
if (!isDateTimeInRange(value, this.min(), this.max()))
|
|
358
|
+
return true;
|
|
359
|
+
const window = dayWindow(value.date, this.bounds());
|
|
360
|
+
if (window === null || !isTimeInRange(value.time, window.earliest, window.latest)) {
|
|
361
|
+
return true;
|
|
362
|
+
}
|
|
363
|
+
if (this.isDateUnavailable()?.(value.date) === true)
|
|
364
|
+
return true;
|
|
365
|
+
if (this.isTimeUnavailable()?.(value.time, value.date) === true)
|
|
366
|
+
return true;
|
|
367
|
+
}
|
|
368
|
+
return this.invalid() ?? this.enclosing?.invalid();
|
|
369
|
+
}, /* @ts-ignore */
|
|
370
|
+
...(ngDevMode ? [{ debugName: "resolvedInvalid" }] : /* istanbul ignore next */ []));
|
|
371
|
+
/**
|
|
372
|
+
* The day the list answers: the date half of the value when there is one, and
|
|
373
|
+
* the day the calendar has focused when there is not — so a reader moving
|
|
374
|
+
* through the month sees the times of the day under their cursor.
|
|
375
|
+
*/
|
|
376
|
+
listDate = computed(() => this.held()?.date ?? this.pendingDate() ?? this.highlight().date, /* @ts-ignore */
|
|
377
|
+
...(ngDevMode ? [{ debugName: "listDate" }] : /* istanbul ignore next */ []));
|
|
378
|
+
window = computed(() => dayWindow(this.listDate(), this.bounds()), /* @ts-ignore */
|
|
379
|
+
...(ngDevMode ? [{ debugName: "window" }] : /* istanbul ignore next */ []));
|
|
380
|
+
listOptions = computed(() => {
|
|
381
|
+
const predicate = this.isTimeUnavailable();
|
|
382
|
+
const date = this.listDate();
|
|
383
|
+
const window = this.window();
|
|
384
|
+
return {
|
|
385
|
+
isTimeUnavailable: predicate === undefined ? undefined : (time) => predicate(time, date),
|
|
386
|
+
max: window?.latest,
|
|
387
|
+
maxOptions: this.maxOptions() ?? this.defaults.maxOptions,
|
|
388
|
+
min: window?.earliest,
|
|
389
|
+
options: this.options(),
|
|
390
|
+
step: this.step() ?? this.defaults.step,
|
|
391
|
+
};
|
|
392
|
+
}, /* @ts-ignore */
|
|
393
|
+
...(ngDevMode ? [{ debugName: "listOptions" }] : /* istanbul ignore next */ []));
|
|
394
|
+
list = computed(() => {
|
|
395
|
+
if (this.window() === null)
|
|
396
|
+
return [];
|
|
397
|
+
if (this.isDateUnavailable()?.(this.listDate()) === true)
|
|
398
|
+
return [];
|
|
399
|
+
const built = timeList(this.listOptions());
|
|
400
|
+
const hidden = (this.unavailableOptions() ?? this.defaults.unavailableOptions) === 'hide';
|
|
401
|
+
return hidden ? built.filter((option) => !option.unavailable) : built;
|
|
402
|
+
}, /* @ts-ignore */
|
|
403
|
+
...(ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []));
|
|
404
|
+
truncated = computed(() => isTruncated(this.listOptions()), /* @ts-ignore */
|
|
405
|
+
...(ngDevMode ? [{ debugName: "truncated" }] : /* istanbul ignore next */ []));
|
|
406
|
+
labels = computed(() => this.list().map((option) => this.format().time.format(option.time)), /* @ts-ignore */
|
|
407
|
+
...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
408
|
+
highlightIndex = computed(() => {
|
|
409
|
+
const at = this.highlight().time;
|
|
410
|
+
if (at === null)
|
|
411
|
+
return -1;
|
|
412
|
+
return this.list().findIndex((option) => isSameTime(option.time, at));
|
|
413
|
+
}, /* @ts-ignore */
|
|
414
|
+
...(ngDevMode ? [{ debugName: "highlightIndex" }] : /* istanbul ignore next */ []));
|
|
415
|
+
/** The list's own accessible name: the day its times belong to. */
|
|
416
|
+
listLabel = computed(() => this.format().describeDate(this.listDate(), 'short'), /* @ts-ignore */
|
|
417
|
+
...(ngDevMode ? [{ debugName: "listLabel" }] : /* istanbul ignore next */ []));
|
|
418
|
+
/* ── What the head says ──────────────────────────────────────────────── */
|
|
419
|
+
headValue = computed(() => {
|
|
420
|
+
const value = this.held();
|
|
421
|
+
return value === null ? '' : this.format().describe(value);
|
|
422
|
+
}, /* @ts-ignore */
|
|
423
|
+
...(ngDevMode ? [{ debugName: "headValue" }] : /* istanbul ignore next */ []));
|
|
424
|
+
headDate = computed(() => this.format().describeDate(this.pendingDate() ?? this.highlight().date), /* @ts-ignore */
|
|
425
|
+
...(ngDevMode ? [{ debugName: "headDate" }] : /* istanbul ignore next */ []));
|
|
426
|
+
headTime = computed(() => {
|
|
427
|
+
const time = this.pendingTime();
|
|
428
|
+
return time === null ? null : this.format().time.format(time);
|
|
429
|
+
}, /* @ts-ignore */
|
|
430
|
+
...(ngDevMode ? [{ debugName: "headTime" }] : /* istanbul ignore next */ []));
|
|
431
|
+
headPlaceholder = computed(() => {
|
|
432
|
+
const granularity = this.resolvedGranularity();
|
|
433
|
+
if (granularity === 'hour')
|
|
434
|
+
return '--';
|
|
435
|
+
return granularity === 'second' ? '--:--:--' : '--:--';
|
|
436
|
+
}, /* @ts-ignore */
|
|
437
|
+
...(ngDevMode ? [{ debugName: "headPlaceholder" }] : /* istanbul ignore next */ []));
|
|
438
|
+
/**
|
|
439
|
+
* The trigger's accessible name. Focus returns here when the panel closes, so
|
|
440
|
+
* this is where the reader is told what was chosen.
|
|
441
|
+
*/
|
|
442
|
+
triggerLabel = computed(() => {
|
|
443
|
+
const chosen = this.held();
|
|
444
|
+
if (chosen === null)
|
|
445
|
+
return this.t('choose');
|
|
446
|
+
return this.t('change', { date: this.format().describe(chosen) });
|
|
447
|
+
}, /* @ts-ignore */
|
|
448
|
+
...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
|
|
449
|
+
constructor() {
|
|
450
|
+
/* The layer is created and torn down with the surface, not with the
|
|
451
|
+
component: a layer that outlived its content would hold a place in the
|
|
452
|
+
single stack that nothing occupies. */
|
|
453
|
+
effect(() => {
|
|
454
|
+
if (!this.isOpen()) {
|
|
455
|
+
this.release();
|
|
456
|
+
/* A half pressed and never completed does not outlive the panel. */
|
|
457
|
+
untracked(() => {
|
|
458
|
+
this.pendingDate.set(null);
|
|
459
|
+
this.pendingTime.set(null);
|
|
460
|
+
});
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
afterNextRender(() => this.attach(), { injector: this.injector });
|
|
464
|
+
});
|
|
465
|
+
/* The day the panel is on, before the reader has said otherwise. */
|
|
466
|
+
effect(() => {
|
|
467
|
+
const date = this.held()?.date ?? this.anchor().date;
|
|
468
|
+
untracked(() => {
|
|
469
|
+
if (this.movedByReader || this.highlighted() !== undefined)
|
|
470
|
+
return;
|
|
471
|
+
if (isSameDate(date, this.highlight().date))
|
|
472
|
+
return;
|
|
473
|
+
this.setHighlight({ date, time: this.highlight().time }, 'programmatic', undefined);
|
|
474
|
+
});
|
|
475
|
+
});
|
|
476
|
+
/**
|
|
477
|
+
* The highlight's **time** lands where the list opens. The date half is the
|
|
478
|
+
* effect above's: one of the two has to own it, or the two write over each
|
|
479
|
+
* other in the same change detection and the panel opens on whichever ran
|
|
480
|
+
* last.
|
|
481
|
+
*/
|
|
482
|
+
effect(() => {
|
|
483
|
+
if (!this.isOpen())
|
|
484
|
+
return;
|
|
485
|
+
const list = this.list();
|
|
486
|
+
untracked(() => {
|
|
487
|
+
const index = this.openingIndex();
|
|
488
|
+
const option = list[index];
|
|
489
|
+
if (index < 0 || option === undefined)
|
|
490
|
+
return;
|
|
491
|
+
if (isSameTime(option.time, this.highlight().time))
|
|
492
|
+
return;
|
|
493
|
+
this.setHighlight({ date: this.highlight().date, time: option.time }, 'programmatic', undefined);
|
|
494
|
+
});
|
|
495
|
+
});
|
|
496
|
+
/**
|
|
497
|
+
* The row the highlight is on is brought into view: a panel that opens on a
|
|
498
|
+
* chosen time opens *at* it rather than at midnight, and a highlight moved
|
|
499
|
+
* by a key lands whole rather than half under the edge.
|
|
500
|
+
*
|
|
501
|
+
* The reveal runs after the next render and again whenever the list is
|
|
502
|
+
* resized. The list's height is the panel's, the panel's is the layer's,
|
|
503
|
+
* and the layer has not been measured on the frame it mounts, so the first
|
|
504
|
+
* call is made against a box with nothing to scroll and moves nothing — a
|
|
505
|
+
* panel opened on 15:30 showed 00:00 to 03:30 and asked the reader to
|
|
506
|
+
* scroll six hours to their own time. A reader's own scrolling resizes
|
|
507
|
+
* nothing, so this never fights them.
|
|
508
|
+
*/
|
|
509
|
+
effect(() => {
|
|
510
|
+
const open = this.isOpen();
|
|
511
|
+
const index = this.highlightIndex();
|
|
512
|
+
if (!open || index < 0) {
|
|
513
|
+
this.listResize?.disconnect();
|
|
514
|
+
this.listResize = null;
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
untracked(() => this.revealHighlight());
|
|
518
|
+
});
|
|
519
|
+
/* A bound that changed is a validity that changed, and the form is told. */
|
|
520
|
+
effect(() => {
|
|
521
|
+
this.min();
|
|
522
|
+
this.max();
|
|
523
|
+
this.minTime();
|
|
524
|
+
this.maxTime();
|
|
525
|
+
this.isDateUnavailable();
|
|
526
|
+
this.isTimeUnavailable();
|
|
527
|
+
this.onValidatorChangeFn();
|
|
528
|
+
});
|
|
529
|
+
this.destroyRef.onDestroy(() => this.release());
|
|
530
|
+
this.destroyRef.onDestroy(() => this.listResize?.disconnect());
|
|
531
|
+
}
|
|
532
|
+
/* ── Forms ───────────────────────────────────────────────────────────── */
|
|
533
|
+
writeValue(value) {
|
|
534
|
+
this.ownValue.set(value ?? null);
|
|
535
|
+
}
|
|
536
|
+
registerOnChange(fn) {
|
|
537
|
+
this.onChangeFn = fn;
|
|
538
|
+
this.formBound = true;
|
|
539
|
+
}
|
|
540
|
+
registerOnTouched(fn) {
|
|
541
|
+
this.onTouchedFn = fn;
|
|
542
|
+
}
|
|
543
|
+
setDisabledState(isDisabled) {
|
|
544
|
+
this.formDisabled.set(isDisabled);
|
|
545
|
+
}
|
|
546
|
+
registerOnValidatorChange(fn) {
|
|
547
|
+
this.onValidatorChangeFn = fn;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* The rules no other validator can see, under the names `datetime-field`
|
|
551
|
+
* reports them with, because the field holds the bounds, the predicates and
|
|
552
|
+
* the half the reader has not written. `required` is left to Angular's own.
|
|
553
|
+
*/
|
|
554
|
+
validate(control) {
|
|
555
|
+
return this.field?.validate(control) ?? null;
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* A day typed without a time leaves the value `null`, so the picker's own
|
|
559
|
+
* value never moves; the field's validity does. The field says so on every
|
|
560
|
+
* edit, and the form is told.
|
|
561
|
+
*/
|
|
562
|
+
ngAfterViewInit() {
|
|
563
|
+
this.field?.registerOnValidatorChange(() => this.onValidatorChangeFn());
|
|
564
|
+
}
|
|
565
|
+
ngOnInit() {
|
|
566
|
+
this.ownOpen.set(this.defaultOpen());
|
|
567
|
+
this.ownValue.set(this.defaultValue() ?? null);
|
|
568
|
+
const start = this.defaultHighlighted() ??
|
|
569
|
+
{
|
|
570
|
+
date: (this.defaultValue() ?? this.referenceDateTime() ?? this.clock()).date,
|
|
571
|
+
time: null,
|
|
572
|
+
};
|
|
573
|
+
this.ownHighlight.set(start);
|
|
574
|
+
this.clock.set(nowDateTimeIn(this.resolvedTimeZone()));
|
|
575
|
+
this.typeahead = createTypeahead({ locale: () => this.resolvedLocale() });
|
|
576
|
+
this.destroyRef.onDestroy(() => this.typeahead?.destroy());
|
|
577
|
+
/* A native reset restores the hidden input and tells nothing, so the
|
|
578
|
+
picker would keep the last moment chosen in a form that had been reset.
|
|
579
|
+
The value returns to `defaultValue` through `valueChange`, reason
|
|
580
|
+
`programmatic`, and a half pressed in the panel without the other is
|
|
581
|
+
dropped with it. A picker bound to a form model takes the model's reset
|
|
582
|
+
value through `writeValue` instead. */
|
|
583
|
+
const form = this.element.closest('form');
|
|
584
|
+
if (form !== null) {
|
|
585
|
+
const onReset = (event) => {
|
|
586
|
+
if (this.formBound)
|
|
587
|
+
return;
|
|
588
|
+
this.pendingDate.set(null);
|
|
589
|
+
this.pendingTime.set(null);
|
|
590
|
+
this.commit(this.defaultValue() ?? null, 'programmatic', event);
|
|
591
|
+
};
|
|
592
|
+
form.addEventListener('reset', onReset);
|
|
593
|
+
this.destroyRef.onDestroy(() => form.removeEventListener('reset', onReset));
|
|
594
|
+
}
|
|
595
|
+
/* `matchMedia` is absent in a server render and in some test environments,
|
|
596
|
+
and the popover is the right answer wherever it cannot be asked. */
|
|
597
|
+
if (typeof window === 'undefined' || typeof window.matchMedia !== 'function')
|
|
598
|
+
return;
|
|
599
|
+
const query = window.matchMedia(SHEET_QUERY);
|
|
600
|
+
const read = () => this.sheet.set(query.matches);
|
|
601
|
+
read();
|
|
602
|
+
query.addEventListener('change', read);
|
|
603
|
+
this.destroyRef.onDestroy(() => query.removeEventListener('change', read));
|
|
604
|
+
}
|
|
605
|
+
/** Puts focus on the first segment of the field. */
|
|
606
|
+
focus() {
|
|
607
|
+
this.field?.focus();
|
|
608
|
+
}
|
|
609
|
+
openSurface(source) {
|
|
610
|
+
this.setOpen(true, 'keyboard', source);
|
|
611
|
+
}
|
|
612
|
+
closeSurface(source) {
|
|
613
|
+
this.setOpen(false, 'keyboard', source);
|
|
614
|
+
}
|
|
615
|
+
/* ── What the template reads ─────────────────────────────────────────── */
|
|
616
|
+
labelFor(option) {
|
|
617
|
+
return this.format().time.format(option.time);
|
|
618
|
+
}
|
|
619
|
+
isSelected(option) {
|
|
620
|
+
const value = this.held();
|
|
621
|
+
if (value === null)
|
|
622
|
+
return isSameTime(option.time, this.pendingTime());
|
|
623
|
+
return isSameDate(value.date, this.listDate()) && isSameTime(option.time, value.time);
|
|
624
|
+
}
|
|
625
|
+
contextFor(option, index) {
|
|
626
|
+
return {
|
|
627
|
+
$implicit: option.time,
|
|
628
|
+
current: index === this.highlightIndex(),
|
|
629
|
+
date: this.listDate(),
|
|
630
|
+
label: this.labels()[index] ?? '',
|
|
631
|
+
selected: this.isSelected(option),
|
|
632
|
+
unavailable: option.unavailable,
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
/* ── Focus follows the missing half ──────────────────────────────────── */
|
|
636
|
+
toggle(source) {
|
|
637
|
+
this.setOpen(!this.isOpen(), 'pointer', source);
|
|
638
|
+
}
|
|
639
|
+
/** Tab and Shift+Tab wrap inside the panel while it is open. */
|
|
640
|
+
onContentKeyDown(event) {
|
|
641
|
+
if (event.key !== 'Tab' || event.altKey || event.ctrlKey || event.metaKey)
|
|
642
|
+
return;
|
|
643
|
+
const content = event.currentTarget;
|
|
644
|
+
const items = tabbables(content);
|
|
645
|
+
const first = items[0];
|
|
646
|
+
const last = items[items.length - 1];
|
|
647
|
+
if (first === undefined || last === undefined)
|
|
648
|
+
return;
|
|
649
|
+
const current = content.ownerDocument.activeElement;
|
|
650
|
+
if (event.shiftKey && current === first) {
|
|
651
|
+
event.preventDefault();
|
|
652
|
+
last.focus();
|
|
653
|
+
}
|
|
654
|
+
else if (!event.shiftKey && current === last) {
|
|
655
|
+
event.preventDefault();
|
|
656
|
+
first.focus();
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
onControlFocusOut(event) {
|
|
660
|
+
const next = event.relatedTarget;
|
|
661
|
+
if (next instanceof Node && this.element.contains(next))
|
|
662
|
+
return;
|
|
663
|
+
this.onTouchedFn();
|
|
664
|
+
}
|
|
665
|
+
chooseNow(source) {
|
|
666
|
+
const wasWhole = this.held() !== null;
|
|
667
|
+
/* The clock, read at the press: `referenceDateTime` says where an empty
|
|
668
|
+
field starts, not what time it is. */
|
|
669
|
+
const now = nowDateTimeIn(this.resolvedTimeZone());
|
|
670
|
+
this.pendingDate.set(null);
|
|
671
|
+
this.pendingTime.set(null);
|
|
672
|
+
this.commit(now, 'select', source);
|
|
673
|
+
this.setHighlight({ date: now.date, time: now.time }, 'pointer', source);
|
|
674
|
+
this.afterPress(now, wasWhole, 'time', source);
|
|
675
|
+
}
|
|
676
|
+
onCalendarValue(request) {
|
|
677
|
+
if (!this.editable())
|
|
678
|
+
return;
|
|
679
|
+
const next = request.value;
|
|
680
|
+
/* `single` is the only mode this panel asks for, so a range or a set is a
|
|
681
|
+
shape the calendar cannot hand back here — and narrowing it is what keeps
|
|
682
|
+
`selectDate` taking one day. */
|
|
683
|
+
const candidate = Array.isArray(next) ? next[0] : next;
|
|
684
|
+
if (candidate === null || candidate === undefined)
|
|
685
|
+
return;
|
|
686
|
+
if (!('year' in candidate))
|
|
687
|
+
return;
|
|
688
|
+
this.selectDate(candidate, request.source);
|
|
689
|
+
}
|
|
690
|
+
onFocusedDate(request) {
|
|
691
|
+
this.setHighlight({ date: request.value, time: this.highlight().time }, request.reason === 'pointer' ? 'pointer' : 'keyboard', request.source);
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* A day pressed in the calendar. The time half is the one the value holds,
|
|
695
|
+
* or the one pressed in the list. With neither, the day waits for a time:
|
|
696
|
+
* focus moves to the list, onto the option nearest `referenceDateTime`, and
|
|
697
|
+
* the value does not move.
|
|
698
|
+
*/
|
|
699
|
+
selectDate(date, source) {
|
|
700
|
+
const wasWhole = this.held() !== null;
|
|
701
|
+
const time = this.held()?.time ?? this.pendingTime();
|
|
702
|
+
if (time === null) {
|
|
703
|
+
this.pendingDate.set(date);
|
|
704
|
+
this.setHighlight({ date, time: null }, 'pointer', source);
|
|
705
|
+
this.enterSurface('time');
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
const next = { date, time };
|
|
709
|
+
this.pendingDate.set(null);
|
|
710
|
+
this.pendingTime.set(null);
|
|
711
|
+
this.commit(next, 'select', source);
|
|
712
|
+
this.setHighlight({ date, time: this.highlight().time }, 'pointer', source);
|
|
713
|
+
this.afterPress(next, wasWhole, 'date', source);
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* A time pressed in the list. The date half is the one the value holds, or
|
|
717
|
+
* the day pressed in the calendar; with neither, the time waits for a day and
|
|
718
|
+
* focus moves to the calendar.
|
|
719
|
+
*/
|
|
720
|
+
selectTime(option, source) {
|
|
721
|
+
if (option.unavailable || !this.editable())
|
|
722
|
+
return;
|
|
723
|
+
const wasWhole = this.held() !== null;
|
|
724
|
+
const date = this.held()?.date ?? this.pendingDate();
|
|
725
|
+
this.setHighlight({ date: this.listDate(), time: option.time }, 'pointer', source);
|
|
726
|
+
if (date === null) {
|
|
727
|
+
this.pendingTime.set(option.time);
|
|
728
|
+
this.enterSurface('date');
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
const next = { date, time: option.time };
|
|
732
|
+
this.pendingDate.set(null);
|
|
733
|
+
this.pendingTime.set(null);
|
|
734
|
+
this.commit(next, 'select', source);
|
|
735
|
+
this.afterPress(next, wasWhole, 'time', source);
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* The rule, in one place: a press that leaves the value incomplete carries
|
|
739
|
+
* focus to the half that is missing; a press that completes it closes the
|
|
740
|
+
* panel; and a press on a value that was already whole changes one half and
|
|
741
|
+
* leaves the panel where it is.
|
|
742
|
+
*/
|
|
743
|
+
afterPress(next, wasWhole, wrote, source) {
|
|
744
|
+
const closeOnSelect = this.closeOnSelect() ?? this.defaults.closeOnSelect;
|
|
745
|
+
const nowWhole = next !== null;
|
|
746
|
+
if (nowWhole && !wasWhole && closeOnSelect !== 'never') {
|
|
747
|
+
this.close(source);
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
if (nowWhole && wasWhole && closeOnSelect === 'always') {
|
|
751
|
+
this.close(source);
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
if (!nowWhole)
|
|
755
|
+
this.enterSurface(wrote === 'date' ? 'time' : 'date');
|
|
756
|
+
}
|
|
757
|
+
close(source) {
|
|
758
|
+
this.setOpen(false, 'select', source);
|
|
759
|
+
this.triggerRef?.nativeElement.focus({ preventScroll: true });
|
|
760
|
+
}
|
|
761
|
+
enterSurface(surface) {
|
|
762
|
+
afterNextRender(() => this.enterSurfaceNow(surface), { injector: this.injector });
|
|
763
|
+
}
|
|
764
|
+
/** Focus into one surface, on a panel that is already rendered. */
|
|
765
|
+
enterSurfaceNow(surface) {
|
|
766
|
+
if (surface === 'time') {
|
|
767
|
+
this.enterList();
|
|
768
|
+
return;
|
|
769
|
+
}
|
|
770
|
+
const day = this.datePanelRef?.nativeElement.querySelector('[data-part="day"][tabindex="0"]');
|
|
771
|
+
day?.focus({ preventScroll: true });
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* Where the list opens: on the chosen time, on the nearest step to the
|
|
775
|
+
* reference when nothing is chosen, and on the first available option when
|
|
776
|
+
* that is refused.
|
|
777
|
+
*/
|
|
778
|
+
openingIndex() {
|
|
779
|
+
const list = this.list();
|
|
780
|
+
if (list.length === 0)
|
|
781
|
+
return -1;
|
|
782
|
+
const near = nearestIndex(list, this.held()?.time ?? this.anchor().time);
|
|
783
|
+
if (near >= 0 && list[near]?.unavailable !== true)
|
|
784
|
+
return near;
|
|
785
|
+
const first = list.findIndex((option) => !option.unavailable);
|
|
786
|
+
return first >= 0 ? first : 0;
|
|
787
|
+
}
|
|
788
|
+
enterList() {
|
|
789
|
+
const index = this.highlightIndex() >= 0 ? this.highlightIndex() : this.openingIndex();
|
|
790
|
+
if (index < 0)
|
|
791
|
+
return;
|
|
792
|
+
const option = this.list()[index];
|
|
793
|
+
if (option !== undefined) {
|
|
794
|
+
this.setHighlight({ date: this.listDate(), time: option.time }, 'keyboard', undefined);
|
|
795
|
+
}
|
|
796
|
+
this.focusOption(index);
|
|
797
|
+
}
|
|
798
|
+
/** Watches the list's own box, which is what "the layer has been measured" looks like from inside it. */
|
|
799
|
+
listResize = null;
|
|
800
|
+
revealHighlight() {
|
|
801
|
+
afterNextRender(() => {
|
|
802
|
+
const list = this.listRef?.nativeElement;
|
|
803
|
+
if (list === undefined)
|
|
804
|
+
return;
|
|
805
|
+
const reveal = () => {
|
|
806
|
+
const row = list.querySelector('[data-part="option"][data-current]');
|
|
807
|
+
/* jsdom implements neither `scrollIntoView` nor `ResizeObserver`, and
|
|
808
|
+
a test environment without a scroller is not a reason for the
|
|
809
|
+
family to throw where a browser would scroll. */
|
|
810
|
+
row?.scrollIntoView?.({ block: 'nearest' });
|
|
811
|
+
};
|
|
812
|
+
reveal();
|
|
813
|
+
if (typeof ResizeObserver !== 'function')
|
|
814
|
+
return;
|
|
815
|
+
this.listResize?.disconnect();
|
|
816
|
+
this.listResize = new ResizeObserver(reveal);
|
|
817
|
+
this.listResize.observe(list);
|
|
818
|
+
}, { injector: this.injector });
|
|
819
|
+
}
|
|
820
|
+
focusOption(index) {
|
|
821
|
+
const rows = this.listRef?.nativeElement.querySelectorAll('[data-part="option"]');
|
|
822
|
+
const row = rows?.[index];
|
|
823
|
+
row?.focus();
|
|
824
|
+
/* jsdom does not implement `scrollIntoView`, and a test environment without
|
|
825
|
+
a scroller is not a reason for the family to throw. */
|
|
826
|
+
row?.scrollIntoView?.({ block: 'nearest' });
|
|
827
|
+
}
|
|
828
|
+
/* ── The keyboard ────────────────────────────────────────────────────── */
|
|
829
|
+
onControlKeyDown(event) {
|
|
830
|
+
if (!this.editable())
|
|
831
|
+
return;
|
|
832
|
+
/* ChromeOS turns the chord into `PageDown` before the browser sees it,
|
|
833
|
+
which Angular Material records for its own input — so the trigger button
|
|
834
|
+
is always drawn and this is only a shortcut. Focus stays in the field. */
|
|
835
|
+
if (event.altKey && event.key === 'ArrowDown') {
|
|
836
|
+
event.preventDefault();
|
|
837
|
+
this.setOpen(true, 'keyboard', event, false);
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
onTriggerKeyDown(event) {
|
|
841
|
+
if (!this.editable())
|
|
842
|
+
return;
|
|
843
|
+
if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp')
|
|
844
|
+
return;
|
|
845
|
+
event.preventDefault();
|
|
846
|
+
if (this.isOpen())
|
|
847
|
+
this.enterSurface(this.resolvedOpenTo());
|
|
848
|
+
else
|
|
849
|
+
this.setOpen(true, 'keyboard', event);
|
|
850
|
+
}
|
|
851
|
+
onListKeyDown(event) {
|
|
852
|
+
const list = this.list();
|
|
853
|
+
const at = this.highlightIndex() >= 0 ? this.highlightIndex() : 0;
|
|
854
|
+
const move = (index) => {
|
|
855
|
+
event.preventDefault();
|
|
856
|
+
const clamped = Math.max(0, Math.min(list.length - 1, index));
|
|
857
|
+
const option = list[clamped];
|
|
858
|
+
if (option === undefined)
|
|
859
|
+
return;
|
|
860
|
+
this.setHighlight({ date: this.listDate(), time: option.time }, 'keyboard', event);
|
|
861
|
+
this.focusOption(clamped);
|
|
862
|
+
};
|
|
863
|
+
switch (event.key) {
|
|
864
|
+
case 'ArrowDown':
|
|
865
|
+
move(at + 1);
|
|
866
|
+
return;
|
|
867
|
+
case 'ArrowUp':
|
|
868
|
+
move(at - 1);
|
|
869
|
+
return;
|
|
870
|
+
case 'Home':
|
|
871
|
+
move(0);
|
|
872
|
+
return;
|
|
873
|
+
case 'End':
|
|
874
|
+
move(list.length - 1);
|
|
875
|
+
return;
|
|
876
|
+
case 'PageDown':
|
|
877
|
+
move(hourJump(list, at, 1));
|
|
878
|
+
return;
|
|
879
|
+
case 'PageUp':
|
|
880
|
+
move(hourJump(list, at, -1));
|
|
881
|
+
return;
|
|
882
|
+
case 'Enter':
|
|
883
|
+
case ' ': {
|
|
884
|
+
event.preventDefault();
|
|
885
|
+
const option = list[at];
|
|
886
|
+
if (option !== undefined)
|
|
887
|
+
this.selectTime(option, event);
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
default:
|
|
891
|
+
break;
|
|
892
|
+
}
|
|
893
|
+
/* Type-ahead, which the pattern recommends above seven options and this
|
|
894
|
+
list passes at every step it offers. */
|
|
895
|
+
const typeahead = this.typeahead;
|
|
896
|
+
if (typeahead === null)
|
|
897
|
+
return;
|
|
898
|
+
if (!isPrintable(event.key, typeahead.query.length > 0))
|
|
899
|
+
return;
|
|
900
|
+
const found = typeahead.match(event.key, this.labels(), at);
|
|
901
|
+
if (found < 0)
|
|
902
|
+
return;
|
|
903
|
+
move(found);
|
|
904
|
+
}
|
|
905
|
+
/* ── The machinery ───────────────────────────────────────────────────── */
|
|
906
|
+
onFieldValue(request) {
|
|
907
|
+
this.commit(request.value, request.reason, request.source, request);
|
|
908
|
+
}
|
|
909
|
+
commit(next, reason, source, carried) {
|
|
910
|
+
let cancelled = false;
|
|
911
|
+
const state = createControllable({
|
|
912
|
+
controlled: this.value(),
|
|
913
|
+
initial: this.held(),
|
|
914
|
+
equals: isSameDateTime,
|
|
915
|
+
onRequest: (request) => {
|
|
916
|
+
this.valueChange.emit(carried === undefined
|
|
917
|
+
? request
|
|
918
|
+
: { ...request, incomplete: carried.incomplete, segments: carried.segments });
|
|
919
|
+
cancelled = request.cancelled;
|
|
920
|
+
},
|
|
921
|
+
});
|
|
922
|
+
const moved = state.request(next, reason, source);
|
|
923
|
+
if (cancelled || !moved)
|
|
924
|
+
return;
|
|
925
|
+
if (this.value() === undefined)
|
|
926
|
+
this.ownValue.set(next);
|
|
927
|
+
this.onChangeFn(next);
|
|
928
|
+
}
|
|
929
|
+
setHighlight(next, reason, source) {
|
|
930
|
+
if (reason !== 'programmatic')
|
|
931
|
+
this.movedByReader = true;
|
|
932
|
+
const state = createControllable({
|
|
933
|
+
controlled: this.highlighted(),
|
|
934
|
+
initial: this.highlight(),
|
|
935
|
+
equals: (a, b) => isSameDate(a.date, b.date) && isSameTime(a.time, b.time),
|
|
936
|
+
onRequest: (request) => this.highlightedChange.emit(request),
|
|
937
|
+
});
|
|
938
|
+
if (state.request(next, reason, source))
|
|
939
|
+
this.ownHighlight.set(next);
|
|
940
|
+
}
|
|
941
|
+
setOpen(next, reason, source, enter = true) {
|
|
942
|
+
const state = createControllable({
|
|
943
|
+
controlled: this.open(),
|
|
944
|
+
initial: this.isOpen(),
|
|
945
|
+
onRequest: (request) => {
|
|
946
|
+
this.openChange.emit(request);
|
|
947
|
+
this.focusOnOpen = enter && request.value && !request.cancelled;
|
|
948
|
+
},
|
|
949
|
+
});
|
|
950
|
+
if (state.request(next, reason, source))
|
|
951
|
+
this.ownOpen.set(next);
|
|
952
|
+
}
|
|
953
|
+
/** Places the layer and puts it in the single stack. */
|
|
954
|
+
attach() {
|
|
955
|
+
const layer = this.layer?.nativeElement;
|
|
956
|
+
if (layer === undefined)
|
|
957
|
+
return;
|
|
958
|
+
this.release();
|
|
959
|
+
if (!this.sheet()) {
|
|
960
|
+
const anchor = this.element.querySelector('[data-part="control"]') ?? this.element;
|
|
961
|
+
const [side, align] = this.resolvedPlacement().split('-');
|
|
962
|
+
this.positioner = createPositioner(anchor, layer, { align: align ?? 'center', side });
|
|
963
|
+
void this.positioner.update().then(() => this.positioned.set(true));
|
|
964
|
+
}
|
|
965
|
+
/* The dialog takes focus when it opens, in the surface `openTo` names. */
|
|
966
|
+
if (this.focusOnOpen) {
|
|
967
|
+
this.focusOnOpen = false;
|
|
968
|
+
this.enterSurfaceNow(this.resolvedOpenTo());
|
|
969
|
+
}
|
|
970
|
+
const trigger = this.triggerRef?.nativeElement;
|
|
971
|
+
this.dismissable = createDismissableLayer(layer, {
|
|
972
|
+
branches: trigger === undefined ? [] : [trigger],
|
|
973
|
+
escape: true,
|
|
974
|
+
focusOutside: false,
|
|
975
|
+
modal: false,
|
|
976
|
+
outsidePress: true,
|
|
977
|
+
scrollLock: false,
|
|
978
|
+
/**
|
|
979
|
+
* `Escape` is staged, and here it has three steps rather than two. The
|
|
980
|
+
* field takes the key first while an expression is open — its own handler
|
|
981
|
+
* stops it before this ever runs — then the calendar's view walks down
|
|
982
|
+
* from year or month, and only then does the panel close.
|
|
983
|
+
*/
|
|
984
|
+
onDismiss: (request) => {
|
|
985
|
+
if (request.reason === 'escape' && this.view() !== 'day') {
|
|
986
|
+
this.view.set(this.view() === 'year' ? 'month' : 'day');
|
|
987
|
+
return;
|
|
988
|
+
}
|
|
989
|
+
this.setOpen(false, request.reason === 'escape' ? 'escape' : 'outsidePress', request.source);
|
|
990
|
+
if (request.reason === 'escape') {
|
|
991
|
+
this.triggerRef?.nativeElement.focus({ preventScroll: true });
|
|
992
|
+
}
|
|
993
|
+
},
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
release() {
|
|
997
|
+
this.positioner?.destroy();
|
|
998
|
+
this.positioner = null;
|
|
999
|
+
this.dismissable?.destroy();
|
|
1000
|
+
this.dismissable = null;
|
|
1001
|
+
this.positioned.set(false);
|
|
1002
|
+
}
|
|
1003
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDateTimePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1004
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlDateTimePicker, isStandalone: true, selector: "[slDateTimePicker]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, highlighted: { classPropertyName: "highlighted", publicName: "highlighted", isSignal: true, isRequired: false, transformFunction: null }, defaultHighlighted: { classPropertyName: "defaultHighlighted", publicName: "defaultHighlighted", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, minTime: { classPropertyName: "minTime", publicName: "minTime", isSignal: true, isRequired: false, transformFunction: null }, maxTime: { classPropertyName: "maxTime", publicName: "maxTime", isSignal: true, isRequired: false, transformFunction: null }, isDateUnavailable: { classPropertyName: "isDateUnavailable", publicName: "isDateUnavailable", isSignal: true, isRequired: false, transformFunction: null }, isTimeUnavailable: { classPropertyName: "isTimeUnavailable", publicName: "isTimeUnavailable", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, maxOptions: { classPropertyName: "maxOptions", publicName: "maxOptions", isSignal: true, isRequired: false, transformFunction: null }, unavailableOptions: { classPropertyName: "unavailableOptions", publicName: "unavailableOptions", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, timeZone: { classPropertyName: "timeZone", publicName: "timeZone", isSignal: true, isRequired: false, transformFunction: null }, hourCycle: { classPropertyName: "hourCycle", publicName: "hourCycle", isSignal: true, isRequired: false, transformFunction: null }, granularity: { classPropertyName: "granularity", publicName: "granularity", isSignal: true, isRequired: false, transformFunction: null }, calendar: { classPropertyName: "calendar", publicName: "calendar", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, months: { classPropertyName: "months", publicName: "months", isSignal: true, isRequired: false, transformFunction: null }, weekNumbers: { classPropertyName: "weekNumbers", publicName: "weekNumbers", isSignal: true, isRequired: false, transformFunction: null }, referenceDateTime: { classPropertyName: "referenceDateTime", publicName: "referenceDateTime", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, openTo: { classPropertyName: "openTo", publicName: "openTo", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, relative: { classPropertyName: "relative", publicName: "relative", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", openChange: "openChange", highlightedChange: "highlightedChange" }, host: { attributes: { "data-ui": "datetime-picker", "data-part": "root" }, properties: { "attr.data-size": "resolvedSize()", "attr.data-variant": "resolvedVariant()", "attr.data-granularity": "resolvedGranularity()", "attr.data-open": "isOpen() ? '' : null", "attr.data-disabled": "resolvedDisabled() === true ? '' : null", "attr.data-invalid": "resolvedInvalid() === true ? '' : null", "attr.data-readonly": "resolvedReadOnly() === true ? '' : null", "attr.data-required": "resolvedRequired() === true ? '' : null" } }, providers: [
|
|
1005
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SlDateTimePicker), multi: true },
|
|
1006
|
+
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => SlDateTimePicker), multi: true },
|
|
1007
|
+
], queries: [{ propertyName: "optionTemplate", first: true, predicate: SlDateTimePickerOption, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "layer", first: true, predicate: ["layer"], descendants: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true }, { propertyName: "listRef", first: true, predicate: ["rows"], descendants: true }, { propertyName: "datePanelRef", first: true, predicate: ["datePanel"], descendants: true }, { propertyName: "field", first: true, predicate: ["field"], descendants: true }, { propertyName: "calendarRef", first: true, predicate: ["calendar"], descendants: true }], exportAs: ["slDateTimePicker"], ngImport: i0, template: `<div data-part="control" (keydown)="onControlKeyDown($event)">
|
|
1008
|
+
<div
|
|
1009
|
+
slDateTimeField
|
|
1010
|
+
#field="slDateTimeField"
|
|
1011
|
+
[locale]="resolvedLocale()"
|
|
1012
|
+
[timeZone]="resolvedTimeZone()"
|
|
1013
|
+
[hourCycle]="resolvedHourCycle()"
|
|
1014
|
+
[granularity]="resolvedGranularity()"
|
|
1015
|
+
[calendar]="resolvedCalendar()"
|
|
1016
|
+
[firstDayOfWeek]="firstDayOfWeek()"
|
|
1017
|
+
[referenceDateTime]="referenceDateTime()"
|
|
1018
|
+
[size]="resolvedSize()"
|
|
1019
|
+
[variant]="resolvedVariant()"
|
|
1020
|
+
[min]="min()"
|
|
1021
|
+
[max]="max()"
|
|
1022
|
+
[minTime]="minTime()"
|
|
1023
|
+
[maxTime]="maxTime()"
|
|
1024
|
+
[isDateUnavailable]="isDateUnavailable()"
|
|
1025
|
+
[isTimeUnavailable]="isTimeUnavailable()"
|
|
1026
|
+
[clearable]="clearable()"
|
|
1027
|
+
[relative]="relative()"
|
|
1028
|
+
[name]="name()"
|
|
1029
|
+
[disabled]="resolvedDisabled()"
|
|
1030
|
+
[readOnly]="readOnly()"
|
|
1031
|
+
[invalid]="invalid()"
|
|
1032
|
+
[required]="required()"
|
|
1033
|
+
[value]="held()"
|
|
1034
|
+
(valueChange)="onFieldValue($event)"
|
|
1035
|
+
(focusout)="onControlFocusOut($event)"
|
|
1036
|
+
>
|
|
1037
|
+
<span slDateTimeFieldEnd>
|
|
1038
|
+
<button
|
|
1039
|
+
#trigger
|
|
1040
|
+
data-part="trigger"
|
|
1041
|
+
type="button"
|
|
1042
|
+
aria-haspopup="dialog"
|
|
1043
|
+
[attr.aria-label]="triggerLabel()"
|
|
1044
|
+
[attr.aria-expanded]="isOpen()"
|
|
1045
|
+
[attr.aria-controls]="isOpen() ? contentId : null"
|
|
1046
|
+
[disabled]="!editable()"
|
|
1047
|
+
(click)="toggle($event)"
|
|
1048
|
+
(keydown)="onTriggerKeyDown($event)"
|
|
1049
|
+
>
|
|
1050
|
+
<span slIcon><svg slGlyph name="calendar"></svg></span>
|
|
1051
|
+
</button>
|
|
1052
|
+
</span>
|
|
1053
|
+
</div>
|
|
1054
|
+
</div>
|
|
1055
|
+
|
|
1056
|
+
@if (isOpen()) {
|
|
1057
|
+
<div
|
|
1058
|
+
#layer
|
|
1059
|
+
data-ui="datetime-picker"
|
|
1060
|
+
data-part="positioner"
|
|
1061
|
+
data-open
|
|
1062
|
+
[attr.data-presentation]="sheet() ? 'sheet' : 'popover'"
|
|
1063
|
+
[attr.data-positioned]="positioned() ? '' : null"
|
|
1064
|
+
>
|
|
1065
|
+
<div
|
|
1066
|
+
data-part="content"
|
|
1067
|
+
role="dialog"
|
|
1068
|
+
[attr.id]="contentId"
|
|
1069
|
+
[attr.aria-label]="triggerLabel()"
|
|
1070
|
+
[attr.aria-description]="truncated() ? t('truncated') : null"
|
|
1071
|
+
[attr.data-granularity]="resolvedGranularity()"
|
|
1072
|
+
[attr.data-open-to]="resolvedOpenTo()"
|
|
1073
|
+
(keydown)="onContentKeyDown($event)"
|
|
1074
|
+
>
|
|
1075
|
+
<div data-part="head">
|
|
1076
|
+
<span data-part="head-value">
|
|
1077
|
+
@if (held() !== null) {
|
|
1078
|
+
{{ headValue() }}
|
|
1079
|
+
} @else {
|
|
1080
|
+
{{ headDate() }},
|
|
1081
|
+
@if (headTime(); as time) {
|
|
1082
|
+
{{ time }}
|
|
1083
|
+
} @else {
|
|
1084
|
+
<span data-placeholder>{{ headPlaceholder() }}</span>
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
</span>
|
|
1088
|
+
<ng-content select="[slDateTimePickerPresets]" />
|
|
1089
|
+
<button data-part="now" type="button" (click)="chooseNow($event)">
|
|
1090
|
+
<span slIcon size="sm"><svg slGlyph name="clock"></svg></span>
|
|
1091
|
+
{{ t('now') }}
|
|
1092
|
+
</button>
|
|
1093
|
+
</div>
|
|
1094
|
+
|
|
1095
|
+
<div data-part="panels">
|
|
1096
|
+
<div #datePanel data-part="date-panel">
|
|
1097
|
+
<div
|
|
1098
|
+
slCalendar
|
|
1099
|
+
#calendar="slCalendar"
|
|
1100
|
+
selectionMode="single"
|
|
1101
|
+
[locale]="resolvedLocale()"
|
|
1102
|
+
[timeZone]="resolvedTimeZone()"
|
|
1103
|
+
[firstDayOfWeek]="firstDayOfWeek()"
|
|
1104
|
+
[months]="months()"
|
|
1105
|
+
[weekNumbers]="weekNumbers()"
|
|
1106
|
+
[readOnly]="readOnly()"
|
|
1107
|
+
[min]="dateMin()"
|
|
1108
|
+
[max]="dateMax()"
|
|
1109
|
+
[isDateUnavailable]="isDateUnavailable()"
|
|
1110
|
+
[value]="dateValue()"
|
|
1111
|
+
[focusedDate]="highlight().date"
|
|
1112
|
+
[view]="view()"
|
|
1113
|
+
(valueChange)="onCalendarValue($event)"
|
|
1114
|
+
(focusedDateChange)="onFocusedDate($event)"
|
|
1115
|
+
(viewChange)="view.set($event)"
|
|
1116
|
+
></div>
|
|
1117
|
+
</div>
|
|
1118
|
+
|
|
1119
|
+
<div data-part="time-panel">
|
|
1120
|
+
@if (list().length === 0) {
|
|
1121
|
+
<div data-part="empty">{{ t('empty') }}</div>
|
|
1122
|
+
} @else {
|
|
1123
|
+
<div
|
|
1124
|
+
#rows
|
|
1125
|
+
data-part="list"
|
|
1126
|
+
role="listbox"
|
|
1127
|
+
[attr.aria-label]="listLabel()"
|
|
1128
|
+
[attr.data-truncated]="truncated() ? '' : null"
|
|
1129
|
+
(keydown)="onListKeyDown($event)"
|
|
1130
|
+
>
|
|
1131
|
+
@for (option of list(); track $index) {
|
|
1132
|
+
<div
|
|
1133
|
+
data-part="option"
|
|
1134
|
+
role="option"
|
|
1135
|
+
[attr.aria-selected]="isSelected(option)"
|
|
1136
|
+
[attr.aria-disabled]="option.unavailable ? 'true' : null"
|
|
1137
|
+
[attr.data-disabled]="option.unavailable ? '' : null"
|
|
1138
|
+
[attr.data-selected]="isSelected(option) ? '' : null"
|
|
1139
|
+
[attr.data-current]="$index === highlightIndex() ? '' : null"
|
|
1140
|
+
[tabindex]="$index === highlightIndex() ? 0 : -1"
|
|
1141
|
+
(click)="selectTime(option, $event)"
|
|
1142
|
+
>
|
|
1143
|
+
@if (optionTemplate) {
|
|
1144
|
+
<ng-container
|
|
1145
|
+
[ngTemplateOutlet]="optionTemplate"
|
|
1146
|
+
[ngTemplateOutletContext]="contextFor(option, $index)"
|
|
1147
|
+
/>
|
|
1148
|
+
} @else {
|
|
1149
|
+
{{ labelFor(option) }}
|
|
1150
|
+
}
|
|
1151
|
+
</div>
|
|
1152
|
+
}
|
|
1153
|
+
</div>
|
|
1154
|
+
}
|
|
1155
|
+
</div>
|
|
1156
|
+
</div>
|
|
1157
|
+
|
|
1158
|
+
<ng-content select="[slDateTimePickerFooter]" />
|
|
1159
|
+
</div>
|
|
1160
|
+
</div>
|
|
1161
|
+
}`, isInline: true, styles: ["@layer slotted.components{[data-ui=datetime-picker][data-part=root]{display:block;inline-size:100%}[data-ui=datetime-picker] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-md, 16px);--_height: var(--slotted-control-height-md, 34px);align-items:center;display:flex;inline-size:100%;min-inline-size:0;position:relative}[data-ui=datetime-picker][data-part=root][data-size=sm] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-sm, 14px);--_height: var(--slotted-control-height-sm, 30px)}[data-ui=datetime-picker][data-part=root][data-size=lg] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-lg, 18px);--_height: var(--slotted-control-height-lg, 38px)}[data-ui=datetime-picker] [data-part=trigger]{--slotted-icon-size: var(--_icon-size);align-items:center;appearance:none;background-color:transparent;block-size:var( --slotted-datetime-picker-trigger-size, min( calc(var(--_icon-size) + 2 * var(--slotted-space-2, .25rem)), calc( var(--_height) - var(--slotted-control-border-width, 1px) * 2 - var(--slotted-space-2, .25rem) ) ) );border:0;border-radius:var(--slotted-datetime-picker-radius, var(--slotted-control-radius, 4px));color:var(--slotted-datetime-picker-trigger-color, var(--slotted-text-muted, GrayText));cursor:pointer;display:inline-flex;flex:0 0 auto;inline-size:var( --slotted-datetime-picker-trigger-size, min( calc(var(--_icon-size) + 2 * var(--slotted-space-2, .25rem)), calc( var(--_height) - var(--slotted-control-border-width, 1px) * 2 - var(--slotted-space-2, .25rem) ) ) );justify-content:center;padding:0;position:relative;touch-action:manipulation;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-tap-highlight-color:transparent}[data-ui=datetime-picker] [data-part=trigger]:after{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-min, 24px)) / 2));position:absolute}@media(pointer:coarse){[data-ui=datetime-picker] [data-part=trigger]:after{inset:min(0px,calc((100% - var(--slotted-target-comfortable, 44px)) / 2))}[data-ui=datetime-picker] [data-part=end]:has(+[data-part=clear]:not([hidden]))>[data-part=trigger]:after{inset-inline-end:0}}[data-ui=datetime-picker] [data-part=trigger]:hover:not(:disabled):not([data-disabled]){background-color:var( --slotted-datetime-picker-trigger-hover-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=datetime-picker] [data-part=trigger]:active:not(:disabled):not([data-disabled]){background-color:var( --slotted-datetime-picker-trigger-active-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=datetime-picker] [data-part=trigger]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}[data-ui=datetime-picker][data-part=root][data-invalid]{--slotted-focus-ring-color: var( --slotted-datetime-picker-invalid-focus-ring-color, var(--slotted-focus-ring-color-invalid, Highlight) )}[data-ui=datetime-picker] [data-part=trigger]:disabled{color:var(--slotted-disabled-foreground);cursor:not-allowed}[data-ui=datetime-picker][data-part=positioner]{position:absolute;inset-block-start:0;box-sizing:border-box;isolation:isolate;pointer-events:none;z-index:calc(var(--slotted-z-index-popover, 1100) + var(--slotted-layer-depth, 0));--_enter-distance: var(--slotted-space-2, .25rem);opacity:0;translate:0 calc(-1 * var(--_enter-distance));transition:opacity var(--slotted-duration-short) var(--slotted-easing-exit),translate var(--slotted-duration-short) var(--slotted-easing-exit)}[data-ui=datetime-picker][data-part=positioner][data-side=top]{translate:0 var(--_enter-distance)}[data-ui=datetime-picker][data-part=positioner]:is([data-side=left],[data-side=right]){translate:0 0}[data-ui=datetime-picker][data-part=positioner][data-open]{opacity:1;translate:0 0;transition:none}[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned]{animation:slotted-datetime-picker-enter-down var(--slotted-duration-medium) var(--slotted-easing-enter)}[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned][data-side=top]{animation-name:slotted-datetime-picker-enter-up}[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned]:is([data-side=left],[data-side=right]){animation-name:slotted-datetime-picker-fade}@keyframes slotted-datetime-picker-enter-down{0%{opacity:0;translate:0 calc(-1 * var(--_enter-distance))}}@keyframes slotted-datetime-picker-enter-up{0%{opacity:0;translate:0 var(--_enter-distance)}}@keyframes slotted-datetime-picker-fade{0%{opacity:0}}@media(prefers-reduced-motion:reduce){[data-ui=datetime-picker][data-part=positioner],[data-ui=datetime-picker][data-part=positioner][data-side=top],[data-ui=datetime-picker][data-part=positioner][data-side=left],[data-ui=datetime-picker][data-part=positioner][data-side=right]{translate:0 0;transition:opacity var(--slotted-duration-short) var(--slotted-easing-exit)}[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned],[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned][data-side=top],[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned][data-side=left],[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned][data-side=right]{animation-name:slotted-datetime-picker-fade}}[data-ui=datetime-picker][data-part=positioner][data-detached]{visibility:hidden}[data-ui=datetime-picker] [data-part=content]{background-color:var(--slotted-datetime-picker-surface, var(--slotted-surface-raised, Canvas));border:var(--slotted-border-width-thin, 1px) solid var( --slotted-datetime-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder) );border-radius:var(--slotted-datetime-picker-content-radius, var(--slotted-radius-lg, 8px));box-shadow:var(--slotted-datetime-picker-content-shadow, var(--slotted-shadow-md));box-sizing:border-box;color:var(--slotted-datetime-picker-content-color, var(--slotted-text, CanvasText));--_row: max(var(--slotted-target-min, 24px), var(--slotted-control-height-sm, 30px));--_row-pitch: calc(var(--_row) + var(--slotted-space-1, .125rem));display:grid;gap:var(--slotted-space-2, .25rem);grid-template-areas:\"head\" \"panels\" \"footer\";grid-template-columns:minmax(0,1fr);inline-size:auto;max-inline-size:min(34rem,var(--slotted-positioner-available-width, 34rem));padding:var(--slotted-datetime-picker-content-padding, var(--slotted-space-3, .375rem));pointer-events:auto}[data-ui=datetime-picker] [data-part=head]{box-sizing:border-box;inline-size:0;min-inline-size:100%;align-items:center;border-block-end:var(--slotted-border-width-thin, 1px) solid var( --slotted-datetime-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder) );column-gap:var(--slotted-space-4, .5rem);display:flex;flex-wrap:wrap;grid-area:head;justify-content:space-between;padding-block-end:var(--slotted-space-3, .375rem);row-gap:var(--slotted-space-2, .25rem)}[data-ui=datetime-picker] [data-part=head-value]{color:var(--slotted-datetime-picker-content-color, var(--slotted-text, CanvasText));font-size:var(--slotted-font-size-sm, 13px);font-variant-numeric:tabular-nums;font-weight:var(--slotted-font-weight-medium, 500);min-inline-size:0;unicode-bidi:plaintext}[data-ui=datetime-picker] [data-part=head-value] [data-placeholder]{color:var(--slotted-datetime-picker-label-color, var(--slotted-text-muted, GrayText))}[data-ui=datetime-picker] [data-part=now]{align-items:center;appearance:none;background-color:var(--slotted-datetime-picker-now-background, transparent);border:var(--slotted-control-border-width, 1px) solid var( --slotted-datetime-picker-now-border-color, var(--slotted-control-border-color, ButtonBorder) );border-radius:var(--slotted-datetime-picker-radius, var(--slotted-control-radius, 4px));color:var(--slotted-datetime-picker-now-color, var(--slotted-text, CanvasText));cursor:pointer;display:inline-flex;flex:0 0 auto;font:inherit;font-size:var(--slotted-control-font-size-sm, 12px);gap:var(--slotted-space-2, .25rem);justify-content:center;min-block-size:var(--slotted-control-height-sm, 30px);padding-block:0;padding-inline:var(--slotted-control-padding-inline-sm, 10px);touch-action:manipulation;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),border-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);white-space:nowrap;-webkit-tap-highlight-color:transparent}[data-ui=datetime-picker] [data-part=now]>[data-ui=icon]{color:var(--slotted-datetime-picker-now-icon-color, var(--slotted-text-muted))}[data-ui=datetime-picker] [data-part=now]:hover:not(:disabled):not([data-disabled]){background-color:var( --slotted-datetime-picker-now-hover-background, var(--slotted-tone-secondary-subtle-hover) );border-color:var( --slotted-datetime-picker-now-hover-border-color, var(--slotted-tone-accent-border) )}[data-ui=datetime-picker] [data-part=now]:active:not(:disabled):not([data-disabled]){background-color:var( --slotted-datetime-picker-now-active-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=datetime-picker] [data-part=now]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}[data-ui=datetime-picker] [data-part=presets]{align-items:center;display:flex;flex-wrap:wrap;gap:var(--slotted-space-2, .25rem)}[data-ui=datetime-picker] [data-part=panels]{column-gap:var(--slotted-space-6, 1rem);display:flex;flex-wrap:wrap;grid-area:panels;min-inline-size:0;row-gap:var(--slotted-space-4, .5rem)}[data-ui=datetime-picker] [data-part=date-panel]{flex:0 0 auto}[data-ui=datetime-picker] [data-part=time-panel]{display:flex;flex:1 1 var(--slotted-datetime-picker-time-panel-inline-size, 7rem);flex-direction:column;gap:var(--slotted-space-2, .25rem);min-inline-size:var(--slotted-datetime-picker-time-panel-inline-size, 7rem)}[data-ui=datetime-picker] [data-part=list]{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--slotted-space-1, .125rem);max-block-size:var(--slotted-datetime-picker-list-block-size, calc(var(--_row-pitch) * 7.5));min-block-size:0;min-inline-size:0;overflow-y:auto;scroll-padding-block:var(--slotted-space-2, .25rem)}[data-ui=datetime-picker] [data-part=option]{align-items:center;background-color:transparent;border-radius:var(--slotted-datetime-picker-option-radius, var(--slotted-radius-sm, 4px));color:inherit;cursor:pointer;display:flex;flex:0 0 auto;font-variant-numeric:tabular-nums;gap:var(--slotted-space-2, .25rem);min-block-size:var(--_row);padding-inline:var(--slotted-space-3, .375rem);transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}[data-ui=datetime-picker] [data-part=option]:hover:not([data-disabled]):not([data-selected]):not([data-current]){background-color:var( --slotted-datetime-picker-option-hover-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=datetime-picker] [data-part=option][data-current]:not([data-selected]){background-color:var( --slotted-datetime-picker-option-current-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=datetime-picker] [data-part=option]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}[data-ui=datetime-picker] [data-part=option][data-selected]{background-color:var( --slotted-datetime-picker-option-selected-background, var(--slotted-tone-accent-solid) );color:var( --slotted-datetime-picker-option-selected-color, var(--slotted-tone-accent-on-solid) )}[data-ui=datetime-picker] [data-part=option][data-selected]:hover:not([data-disabled]){background-color:var( --slotted-datetime-picker-option-selected-hover-background, var(--slotted-tone-accent-solid-hover) )}[data-ui=datetime-picker] [data-part=option][data-disabled]{background-color:transparent;color:var(--slotted-disabled-foreground);cursor:not-allowed}[data-ui=datetime-picker] [data-part=empty]{align-items:center;color:var(--slotted-datetime-picker-label-color, var(--slotted-text-muted, GrayText));display:flex;flex:1 1 auto;justify-content:center;min-block-size:calc(var(--_row) * 2);padding:var(--slotted-space-4, .5rem);text-align:center;text-wrap:balance}[data-ui=datetime-picker] [data-part=footer]{box-sizing:border-box;inline-size:0;min-inline-size:100%;align-items:center;border-block-start:var(--slotted-border-width-thin, 1px) solid var( --slotted-datetime-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder) );display:flex;gap:var(--slotted-space-2, .25rem);grid-area:footer;justify-content:flex-end;padding-block-start:var(--slotted-space-3, .375rem)}@media(max-width:480px)and (pointer:coarse){[data-ui=datetime-picker][data-part=positioner][data-presentation=sheet]{inset:auto 0 0;position:fixed;translate:0 var(--slotted-space-9, 2rem)}[data-ui=datetime-picker][data-part=positioner][data-presentation=sheet][data-open]{translate:0 0}[data-ui=datetime-picker][data-part=positioner][data-presentation=sheet] [data-part=content]{border-end-end-radius:0;border-end-start-radius:0;border-inline:0;border-block-end:0;inline-size:var(--slotted-datetime-picker-sheet-inline-size, 100%);max-inline-size:none;max-block-size:85vh;overflow-y:auto}[data-ui=datetime-picker][data-part=positioner][data-presentation=sheet] [data-part=list]{max-block-size:calc(var(--_row-pitch) * 5.5)}}@media(forced-colors:active){[data-ui=datetime-picker] [data-part=option][data-selected]{background-color:Highlight;color:HighlightText;forced-color-adjust:none}[data-ui=datetime-picker] [data-part=option][data-current]:not([data-selected]){outline:var(--slotted-focus-ring-width, 2px) solid Highlight;outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SlCalendar, selector: "[slCalendar]", inputs: ["value", "defaultValue", "focusedDate", "defaultFocusedDate", "min", "max", "isDateUnavailable", "selectionMode", "months", "view", "defaultView", "weekNumbers", "fixedWeeks", "outsideDays", "locale", "timeZone", "firstDayOfWeek", "calendar", "disabled", "readOnly", "invalid", "messages"], outputs: ["valueChange", "focusedDateChange", "viewChange", "previewChange"], exportAs: ["slCalendar"] }, { kind: "component", type: SlDateTimeField, selector: "[slDateTimeField]", inputs: ["value", "defaultValue", "min", "max", "minTime", "maxTime", "isDateUnavailable", "isTimeUnavailable", "locale", "timeZone", "hourCycle", "granularity", "calendar", "firstDayOfWeek", "yearPivot", "referenceDateTime", "size", "variant", "disabled", "readOnly", "invalid", "required", "clearable", "relative", "messages", "name", "label"], outputs: ["valueChange"], exportAs: ["slDateTimeField"] }, { kind: "directive", type: SlDateTimeFieldEnd, selector: "[slDateTimeFieldEnd]", exportAs: ["slDateTimeFieldEnd"] }, { kind: "component", type: SlGlyph, selector: "svg[slGlyph]", inputs: ["name", "solid"] }, { kind: "component", type: SlIcon, selector: "[slIcon]", inputs: ["directional", "label", "size", "tone"], exportAs: ["slIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1162
|
+
}
|
|
1163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlDateTimePicker, decorators: [{
|
|
1164
|
+
type: Component,
|
|
1165
|
+
args: [{ selector: '[slDateTimePicker]', standalone: true, exportAs: 'slDateTimePicker', imports: [NgTemplateOutlet, SlCalendar, SlDateTimeField, SlDateTimeFieldEnd, SlGlyph, SlIcon], template: `<div data-part="control" (keydown)="onControlKeyDown($event)">
|
|
1166
|
+
<div
|
|
1167
|
+
slDateTimeField
|
|
1168
|
+
#field="slDateTimeField"
|
|
1169
|
+
[locale]="resolvedLocale()"
|
|
1170
|
+
[timeZone]="resolvedTimeZone()"
|
|
1171
|
+
[hourCycle]="resolvedHourCycle()"
|
|
1172
|
+
[granularity]="resolvedGranularity()"
|
|
1173
|
+
[calendar]="resolvedCalendar()"
|
|
1174
|
+
[firstDayOfWeek]="firstDayOfWeek()"
|
|
1175
|
+
[referenceDateTime]="referenceDateTime()"
|
|
1176
|
+
[size]="resolvedSize()"
|
|
1177
|
+
[variant]="resolvedVariant()"
|
|
1178
|
+
[min]="min()"
|
|
1179
|
+
[max]="max()"
|
|
1180
|
+
[minTime]="minTime()"
|
|
1181
|
+
[maxTime]="maxTime()"
|
|
1182
|
+
[isDateUnavailable]="isDateUnavailable()"
|
|
1183
|
+
[isTimeUnavailable]="isTimeUnavailable()"
|
|
1184
|
+
[clearable]="clearable()"
|
|
1185
|
+
[relative]="relative()"
|
|
1186
|
+
[name]="name()"
|
|
1187
|
+
[disabled]="resolvedDisabled()"
|
|
1188
|
+
[readOnly]="readOnly()"
|
|
1189
|
+
[invalid]="invalid()"
|
|
1190
|
+
[required]="required()"
|
|
1191
|
+
[value]="held()"
|
|
1192
|
+
(valueChange)="onFieldValue($event)"
|
|
1193
|
+
(focusout)="onControlFocusOut($event)"
|
|
1194
|
+
>
|
|
1195
|
+
<span slDateTimeFieldEnd>
|
|
1196
|
+
<button
|
|
1197
|
+
#trigger
|
|
1198
|
+
data-part="trigger"
|
|
1199
|
+
type="button"
|
|
1200
|
+
aria-haspopup="dialog"
|
|
1201
|
+
[attr.aria-label]="triggerLabel()"
|
|
1202
|
+
[attr.aria-expanded]="isOpen()"
|
|
1203
|
+
[attr.aria-controls]="isOpen() ? contentId : null"
|
|
1204
|
+
[disabled]="!editable()"
|
|
1205
|
+
(click)="toggle($event)"
|
|
1206
|
+
(keydown)="onTriggerKeyDown($event)"
|
|
1207
|
+
>
|
|
1208
|
+
<span slIcon><svg slGlyph name="calendar"></svg></span>
|
|
1209
|
+
</button>
|
|
1210
|
+
</span>
|
|
1211
|
+
</div>
|
|
1212
|
+
</div>
|
|
1213
|
+
|
|
1214
|
+
@if (isOpen()) {
|
|
1215
|
+
<div
|
|
1216
|
+
#layer
|
|
1217
|
+
data-ui="datetime-picker"
|
|
1218
|
+
data-part="positioner"
|
|
1219
|
+
data-open
|
|
1220
|
+
[attr.data-presentation]="sheet() ? 'sheet' : 'popover'"
|
|
1221
|
+
[attr.data-positioned]="positioned() ? '' : null"
|
|
1222
|
+
>
|
|
1223
|
+
<div
|
|
1224
|
+
data-part="content"
|
|
1225
|
+
role="dialog"
|
|
1226
|
+
[attr.id]="contentId"
|
|
1227
|
+
[attr.aria-label]="triggerLabel()"
|
|
1228
|
+
[attr.aria-description]="truncated() ? t('truncated') : null"
|
|
1229
|
+
[attr.data-granularity]="resolvedGranularity()"
|
|
1230
|
+
[attr.data-open-to]="resolvedOpenTo()"
|
|
1231
|
+
(keydown)="onContentKeyDown($event)"
|
|
1232
|
+
>
|
|
1233
|
+
<div data-part="head">
|
|
1234
|
+
<span data-part="head-value">
|
|
1235
|
+
@if (held() !== null) {
|
|
1236
|
+
{{ headValue() }}
|
|
1237
|
+
} @else {
|
|
1238
|
+
{{ headDate() }},
|
|
1239
|
+
@if (headTime(); as time) {
|
|
1240
|
+
{{ time }}
|
|
1241
|
+
} @else {
|
|
1242
|
+
<span data-placeholder>{{ headPlaceholder() }}</span>
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
</span>
|
|
1246
|
+
<ng-content select="[slDateTimePickerPresets]" />
|
|
1247
|
+
<button data-part="now" type="button" (click)="chooseNow($event)">
|
|
1248
|
+
<span slIcon size="sm"><svg slGlyph name="clock"></svg></span>
|
|
1249
|
+
{{ t('now') }}
|
|
1250
|
+
</button>
|
|
1251
|
+
</div>
|
|
1252
|
+
|
|
1253
|
+
<div data-part="panels">
|
|
1254
|
+
<div #datePanel data-part="date-panel">
|
|
1255
|
+
<div
|
|
1256
|
+
slCalendar
|
|
1257
|
+
#calendar="slCalendar"
|
|
1258
|
+
selectionMode="single"
|
|
1259
|
+
[locale]="resolvedLocale()"
|
|
1260
|
+
[timeZone]="resolvedTimeZone()"
|
|
1261
|
+
[firstDayOfWeek]="firstDayOfWeek()"
|
|
1262
|
+
[months]="months()"
|
|
1263
|
+
[weekNumbers]="weekNumbers()"
|
|
1264
|
+
[readOnly]="readOnly()"
|
|
1265
|
+
[min]="dateMin()"
|
|
1266
|
+
[max]="dateMax()"
|
|
1267
|
+
[isDateUnavailable]="isDateUnavailable()"
|
|
1268
|
+
[value]="dateValue()"
|
|
1269
|
+
[focusedDate]="highlight().date"
|
|
1270
|
+
[view]="view()"
|
|
1271
|
+
(valueChange)="onCalendarValue($event)"
|
|
1272
|
+
(focusedDateChange)="onFocusedDate($event)"
|
|
1273
|
+
(viewChange)="view.set($event)"
|
|
1274
|
+
></div>
|
|
1275
|
+
</div>
|
|
1276
|
+
|
|
1277
|
+
<div data-part="time-panel">
|
|
1278
|
+
@if (list().length === 0) {
|
|
1279
|
+
<div data-part="empty">{{ t('empty') }}</div>
|
|
1280
|
+
} @else {
|
|
1281
|
+
<div
|
|
1282
|
+
#rows
|
|
1283
|
+
data-part="list"
|
|
1284
|
+
role="listbox"
|
|
1285
|
+
[attr.aria-label]="listLabel()"
|
|
1286
|
+
[attr.data-truncated]="truncated() ? '' : null"
|
|
1287
|
+
(keydown)="onListKeyDown($event)"
|
|
1288
|
+
>
|
|
1289
|
+
@for (option of list(); track $index) {
|
|
1290
|
+
<div
|
|
1291
|
+
data-part="option"
|
|
1292
|
+
role="option"
|
|
1293
|
+
[attr.aria-selected]="isSelected(option)"
|
|
1294
|
+
[attr.aria-disabled]="option.unavailable ? 'true' : null"
|
|
1295
|
+
[attr.data-disabled]="option.unavailable ? '' : null"
|
|
1296
|
+
[attr.data-selected]="isSelected(option) ? '' : null"
|
|
1297
|
+
[attr.data-current]="$index === highlightIndex() ? '' : null"
|
|
1298
|
+
[tabindex]="$index === highlightIndex() ? 0 : -1"
|
|
1299
|
+
(click)="selectTime(option, $event)"
|
|
1300
|
+
>
|
|
1301
|
+
@if (optionTemplate) {
|
|
1302
|
+
<ng-container
|
|
1303
|
+
[ngTemplateOutlet]="optionTemplate"
|
|
1304
|
+
[ngTemplateOutletContext]="contextFor(option, $index)"
|
|
1305
|
+
/>
|
|
1306
|
+
} @else {
|
|
1307
|
+
{{ labelFor(option) }}
|
|
1308
|
+
}
|
|
1309
|
+
</div>
|
|
1310
|
+
}
|
|
1311
|
+
</div>
|
|
1312
|
+
}
|
|
1313
|
+
</div>
|
|
1314
|
+
</div>
|
|
1315
|
+
|
|
1316
|
+
<ng-content select="[slDateTimePickerFooter]" />
|
|
1317
|
+
</div>
|
|
1318
|
+
</div>
|
|
1319
|
+
}`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
1320
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SlDateTimePicker), multi: true },
|
|
1321
|
+
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => SlDateTimePicker), multi: true },
|
|
1322
|
+
], host: {
|
|
1323
|
+
'data-ui': 'datetime-picker',
|
|
1324
|
+
'data-part': 'root',
|
|
1325
|
+
'[attr.data-size]': 'resolvedSize()',
|
|
1326
|
+
'[attr.data-variant]': 'resolvedVariant()',
|
|
1327
|
+
'[attr.data-granularity]': 'resolvedGranularity()',
|
|
1328
|
+
'[attr.data-open]': "isOpen() ? '' : null",
|
|
1329
|
+
'[attr.data-disabled]': "resolvedDisabled() === true ? '' : null",
|
|
1330
|
+
'[attr.data-invalid]': "resolvedInvalid() === true ? '' : null",
|
|
1331
|
+
'[attr.data-readonly]': "resolvedReadOnly() === true ? '' : null",
|
|
1332
|
+
'[attr.data-required]': "resolvedRequired() === true ? '' : null",
|
|
1333
|
+
}, styles: ["@layer slotted.components{[data-ui=datetime-picker][data-part=root]{display:block;inline-size:100%}[data-ui=datetime-picker] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-md, 16px);--_height: var(--slotted-control-height-md, 34px);align-items:center;display:flex;inline-size:100%;min-inline-size:0;position:relative}[data-ui=datetime-picker][data-part=root][data-size=sm] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-sm, 14px);--_height: var(--slotted-control-height-sm, 30px)}[data-ui=datetime-picker][data-part=root][data-size=lg] [data-part=control]{--_icon-size: var(--slotted-control-icon-size-lg, 18px);--_height: var(--slotted-control-height-lg, 38px)}[data-ui=datetime-picker] [data-part=trigger]{--slotted-icon-size: var(--_icon-size);align-items:center;appearance:none;background-color:transparent;block-size:var( --slotted-datetime-picker-trigger-size, min( calc(var(--_icon-size) + 2 * var(--slotted-space-2, .25rem)), calc( var(--_height) - var(--slotted-control-border-width, 1px) * 2 - var(--slotted-space-2, .25rem) ) ) );border:0;border-radius:var(--slotted-datetime-picker-radius, var(--slotted-control-radius, 4px));color:var(--slotted-datetime-picker-trigger-color, var(--slotted-text-muted, GrayText));cursor:pointer;display:inline-flex;flex:0 0 auto;inline-size:var( --slotted-datetime-picker-trigger-size, min( calc(var(--_icon-size) + 2 * var(--slotted-space-2, .25rem)), calc( var(--_height) - var(--slotted-control-border-width, 1px) * 2 - var(--slotted-space-2, .25rem) ) ) );justify-content:center;padding:0;position:relative;touch-action:manipulation;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-tap-highlight-color:transparent}[data-ui=datetime-picker] [data-part=trigger]:after{content:\"\";inset:min(0px,calc((100% - var(--slotted-target-min, 24px)) / 2));position:absolute}@media(pointer:coarse){[data-ui=datetime-picker] [data-part=trigger]:after{inset:min(0px,calc((100% - var(--slotted-target-comfortable, 44px)) / 2))}[data-ui=datetime-picker] [data-part=end]:has(+[data-part=clear]:not([hidden]))>[data-part=trigger]:after{inset-inline-end:0}}[data-ui=datetime-picker] [data-part=trigger]:hover:not(:disabled):not([data-disabled]){background-color:var( --slotted-datetime-picker-trigger-hover-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=datetime-picker] [data-part=trigger]:active:not(:disabled):not([data-disabled]){background-color:var( --slotted-datetime-picker-trigger-active-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=datetime-picker] [data-part=trigger]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}[data-ui=datetime-picker][data-part=root][data-invalid]{--slotted-focus-ring-color: var( --slotted-datetime-picker-invalid-focus-ring-color, var(--slotted-focus-ring-color-invalid, Highlight) )}[data-ui=datetime-picker] [data-part=trigger]:disabled{color:var(--slotted-disabled-foreground);cursor:not-allowed}[data-ui=datetime-picker][data-part=positioner]{position:absolute;inset-block-start:0;box-sizing:border-box;isolation:isolate;pointer-events:none;z-index:calc(var(--slotted-z-index-popover, 1100) + var(--slotted-layer-depth, 0));--_enter-distance: var(--slotted-space-2, .25rem);opacity:0;translate:0 calc(-1 * var(--_enter-distance));transition:opacity var(--slotted-duration-short) var(--slotted-easing-exit),translate var(--slotted-duration-short) var(--slotted-easing-exit)}[data-ui=datetime-picker][data-part=positioner][data-side=top]{translate:0 var(--_enter-distance)}[data-ui=datetime-picker][data-part=positioner]:is([data-side=left],[data-side=right]){translate:0 0}[data-ui=datetime-picker][data-part=positioner][data-open]{opacity:1;translate:0 0;transition:none}[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned]{animation:slotted-datetime-picker-enter-down var(--slotted-duration-medium) var(--slotted-easing-enter)}[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned][data-side=top]{animation-name:slotted-datetime-picker-enter-up}[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned]:is([data-side=left],[data-side=right]){animation-name:slotted-datetime-picker-fade}@keyframes slotted-datetime-picker-enter-down{0%{opacity:0;translate:0 calc(-1 * var(--_enter-distance))}}@keyframes slotted-datetime-picker-enter-up{0%{opacity:0;translate:0 var(--_enter-distance)}}@keyframes slotted-datetime-picker-fade{0%{opacity:0}}@media(prefers-reduced-motion:reduce){[data-ui=datetime-picker][data-part=positioner],[data-ui=datetime-picker][data-part=positioner][data-side=top],[data-ui=datetime-picker][data-part=positioner][data-side=left],[data-ui=datetime-picker][data-part=positioner][data-side=right]{translate:0 0;transition:opacity var(--slotted-duration-short) var(--slotted-easing-exit)}[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned],[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned][data-side=top],[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned][data-side=left],[data-ui=datetime-picker][data-part=positioner][data-open][data-positioned][data-side=right]{animation-name:slotted-datetime-picker-fade}}[data-ui=datetime-picker][data-part=positioner][data-detached]{visibility:hidden}[data-ui=datetime-picker] [data-part=content]{background-color:var(--slotted-datetime-picker-surface, var(--slotted-surface-raised, Canvas));border:var(--slotted-border-width-thin, 1px) solid var( --slotted-datetime-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder) );border-radius:var(--slotted-datetime-picker-content-radius, var(--slotted-radius-lg, 8px));box-shadow:var(--slotted-datetime-picker-content-shadow, var(--slotted-shadow-md));box-sizing:border-box;color:var(--slotted-datetime-picker-content-color, var(--slotted-text, CanvasText));--_row: max(var(--slotted-target-min, 24px), var(--slotted-control-height-sm, 30px));--_row-pitch: calc(var(--_row) + var(--slotted-space-1, .125rem));display:grid;gap:var(--slotted-space-2, .25rem);grid-template-areas:\"head\" \"panels\" \"footer\";grid-template-columns:minmax(0,1fr);inline-size:auto;max-inline-size:min(34rem,var(--slotted-positioner-available-width, 34rem));padding:var(--slotted-datetime-picker-content-padding, var(--slotted-space-3, .375rem));pointer-events:auto}[data-ui=datetime-picker] [data-part=head]{box-sizing:border-box;inline-size:0;min-inline-size:100%;align-items:center;border-block-end:var(--slotted-border-width-thin, 1px) solid var( --slotted-datetime-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder) );column-gap:var(--slotted-space-4, .5rem);display:flex;flex-wrap:wrap;grid-area:head;justify-content:space-between;padding-block-end:var(--slotted-space-3, .375rem);row-gap:var(--slotted-space-2, .25rem)}[data-ui=datetime-picker] [data-part=head-value]{color:var(--slotted-datetime-picker-content-color, var(--slotted-text, CanvasText));font-size:var(--slotted-font-size-sm, 13px);font-variant-numeric:tabular-nums;font-weight:var(--slotted-font-weight-medium, 500);min-inline-size:0;unicode-bidi:plaintext}[data-ui=datetime-picker] [data-part=head-value] [data-placeholder]{color:var(--slotted-datetime-picker-label-color, var(--slotted-text-muted, GrayText))}[data-ui=datetime-picker] [data-part=now]{align-items:center;appearance:none;background-color:var(--slotted-datetime-picker-now-background, transparent);border:var(--slotted-control-border-width, 1px) solid var( --slotted-datetime-picker-now-border-color, var(--slotted-control-border-color, ButtonBorder) );border-radius:var(--slotted-datetime-picker-radius, var(--slotted-control-radius, 4px));color:var(--slotted-datetime-picker-now-color, var(--slotted-text, CanvasText));cursor:pointer;display:inline-flex;flex:0 0 auto;font:inherit;font-size:var(--slotted-control-font-size-sm, 12px);gap:var(--slotted-space-2, .25rem);justify-content:center;min-block-size:var(--slotted-control-height-sm, 30px);padding-block:0;padding-inline:var(--slotted-control-padding-inline-sm, 10px);touch-action:manipulation;transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),border-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);white-space:nowrap;-webkit-tap-highlight-color:transparent}[data-ui=datetime-picker] [data-part=now]>[data-ui=icon]{color:var(--slotted-datetime-picker-now-icon-color, var(--slotted-text-muted))}[data-ui=datetime-picker] [data-part=now]:hover:not(:disabled):not([data-disabled]){background-color:var( --slotted-datetime-picker-now-hover-background, var(--slotted-tone-secondary-subtle-hover) );border-color:var( --slotted-datetime-picker-now-hover-border-color, var(--slotted-tone-accent-border) )}[data-ui=datetime-picker] [data-part=now]:active:not(:disabled):not([data-disabled]){background-color:var( --slotted-datetime-picker-now-active-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=datetime-picker] [data-part=now]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}[data-ui=datetime-picker] [data-part=presets]{align-items:center;display:flex;flex-wrap:wrap;gap:var(--slotted-space-2, .25rem)}[data-ui=datetime-picker] [data-part=panels]{column-gap:var(--slotted-space-6, 1rem);display:flex;flex-wrap:wrap;grid-area:panels;min-inline-size:0;row-gap:var(--slotted-space-4, .5rem)}[data-ui=datetime-picker] [data-part=date-panel]{flex:0 0 auto}[data-ui=datetime-picker] [data-part=time-panel]{display:flex;flex:1 1 var(--slotted-datetime-picker-time-panel-inline-size, 7rem);flex-direction:column;gap:var(--slotted-space-2, .25rem);min-inline-size:var(--slotted-datetime-picker-time-panel-inline-size, 7rem)}[data-ui=datetime-picker] [data-part=list]{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--slotted-space-1, .125rem);max-block-size:var(--slotted-datetime-picker-list-block-size, calc(var(--_row-pitch) * 7.5));min-block-size:0;min-inline-size:0;overflow-y:auto;scroll-padding-block:var(--slotted-space-2, .25rem)}[data-ui=datetime-picker] [data-part=option]{align-items:center;background-color:transparent;border-radius:var(--slotted-datetime-picker-option-radius, var(--slotted-radius-sm, 4px));color:inherit;cursor:pointer;display:flex;flex:0 0 auto;font-variant-numeric:tabular-nums;gap:var(--slotted-space-2, .25rem);min-block-size:var(--_row);padding-inline:var(--slotted-space-3, .375rem);transition:background-color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}[data-ui=datetime-picker] [data-part=option]:hover:not([data-disabled]):not([data-selected]):not([data-current]){background-color:var( --slotted-datetime-picker-option-hover-background, var(--slotted-tone-secondary-subtle-hover) )}[data-ui=datetime-picker] [data-part=option][data-current]:not([data-selected]){background-color:var( --slotted-datetime-picker-option-current-background, var(--slotted-tone-secondary-subtle-active) )}[data-ui=datetime-picker] [data-part=option]:focus-visible{outline:var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}[data-ui=datetime-picker] [data-part=option][data-selected]{background-color:var( --slotted-datetime-picker-option-selected-background, var(--slotted-tone-accent-solid) );color:var( --slotted-datetime-picker-option-selected-color, var(--slotted-tone-accent-on-solid) )}[data-ui=datetime-picker] [data-part=option][data-selected]:hover:not([data-disabled]){background-color:var( --slotted-datetime-picker-option-selected-hover-background, var(--slotted-tone-accent-solid-hover) )}[data-ui=datetime-picker] [data-part=option][data-disabled]{background-color:transparent;color:var(--slotted-disabled-foreground);cursor:not-allowed}[data-ui=datetime-picker] [data-part=empty]{align-items:center;color:var(--slotted-datetime-picker-label-color, var(--slotted-text-muted, GrayText));display:flex;flex:1 1 auto;justify-content:center;min-block-size:calc(var(--_row) * 2);padding:var(--slotted-space-4, .5rem);text-align:center;text-wrap:balance}[data-ui=datetime-picker] [data-part=footer]{box-sizing:border-box;inline-size:0;min-inline-size:100%;align-items:center;border-block-start:var(--slotted-border-width-thin, 1px) solid var( --slotted-datetime-picker-content-border-color, var(--slotted-border-subtle, ButtonBorder) );display:flex;gap:var(--slotted-space-2, .25rem);grid-area:footer;justify-content:flex-end;padding-block-start:var(--slotted-space-3, .375rem)}@media(max-width:480px)and (pointer:coarse){[data-ui=datetime-picker][data-part=positioner][data-presentation=sheet]{inset:auto 0 0;position:fixed;translate:0 var(--slotted-space-9, 2rem)}[data-ui=datetime-picker][data-part=positioner][data-presentation=sheet][data-open]{translate:0 0}[data-ui=datetime-picker][data-part=positioner][data-presentation=sheet] [data-part=content]{border-end-end-radius:0;border-end-start-radius:0;border-inline:0;border-block-end:0;inline-size:var(--slotted-datetime-picker-sheet-inline-size, 100%);max-inline-size:none;max-block-size:85vh;overflow-y:auto}[data-ui=datetime-picker][data-part=positioner][data-presentation=sheet] [data-part=list]{max-block-size:calc(var(--_row-pitch) * 5.5)}}@media(forced-colors:active){[data-ui=datetime-picker] [data-part=option][data-selected]{background-color:Highlight;color:HighlightText;forced-color-adjust:none}[data-ui=datetime-picker] [data-part=option][data-current]:not([data-selected]){outline:var(--slotted-focus-ring-width, 2px) solid Highlight;outline-offset:calc(var(--slotted-focus-ring-offset, 2px) * -1)}}}\n"] }]
|
|
1334
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], defaultOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultOpen", required: false }] }], highlighted: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlighted", required: false }] }], defaultHighlighted: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultHighlighted", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], minTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "minTime", required: false }] }], maxTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxTime", required: false }] }], isDateUnavailable: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDateUnavailable", required: false }] }], isTimeUnavailable: [{ type: i0.Input, args: [{ isSignal: true, alias: "isTimeUnavailable", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], maxOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxOptions", required: false }] }], unavailableOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "unavailableOptions", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], timeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeZone", required: false }] }], hourCycle: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourCycle", required: false }] }], granularity: [{ type: i0.Input, args: [{ isSignal: true, alias: "granularity", required: false }] }], calendar: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendar", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], months: [{ type: i0.Input, args: [{ isSignal: true, alias: "months", required: false }] }], weekNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekNumbers", required: false }] }], referenceDateTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "referenceDateTime", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], openTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "openTo", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], relative: [{ type: i0.Input, args: [{ isSignal: true, alias: "relative", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], openChange: [{ type: i0.Output, args: ["openChange"] }], highlightedChange: [{ type: i0.Output, args: ["highlightedChange"] }], optionTemplate: [{
|
|
1335
|
+
type: ContentChild,
|
|
1336
|
+
args: [SlDateTimePickerOption, { read: TemplateRef }]
|
|
1337
|
+
}], layer: [{
|
|
1338
|
+
type: ViewChild,
|
|
1339
|
+
args: ['layer']
|
|
1340
|
+
}], triggerRef: [{
|
|
1341
|
+
type: ViewChild,
|
|
1342
|
+
args: ['trigger']
|
|
1343
|
+
}], listRef: [{
|
|
1344
|
+
type: ViewChild,
|
|
1345
|
+
args: ['rows']
|
|
1346
|
+
}], datePanelRef: [{
|
|
1347
|
+
type: ViewChild,
|
|
1348
|
+
args: ['datePanel']
|
|
1349
|
+
}], field: [{
|
|
1350
|
+
type: ViewChild,
|
|
1351
|
+
args: ['field']
|
|
1352
|
+
}], calendarRef: [{
|
|
1353
|
+
type: ViewChild,
|
|
1354
|
+
args: ['calendar']
|
|
1355
|
+
}] } });
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* Generated bundle index. Do not edit.
|
|
1359
|
+
*/
|
|
1360
|
+
|
|
1361
|
+
export { DATE_TIME_PICKER_DEFAULTS, DATE_TIME_PICKER_MAX_OPTIONS, SlDateTimePicker, SlDateTimePickerFooter, SlDateTimePickerOption, SlDateTimePickerPresets, injectDateTimePickerDefaults, provideDateTimePickerDefaults };
|
|
1362
|
+
//# sourceMappingURL=slotted-angular-datetime-picker.mjs.map
|