@angular/material 11.0.3 → 11.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/_theming.scss +392 -351
- 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 +32 -10
- 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 +256 -84
- 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 +15 -3
- package/bundles/material-expansion.umd.js.map +1 -1
- package/bundles/material-expansion.umd.min.js +3 -3
- 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 +10 -2
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +1 -1
- 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 +9 -1
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +1 -1
- 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 +18 -6
- 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 +9 -1
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +4 -4
- 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 +19 -5
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +2 -2
- 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 +66 -39
- 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 +12 -3
- 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/style/_vendor-prefixes.scss +3 -3
- 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/core/typography/_typography.scss +39 -9
- package/datepicker/_datepicker-theme.scss +15 -16
- 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/datepicker/year-view.d.ts +1 -1
- package/dialog/_dialog-theme.scss +4 -5
- package/divider/_divider-theme.scss +2 -3
- package/esm2015/autocomplete/autocomplete-trigger.js +11 -3
- 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/calendar-body.js +1 -1
- package/esm2015/datepicker/date-range-input-parts.js +14 -16
- 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 +69 -26
- 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 +4 -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/datepicker/year-view.js +1 -1
- package/esm2015/dialog/dialog-ref.js +2 -2
- package/esm2015/expansion/expansion-panel-header.js +8 -3
- package/esm2015/expansion/expansion-panel.js +1 -1
- package/esm2015/form-field/form-field.js +2 -2
- package/esm2015/form-field/testing/form-field-harness.js +14 -9
- 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 +10 -4
- package/esm2015/menu/menu.js +1 -1
- 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/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/sort/sort-header.js +11 -5
- package/esm2015/stepper/step-header.js +8 -3
- package/esm2015/table/table-data-source.js +34 -21
- package/esm2015/table/table.js +1 -1
- 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/node.js +4 -3
- package/esm2015/tree/padding.js +1 -1
- package/esm2015/tree/testing/tree-harness.js +2 -2
- package/esm2015/tree/toggle.js +1 -1
- package/esm2015/tree/tree.js +1 -1
- package/expansion/_expansion-theme.scss +10 -11
- 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 +20 -6
- 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 +281 -120
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/dialog.js +1 -1
- package/fesm2015/dialog.js.map +1 -1
- package/fesm2015/expansion.js +7 -2
- 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 +1 -1
- 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.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 +12 -6
- 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/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/sort.js +10 -4
- package/fesm2015/sort.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 +35 -22
- 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/fesm2015/tree.js +3 -2
- package/fesm2015/tree.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/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 -1
- 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/select/_select-theme.scss +5 -6
- 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/sort/index.metadata.json +1 -1
- package/sort/sort-header.d.ts +2 -1
- 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/tree/index.metadata.json +1 -1
- package/tree/node.d.ts +7 -6
- package/tree/padding.d.ts +1 -1
- package/tree/toggle.d.ts +1 -1
- package/tree/tree.d.ts +1 -1
- 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
|
@@ -322,7 +322,7 @@
|
|
|
322
322
|
exportAs: 'matCalendarBody',
|
|
323
323
|
encapsulation: i0.ViewEncapsulation.None,
|
|
324
324
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
325
|
-
styles: [".mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:\"\";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n"]
|
|
325
|
+
styles: [".mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:\"\";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.mat-datepicker-dialog .mat-dialog-container{position:relative;overflow:visible}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n"]
|
|
326
326
|
},] }
|
|
327
327
|
];
|
|
328
328
|
MatCalendarBody.ctorParameters = function () { return [
|
|
@@ -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 = [
|
|
@@ -1069,8 +1100,9 @@
|
|
|
1069
1100
|
MatMonthView.prototype._init = function () {
|
|
1070
1101
|
this._setRanges(this.selected);
|
|
1071
1102
|
this._todayDate = this._getCellCompareValue(this._dateAdapter.today());
|
|
1072
|
-
this._monthLabel =
|
|
1073
|
-
this._dateAdapter.
|
|
1103
|
+
this._monthLabel = this._dateFormats.display.monthLabel
|
|
1104
|
+
? this._dateAdapter.format(this.activeDate, this._dateFormats.display.monthLabel)
|
|
1105
|
+
: this._dateAdapter.getMonthNames('short')[this._dateAdapter.getMonth(this.activeDate)]
|
|
1074
1106
|
.toLocaleUpperCase();
|
|
1075
1107
|
var firstOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), 1);
|
|
1076
1108
|
this._firstWeekOffset =
|
|
@@ -2193,7 +2225,7 @@
|
|
|
2193
2225
|
*/
|
|
2194
2226
|
var MatDatepickerContent = /** @class */ (function (_super) {
|
|
2195
2227
|
__extends(MatDatepickerContent, _super);
|
|
2196
|
-
function MatDatepickerContent(elementRef, _changeDetectorRef,
|
|
2228
|
+
function MatDatepickerContent(elementRef, _changeDetectorRef, _globalModel, _dateAdapter, _rangeSelectionStrategy,
|
|
2197
2229
|
/**
|
|
2198
2230
|
* @deprecated `intl` argument to become required.
|
|
2199
2231
|
* @breaking-change 12.0.0
|
|
@@ -2201,7 +2233,7 @@
|
|
|
2201
2233
|
intl) {
|
|
2202
2234
|
var _this = _super.call(this, elementRef) || this;
|
|
2203
2235
|
_this._changeDetectorRef = _changeDetectorRef;
|
|
2204
|
-
_this.
|
|
2236
|
+
_this._globalModel = _globalModel;
|
|
2205
2237
|
_this._dateAdapter = _dateAdapter;
|
|
2206
2238
|
_this._rangeSelectionStrategy = _rangeSelectionStrategy;
|
|
2207
2239
|
_this._subscriptions = new rxjs.Subscription();
|
|
@@ -2209,13 +2241,21 @@
|
|
|
2209
2241
|
_this._animationState = 'enter';
|
|
2210
2242
|
/** Emits when an animation has finished. */
|
|
2211
2243
|
_this._animationDone = new rxjs.Subject();
|
|
2244
|
+
/** Portal with projected action buttons. */
|
|
2245
|
+
_this._actionsPortal = null;
|
|
2212
2246
|
// @breaking-change 12.0.0 Remove fallback for `intl`.
|
|
2213
2247
|
_this._closeButtonText = (intl === null || intl === void 0 ? void 0 : intl.closeCalendarLabel) || 'Close calendar';
|
|
2214
2248
|
return _this;
|
|
2215
2249
|
}
|
|
2250
|
+
MatDatepickerContent.prototype.ngOnInit = function () {
|
|
2251
|
+
// If we have actions, clone the model so that we have the ability to cancel the selection,
|
|
2252
|
+
// otherwise update the global model directly. Note that we want to assign this as soon as
|
|
2253
|
+
// possible, but `_actionsPortal` isn't available in the constructor so we do it in `ngOnInit`.
|
|
2254
|
+
this._model = this._actionsPortal ? this._globalModel.clone() : this._globalModel;
|
|
2255
|
+
};
|
|
2216
2256
|
MatDatepickerContent.prototype.ngAfterViewInit = function () {
|
|
2217
2257
|
var _this = this;
|
|
2218
|
-
this._subscriptions.add(this.datepicker.
|
|
2258
|
+
this._subscriptions.add(this.datepicker.stateChanges.subscribe(function () {
|
|
2219
2259
|
_this._changeDetectorRef.markForCheck();
|
|
2220
2260
|
}));
|
|
2221
2261
|
this._calendar.focusActiveCell();
|
|
@@ -2241,7 +2281,8 @@
|
|
|
2241
2281
|
!this._dateAdapter.sameDate(value, selection))) {
|
|
2242
2282
|
this._model.add(value);
|
|
2243
2283
|
}
|
|
2244
|
-
|
|
2284
|
+
// Delegate closing the popup to the actions.
|
|
2285
|
+
if ((!this._model || this._model.isComplete()) && !this._actionsPortal) {
|
|
2245
2286
|
this.datepicker.close();
|
|
2246
2287
|
}
|
|
2247
2288
|
};
|
|
@@ -2252,12 +2293,18 @@
|
|
|
2252
2293
|
MatDatepickerContent.prototype._getSelected = function () {
|
|
2253
2294
|
return this._model.selection;
|
|
2254
2295
|
};
|
|
2296
|
+
/** Applies the current pending selection to the global model. */
|
|
2297
|
+
MatDatepickerContent.prototype._applyPendingSelection = function () {
|
|
2298
|
+
if (this._model !== this._globalModel) {
|
|
2299
|
+
this._globalModel.updateSelection(this._model.selection, this);
|
|
2300
|
+
}
|
|
2301
|
+
};
|
|
2255
2302
|
return MatDatepickerContent;
|
|
2256
2303
|
}(_MatDatepickerContentMixinBase));
|
|
2257
2304
|
MatDatepickerContent.decorators = [
|
|
2258
2305
|
{ type: i0.Component, args: [{
|
|
2259
2306
|
selector: 'mat-datepicker-content',
|
|
2260
|
-
template: "<div
|
|
2307
|
+
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
2308
|
host: {
|
|
2262
2309
|
'class': 'mat-datepicker-content',
|
|
2263
2310
|
'[@transformPanel]': '_animationState',
|
|
@@ -2272,7 +2319,7 @@
|
|
|
2272
2319
|
encapsulation: i0.ViewEncapsulation.None,
|
|
2273
2320
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2274
2321
|
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}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-
|
|
2322
|
+
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
2323
|
},] }
|
|
2277
2324
|
];
|
|
2278
2325
|
MatDatepickerContent.ctorParameters = function () { return [
|
|
@@ -2331,7 +2378,7 @@
|
|
|
2331
2378
|
/** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
|
|
2332
2379
|
this._backdropHarnessClass = this.id + "-backdrop";
|
|
2333
2380
|
/** Emits when the datepicker's state changes. */
|
|
2334
|
-
this.
|
|
2381
|
+
this.stateChanges = new rxjs.Subject();
|
|
2335
2382
|
if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
2336
2383
|
throw createMissingDateImplError('DateAdapter');
|
|
2337
2384
|
}
|
|
@@ -2342,7 +2389,7 @@
|
|
|
2342
2389
|
get: function () {
|
|
2343
2390
|
// If an explicit startAt is set we start there, otherwise we start at whatever the currently
|
|
2344
2391
|
// selected value is.
|
|
2345
|
-
return this._startAt || (this.
|
|
2392
|
+
return this._startAt || (this.datepickerInput ? this.datepickerInput.getStartValue() : null);
|
|
2346
2393
|
},
|
|
2347
2394
|
set: function (value) {
|
|
2348
2395
|
this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
@@ -2354,7 +2401,7 @@
|
|
|
2354
2401
|
/** Color palette to use on the datepicker's calendar. */
|
|
2355
2402
|
get: function () {
|
|
2356
2403
|
return this._color ||
|
|
2357
|
-
(this.
|
|
2404
|
+
(this.datepickerInput ? this.datepickerInput.getThemePalette() : undefined);
|
|
2358
2405
|
},
|
|
2359
2406
|
set: function (value) {
|
|
2360
2407
|
this._color = value;
|
|
@@ -2377,14 +2424,14 @@
|
|
|
2377
2424
|
Object.defineProperty(MatDatepickerBase.prototype, "disabled", {
|
|
2378
2425
|
/** Whether the datepicker pop-up should be disabled. */
|
|
2379
2426
|
get: function () {
|
|
2380
|
-
return this._disabled === undefined && this.
|
|
2381
|
-
this.
|
|
2427
|
+
return this._disabled === undefined && this.datepickerInput ?
|
|
2428
|
+
this.datepickerInput.disabled : !!this._disabled;
|
|
2382
2429
|
},
|
|
2383
2430
|
set: function (value) {
|
|
2384
2431
|
var newValue = coercion.coerceBooleanProperty(value);
|
|
2385
2432
|
if (newValue !== this._disabled) {
|
|
2386
2433
|
this._disabled = newValue;
|
|
2387
|
-
this.
|
|
2434
|
+
this.stateChanges.next(undefined);
|
|
2388
2435
|
}
|
|
2389
2436
|
},
|
|
2390
2437
|
enumerable: false,
|
|
@@ -2413,14 +2460,14 @@
|
|
|
2413
2460
|
});
|
|
2414
2461
|
/** The minimum selectable date. */
|
|
2415
2462
|
MatDatepickerBase.prototype._getMinDate = function () {
|
|
2416
|
-
return this.
|
|
2463
|
+
return this.datepickerInput && this.datepickerInput.min;
|
|
2417
2464
|
};
|
|
2418
2465
|
/** The maximum selectable date. */
|
|
2419
2466
|
MatDatepickerBase.prototype._getMaxDate = function () {
|
|
2420
|
-
return this.
|
|
2467
|
+
return this.datepickerInput && this.datepickerInput.max;
|
|
2421
2468
|
};
|
|
2422
2469
|
MatDatepickerBase.prototype._getDateFilter = function () {
|
|
2423
|
-
return this.
|
|
2470
|
+
return this.datepickerInput && this.datepickerInput.dateFilter;
|
|
2424
2471
|
};
|
|
2425
2472
|
MatDatepickerBase.prototype.ngOnChanges = function (changes) {
|
|
2426
2473
|
var positionChange = changes['xPosition'] || changes['yPosition'];
|
|
@@ -2430,13 +2477,13 @@
|
|
|
2430
2477
|
this._popupRef.updatePosition();
|
|
2431
2478
|
}
|
|
2432
2479
|
}
|
|
2433
|
-
this.
|
|
2480
|
+
this.stateChanges.next(undefined);
|
|
2434
2481
|
};
|
|
2435
2482
|
MatDatepickerBase.prototype.ngOnDestroy = function () {
|
|
2436
2483
|
this._destroyPopup();
|
|
2437
2484
|
this.close();
|
|
2438
2485
|
this._inputStateChanges.unsubscribe();
|
|
2439
|
-
this.
|
|
2486
|
+
this.stateChanges.complete();
|
|
2440
2487
|
};
|
|
2441
2488
|
/** Selects the given date */
|
|
2442
2489
|
MatDatepickerBase.prototype.select = function (date) {
|
|
@@ -2459,23 +2506,42 @@
|
|
|
2459
2506
|
* @param input The datepicker input to register with this datepicker.
|
|
2460
2507
|
* @returns Selection model that the input should hook itself up to.
|
|
2461
2508
|
*/
|
|
2462
|
-
MatDatepickerBase.prototype.
|
|
2509
|
+
MatDatepickerBase.prototype.registerInput = function (input) {
|
|
2463
2510
|
var _this = this;
|
|
2464
|
-
if (this.
|
|
2511
|
+
if (this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
2465
2512
|
throw Error('A MatDatepicker can only be associated with a single input.');
|
|
2466
2513
|
}
|
|
2467
2514
|
this._inputStateChanges.unsubscribe();
|
|
2468
|
-
this.
|
|
2515
|
+
this.datepickerInput = input;
|
|
2469
2516
|
this._inputStateChanges =
|
|
2470
|
-
input.stateChanges.subscribe(function () { return _this.
|
|
2517
|
+
input.stateChanges.subscribe(function () { return _this.stateChanges.next(undefined); });
|
|
2471
2518
|
return this._model;
|
|
2472
2519
|
};
|
|
2520
|
+
/**
|
|
2521
|
+
* Registers a portal containing action buttons with the datepicker.
|
|
2522
|
+
* @param portal Portal to be registered.
|
|
2523
|
+
*/
|
|
2524
|
+
MatDatepickerBase.prototype.registerActions = function (portal) {
|
|
2525
|
+
if (this._actionsPortal && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
2526
|
+
throw Error('A MatDatepicker can only be associated with a single actions row.');
|
|
2527
|
+
}
|
|
2528
|
+
this._actionsPortal = portal;
|
|
2529
|
+
};
|
|
2530
|
+
/**
|
|
2531
|
+
* Removes a portal containing action buttons from the datepicker.
|
|
2532
|
+
* @param portal Portal to be removed.
|
|
2533
|
+
*/
|
|
2534
|
+
MatDatepickerBase.prototype.removeActions = function (portal) {
|
|
2535
|
+
if (portal === this._actionsPortal) {
|
|
2536
|
+
this._actionsPortal = null;
|
|
2537
|
+
}
|
|
2538
|
+
};
|
|
2473
2539
|
/** Open the calendar. */
|
|
2474
2540
|
MatDatepickerBase.prototype.open = function () {
|
|
2475
2541
|
if (this._opened || this.disabled) {
|
|
2476
2542
|
return;
|
|
2477
2543
|
}
|
|
2478
|
-
if (!this.
|
|
2544
|
+
if (!this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
2479
2545
|
throw Error('Attempted to open an MatDatepicker with no associated input.');
|
|
2480
2546
|
}
|
|
2481
2547
|
if (this._document) {
|
|
@@ -2523,6 +2589,12 @@
|
|
|
2523
2589
|
completeClose();
|
|
2524
2590
|
}
|
|
2525
2591
|
};
|
|
2592
|
+
/** Applies the current pending selection on the popup to the model. */
|
|
2593
|
+
MatDatepickerBase.prototype._applyPendingSelection = function () {
|
|
2594
|
+
var _a, _b;
|
|
2595
|
+
var instance = ((_a = this._popupComponentRef) === null || _a === void 0 ? void 0 : _a.instance) || ((_b = this._dialogRef) === null || _b === void 0 ? void 0 : _b.componentInstance);
|
|
2596
|
+
instance === null || instance === void 0 ? void 0 : instance._applyPendingSelection();
|
|
2597
|
+
};
|
|
2526
2598
|
/** Open the calendar as a dialog. */
|
|
2527
2599
|
MatDatepickerBase.prototype._openAsDialog = function () {
|
|
2528
2600
|
var _this = this;
|
|
@@ -2549,7 +2621,9 @@
|
|
|
2549
2621
|
maxWidth: '80vw',
|
|
2550
2622
|
maxHeight: '',
|
|
2551
2623
|
position: {},
|
|
2552
|
-
|
|
2624
|
+
// Disable the dialog's automatic focus capturing, because it'll go to the close button
|
|
2625
|
+
// automatically. The calendar will move focus on its own once it renders.
|
|
2626
|
+
autoFocus: false,
|
|
2553
2627
|
// `MatDialog` has focus restoration built in, however we want to disable it since the
|
|
2554
2628
|
// datepicker also has focus restoration for dropdown mode. We want to do this, in order
|
|
2555
2629
|
// to ensure that the timing is consistent between dropdown and dialog modes since `MatDialog`
|
|
@@ -2578,12 +2652,13 @@
|
|
|
2578
2652
|
MatDatepickerBase.prototype._forwardContentValues = function (instance) {
|
|
2579
2653
|
instance.datepicker = this;
|
|
2580
2654
|
instance.color = this.color;
|
|
2655
|
+
instance._actionsPortal = this._actionsPortal;
|
|
2581
2656
|
};
|
|
2582
2657
|
/** Create the popup. */
|
|
2583
2658
|
MatDatepickerBase.prototype._createPopup = function () {
|
|
2584
2659
|
var _this = this;
|
|
2585
2660
|
var positionStrategy = this._overlay.position()
|
|
2586
|
-
.flexibleConnectedTo(this.
|
|
2661
|
+
.flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin())
|
|
2587
2662
|
.withTransformOriginOn('.mat-datepicker-content')
|
|
2588
2663
|
.withFlexibleDimensions(false)
|
|
2589
2664
|
.withViewportMargin(8)
|
|
@@ -2600,7 +2675,7 @@
|
|
|
2600
2675
|
this._popupRef.overlayElement.setAttribute('role', 'dialog');
|
|
2601
2676
|
rxjs.merge(this._popupRef.backdropClick(), this._popupRef.detachments(), this._popupRef.keydownEvents().pipe(operators.filter(function (event) {
|
|
2602
2677
|
// Closing on alt + up is only valid when there's an input associated with the datepicker.
|
|
2603
|
-
return (event.keyCode === keycodes.ESCAPE && !keycodes.hasModifierKey(event)) || (_this.
|
|
2678
|
+
return (event.keyCode === keycodes.ESCAPE && !keycodes.hasModifierKey(event)) || (_this.datepickerInput &&
|
|
2604
2679
|
keycodes.hasModifierKey(event, 'altKey') && event.keyCode === keycodes.UP_ARROW);
|
|
2605
2680
|
}))).subscribe(function (event) {
|
|
2606
2681
|
if (event) {
|
|
@@ -2702,7 +2777,10 @@
|
|
|
2702
2777
|
exportAs: 'matDatepicker',
|
|
2703
2778
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2704
2779
|
encapsulation: i0.ViewEncapsulation.None,
|
|
2705
|
-
providers: [
|
|
2780
|
+
providers: [
|
|
2781
|
+
MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER,
|
|
2782
|
+
{ provide: MatDatepickerBase, useExisting: MatDatepicker },
|
|
2783
|
+
]
|
|
2706
2784
|
},] }
|
|
2707
2785
|
];
|
|
2708
2786
|
|
|
@@ -2734,8 +2812,6 @@
|
|
|
2734
2812
|
this.dateChange = new i0.EventEmitter();
|
|
2735
2813
|
/** Emits when an `input` event is fired on this `<input>`. */
|
|
2736
2814
|
this.dateInput = new i0.EventEmitter();
|
|
2737
|
-
/** Emits when the value changes (either due to user input or programmatic change). */
|
|
2738
|
-
this._valueChange = new i0.EventEmitter();
|
|
2739
2815
|
/** Emits when the internal state has changed */
|
|
2740
2816
|
this.stateChanges = new rxjs.Subject();
|
|
2741
2817
|
this._onTouched = function () { };
|
|
@@ -2782,7 +2858,7 @@
|
|
|
2782
2858
|
}
|
|
2783
2859
|
// Update the displayed date when the locale changes.
|
|
2784
2860
|
this._localeSubscription = _dateAdapter.localeChanges.subscribe(function () {
|
|
2785
|
-
_this.
|
|
2861
|
+
_this._assignValueProgrammatically(_this.value);
|
|
2786
2862
|
});
|
|
2787
2863
|
}
|
|
2788
2864
|
Object.defineProperty(MatDatepickerInputBase.prototype, "value", {
|
|
@@ -2791,15 +2867,7 @@
|
|
|
2791
2867
|
return this._model ? this._getValueFromModel(this._model.selection) : this._pendingValue;
|
|
2792
2868
|
},
|
|
2793
2869
|
set: function (value) {
|
|
2794
|
-
|
|
2795
|
-
this._lastValueValid = this._isValidValue(value);
|
|
2796
|
-
value = this._dateAdapter.getValidDateOrNull(value);
|
|
2797
|
-
var oldDate = this.value;
|
|
2798
|
-
this._assignValue(value);
|
|
2799
|
-
this._formatValue(value);
|
|
2800
|
-
if (!this._dateAdapter.sameDate(oldDate, value)) {
|
|
2801
|
-
this._valueChange.emit(value);
|
|
2802
|
-
}
|
|
2870
|
+
this._assignValueProgrammatically(value);
|
|
2803
2871
|
},
|
|
2804
2872
|
enumerable: false,
|
|
2805
2873
|
configurable: true
|
|
@@ -2841,22 +2909,14 @@
|
|
|
2841
2909
|
this._assignValue(this._pendingValue);
|
|
2842
2910
|
}
|
|
2843
2911
|
this._valueChangesSubscription = this._model.selectionChanged.subscribe(function (event) {
|
|
2844
|
-
if (event
|
|
2912
|
+
if (_this._shouldHandleChangeEvent(event)) {
|
|
2845
2913
|
var value = _this._getValueFromModel(event.selection);
|
|
2846
2914
|
_this._lastValueValid = _this._isValidValue(value);
|
|
2847
2915
|
_this._cvaOnChange(value);
|
|
2848
2916
|
_this._onTouched();
|
|
2849
2917
|
_this._formatValue(value);
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
// good way of distinguishing it at the moment.
|
|
2853
|
-
if (_this._canEmitChangeEvent(event)) {
|
|
2854
|
-
_this.dateInput.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
|
|
2855
|
-
_this.dateChange.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
|
|
2856
|
-
}
|
|
2857
|
-
if (_this._outsideValueChanged) {
|
|
2858
|
-
_this._outsideValueChanged();
|
|
2859
|
-
}
|
|
2918
|
+
_this.dateInput.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
|
|
2919
|
+
_this.dateChange.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
|
|
2860
2920
|
}
|
|
2861
2921
|
});
|
|
2862
2922
|
};
|
|
@@ -2871,7 +2931,6 @@
|
|
|
2871
2931
|
MatDatepickerInputBase.prototype.ngOnDestroy = function () {
|
|
2872
2932
|
this._valueChangesSubscription.unsubscribe();
|
|
2873
2933
|
this._localeSubscription.unsubscribe();
|
|
2874
|
-
this._valueChange.complete();
|
|
2875
2934
|
this.stateChanges.complete();
|
|
2876
2935
|
};
|
|
2877
2936
|
/** @docs-private */
|
|
@@ -2884,7 +2943,7 @@
|
|
|
2884
2943
|
};
|
|
2885
2944
|
// Implemented as part of ControlValueAccessor.
|
|
2886
2945
|
MatDatepickerInputBase.prototype.writeValue = function (value) {
|
|
2887
|
-
this.value
|
|
2946
|
+
this._assignValueProgrammatically(value);
|
|
2888
2947
|
};
|
|
2889
2948
|
// Implemented as part of ControlValueAccessor.
|
|
2890
2949
|
MatDatepickerInputBase.prototype.registerOnChange = function (fn) {
|
|
@@ -2913,7 +2972,6 @@
|
|
|
2913
2972
|
if (!this._dateAdapter.sameDate(date, this.value)) {
|
|
2914
2973
|
this._assignValue(date);
|
|
2915
2974
|
this._cvaOnChange(date);
|
|
2916
|
-
this._valueChange.emit(date);
|
|
2917
2975
|
this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));
|
|
2918
2976
|
}
|
|
2919
2977
|
else {
|
|
@@ -2966,6 +3024,14 @@
|
|
|
2966
3024
|
MatDatepickerInputBase.prototype._parentDisabled = function () {
|
|
2967
3025
|
return false;
|
|
2968
3026
|
};
|
|
3027
|
+
/** Programmatically assigns a value to the input. */
|
|
3028
|
+
MatDatepickerInputBase.prototype._assignValueProgrammatically = function (value) {
|
|
3029
|
+
value = this._dateAdapter.deserialize(value);
|
|
3030
|
+
this._lastValueValid = this._isValidValue(value);
|
|
3031
|
+
value = this._dateAdapter.getValidDateOrNull(value);
|
|
3032
|
+
this._assignValue(value);
|
|
3033
|
+
this._formatValue(value);
|
|
3034
|
+
};
|
|
2969
3035
|
/** Gets whether a value matches the current date filter. */
|
|
2970
3036
|
MatDatepickerInputBase.prototype._matchesFilter = function (value) {
|
|
2971
3037
|
var filter = this._getDateFilter();
|
|
@@ -3036,15 +3102,18 @@
|
|
|
3036
3102
|
function MatDatepickerInput(elementRef, dateAdapter, dateFormats, _formField) {
|
|
3037
3103
|
var _this = _super.call(this, elementRef, dateAdapter, dateFormats) || this;
|
|
3038
3104
|
_this._formField = _formField;
|
|
3105
|
+
_this._closedSubscription = rxjs.Subscription.EMPTY;
|
|
3039
3106
|
_this._validator = forms.Validators.compose(_super.prototype._getValidators.call(_this));
|
|
3040
3107
|
return _this;
|
|
3041
3108
|
}
|
|
3042
3109
|
Object.defineProperty(MatDatepickerInput.prototype, "matDatepicker", {
|
|
3043
3110
|
/** The datepicker that this input is associated with. */
|
|
3044
3111
|
set: function (datepicker) {
|
|
3112
|
+
var _this = this;
|
|
3045
3113
|
if (datepicker) {
|
|
3046
3114
|
this._datepicker = datepicker;
|
|
3047
|
-
this.
|
|
3115
|
+
this._closedSubscription = datepicker.closedStream.subscribe(function () { return _this._onTouched(); });
|
|
3116
|
+
this._registerModel(datepicker.registerInput(this));
|
|
3048
3117
|
}
|
|
3049
3118
|
},
|
|
3050
3119
|
enumerable: false,
|
|
@@ -3104,6 +3173,10 @@
|
|
|
3104
3173
|
MatDatepickerInput.prototype.getStartValue = function () {
|
|
3105
3174
|
return this.value;
|
|
3106
3175
|
};
|
|
3176
|
+
MatDatepickerInput.prototype.ngOnDestroy = function () {
|
|
3177
|
+
_super.prototype.ngOnDestroy.call(this);
|
|
3178
|
+
this._closedSubscription.unsubscribe();
|
|
3179
|
+
};
|
|
3107
3180
|
/** Opens the associated datepicker. */
|
|
3108
3181
|
MatDatepickerInput.prototype._openPopup = function () {
|
|
3109
3182
|
if (this._datepicker) {
|
|
@@ -3130,8 +3203,8 @@
|
|
|
3130
3203
|
MatDatepickerInput.prototype._getDateFilter = function () {
|
|
3131
3204
|
return this._dateFilter;
|
|
3132
3205
|
};
|
|
3133
|
-
MatDatepickerInput.prototype.
|
|
3134
|
-
return
|
|
3206
|
+
MatDatepickerInput.prototype._shouldHandleChangeEvent = function (event) {
|
|
3207
|
+
return event.source !== this;
|
|
3135
3208
|
};
|
|
3136
3209
|
return MatDatepickerInput;
|
|
3137
3210
|
}(MatDatepickerInputBase));
|
|
@@ -3233,9 +3306,9 @@
|
|
|
3233
3306
|
};
|
|
3234
3307
|
MatDatepickerToggle.prototype._watchStateChanges = function () {
|
|
3235
3308
|
var _this = this;
|
|
3236
|
-
var datepickerStateChanged = this.datepicker ? this.datepicker.
|
|
3237
|
-
var inputStateChanged = this.datepicker && this.datepicker.
|
|
3238
|
-
this.datepicker.
|
|
3309
|
+
var datepickerStateChanged = this.datepicker ? this.datepicker.stateChanges : rxjs.of();
|
|
3310
|
+
var inputStateChanged = this.datepicker && this.datepicker.datepickerInput ?
|
|
3311
|
+
this.datepicker.datepickerInput.stateChanges : rxjs.of();
|
|
3239
3312
|
var datepickerToggled = this.datepicker ?
|
|
3240
3313
|
rxjs.merge(this.datepicker.openedStream, this.datepicker.closedStream) :
|
|
3241
3314
|
rxjs.of();
|
|
@@ -3247,18 +3320,15 @@
|
|
|
3247
3320
|
MatDatepickerToggle.decorators = [
|
|
3248
3321
|
{ type: i0.Component, args: [{
|
|
3249
3322
|
selector: 'mat-datepicker-toggle',
|
|
3250
|
-
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",
|
|
3323
|
+
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",
|
|
3251
3324
|
host: {
|
|
3252
3325
|
'class': 'mat-datepicker-toggle',
|
|
3253
|
-
|
|
3254
|
-
// consumer may have provided, while still being able to receive focus.
|
|
3255
|
-
'[attr.tabindex]': 'disabled ? null : -1',
|
|
3326
|
+
'[attr.tabindex]': 'null',
|
|
3256
3327
|
'[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',
|
|
3257
3328
|
'[class.mat-accent]': 'datepicker && datepicker.color === "accent"',
|
|
3258
3329
|
'[class.mat-warn]': 'datepicker && datepicker.color === "warn"',
|
|
3259
3330
|
// Used by the test harness to tie this toggle to its datepicker.
|
|
3260
3331
|
'[attr.data-mat-calendar]': 'datepicker ? datepicker.id : null',
|
|
3261
|
-
'(focus)': '_button.focus()',
|
|
3262
3332
|
},
|
|
3263
3333
|
exportAs: 'matDatepickerToggle',
|
|
3264
3334
|
encapsulation: i0.ViewEncapsulation.None,
|
|
@@ -3274,6 +3344,7 @@
|
|
|
3274
3344
|
MatDatepickerToggle.propDecorators = {
|
|
3275
3345
|
datepicker: [{ type: i0.Input, args: ['for',] }],
|
|
3276
3346
|
tabIndex: [{ type: i0.Input }],
|
|
3347
|
+
ariaLabel: [{ type: i0.Input, args: ['aria-label',] }],
|
|
3277
3348
|
disabled: [{ type: i0.Input }],
|
|
3278
3349
|
disableRipple: [{ type: i0.Input }],
|
|
3279
3350
|
_customIcon: [{ type: i0.ContentChild, args: [MatDatepickerToggleIcon,] }],
|
|
@@ -3297,11 +3368,6 @@
|
|
|
3297
3368
|
_this._injector = _injector;
|
|
3298
3369
|
_this._parentForm = _parentForm;
|
|
3299
3370
|
_this._parentFormGroup = _parentFormGroup;
|
|
3300
|
-
_this._outsideValueChanged = function () {
|
|
3301
|
-
// Whenever the value changes outside the input we need to revalidate, because
|
|
3302
|
-
// the validation state of each of the inputs depends on the other one.
|
|
3303
|
-
_this._validatorOnChange();
|
|
3304
|
-
};
|
|
3305
3371
|
return _this;
|
|
3306
3372
|
}
|
|
3307
3373
|
MatDateRangeInputPartBase.prototype.ngOnInit = function () {
|
|
@@ -3360,6 +3426,16 @@
|
|
|
3360
3426
|
MatDateRangeInputPartBase.prototype._parentDisabled = function () {
|
|
3361
3427
|
return this._rangeInput._groupDisabled;
|
|
3362
3428
|
};
|
|
3429
|
+
MatDateRangeInputPartBase.prototype._shouldHandleChangeEvent = function (_a) {
|
|
3430
|
+
var source = _a.source;
|
|
3431
|
+
return source !== this._rangeInput._startInput && source !== this._rangeInput._endInput;
|
|
3432
|
+
};
|
|
3433
|
+
MatDateRangeInputPartBase.prototype._assignValueProgrammatically = function (value) {
|
|
3434
|
+
_super.prototype._assignValueProgrammatically.call(this, value);
|
|
3435
|
+
var opposite = (this === this._rangeInput._startInput ? this._rangeInput._endInput :
|
|
3436
|
+
this._rangeInput._startInput);
|
|
3437
|
+
opposite === null || opposite === void 0 ? void 0 : opposite._validatorOnChange();
|
|
3438
|
+
};
|
|
3363
3439
|
return MatDateRangeInputPartBase;
|
|
3364
3440
|
}(MatDatepickerInputBase));
|
|
3365
3441
|
MatDateRangeInputPartBase.decorators = [
|
|
@@ -3396,9 +3472,6 @@
|
|
|
3396
3472
|
null : { 'matStartDateInvalid': { 'end': end, 'actual': start } };
|
|
3397
3473
|
};
|
|
3398
3474
|
_this._validator = forms.Validators.compose(__spread(_super.prototype._getValidators.call(_this), [_this._startValidator]));
|
|
3399
|
-
_this._canEmitChangeEvent = function (event) {
|
|
3400
|
-
return event.source !== _this._rangeInput._endInput;
|
|
3401
|
-
};
|
|
3402
3475
|
return _this;
|
|
3403
3476
|
}
|
|
3404
3477
|
MatStartDate.prototype.ngOnInit = function () {
|
|
@@ -3426,7 +3499,6 @@
|
|
|
3426
3499
|
if (this._model) {
|
|
3427
3500
|
var range = new DateRange(value, this._model.selection.end);
|
|
3428
3501
|
this._model.updateSelection(range, this);
|
|
3429
|
-
this._cvaOnChange(value);
|
|
3430
3502
|
}
|
|
3431
3503
|
};
|
|
3432
3504
|
MatStartDate.prototype._formatValue = function (value) {
|
|
@@ -3465,7 +3537,8 @@
|
|
|
3465
3537
|
],
|
|
3466
3538
|
// These need to be specified explicitly, because some tooling doesn't
|
|
3467
3539
|
// seem to pick them up from the base class. See #20932.
|
|
3468
|
-
outputs: ['dateChange', 'dateInput']
|
|
3540
|
+
outputs: ['dateChange', 'dateInput'],
|
|
3541
|
+
inputs: ['errorStateMatcher']
|
|
3469
3542
|
},] }
|
|
3470
3543
|
];
|
|
3471
3544
|
MatStartDate.ctorParameters = function () { return [
|
|
@@ -3496,9 +3569,6 @@
|
|
|
3496
3569
|
null : { 'matEndDateInvalid': { 'start': start, 'actual': end } };
|
|
3497
3570
|
};
|
|
3498
3571
|
_this._validator = forms.Validators.compose(__spread(_super.prototype._getValidators.call(_this), [_this._endValidator]));
|
|
3499
|
-
_this._canEmitChangeEvent = function (event) {
|
|
3500
|
-
return event.source !== _this._rangeInput._startInput;
|
|
3501
|
-
};
|
|
3502
3572
|
return _this;
|
|
3503
3573
|
}
|
|
3504
3574
|
MatEndDate.prototype.ngOnInit = function () {
|
|
@@ -3526,7 +3596,6 @@
|
|
|
3526
3596
|
if (this._model) {
|
|
3527
3597
|
var range = new DateRange(this._model.selection.start, value);
|
|
3528
3598
|
this._model.updateSelection(range, this);
|
|
3529
|
-
this._cvaOnChange(value);
|
|
3530
3599
|
}
|
|
3531
3600
|
};
|
|
3532
3601
|
MatEndDate.prototype._onKeydown = function (event) {
|
|
@@ -3560,7 +3629,8 @@
|
|
|
3560
3629
|
],
|
|
3561
3630
|
// These need to be specified explicitly, because some tooling doesn't
|
|
3562
3631
|
// seem to pick them up from the base class. See #20932.
|
|
3563
|
-
outputs: ['dateChange', 'dateInput']
|
|
3632
|
+
outputs: ['dateChange', 'dateInput'],
|
|
3633
|
+
inputs: ['errorStateMatcher']
|
|
3564
3634
|
},] }
|
|
3565
3635
|
];
|
|
3566
3636
|
MatEndDate.ctorParameters = function () { return [
|
|
@@ -3588,6 +3658,7 @@
|
|
|
3588
3658
|
this._elementRef = _elementRef;
|
|
3589
3659
|
this._dateAdapter = _dateAdapter;
|
|
3590
3660
|
this._formField = _formField;
|
|
3661
|
+
this._closedSubscription = rxjs.Subscription.EMPTY;
|
|
3591
3662
|
/** Unique ID for the input. */
|
|
3592
3663
|
this.id = "mat-date-range-input-" + nextUniqueId++;
|
|
3593
3664
|
/** Whether the control is focused. */
|
|
@@ -3646,9 +3717,16 @@
|
|
|
3646
3717
|
/** The range picker that this input is associated with. */
|
|
3647
3718
|
get: function () { return this._rangePicker; },
|
|
3648
3719
|
set: function (rangePicker) {
|
|
3720
|
+
var _this = this;
|
|
3649
3721
|
if (rangePicker) {
|
|
3650
|
-
this._model = rangePicker.
|
|
3722
|
+
this._model = rangePicker.registerInput(this);
|
|
3651
3723
|
this._rangePicker = rangePicker;
|
|
3724
|
+
this._closedSubscription.unsubscribe();
|
|
3725
|
+
this._closedSubscription = rangePicker.closedStream.subscribe(function () {
|
|
3726
|
+
var _a, _b;
|
|
3727
|
+
(_a = _this._startInput) === null || _a === void 0 ? void 0 : _a._onTouched();
|
|
3728
|
+
(_b = _this._endInput) === null || _b === void 0 ? void 0 : _b._onTouched();
|
|
3729
|
+
});
|
|
3652
3730
|
this._registerModel(this._model);
|
|
3653
3731
|
}
|
|
3654
3732
|
},
|
|
@@ -3793,6 +3871,7 @@
|
|
|
3793
3871
|
}
|
|
3794
3872
|
};
|
|
3795
3873
|
MatDateRangeInput.prototype.ngOnDestroy = function () {
|
|
3874
|
+
this._closedSubscription.unsubscribe();
|
|
3796
3875
|
this.stateChanges.complete();
|
|
3797
3876
|
};
|
|
3798
3877
|
/** Gets the date at which the calendar should start. */
|
|
@@ -3913,7 +3992,7 @@
|
|
|
3913
3992
|
}
|
|
3914
3993
|
MatDateRangePicker.prototype._forwardContentValues = function (instance) {
|
|
3915
3994
|
_super.prototype._forwardContentValues.call(this, instance);
|
|
3916
|
-
var input = this.
|
|
3995
|
+
var input = this.datepickerInput;
|
|
3917
3996
|
if (input) {
|
|
3918
3997
|
instance.comparisonStart = input.comparisonStart;
|
|
3919
3998
|
instance.comparisonEnd = input.comparisonEnd;
|
|
@@ -3931,10 +4010,94 @@
|
|
|
3931
4010
|
providers: [
|
|
3932
4011
|
MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,
|
|
3933
4012
|
MAT_CALENDAR_RANGE_STRATEGY_PROVIDER,
|
|
4013
|
+
{ provide: MatDatepickerBase, useExisting: MatDateRangePicker },
|
|
3934
4014
|
]
|
|
3935
4015
|
},] }
|
|
3936
4016
|
];
|
|
3937
4017
|
|
|
4018
|
+
/**
|
|
4019
|
+
* @license
|
|
4020
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4021
|
+
*
|
|
4022
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
4023
|
+
* found in the LICENSE file at https://angular.io/license
|
|
4024
|
+
*/
|
|
4025
|
+
/** Button that will close the datepicker and assign the current selection to the data model. */
|
|
4026
|
+
var MatDatepickerApply = /** @class */ (function () {
|
|
4027
|
+
function MatDatepickerApply(_datepicker) {
|
|
4028
|
+
this._datepicker = _datepicker;
|
|
4029
|
+
}
|
|
4030
|
+
MatDatepickerApply.prototype._applySelection = function () {
|
|
4031
|
+
this._datepicker._applyPendingSelection();
|
|
4032
|
+
this._datepicker.close();
|
|
4033
|
+
};
|
|
4034
|
+
return MatDatepickerApply;
|
|
4035
|
+
}());
|
|
4036
|
+
MatDatepickerApply.decorators = [
|
|
4037
|
+
{ type: i0.Directive, args: [{
|
|
4038
|
+
selector: '[matDatepickerApply], [matDateRangePickerApply]',
|
|
4039
|
+
host: { '(click)': '_applySelection()' }
|
|
4040
|
+
},] }
|
|
4041
|
+
];
|
|
4042
|
+
MatDatepickerApply.ctorParameters = function () { return [
|
|
4043
|
+
{ type: MatDatepickerBase }
|
|
4044
|
+
]; };
|
|
4045
|
+
/** Button that will close the datepicker and discard the current selection. */
|
|
4046
|
+
var MatDatepickerCancel = /** @class */ (function () {
|
|
4047
|
+
function MatDatepickerCancel(_datepicker) {
|
|
4048
|
+
this._datepicker = _datepicker;
|
|
4049
|
+
}
|
|
4050
|
+
return MatDatepickerCancel;
|
|
4051
|
+
}());
|
|
4052
|
+
MatDatepickerCancel.decorators = [
|
|
4053
|
+
{ type: i0.Directive, args: [{
|
|
4054
|
+
selector: '[matDatepickerCancel], [matDateRangePickerCancel]',
|
|
4055
|
+
host: { '(click)': '_datepicker.close()' }
|
|
4056
|
+
},] }
|
|
4057
|
+
];
|
|
4058
|
+
MatDatepickerCancel.ctorParameters = function () { return [
|
|
4059
|
+
{ type: MatDatepickerBase }
|
|
4060
|
+
]; };
|
|
4061
|
+
/**
|
|
4062
|
+
* Container that can be used to project a row of action buttons
|
|
4063
|
+
* to the bottom of a datepicker or date range picker.
|
|
4064
|
+
*/
|
|
4065
|
+
var MatDatepickerActions = /** @class */ (function () {
|
|
4066
|
+
function MatDatepickerActions(_datepicker, _viewContainerRef) {
|
|
4067
|
+
this._datepicker = _datepicker;
|
|
4068
|
+
this._viewContainerRef = _viewContainerRef;
|
|
4069
|
+
}
|
|
4070
|
+
MatDatepickerActions.prototype.ngAfterViewInit = function () {
|
|
4071
|
+
this._portal = new portal.TemplatePortal(this._template, this._viewContainerRef);
|
|
4072
|
+
this._datepicker.registerActions(this._portal);
|
|
4073
|
+
};
|
|
4074
|
+
MatDatepickerActions.prototype.ngOnDestroy = function () {
|
|
4075
|
+
var _a;
|
|
4076
|
+
this._datepicker.removeActions(this._portal);
|
|
4077
|
+
// Needs to be null checked since we initialize it in `ngAfterViewInit`.
|
|
4078
|
+
if (this._portal && this._portal.isAttached) {
|
|
4079
|
+
(_a = this._portal) === null || _a === void 0 ? void 0 : _a.detach();
|
|
4080
|
+
}
|
|
4081
|
+
};
|
|
4082
|
+
return MatDatepickerActions;
|
|
4083
|
+
}());
|
|
4084
|
+
MatDatepickerActions.decorators = [
|
|
4085
|
+
{ type: i0.Component, args: [{
|
|
4086
|
+
selector: 'mat-datepicker-actions, mat-date-range-picker-actions',
|
|
4087
|
+
template: "\n <ng-template>\n <div class=\"mat-datepicker-actions\">\n <ng-content></ng-content>\n </div>\n </ng-template>\n ",
|
|
4088
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
4089
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
4090
|
+
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"]
|
|
4091
|
+
},] }
|
|
4092
|
+
];
|
|
4093
|
+
MatDatepickerActions.ctorParameters = function () { return [
|
|
4094
|
+
{ type: MatDatepickerBase },
|
|
4095
|
+
{ type: i0.ViewContainerRef }
|
|
4096
|
+
]; };
|
|
4097
|
+
MatDatepickerActions.propDecorators = {
|
|
4098
|
+
_template: [{ type: i0.ViewChild, args: [i0.TemplateRef,] }]
|
|
4099
|
+
};
|
|
4100
|
+
|
|
3938
4101
|
/**
|
|
3939
4102
|
* @license
|
|
3940
4103
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -3975,6 +4138,9 @@
|
|
|
3975
4138
|
MatStartDate,
|
|
3976
4139
|
MatEndDate,
|
|
3977
4140
|
MatDateRangePicker,
|
|
4141
|
+
MatDatepickerActions,
|
|
4142
|
+
MatDatepickerCancel,
|
|
4143
|
+
MatDatepickerApply
|
|
3978
4144
|
],
|
|
3979
4145
|
declarations: [
|
|
3980
4146
|
MatCalendar,
|
|
@@ -3992,6 +4158,9 @@
|
|
|
3992
4158
|
MatStartDate,
|
|
3993
4159
|
MatEndDate,
|
|
3994
4160
|
MatDateRangePicker,
|
|
4161
|
+
MatDatepickerActions,
|
|
4162
|
+
MatDatepickerCancel,
|
|
4163
|
+
MatDatepickerApply
|
|
3995
4164
|
],
|
|
3996
4165
|
providers: [
|
|
3997
4166
|
MatDatepickerIntl,
|
|
@@ -4036,6 +4205,9 @@
|
|
|
4036
4205
|
exports.MatDateRangePicker = MatDateRangePicker;
|
|
4037
4206
|
exports.MatDateSelectionModel = MatDateSelectionModel;
|
|
4038
4207
|
exports.MatDatepicker = MatDatepicker;
|
|
4208
|
+
exports.MatDatepickerActions = MatDatepickerActions;
|
|
4209
|
+
exports.MatDatepickerApply = MatDatepickerApply;
|
|
4210
|
+
exports.MatDatepickerCancel = MatDatepickerCancel;
|
|
4039
4211
|
exports.MatDatepickerContent = MatDatepickerContent;
|
|
4040
4212
|
exports.MatDatepickerInput = MatDatepickerInput;
|
|
4041
4213
|
exports.MatDatepickerInputEvent = MatDatepickerInputEvent;
|