@depup/angular__material 21.2.2-depup.19
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 +31 -0
- package/_index.scss +145 -0
- package/autocomplete/_autocomplete-theme.scss +76 -0
- package/autocomplete/_m2-autocomplete.scss +19 -0
- package/autocomplete/_m3-autocomplete.scss +26 -0
- package/badge/_badge-theme.scss +106 -0
- package/badge/_m2-badge.scss +73 -0
- package/badge/_m3-badge.scss +52 -0
- package/bottom-sheet/_bottom-sheet-theme.scss +76 -0
- package/bottom-sheet/_m2-bottom-sheet.scss +24 -0
- package/bottom-sheet/_m3-bottom-sheet.scss +25 -0
- package/button/_button-theme.scss +113 -0
- package/button/_fab-theme.scss +111 -0
- package/button/_icon-button-theme.scss +136 -0
- package/button/_m2-button.scss +194 -0
- package/button/_m2-fab.scss +101 -0
- package/button/_m2-icon-button.scss +59 -0
- package/button/_m3-button.scss +170 -0
- package/button/_m3-fab.scss +92 -0
- package/button/_m3-icon-button.scss +54 -0
- package/button-toggle/_button-toggle-theme.scss +93 -0
- package/button-toggle/_m2-button-toggle.scss +68 -0
- package/button-toggle/_m3-button-toggle.scss +72 -0
- package/card/_card-theme.scss +76 -0
- package/card/_m2-card.scss +39 -0
- package/card/_m3-card.scss +44 -0
- package/changes.json +10 -0
- package/checkbox/_checkbox-theme.scss +105 -0
- package/checkbox/_m2-checkbox.scss +78 -0
- package/checkbox/_m3-checkbox.scss +68 -0
- package/chips/_chips-theme.scss +115 -0
- package/chips/_m2-chip.scss +85 -0
- package/chips/_m3-chip.scss +81 -0
- package/core/_core-theme.scss +125 -0
- package/core/_core.scss +50 -0
- package/core/_m2-app.scss +24 -0
- package/core/_m3-app.scss +44 -0
- package/core/color/_all-color.scss +17 -0
- package/core/density/private/_all-density.scss +78 -0
- package/core/focus-indicators/_private.scss +126 -0
- package/core/m2/_index.scss +52 -0
- package/core/m2/_palette.scss +748 -0
- package/core/m2/_theming.scss +340 -0
- package/core/m2/_typography-utils.scss +81 -0
- package/core/m2/_typography.scss +388 -0
- package/core/option/_m2-optgroup.scss +21 -0
- package/core/option/_m2-option.scss +38 -0
- package/core/option/_m3-optgroup.scss +25 -0
- package/core/option/_m3-option.scss +37 -0
- package/core/option/_optgroup-theme.scss +76 -0
- package/core/option/_option-theme.scss +103 -0
- package/core/ripple/_m2-ripple.scss +17 -0
- package/core/ripple/_m3-ripple.scss +17 -0
- package/core/ripple/_ripple-theme.scss +75 -0
- package/core/ripple/_ripple.scss +56 -0
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +32 -0
- package/core/selection/pseudo-checkbox/_m3-pseudo-checkbox.scss +34 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-common.scss +86 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +110 -0
- package/core/style/_checkbox-common.scss +11 -0
- package/core/style/_elevation.scss +208 -0
- package/core/style/_layout-common.scss +8 -0
- package/core/style/_private.scss +27 -0
- package/core/style/_sass-utils.scss +57 -0
- package/core/style/_validation.scss +52 -0
- package/core/style/_variables.scss +44 -0
- package/core/style/_vendor-prefixes.scss +56 -0
- package/core/theming/_all-theme.scss +168 -0
- package/core/theming/_color-api-backwards-compatibility.scss +159 -0
- package/core/theming/_config-validation.scss +174 -0
- package/core/theming/_definition.scss +141 -0
- package/core/theming/_inspection.scss +289 -0
- package/core/theming/_m2-inspection.scss +243 -0
- package/core/theming/_palettes.scss +1036 -0
- package/core/theming/_theming.scss +193 -0
- package/core/theming/_validation.scss +5 -0
- package/core/tokens/_classes.scss +398 -0
- package/core/tokens/_m2-utils.scss +25 -0
- package/core/tokens/_m3-tokens.scss +126 -0
- package/core/tokens/_m3-utils.scss +36 -0
- package/core/tokens/_system.scss +398 -0
- package/core/tokens/_token-utils.scss +119 -0
- package/core/tokens/m2/_index.scss +6 -0
- package/core/tokens/m2/_md-sys-color-internal.scss +11 -0
- package/core/tokens/m2/_md-sys-color.scss +123 -0
- package/core/tokens/m2/_md-sys-elevation.scss +10 -0
- package/core/tokens/m2/_md-sys-motion.scss +30 -0
- package/core/tokens/m2/_md-sys-shape.scss +16 -0
- package/core/tokens/m2/_md-sys-state.scss +8 -0
- package/core/tokens/m2/_md-sys-typescale.scss +68 -0
- package/core/tokens/m3/_index.scss +7 -0
- package/core/tokens/m3/_md-sys-color-internal.scss +11 -0
- package/core/tokens/m3/_md-sys-color.scss +118 -0
- package/core/tokens/m3/_md-sys-elevation.scss +15 -0
- package/core/tokens/m3/_md-sys-motion.scss +35 -0
- package/core/tokens/m3/_md-sys-shape.scss +21 -0
- package/core/tokens/m3/_md-sys-state.scss +13 -0
- package/core/tokens/m3/_md-sys-typescale-internal.scss +5 -0
- package/core/tokens/m3/_md-sys-typescale.scss +114 -0
- package/core/tokens/m3/_theme.scss +35 -0
- package/core/typography/_all-typography.scss +104 -0
- package/core/typography/_typography-utils.scss +31 -0
- package/core/typography/_typography.scss +269 -0
- package/core/typography/_versioning.scss +90 -0
- package/datepicker/_datepicker-theme.scss +132 -0
- package/datepicker/_m2-datepicker.scss +81 -0
- package/datepicker/_m3-datepicker.scss +74 -0
- package/dialog/_dialog-legacy-padding.scss +31 -0
- package/dialog/_dialog-theme.scss +76 -0
- package/dialog/_m2-dialog.scss +43 -0
- package/dialog/_m3-dialog.scss +47 -0
- package/divider/_divider-theme.scss +75 -0
- package/divider/_m2-divider.scss +17 -0
- package/divider/_m3-divider.scss +19 -0
- package/expansion/_expansion-theme.scss +76 -0
- package/expansion/_m2-expansion.scss +64 -0
- package/expansion/_m3-expansion.scss +61 -0
- package/fesm2022/_animation-chunk.mjs +22 -0
- package/fesm2022/_animation-chunk.mjs.map +1 -0
- package/fesm2022/_date-formats-chunk.mjs +86 -0
- package/fesm2022/_date-formats-chunk.mjs.map +1 -0
- package/fesm2022/_date-range-input-harness-chunk.mjs +322 -0
- package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -0
- package/fesm2022/_error-options-chunk.mjs +66 -0
- package/fesm2022/_error-options-chunk.mjs.map +1 -0
- package/fesm2022/_error-state-chunk.mjs +30 -0
- package/fesm2022/_error-state-chunk.mjs.map +1 -0
- package/fesm2022/_form-field-chunk.mjs +1351 -0
- package/fesm2022/_form-field-chunk.mjs.map +1 -0
- package/fesm2022/_icon-button-chunk.mjs +268 -0
- package/fesm2022/_icon-button-chunk.mjs.map +1 -0
- package/fesm2022/_icon-registry-chunk.mjs +368 -0
- package/fesm2022/_icon-registry-chunk.mjs.map +1 -0
- package/fesm2022/_input-harness-chunk.mjs +67 -0
- package/fesm2022/_input-harness-chunk.mjs.map +1 -0
- package/fesm2022/_input-value-accessor-chunk.mjs +6 -0
- package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -0
- package/fesm2022/_internal-form-field-chunk.mjs +67 -0
- package/fesm2022/_internal-form-field-chunk.mjs.map +1 -0
- package/fesm2022/_line-chunk.mjs +99 -0
- package/fesm2022/_line-chunk.mjs.map +1 -0
- package/fesm2022/_option-chunk.mjs +385 -0
- package/fesm2022/_option-chunk.mjs.map +1 -0
- package/fesm2022/_option-harness-chunk.mjs +30 -0
- package/fesm2022/_option-harness-chunk.mjs.map +1 -0
- package/fesm2022/_option-module-chunk.mjs +48 -0
- package/fesm2022/_option-module-chunk.mjs.map +1 -0
- package/fesm2022/_pseudo-checkbox-chunk.mjs +88 -0
- package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -0
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs +46 -0
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -0
- package/fesm2022/_public-api-chunk.mjs +84 -0
- package/fesm2022/_public-api-chunk.mjs.map +1 -0
- package/fesm2022/_ripple-chunk.mjs +544 -0
- package/fesm2022/_ripple-chunk.mjs.map +1 -0
- package/fesm2022/_ripple-loader-chunk.mjs +144 -0
- package/fesm2022/_ripple-loader-chunk.mjs.map +1 -0
- package/fesm2022/_ripple-module-chunk.mjs +46 -0
- package/fesm2022/_ripple-module-chunk.mjs.map +1 -0
- package/fesm2022/_structural-styles-chunk.mjs +45 -0
- package/fesm2022/_structural-styles-chunk.mjs.map +1 -0
- package/fesm2022/_tooltip-chunk.mjs +848 -0
- package/fesm2022/_tooltip-chunk.mjs.map +1 -0
- package/fesm2022/autocomplete-testing.mjs +75 -0
- package/fesm2022/autocomplete-testing.mjs.map +1 -0
- package/fesm2022/autocomplete.mjs +1068 -0
- package/fesm2022/autocomplete.mjs.map +1 -0
- package/fesm2022/badge-testing.mjs +48 -0
- package/fesm2022/badge-testing.mjs.map +1 -0
- package/fesm2022/badge.mjs +357 -0
- package/fesm2022/badge.mjs.map +1 -0
- package/fesm2022/bottom-sheet-testing.mjs +17 -0
- package/fesm2022/bottom-sheet-testing.mjs.map +1 -0
- package/fesm2022/bottom-sheet.mjs +390 -0
- package/fesm2022/bottom-sheet.mjs.map +1 -0
- package/fesm2022/button-testing.mjs +81 -0
- package/fesm2022/button-testing.mjs.map +1 -0
- package/fesm2022/button-toggle-testing.mjs +87 -0
- package/fesm2022/button-toggle-testing.mjs.map +1 -0
- package/fesm2022/button-toggle.mjs +789 -0
- package/fesm2022/button-toggle.mjs.map +1 -0
- package/fesm2022/button.mjs +308 -0
- package/fesm2022/button.mjs.map +1 -0
- package/fesm2022/card-testing.mjs +29 -0
- package/fesm2022/card-testing.mjs.map +1 -0
- package/fesm2022/card.mjs +615 -0
- package/fesm2022/card.mjs.map +1 -0
- package/fesm2022/checkbox-testing.mjs +79 -0
- package/fesm2022/checkbox-testing.mjs.map +1 -0
- package/fesm2022/checkbox.mjs +551 -0
- package/fesm2022/checkbox.mjs.map +1 -0
- package/fesm2022/chips-testing.mjs +239 -0
- package/fesm2022/chips-testing.mjs.map +1 -0
- package/fesm2022/chips.mjs +2663 -0
- package/fesm2022/chips.mjs.map +1 -0
- package/fesm2022/core-testing.mjs +22 -0
- package/fesm2022/core-testing.mjs.map +1 -0
- package/fesm2022/core.mjs +408 -0
- package/fesm2022/core.mjs.map +1 -0
- package/fesm2022/datepicker-testing.mjs +26 -0
- package/fesm2022/datepicker-testing.mjs.map +1 -0
- package/fesm2022/datepicker.mjs +5015 -0
- package/fesm2022/datepicker.mjs.map +1 -0
- package/fesm2022/dialog-testing.mjs +123 -0
- package/fesm2022/dialog-testing.mjs.map +1 -0
- package/fesm2022/dialog.mjs +873 -0
- package/fesm2022/dialog.mjs.map +1 -0
- package/fesm2022/divider-testing.mjs +17 -0
- package/fesm2022/divider-testing.mjs.map +1 -0
- package/fesm2022/divider.mjs +132 -0
- package/fesm2022/divider.mjs.map +1 -0
- package/fesm2022/expansion-testing.mjs +87 -0
- package/fesm2022/expansion-testing.mjs.map +1 -0
- package/fesm2022/expansion.mjs +749 -0
- package/fesm2022/expansion.mjs.map +1 -0
- package/fesm2022/form-field-testing-control.mjs +24 -0
- package/fesm2022/form-field-testing-control.mjs.map +1 -0
- package/fesm2022/form-field-testing.mjs +135 -0
- package/fesm2022/form-field-testing.mjs.map +1 -0
- package/fesm2022/form-field.mjs +57 -0
- package/fesm2022/form-field.mjs.map +1 -0
- package/fesm2022/grid-list-testing.mjs +80 -0
- package/fesm2022/grid-list-testing.mjs.map +1 -0
- package/fesm2022/grid-list.mjs +604 -0
- package/fesm2022/grid-list.mjs.map +1 -0
- package/fesm2022/icon-testing.mjs +172 -0
- package/fesm2022/icon-testing.mjs.map +1 -0
- package/fesm2022/icon.mjs +366 -0
- package/fesm2022/icon.mjs.map +1 -0
- package/fesm2022/input-testing.mjs +73 -0
- package/fesm2022/input-testing.mjs.map +1 -0
- package/fesm2022/input.mjs +495 -0
- package/fesm2022/input.mjs.map +1 -0
- package/fesm2022/list-testing.mjs +295 -0
- package/fesm2022/list-testing.mjs.map +1 -0
- package/fesm2022/list.mjs +1604 -0
- package/fesm2022/list.mjs.map +1 -0
- package/fesm2022/material.mjs +4 -0
- package/fesm2022/material.mjs.map +1 -0
- package/fesm2022/menu-testing.mjs +174 -0
- package/fesm2022/menu-testing.mjs.map +1 -0
- package/fesm2022/menu.mjs +1421 -0
- package/fesm2022/menu.mjs.map +1 -0
- package/fesm2022/paginator-testing.mjs +69 -0
- package/fesm2022/paginator-testing.mjs.map +1 -0
- package/fesm2022/paginator.mjs +445 -0
- package/fesm2022/paginator.mjs.map +1 -0
- package/fesm2022/progress-bar-testing.mjs +20 -0
- package/fesm2022/progress-bar-testing.mjs.map +1 -0
- package/fesm2022/progress-bar.mjs +247 -0
- package/fesm2022/progress-bar.mjs.map +1 -0
- package/fesm2022/progress-spinner-testing.mjs +21 -0
- package/fesm2022/progress-spinner-testing.mjs.map +1 -0
- package/fesm2022/progress-spinner.mjs +258 -0
- package/fesm2022/progress-spinner.mjs.map +1 -0
- package/fesm2022/radio-testing.mjs +143 -0
- package/fesm2022/radio-testing.mjs.map +1 -0
- package/fesm2022/radio.mjs +751 -0
- package/fesm2022/radio.mjs.map +1 -0
- package/fesm2022/select-testing.mjs +92 -0
- package/fesm2022/select-testing.mjs.map +1 -0
- package/fesm2022/select.mjs +1181 -0
- package/fesm2022/select.mjs.map +1 -0
- package/fesm2022/sidenav-testing.mjs +80 -0
- package/fesm2022/sidenav-testing.mjs.map +1 -0
- package/fesm2022/sidenav.mjs +1151 -0
- package/fesm2022/sidenav.mjs.map +1 -0
- package/fesm2022/slide-toggle-testing.mjs +68 -0
- package/fesm2022/slide-toggle-testing.mjs.map +1 -0
- package/fesm2022/slide-toggle.mjs +403 -0
- package/fesm2022/slide-toggle.mjs.map +1 -0
- package/fesm2022/slider-testing.mjs +105 -0
- package/fesm2022/slider-testing.mjs.map +1 -0
- package/fesm2022/slider.mjs +1720 -0
- package/fesm2022/slider.mjs.map +1 -0
- package/fesm2022/snack-bar-testing.mjs +47 -0
- package/fesm2022/snack-bar-testing.mjs.map +1 -0
- package/fesm2022/snack-bar.mjs +820 -0
- package/fesm2022/snack-bar.mjs.map +1 -0
- package/fesm2022/sort-testing.mjs +55 -0
- package/fesm2022/sort-testing.mjs.map +1 -0
- package/fesm2022/sort.mjs +470 -0
- package/fesm2022/sort.mjs.map +1 -0
- package/fesm2022/stepper-testing.mjs +99 -0
- package/fesm2022/stepper-testing.mjs.map +1 -0
- package/fesm2022/stepper.mjs +900 -0
- package/fesm2022/stepper.mjs.map +1 -0
- package/fesm2022/table-testing.mjs +152 -0
- package/fesm2022/table-testing.mjs.map +1 -0
- package/fesm2022/table.mjs +1151 -0
- package/fesm2022/table.mjs.map +1 -0
- package/fesm2022/tabs-testing.mjs +144 -0
- package/fesm2022/tabs-testing.mjs.map +1 -0
- package/fesm2022/tabs.mjs +2435 -0
- package/fesm2022/tabs.mjs.map +1 -0
- package/fesm2022/timepicker-testing.mjs +128 -0
- package/fesm2022/timepicker-testing.mjs.map +1 -0
- package/fesm2022/timepicker.mjs +1284 -0
- package/fesm2022/timepicker.mjs.map +1 -0
- package/fesm2022/toolbar-testing.mjs +26 -0
- package/fesm2022/toolbar-testing.mjs.map +1 -0
- package/fesm2022/toolbar.mjs +182 -0
- package/fesm2022/toolbar.mjs.map +1 -0
- package/fesm2022/tooltip-testing.mjs +48 -0
- package/fesm2022/tooltip-testing.mjs.map +1 -0
- package/fesm2022/tooltip.mjs +58 -0
- package/fesm2022/tooltip.mjs.map +1 -0
- package/fesm2022/tree-testing.mjs +104 -0
- package/fesm2022/tree-testing.mjs.map +1 -0
- package/fesm2022/tree.mjs +681 -0
- package/fesm2022/tree.mjs.map +1 -0
- package/form-field/_form-field-theme.scss +96 -0
- package/form-field/_m2-form-field.scss +226 -0
- package/form-field/_m3-form-field.scss +137 -0
- package/grid-list/_grid-list-theme.scss +76 -0
- package/grid-list/_m2-grid-list.scss +21 -0
- package/grid-list/_m3-grid-list.scss +20 -0
- package/icon/_icon-theme.scss +109 -0
- package/icon/_m2-icon.scss +15 -0
- package/icon/_m3-icon.scss +21 -0
- package/input/_input-theme.scss +36 -0
- package/list/_list-theme.scss +201 -0
- package/list/_m2-list.scss +92 -0
- package/list/_m3-list.scss +93 -0
- package/menu/_m2-menu.scss +44 -0
- package/menu/_m3-menu.scss +42 -0
- package/menu/_menu-theme.scss +76 -0
- package/package.json +404 -0
- package/paginator/_m2-paginator.scss +69 -0
- package/paginator/_m3-paginator.scss +46 -0
- package/paginator/_paginator-theme.scss +76 -0
- package/prebuilt-themes/azure-blue.css +1 -0
- package/prebuilt-themes/cyan-orange.css +1 -0
- package/prebuilt-themes/deeppurple-amber.css +1 -0
- package/prebuilt-themes/indigo-pink.css +1 -0
- package/prebuilt-themes/magenta-violet.css +1 -0
- package/prebuilt-themes/pink-bluegrey.css +1 -0
- package/prebuilt-themes/purple-green.css +1 -0
- package/prebuilt-themes/rose-red.css +1 -0
- package/progress-bar/_m2-progress-bar.scss +36 -0
- package/progress-bar/_m3-progress-bar.scss +29 -0
- package/progress-bar/_progress-bar-theme.scss +93 -0
- package/progress-spinner/_m2-progress-spinner.scss +25 -0
- package/progress-spinner/_m3-progress-spinner.scss +27 -0
- package/progress-spinner/_progress-spinner-theme.scss +95 -0
- package/radio/_m2-radio.scss +67 -0
- package/radio/_m3-radio.scss +65 -0
- package/radio/_radio-theme.scss +102 -0
- package/schematics/collection.json +55 -0
- package/schematics/migration.json +15 -0
- package/schematics/ng-add/fonts/material-fonts.d.ts +11 -0
- package/schematics/ng-add/fonts/material-fonts.js +41 -0
- package/schematics/ng-add/fonts/material-fonts.js.map +1 -0
- package/schematics/ng-add/index.d.ts +17 -0
- package/schematics/ng-add/index.js +54 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/package-config.d.ts +12 -0
- package/schematics/ng-add/package-config.js +51 -0
- package/schematics/ng-add/package-config.js.map +1 -0
- package/schematics/ng-add/schema.d.ts +15 -0
- package/schematics/ng-add/schema.js +10 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +43 -0
- package/schematics/ng-add/setup-project.d.ts +15 -0
- package/schematics/ng-add/setup-project.js +36 -0
- package/schematics/ng-add/setup-project.js.map +1 -0
- package/schematics/ng-add/theming/create-theme.d.ts +9 -0
- package/schematics/ng-add/theming/create-theme.js +58 -0
- package/schematics/ng-add/theming/create-theme.js.map +1 -0
- package/schematics/ng-add/theming/theming.d.ts +11 -0
- package/schematics/ng-add/theming/theming.js +133 -0
- package/schematics/ng-add/theming/theming.js.map +1 -0
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +27 -0
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +99 -0
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +38 -0
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +118 -0
- package/schematics/ng-generate/address-form/index.d.ts +14 -0
- package/schematics/ng-generate/address-form/index.js +43 -0
- package/schematics/ng-generate/address-form/index.js.map +1 -0
- package/schematics/ng-generate/address-form/schema.d.ts +10 -0
- package/schematics/ng-generate/address-form/schema.js +10 -0
- package/schematics/ng-generate/address-form/schema.js.map +1 -0
- package/schematics/ng-generate/address-form/schema.json +100 -0
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +21 -0
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +26 -0
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +36 -0
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +56 -0
- package/schematics/ng-generate/dashboard/index.d.ts +14 -0
- package/schematics/ng-generate/dashboard/index.js +42 -0
- package/schematics/ng-generate/dashboard/index.js.map +1 -0
- package/schematics/ng-generate/dashboard/schema.d.ts +10 -0
- package/schematics/ng-generate/dashboard/schema.js +10 -0
- package/schematics/ng-generate/dashboard/schema.js.map +1 -0
- package/schematics/ng-generate/dashboard/schema.json +100 -0
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +17 -0
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +28 -0
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +36 -0
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +42 -0
- package/schematics/ng-generate/navigation/index.d.ts +14 -0
- package/schematics/ng-generate/navigation/index.js +42 -0
- package/schematics/ng-generate/navigation/index.js.map +1 -0
- package/schematics/ng-generate/navigation/schema.d.ts +10 -0
- package/schematics/ng-generate/navigation/schema.js +10 -0
- package/schematics/ng-generate/navigation/schema.js.map +1 -0
- package/schematics/ng-generate/navigation/schema.json +105 -0
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__-datasource.ts.template +111 -0
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +3 -0
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +26 -0
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +32 -0
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +36 -0
- package/schematics/ng-generate/table/index.d.ts +14 -0
- package/schematics/ng-generate/table/index.js +40 -0
- package/schematics/ng-generate/table/index.js.map +1 -0
- package/schematics/ng-generate/table/schema.d.ts +10 -0
- package/schematics/ng-generate/table/schema.js +10 -0
- package/schematics/ng-generate/table/schema.js.map +1 -0
- package/schematics/ng-generate/table/schema.json +100 -0
- package/schematics/ng-generate/theme-color/index_bundled.js +6561 -0
- package/schematics/ng-generate/theme-color/index_bundled.js.map +6 -0
- package/schematics/ng-generate/theme-color/schema.json +55 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template +4 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +22 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts.template +32 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +93 -0
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/example-data.ts.template +47 -0
- package/schematics/ng-generate/tree/index.d.ts +14 -0
- package/schematics/ng-generate/tree/index.js +40 -0
- package/schematics/ng-generate/tree/index.js.map +1 -0
- package/schematics/ng-generate/tree/schema.d.ts +10 -0
- package/schematics/ng-generate/tree/schema.js +10 -0
- package/schematics/ng-generate/tree/schema.js.map +1 -0
- package/schematics/ng-generate/tree/schema.json +100 -0
- package/schematics/ng-update/index_bundled.js +204 -0
- package/schematics/ng-update/index_bundled.js.map +6 -0
- package/schematics/package.json +3 -0
- package/select/_m2-select.scss +49 -0
- package/select/_m3-select.scss +54 -0
- package/select/_select-theme.scss +99 -0
- package/sidenav/_m2-sidenav.scss +48 -0
- package/sidenav/_m3-sidenav.scss +26 -0
- package/sidenav/_sidenav-theme.scss +75 -0
- package/slide-toggle/_m2-slide-toggle.scss +134 -0
- package/slide-toggle/_m3-slide-toggle.scss +133 -0
- package/slide-toggle/_slide-toggle-theme.scss +119 -0
- package/slider/_m2-slider.scss +73 -0
- package/slider/_m3-slider.scss +69 -0
- package/slider/_slider-theme.scss +103 -0
- package/snack-bar/_m2-snack-bar.scss +24 -0
- package/snack-bar/_m3-snack-bar.scss +26 -0
- package/snack-bar/_snack-bar-theme.scss +77 -0
- package/sort/_m2-sort.scss +16 -0
- package/sort/_m3-sort.scss +20 -0
- package/sort/_sort-theme.scss +76 -0
- package/stepper/_m2-stepper.scss +65 -0
- package/stepper/_m3-stepper.scss +66 -0
- package/stepper/_stepper-theme.scss +102 -0
- package/table/_m2-table.scss +63 -0
- package/table/_m3-table.scss +52 -0
- package/table/_table-theme.scss +76 -0
- package/tabs/_m2-tabs.scss +68 -0
- package/tabs/_m3-tabs.scss +58 -0
- package/tabs/_tabs-theme.scss +131 -0
- package/timepicker/_m2-timepicker.scss +19 -0
- package/timepicker/_m3-timepicker.scss +21 -0
- package/timepicker/_timepicker-theme.scss +81 -0
- package/toolbar/_m2-toolbar.scss +43 -0
- package/toolbar/_m3-toolbar.scss +41 -0
- package/toolbar/_toolbar-theme.scss +114 -0
- package/tooltip/_m2-tooltip.scss +24 -0
- package/tooltip/_m3-tooltip.scss +25 -0
- package/tooltip/_tooltip-theme.scss +76 -0
- package/tree/_m2-tree.scss +30 -0
- package/tree/_m3-tree.scss +37 -0
- package/tree/_tree-theme.scss +76 -0
- package/types/_badge-chunk.d.ts +100 -0
- package/types/_button-toggle-chunk.d.ts +252 -0
- package/types/_date-adapter-chunk.d.ts +261 -0
- package/types/_date-range-input-harness-chunk.d.ts +284 -0
- package/types/_dialog-chunk.d.ts +336 -0
- package/types/_error-options-chunk.d.ts +17 -0
- package/types/_form-field-chunk.d.ts +375 -0
- package/types/_form-field-control-chunk.d.ts +64 -0
- package/types/_form-field-control-harness-chunk.d.ts +20 -0
- package/types/_form-field-module-chunk.d.ts +18 -0
- package/types/_icon-module-chunk.d.ts +162 -0
- package/types/_icon-registry-chunk.d.ts +271 -0
- package/types/_input-harness-chunk.d.ts +61 -0
- package/types/_line-chunk.d.ts +25 -0
- package/types/_list-option-types-chunk.d.ts +15 -0
- package/types/_option-chunk.d.ts +146 -0
- package/types/_option-harness-chunk.d.ts +35 -0
- package/types/_option-module-chunk.d.ts +13 -0
- package/types/_option-parent-chunk.d.ts +20 -0
- package/types/_paginator-chunk.d.ts +184 -0
- package/types/_palette-chunk.d.ts +4 -0
- package/types/_progress-spinner-chunk.d.ts +91 -0
- package/types/_pseudo-checkbox-module-chunk.d.ts +45 -0
- package/types/_ripple-chunk.d.ts +256 -0
- package/types/_ripple-loader-chunk.d.ts +48 -0
- package/types/_ripple-module-chunk.d.ts +11 -0
- package/types/_sort-chunk.d.ts +88 -0
- package/types/_sort-direction-chunk.d.ts +3 -0
- package/types/_tooltip-chunk.d.ts +315 -0
- package/types/autocomplete-testing.d.ts +53 -0
- package/types/autocomplete.d.ts +420 -0
- package/types/badge-testing.d.ts +36 -0
- package/types/badge.d.ts +14 -0
- package/types/bottom-sheet-testing.d.ts +26 -0
- package/types/bottom-sheet.d.ts +192 -0
- package/types/button-testing.d.ts +70 -0
- package/types/button-toggle-testing.d.ts +97 -0
- package/types/button-toggle.d.ts +16 -0
- package/types/button.d.ts +210 -0
- package/types/card-testing.d.ts +41 -0
- package/types/card.d.ts +156 -0
- package/types/checkbox-testing.d.ts +86 -0
- package/types/checkbox.d.ts +216 -0
- package/types/chips-testing.d.ts +270 -0
- package/types/chips.d.ts +993 -0
- package/types/core-testing.d.ts +32 -0
- package/types/core.d.ts +185 -0
- package/types/datepicker-testing.d.ts +25 -0
- package/types/datepicker.d.ts +1746 -0
- package/types/dialog-testing.d.ts +83 -0
- package/types/dialog.d.ts +84 -0
- package/types/divider-testing.d.ts +15 -0
- package/types/divider.d.ts +24 -0
- package/types/expansion-testing.d.ts +101 -0
- package/types/expansion.d.ts +258 -0
- package/types/form-field-testing-control.d.ts +13 -0
- package/types/form-field-testing.d.ts +127 -0
- package/types/form-field.d.ts +19 -0
- package/types/grid-list-testing.d.ts +82 -0
- package/types/grid-list.d.ts +207 -0
- package/types/icon-testing.d.ts +81 -0
- package/types/icon.d.ts +8 -0
- package/types/input-testing.d.ts +73 -0
- package/types/input.d.ts +208 -0
- package/types/list-testing.d.ts +354 -0
- package/types/list.d.ts +516 -0
- package/types/material.d.ts +3 -0
- package/types/menu-testing.d.ts +141 -0
- package/types/menu.d.ts +547 -0
- package/types/paginator-testing.d.ts +51 -0
- package/types/paginator.d.ts +36 -0
- package/types/progress-bar-testing.d.ts +24 -0
- package/types/progress-bar.d.ts +106 -0
- package/types/progress-spinner-testing.d.ts +28 -0
- package/types/progress-spinner.d.ts +13 -0
- package/types/radio-testing.d.ts +109 -0
- package/types/radio.d.ts +295 -0
- package/types/select-testing.d.ts +63 -0
- package/types/select.d.ts +448 -0
- package/types/sidenav-testing.d.ts +122 -0
- package/types/sidenav.d.ts +335 -0
- package/types/slide-toggle-testing.d.ts +66 -0
- package/types/slide-toggle.d.ts +151 -0
- package/types/slider-testing.d.ts +90 -0
- package/types/slider.d.ts +662 -0
- package/types/snack-bar-testing.d.ts +64 -0
- package/types/snack-bar.d.ts +328 -0
- package/types/sort-testing.d.ts +48 -0
- package/types/sort.d.ts +126 -0
- package/types/stepper-testing.d.ts +136 -0
- package/types/stepper.d.ts +225 -0
- package/types/table-testing.d.ts +174 -0
- package/types/table.d.ts +302 -0
- package/types/tabs-testing.d.ts +145 -0
- package/types/tabs.d.ts +890 -0
- package/types/timepicker-testing.d.ts +108 -0
- package/types/timepicker.d.ts +318 -0
- package/types/toolbar-testing.d.ts +33 -0
- package/types/toolbar.d.ts +44 -0
- package/types/tooltip-testing.d.ts +35 -0
- package/types/tooltip.d.ts +17 -0
- package/types/tree-testing.d.ts +119 -0
- package/types/tree.d.ts +233 -0
|
@@ -0,0 +1,1284 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, Injector, ViewContainerRef, signal, viewChild, viewChildren, input, output, booleanAttribute, computed, effect, ElementRef, afterNextRender, untracked, Component, ChangeDetectionStrategy, ViewEncapsulation, model, Renderer2, Directive, HostAttributeToken, NgModule } from '@angular/core';
|
|
3
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
4
|
+
import { createRepositionScrollStrategy, createFlexibleConnectedPositionStrategy, createOverlayRef } from '@angular/cdk/overlay';
|
|
5
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
6
|
+
import { _getEventTarget, _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
7
|
+
import { TAB, ESCAPE, hasModifierKey, ENTER, DOWN_ARROW, UP_ARROW } from '@angular/cdk/keycodes';
|
|
8
|
+
import { ActiveDescendantKeyManager, _IdGenerator } from '@angular/cdk/a11y';
|
|
9
|
+
import { DateAdapter, MAT_DATE_FORMATS } from './_date-formats-chunk.mjs';
|
|
10
|
+
import { _animationsDisabled } from './_animation-chunk.mjs';
|
|
11
|
+
import { MatOption, MAT_OPTION_PARENT_COMPONENT } from './_option-chunk.mjs';
|
|
12
|
+
import { Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
13
|
+
import { MAT_FORM_FIELD } from './_form-field-chunk.mjs';
|
|
14
|
+
import { MAT_INPUT_VALUE_ACCESSOR } from './_input-value-accessor-chunk.mjs';
|
|
15
|
+
import { MatIconButton } from './_icon-button-chunk.mjs';
|
|
16
|
+
import { CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
17
|
+
import 'rxjs';
|
|
18
|
+
import '@angular/cdk/layout';
|
|
19
|
+
import './_ripple-chunk.mjs';
|
|
20
|
+
import '@angular/cdk/coercion';
|
|
21
|
+
import '@angular/cdk/private';
|
|
22
|
+
import './_pseudo-checkbox-chunk.mjs';
|
|
23
|
+
import './_structural-styles-chunk.mjs';
|
|
24
|
+
import '@angular/common';
|
|
25
|
+
import 'rxjs/operators';
|
|
26
|
+
import '@angular/cdk/observers/private';
|
|
27
|
+
import './_ripple-loader-chunk.mjs';
|
|
28
|
+
|
|
29
|
+
const INTERVAL_PATTERN = /^(\d*\.?\d+)\s*(h|hour|hours|m|min|minute|minutes|s|second|seconds)?$/i;
|
|
30
|
+
const MAT_TIMEPICKER_CONFIG = new InjectionToken('MAT_TIMEPICKER_CONFIG');
|
|
31
|
+
function parseInterval(value) {
|
|
32
|
+
let result;
|
|
33
|
+
if (value === null) {
|
|
34
|
+
return null;
|
|
35
|
+
} else if (typeof value === 'number') {
|
|
36
|
+
result = value;
|
|
37
|
+
} else {
|
|
38
|
+
if (value.trim().length === 0) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const parsed = value.match(INTERVAL_PATTERN);
|
|
42
|
+
const amount = parsed ? parseFloat(parsed[1]) : null;
|
|
43
|
+
const unit = parsed?.[2]?.toLowerCase() || null;
|
|
44
|
+
if (!parsed || amount === null || isNaN(amount)) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
if (unit === 'h' || unit === 'hour' || unit === 'hours') {
|
|
48
|
+
result = amount * 3600;
|
|
49
|
+
} else if (unit === 'm' || unit === 'min' || unit === 'minute' || unit === 'minutes') {
|
|
50
|
+
result = amount * 60;
|
|
51
|
+
} else {
|
|
52
|
+
result = amount;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
function generateOptions(adapter, formats, min, max, interval) {
|
|
58
|
+
const options = [];
|
|
59
|
+
let current = adapter.compareTime(min, max) < 1 ? min : max;
|
|
60
|
+
while (adapter.sameDate(current, min) && adapter.compareTime(current, max) < 1 && adapter.isValid(current)) {
|
|
61
|
+
options.push({
|
|
62
|
+
value: current,
|
|
63
|
+
label: adapter.format(current, formats.display.timeOptionLabel)
|
|
64
|
+
});
|
|
65
|
+
current = adapter.addSeconds(current, interval);
|
|
66
|
+
}
|
|
67
|
+
return options;
|
|
68
|
+
}
|
|
69
|
+
function validateAdapter(adapter, formats) {
|
|
70
|
+
function missingAdapterError(provider) {
|
|
71
|
+
return Error(`MatTimepicker: No provider found for ${provider}. You must add one of the following ` + `to your app config: provideNativeDateAdapter, provideDateFnsAdapter, ` + `provideLuxonDateAdapter, provideMomentDateAdapter, or provide a custom implementation.`);
|
|
72
|
+
}
|
|
73
|
+
if (!adapter) {
|
|
74
|
+
throw missingAdapterError('DateAdapter');
|
|
75
|
+
}
|
|
76
|
+
if (!formats) {
|
|
77
|
+
throw missingAdapterError('MAT_DATE_FORMATS');
|
|
78
|
+
}
|
|
79
|
+
if (formats.display.timeInput === undefined || formats.display.timeOptionLabel === undefined || formats.parse.timeInput === undefined) {
|
|
80
|
+
throw new Error('MatTimepicker: Incomplete `MAT_DATE_FORMATS` has been provided. ' + '`MAT_DATE_FORMATS` must provide `display.timeInput`, `display.timeOptionLabel` ' + 'and `parse.timeInput` formats in order to be compatible with MatTimepicker.');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const MAT_TIMEPICKER_SCROLL_STRATEGY = new InjectionToken('MAT_TIMEPICKER_SCROLL_STRATEGY', {
|
|
85
|
+
providedIn: 'root',
|
|
86
|
+
factory: () => {
|
|
87
|
+
const injector = inject(Injector);
|
|
88
|
+
return () => createRepositionScrollStrategy(injector);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
class MatTimepicker {
|
|
92
|
+
_dir = inject(Directionality, {
|
|
93
|
+
optional: true
|
|
94
|
+
});
|
|
95
|
+
_viewContainerRef = inject(ViewContainerRef);
|
|
96
|
+
_injector = inject(Injector);
|
|
97
|
+
_defaultConfig = inject(MAT_TIMEPICKER_CONFIG, {
|
|
98
|
+
optional: true
|
|
99
|
+
});
|
|
100
|
+
_dateAdapter = inject(DateAdapter, {
|
|
101
|
+
optional: true
|
|
102
|
+
});
|
|
103
|
+
_dateFormats = inject(MAT_DATE_FORMATS, {
|
|
104
|
+
optional: true
|
|
105
|
+
});
|
|
106
|
+
_scrollStrategyFactory = inject(MAT_TIMEPICKER_SCROLL_STRATEGY);
|
|
107
|
+
_animationsDisabled = _animationsDisabled();
|
|
108
|
+
_isOpen = signal(false, ...(ngDevMode ? [{
|
|
109
|
+
debugName: "_isOpen"
|
|
110
|
+
}] : []));
|
|
111
|
+
_activeDescendant = signal(null, ...(ngDevMode ? [{
|
|
112
|
+
debugName: "_activeDescendant"
|
|
113
|
+
}] : []));
|
|
114
|
+
_input = signal(null, ...(ngDevMode ? [{
|
|
115
|
+
debugName: "_input"
|
|
116
|
+
}] : []));
|
|
117
|
+
_overlayRef = null;
|
|
118
|
+
_portal = null;
|
|
119
|
+
_optionsCacheKey = null;
|
|
120
|
+
_localeChanges;
|
|
121
|
+
_onOpenRender = null;
|
|
122
|
+
_panelTemplate = viewChild.required('panelTemplate');
|
|
123
|
+
_timeOptions = [];
|
|
124
|
+
_options = viewChildren(MatOption, ...(ngDevMode ? [{
|
|
125
|
+
debugName: "_options"
|
|
126
|
+
}] : []));
|
|
127
|
+
_keyManager = new ActiveDescendantKeyManager(this._options, this._injector).withHomeAndEnd(true).withPageUpDown(true).withVerticalOrientation(true);
|
|
128
|
+
interval = input(parseInterval(this._defaultConfig?.interval || null), {
|
|
129
|
+
...(ngDevMode ? {
|
|
130
|
+
debugName: "interval"
|
|
131
|
+
} : {}),
|
|
132
|
+
transform: parseInterval
|
|
133
|
+
});
|
|
134
|
+
options = input(null, ...(ngDevMode ? [{
|
|
135
|
+
debugName: "options"
|
|
136
|
+
}] : []));
|
|
137
|
+
isOpen = this._isOpen.asReadonly();
|
|
138
|
+
selected = output();
|
|
139
|
+
opened = output();
|
|
140
|
+
closed = output();
|
|
141
|
+
activeDescendant = this._activeDescendant.asReadonly();
|
|
142
|
+
panelId = inject(_IdGenerator).getId('mat-timepicker-panel-');
|
|
143
|
+
disableRipple = input(this._defaultConfig?.disableRipple ?? false, {
|
|
144
|
+
...(ngDevMode ? {
|
|
145
|
+
debugName: "disableRipple"
|
|
146
|
+
} : {}),
|
|
147
|
+
transform: booleanAttribute
|
|
148
|
+
});
|
|
149
|
+
ariaLabel = input(null, {
|
|
150
|
+
...(ngDevMode ? {
|
|
151
|
+
debugName: "ariaLabel"
|
|
152
|
+
} : {}),
|
|
153
|
+
alias: 'aria-label'
|
|
154
|
+
});
|
|
155
|
+
ariaLabelledby = input(null, {
|
|
156
|
+
...(ngDevMode ? {
|
|
157
|
+
debugName: "ariaLabelledby"
|
|
158
|
+
} : {}),
|
|
159
|
+
alias: 'aria-labelledby'
|
|
160
|
+
});
|
|
161
|
+
disabled = computed(() => !!this._input()?.disabled(), ...(ngDevMode ? [{
|
|
162
|
+
debugName: "disabled"
|
|
163
|
+
}] : []));
|
|
164
|
+
panelClass = input(...(ngDevMode ? [undefined, {
|
|
165
|
+
debugName: "panelClass"
|
|
166
|
+
}] : []));
|
|
167
|
+
constructor() {
|
|
168
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
169
|
+
validateAdapter(this._dateAdapter, this._dateFormats);
|
|
170
|
+
effect(() => {
|
|
171
|
+
const options = this.options();
|
|
172
|
+
const interval = this.interval();
|
|
173
|
+
if (options !== null && interval !== null) {
|
|
174
|
+
throw new Error('Cannot specify both the `options` and `interval` inputs at the same time');
|
|
175
|
+
} else if (options?.length === 0) {
|
|
176
|
+
throw new Error('Value of `options` input cannot be an empty array');
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
const element = inject(ElementRef);
|
|
181
|
+
element.nativeElement.setAttribute('mat-timepicker-panel-id', this.panelId);
|
|
182
|
+
this._handleLocaleChanges();
|
|
183
|
+
this._handleInputStateChanges();
|
|
184
|
+
this._keyManager.change.subscribe(() => this._activeDescendant.set(this._keyManager.activeItem?.id || null));
|
|
185
|
+
}
|
|
186
|
+
open() {
|
|
187
|
+
const input = this._input();
|
|
188
|
+
if (!input) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
input.focus();
|
|
192
|
+
if (this._isOpen()) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
this._isOpen.set(true);
|
|
196
|
+
this._generateOptions();
|
|
197
|
+
const overlayRef = this._getOverlayRef();
|
|
198
|
+
overlayRef.updateSize({
|
|
199
|
+
width: input.getOverlayOrigin().nativeElement.offsetWidth
|
|
200
|
+
});
|
|
201
|
+
this._portal ??= new TemplatePortal(this._panelTemplate(), this._viewContainerRef);
|
|
202
|
+
if (!overlayRef.hasAttached()) {
|
|
203
|
+
overlayRef.attach(this._portal);
|
|
204
|
+
}
|
|
205
|
+
this._onOpenRender?.destroy();
|
|
206
|
+
this._onOpenRender = afterNextRender(() => {
|
|
207
|
+
const options = this._options();
|
|
208
|
+
this._syncSelectedState(input.value(), options, options[0]);
|
|
209
|
+
this._onOpenRender = null;
|
|
210
|
+
}, {
|
|
211
|
+
injector: this._injector
|
|
212
|
+
});
|
|
213
|
+
this.opened.emit();
|
|
214
|
+
}
|
|
215
|
+
close() {
|
|
216
|
+
if (this._isOpen()) {
|
|
217
|
+
this._isOpen.set(false);
|
|
218
|
+
this.closed.emit();
|
|
219
|
+
if (this._animationsDisabled) {
|
|
220
|
+
this._overlayRef?.detach();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
registerInput(input) {
|
|
225
|
+
const currentInput = this._input();
|
|
226
|
+
if (currentInput && input !== currentInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
227
|
+
throw new Error('MatTimepicker can only be registered with one input at a time');
|
|
228
|
+
}
|
|
229
|
+
this._input.set(input);
|
|
230
|
+
}
|
|
231
|
+
ngOnDestroy() {
|
|
232
|
+
this._keyManager.destroy();
|
|
233
|
+
this._localeChanges?.unsubscribe();
|
|
234
|
+
this._onOpenRender?.destroy();
|
|
235
|
+
this._overlayRef?.dispose();
|
|
236
|
+
}
|
|
237
|
+
_getOverlayHost() {
|
|
238
|
+
return this._overlayRef?.hostElement;
|
|
239
|
+
}
|
|
240
|
+
_selectValue(option) {
|
|
241
|
+
this.close();
|
|
242
|
+
this._keyManager.setActiveItem(option);
|
|
243
|
+
this._options().forEach(current => {
|
|
244
|
+
if (current !== option) {
|
|
245
|
+
current.deselect(false);
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
this._input()?.timepickerValueAssigned(option.value);
|
|
249
|
+
this.selected.emit({
|
|
250
|
+
value: option.value,
|
|
251
|
+
source: this
|
|
252
|
+
});
|
|
253
|
+
this._input()?.focus();
|
|
254
|
+
}
|
|
255
|
+
_getAriaLabelledby() {
|
|
256
|
+
if (this.ariaLabel()) {
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
return this.ariaLabelledby() || this._input()?.getLabelId() || null;
|
|
260
|
+
}
|
|
261
|
+
_handleAnimationEnd(event) {
|
|
262
|
+
if (event.animationName === '_mat-timepicker-exit') {
|
|
263
|
+
this._overlayRef?.detach();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
_getOverlayRef() {
|
|
267
|
+
if (this._overlayRef) {
|
|
268
|
+
return this._overlayRef;
|
|
269
|
+
}
|
|
270
|
+
const positionStrategy = createFlexibleConnectedPositionStrategy(this._injector, this._input().getOverlayOrigin()).withFlexibleDimensions(false).withPush(false).withTransformOriginOn('.mat-timepicker-panel').withPopoverLocation('inline').withPositions([{
|
|
271
|
+
originX: 'start',
|
|
272
|
+
originY: 'bottom',
|
|
273
|
+
overlayX: 'start',
|
|
274
|
+
overlayY: 'top'
|
|
275
|
+
}, {
|
|
276
|
+
originX: 'start',
|
|
277
|
+
originY: 'top',
|
|
278
|
+
overlayX: 'start',
|
|
279
|
+
overlayY: 'bottom',
|
|
280
|
+
panelClass: 'mat-timepicker-above'
|
|
281
|
+
}]);
|
|
282
|
+
this._overlayRef = createOverlayRef(this._injector, {
|
|
283
|
+
positionStrategy,
|
|
284
|
+
scrollStrategy: this._scrollStrategyFactory(),
|
|
285
|
+
direction: this._dir || 'ltr',
|
|
286
|
+
hasBackdrop: false,
|
|
287
|
+
disableAnimations: this._animationsDisabled,
|
|
288
|
+
panelClass: this.panelClass()
|
|
289
|
+
});
|
|
290
|
+
this._overlayRef.detachments().subscribe(() => this.close());
|
|
291
|
+
this._overlayRef.keydownEvents().subscribe(event => this._handleKeydown(event));
|
|
292
|
+
this._overlayRef.outsidePointerEvents().subscribe(event => {
|
|
293
|
+
const target = _getEventTarget(event);
|
|
294
|
+
const origin = this._input()?.getOverlayOrigin().nativeElement;
|
|
295
|
+
if (target && origin && target !== origin && !origin.contains(target)) {
|
|
296
|
+
this.close();
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
return this._overlayRef;
|
|
300
|
+
}
|
|
301
|
+
_generateOptions() {
|
|
302
|
+
const interval = this.interval() ?? 30 * 60;
|
|
303
|
+
const options = this.options();
|
|
304
|
+
if (options !== null) {
|
|
305
|
+
this._timeOptions = options;
|
|
306
|
+
} else {
|
|
307
|
+
const input = this._input();
|
|
308
|
+
const adapter = this._dateAdapter;
|
|
309
|
+
const timeFormat = this._dateFormats.display.timeInput;
|
|
310
|
+
const min = input?.min() || adapter.setTime(adapter.today(), 0, 0, 0);
|
|
311
|
+
const max = input?.max() || adapter.setTime(adapter.today(), 23, 59, 0);
|
|
312
|
+
const cacheKey = interval + '/' + adapter.format(min, timeFormat) + '/' + adapter.format(max, timeFormat);
|
|
313
|
+
if (cacheKey !== this._optionsCacheKey) {
|
|
314
|
+
this._optionsCacheKey = cacheKey;
|
|
315
|
+
this._timeOptions = generateOptions(adapter, this._dateFormats, min, max, interval);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
_syncSelectedState(value, options, fallback) {
|
|
320
|
+
let hasSelected = false;
|
|
321
|
+
for (const option of options) {
|
|
322
|
+
if (value && this._dateAdapter.sameTime(option.value, value)) {
|
|
323
|
+
option.select(false);
|
|
324
|
+
scrollOptionIntoView(option, 'center');
|
|
325
|
+
untracked(() => this._keyManager.setActiveItem(option));
|
|
326
|
+
hasSelected = true;
|
|
327
|
+
} else {
|
|
328
|
+
option.deselect(false);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
if (!hasSelected) {
|
|
332
|
+
if (fallback) {
|
|
333
|
+
untracked(() => this._keyManager.setActiveItem(fallback));
|
|
334
|
+
scrollOptionIntoView(fallback, 'center');
|
|
335
|
+
} else {
|
|
336
|
+
untracked(() => this._keyManager.setActiveItem(-1));
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
_handleKeydown(event) {
|
|
341
|
+
const keyCode = event.keyCode;
|
|
342
|
+
if (keyCode === TAB) {
|
|
343
|
+
this.close();
|
|
344
|
+
} else if (keyCode === ESCAPE && !hasModifierKey(event)) {
|
|
345
|
+
event.preventDefault();
|
|
346
|
+
this.close();
|
|
347
|
+
} else if (keyCode === ENTER) {
|
|
348
|
+
event.preventDefault();
|
|
349
|
+
if (this._keyManager.activeItem) {
|
|
350
|
+
this._selectValue(this._keyManager.activeItem);
|
|
351
|
+
} else {
|
|
352
|
+
this.close();
|
|
353
|
+
}
|
|
354
|
+
} else {
|
|
355
|
+
const previousActive = this._keyManager.activeItem;
|
|
356
|
+
this._keyManager.onKeydown(event);
|
|
357
|
+
const currentActive = this._keyManager.activeItem;
|
|
358
|
+
if (currentActive && currentActive !== previousActive) {
|
|
359
|
+
scrollOptionIntoView(currentActive, 'nearest');
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
_handleLocaleChanges() {
|
|
364
|
+
this._localeChanges = this._dateAdapter.localeChanges.subscribe(() => {
|
|
365
|
+
this._optionsCacheKey = null;
|
|
366
|
+
if (this.isOpen()) {
|
|
367
|
+
this._generateOptions();
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
_handleInputStateChanges() {
|
|
372
|
+
effect(() => {
|
|
373
|
+
const input = this._input();
|
|
374
|
+
const options = this._options();
|
|
375
|
+
if (this._isOpen() && input) {
|
|
376
|
+
this._syncSelectedState(input.value(), options, null);
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
381
|
+
minVersion: "12.0.0",
|
|
382
|
+
version: "22.0.0-next.1",
|
|
383
|
+
ngImport: i0,
|
|
384
|
+
type: MatTimepicker,
|
|
385
|
+
deps: [],
|
|
386
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
387
|
+
});
|
|
388
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
389
|
+
minVersion: "17.0.0",
|
|
390
|
+
version: "22.0.0-next.1",
|
|
391
|
+
type: MatTimepicker,
|
|
392
|
+
isStandalone: true,
|
|
393
|
+
selector: "mat-timepicker",
|
|
394
|
+
inputs: {
|
|
395
|
+
interval: {
|
|
396
|
+
classPropertyName: "interval",
|
|
397
|
+
publicName: "interval",
|
|
398
|
+
isSignal: true,
|
|
399
|
+
isRequired: false,
|
|
400
|
+
transformFunction: null
|
|
401
|
+
},
|
|
402
|
+
options: {
|
|
403
|
+
classPropertyName: "options",
|
|
404
|
+
publicName: "options",
|
|
405
|
+
isSignal: true,
|
|
406
|
+
isRequired: false,
|
|
407
|
+
transformFunction: null
|
|
408
|
+
},
|
|
409
|
+
disableRipple: {
|
|
410
|
+
classPropertyName: "disableRipple",
|
|
411
|
+
publicName: "disableRipple",
|
|
412
|
+
isSignal: true,
|
|
413
|
+
isRequired: false,
|
|
414
|
+
transformFunction: null
|
|
415
|
+
},
|
|
416
|
+
ariaLabel: {
|
|
417
|
+
classPropertyName: "ariaLabel",
|
|
418
|
+
publicName: "aria-label",
|
|
419
|
+
isSignal: true,
|
|
420
|
+
isRequired: false,
|
|
421
|
+
transformFunction: null
|
|
422
|
+
},
|
|
423
|
+
ariaLabelledby: {
|
|
424
|
+
classPropertyName: "ariaLabelledby",
|
|
425
|
+
publicName: "aria-labelledby",
|
|
426
|
+
isSignal: true,
|
|
427
|
+
isRequired: false,
|
|
428
|
+
transformFunction: null
|
|
429
|
+
},
|
|
430
|
+
panelClass: {
|
|
431
|
+
classPropertyName: "panelClass",
|
|
432
|
+
publicName: "panelClass",
|
|
433
|
+
isSignal: true,
|
|
434
|
+
isRequired: false,
|
|
435
|
+
transformFunction: null
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
outputs: {
|
|
439
|
+
selected: "selected",
|
|
440
|
+
opened: "opened",
|
|
441
|
+
closed: "closed"
|
|
442
|
+
},
|
|
443
|
+
providers: [{
|
|
444
|
+
provide: MAT_OPTION_PARENT_COMPONENT,
|
|
445
|
+
useExisting: MatTimepicker
|
|
446
|
+
}],
|
|
447
|
+
viewQueries: [{
|
|
448
|
+
propertyName: "_panelTemplate",
|
|
449
|
+
first: true,
|
|
450
|
+
predicate: ["panelTemplate"],
|
|
451
|
+
descendants: true,
|
|
452
|
+
isSignal: true
|
|
453
|
+
}, {
|
|
454
|
+
propertyName: "_options",
|
|
455
|
+
predicate: MatOption,
|
|
456
|
+
descendants: true,
|
|
457
|
+
isSignal: true
|
|
458
|
+
}],
|
|
459
|
+
exportAs: ["matTimepicker"],
|
|
460
|
+
ngImport: i0,
|
|
461
|
+
template: "<ng-template #panelTemplate>\n <div\n role=\"listbox\"\n class=\"mat-timepicker-panel\"\n [class.mat-timepicker-panel-animations-enabled]=\"!_animationsDisabled\"\n [class.mat-timepicker-panel-exit]=\"!isOpen()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"_getAriaLabelledby()\"\n [id]=\"panelId\"\n (animationend)=\"_handleAnimationEnd($event)\">\n @for (option of _timeOptions; track option.value) {\n <mat-option\n [value]=\"option.value\"\n (onSelectionChange)=\"_selectValue($event.source)\">{{option.label}}</mat-option>\n }\n </div>\n</ng-template>\n",
|
|
462
|
+
styles: ["@keyframes _mat-timepicker-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-timepicker-exit{from{opacity:1}to{opacity:0}}mat-timepicker{display:none}.mat-timepicker-panel{width:100%;max-height:256px;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:relative;border-bottom-left-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-timepicker-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-timepicker-container-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){.mat-timepicker-panel{outline:solid 1px}}.mat-timepicker-above .mat-timepicker-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small))}.mat-timepicker-panel-animations-enabled{animation:_mat-timepicker-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-timepicker-panel-animations-enabled.mat-timepicker-panel-exit{animation:_mat-timepicker-exit 100ms linear}.mat-timepicker-input[readonly]{cursor:pointer}@media(forced-colors: active){.mat-timepicker-toggle-default-icon{color:CanvasText}}\n"],
|
|
463
|
+
dependencies: [{
|
|
464
|
+
kind: "component",
|
|
465
|
+
type: MatOption,
|
|
466
|
+
selector: "mat-option",
|
|
467
|
+
inputs: ["value", "id", "disabled"],
|
|
468
|
+
outputs: ["onSelectionChange"],
|
|
469
|
+
exportAs: ["matOption"]
|
|
470
|
+
}],
|
|
471
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
472
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
476
|
+
minVersion: "12.0.0",
|
|
477
|
+
version: "22.0.0-next.1",
|
|
478
|
+
ngImport: i0,
|
|
479
|
+
type: MatTimepicker,
|
|
480
|
+
decorators: [{
|
|
481
|
+
type: Component,
|
|
482
|
+
args: [{
|
|
483
|
+
selector: 'mat-timepicker',
|
|
484
|
+
exportAs: 'matTimepicker',
|
|
485
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
486
|
+
encapsulation: ViewEncapsulation.None,
|
|
487
|
+
imports: [MatOption],
|
|
488
|
+
providers: [{
|
|
489
|
+
provide: MAT_OPTION_PARENT_COMPONENT,
|
|
490
|
+
useExisting: MatTimepicker
|
|
491
|
+
}],
|
|
492
|
+
template: "<ng-template #panelTemplate>\n <div\n role=\"listbox\"\n class=\"mat-timepicker-panel\"\n [class.mat-timepicker-panel-animations-enabled]=\"!_animationsDisabled\"\n [class.mat-timepicker-panel-exit]=\"!isOpen()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"_getAriaLabelledby()\"\n [id]=\"panelId\"\n (animationend)=\"_handleAnimationEnd($event)\">\n @for (option of _timeOptions; track option.value) {\n <mat-option\n [value]=\"option.value\"\n (onSelectionChange)=\"_selectValue($event.source)\">{{option.label}}</mat-option>\n }\n </div>\n</ng-template>\n",
|
|
493
|
+
styles: ["@keyframes _mat-timepicker-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-timepicker-exit{from{opacity:1}to{opacity:0}}mat-timepicker{display:none}.mat-timepicker-panel{width:100%;max-height:256px;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:relative;border-bottom-left-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-timepicker-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-timepicker-container-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){.mat-timepicker-panel{outline:solid 1px}}.mat-timepicker-above .mat-timepicker-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mat-timepicker-container-shape, var(--mat-sys-corner-extra-small))}.mat-timepicker-panel-animations-enabled{animation:_mat-timepicker-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-timepicker-panel-animations-enabled.mat-timepicker-panel-exit{animation:_mat-timepicker-exit 100ms linear}.mat-timepicker-input[readonly]{cursor:pointer}@media(forced-colors: active){.mat-timepicker-toggle-default-icon{color:CanvasText}}\n"]
|
|
494
|
+
}]
|
|
495
|
+
}],
|
|
496
|
+
ctorParameters: () => [],
|
|
497
|
+
propDecorators: {
|
|
498
|
+
_panelTemplate: [{
|
|
499
|
+
type: i0.ViewChild,
|
|
500
|
+
args: ['panelTemplate', {
|
|
501
|
+
isSignal: true
|
|
502
|
+
}]
|
|
503
|
+
}],
|
|
504
|
+
_options: [{
|
|
505
|
+
type: i0.ViewChildren,
|
|
506
|
+
args: [i0.forwardRef(() => MatOption), {
|
|
507
|
+
isSignal: true
|
|
508
|
+
}]
|
|
509
|
+
}],
|
|
510
|
+
interval: [{
|
|
511
|
+
type: i0.Input,
|
|
512
|
+
args: [{
|
|
513
|
+
isSignal: true,
|
|
514
|
+
alias: "interval",
|
|
515
|
+
required: false
|
|
516
|
+
}]
|
|
517
|
+
}],
|
|
518
|
+
options: [{
|
|
519
|
+
type: i0.Input,
|
|
520
|
+
args: [{
|
|
521
|
+
isSignal: true,
|
|
522
|
+
alias: "options",
|
|
523
|
+
required: false
|
|
524
|
+
}]
|
|
525
|
+
}],
|
|
526
|
+
selected: [{
|
|
527
|
+
type: i0.Output,
|
|
528
|
+
args: ["selected"]
|
|
529
|
+
}],
|
|
530
|
+
opened: [{
|
|
531
|
+
type: i0.Output,
|
|
532
|
+
args: ["opened"]
|
|
533
|
+
}],
|
|
534
|
+
closed: [{
|
|
535
|
+
type: i0.Output,
|
|
536
|
+
args: ["closed"]
|
|
537
|
+
}],
|
|
538
|
+
disableRipple: [{
|
|
539
|
+
type: i0.Input,
|
|
540
|
+
args: [{
|
|
541
|
+
isSignal: true,
|
|
542
|
+
alias: "disableRipple",
|
|
543
|
+
required: false
|
|
544
|
+
}]
|
|
545
|
+
}],
|
|
546
|
+
ariaLabel: [{
|
|
547
|
+
type: i0.Input,
|
|
548
|
+
args: [{
|
|
549
|
+
isSignal: true,
|
|
550
|
+
alias: "aria-label",
|
|
551
|
+
required: false
|
|
552
|
+
}]
|
|
553
|
+
}],
|
|
554
|
+
ariaLabelledby: [{
|
|
555
|
+
type: i0.Input,
|
|
556
|
+
args: [{
|
|
557
|
+
isSignal: true,
|
|
558
|
+
alias: "aria-labelledby",
|
|
559
|
+
required: false
|
|
560
|
+
}]
|
|
561
|
+
}],
|
|
562
|
+
panelClass: [{
|
|
563
|
+
type: i0.Input,
|
|
564
|
+
args: [{
|
|
565
|
+
isSignal: true,
|
|
566
|
+
alias: "panelClass",
|
|
567
|
+
required: false
|
|
568
|
+
}]
|
|
569
|
+
}]
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
function scrollOptionIntoView(option, position) {
|
|
573
|
+
option._getHostElement().scrollIntoView({
|
|
574
|
+
block: position,
|
|
575
|
+
inline: position
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
class MatTimepickerInput {
|
|
580
|
+
_elementRef = inject(ElementRef);
|
|
581
|
+
_dateAdapter = inject(DateAdapter, {
|
|
582
|
+
optional: true
|
|
583
|
+
});
|
|
584
|
+
_dateFormats = inject(MAT_DATE_FORMATS, {
|
|
585
|
+
optional: true
|
|
586
|
+
});
|
|
587
|
+
_formField = inject(MAT_FORM_FIELD, {
|
|
588
|
+
optional: true
|
|
589
|
+
});
|
|
590
|
+
_onChange;
|
|
591
|
+
_onTouched;
|
|
592
|
+
_validatorOnChange;
|
|
593
|
+
_cleanupClick;
|
|
594
|
+
_accessorDisabled = signal(false, ...(ngDevMode ? [{
|
|
595
|
+
debugName: "_accessorDisabled"
|
|
596
|
+
}] : []));
|
|
597
|
+
_localeSubscription;
|
|
598
|
+
_timepickerSubscription;
|
|
599
|
+
_validator;
|
|
600
|
+
_lastValueValid = true;
|
|
601
|
+
_minValid = true;
|
|
602
|
+
_maxValid = true;
|
|
603
|
+
_lastValidDate = null;
|
|
604
|
+
_ariaActiveDescendant = computed(() => {
|
|
605
|
+
const timepicker = this.timepicker();
|
|
606
|
+
const isOpen = timepicker.isOpen();
|
|
607
|
+
const activeDescendant = timepicker.activeDescendant();
|
|
608
|
+
return isOpen && activeDescendant ? activeDescendant : null;
|
|
609
|
+
}, ...(ngDevMode ? [{
|
|
610
|
+
debugName: "_ariaActiveDescendant"
|
|
611
|
+
}] : []));
|
|
612
|
+
_ariaExpanded = computed(() => this.timepicker().isOpen() + '', ...(ngDevMode ? [{
|
|
613
|
+
debugName: "_ariaExpanded"
|
|
614
|
+
}] : []));
|
|
615
|
+
_ariaControls = computed(() => {
|
|
616
|
+
const timepicker = this.timepicker();
|
|
617
|
+
return timepicker.isOpen() ? timepicker.panelId : null;
|
|
618
|
+
}, ...(ngDevMode ? [{
|
|
619
|
+
debugName: "_ariaControls"
|
|
620
|
+
}] : []));
|
|
621
|
+
value = model(null, ...(ngDevMode ? [{
|
|
622
|
+
debugName: "value"
|
|
623
|
+
}] : []));
|
|
624
|
+
timepicker = input.required({
|
|
625
|
+
...(ngDevMode ? {
|
|
626
|
+
debugName: "timepicker"
|
|
627
|
+
} : {}),
|
|
628
|
+
alias: 'matTimepicker'
|
|
629
|
+
});
|
|
630
|
+
min = input(null, {
|
|
631
|
+
...(ngDevMode ? {
|
|
632
|
+
debugName: "min"
|
|
633
|
+
} : {}),
|
|
634
|
+
alias: 'matTimepickerMin',
|
|
635
|
+
transform: value => this._transformDateInput(value)
|
|
636
|
+
});
|
|
637
|
+
max = input(null, {
|
|
638
|
+
...(ngDevMode ? {
|
|
639
|
+
debugName: "max"
|
|
640
|
+
} : {}),
|
|
641
|
+
alias: 'matTimepickerMax',
|
|
642
|
+
transform: value => this._transformDateInput(value)
|
|
643
|
+
});
|
|
644
|
+
openOnClick = input(true, {
|
|
645
|
+
...(ngDevMode ? {
|
|
646
|
+
debugName: "openOnClick"
|
|
647
|
+
} : {}),
|
|
648
|
+
alias: 'matTimepickerOpenOnClick',
|
|
649
|
+
transform: booleanAttribute
|
|
650
|
+
});
|
|
651
|
+
disabled = computed(() => this.disabledInput() || this._accessorDisabled(), ...(ngDevMode ? [{
|
|
652
|
+
debugName: "disabled"
|
|
653
|
+
}] : []));
|
|
654
|
+
disabledInput = input(false, {
|
|
655
|
+
...(ngDevMode ? {
|
|
656
|
+
debugName: "disabledInput"
|
|
657
|
+
} : {}),
|
|
658
|
+
transform: booleanAttribute,
|
|
659
|
+
alias: 'disabled'
|
|
660
|
+
});
|
|
661
|
+
constructor() {
|
|
662
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
663
|
+
validateAdapter(this._dateAdapter, this._dateFormats);
|
|
664
|
+
}
|
|
665
|
+
const renderer = inject(Renderer2);
|
|
666
|
+
this._validator = this._getValidator();
|
|
667
|
+
this._updateFormsState();
|
|
668
|
+
this._registerTimepicker();
|
|
669
|
+
this._localeSubscription = this._dateAdapter.localeChanges.subscribe(() => {
|
|
670
|
+
if (!this._hasFocus()) {
|
|
671
|
+
this._formatValue(this.value());
|
|
672
|
+
}
|
|
673
|
+
});
|
|
674
|
+
this._cleanupClick = renderer.listen(this.getOverlayOrigin().nativeElement, 'click', this._handleClick);
|
|
675
|
+
}
|
|
676
|
+
writeValue(value) {
|
|
677
|
+
const deserialized = this._dateAdapter.deserialize(value);
|
|
678
|
+
this.value.set(this._dateAdapter.getValidDateOrNull(deserialized));
|
|
679
|
+
}
|
|
680
|
+
registerOnChange(fn) {
|
|
681
|
+
this._onChange = fn;
|
|
682
|
+
}
|
|
683
|
+
registerOnTouched(fn) {
|
|
684
|
+
this._onTouched = fn;
|
|
685
|
+
}
|
|
686
|
+
setDisabledState(isDisabled) {
|
|
687
|
+
this._accessorDisabled.set(isDisabled);
|
|
688
|
+
}
|
|
689
|
+
validate(control) {
|
|
690
|
+
return this._validator(control);
|
|
691
|
+
}
|
|
692
|
+
registerOnValidatorChange(fn) {
|
|
693
|
+
this._validatorOnChange = fn;
|
|
694
|
+
}
|
|
695
|
+
getOverlayOrigin() {
|
|
696
|
+
return this._formField?.getConnectedOverlayOrigin() || this._elementRef;
|
|
697
|
+
}
|
|
698
|
+
focus() {
|
|
699
|
+
this._elementRef.nativeElement.focus();
|
|
700
|
+
}
|
|
701
|
+
ngOnDestroy() {
|
|
702
|
+
this._cleanupClick();
|
|
703
|
+
this._timepickerSubscription?.unsubscribe();
|
|
704
|
+
this._localeSubscription.unsubscribe();
|
|
705
|
+
}
|
|
706
|
+
getLabelId() {
|
|
707
|
+
return this._formField?.getLabelId() || null;
|
|
708
|
+
}
|
|
709
|
+
_handleClick = event => {
|
|
710
|
+
if (this.disabled() || !this.openOnClick()) {
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
const target = _getEventTarget(event);
|
|
714
|
+
const overlayHost = this.timepicker()._getOverlayHost();
|
|
715
|
+
if (!target || !overlayHost || !overlayHost.contains(target)) {
|
|
716
|
+
this.timepicker().open();
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
_handleInput(event) {
|
|
720
|
+
const value = event.target.value;
|
|
721
|
+
const currentValue = this.value();
|
|
722
|
+
const date = this._dateAdapter.parseTime(value, this._dateFormats.parse.timeInput);
|
|
723
|
+
const hasChanged = !this._dateAdapter.sameTime(date, currentValue);
|
|
724
|
+
if (!date || hasChanged || !!(value && !currentValue)) {
|
|
725
|
+
this._assignUserSelection(date, true);
|
|
726
|
+
} else {
|
|
727
|
+
this._validatorOnChange?.();
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
_handleBlur() {
|
|
731
|
+
const value = this.value();
|
|
732
|
+
if (value && this._isValid(value)) {
|
|
733
|
+
this._formatValue(value);
|
|
734
|
+
}
|
|
735
|
+
if (!this.timepicker().isOpen()) {
|
|
736
|
+
this._onTouched?.();
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
_handleKeydown(event) {
|
|
740
|
+
if (this.timepicker().isOpen() || this.disabled()) {
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
if (event.keyCode === ESCAPE && !hasModifierKey(event) && this.value() !== null) {
|
|
744
|
+
event.preventDefault();
|
|
745
|
+
this.value.set(null);
|
|
746
|
+
this._formatValue(null);
|
|
747
|
+
} else if (event.keyCode === DOWN_ARROW || event.keyCode === UP_ARROW) {
|
|
748
|
+
event.preventDefault();
|
|
749
|
+
this.timepicker().open();
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
timepickerValueAssigned(value) {
|
|
753
|
+
if (!this._dateAdapter.sameTime(value, this.value())) {
|
|
754
|
+
this._assignUserSelection(value, true);
|
|
755
|
+
this._formatValue(value);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
_updateFormsState() {
|
|
759
|
+
effect(() => {
|
|
760
|
+
const {
|
|
761
|
+
_dateAdapter: adapter,
|
|
762
|
+
_lastValueValid: prevValueValid,
|
|
763
|
+
_minValid: prevMinValid,
|
|
764
|
+
_maxValid: prevMaxValid
|
|
765
|
+
} = this;
|
|
766
|
+
const value = adapter.deserialize(this.value());
|
|
767
|
+
const min = this.min();
|
|
768
|
+
const max = this.max();
|
|
769
|
+
const valueValid = this._lastValueValid = this._isValid(value);
|
|
770
|
+
this._minValid = !min || !value || !valueValid || adapter.compareTime(min, value) <= 0;
|
|
771
|
+
this._maxValid = !max || !value || !valueValid || adapter.compareTime(max, value) >= 0;
|
|
772
|
+
const stateChanged = prevValueValid !== valueValid || prevMinValid !== this._minValid || prevMaxValid !== this._maxValid;
|
|
773
|
+
if (!this._hasFocus()) {
|
|
774
|
+
this._formatValue(value);
|
|
775
|
+
}
|
|
776
|
+
if (value && valueValid) {
|
|
777
|
+
this._lastValidDate = value;
|
|
778
|
+
}
|
|
779
|
+
if (stateChanged) {
|
|
780
|
+
this._validatorOnChange?.();
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
_registerTimepicker() {
|
|
785
|
+
effect(() => {
|
|
786
|
+
const timepicker = this.timepicker();
|
|
787
|
+
timepicker.registerInput(this);
|
|
788
|
+
timepicker.closed.subscribe(() => this._onTouched?.());
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
_assignUserSelection(selection, propagateToAccessor) {
|
|
792
|
+
let toAssign;
|
|
793
|
+
if (selection == null || !this._isValid(selection)) {
|
|
794
|
+
toAssign = selection;
|
|
795
|
+
} else {
|
|
796
|
+
const adapter = this._dateAdapter;
|
|
797
|
+
const target = adapter.getValidDateOrNull(this._lastValidDate || this.value());
|
|
798
|
+
const hours = adapter.getHours(selection);
|
|
799
|
+
const minutes = adapter.getMinutes(selection);
|
|
800
|
+
const seconds = adapter.getSeconds(selection);
|
|
801
|
+
toAssign = target ? adapter.setTime(target, hours, minutes, seconds) : selection;
|
|
802
|
+
}
|
|
803
|
+
if (propagateToAccessor) {
|
|
804
|
+
this._onChange?.(toAssign);
|
|
805
|
+
}
|
|
806
|
+
this.value.set(toAssign);
|
|
807
|
+
}
|
|
808
|
+
_formatValue(value) {
|
|
809
|
+
value = this._dateAdapter.getValidDateOrNull(value);
|
|
810
|
+
this._elementRef.nativeElement.value = value == null ? '' : this._dateAdapter.format(value, this._dateFormats.display.timeInput);
|
|
811
|
+
}
|
|
812
|
+
_isValid(value) {
|
|
813
|
+
return !value || this._dateAdapter.isValid(value);
|
|
814
|
+
}
|
|
815
|
+
_transformDateInput(value) {
|
|
816
|
+
const date = typeof value === 'string' ? this._dateAdapter.parseTime(value, this._dateFormats.parse.timeInput) : this._dateAdapter.deserialize(value);
|
|
817
|
+
return date && this._dateAdapter.isValid(date) ? date : null;
|
|
818
|
+
}
|
|
819
|
+
_hasFocus() {
|
|
820
|
+
return _getFocusedElementPierceShadowDom() === this._elementRef.nativeElement;
|
|
821
|
+
}
|
|
822
|
+
_getValidator() {
|
|
823
|
+
return Validators.compose([() => this._lastValueValid ? null : {
|
|
824
|
+
'matTimepickerParse': {
|
|
825
|
+
'text': this._elementRef.nativeElement.value
|
|
826
|
+
}
|
|
827
|
+
}, control => this._minValid ? null : {
|
|
828
|
+
'matTimepickerMin': {
|
|
829
|
+
'min': this.min(),
|
|
830
|
+
'actual': this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value))
|
|
831
|
+
}
|
|
832
|
+
}, control => this._maxValid ? null : {
|
|
833
|
+
'matTimepickerMax': {
|
|
834
|
+
'max': this.max(),
|
|
835
|
+
'actual': this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value))
|
|
836
|
+
}
|
|
837
|
+
}]);
|
|
838
|
+
}
|
|
839
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
840
|
+
minVersion: "12.0.0",
|
|
841
|
+
version: "22.0.0-next.1",
|
|
842
|
+
ngImport: i0,
|
|
843
|
+
type: MatTimepickerInput,
|
|
844
|
+
deps: [],
|
|
845
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
846
|
+
});
|
|
847
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
848
|
+
minVersion: "17.1.0",
|
|
849
|
+
version: "22.0.0-next.1",
|
|
850
|
+
type: MatTimepickerInput,
|
|
851
|
+
isStandalone: true,
|
|
852
|
+
selector: "input[matTimepicker]",
|
|
853
|
+
inputs: {
|
|
854
|
+
value: {
|
|
855
|
+
classPropertyName: "value",
|
|
856
|
+
publicName: "value",
|
|
857
|
+
isSignal: true,
|
|
858
|
+
isRequired: false,
|
|
859
|
+
transformFunction: null
|
|
860
|
+
},
|
|
861
|
+
timepicker: {
|
|
862
|
+
classPropertyName: "timepicker",
|
|
863
|
+
publicName: "matTimepicker",
|
|
864
|
+
isSignal: true,
|
|
865
|
+
isRequired: true,
|
|
866
|
+
transformFunction: null
|
|
867
|
+
},
|
|
868
|
+
min: {
|
|
869
|
+
classPropertyName: "min",
|
|
870
|
+
publicName: "matTimepickerMin",
|
|
871
|
+
isSignal: true,
|
|
872
|
+
isRequired: false,
|
|
873
|
+
transformFunction: null
|
|
874
|
+
},
|
|
875
|
+
max: {
|
|
876
|
+
classPropertyName: "max",
|
|
877
|
+
publicName: "matTimepickerMax",
|
|
878
|
+
isSignal: true,
|
|
879
|
+
isRequired: false,
|
|
880
|
+
transformFunction: null
|
|
881
|
+
},
|
|
882
|
+
openOnClick: {
|
|
883
|
+
classPropertyName: "openOnClick",
|
|
884
|
+
publicName: "matTimepickerOpenOnClick",
|
|
885
|
+
isSignal: true,
|
|
886
|
+
isRequired: false,
|
|
887
|
+
transformFunction: null
|
|
888
|
+
},
|
|
889
|
+
disabledInput: {
|
|
890
|
+
classPropertyName: "disabledInput",
|
|
891
|
+
publicName: "disabled",
|
|
892
|
+
isSignal: true,
|
|
893
|
+
isRequired: false,
|
|
894
|
+
transformFunction: null
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
outputs: {
|
|
898
|
+
value: "valueChange"
|
|
899
|
+
},
|
|
900
|
+
host: {
|
|
901
|
+
attributes: {
|
|
902
|
+
"role": "combobox",
|
|
903
|
+
"type": "text",
|
|
904
|
+
"aria-haspopup": "listbox"
|
|
905
|
+
},
|
|
906
|
+
listeners: {
|
|
907
|
+
"blur": "_handleBlur()",
|
|
908
|
+
"input": "_handleInput($event)",
|
|
909
|
+
"keydown": "_handleKeydown($event)"
|
|
910
|
+
},
|
|
911
|
+
properties: {
|
|
912
|
+
"attr.aria-activedescendant": "_ariaActiveDescendant()",
|
|
913
|
+
"attr.aria-expanded": "_ariaExpanded()",
|
|
914
|
+
"attr.aria-controls": "_ariaControls()",
|
|
915
|
+
"attr.mat-timepicker-id": "timepicker()?.panelId",
|
|
916
|
+
"disabled": "disabled()"
|
|
917
|
+
},
|
|
918
|
+
classAttribute: "mat-timepicker-input"
|
|
919
|
+
},
|
|
920
|
+
providers: [{
|
|
921
|
+
provide: NG_VALUE_ACCESSOR,
|
|
922
|
+
useExisting: MatTimepickerInput,
|
|
923
|
+
multi: true
|
|
924
|
+
}, {
|
|
925
|
+
provide: NG_VALIDATORS,
|
|
926
|
+
useExisting: MatTimepickerInput,
|
|
927
|
+
multi: true
|
|
928
|
+
}, {
|
|
929
|
+
provide: MAT_INPUT_VALUE_ACCESSOR,
|
|
930
|
+
useExisting: MatTimepickerInput
|
|
931
|
+
}],
|
|
932
|
+
exportAs: ["matTimepickerInput"],
|
|
933
|
+
ngImport: i0
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
937
|
+
minVersion: "12.0.0",
|
|
938
|
+
version: "22.0.0-next.1",
|
|
939
|
+
ngImport: i0,
|
|
940
|
+
type: MatTimepickerInput,
|
|
941
|
+
decorators: [{
|
|
942
|
+
type: Directive,
|
|
943
|
+
args: [{
|
|
944
|
+
selector: 'input[matTimepicker]',
|
|
945
|
+
exportAs: 'matTimepickerInput',
|
|
946
|
+
host: {
|
|
947
|
+
'class': 'mat-timepicker-input',
|
|
948
|
+
'role': 'combobox',
|
|
949
|
+
'type': 'text',
|
|
950
|
+
'aria-haspopup': 'listbox',
|
|
951
|
+
'[attr.aria-activedescendant]': '_ariaActiveDescendant()',
|
|
952
|
+
'[attr.aria-expanded]': '_ariaExpanded()',
|
|
953
|
+
'[attr.aria-controls]': '_ariaControls()',
|
|
954
|
+
'[attr.mat-timepicker-id]': 'timepicker()?.panelId',
|
|
955
|
+
'[disabled]': 'disabled()',
|
|
956
|
+
'(blur)': '_handleBlur()',
|
|
957
|
+
'(input)': '_handleInput($event)',
|
|
958
|
+
'(keydown)': '_handleKeydown($event)'
|
|
959
|
+
},
|
|
960
|
+
providers: [{
|
|
961
|
+
provide: NG_VALUE_ACCESSOR,
|
|
962
|
+
useExisting: MatTimepickerInput,
|
|
963
|
+
multi: true
|
|
964
|
+
}, {
|
|
965
|
+
provide: NG_VALIDATORS,
|
|
966
|
+
useExisting: MatTimepickerInput,
|
|
967
|
+
multi: true
|
|
968
|
+
}, {
|
|
969
|
+
provide: MAT_INPUT_VALUE_ACCESSOR,
|
|
970
|
+
useExisting: MatTimepickerInput
|
|
971
|
+
}]
|
|
972
|
+
}]
|
|
973
|
+
}],
|
|
974
|
+
ctorParameters: () => [],
|
|
975
|
+
propDecorators: {
|
|
976
|
+
value: [{
|
|
977
|
+
type: i0.Input,
|
|
978
|
+
args: [{
|
|
979
|
+
isSignal: true,
|
|
980
|
+
alias: "value",
|
|
981
|
+
required: false
|
|
982
|
+
}]
|
|
983
|
+
}, {
|
|
984
|
+
type: i0.Output,
|
|
985
|
+
args: ["valueChange"]
|
|
986
|
+
}],
|
|
987
|
+
timepicker: [{
|
|
988
|
+
type: i0.Input,
|
|
989
|
+
args: [{
|
|
990
|
+
isSignal: true,
|
|
991
|
+
alias: "matTimepicker",
|
|
992
|
+
required: true
|
|
993
|
+
}]
|
|
994
|
+
}],
|
|
995
|
+
min: [{
|
|
996
|
+
type: i0.Input,
|
|
997
|
+
args: [{
|
|
998
|
+
isSignal: true,
|
|
999
|
+
alias: "matTimepickerMin",
|
|
1000
|
+
required: false
|
|
1001
|
+
}]
|
|
1002
|
+
}],
|
|
1003
|
+
max: [{
|
|
1004
|
+
type: i0.Input,
|
|
1005
|
+
args: [{
|
|
1006
|
+
isSignal: true,
|
|
1007
|
+
alias: "matTimepickerMax",
|
|
1008
|
+
required: false
|
|
1009
|
+
}]
|
|
1010
|
+
}],
|
|
1011
|
+
openOnClick: [{
|
|
1012
|
+
type: i0.Input,
|
|
1013
|
+
args: [{
|
|
1014
|
+
isSignal: true,
|
|
1015
|
+
alias: "matTimepickerOpenOnClick",
|
|
1016
|
+
required: false
|
|
1017
|
+
}]
|
|
1018
|
+
}],
|
|
1019
|
+
disabledInput: [{
|
|
1020
|
+
type: i0.Input,
|
|
1021
|
+
args: [{
|
|
1022
|
+
isSignal: true,
|
|
1023
|
+
alias: "disabled",
|
|
1024
|
+
required: false
|
|
1025
|
+
}]
|
|
1026
|
+
}]
|
|
1027
|
+
}
|
|
1028
|
+
});
|
|
1029
|
+
|
|
1030
|
+
class MatTimepickerToggle {
|
|
1031
|
+
_defaultConfig = inject(MAT_TIMEPICKER_CONFIG, {
|
|
1032
|
+
optional: true
|
|
1033
|
+
});
|
|
1034
|
+
_defaultTabIndex = (() => {
|
|
1035
|
+
const value = inject(new HostAttributeToken('tabindex'), {
|
|
1036
|
+
optional: true
|
|
1037
|
+
});
|
|
1038
|
+
const parsed = Number(value);
|
|
1039
|
+
return isNaN(parsed) ? null : parsed;
|
|
1040
|
+
})();
|
|
1041
|
+
_isDisabled = computed(() => {
|
|
1042
|
+
const timepicker = this.timepicker();
|
|
1043
|
+
return this.disabled() || timepicker.disabled();
|
|
1044
|
+
}, ...(ngDevMode ? [{
|
|
1045
|
+
debugName: "_isDisabled"
|
|
1046
|
+
}] : []));
|
|
1047
|
+
timepicker = input.required({
|
|
1048
|
+
...(ngDevMode ? {
|
|
1049
|
+
debugName: "timepicker"
|
|
1050
|
+
} : {}),
|
|
1051
|
+
alias: 'for'
|
|
1052
|
+
});
|
|
1053
|
+
ariaLabel = input(undefined, {
|
|
1054
|
+
...(ngDevMode ? {
|
|
1055
|
+
debugName: "ariaLabel"
|
|
1056
|
+
} : {}),
|
|
1057
|
+
alias: 'aria-label'
|
|
1058
|
+
});
|
|
1059
|
+
ariaLabelledby = input(undefined, {
|
|
1060
|
+
...(ngDevMode ? {
|
|
1061
|
+
debugName: "ariaLabelledby"
|
|
1062
|
+
} : {}),
|
|
1063
|
+
alias: 'aria-labelledby'
|
|
1064
|
+
});
|
|
1065
|
+
_defaultAriaLabel = 'Open timepicker options';
|
|
1066
|
+
disabled = input(false, {
|
|
1067
|
+
...(ngDevMode ? {
|
|
1068
|
+
debugName: "disabled"
|
|
1069
|
+
} : {}),
|
|
1070
|
+
transform: booleanAttribute,
|
|
1071
|
+
alias: 'disabled'
|
|
1072
|
+
});
|
|
1073
|
+
tabIndex = input(this._defaultTabIndex, ...(ngDevMode ? [{
|
|
1074
|
+
debugName: "tabIndex"
|
|
1075
|
+
}] : []));
|
|
1076
|
+
disableRipple = input(this._defaultConfig?.disableRipple ?? false, {
|
|
1077
|
+
...(ngDevMode ? {
|
|
1078
|
+
debugName: "disableRipple"
|
|
1079
|
+
} : {}),
|
|
1080
|
+
transform: booleanAttribute
|
|
1081
|
+
});
|
|
1082
|
+
_open(event) {
|
|
1083
|
+
if (this.timepicker() && !this._isDisabled()) {
|
|
1084
|
+
this.timepicker().open();
|
|
1085
|
+
event.stopPropagation();
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
getAriaLabel() {
|
|
1089
|
+
return this.ariaLabelledby() ? null : this.ariaLabel() || this._defaultAriaLabel;
|
|
1090
|
+
}
|
|
1091
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1092
|
+
minVersion: "12.0.0",
|
|
1093
|
+
version: "22.0.0-next.1",
|
|
1094
|
+
ngImport: i0,
|
|
1095
|
+
type: MatTimepickerToggle,
|
|
1096
|
+
deps: [],
|
|
1097
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1098
|
+
});
|
|
1099
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1100
|
+
minVersion: "17.1.0",
|
|
1101
|
+
version: "22.0.0-next.1",
|
|
1102
|
+
type: MatTimepickerToggle,
|
|
1103
|
+
isStandalone: true,
|
|
1104
|
+
selector: "mat-timepicker-toggle",
|
|
1105
|
+
inputs: {
|
|
1106
|
+
timepicker: {
|
|
1107
|
+
classPropertyName: "timepicker",
|
|
1108
|
+
publicName: "for",
|
|
1109
|
+
isSignal: true,
|
|
1110
|
+
isRequired: true,
|
|
1111
|
+
transformFunction: null
|
|
1112
|
+
},
|
|
1113
|
+
ariaLabel: {
|
|
1114
|
+
classPropertyName: "ariaLabel",
|
|
1115
|
+
publicName: "aria-label",
|
|
1116
|
+
isSignal: true,
|
|
1117
|
+
isRequired: false,
|
|
1118
|
+
transformFunction: null
|
|
1119
|
+
},
|
|
1120
|
+
ariaLabelledby: {
|
|
1121
|
+
classPropertyName: "ariaLabelledby",
|
|
1122
|
+
publicName: "aria-labelledby",
|
|
1123
|
+
isSignal: true,
|
|
1124
|
+
isRequired: false,
|
|
1125
|
+
transformFunction: null
|
|
1126
|
+
},
|
|
1127
|
+
disabled: {
|
|
1128
|
+
classPropertyName: "disabled",
|
|
1129
|
+
publicName: "disabled",
|
|
1130
|
+
isSignal: true,
|
|
1131
|
+
isRequired: false,
|
|
1132
|
+
transformFunction: null
|
|
1133
|
+
},
|
|
1134
|
+
tabIndex: {
|
|
1135
|
+
classPropertyName: "tabIndex",
|
|
1136
|
+
publicName: "tabIndex",
|
|
1137
|
+
isSignal: true,
|
|
1138
|
+
isRequired: false,
|
|
1139
|
+
transformFunction: null
|
|
1140
|
+
},
|
|
1141
|
+
disableRipple: {
|
|
1142
|
+
classPropertyName: "disableRipple",
|
|
1143
|
+
publicName: "disableRipple",
|
|
1144
|
+
isSignal: true,
|
|
1145
|
+
isRequired: false,
|
|
1146
|
+
transformFunction: null
|
|
1147
|
+
}
|
|
1148
|
+
},
|
|
1149
|
+
host: {
|
|
1150
|
+
listeners: {
|
|
1151
|
+
"click": "_open($event)"
|
|
1152
|
+
},
|
|
1153
|
+
properties: {
|
|
1154
|
+
"attr.tabindex": "null"
|
|
1155
|
+
},
|
|
1156
|
+
classAttribute: "mat-timepicker-toggle"
|
|
1157
|
+
},
|
|
1158
|
+
exportAs: ["matTimepickerToggle"],
|
|
1159
|
+
ngImport: i0,
|
|
1160
|
+
template: "<button\n matIconButton\n type=\"button\"\n aria-haspopup=\"listbox\"\n [attr.aria-label]=\"getAriaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-expanded]=\"timepicker().isOpen()\"\n [tabIndex]=\"_isDisabled() ? -1 : tabIndex()\"\n [disabled]=\"_isDisabled()\"\n [disableRipple]=\"disableRipple()\">\n\n <ng-content select=\"[matTimepickerToggleIcon]\">\n <svg\n class=\"mat-timepicker-toggle-default-icon\"\n height=\"24px\"\n width=\"24px\"\n viewBox=\"0 -960 960 960\"\n fill=\"currentColor\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"m612-292 56-56-148-148v-184h-80v216l172 172ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 320q133 0 226.5-93.5T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160Z\"/>\n </svg>\n </ng-content>\n</button>\n",
|
|
1161
|
+
dependencies: [{
|
|
1162
|
+
kind: "component",
|
|
1163
|
+
type: MatIconButton,
|
|
1164
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
1165
|
+
exportAs: ["matButton", "matAnchor"]
|
|
1166
|
+
}],
|
|
1167
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1168
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1169
|
+
});
|
|
1170
|
+
}
|
|
1171
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1172
|
+
minVersion: "12.0.0",
|
|
1173
|
+
version: "22.0.0-next.1",
|
|
1174
|
+
ngImport: i0,
|
|
1175
|
+
type: MatTimepickerToggle,
|
|
1176
|
+
decorators: [{
|
|
1177
|
+
type: Component,
|
|
1178
|
+
args: [{
|
|
1179
|
+
selector: 'mat-timepicker-toggle',
|
|
1180
|
+
host: {
|
|
1181
|
+
'class': 'mat-timepicker-toggle',
|
|
1182
|
+
'[attr.tabindex]': 'null',
|
|
1183
|
+
'(click)': '_open($event)'
|
|
1184
|
+
},
|
|
1185
|
+
exportAs: 'matTimepickerToggle',
|
|
1186
|
+
encapsulation: ViewEncapsulation.None,
|
|
1187
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1188
|
+
imports: [MatIconButton],
|
|
1189
|
+
template: "<button\n matIconButton\n type=\"button\"\n aria-haspopup=\"listbox\"\n [attr.aria-label]=\"getAriaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-expanded]=\"timepicker().isOpen()\"\n [tabIndex]=\"_isDisabled() ? -1 : tabIndex()\"\n [disabled]=\"_isDisabled()\"\n [disableRipple]=\"disableRipple()\">\n\n <ng-content select=\"[matTimepickerToggleIcon]\">\n <svg\n class=\"mat-timepicker-toggle-default-icon\"\n height=\"24px\"\n width=\"24px\"\n viewBox=\"0 -960 960 960\"\n fill=\"currentColor\"\n focusable=\"false\"\n aria-hidden=\"true\">\n <path d=\"m612-292 56-56-148-148v-184h-80v216l172 172ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 320q133 0 226.5-93.5T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160Z\"/>\n </svg>\n </ng-content>\n</button>\n"
|
|
1190
|
+
}]
|
|
1191
|
+
}],
|
|
1192
|
+
propDecorators: {
|
|
1193
|
+
timepicker: [{
|
|
1194
|
+
type: i0.Input,
|
|
1195
|
+
args: [{
|
|
1196
|
+
isSignal: true,
|
|
1197
|
+
alias: "for",
|
|
1198
|
+
required: true
|
|
1199
|
+
}]
|
|
1200
|
+
}],
|
|
1201
|
+
ariaLabel: [{
|
|
1202
|
+
type: i0.Input,
|
|
1203
|
+
args: [{
|
|
1204
|
+
isSignal: true,
|
|
1205
|
+
alias: "aria-label",
|
|
1206
|
+
required: false
|
|
1207
|
+
}]
|
|
1208
|
+
}],
|
|
1209
|
+
ariaLabelledby: [{
|
|
1210
|
+
type: i0.Input,
|
|
1211
|
+
args: [{
|
|
1212
|
+
isSignal: true,
|
|
1213
|
+
alias: "aria-labelledby",
|
|
1214
|
+
required: false
|
|
1215
|
+
}]
|
|
1216
|
+
}],
|
|
1217
|
+
disabled: [{
|
|
1218
|
+
type: i0.Input,
|
|
1219
|
+
args: [{
|
|
1220
|
+
isSignal: true,
|
|
1221
|
+
alias: "disabled",
|
|
1222
|
+
required: false
|
|
1223
|
+
}]
|
|
1224
|
+
}],
|
|
1225
|
+
tabIndex: [{
|
|
1226
|
+
type: i0.Input,
|
|
1227
|
+
args: [{
|
|
1228
|
+
isSignal: true,
|
|
1229
|
+
alias: "tabIndex",
|
|
1230
|
+
required: false
|
|
1231
|
+
}]
|
|
1232
|
+
}],
|
|
1233
|
+
disableRipple: [{
|
|
1234
|
+
type: i0.Input,
|
|
1235
|
+
args: [{
|
|
1236
|
+
isSignal: true,
|
|
1237
|
+
alias: "disableRipple",
|
|
1238
|
+
required: false
|
|
1239
|
+
}]
|
|
1240
|
+
}]
|
|
1241
|
+
}
|
|
1242
|
+
});
|
|
1243
|
+
|
|
1244
|
+
class MatTimepickerModule {
|
|
1245
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1246
|
+
minVersion: "12.0.0",
|
|
1247
|
+
version: "22.0.0-next.1",
|
|
1248
|
+
ngImport: i0,
|
|
1249
|
+
type: MatTimepickerModule,
|
|
1250
|
+
deps: [],
|
|
1251
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
1252
|
+
});
|
|
1253
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
1254
|
+
minVersion: "14.0.0",
|
|
1255
|
+
version: "22.0.0-next.1",
|
|
1256
|
+
ngImport: i0,
|
|
1257
|
+
type: MatTimepickerModule,
|
|
1258
|
+
imports: [MatTimepicker, MatTimepickerInput, MatTimepickerToggle],
|
|
1259
|
+
exports: [CdkScrollableModule, MatTimepicker, MatTimepickerInput, MatTimepickerToggle]
|
|
1260
|
+
});
|
|
1261
|
+
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
1262
|
+
minVersion: "12.0.0",
|
|
1263
|
+
version: "22.0.0-next.1",
|
|
1264
|
+
ngImport: i0,
|
|
1265
|
+
type: MatTimepickerModule,
|
|
1266
|
+
imports: [MatTimepicker, MatTimepickerToggle, CdkScrollableModule]
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1270
|
+
minVersion: "12.0.0",
|
|
1271
|
+
version: "22.0.0-next.1",
|
|
1272
|
+
ngImport: i0,
|
|
1273
|
+
type: MatTimepickerModule,
|
|
1274
|
+
decorators: [{
|
|
1275
|
+
type: NgModule,
|
|
1276
|
+
args: [{
|
|
1277
|
+
imports: [MatTimepicker, MatTimepickerInput, MatTimepickerToggle],
|
|
1278
|
+
exports: [CdkScrollableModule, MatTimepicker, MatTimepickerInput, MatTimepickerToggle]
|
|
1279
|
+
}]
|
|
1280
|
+
}]
|
|
1281
|
+
});
|
|
1282
|
+
|
|
1283
|
+
export { MAT_TIMEPICKER_CONFIG, MAT_TIMEPICKER_SCROLL_STRATEGY, MatTimepicker, MatTimepickerInput, MatTimepickerModule, MatTimepickerToggle };
|
|
1284
|
+
//# sourceMappingURL=timepicker.mjs.map
|