@angular/material 11.0.4 → 11.1.2
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/_theming.scss +354 -337
- package/autocomplete/_autocomplete-theme.scss +4 -5
- package/autocomplete/autocomplete.d.ts +7 -1
- package/autocomplete/index.metadata.json +1 -1
- package/autocomplete/testing/autocomplete-harness.d.ts +29 -15
- package/badge/_badge-theme.scss +2 -3
- package/bottom-sheet/_bottom-sheet-theme.scss +4 -5
- package/bundles/material-autocomplete-testing.umd.js +54 -36
- package/bundles/material-autocomplete-testing.umd.js.map +1 -1
- package/bundles/material-autocomplete-testing.umd.min.js +2 -2
- package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
- package/bundles/material-autocomplete.umd.js +31 -9
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +3 -3
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-badge-testing.umd.js +9 -1
- package/bundles/material-badge-testing.umd.js.map +1 -1
- package/bundles/material-badge-testing.umd.min.js +1 -1
- package/bundles/material-badge-testing.umd.min.js.map +1 -1
- package/bundles/material-badge.umd.js +9 -1
- package/bundles/material-badge.umd.js.map +1 -1
- package/bundles/material-badge.umd.min.js +3 -3
- package/bundles/material-badge.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.js +9 -1
- package/bundles/material-bottom-sheet-testing.umd.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.js +9 -1
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.min.js +1 -1
- package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
- package/bundles/material-button-testing.umd.js +9 -1
- package/bundles/material-button-testing.umd.js.map +1 -1
- package/bundles/material-button-testing.umd.min.js +1 -1
- package/bundles/material-button-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.js +9 -1
- package/bundles/material-button-toggle-testing.umd.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.min.js +1 -1
- package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +9 -1
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.min.js +1 -1
- package/bundles/material-button-toggle.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +17 -5
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +1 -1
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card-testing.umd.js +9 -1
- package/bundles/material-card-testing.umd.js.map +1 -1
- package/bundles/material-card-testing.umd.min.js +1 -1
- package/bundles/material-card-testing.umd.min.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.js +73 -64
- package/bundles/material-checkbox-testing.umd.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.min.js +2 -2
- package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js +15 -3
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-checkbox.umd.min.js +2 -2
- package/bundles/material-checkbox.umd.min.js.map +1 -1
- package/bundles/material-chips-testing.umd.js +189 -29
- package/bundles/material-chips-testing.umd.js.map +1 -1
- package/bundles/material-chips-testing.umd.min.js +2 -2
- package/bundles/material-chips-testing.umd.min.js.map +1 -1
- package/bundles/material-chips.umd.js +9 -1
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-chips.umd.min.js +4 -4
- package/bundles/material-chips.umd.min.js.map +1 -1
- package/bundles/material-core-testing.umd.js +14 -3
- package/bundles/material-core-testing.umd.js.map +1 -1
- package/bundles/material-core-testing.umd.min.js +1 -1
- package/bundles/material-core-testing.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +55 -14
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +16 -8
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker-testing.umd.js +24 -12
- package/bundles/material-datepicker-testing.umd.js.map +1 -1
- package/bundles/material-datepicker-testing.umd.min.js +1 -1
- package/bundles/material-datepicker-testing.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +250 -80
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +20 -12
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-dialog-testing.umd.js +9 -1
- package/bundles/material-dialog-testing.umd.js.map +1 -1
- package/bundles/material-dialog-testing.umd.min.js +1 -1
- package/bundles/material-dialog-testing.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +10 -2
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js +8 -8
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-divider-testing.umd.js +9 -1
- package/bundles/material-divider-testing.umd.js.map +1 -1
- package/bundles/material-divider-testing.umd.min.js +2 -2
- package/bundles/material-divider-testing.umd.min.js.map +1 -1
- package/bundles/material-expansion-testing.umd.js +9 -1
- package/bundles/material-expansion-testing.umd.js.map +1 -1
- package/bundles/material-expansion-testing.umd.min.js +1 -1
- package/bundles/material-expansion-testing.umd.min.js.map +1 -1
- package/bundles/material-expansion.umd.js +16 -4
- package/bundles/material-expansion.umd.js.map +1 -1
- package/bundles/material-expansion.umd.min.js +6 -6
- package/bundles/material-expansion.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing-control.umd.js +9 -1
- package/bundles/material-form-field-testing-control.umd.js.map +1 -1
- package/bundles/material-form-field-testing-control.umd.min.js +1 -1
- package/bundles/material-form-field-testing-control.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing.umd.js +41 -30
- package/bundles/material-form-field-testing.umd.js.map +1 -1
- package/bundles/material-form-field-testing.umd.min.js +3 -3
- package/bundles/material-form-field-testing.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +11 -3
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +2 -2
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.js +15 -5
- package/bundles/material-grid-list-testing.umd.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.min.js +2 -2
- package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
- package/bundles/material-grid-list.umd.js +156 -146
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +12 -19
- package/bundles/material-grid-list.umd.min.js.map +1 -1
- package/bundles/material-icon-testing.umd.js +12 -2
- package/bundles/material-icon-testing.umd.js.map +1 -1
- package/bundles/material-icon-testing.umd.min.js +2 -2
- package/bundles/material-icon-testing.umd.min.js.map +1 -1
- package/bundles/material-icon.umd.js +46 -2
- package/bundles/material-icon.umd.js.map +1 -1
- package/bundles/material-icon.umd.min.js +3 -3
- package/bundles/material-icon.umd.min.js.map +1 -1
- package/bundles/material-input-testing.umd.js +19 -8
- package/bundles/material-input-testing.umd.js.map +1 -1
- package/bundles/material-input-testing.umd.min.js +1 -1
- package/bundles/material-input-testing.umd.min.js.map +1 -1
- package/bundles/material-input.umd.js +9 -1
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-input.umd.min.js +1 -1
- package/bundles/material-input.umd.min.js.map +1 -1
- package/bundles/material-list-testing.umd.js +62 -57
- package/bundles/material-list-testing.umd.js.map +1 -1
- package/bundles/material-list-testing.umd.min.js +1 -1
- package/bundles/material-list-testing.umd.min.js.map +1 -1
- package/bundles/material-list.umd.js +9 -1
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +1 -1
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu-testing.umd.js +94 -67
- package/bundles/material-menu-testing.umd.js.map +1 -1
- package/bundles/material-menu-testing.umd.min.js +2 -2
- package/bundles/material-menu-testing.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +24 -28
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +3 -3
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-paginator-testing.umd.js +50 -34
- package/bundles/material-paginator-testing.umd.js.map +1 -1
- package/bundles/material-paginator-testing.umd.min.js +2 -2
- package/bundles/material-paginator-testing.umd.min.js.map +1 -1
- package/bundles/material-paginator.umd.js +9 -1
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-paginator.umd.min.js +1 -1
- package/bundles/material-paginator.umd.min.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.js +9 -1
- package/bundles/material-progress-bar-testing.umd.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-bar.umd.js +9 -1
- package/bundles/material-progress-bar.umd.js.map +1 -1
- package/bundles/material-progress-bar.umd.min.js +1 -1
- package/bundles/material-progress-bar.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.js +9 -1
- package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.min.js +1 -1
- package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +9 -1
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.min.js +2 -2
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio-testing.umd.js +88 -63
- package/bundles/material-radio-testing.umd.js.map +1 -1
- package/bundles/material-radio-testing.umd.min.js +2 -2
- package/bundles/material-radio-testing.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +18 -5
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +1 -1
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select-testing.umd.js +73 -51
- package/bundles/material-select-testing.umd.js.map +1 -1
- package/bundles/material-select-testing.umd.min.js +2 -2
- package/bundles/material-select-testing.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +14 -3
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +5 -5
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.js +175 -28
- package/bundles/material-sidenav-testing.umd.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.min.js +2 -2
- package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
- package/bundles/material-sidenav.umd.js +9 -1
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.min.js +1 -1
- package/bundles/material-sidenav.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.js +9 -1
- package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.min.js +1 -1
- package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js +16 -3
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slide-toggle.umd.min.js +3 -3
- package/bundles/material-slide-toggle.umd.min.js.map +1 -1
- package/bundles/material-slider-testing.umd.js +15 -4
- package/bundles/material-slider-testing.umd.js.map +1 -1
- package/bundles/material-slider-testing.umd.min.js +2 -2
- package/bundles/material-slider-testing.umd.min.js.map +1 -1
- package/bundles/material-slider.umd.js +9 -1
- package/bundles/material-slider.umd.js.map +1 -1
- package/bundles/material-slider.umd.min.js +1 -1
- package/bundles/material-slider.umd.min.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.js +29 -12
- package/bundles/material-snack-bar-testing.umd.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.min.js +2 -2
- package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +20 -2
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +1 -1
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-sort-testing.umd.js +9 -1
- package/bundles/material-sort-testing.umd.js.map +1 -1
- package/bundles/material-sort-testing.umd.min.js +1 -1
- package/bundles/material-sort-testing.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +9 -1
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +3 -3
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-stepper-testing.umd.js +9 -1
- package/bundles/material-stepper-testing.umd.js.map +1 -1
- package/bundles/material-stepper-testing.umd.min.js +2 -2
- package/bundles/material-stepper-testing.umd.min.js.map +1 -1
- package/bundles/material-stepper.umd.js +16 -3
- package/bundles/material-stepper.umd.js.map +1 -1
- package/bundles/material-stepper.umd.min.js +3 -3
- package/bundles/material-stepper.umd.min.js.map +1 -1
- package/bundles/material-table-testing.umd.js +26 -17
- package/bundles/material-table-testing.umd.js.map +1 -1
- package/bundles/material-table-testing.umd.min.js +2 -2
- package/bundles/material-table-testing.umd.min.js.map +1 -1
- package/bundles/material-table.umd.js +65 -38
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-table.umd.min.js +3 -3
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs-testing.umd.js +11 -3
- package/bundles/material-tabs-testing.umd.js.map +1 -1
- package/bundles/material-tabs-testing.umd.min.js +1 -1
- package/bundles/material-tabs-testing.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +10 -2
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +5 -5
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.js +11 -2
- package/bundles/material-toolbar-testing.umd.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.min.js +2 -2
- package/bundles/material-toolbar-testing.umd.min.js.map +1 -1
- package/bundles/material-toolbar.umd.js +9 -1
- package/bundles/material-toolbar.umd.js.map +1 -1
- package/bundles/material-toolbar.umd.min.js +2 -2
- package/bundles/material-toolbar.umd.min.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.js +9 -1
- package/bundles/material-tooltip-testing.umd.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.min.js +1 -1
- package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +35 -7
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js +3 -3
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree-testing.umd.js +10 -2
- package/bundles/material-tree-testing.umd.js.map +1 -1
- package/bundles/material-tree-testing.umd.min.js +1 -1
- package/bundles/material-tree-testing.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js +9 -1
- package/bundles/material-tree.umd.js.map +1 -1
- package/bundles/material-tree.umd.min.js +3 -3
- package/bundles/material-tree.umd.min.js.map +1 -1
- package/button/_button-base.scss +2 -2
- package/button/_button-theme.scss +10 -11
- package/button/index.metadata.json +1 -1
- package/button-toggle/_button-toggle-theme.scss +9 -10
- package/card/_card-theme.scss +5 -6
- package/checkbox/_checkbox-theme.scss +2 -3
- package/checkbox/testing/checkbox-harness.d.ts +21 -16
- package/chips/_chips-theme.scss +4 -5
- package/chips/testing/chip-harness-filters.d.ts +11 -3
- package/chips/testing/chip-harness.d.ts +5 -5
- package/chips/testing/chip-list-harness.d.ts +15 -12
- package/chips/testing/chip-listbox-harness.d.ts +34 -0
- package/chips/testing/chip-option-harness.d.ts +29 -0
- package/chips/testing/public-api.d.ts +3 -1
- package/core/_core.scss +6 -6
- package/core/color/_all-color.scss +2 -1
- package/core/datetime/date-formats.d.ts +1 -0
- package/core/density/private/_all-density.scss +34 -0
- package/core/density/{_index.scss → private/_compatibility.scss} +11 -8
- package/core/focus-indicators/_focus-indicators.scss +3 -4
- package/core/index.metadata.json +1 -1
- package/core/option/_optgroup-theme.scss +2 -3
- package/core/option/_option-theme.scss +2 -3
- package/core/option/index.d.ts +1 -0
- package/core/option/optgroup.d.ts +4 -0
- package/core/option/option-parent.d.ts +22 -0
- package/core/option/option.d.ts +2 -14
- package/core/ripple/_ripple.scss +2 -3
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +2 -3
- package/core/style/_elevation.scss +2 -18
- package/core/style/_form-common.scss +2 -2
- package/core/style/_private.scss +40 -0
- package/core/testing/option-harness.d.ts +2 -0
- package/core/theming/_all-theme.scss +3 -2
- package/core/theming/_theming.scss +148 -38
- package/core/typography/_all-typography.scss +1 -1
- package/datepicker/_datepicker-theme.scss +5 -6
- package/datepicker/date-range-input-parts.d.ts +2 -3
- package/datepicker/date-range-input.d.ts +5 -4
- package/datepicker/date-selection-model.d.ts +10 -0
- package/datepicker/datepicker-actions.d.ts +33 -0
- package/datepicker/datepicker-base.d.ts +52 -9
- package/datepicker/datepicker-input-base.d.ts +5 -10
- package/datepicker/datepicker-input.d.ts +9 -8
- package/datepicker/datepicker-toggle.d.ts +4 -2
- package/datepicker/index.metadata.json +1 -1
- package/datepicker/public-api.d.ts +1 -0
- package/dialog/_dialog-theme.scss +4 -5
- package/divider/_divider-theme.scss +2 -3
- package/esm2015/autocomplete/autocomplete-trigger.js +10 -2
- package/esm2015/autocomplete/autocomplete.js +11 -4
- package/esm2015/autocomplete/testing/autocomplete-harness.js +27 -19
- package/esm2015/button/button.js +10 -5
- package/esm2015/checkbox/checkbox.js +8 -3
- package/esm2015/checkbox/testing/checkbox-harness.js +31 -36
- package/esm2015/chips/testing/chip-harness-filters.js +1 -1
- package/esm2015/chips/testing/chip-harness.js +6 -6
- package/esm2015/chips/testing/chip-list-harness.js +19 -16
- package/esm2015/chips/testing/chip-listbox-harness.js +49 -0
- package/esm2015/chips/testing/chip-option-harness.js +54 -0
- package/esm2015/chips/testing/public-api.js +4 -2
- package/esm2015/core/common-behaviors/common-module.js +1 -1
- package/esm2015/core/datetime/date-formats.js +1 -1
- package/esm2015/core/option/index.js +2 -1
- package/esm2015/core/option/optgroup.js +32 -7
- package/esm2015/core/option/option-parent.js +13 -0
- package/esm2015/core/option/option.js +5 -8
- package/esm2015/core/testing/option-harness.js +7 -2
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/date-range-input-parts.js +10 -14
- package/esm2015/datepicker/date-range-input.js +11 -4
- package/esm2015/datepicker/date-range-picker.js +3 -2
- package/esm2015/datepicker/date-selection-model.js +24 -1
- package/esm2015/datepicker/datepicker-actions.js +89 -0
- package/esm2015/datepicker/datepicker-base.js +66 -25
- package/esm2015/datepicker/datepicker-input-base.js +15 -27
- package/esm2015/datepicker/datepicker-input.js +11 -5
- package/esm2015/datepicker/datepicker-module.js +8 -1
- package/esm2015/datepicker/datepicker-toggle.js +7 -10
- package/esm2015/datepicker/datepicker.js +5 -2
- package/esm2015/datepicker/month-view.js +6 -3
- package/esm2015/datepicker/public-api.js +2 -1
- package/esm2015/datepicker/testing/date-range-input-harness.js +4 -4
- package/esm2015/datepicker/testing/datepicker-input-harness.js +3 -3
- package/esm2015/datepicker/testing/datepicker-trigger-harness-base.js +3 -3
- package/esm2015/dialog/dialog-ref.js +2 -2
- package/esm2015/expansion/expansion-panel-header.js +9 -4
- package/esm2015/expansion/expansion-panel.js +1 -1
- package/esm2015/form-field/form-field-animations.js +2 -2
- package/esm2015/form-field/form-field.js +2 -2
- package/esm2015/form-field/testing/form-field-harness.js +14 -9
- package/esm2015/grid-list/public-api.js +3 -2
- package/esm2015/grid-list/testing/grid-list-harness.js +6 -5
- package/esm2015/icon/icon-registry.js +39 -3
- package/esm2015/icon/testing/fake-icon-registry.js +4 -2
- package/esm2015/input/testing/input-harness.js +3 -3
- package/esm2015/input/testing/native-select-harness.js +7 -5
- package/esm2015/list/selection-list.js +1 -1
- package/esm2015/list/testing/list-harness-base.js +5 -4
- package/esm2015/list/testing/list-item-harness-base.js +5 -4
- package/esm2015/list/testing/selection-list-harness.js +8 -5
- package/esm2015/menu/menu-item.js +3 -3
- package/esm2015/menu/menu-trigger.js +15 -25
- package/esm2015/menu/menu.js +2 -2
- package/esm2015/menu/testing/menu-harness.js +44 -32
- package/esm2015/paginator/testing/paginator-harness.js +27 -25
- package/esm2015/radio/radio.js +10 -5
- package/esm2015/radio/testing/radio-harness.js +40 -29
- package/esm2015/select/select.js +6 -3
- package/esm2015/select/testing/select-harness.js +36 -28
- package/esm2015/sidenav/testing/drawer-container-harness.js +41 -0
- package/esm2015/sidenav/testing/drawer-content-harness.js +23 -0
- package/esm2015/sidenav/testing/drawer-harness-filters.js +1 -1
- package/esm2015/sidenav/testing/drawer-harness.js +19 -13
- package/esm2015/sidenav/testing/public-api.js +6 -2
- package/esm2015/sidenav/testing/sidenav-container-harness.js +41 -0
- package/esm2015/sidenav/testing/sidenav-content-harness.js +23 -0
- package/esm2015/sidenav/testing/sidenav-harness.js +4 -4
- package/esm2015/slide-toggle/slide-toggle.js +8 -3
- package/esm2015/slider/testing/slider-harness.js +5 -5
- package/esm2015/snack-bar/snack-bar-container.js +12 -2
- package/esm2015/snack-bar/testing/snack-bar-harness.js +19 -12
- package/esm2015/stepper/step-header.js +8 -3
- package/esm2015/table/table-data-source.js +34 -21
- package/esm2015/table/testing/cell-harness.js +3 -3
- package/esm2015/table/testing/row-harness.js +5 -5
- package/esm2015/table/testing/table-harness.js +8 -8
- package/esm2015/tabs/tab-body.js +3 -3
- package/esm2015/tabs/testing/tab-group-harness.js +3 -3
- package/esm2015/tabs/testing/tab-nav-bar-harness.js +3 -3
- package/esm2015/toolbar/testing/toolbar-harness.js +3 -3
- package/esm2015/tooltip/tooltip.js +28 -7
- package/esm2015/tree/testing/tree-harness.js +2 -2
- package/expansion/_expansion-mixins.scss +11 -0
- package/expansion/_expansion-theme.scss +13 -19
- package/expansion/index.metadata.json +1 -1
- package/fesm2015/autocomplete/testing.js +26 -18
- package/fesm2015/autocomplete/testing.js.map +1 -1
- package/fesm2015/autocomplete.js +19 -5
- package/fesm2015/autocomplete.js.map +1 -1
- package/fesm2015/button.js +9 -4
- package/fesm2015/button.js.map +1 -1
- package/fesm2015/checkbox/testing.js +30 -35
- package/fesm2015/checkbox/testing.js.map +1 -1
- package/fesm2015/checkbox.js +7 -2
- package/fesm2015/checkbox.js.map +1 -1
- package/fesm2015/chips/testing.js +120 -21
- package/fesm2015/chips/testing.js.map +1 -1
- package/fesm2015/core/testing.js +6 -1
- package/fesm2015/core/testing.js.map +1 -1
- package/fesm2015/core.js +45 -13
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker/testing.js +5 -5
- package/fesm2015/datepicker/testing.js.map +1 -1
- package/fesm2015/datepicker.js +275 -116
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/dialog.js +1 -1
- package/fesm2015/dialog.js.map +1 -1
- package/fesm2015/expansion.js +8 -3
- package/fesm2015/expansion.js.map +1 -1
- package/fesm2015/form-field/testing.js +13 -8
- package/fesm2015/form-field/testing.js.map +1 -1
- package/fesm2015/form-field.js +2 -2
- package/fesm2015/form-field.js.map +1 -1
- package/fesm2015/grid-list/testing.js +5 -4
- package/fesm2015/grid-list/testing.js.map +1 -1
- package/fesm2015/grid-list.js +128 -126
- package/fesm2015/grid-list.js.map +1 -1
- package/fesm2015/icon/testing.js +3 -1
- package/fesm2015/icon/testing.js.map +1 -1
- package/fesm2015/icon.js +38 -2
- package/fesm2015/icon.js.map +1 -1
- package/fesm2015/input/testing.js +7 -5
- package/fesm2015/input/testing.js.map +1 -1
- package/fesm2015/list/testing.js +13 -8
- package/fesm2015/list/testing.js.map +1 -1
- package/fesm2015/list.js.map +1 -1
- package/fesm2015/menu/testing.js +45 -33
- package/fesm2015/menu/testing.js.map +1 -1
- package/fesm2015/menu.js +17 -27
- package/fesm2015/menu.js.map +1 -1
- package/fesm2015/paginator/testing.js +26 -24
- package/fesm2015/paginator/testing.js.map +1 -1
- package/fesm2015/paginator.js.map +1 -1
- package/fesm2015/progress-spinner.js.map +1 -1
- package/fesm2015/radio/testing.js +39 -28
- package/fesm2015/radio/testing.js.map +1 -1
- package/fesm2015/radio.js +9 -4
- package/fesm2015/radio.js.map +1 -1
- package/fesm2015/select/testing.js +36 -28
- package/fesm2015/select/testing.js.map +1 -1
- package/fesm2015/select.js +5 -2
- package/fesm2015/select.js.map +1 -1
- package/fesm2015/sidenav/testing.js +139 -15
- package/fesm2015/sidenav/testing.js.map +1 -1
- package/fesm2015/sidenav.js.map +1 -1
- package/fesm2015/slide-toggle.js +7 -2
- package/fesm2015/slide-toggle.js.map +1 -1
- package/fesm2015/slider/testing.js +4 -4
- package/fesm2015/slider/testing.js.map +1 -1
- package/fesm2015/snack-bar/testing.js +18 -11
- package/fesm2015/snack-bar/testing.js.map +1 -1
- package/fesm2015/snack-bar.js +11 -1
- package/fesm2015/snack-bar.js.map +1 -1
- package/fesm2015/stepper.js +7 -2
- package/fesm2015/stepper.js.map +1 -1
- package/fesm2015/table/testing.js +11 -11
- package/fesm2015/table/testing.js.map +1 -1
- package/fesm2015/table.js +34 -21
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/tabs/testing.js +3 -3
- package/fesm2015/tabs/testing.js.map +1 -1
- package/fesm2015/tabs.js +2 -2
- package/fesm2015/tabs.js.map +1 -1
- package/fesm2015/toolbar/testing.js +2 -2
- package/fesm2015/toolbar/testing.js.map +1 -1
- package/fesm2015/tooltip.js +27 -7
- package/fesm2015/tooltip.js.map +1 -1
- package/fesm2015/tree/testing.js +1 -1
- package/fesm2015/tree/testing.js.map +1 -1
- package/form-field/_form-field-fill-theme.scss +4 -5
- package/form-field/_form-field-legacy-theme.scss +5 -6
- package/form-field/_form-field-outline-theme.scss +4 -5
- package/form-field/_form-field-standard-theme.scss +5 -6
- package/form-field/_form-field-theme.scss +8 -9
- package/form-field/index.metadata.json +1 -1
- package/grid-list/_grid-list-theme.scss +2 -3
- package/grid-list/index.metadata.json +1 -1
- package/grid-list/public-api.d.ts +2 -1
- package/icon/_icon-theme.scss +2 -3
- package/icon/icon-registry.d.ts +23 -0
- package/icon/index.metadata.json +1 -1
- package/icon/testing/fake-icon-registry.d.ts +1 -0
- package/icon/testing/index.metadata.json +1 -1
- package/input/_input-theme.scss +3 -4
- package/list/_list-theme.scss +2 -3
- package/list/index.metadata.json +1 -1
- package/list/selection-list.d.ts +6 -1
- package/list/testing/list-harness-base.d.ts +1 -1
- package/list/testing/list-item-harness-base.d.ts +2 -2
- package/list/testing/selection-list-harness.d.ts +2 -1
- package/menu/_menu-theme.scss +4 -5
- package/menu/index.metadata.json +1 -1
- package/menu/menu-trigger.d.ts +1 -3
- package/menu/menu.d.ts +4 -2
- package/menu/testing/menu-harness.d.ts +39 -26
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +7 -8
- package/paginator/testing/paginator-harness.d.ts +32 -19
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +2 -3
- package/progress-spinner/_progress-spinner-theme.scss +2 -3
- package/radio/_radio-theme.scss +2 -3
- package/radio/index.metadata.json +1 -1
- package/radio/radio.d.ts +2 -2
- package/radio/testing/radio-harness.d.ts +39 -24
- package/schematics/ng-add/fonts/material-fonts.js +7 -5
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/setup-project.js +4 -3
- package/select/_select-theme.scss +5 -6
- package/select/index.metadata.json +1 -1
- package/select/testing/select-harness.d.ts +28 -16
- package/sidenav/_sidenav-theme.scss +4 -5
- package/sidenav/testing/drawer-container-harness.d.ts +30 -0
- package/sidenav/testing/drawer-content-harness.d.ts +21 -0
- package/sidenav/testing/drawer-harness-filters.d.ts +6 -0
- package/sidenav/testing/drawer-harness.d.ts +13 -7
- package/sidenav/testing/public-api.d.ts +5 -1
- package/sidenav/testing/sidenav-container-harness.d.ts +30 -0
- package/sidenav/testing/sidenav-content-harness.d.ts +21 -0
- package/sidenav/testing/sidenav-harness.d.ts +3 -3
- package/slide-toggle/_slide-toggle-theme.scss +4 -5
- package/slide-toggle/slide-toggle.d.ts +2 -2
- package/slider/_slider-theme.scss +2 -3
- package/snack-bar/_snack-bar-theme.scss +4 -5
- package/snack-bar/index.metadata.json +1 -1
- package/snack-bar/snack-bar-container.d.ts +5 -0
- package/snack-bar/testing/snack-bar-harness.d.ts +7 -4
- package/sort/_sort-theme.scss +2 -3
- package/stepper/_stepper-theme.scss +7 -8
- package/stepper/step-header.d.ts +2 -2
- package/table/_table-theme.scss +2 -3
- package/table/index.metadata.json +1 -1
- package/table/table-data-source.d.ts +31 -20
- package/table/testing/cell-harness.d.ts +2 -2
- package/tabs/_tabs-common.scss +2 -2
- package/tabs/_tabs-theme.scss +14 -9
- package/tabs/index.metadata.json +1 -1
- package/tabs/tab-body.d.ts +3 -3
- package/toolbar/_toolbar-theme.scss +8 -9
- package/tooltip/_tooltip-theme.scss +2 -3
- package/tooltip/index.metadata.json +1 -1
- package/tooltip/tooltip.d.ts +10 -1
- package/tree/_tree-theme.scss +7 -8
- package/core/density/_all-density.scss +0 -19
- package/core/style/_noop-animation.scss +0 -22
- package/core/theming/_check-duplicate-styles.scss +0 -106
|
@@ -389,6 +389,8 @@
|
|
|
389
389
|
return extendStatics(d, b);
|
|
390
390
|
};
|
|
391
391
|
function __extends(d, b) {
|
|
392
|
+
if (typeof b !== "function" && b !== null)
|
|
393
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
392
394
|
extendStatics(d, b);
|
|
393
395
|
function __() { this.constructor = d; }
|
|
394
396
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -574,11 +576,13 @@
|
|
|
574
576
|
}
|
|
575
577
|
return ar;
|
|
576
578
|
}
|
|
579
|
+
/** @deprecated */
|
|
577
580
|
function __spread() {
|
|
578
581
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
579
582
|
ar = ar.concat(__read(arguments[i]));
|
|
580
583
|
return ar;
|
|
581
584
|
}
|
|
585
|
+
/** @deprecated */
|
|
582
586
|
function __spreadArrays() {
|
|
583
587
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
584
588
|
s += arguments[i].length;
|
|
@@ -587,7 +591,11 @@
|
|
|
587
591
|
r[k] = a[j];
|
|
588
592
|
return r;
|
|
589
593
|
}
|
|
590
|
-
|
|
594
|
+
function __spreadArray(to, from) {
|
|
595
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
596
|
+
to[j] = from[i];
|
|
597
|
+
return to;
|
|
598
|
+
}
|
|
591
599
|
function __await(v) {
|
|
592
600
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
593
601
|
}
|
|
@@ -705,6 +713,17 @@
|
|
|
705
713
|
MatDateSelectionModel.prototype._isValidDateInstance = function (date) {
|
|
706
714
|
return this._adapter.isDateInstance(date) && this._adapter.isValid(date);
|
|
707
715
|
};
|
|
716
|
+
/**
|
|
717
|
+
* Clones the selection model.
|
|
718
|
+
* @deprecated To be turned into an abstract method.
|
|
719
|
+
* @breaking-change 12.0.0
|
|
720
|
+
*/
|
|
721
|
+
MatDateSelectionModel.prototype.clone = function () {
|
|
722
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
723
|
+
throw Error('Not implemented');
|
|
724
|
+
}
|
|
725
|
+
return null;
|
|
726
|
+
};
|
|
708
727
|
return MatDateSelectionModel;
|
|
709
728
|
}());
|
|
710
729
|
MatDateSelectionModel.decorators = [
|
|
@@ -738,6 +757,12 @@
|
|
|
738
757
|
MatSingleDateSelectionModel.prototype.isComplete = function () {
|
|
739
758
|
return this.selection != null;
|
|
740
759
|
};
|
|
760
|
+
/** Clones the selection model. */
|
|
761
|
+
MatSingleDateSelectionModel.prototype.clone = function () {
|
|
762
|
+
var clone = new MatSingleDateSelectionModel(this._adapter);
|
|
763
|
+
clone.updateSelection(this.selection, this);
|
|
764
|
+
return clone;
|
|
765
|
+
};
|
|
741
766
|
return MatSingleDateSelectionModel;
|
|
742
767
|
}(MatDateSelectionModel));
|
|
743
768
|
MatSingleDateSelectionModel.decorators = [
|
|
@@ -794,6 +819,12 @@
|
|
|
794
819
|
MatRangeDateSelectionModel.prototype.isComplete = function () {
|
|
795
820
|
return this.selection.start != null && this.selection.end != null;
|
|
796
821
|
};
|
|
822
|
+
/** Clones the selection model. */
|
|
823
|
+
MatRangeDateSelectionModel.prototype.clone = function () {
|
|
824
|
+
var clone = new MatRangeDateSelectionModel(this._adapter);
|
|
825
|
+
clone.updateSelection(this.selection, this);
|
|
826
|
+
return clone;
|
|
827
|
+
};
|
|
797
828
|
return MatRangeDateSelectionModel;
|
|
798
829
|
}(MatDateSelectionModel));
|
|
799
830
|
MatRangeDateSelectionModel.decorators = [
|
|
@@ -998,6 +1029,8 @@
|
|
|
998
1029
|
this.selectedChange.emit(selectedDate);
|
|
999
1030
|
}
|
|
1000
1031
|
this._userSelection.emit({ value: selectedDate, event: event.event });
|
|
1032
|
+
this._previewStart = this._previewEnd = null;
|
|
1033
|
+
this._changeDetectorRef.markForCheck();
|
|
1001
1034
|
};
|
|
1002
1035
|
/** Handles keydown events on the calendar body when calendar is in month view. */
|
|
1003
1036
|
MatMonthView.prototype._handleCalendarBodyKeydown = function (event) {
|
|
@@ -1069,8 +1102,9 @@
|
|
|
1069
1102
|
MatMonthView.prototype._init = function () {
|
|
1070
1103
|
this._setRanges(this.selected);
|
|
1071
1104
|
this._todayDate = this._getCellCompareValue(this._dateAdapter.today());
|
|
1072
|
-
this._monthLabel =
|
|
1073
|
-
this._dateAdapter.
|
|
1105
|
+
this._monthLabel = this._dateFormats.display.monthLabel
|
|
1106
|
+
? this._dateAdapter.format(this.activeDate, this._dateFormats.display.monthLabel)
|
|
1107
|
+
: this._dateAdapter.getMonthNames('short')[this._dateAdapter.getMonth(this.activeDate)]
|
|
1074
1108
|
.toLocaleUpperCase();
|
|
1075
1109
|
var firstOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), 1);
|
|
1076
1110
|
this._firstWeekOffset =
|
|
@@ -2193,7 +2227,7 @@
|
|
|
2193
2227
|
*/
|
|
2194
2228
|
var MatDatepickerContent = /** @class */ (function (_super) {
|
|
2195
2229
|
__extends(MatDatepickerContent, _super);
|
|
2196
|
-
function MatDatepickerContent(elementRef, _changeDetectorRef,
|
|
2230
|
+
function MatDatepickerContent(elementRef, _changeDetectorRef, _globalModel, _dateAdapter, _rangeSelectionStrategy,
|
|
2197
2231
|
/**
|
|
2198
2232
|
* @deprecated `intl` argument to become required.
|
|
2199
2233
|
* @breaking-change 12.0.0
|
|
@@ -2201,7 +2235,7 @@
|
|
|
2201
2235
|
intl) {
|
|
2202
2236
|
var _this = _super.call(this, elementRef) || this;
|
|
2203
2237
|
_this._changeDetectorRef = _changeDetectorRef;
|
|
2204
|
-
_this.
|
|
2238
|
+
_this._globalModel = _globalModel;
|
|
2205
2239
|
_this._dateAdapter = _dateAdapter;
|
|
2206
2240
|
_this._rangeSelectionStrategy = _rangeSelectionStrategy;
|
|
2207
2241
|
_this._subscriptions = new rxjs.Subscription();
|
|
@@ -2209,13 +2243,21 @@
|
|
|
2209
2243
|
_this._animationState = 'enter';
|
|
2210
2244
|
/** Emits when an animation has finished. */
|
|
2211
2245
|
_this._animationDone = new rxjs.Subject();
|
|
2246
|
+
/** Portal with projected action buttons. */
|
|
2247
|
+
_this._actionsPortal = null;
|
|
2212
2248
|
// @breaking-change 12.0.0 Remove fallback for `intl`.
|
|
2213
2249
|
_this._closeButtonText = (intl === null || intl === void 0 ? void 0 : intl.closeCalendarLabel) || 'Close calendar';
|
|
2214
2250
|
return _this;
|
|
2215
2251
|
}
|
|
2252
|
+
MatDatepickerContent.prototype.ngOnInit = function () {
|
|
2253
|
+
// If we have actions, clone the model so that we have the ability to cancel the selection,
|
|
2254
|
+
// otherwise update the global model directly. Note that we want to assign this as soon as
|
|
2255
|
+
// possible, but `_actionsPortal` isn't available in the constructor so we do it in `ngOnInit`.
|
|
2256
|
+
this._model = this._actionsPortal ? this._globalModel.clone() : this._globalModel;
|
|
2257
|
+
};
|
|
2216
2258
|
MatDatepickerContent.prototype.ngAfterViewInit = function () {
|
|
2217
2259
|
var _this = this;
|
|
2218
|
-
this._subscriptions.add(this.datepicker.
|
|
2260
|
+
this._subscriptions.add(this.datepicker.stateChanges.subscribe(function () {
|
|
2219
2261
|
_this._changeDetectorRef.markForCheck();
|
|
2220
2262
|
}));
|
|
2221
2263
|
this._calendar.focusActiveCell();
|
|
@@ -2241,7 +2283,8 @@
|
|
|
2241
2283
|
!this._dateAdapter.sameDate(value, selection))) {
|
|
2242
2284
|
this._model.add(value);
|
|
2243
2285
|
}
|
|
2244
|
-
|
|
2286
|
+
// Delegate closing the popup to the actions.
|
|
2287
|
+
if ((!this._model || this._model.isComplete()) && !this._actionsPortal) {
|
|
2245
2288
|
this.datepicker.close();
|
|
2246
2289
|
}
|
|
2247
2290
|
};
|
|
@@ -2252,12 +2295,18 @@
|
|
|
2252
2295
|
MatDatepickerContent.prototype._getSelected = function () {
|
|
2253
2296
|
return this._model.selection;
|
|
2254
2297
|
};
|
|
2298
|
+
/** Applies the current pending selection to the global model. */
|
|
2299
|
+
MatDatepickerContent.prototype._applyPendingSelection = function () {
|
|
2300
|
+
if (this._model !== this._globalModel) {
|
|
2301
|
+
this._globalModel.updateSelection(this._model.selection, this);
|
|
2302
|
+
}
|
|
2303
|
+
};
|
|
2255
2304
|
return MatDatepickerContent;
|
|
2256
2305
|
}(_MatDatepickerContentMixinBase));
|
|
2257
2306
|
MatDatepickerContent.decorators = [
|
|
2258
2307
|
{ type: i0.Component, args: [{
|
|
2259
2308
|
selector: 'mat-datepicker-content',
|
|
2260
|
-
template: "<div
|
|
2309
|
+
template: "<div\n cdkTrapFocus\n class=\"mat-datepicker-content-container\"\n [class.mat-datepicker-content-container-with-actions]=\"_actionsPortal\">\n <mat-calendar\n [id]=\"datepicker.id\"\n [ngClass]=\"datepicker.panelClass\"\n [startAt]=\"datepicker.startAt\"\n [startView]=\"datepicker.startView\"\n [minDate]=\"datepicker._getMinDate()\"\n [maxDate]=\"datepicker._getMaxDate()\"\n [dateFilter]=\"datepicker._getDateFilter()\"\n [headerComponent]=\"datepicker.calendarHeaderComponent\"\n [selected]=\"_getSelected()\"\n [dateClass]=\"datepicker.dateClass\"\n [comparisonStart]=\"comparisonStart\"\n [comparisonEnd]=\"comparisonEnd\"\n [@fadeInCalendar]=\"'enter'\"\n (yearSelected)=\"datepicker._selectYear($event)\"\n (monthSelected)=\"datepicker._selectMonth($event)\"\n (viewChanged)=\"datepicker._viewChanged($event)\"\n (_userSelection)=\"_handleUserSelection($event)\"></mat-calendar>\n\n <ng-template [cdkPortalOutlet]=\"_actionsPortal\"></ng-template>\n\n <!-- Invisible close button for screen reader users. -->\n <button\n type=\"button\"\n mat-raised-button\n [color]=\"color || 'primary'\"\n class=\"mat-datepicker-close-button\"\n [class.cdk-visually-hidden]=\"!_closeButtonFocused\"\n (focus)=\"_closeButtonFocused = true\"\n (blur)=\"_closeButtonFocused = false\"\n (click)=\"datepicker.close()\">{{ _closeButtonText }}</button>\n</div>\n",
|
|
2261
2310
|
host: {
|
|
2262
2311
|
'class': 'mat-datepicker-content',
|
|
2263
2312
|
'[@transformPanel]': '_animationState',
|
|
@@ -2272,7 +2321,7 @@
|
|
|
2272
2321
|
encapsulation: i0.ViewEncapsulation.None,
|
|
2273
2322
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2274
2323
|
inputs: ['color'],
|
|
2275
|
-
styles: [".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-
|
|
2324
|
+
styles: [".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}\n"]
|
|
2276
2325
|
},] }
|
|
2277
2326
|
];
|
|
2278
2327
|
MatDatepickerContent.ctorParameters = function () { return [
|
|
@@ -2331,7 +2380,7 @@
|
|
|
2331
2380
|
/** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
|
|
2332
2381
|
this._backdropHarnessClass = this.id + "-backdrop";
|
|
2333
2382
|
/** Emits when the datepicker's state changes. */
|
|
2334
|
-
this.
|
|
2383
|
+
this.stateChanges = new rxjs.Subject();
|
|
2335
2384
|
if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
2336
2385
|
throw createMissingDateImplError('DateAdapter');
|
|
2337
2386
|
}
|
|
@@ -2342,7 +2391,7 @@
|
|
|
2342
2391
|
get: function () {
|
|
2343
2392
|
// If an explicit startAt is set we start there, otherwise we start at whatever the currently
|
|
2344
2393
|
// selected value is.
|
|
2345
|
-
return this._startAt || (this.
|
|
2394
|
+
return this._startAt || (this.datepickerInput ? this.datepickerInput.getStartValue() : null);
|
|
2346
2395
|
},
|
|
2347
2396
|
set: function (value) {
|
|
2348
2397
|
this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
@@ -2354,7 +2403,7 @@
|
|
|
2354
2403
|
/** Color palette to use on the datepicker's calendar. */
|
|
2355
2404
|
get: function () {
|
|
2356
2405
|
return this._color ||
|
|
2357
|
-
(this.
|
|
2406
|
+
(this.datepickerInput ? this.datepickerInput.getThemePalette() : undefined);
|
|
2358
2407
|
},
|
|
2359
2408
|
set: function (value) {
|
|
2360
2409
|
this._color = value;
|
|
@@ -2377,14 +2426,14 @@
|
|
|
2377
2426
|
Object.defineProperty(MatDatepickerBase.prototype, "disabled", {
|
|
2378
2427
|
/** Whether the datepicker pop-up should be disabled. */
|
|
2379
2428
|
get: function () {
|
|
2380
|
-
return this._disabled === undefined && this.
|
|
2381
|
-
this.
|
|
2429
|
+
return this._disabled === undefined && this.datepickerInput ?
|
|
2430
|
+
this.datepickerInput.disabled : !!this._disabled;
|
|
2382
2431
|
},
|
|
2383
2432
|
set: function (value) {
|
|
2384
2433
|
var newValue = coercion.coerceBooleanProperty(value);
|
|
2385
2434
|
if (newValue !== this._disabled) {
|
|
2386
2435
|
this._disabled = newValue;
|
|
2387
|
-
this.
|
|
2436
|
+
this.stateChanges.next(undefined);
|
|
2388
2437
|
}
|
|
2389
2438
|
},
|
|
2390
2439
|
enumerable: false,
|
|
@@ -2413,14 +2462,14 @@
|
|
|
2413
2462
|
});
|
|
2414
2463
|
/** The minimum selectable date. */
|
|
2415
2464
|
MatDatepickerBase.prototype._getMinDate = function () {
|
|
2416
|
-
return this.
|
|
2465
|
+
return this.datepickerInput && this.datepickerInput.min;
|
|
2417
2466
|
};
|
|
2418
2467
|
/** The maximum selectable date. */
|
|
2419
2468
|
MatDatepickerBase.prototype._getMaxDate = function () {
|
|
2420
|
-
return this.
|
|
2469
|
+
return this.datepickerInput && this.datepickerInput.max;
|
|
2421
2470
|
};
|
|
2422
2471
|
MatDatepickerBase.prototype._getDateFilter = function () {
|
|
2423
|
-
return this.
|
|
2472
|
+
return this.datepickerInput && this.datepickerInput.dateFilter;
|
|
2424
2473
|
};
|
|
2425
2474
|
MatDatepickerBase.prototype.ngOnChanges = function (changes) {
|
|
2426
2475
|
var positionChange = changes['xPosition'] || changes['yPosition'];
|
|
@@ -2430,13 +2479,13 @@
|
|
|
2430
2479
|
this._popupRef.updatePosition();
|
|
2431
2480
|
}
|
|
2432
2481
|
}
|
|
2433
|
-
this.
|
|
2482
|
+
this.stateChanges.next(undefined);
|
|
2434
2483
|
};
|
|
2435
2484
|
MatDatepickerBase.prototype.ngOnDestroy = function () {
|
|
2436
2485
|
this._destroyPopup();
|
|
2437
2486
|
this.close();
|
|
2438
2487
|
this._inputStateChanges.unsubscribe();
|
|
2439
|
-
this.
|
|
2488
|
+
this.stateChanges.complete();
|
|
2440
2489
|
};
|
|
2441
2490
|
/** Selects the given date */
|
|
2442
2491
|
MatDatepickerBase.prototype.select = function (date) {
|
|
@@ -2459,23 +2508,42 @@
|
|
|
2459
2508
|
* @param input The datepicker input to register with this datepicker.
|
|
2460
2509
|
* @returns Selection model that the input should hook itself up to.
|
|
2461
2510
|
*/
|
|
2462
|
-
MatDatepickerBase.prototype.
|
|
2511
|
+
MatDatepickerBase.prototype.registerInput = function (input) {
|
|
2463
2512
|
var _this = this;
|
|
2464
|
-
if (this.
|
|
2513
|
+
if (this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
2465
2514
|
throw Error('A MatDatepicker can only be associated with a single input.');
|
|
2466
2515
|
}
|
|
2467
2516
|
this._inputStateChanges.unsubscribe();
|
|
2468
|
-
this.
|
|
2517
|
+
this.datepickerInput = input;
|
|
2469
2518
|
this._inputStateChanges =
|
|
2470
|
-
input.stateChanges.subscribe(function () { return _this.
|
|
2519
|
+
input.stateChanges.subscribe(function () { return _this.stateChanges.next(undefined); });
|
|
2471
2520
|
return this._model;
|
|
2472
2521
|
};
|
|
2522
|
+
/**
|
|
2523
|
+
* Registers a portal containing action buttons with the datepicker.
|
|
2524
|
+
* @param portal Portal to be registered.
|
|
2525
|
+
*/
|
|
2526
|
+
MatDatepickerBase.prototype.registerActions = function (portal) {
|
|
2527
|
+
if (this._actionsPortal && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
2528
|
+
throw Error('A MatDatepicker can only be associated with a single actions row.');
|
|
2529
|
+
}
|
|
2530
|
+
this._actionsPortal = portal;
|
|
2531
|
+
};
|
|
2532
|
+
/**
|
|
2533
|
+
* Removes a portal containing action buttons from the datepicker.
|
|
2534
|
+
* @param portal Portal to be removed.
|
|
2535
|
+
*/
|
|
2536
|
+
MatDatepickerBase.prototype.removeActions = function (portal) {
|
|
2537
|
+
if (portal === this._actionsPortal) {
|
|
2538
|
+
this._actionsPortal = null;
|
|
2539
|
+
}
|
|
2540
|
+
};
|
|
2473
2541
|
/** Open the calendar. */
|
|
2474
2542
|
MatDatepickerBase.prototype.open = function () {
|
|
2475
2543
|
if (this._opened || this.disabled) {
|
|
2476
2544
|
return;
|
|
2477
2545
|
}
|
|
2478
|
-
if (!this.
|
|
2546
|
+
if (!this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
2479
2547
|
throw Error('Attempted to open an MatDatepicker with no associated input.');
|
|
2480
2548
|
}
|
|
2481
2549
|
if (this._document) {
|
|
@@ -2523,6 +2591,12 @@
|
|
|
2523
2591
|
completeClose();
|
|
2524
2592
|
}
|
|
2525
2593
|
};
|
|
2594
|
+
/** Applies the current pending selection on the popup to the model. */
|
|
2595
|
+
MatDatepickerBase.prototype._applyPendingSelection = function () {
|
|
2596
|
+
var _a, _b;
|
|
2597
|
+
var instance = ((_a = this._popupComponentRef) === null || _a === void 0 ? void 0 : _a.instance) || ((_b = this._dialogRef) === null || _b === void 0 ? void 0 : _b.componentInstance);
|
|
2598
|
+
instance === null || instance === void 0 ? void 0 : instance._applyPendingSelection();
|
|
2599
|
+
};
|
|
2526
2600
|
/** Open the calendar as a dialog. */
|
|
2527
2601
|
MatDatepickerBase.prototype._openAsDialog = function () {
|
|
2528
2602
|
var _this = this;
|
|
@@ -2580,12 +2654,13 @@
|
|
|
2580
2654
|
MatDatepickerBase.prototype._forwardContentValues = function (instance) {
|
|
2581
2655
|
instance.datepicker = this;
|
|
2582
2656
|
instance.color = this.color;
|
|
2657
|
+
instance._actionsPortal = this._actionsPortal;
|
|
2583
2658
|
};
|
|
2584
2659
|
/** Create the popup. */
|
|
2585
2660
|
MatDatepickerBase.prototype._createPopup = function () {
|
|
2586
2661
|
var _this = this;
|
|
2587
2662
|
var positionStrategy = this._overlay.position()
|
|
2588
|
-
.flexibleConnectedTo(this.
|
|
2663
|
+
.flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin())
|
|
2589
2664
|
.withTransformOriginOn('.mat-datepicker-content')
|
|
2590
2665
|
.withFlexibleDimensions(false)
|
|
2591
2666
|
.withViewportMargin(8)
|
|
@@ -2602,7 +2677,7 @@
|
|
|
2602
2677
|
this._popupRef.overlayElement.setAttribute('role', 'dialog');
|
|
2603
2678
|
rxjs.merge(this._popupRef.backdropClick(), this._popupRef.detachments(), this._popupRef.keydownEvents().pipe(operators.filter(function (event) {
|
|
2604
2679
|
// Closing on alt + up is only valid when there's an input associated with the datepicker.
|
|
2605
|
-
return (event.keyCode === keycodes.ESCAPE && !keycodes.hasModifierKey(event)) || (_this.
|
|
2680
|
+
return (event.keyCode === keycodes.ESCAPE && !keycodes.hasModifierKey(event)) || (_this.datepickerInput &&
|
|
2606
2681
|
keycodes.hasModifierKey(event, 'altKey') && event.keyCode === keycodes.UP_ARROW);
|
|
2607
2682
|
}))).subscribe(function (event) {
|
|
2608
2683
|
if (event) {
|
|
@@ -2704,7 +2779,10 @@
|
|
|
2704
2779
|
exportAs: 'matDatepicker',
|
|
2705
2780
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2706
2781
|
encapsulation: i0.ViewEncapsulation.None,
|
|
2707
|
-
providers: [
|
|
2782
|
+
providers: [
|
|
2783
|
+
MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER,
|
|
2784
|
+
{ provide: MatDatepickerBase, useExisting: MatDatepicker },
|
|
2785
|
+
]
|
|
2708
2786
|
},] }
|
|
2709
2787
|
];
|
|
2710
2788
|
|
|
@@ -2736,8 +2814,6 @@
|
|
|
2736
2814
|
this.dateChange = new i0.EventEmitter();
|
|
2737
2815
|
/** Emits when an `input` event is fired on this `<input>`. */
|
|
2738
2816
|
this.dateInput = new i0.EventEmitter();
|
|
2739
|
-
/** Emits when the value changes (either due to user input or programmatic change). */
|
|
2740
|
-
this._valueChange = new i0.EventEmitter();
|
|
2741
2817
|
/** Emits when the internal state has changed */
|
|
2742
2818
|
this.stateChanges = new rxjs.Subject();
|
|
2743
2819
|
this._onTouched = function () { };
|
|
@@ -2784,7 +2860,7 @@
|
|
|
2784
2860
|
}
|
|
2785
2861
|
// Update the displayed date when the locale changes.
|
|
2786
2862
|
this._localeSubscription = _dateAdapter.localeChanges.subscribe(function () {
|
|
2787
|
-
_this.
|
|
2863
|
+
_this._assignValueProgrammatically(_this.value);
|
|
2788
2864
|
});
|
|
2789
2865
|
}
|
|
2790
2866
|
Object.defineProperty(MatDatepickerInputBase.prototype, "value", {
|
|
@@ -2793,15 +2869,7 @@
|
|
|
2793
2869
|
return this._model ? this._getValueFromModel(this._model.selection) : this._pendingValue;
|
|
2794
2870
|
},
|
|
2795
2871
|
set: function (value) {
|
|
2796
|
-
|
|
2797
|
-
this._lastValueValid = this._isValidValue(value);
|
|
2798
|
-
value = this._dateAdapter.getValidDateOrNull(value);
|
|
2799
|
-
var oldDate = this.value;
|
|
2800
|
-
this._assignValue(value);
|
|
2801
|
-
this._formatValue(value);
|
|
2802
|
-
if (!this._dateAdapter.sameDate(oldDate, value)) {
|
|
2803
|
-
this._valueChange.emit(value);
|
|
2804
|
-
}
|
|
2872
|
+
this._assignValueProgrammatically(value);
|
|
2805
2873
|
},
|
|
2806
2874
|
enumerable: false,
|
|
2807
2875
|
configurable: true
|
|
@@ -2843,22 +2911,14 @@
|
|
|
2843
2911
|
this._assignValue(this._pendingValue);
|
|
2844
2912
|
}
|
|
2845
2913
|
this._valueChangesSubscription = this._model.selectionChanged.subscribe(function (event) {
|
|
2846
|
-
if (event
|
|
2914
|
+
if (_this._shouldHandleChangeEvent(event)) {
|
|
2847
2915
|
var value = _this._getValueFromModel(event.selection);
|
|
2848
2916
|
_this._lastValueValid = _this._isValidValue(value);
|
|
2849
2917
|
_this._cvaOnChange(value);
|
|
2850
2918
|
_this._onTouched();
|
|
2851
2919
|
_this._formatValue(value);
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
// good way of distinguishing it at the moment.
|
|
2855
|
-
if (_this._canEmitChangeEvent(event)) {
|
|
2856
|
-
_this.dateInput.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
|
|
2857
|
-
_this.dateChange.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
|
|
2858
|
-
}
|
|
2859
|
-
if (_this._outsideValueChanged) {
|
|
2860
|
-
_this._outsideValueChanged();
|
|
2861
|
-
}
|
|
2920
|
+
_this.dateInput.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
|
|
2921
|
+
_this.dateChange.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
|
|
2862
2922
|
}
|
|
2863
2923
|
});
|
|
2864
2924
|
};
|
|
@@ -2873,7 +2933,6 @@
|
|
|
2873
2933
|
MatDatepickerInputBase.prototype.ngOnDestroy = function () {
|
|
2874
2934
|
this._valueChangesSubscription.unsubscribe();
|
|
2875
2935
|
this._localeSubscription.unsubscribe();
|
|
2876
|
-
this._valueChange.complete();
|
|
2877
2936
|
this.stateChanges.complete();
|
|
2878
2937
|
};
|
|
2879
2938
|
/** @docs-private */
|
|
@@ -2886,7 +2945,7 @@
|
|
|
2886
2945
|
};
|
|
2887
2946
|
// Implemented as part of ControlValueAccessor.
|
|
2888
2947
|
MatDatepickerInputBase.prototype.writeValue = function (value) {
|
|
2889
|
-
this.value
|
|
2948
|
+
this._assignValueProgrammatically(value);
|
|
2890
2949
|
};
|
|
2891
2950
|
// Implemented as part of ControlValueAccessor.
|
|
2892
2951
|
MatDatepickerInputBase.prototype.registerOnChange = function (fn) {
|
|
@@ -2915,7 +2974,6 @@
|
|
|
2915
2974
|
if (!this._dateAdapter.sameDate(date, this.value)) {
|
|
2916
2975
|
this._assignValue(date);
|
|
2917
2976
|
this._cvaOnChange(date);
|
|
2918
|
-
this._valueChange.emit(date);
|
|
2919
2977
|
this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));
|
|
2920
2978
|
}
|
|
2921
2979
|
else {
|
|
@@ -2968,6 +3026,14 @@
|
|
|
2968
3026
|
MatDatepickerInputBase.prototype._parentDisabled = function () {
|
|
2969
3027
|
return false;
|
|
2970
3028
|
};
|
|
3029
|
+
/** Programmatically assigns a value to the input. */
|
|
3030
|
+
MatDatepickerInputBase.prototype._assignValueProgrammatically = function (value) {
|
|
3031
|
+
value = this._dateAdapter.deserialize(value);
|
|
3032
|
+
this._lastValueValid = this._isValidValue(value);
|
|
3033
|
+
value = this._dateAdapter.getValidDateOrNull(value);
|
|
3034
|
+
this._assignValue(value);
|
|
3035
|
+
this._formatValue(value);
|
|
3036
|
+
};
|
|
2971
3037
|
/** Gets whether a value matches the current date filter. */
|
|
2972
3038
|
MatDatepickerInputBase.prototype._matchesFilter = function (value) {
|
|
2973
3039
|
var filter = this._getDateFilter();
|
|
@@ -3038,15 +3104,18 @@
|
|
|
3038
3104
|
function MatDatepickerInput(elementRef, dateAdapter, dateFormats, _formField) {
|
|
3039
3105
|
var _this = _super.call(this, elementRef, dateAdapter, dateFormats) || this;
|
|
3040
3106
|
_this._formField = _formField;
|
|
3107
|
+
_this._closedSubscription = rxjs.Subscription.EMPTY;
|
|
3041
3108
|
_this._validator = forms.Validators.compose(_super.prototype._getValidators.call(_this));
|
|
3042
3109
|
return _this;
|
|
3043
3110
|
}
|
|
3044
3111
|
Object.defineProperty(MatDatepickerInput.prototype, "matDatepicker", {
|
|
3045
3112
|
/** The datepicker that this input is associated with. */
|
|
3046
3113
|
set: function (datepicker) {
|
|
3114
|
+
var _this = this;
|
|
3047
3115
|
if (datepicker) {
|
|
3048
3116
|
this._datepicker = datepicker;
|
|
3049
|
-
this.
|
|
3117
|
+
this._closedSubscription = datepicker.closedStream.subscribe(function () { return _this._onTouched(); });
|
|
3118
|
+
this._registerModel(datepicker.registerInput(this));
|
|
3050
3119
|
}
|
|
3051
3120
|
},
|
|
3052
3121
|
enumerable: false,
|
|
@@ -3106,6 +3175,10 @@
|
|
|
3106
3175
|
MatDatepickerInput.prototype.getStartValue = function () {
|
|
3107
3176
|
return this.value;
|
|
3108
3177
|
};
|
|
3178
|
+
MatDatepickerInput.prototype.ngOnDestroy = function () {
|
|
3179
|
+
_super.prototype.ngOnDestroy.call(this);
|
|
3180
|
+
this._closedSubscription.unsubscribe();
|
|
3181
|
+
};
|
|
3109
3182
|
/** Opens the associated datepicker. */
|
|
3110
3183
|
MatDatepickerInput.prototype._openPopup = function () {
|
|
3111
3184
|
if (this._datepicker) {
|
|
@@ -3132,8 +3205,8 @@
|
|
|
3132
3205
|
MatDatepickerInput.prototype._getDateFilter = function () {
|
|
3133
3206
|
return this._dateFilter;
|
|
3134
3207
|
};
|
|
3135
|
-
MatDatepickerInput.prototype.
|
|
3136
|
-
return
|
|
3208
|
+
MatDatepickerInput.prototype._shouldHandleChangeEvent = function (event) {
|
|
3209
|
+
return event.source !== this;
|
|
3137
3210
|
};
|
|
3138
3211
|
return MatDatepickerInput;
|
|
3139
3212
|
}(MatDatepickerInputBase));
|
|
@@ -3235,9 +3308,9 @@
|
|
|
3235
3308
|
};
|
|
3236
3309
|
MatDatepickerToggle.prototype._watchStateChanges = function () {
|
|
3237
3310
|
var _this = this;
|
|
3238
|
-
var datepickerStateChanged = this.datepicker ? this.datepicker.
|
|
3239
|
-
var inputStateChanged = this.datepicker && this.datepicker.
|
|
3240
|
-
this.datepicker.
|
|
3311
|
+
var datepickerStateChanged = this.datepicker ? this.datepicker.stateChanges : rxjs.of();
|
|
3312
|
+
var inputStateChanged = this.datepicker && this.datepicker.datepickerInput ?
|
|
3313
|
+
this.datepicker.datepickerInput.stateChanges : rxjs.of();
|
|
3241
3314
|
var datepickerToggled = this.datepicker ?
|
|
3242
3315
|
rxjs.merge(this.datepicker.openedStream, this.datepicker.closedStream) :
|
|
3243
3316
|
rxjs.of();
|
|
@@ -3249,18 +3322,15 @@
|
|
|
3249
3322
|
MatDatepickerToggle.decorators = [
|
|
3250
3323
|
{ type: i0.Component, args: [{
|
|
3251
3324
|
selector: 'mat-datepicker-toggle',
|
|
3252
|
-
template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datepicker ? 'dialog' : null\"\n [attr.aria-label]=\"_intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"\n (click)=\"_open($event)\">\n\n <svg\n *ngIf=\"!_customIcon\"\n class=\"mat-datepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\"/>\n </svg>\n\n <ng-content select=\"[matDatepickerToggleIcon]\"></ng-content>\n</button>\n",
|
|
3325
|
+
template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datepicker ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel || _intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"\n (click)=\"_open($event)\">\n\n <svg\n *ngIf=\"!_customIcon\"\n class=\"mat-datepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\"/>\n </svg>\n\n <ng-content select=\"[matDatepickerToggleIcon]\"></ng-content>\n</button>\n",
|
|
3253
3326
|
host: {
|
|
3254
3327
|
'class': 'mat-datepicker-toggle',
|
|
3255
|
-
|
|
3256
|
-
// consumer may have provided, while still being able to receive focus.
|
|
3257
|
-
'[attr.tabindex]': 'disabled ? null : -1',
|
|
3328
|
+
'[attr.tabindex]': 'null',
|
|
3258
3329
|
'[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',
|
|
3259
3330
|
'[class.mat-accent]': 'datepicker && datepicker.color === "accent"',
|
|
3260
3331
|
'[class.mat-warn]': 'datepicker && datepicker.color === "warn"',
|
|
3261
3332
|
// Used by the test harness to tie this toggle to its datepicker.
|
|
3262
3333
|
'[attr.data-mat-calendar]': 'datepicker ? datepicker.id : null',
|
|
3263
|
-
'(focus)': '_button.focus()',
|
|
3264
3334
|
},
|
|
3265
3335
|
exportAs: 'matDatepickerToggle',
|
|
3266
3336
|
encapsulation: i0.ViewEncapsulation.None,
|
|
@@ -3276,6 +3346,7 @@
|
|
|
3276
3346
|
MatDatepickerToggle.propDecorators = {
|
|
3277
3347
|
datepicker: [{ type: i0.Input, args: ['for',] }],
|
|
3278
3348
|
tabIndex: [{ type: i0.Input }],
|
|
3349
|
+
ariaLabel: [{ type: i0.Input, args: ['aria-label',] }],
|
|
3279
3350
|
disabled: [{ type: i0.Input }],
|
|
3280
3351
|
disableRipple: [{ type: i0.Input }],
|
|
3281
3352
|
_customIcon: [{ type: i0.ContentChild, args: [MatDatepickerToggleIcon,] }],
|
|
@@ -3299,11 +3370,6 @@
|
|
|
3299
3370
|
_this._injector = _injector;
|
|
3300
3371
|
_this._parentForm = _parentForm;
|
|
3301
3372
|
_this._parentFormGroup = _parentFormGroup;
|
|
3302
|
-
_this._outsideValueChanged = function () {
|
|
3303
|
-
// Whenever the value changes outside the input we need to revalidate, because
|
|
3304
|
-
// the validation state of each of the inputs depends on the other one.
|
|
3305
|
-
_this._validatorOnChange();
|
|
3306
|
-
};
|
|
3307
3373
|
return _this;
|
|
3308
3374
|
}
|
|
3309
3375
|
MatDateRangeInputPartBase.prototype.ngOnInit = function () {
|
|
@@ -3362,6 +3428,16 @@
|
|
|
3362
3428
|
MatDateRangeInputPartBase.prototype._parentDisabled = function () {
|
|
3363
3429
|
return this._rangeInput._groupDisabled;
|
|
3364
3430
|
};
|
|
3431
|
+
MatDateRangeInputPartBase.prototype._shouldHandleChangeEvent = function (_a) {
|
|
3432
|
+
var source = _a.source;
|
|
3433
|
+
return source !== this._rangeInput._startInput && source !== this._rangeInput._endInput;
|
|
3434
|
+
};
|
|
3435
|
+
MatDateRangeInputPartBase.prototype._assignValueProgrammatically = function (value) {
|
|
3436
|
+
_super.prototype._assignValueProgrammatically.call(this, value);
|
|
3437
|
+
var opposite = (this === this._rangeInput._startInput ? this._rangeInput._endInput :
|
|
3438
|
+
this._rangeInput._startInput);
|
|
3439
|
+
opposite === null || opposite === void 0 ? void 0 : opposite._validatorOnChange();
|
|
3440
|
+
};
|
|
3365
3441
|
return MatDateRangeInputPartBase;
|
|
3366
3442
|
}(MatDatepickerInputBase));
|
|
3367
3443
|
MatDateRangeInputPartBase.decorators = [
|
|
@@ -3398,9 +3474,6 @@
|
|
|
3398
3474
|
null : { 'matStartDateInvalid': { 'end': end, 'actual': start } };
|
|
3399
3475
|
};
|
|
3400
3476
|
_this._validator = forms.Validators.compose(__spread(_super.prototype._getValidators.call(_this), [_this._startValidator]));
|
|
3401
|
-
_this._canEmitChangeEvent = function (event) {
|
|
3402
|
-
return event.source !== _this._rangeInput._endInput;
|
|
3403
|
-
};
|
|
3404
3477
|
return _this;
|
|
3405
3478
|
}
|
|
3406
3479
|
MatStartDate.prototype.ngOnInit = function () {
|
|
@@ -3428,7 +3501,6 @@
|
|
|
3428
3501
|
if (this._model) {
|
|
3429
3502
|
var range = new DateRange(value, this._model.selection.end);
|
|
3430
3503
|
this._model.updateSelection(range, this);
|
|
3431
|
-
this._cvaOnChange(value);
|
|
3432
3504
|
}
|
|
3433
3505
|
};
|
|
3434
3506
|
MatStartDate.prototype._formatValue = function (value) {
|
|
@@ -3499,9 +3571,6 @@
|
|
|
3499
3571
|
null : { 'matEndDateInvalid': { 'start': start, 'actual': end } };
|
|
3500
3572
|
};
|
|
3501
3573
|
_this._validator = forms.Validators.compose(__spread(_super.prototype._getValidators.call(_this), [_this._endValidator]));
|
|
3502
|
-
_this._canEmitChangeEvent = function (event) {
|
|
3503
|
-
return event.source !== _this._rangeInput._startInput;
|
|
3504
|
-
};
|
|
3505
3574
|
return _this;
|
|
3506
3575
|
}
|
|
3507
3576
|
MatEndDate.prototype.ngOnInit = function () {
|
|
@@ -3529,7 +3598,6 @@
|
|
|
3529
3598
|
if (this._model) {
|
|
3530
3599
|
var range = new DateRange(this._model.selection.start, value);
|
|
3531
3600
|
this._model.updateSelection(range, this);
|
|
3532
|
-
this._cvaOnChange(value);
|
|
3533
3601
|
}
|
|
3534
3602
|
};
|
|
3535
3603
|
MatEndDate.prototype._onKeydown = function (event) {
|
|
@@ -3592,6 +3660,7 @@
|
|
|
3592
3660
|
this._elementRef = _elementRef;
|
|
3593
3661
|
this._dateAdapter = _dateAdapter;
|
|
3594
3662
|
this._formField = _formField;
|
|
3663
|
+
this._closedSubscription = rxjs.Subscription.EMPTY;
|
|
3595
3664
|
/** Unique ID for the input. */
|
|
3596
3665
|
this.id = "mat-date-range-input-" + nextUniqueId++;
|
|
3597
3666
|
/** Whether the control is focused. */
|
|
@@ -3650,9 +3719,16 @@
|
|
|
3650
3719
|
/** The range picker that this input is associated with. */
|
|
3651
3720
|
get: function () { return this._rangePicker; },
|
|
3652
3721
|
set: function (rangePicker) {
|
|
3722
|
+
var _this = this;
|
|
3653
3723
|
if (rangePicker) {
|
|
3654
|
-
this._model = rangePicker.
|
|
3724
|
+
this._model = rangePicker.registerInput(this);
|
|
3655
3725
|
this._rangePicker = rangePicker;
|
|
3726
|
+
this._closedSubscription.unsubscribe();
|
|
3727
|
+
this._closedSubscription = rangePicker.closedStream.subscribe(function () {
|
|
3728
|
+
var _a, _b;
|
|
3729
|
+
(_a = _this._startInput) === null || _a === void 0 ? void 0 : _a._onTouched();
|
|
3730
|
+
(_b = _this._endInput) === null || _b === void 0 ? void 0 : _b._onTouched();
|
|
3731
|
+
});
|
|
3656
3732
|
this._registerModel(this._model);
|
|
3657
3733
|
}
|
|
3658
3734
|
},
|
|
@@ -3797,6 +3873,7 @@
|
|
|
3797
3873
|
}
|
|
3798
3874
|
};
|
|
3799
3875
|
MatDateRangeInput.prototype.ngOnDestroy = function () {
|
|
3876
|
+
this._closedSubscription.unsubscribe();
|
|
3800
3877
|
this.stateChanges.complete();
|
|
3801
3878
|
};
|
|
3802
3879
|
/** Gets the date at which the calendar should start. */
|
|
@@ -3917,7 +3994,7 @@
|
|
|
3917
3994
|
}
|
|
3918
3995
|
MatDateRangePicker.prototype._forwardContentValues = function (instance) {
|
|
3919
3996
|
_super.prototype._forwardContentValues.call(this, instance);
|
|
3920
|
-
var input = this.
|
|
3997
|
+
var input = this.datepickerInput;
|
|
3921
3998
|
if (input) {
|
|
3922
3999
|
instance.comparisonStart = input.comparisonStart;
|
|
3923
4000
|
instance.comparisonEnd = input.comparisonEnd;
|
|
@@ -3935,10 +4012,94 @@
|
|
|
3935
4012
|
providers: [
|
|
3936
4013
|
MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,
|
|
3937
4014
|
MAT_CALENDAR_RANGE_STRATEGY_PROVIDER,
|
|
4015
|
+
{ provide: MatDatepickerBase, useExisting: MatDateRangePicker },
|
|
3938
4016
|
]
|
|
3939
4017
|
},] }
|
|
3940
4018
|
];
|
|
3941
4019
|
|
|
4020
|
+
/**
|
|
4021
|
+
* @license
|
|
4022
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4023
|
+
*
|
|
4024
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
4025
|
+
* found in the LICENSE file at https://angular.io/license
|
|
4026
|
+
*/
|
|
4027
|
+
/** Button that will close the datepicker and assign the current selection to the data model. */
|
|
4028
|
+
var MatDatepickerApply = /** @class */ (function () {
|
|
4029
|
+
function MatDatepickerApply(_datepicker) {
|
|
4030
|
+
this._datepicker = _datepicker;
|
|
4031
|
+
}
|
|
4032
|
+
MatDatepickerApply.prototype._applySelection = function () {
|
|
4033
|
+
this._datepicker._applyPendingSelection();
|
|
4034
|
+
this._datepicker.close();
|
|
4035
|
+
};
|
|
4036
|
+
return MatDatepickerApply;
|
|
4037
|
+
}());
|
|
4038
|
+
MatDatepickerApply.decorators = [
|
|
4039
|
+
{ type: i0.Directive, args: [{
|
|
4040
|
+
selector: '[matDatepickerApply], [matDateRangePickerApply]',
|
|
4041
|
+
host: { '(click)': '_applySelection()' }
|
|
4042
|
+
},] }
|
|
4043
|
+
];
|
|
4044
|
+
MatDatepickerApply.ctorParameters = function () { return [
|
|
4045
|
+
{ type: MatDatepickerBase }
|
|
4046
|
+
]; };
|
|
4047
|
+
/** Button that will close the datepicker and discard the current selection. */
|
|
4048
|
+
var MatDatepickerCancel = /** @class */ (function () {
|
|
4049
|
+
function MatDatepickerCancel(_datepicker) {
|
|
4050
|
+
this._datepicker = _datepicker;
|
|
4051
|
+
}
|
|
4052
|
+
return MatDatepickerCancel;
|
|
4053
|
+
}());
|
|
4054
|
+
MatDatepickerCancel.decorators = [
|
|
4055
|
+
{ type: i0.Directive, args: [{
|
|
4056
|
+
selector: '[matDatepickerCancel], [matDateRangePickerCancel]',
|
|
4057
|
+
host: { '(click)': '_datepicker.close()' }
|
|
4058
|
+
},] }
|
|
4059
|
+
];
|
|
4060
|
+
MatDatepickerCancel.ctorParameters = function () { return [
|
|
4061
|
+
{ type: MatDatepickerBase }
|
|
4062
|
+
]; };
|
|
4063
|
+
/**
|
|
4064
|
+
* Container that can be used to project a row of action buttons
|
|
4065
|
+
* to the bottom of a datepicker or date range picker.
|
|
4066
|
+
*/
|
|
4067
|
+
var MatDatepickerActions = /** @class */ (function () {
|
|
4068
|
+
function MatDatepickerActions(_datepicker, _viewContainerRef) {
|
|
4069
|
+
this._datepicker = _datepicker;
|
|
4070
|
+
this._viewContainerRef = _viewContainerRef;
|
|
4071
|
+
}
|
|
4072
|
+
MatDatepickerActions.prototype.ngAfterViewInit = function () {
|
|
4073
|
+
this._portal = new portal.TemplatePortal(this._template, this._viewContainerRef);
|
|
4074
|
+
this._datepicker.registerActions(this._portal);
|
|
4075
|
+
};
|
|
4076
|
+
MatDatepickerActions.prototype.ngOnDestroy = function () {
|
|
4077
|
+
var _a;
|
|
4078
|
+
this._datepicker.removeActions(this._portal);
|
|
4079
|
+
// Needs to be null checked since we initialize it in `ngAfterViewInit`.
|
|
4080
|
+
if (this._portal && this._portal.isAttached) {
|
|
4081
|
+
(_a = this._portal) === null || _a === void 0 ? void 0 : _a.detach();
|
|
4082
|
+
}
|
|
4083
|
+
};
|
|
4084
|
+
return MatDatepickerActions;
|
|
4085
|
+
}());
|
|
4086
|
+
MatDatepickerActions.decorators = [
|
|
4087
|
+
{ type: i0.Component, args: [{
|
|
4088
|
+
selector: 'mat-datepicker-actions, mat-date-range-picker-actions',
|
|
4089
|
+
template: "\n <ng-template>\n <div class=\"mat-datepicker-actions\">\n <ng-content></ng-content>\n </div>\n </ng-template>\n ",
|
|
4090
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
4091
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
4092
|
+
styles: [".mat-datepicker-actions{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px 8px}.mat-datepicker-actions .mat-button-base+.mat-button-base{margin-left:8px}[dir=rtl] .mat-datepicker-actions .mat-button-base+.mat-button-base{margin-left:0;margin-right:8px}\n"]
|
|
4093
|
+
},] }
|
|
4094
|
+
];
|
|
4095
|
+
MatDatepickerActions.ctorParameters = function () { return [
|
|
4096
|
+
{ type: MatDatepickerBase },
|
|
4097
|
+
{ type: i0.ViewContainerRef }
|
|
4098
|
+
]; };
|
|
4099
|
+
MatDatepickerActions.propDecorators = {
|
|
4100
|
+
_template: [{ type: i0.ViewChild, args: [i0.TemplateRef,] }]
|
|
4101
|
+
};
|
|
4102
|
+
|
|
3942
4103
|
/**
|
|
3943
4104
|
* @license
|
|
3944
4105
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -3979,6 +4140,9 @@
|
|
|
3979
4140
|
MatStartDate,
|
|
3980
4141
|
MatEndDate,
|
|
3981
4142
|
MatDateRangePicker,
|
|
4143
|
+
MatDatepickerActions,
|
|
4144
|
+
MatDatepickerCancel,
|
|
4145
|
+
MatDatepickerApply
|
|
3982
4146
|
],
|
|
3983
4147
|
declarations: [
|
|
3984
4148
|
MatCalendar,
|
|
@@ -3996,6 +4160,9 @@
|
|
|
3996
4160
|
MatStartDate,
|
|
3997
4161
|
MatEndDate,
|
|
3998
4162
|
MatDateRangePicker,
|
|
4163
|
+
MatDatepickerActions,
|
|
4164
|
+
MatDatepickerCancel,
|
|
4165
|
+
MatDatepickerApply
|
|
3999
4166
|
],
|
|
4000
4167
|
providers: [
|
|
4001
4168
|
MatDatepickerIntl,
|
|
@@ -4040,6 +4207,9 @@
|
|
|
4040
4207
|
exports.MatDateRangePicker = MatDateRangePicker;
|
|
4041
4208
|
exports.MatDateSelectionModel = MatDateSelectionModel;
|
|
4042
4209
|
exports.MatDatepicker = MatDatepicker;
|
|
4210
|
+
exports.MatDatepickerActions = MatDatepickerActions;
|
|
4211
|
+
exports.MatDatepickerApply = MatDatepickerApply;
|
|
4212
|
+
exports.MatDatepickerCancel = MatDatepickerCancel;
|
|
4043
4213
|
exports.MatDatepickerContent = MatDatepickerContent;
|
|
4044
4214
|
exports.MatDatepickerInput = MatDatepickerInput;
|
|
4045
4215
|
exports.MatDatepickerInputEvent = MatDatepickerInputEvent;
|