@angular/material 10.1.1 → 10.2.0
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 +46 -20
- package/autocomplete/autocomplete-origin.d.ts +8 -5
- package/autocomplete/autocomplete-trigger.d.ts +23 -17
- package/autocomplete/autocomplete.d.ts +23 -12
- package/autocomplete/index.metadata.json +1 -1
- package/badge/badge.d.ts +3 -1
- package/badge/index.metadata.json +1 -1
- package/bottom-sheet/index.metadata.json +1 -1
- package/bundles/material-autocomplete-testing.umd.js +316 -256
- package/bundles/material-autocomplete-testing.umd.js.map +1 -1
- package/bundles/material-autocomplete-testing.umd.min.js +2 -16
- package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
- package/bundles/material-autocomplete.umd.js +553 -436
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +3 -25
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-badge-testing.umd.js +301 -243
- package/bundles/material-badge-testing.umd.js.map +1 -1
- package/bundles/material-badge-testing.umd.min.js +2 -16
- package/bundles/material-badge-testing.umd.min.js.map +1 -1
- package/bundles/material-badge.umd.js +356 -282
- package/bundles/material-badge.umd.js.map +1 -1
- package/bundles/material-badge.umd.min.js +2 -2
- package/bundles/material-badge.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.js +302 -244
- package/bundles/material-bottom-sheet-testing.umd.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js +2 -16
- package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.js +376 -302
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.min.js +17 -2
- package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
- package/bundles/material-button-testing.umd.js +310 -252
- package/bundles/material-button-testing.umd.js.map +1 -1
- package/bundles/material-button-testing.umd.min.js +2 -16
- package/bundles/material-button-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.js +304 -261
- package/bundles/material-button-toggle-testing.umd.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.min.js +2 -31
- package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +388 -322
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.min.js +2 -10
- package/bundles/material-button-toggle.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +375 -309
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +2 -10
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card-testing.umd.js +306 -250
- package/bundles/material-card-testing.umd.js.map +1 -1
- package/bundles/material-card-testing.umd.min.js +2 -16
- package/bundles/material-card-testing.umd.min.js.map +1 -1
- package/bundles/material-card.umd.js +139 -139
- package/bundles/material-card.umd.js.map +1 -1
- package/bundles/material-card.umd.min.js +2 -2
- package/bundles/material-card.umd.min.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.js +302 -244
- package/bundles/material-checkbox-testing.umd.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.min.js +2 -16
- package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js +371 -312
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-checkbox.umd.min.js +2 -9
- package/bundles/material-checkbox.umd.min.js.map +1 -1
- package/bundles/material-chips-testing.umd.js +802 -0
- package/bundles/material-chips-testing.umd.js.map +1 -0
- package/bundles/material-chips-testing.umd.min.js +30 -0
- package/bundles/material-chips-testing.umd.min.js.map +1 -0
- package/bundles/material-chips.umd.js +598 -551
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-chips.umd.min.js +18 -3
- package/bundles/material-chips.umd.min.js.map +1 -1
- package/bundles/material-core-testing.umd.js +304 -261
- package/bundles/material-core-testing.umd.js.map +1 -1
- package/bundles/material-core-testing.umd.min.js +2 -31
- package/bundles/material-core-testing.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +605 -540
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +37 -12
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker-testing.umd.js +1342 -0
- package/bundles/material-datepicker-testing.umd.js.map +1 -0
- package/bundles/material-datepicker-testing.umd.min.js +30 -0
- package/bundles/material-datepicker-testing.umd.min.js.map +1 -0
- package/bundles/material-datepicker.umd.js +1014 -981
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +43 -9
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-dialog-testing.umd.js +303 -245
- package/bundles/material-dialog-testing.umd.js.map +1 -1
- package/bundles/material-dialog-testing.umd.min.js +2 -16
- package/bundles/material-dialog-testing.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +597 -476
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js +10 -8
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-divider-testing.umd.js +300 -242
- package/bundles/material-divider-testing.umd.js.map +1 -1
- package/bundles/material-divider-testing.umd.min.js +2 -16
- package/bundles/material-divider-testing.umd.min.js.map +1 -1
- package/bundles/material-divider.umd.js +28 -28
- package/bundles/material-divider.umd.js.map +1 -1
- package/bundles/material-divider.umd.min.js +2 -9
- package/bundles/material-divider.umd.min.js.map +1 -1
- package/bundles/material-expansion-testing.umd.js +303 -254
- package/bundles/material-expansion-testing.umd.js.map +1 -1
- package/bundles/material-expansion-testing.umd.min.js +2 -17
- package/bundles/material-expansion-testing.umd.min.js.map +1 -1
- package/bundles/material-expansion.umd.js +471 -433
- package/bundles/material-expansion.umd.js.map +1 -1
- package/bundles/material-expansion.umd.min.js +12 -4
- package/bundles/material-expansion.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing-control.umd.js +299 -233
- package/bundles/material-form-field-testing-control.umd.js.map +1 -1
- package/bundles/material-form-field-testing-control.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing.umd.js +301 -243
- package/bundles/material-form-field-testing.umd.js.map +1 -1
- package/bundles/material-form-field-testing.umd.min.js +3 -17
- package/bundles/material-form-field-testing.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +480 -417
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +51 -4
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.js +311 -260
- package/bundles/material-grid-list-testing.umd.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.min.js +2 -24
- package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
- package/bundles/material-grid-list.umd.js +414 -340
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +20 -5
- package/bundles/material-grid-list.umd.min.js.map +1 -1
- package/bundles/material-icon-testing.umd.js +409 -12
- package/bundles/material-icon-testing.umd.js.map +1 -1
- package/bundles/material-icon-testing.umd.min.js +18 -3
- package/bundles/material-icon-testing.umd.min.js.map +1 -1
- package/bundles/material-icon.umd.js +404 -336
- package/bundles/material-icon.umd.js.map +1 -1
- package/bundles/material-icon.umd.min.js +2 -9
- package/bundles/material-icon.umd.min.js.map +1 -1
- package/bundles/material-input-testing.umd.js +309 -262
- package/bundles/material-input-testing.umd.js.map +1 -1
- package/bundles/material-input-testing.umd.min.js +2 -16
- package/bundles/material-input-testing.umd.min.js.map +1 -1
- package/bundles/material-input.umd.js +399 -333
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-input.umd.min.js +5 -18
- package/bundles/material-input.umd.min.js.map +1 -1
- package/bundles/material-list-testing.umd.js +333 -311
- package/bundles/material-list-testing.umd.js.map +1 -1
- package/bundles/material-list-testing.umd.min.js +1 -9
- package/bundles/material-list-testing.umd.min.js.map +1 -1
- package/bundles/material-list.umd.js +527 -466
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +2 -10
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu-testing.umd.js +305 -247
- package/bundles/material-menu-testing.umd.js.map +1 -1
- package/bundles/material-menu-testing.umd.min.js +2 -17
- package/bundles/material-menu-testing.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +476 -429
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +3 -17
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-paginator-testing.umd.js +302 -244
- package/bundles/material-paginator-testing.umd.js.map +1 -1
- package/bundles/material-paginator-testing.umd.min.js +2 -16
- package/bundles/material-paginator-testing.umd.min.js.map +1 -1
- package/bundles/material-paginator.umd.js +349 -280
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-paginator.umd.min.js +2 -9
- package/bundles/material-paginator.umd.min.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.js +301 -243
- package/bundles/material-progress-bar-testing.umd.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js +2 -16
- package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-bar.umd.js +339 -266
- package/bundles/material-progress-bar.umd.js.map +1 -1
- package/bundles/material-progress-bar.umd.min.js +4 -3
- package/bundles/material-progress-bar.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.js +301 -243
- package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.min.js +2 -16
- package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +420 -365
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.min.js +3 -11
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio-testing.umd.js +304 -246
- package/bundles/material-radio-testing.umd.js.map +1 -1
- package/bundles/material-radio-testing.umd.min.js +2 -17
- package/bundles/material-radio-testing.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +405 -339
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +2 -10
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select-testing.umd.js +316 -260
- package/bundles/material-select-testing.umd.js.map +1 -1
- package/bundles/material-select-testing.umd.min.js +2 -16
- package/bundles/material-select-testing.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +469 -389
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +5 -12
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.js +303 -252
- package/bundles/material-sidenav-testing.umd.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.min.js +1 -23
- package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
- package/bundles/material-sidenav.umd.js +535 -496
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.min.js +3 -3
- package/bundles/material-sidenav.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.js +302 -244
- package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.min.js +2 -16
- package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js +373 -314
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slide-toggle.umd.min.js +2 -9
- package/bundles/material-slide-toggle.umd.min.js.map +1 -1
- package/bundles/material-slider-testing.umd.js +302 -236
- package/bundles/material-slider-testing.umd.js.map +1 -1
- package/bundles/material-slider-testing.umd.min.js +2 -9
- package/bundles/material-slider-testing.umd.min.js.map +1 -1
- package/bundles/material-slider.umd.js +479 -448
- package/bundles/material-slider.umd.js.map +1 -1
- package/bundles/material-slider.umd.min.js +4 -3
- package/bundles/material-slider.umd.min.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.js +304 -246
- package/bundles/material-snack-bar-testing.umd.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.min.js +2 -16
- package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +394 -317
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +26 -2
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-sort-testing.umd.js +302 -243
- package/bundles/material-sort-testing.umd.js.map +1 -1
- package/bundles/material-sort-testing.umd.min.js +2 -17
- package/bundles/material-sort-testing.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +383 -326
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +3 -33
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-stepper-testing.umd.js +727 -0
- package/bundles/material-stepper-testing.umd.js.map +1 -0
- package/bundles/material-stepper-testing.umd.min.js +30 -0
- package/bundles/material-stepper-testing.umd.min.js.map +1 -0
- package/bundles/material-stepper.umd.js +496 -446
- package/bundles/material-stepper.umd.js.map +1 -1
- package/bundles/material-stepper.umd.min.js +4 -11
- package/bundles/material-stepper.umd.min.js.map +1 -1
- package/bundles/material-table-testing.umd.js +317 -265
- package/bundles/material-table-testing.umd.js.map +1 -1
- package/bundles/material-table-testing.umd.min.js +2 -24
- package/bundles/material-table-testing.umd.min.js.map +1 -1
- package/bundles/material-table.umd.js +521 -465
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-table.umd.min.js +4 -11
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs-testing.umd.js +303 -244
- package/bundles/material-tabs-testing.umd.js.map +1 -1
- package/bundles/material-tabs-testing.umd.min.js +1 -16
- package/bundles/material-tabs-testing.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +677 -646
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +29 -4
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.js +301 -243
- package/bundles/material-toolbar-testing.umd.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.min.js +2 -16
- package/bundles/material-toolbar-testing.umd.min.js.map +1 -1
- package/bundles/material-toolbar.umd.js +350 -286
- package/bundles/material-toolbar.umd.js.map +1 -1
- package/bundles/material-toolbar.umd.min.js +4 -3
- package/bundles/material-toolbar.umd.min.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.js +301 -243
- package/bundles/material-tooltip-testing.umd.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.min.js +2 -16
- package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +424 -324
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js +11 -3
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js +446 -385
- 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/index.metadata.json +1 -1
- package/chips/chip-default-options.d.ts +1 -1
- package/chips/chip-input.d.ts +1 -1
- package/chips/chip.d.ts +2 -2
- package/chips/index.metadata.json +1 -1
- package/chips/testing/chip-harness-filters.d.ts +28 -0
- package/chips/testing/chip-harness.d.ts +41 -0
- package/chips/testing/chip-input-harness.d.ts +47 -0
- package/chips/testing/chip-list-harness.d.ts +49 -0
- package/chips/testing/chip-remove-harness.d.ts +22 -0
- package/chips/testing/index.d.ts +8 -0
- package/chips/testing/package.json +9 -0
- package/chips/testing/public-api.d.ts +12 -0
- package/core/common-behaviors/color.d.ts +2 -0
- package/core/common-behaviors/constructor.d.ts +7 -0
- package/core/common-behaviors/disable-ripple.d.ts +2 -2
- package/core/common-behaviors/tabindex.d.ts +4 -2
- package/core/datetime/date-adapter.d.ts +9 -2
- package/core/index.metadata.json +1 -1
- package/core/option/optgroup.d.ts +8 -6
- package/core/option/option.d.ts +12 -9
- package/core/style/_vendor-prefixes.scss +5 -0
- package/datepicker/_datepicker-theme.scss +42 -21
- package/datepicker/calendar-body.d.ts +15 -4
- package/datepicker/calendar.d.ts +2 -7
- package/datepicker/date-range-input.d.ts +0 -5
- package/datepicker/date-range-selection-strategy.d.ts +5 -1
- package/datepicker/datepicker-base.d.ts +9 -11
- package/datepicker/datepicker-input-base.d.ts +0 -5
- package/datepicker/index.d.ts +4 -3
- package/datepicker/index.metadata.json +1 -1
- package/datepicker/month-view.d.ts +5 -9
- package/datepicker/multi-year-view.d.ts +3 -6
- package/datepicker/public-api.d.ts +1 -1
- package/datepicker/testing/calendar-cell-harness.d.ts +64 -0
- package/datepicker/testing/calendar-harness.d.ts +53 -0
- package/datepicker/testing/date-range-input-harness.d.ts +59 -0
- package/datepicker/testing/datepicker-harness-filters.d.ts +45 -0
- package/datepicker/testing/datepicker-input-harness-base.d.ts +43 -0
- package/datepicker/testing/datepicker-input-harness.d.ts +36 -0
- package/datepicker/testing/datepicker-toggle-harness.d.ts +28 -0
- package/datepicker/testing/datepicker-trigger-harness-base.d.ts +44 -0
- package/datepicker/testing/index.d.ts +8 -0
- package/datepicker/testing/package.json +9 -0
- package/datepicker/testing/public-api.d.ts +13 -0
- package/datepicker/year-view.d.ts +3 -6
- package/dialog/dialog-config.d.ts +1 -1
- package/dialog/dialog-container.d.ts +39 -22
- package/dialog/dialog-ref.d.ts +3 -3
- package/dialog/dialog.d.ts +25 -14
- package/dialog/index.metadata.json +1 -1
- package/esm2015/autocomplete/autocomplete-module.js +10 -5
- package/esm2015/autocomplete/autocomplete-origin.js +15 -9
- package/esm2015/autocomplete/autocomplete-trigger.js +73 -53
- package/esm2015/autocomplete/autocomplete.js +35 -22
- package/esm2015/autocomplete/testing/autocomplete-harness-filters.js +1 -0
- package/esm2015/badge/badge.js +15 -7
- package/esm2015/badge/testing/badge-harness-filters.js +1 -0
- package/esm2015/bottom-sheet/bottom-sheet-container.js +2 -2
- package/esm2015/bottom-sheet/bottom-sheet-ref.js +3 -3
- package/esm2015/bottom-sheet/bottom-sheet.js +14 -13
- package/esm2015/bottom-sheet/testing/bottom-sheet-harness-filters.js +1 -0
- package/esm2015/button/button.js +3 -3
- package/esm2015/button/testing/button-harness-filters.js +1 -0
- package/esm2015/button-toggle/button-toggle.js +2 -2
- package/esm2015/button-toggle/testing/button-toggle-group-harness-filters.js +1 -0
- package/esm2015/button-toggle/testing/button-toggle-group-harness.js +2 -2
- package/esm2015/button-toggle/testing/button-toggle-harness-filters.js +1 -0
- package/esm2015/button-toggle/testing/button-toggle-harness.js +2 -2
- package/esm2015/card/testing/card-harness-filters.js +1 -0
- package/esm2015/card/testing/card-harness.js +2 -2
- package/esm2015/checkbox/checkbox.js +2 -2
- package/esm2015/checkbox/testing/checkbox-harness-filters.js +1 -0
- package/esm2015/checkbox/testing/checkbox-harness.js +2 -2
- package/esm2015/chips/chip-default-options.js +1 -1
- package/esm2015/chips/chip-input.js +3 -8
- package/esm2015/chips/chip-list.js +7 -13
- package/esm2015/chips/chip-text-control.js +1 -0
- package/esm2015/chips/chip.js +1 -2
- package/esm2015/chips/testing/chip-harness-filters.js +2 -0
- package/esm2015/chips/testing/chip-harness.js +82 -0
- package/esm2015/chips/testing/chip-input-harness.js +101 -0
- package/esm2015/chips/testing/chip-list-harness.js +94 -0
- package/esm2015/chips/testing/chip-remove-harness.js +29 -0
- package/esm2015/chips/testing/index.js +9 -0
- package/esm2015/chips/testing/public-api.js +13 -0
- package/esm2015/chips/testing/testing.externs.js +0 -0
- package/esm2015/core/common-behaviors/color.js +3 -2
- package/esm2015/core/common-behaviors/common-module.js +6 -2
- package/esm2015/core/common-behaviors/constructor.js +2 -1
- package/esm2015/core/common-behaviors/disable-ripple.js +7 -3
- package/esm2015/core/common-behaviors/initialized.js +2 -2
- package/esm2015/core/common-behaviors/tabindex.js +11 -4
- package/esm2015/core/datetime/date-adapter.js +12 -3
- package/esm2015/core/datetime/native-date-adapter.js +11 -9
- package/esm2015/core/option/optgroup.js +16 -11
- package/esm2015/core/option/option.js +29 -16
- package/esm2015/core/testing/optgroup-harness-filters.js +1 -0
- package/esm2015/core/testing/option-harness-filters.js +1 -0
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/calendar-body.js +20 -5
- package/esm2015/datepicker/calendar.js +13 -18
- package/esm2015/datepicker/date-range-input-parts.js +5 -5
- package/esm2015/datepicker/date-range-input.js +15 -16
- package/esm2015/datepicker/date-range-picker.js +6 -2
- package/esm2015/datepicker/date-range-selection-strategy.js +12 -2
- package/esm2015/datepicker/date-selection-model.js +2 -2
- package/esm2015/datepicker/datepicker-base.js +17 -19
- package/esm2015/datepicker/datepicker-input-base.js +13 -18
- package/esm2015/datepicker/datepicker-input.js +7 -3
- package/esm2015/datepicker/datepicker-module.js +2 -7
- package/esm2015/datepicker/datepicker-toggle.js +3 -1
- package/esm2015/datepicker/index.js +5 -4
- package/esm2015/datepicker/month-view.js +19 -18
- package/esm2015/datepicker/multi-year-view.js +12 -16
- package/esm2015/datepicker/public-api.js +2 -2
- package/esm2015/datepicker/testing/calendar-cell-harness.js +181 -0
- package/esm2015/datepicker/testing/calendar-harness.js +91 -0
- package/esm2015/datepicker/testing/date-range-input-harness.js +116 -0
- package/esm2015/datepicker/testing/datepicker-harness-filters.js +9 -0
- package/esm2015/datepicker/testing/datepicker-input-harness-base.js +100 -0
- package/esm2015/datepicker/testing/datepicker-input-harness.js +69 -0
- package/esm2015/datepicker/testing/datepicker-toggle-harness.js +48 -0
- package/esm2015/datepicker/testing/datepicker-trigger-harness-base.js +77 -0
- package/esm2015/datepicker/testing/index.js +9 -0
- package/esm2015/datepicker/testing/public-api.js +14 -0
- package/esm2015/datepicker/testing/testing.externs.js +0 -0
- package/esm2015/datepicker/year-view.js +18 -20
- package/esm2015/dialog/dialog-config.js +1 -1
- package/esm2015/dialog/dialog-container.js +73 -50
- package/esm2015/dialog/dialog-content-directives.js +9 -3
- package/esm2015/dialog/dialog-ref.js +8 -8
- package/esm2015/dialog/dialog.js +58 -29
- package/esm2015/dialog/testing/dialog-harness-filters.js +1 -0
- package/esm2015/divider/testing/divider-harness-filters.js +1 -0
- package/esm2015/divider/testing/divider-harness.js +2 -2
- package/esm2015/expansion/accordion.js +3 -20
- package/esm2015/expansion/expansion-panel-header.js +7 -13
- package/esm2015/expansion/expansion-panel.js +7 -6
- package/esm2015/expansion/testing/expansion-harness-filters.js +1 -0
- package/esm2015/form-field/form-field-control.js +1 -1
- package/esm2015/form-field/form-field.js +26 -17
- package/esm2015/form-field/testing/form-field-harness-filters.js +1 -0
- package/esm2015/grid-list/grid-list.js +2 -2
- package/esm2015/grid-list/testing/grid-list-harness-filters.js +1 -0
- package/esm2015/grid-list/tile-coordinator.js +2 -2
- package/esm2015/grid-list/tile-styler.js +4 -3
- package/esm2015/icon/icon-registry.js +44 -52
- package/esm2015/icon/icon.js +13 -2
- package/esm2015/icon/testing/icon-harness-filters.js +9 -0
- package/esm2015/icon/testing/icon-harness.js +63 -0
- package/esm2015/icon/testing/public-api.js +3 -1
- package/esm2015/input/input.js +17 -10
- package/esm2015/input/testing/input-harness-filters.js +1 -0
- package/esm2015/input/testing/input-harness.js +7 -7
- package/esm2015/list/list.js +2 -2
- package/esm2015/list/selection-list.js +33 -31
- package/esm2015/list/testing/action-list-harness.js +2 -2
- package/esm2015/list/testing/list-harness-filters.js +1 -0
- package/esm2015/list/testing/list-harness.js +2 -2
- package/esm2015/list/testing/list-item-harness-base.js +2 -2
- package/esm2015/list/testing/nav-list-harness.js +2 -2
- package/esm2015/list/testing/selection-list-harness.js +3 -3
- package/esm2015/menu/menu-positions.js +1 -0
- package/esm2015/menu/menu-trigger.js +12 -6
- package/esm2015/menu/menu.js +11 -14
- package/esm2015/menu/testing/menu-harness-filters.js +1 -0
- package/esm2015/paginator/paginator.js +6 -3
- package/esm2015/paginator/testing/paginator-harness-filters.js +1 -0
- package/esm2015/progress-bar/testing/progress-bar-harness-filters.js +1 -0
- package/esm2015/progress-bar/testing/progress-bar-harness.js +2 -2
- package/esm2015/progress-spinner/progress-spinner.js +25 -16
- package/esm2015/progress-spinner/testing/progress-spinner-harness-filters.js +1 -0
- package/esm2015/progress-spinner/testing/progress-spinner-harness.js +2 -2
- package/esm2015/radio/radio.js +1 -1
- package/esm2015/radio/testing/radio-harness-filters.js +1 -0
- package/esm2015/radio/testing/radio-harness.js +3 -3
- package/esm2015/select/select.js +71 -57
- package/esm2015/select/testing/select-harness-filters.js +1 -0
- package/esm2015/select/testing/select-harness.js +2 -3
- package/esm2015/sidenav/drawer.js +23 -28
- package/esm2015/sidenav/testing/drawer-harness-filters.js +1 -0
- package/esm2015/slide-toggle/testing/slide-toggle-harness-filters.js +1 -0
- package/esm2015/slide-toggle/testing/slide-toggle-harness.js +2 -2
- package/esm2015/slider/slider.js +28 -31
- package/esm2015/slider/testing/slider-harness-filters.js +1 -0
- package/esm2015/slider/testing/slider-harness.js +2 -2
- package/esm2015/snack-bar/snack-bar-container.js +3 -3
- package/esm2015/snack-bar/snack-bar-ref.js +3 -3
- package/esm2015/snack-bar/snack-bar.js +13 -9
- package/esm2015/snack-bar/testing/snack-bar-harness-filters.js +1 -0
- package/esm2015/sort/sort-direction.js +1 -0
- package/esm2015/sort/sort-header.js +6 -3
- package/esm2015/sort/sort.js +11 -8
- package/esm2015/sort/testing/sort-harness-filters.js +1 -0
- package/esm2015/stepper/step-header.js +2 -2
- package/esm2015/stepper/stepper-button.js +3 -1
- package/esm2015/stepper/stepper.js +7 -4
- package/esm2015/stepper/testing/index.js +9 -0
- package/esm2015/stepper/testing/public-api.js +12 -0
- package/esm2015/stepper/testing/step-harness-filters.js +2 -0
- package/esm2015/stepper/testing/step-harness.js +132 -0
- package/esm2015/stepper/testing/stepper-button-harnesses.js +55 -0
- package/esm2015/stepper/testing/stepper-harness.js +57 -0
- package/esm2015/stepper/testing/testing.externs.js +0 -0
- package/esm2015/table/cell.js +15 -26
- package/esm2015/table/table-data-source.js +14 -1
- package/esm2015/table/table.js +11 -4
- package/esm2015/table/testing/table-harness-filters.js +1 -0
- package/esm2015/tabs/paginated-tab-header.js +3 -10
- package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +3 -3
- package/esm2015/tabs/tab.js +17 -10
- package/esm2015/tabs/testing/tab-harness-filters.js +1 -0
- package/esm2015/toolbar/testing/toolbar-harness-filters.js +1 -0
- package/esm2015/toolbar/testing/toolbar-harness.js +2 -2
- package/esm2015/toolbar/toolbar.js +15 -17
- package/esm2015/tooltip/testing/tooltip-harness-filters.js +1 -0
- package/esm2015/tooltip/tooltip.js +53 -31
- package/esm2015/tree/node.js +2 -2
- package/esm2015/tree/padding.js +7 -1
- package/esm2015/tree/toggle.js +8 -4
- package/expansion/expansion-panel-header.d.ts +6 -12
- package/expansion/expansion-panel.d.ts +5 -4
- package/expansion/index.metadata.json +1 -1
- package/fesm2015/autocomplete.js +128 -84
- package/fesm2015/autocomplete.js.map +1 -1
- package/fesm2015/badge.js +14 -6
- package/fesm2015/badge.js.map +1 -1
- package/fesm2015/bottom-sheet.js +17 -16
- package/fesm2015/bottom-sheet.js.map +1 -1
- package/fesm2015/button-toggle/testing.js +2 -2
- package/fesm2015/button-toggle/testing.js.map +1 -1
- package/fesm2015/button-toggle.js +1 -1
- package/fesm2015/button-toggle.js.map +1 -1
- package/fesm2015/button.js +2 -2
- package/fesm2015/button.js.map +1 -1
- package/fesm2015/card/testing.js +1 -1
- package/fesm2015/card/testing.js.map +1 -1
- package/fesm2015/checkbox/testing.js +1 -1
- package/fesm2015/checkbox/testing.js.map +1 -1
- package/fesm2015/checkbox.js +1 -1
- package/fesm2015/checkbox.js.map +1 -1
- package/fesm2015/chips/testing.js +316 -0
- package/fesm2015/chips/testing.js.map +1 -0
- package/fesm2015/chips.js +7 -19
- package/fesm2015/chips.js.map +1 -1
- package/fesm2015/core.js +87 -42
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker/testing.js +690 -0
- package/fesm2015/datepicker/testing.js.map +1 -0
- package/fesm2015/datepicker.js +146 -134
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/dialog.js +143 -85
- package/fesm2015/dialog.js.map +1 -1
- package/fesm2015/divider/testing.js +1 -1
- package/fesm2015/divider/testing.js.map +1 -1
- package/fesm2015/expansion.js +9 -30
- package/fesm2015/expansion.js.map +1 -1
- package/fesm2015/form-field.js +25 -16
- package/fesm2015/form-field.js.map +1 -1
- package/fesm2015/grid-list.js +5 -4
- package/fesm2015/grid-list.js.map +1 -1
- package/fesm2015/icon/testing.js +72 -1
- package/fesm2015/icon/testing.js.map +1 -1
- package/fesm2015/icon.js +56 -53
- package/fesm2015/icon.js.map +1 -1
- package/fesm2015/input/testing.js +6 -6
- package/fesm2015/input/testing.js.map +1 -1
- package/fesm2015/input.js +15 -8
- package/fesm2015/input.js.map +1 -1
- package/fesm2015/list/testing.js +6 -6
- package/fesm2015/list/testing.js.map +1 -1
- package/fesm2015/list.js +33 -31
- package/fesm2015/list.js.map +1 -1
- package/fesm2015/menu.js +20 -17
- package/fesm2015/menu.js.map +1 -1
- package/fesm2015/paginator.js +5 -2
- package/fesm2015/paginator.js.map +1 -1
- package/fesm2015/progress-bar/testing.js +1 -1
- package/fesm2015/progress-bar/testing.js.map +1 -1
- package/fesm2015/progress-spinner/testing.js +1 -1
- package/fesm2015/progress-spinner/testing.js.map +1 -1
- package/fesm2015/progress-spinner.js +24 -15
- package/fesm2015/progress-spinner.js.map +1 -1
- package/fesm2015/radio/testing.js +2 -2
- package/fesm2015/radio/testing.js.map +1 -1
- package/fesm2015/radio.js.map +1 -1
- package/fesm2015/select/testing.js +1 -2
- package/fesm2015/select/testing.js.map +1 -1
- package/fesm2015/select.js +70 -56
- package/fesm2015/select.js.map +1 -1
- package/fesm2015/sidenav.js +22 -27
- package/fesm2015/sidenav.js.map +1 -1
- package/fesm2015/slide-toggle/testing.js +1 -1
- package/fesm2015/slide-toggle/testing.js.map +1 -1
- package/fesm2015/slider/testing.js +1 -1
- package/fesm2015/slider/testing.js.map +1 -1
- package/fesm2015/slider.js +27 -30
- package/fesm2015/slider.js.map +1 -1
- package/fesm2015/snack-bar.js +17 -13
- package/fesm2015/snack-bar.js.map +1 -1
- package/fesm2015/sort.js +15 -9
- package/fesm2015/sort.js.map +1 -1
- package/fesm2015/stepper/testing.js +258 -0
- package/fesm2015/stepper/testing.js.map +1 -0
- package/fesm2015/stepper.js +10 -5
- package/fesm2015/stepper.js.map +1 -1
- package/fesm2015/table.js +37 -28
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/tabs.js +20 -20
- package/fesm2015/tabs.js.map +1 -1
- package/fesm2015/toolbar/testing.js +1 -1
- package/fesm2015/toolbar/testing.js.map +1 -1
- package/fesm2015/toolbar.js +14 -16
- package/fesm2015/toolbar.js.map +1 -1
- package/fesm2015/tooltip.js +52 -30
- package/fesm2015/tooltip.js.map +1 -1
- package/fesm2015/tree.js +13 -4
- package/fesm2015/tree.js.map +1 -1
- package/form-field/form-field-control.d.ts +5 -0
- package/form-field/form-field.d.ts +8 -5
- package/form-field/index.metadata.json +1 -1
- package/icon/icon-registry.d.ts +4 -6
- package/icon/icon.d.ts +3 -1
- package/icon/index.metadata.json +1 -1
- package/icon/testing/icon-harness-filters.d.ts +22 -0
- package/icon/testing/icon-harness.d.ts +29 -0
- package/icon/testing/index.metadata.json +1 -1
- package/icon/testing/public-api.d.ts +2 -0
- package/input/index.metadata.json +1 -1
- package/input/input.d.ts +6 -3
- package/list/index.metadata.json +1 -1
- package/list/selection-list.d.ts +3 -7
- package/menu/index.metadata.json +1 -1
- package/package.json +2 -2
- package/paginator/index.metadata.json +1 -1
- package/paginator/paginator.d.ts +5 -0
- 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-spinner/index.metadata.json +1 -1
- package/progress-spinner/progress-spinner.d.ts +9 -5
- package/radio/index.metadata.json +1 -1
- package/radio/radio.d.ts +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
- package/schematics/ng-update/data/index.js +1 -1
- package/select/index.metadata.json +1 -1
- package/select/select.d.ts +9 -8
- package/sidenav/drawer.d.ts +5 -5
- package/sidenav/index.metadata.json +1 -1
- package/slider/index.metadata.json +1 -1
- package/slider/slider.d.ts +8 -10
- package/snack-bar/index.metadata.json +1 -1
- package/sort/index.metadata.json +1 -1
- package/stepper/index.metadata.json +1 -1
- package/stepper/stepper.d.ts +3 -1
- package/stepper/testing/index.d.ts +8 -0
- package/stepper/testing/package.json +9 -0
- package/stepper/testing/public-api.d.ts +11 -0
- package/stepper/testing/step-harness-filters.d.ts +37 -0
- package/stepper/testing/step-harness.d.ts +57 -0
- package/stepper/testing/stepper-button-harnesses.d.ts +41 -0
- package/stepper/testing/stepper-harness.d.ts +35 -0
- package/table/cell.d.ts +9 -5
- package/table/index.metadata.json +1 -1
- package/table/table.d.ts +2 -0
- package/tabs/index.metadata.json +1 -1
- package/tabs/tab.d.ts +8 -1
- package/toolbar/index.metadata.json +1 -1
- package/tooltip/index.metadata.json +1 -1
- package/tooltip/tooltip.d.ts +6 -2
- package/tree/index.metadata.json +1 -1
- package/tree/padding.d.ts +4 -2
- package/tree/toggle.d.ts +2 -1
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
MatDatepickerIntl.prototype.formatYearRange = function (start, end) {
|
|
59
59
|
return start + " \u2013 " + end;
|
|
60
60
|
};
|
|
61
|
-
MatDatepickerIntl.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatDatepickerIntl_Factory() { return new MatDatepickerIntl(); }, token: MatDatepickerIntl, providedIn: "root" });
|
|
62
|
-
MatDatepickerIntl.decorators = [
|
|
63
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
64
|
-
];
|
|
65
61
|
return MatDatepickerIntl;
|
|
66
62
|
}());
|
|
63
|
+
MatDatepickerIntl.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatDatepickerIntl_Factory() { return new MatDatepickerIntl(); }, token: MatDatepickerIntl, providedIn: "root" });
|
|
64
|
+
MatDatepickerIntl.decorators = [
|
|
65
|
+
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
66
|
+
];
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* @license
|
|
@@ -165,8 +165,8 @@
|
|
|
165
165
|
}
|
|
166
166
|
};
|
|
167
167
|
/** Returns whether a cell should be marked as selected. */
|
|
168
|
-
MatCalendarBody.prototype._isSelected = function (
|
|
169
|
-
return this.startValue ===
|
|
168
|
+
MatCalendarBody.prototype._isSelected = function (value) {
|
|
169
|
+
return this.startValue === value || this.endValue === value;
|
|
170
170
|
};
|
|
171
171
|
MatCalendarBody.prototype.ngOnChanges = function (changes) {
|
|
172
172
|
var columnChanges = changes['numCols'];
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
var _this = this;
|
|
203
203
|
if (movePreview === void 0) { movePreview = true; }
|
|
204
204
|
this._ngZone.runOutsideAngular(function () {
|
|
205
|
-
_this._ngZone.onStable.
|
|
205
|
+
_this._ngZone.onStable.pipe(operators.take(1)).subscribe(function () {
|
|
206
206
|
var activeCell = _this._elementRef.nativeElement.querySelector('.mat-calendar-body-active');
|
|
207
207
|
if (activeCell) {
|
|
208
208
|
if (!movePreview) {
|
|
@@ -261,6 +261,21 @@
|
|
|
261
261
|
MatCalendarBody.prototype._isInComparisonRange = function (value) {
|
|
262
262
|
return isInRange(value, this.comparisonStart, this.comparisonEnd, this.isRange);
|
|
263
263
|
};
|
|
264
|
+
/**
|
|
265
|
+
* Gets whether a value is the same as the start and end of the comparison range.
|
|
266
|
+
* For context, the functions that we use to determine whether something is the start/end of
|
|
267
|
+
* a range don't allow for the start and end to be on the same day, because we'd have to use
|
|
268
|
+
* much more specific CSS selectors to style them correctly in all scenarios. This is fine for
|
|
269
|
+
* the regular range, because when it happens, the selected styles take over and still show where
|
|
270
|
+
* the range would've been, however we don't have these selected styles for a comparison range.
|
|
271
|
+
* This function is used to apply a class that serves the same purpose as the one for selected
|
|
272
|
+
* dates, but it only applies in the context of a comparison range.
|
|
273
|
+
*/
|
|
274
|
+
MatCalendarBody.prototype._isComparisonIdentical = function (value) {
|
|
275
|
+
// Note that we don't need to null check the start/end
|
|
276
|
+
// here, because the `value` will always be defined.
|
|
277
|
+
return this.comparisonStart === this.comparisonEnd && value === this.comparisonStart;
|
|
278
|
+
};
|
|
264
279
|
/** Gets whether a value is the start of the preview range. */
|
|
265
280
|
MatCalendarBody.prototype._isPreviewStart = function (value) {
|
|
266
281
|
return isStart(value, this.previewStart, this.previewEnd);
|
|
@@ -291,45 +306,45 @@
|
|
|
291
306
|
}
|
|
292
307
|
return null;
|
|
293
308
|
};
|
|
294
|
-
MatCalendarBody.decorators = [
|
|
295
|
-
{ type: i0.Component, args: [{
|
|
296
|
-
selector: '[mat-calendar-body]',
|
|
297
|
-
template: "<!--\n If there's not enough space in the first row, create a separate label row. We mark this row as\n aria-hidden because we don't want it to be read out as one of the weeks in the month.\n-->\n<tr *ngIf=\"_firstRowOffset < labelMinRequiredCells\" aria-hidden=\"true\">\n <td class=\"mat-calendar-body-label\"\n [attr.colspan]=\"numCols\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n {{label}}\n </td>\n</tr>\n\n<!-- Create the first row separately so we can include a special spacer cell. -->\n<tr *ngFor=\"let row of rows; let rowIndex = index\" role=\"row\">\n <!--\n We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\n The aspect ratio of the table cells is maintained by setting the top and bottom padding as a\n percentage of the width (a variant of the trick described here:\n https://www.w3schools.com/howto/howto_css_aspect_ratio.asp).\n -->\n <td *ngIf=\"rowIndex === 0 && _firstRowOffset\"\n aria-hidden=\"true\"\n class=\"mat-calendar-body-label\"\n [attr.colspan]=\"_firstRowOffset\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n {{_firstRowOffset >= labelMinRequiredCells ? label : ''}}\n </td>\n <td *ngFor=\"let item of row; let colIndex = index\"\n role=\"gridcell\"\n class=\"mat-calendar-body-cell\"\n [ngClass]=\"item.cssClasses\"\n [tabindex]=\"_isActiveCell(rowIndex, colIndex) ? 0 : -1\"\n [attr.data-mat-row]=\"rowIndex\"\n [attr.data-mat-col]=\"colIndex\"\n [class.mat-calendar-body-disabled]=\"!item.enabled\"\n [class.mat-calendar-body-active]=\"_isActiveCell(rowIndex, colIndex)\"\n [class.mat-calendar-body-range-start]=\"_isRangeStart(item.compareValue)\"\n [class.mat-calendar-body-range-end]=\"_isRangeEnd(item.compareValue)\"\n [class.mat-calendar-body-in-range]=\"_isInRange(item.compareValue)\"\n [class.mat-calendar-body-comparison-bridge-start]=\"_isComparisonBridgeStart(item.compareValue, rowIndex, colIndex)\"\n [class.mat-calendar-body-comparison-bridge-end]=\"_isComparisonBridgeEnd(item.compareValue, rowIndex, colIndex)\"\n [class.mat-calendar-body-comparison-start]=\"_isComparisonStart(item.compareValue)\"\n [class.mat-calendar-body-comparison-end]=\"_isComparisonEnd(item.compareValue)\"\n [class.mat-calendar-body-in-comparison-range]=\"_isInComparisonRange(item.compareValue)\"\n [class.mat-calendar-body-preview-start]=\"_isPreviewStart(item.compareValue)\"\n [class.mat-calendar-body-preview-end]=\"_isPreviewEnd(item.compareValue)\"\n [class.mat-calendar-body-in-preview]=\"_isInPreview(item.compareValue)\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-disabled]=\"!item.enabled || null\"\n [attr.aria-selected]=\"_isSelected(item)\"\n (click)=\"_cellClicked(item, $event)\"\n [style.width]=\"_cellWidth\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n <div class=\"mat-calendar-body-cell-content mat-focus-indicator\"\n [class.mat-calendar-body-selected]=\"_isSelected(item)\"\n [class.mat-calendar-body-today]=\"todayValue === item.compareValue\">\n {{item.displayValue}}\n </div>\n <div class=\"mat-calendar-body-cell-preview\"></div>\n </td>\n</tr>\n",
|
|
298
|
-
host: {
|
|
299
|
-
'class': 'mat-calendar-body',
|
|
300
|
-
'role': 'grid',
|
|
301
|
-
'aria-readonly': 'true'
|
|
302
|
-
},
|
|
303
|
-
exportAs: 'matCalendarBody',
|
|
304
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
305
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
306
|
-
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"]
|
|
307
|
-
},] }
|
|
308
|
-
];
|
|
309
|
-
MatCalendarBody.ctorParameters = function () { return [
|
|
310
|
-
{ type: i0.ElementRef },
|
|
311
|
-
{ type: i0.NgZone }
|
|
312
|
-
]; };
|
|
313
|
-
MatCalendarBody.propDecorators = {
|
|
314
|
-
label: [{ type: i0.Input }],
|
|
315
|
-
rows: [{ type: i0.Input }],
|
|
316
|
-
todayValue: [{ type: i0.Input }],
|
|
317
|
-
startValue: [{ type: i0.Input }],
|
|
318
|
-
endValue: [{ type: i0.Input }],
|
|
319
|
-
labelMinRequiredCells: [{ type: i0.Input }],
|
|
320
|
-
numCols: [{ type: i0.Input }],
|
|
321
|
-
activeCell: [{ type: i0.Input }],
|
|
322
|
-
isRange: [{ type: i0.Input }],
|
|
323
|
-
cellAspectRatio: [{ type: i0.Input }],
|
|
324
|
-
comparisonStart: [{ type: i0.Input }],
|
|
325
|
-
comparisonEnd: [{ type: i0.Input }],
|
|
326
|
-
previewStart: [{ type: i0.Input }],
|
|
327
|
-
previewEnd: [{ type: i0.Input }],
|
|
328
|
-
selectedValueChange: [{ type: i0.Output }],
|
|
329
|
-
previewChange: [{ type: i0.Output }]
|
|
330
|
-
};
|
|
331
309
|
return MatCalendarBody;
|
|
332
310
|
}());
|
|
311
|
+
MatCalendarBody.decorators = [
|
|
312
|
+
{ type: i0.Component, args: [{
|
|
313
|
+
selector: '[mat-calendar-body]',
|
|
314
|
+
template: "<!--\n If there's not enough space in the first row, create a separate label row. We mark this row as\n aria-hidden because we don't want it to be read out as one of the weeks in the month.\n-->\n<tr *ngIf=\"_firstRowOffset < labelMinRequiredCells\" aria-hidden=\"true\">\n <td class=\"mat-calendar-body-label\"\n [attr.colspan]=\"numCols\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n {{label}}\n </td>\n</tr>\n\n<!-- Create the first row separately so we can include a special spacer cell. -->\n<tr *ngFor=\"let row of rows; let rowIndex = index\" role=\"row\">\n <!--\n We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\n The aspect ratio of the table cells is maintained by setting the top and bottom padding as a\n percentage of the width (a variant of the trick described here:\n https://www.w3schools.com/howto/howto_css_aspect_ratio.asp).\n -->\n <td *ngIf=\"rowIndex === 0 && _firstRowOffset\"\n aria-hidden=\"true\"\n class=\"mat-calendar-body-label\"\n [attr.colspan]=\"_firstRowOffset\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n {{_firstRowOffset >= labelMinRequiredCells ? label : ''}}\n </td>\n <td *ngFor=\"let item of row; let colIndex = index\"\n role=\"gridcell\"\n class=\"mat-calendar-body-cell\"\n [ngClass]=\"item.cssClasses\"\n [tabindex]=\"_isActiveCell(rowIndex, colIndex) ? 0 : -1\"\n [attr.data-mat-row]=\"rowIndex\"\n [attr.data-mat-col]=\"colIndex\"\n [class.mat-calendar-body-disabled]=\"!item.enabled\"\n [class.mat-calendar-body-active]=\"_isActiveCell(rowIndex, colIndex)\"\n [class.mat-calendar-body-range-start]=\"_isRangeStart(item.compareValue)\"\n [class.mat-calendar-body-range-end]=\"_isRangeEnd(item.compareValue)\"\n [class.mat-calendar-body-in-range]=\"_isInRange(item.compareValue)\"\n [class.mat-calendar-body-comparison-bridge-start]=\"_isComparisonBridgeStart(item.compareValue, rowIndex, colIndex)\"\n [class.mat-calendar-body-comparison-bridge-end]=\"_isComparisonBridgeEnd(item.compareValue, rowIndex, colIndex)\"\n [class.mat-calendar-body-comparison-start]=\"_isComparisonStart(item.compareValue)\"\n [class.mat-calendar-body-comparison-end]=\"_isComparisonEnd(item.compareValue)\"\n [class.mat-calendar-body-in-comparison-range]=\"_isInComparisonRange(item.compareValue)\"\n [class.mat-calendar-body-preview-start]=\"_isPreviewStart(item.compareValue)\"\n [class.mat-calendar-body-preview-end]=\"_isPreviewEnd(item.compareValue)\"\n [class.mat-calendar-body-in-preview]=\"_isInPreview(item.compareValue)\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-disabled]=\"!item.enabled || null\"\n [attr.aria-selected]=\"_isSelected(item.compareValue)\"\n (click)=\"_cellClicked(item, $event)\"\n [style.width]=\"_cellWidth\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n <div class=\"mat-calendar-body-cell-content mat-focus-indicator\"\n [class.mat-calendar-body-selected]=\"_isSelected(item.compareValue)\"\n [class.mat-calendar-body-comparison-identical]=\"_isComparisonIdentical(item.compareValue)\"\n [class.mat-calendar-body-today]=\"todayValue === item.compareValue\">\n {{item.displayValue}}\n </div>\n <div class=\"mat-calendar-body-cell-preview\"></div>\n </td>\n</tr>\n",
|
|
315
|
+
host: {
|
|
316
|
+
'class': 'mat-calendar-body',
|
|
317
|
+
'role': 'grid',
|
|
318
|
+
'aria-readonly': 'true'
|
|
319
|
+
},
|
|
320
|
+
exportAs: 'matCalendarBody',
|
|
321
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
322
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
323
|
+
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"]
|
|
324
|
+
},] }
|
|
325
|
+
];
|
|
326
|
+
MatCalendarBody.ctorParameters = function () { return [
|
|
327
|
+
{ type: i0.ElementRef },
|
|
328
|
+
{ type: i0.NgZone }
|
|
329
|
+
]; };
|
|
330
|
+
MatCalendarBody.propDecorators = {
|
|
331
|
+
label: [{ type: i0.Input }],
|
|
332
|
+
rows: [{ type: i0.Input }],
|
|
333
|
+
todayValue: [{ type: i0.Input }],
|
|
334
|
+
startValue: [{ type: i0.Input }],
|
|
335
|
+
endValue: [{ type: i0.Input }],
|
|
336
|
+
labelMinRequiredCells: [{ type: i0.Input }],
|
|
337
|
+
numCols: [{ type: i0.Input }],
|
|
338
|
+
activeCell: [{ type: i0.Input }],
|
|
339
|
+
isRange: [{ type: i0.Input }],
|
|
340
|
+
cellAspectRatio: [{ type: i0.Input }],
|
|
341
|
+
comparisonStart: [{ type: i0.Input }],
|
|
342
|
+
comparisonEnd: [{ type: i0.Input }],
|
|
343
|
+
previewStart: [{ type: i0.Input }],
|
|
344
|
+
previewEnd: [{ type: i0.Input }],
|
|
345
|
+
selectedValueChange: [{ type: i0.Output }],
|
|
346
|
+
previewChange: [{ type: i0.Output }]
|
|
347
|
+
};
|
|
333
348
|
/** Checks whether a node is a table cell element. */
|
|
334
349
|
function isTableCell(node) {
|
|
335
350
|
return node.nodeName === 'TD';
|
|
@@ -348,241 +363,307 @@
|
|
|
348
363
|
value >= start && value <= end;
|
|
349
364
|
}
|
|
350
365
|
|
|
351
|
-
/*! *****************************************************************************
|
|
352
|
-
Copyright (c) Microsoft Corporation.
|
|
353
|
-
|
|
354
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
355
|
-
purpose with or without fee is hereby granted.
|
|
356
|
-
|
|
357
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
358
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
359
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
360
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
361
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
362
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
363
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
364
|
-
***************************************************************************** */
|
|
365
|
-
/* global Reflect, Promise */
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
function __extends(d, b) {
|
|
375
|
-
extendStatics(d, b);
|
|
376
|
-
function __() { this.constructor = d; }
|
|
377
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
function __rest(s, e) {
|
|
392
|
-
var t = {};
|
|
393
|
-
for (var p in s)
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
function __decorate(decorators, target, key, desc) {
|
|
404
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
405
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
return
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
function
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
function
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
366
|
+
/*! *****************************************************************************
|
|
367
|
+
Copyright (c) Microsoft Corporation.
|
|
368
|
+
|
|
369
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
370
|
+
purpose with or without fee is hereby granted.
|
|
371
|
+
|
|
372
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
373
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
374
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
375
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
376
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
377
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
378
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
379
|
+
***************************************************************************** */
|
|
380
|
+
/* global Reflect, Promise */
|
|
381
|
+
var extendStatics = function (d, b) {
|
|
382
|
+
extendStatics = Object.setPrototypeOf ||
|
|
383
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
384
|
+
function (d, b) { for (var p in b)
|
|
385
|
+
if (b.hasOwnProperty(p))
|
|
386
|
+
d[p] = b[p]; };
|
|
387
|
+
return extendStatics(d, b);
|
|
388
|
+
};
|
|
389
|
+
function __extends(d, b) {
|
|
390
|
+
extendStatics(d, b);
|
|
391
|
+
function __() { this.constructor = d; }
|
|
392
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
393
|
+
}
|
|
394
|
+
var __assign = function () {
|
|
395
|
+
__assign = Object.assign || function __assign(t) {
|
|
396
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
397
|
+
s = arguments[i];
|
|
398
|
+
for (var p in s)
|
|
399
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
400
|
+
t[p] = s[p];
|
|
401
|
+
}
|
|
402
|
+
return t;
|
|
403
|
+
};
|
|
404
|
+
return __assign.apply(this, arguments);
|
|
405
|
+
};
|
|
406
|
+
function __rest(s, e) {
|
|
407
|
+
var t = {};
|
|
408
|
+
for (var p in s)
|
|
409
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
410
|
+
t[p] = s[p];
|
|
411
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
412
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
413
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
414
|
+
t[p[i]] = s[p[i]];
|
|
415
|
+
}
|
|
416
|
+
return t;
|
|
417
|
+
}
|
|
418
|
+
function __decorate(decorators, target, key, desc) {
|
|
419
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
420
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
421
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
422
|
+
else
|
|
423
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
424
|
+
if (d = decorators[i])
|
|
425
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
426
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
427
|
+
}
|
|
428
|
+
function __param(paramIndex, decorator) {
|
|
429
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
430
|
+
}
|
|
431
|
+
function __metadata(metadataKey, metadataValue) {
|
|
432
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
433
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
434
|
+
}
|
|
435
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
436
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
437
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
438
|
+
function fulfilled(value) { try {
|
|
439
|
+
step(generator.next(value));
|
|
440
|
+
}
|
|
441
|
+
catch (e) {
|
|
442
|
+
reject(e);
|
|
443
|
+
} }
|
|
444
|
+
function rejected(value) { try {
|
|
445
|
+
step(generator["throw"](value));
|
|
446
|
+
}
|
|
447
|
+
catch (e) {
|
|
448
|
+
reject(e);
|
|
449
|
+
} }
|
|
450
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
451
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
function __generator(thisArg, body) {
|
|
455
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
456
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
457
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
458
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
459
|
+
function step(op) {
|
|
460
|
+
if (f)
|
|
461
|
+
throw new TypeError("Generator is already executing.");
|
|
462
|
+
while (_)
|
|
463
|
+
try {
|
|
464
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
465
|
+
return t;
|
|
466
|
+
if (y = 0, t)
|
|
467
|
+
op = [op[0] & 2, t.value];
|
|
468
|
+
switch (op[0]) {
|
|
469
|
+
case 0:
|
|
470
|
+
case 1:
|
|
471
|
+
t = op;
|
|
472
|
+
break;
|
|
473
|
+
case 4:
|
|
474
|
+
_.label++;
|
|
475
|
+
return { value: op[1], done: false };
|
|
476
|
+
case 5:
|
|
477
|
+
_.label++;
|
|
478
|
+
y = op[1];
|
|
479
|
+
op = [0];
|
|
480
|
+
continue;
|
|
481
|
+
case 7:
|
|
482
|
+
op = _.ops.pop();
|
|
483
|
+
_.trys.pop();
|
|
484
|
+
continue;
|
|
485
|
+
default:
|
|
486
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
487
|
+
_ = 0;
|
|
488
|
+
continue;
|
|
489
|
+
}
|
|
490
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
491
|
+
_.label = op[1];
|
|
492
|
+
break;
|
|
493
|
+
}
|
|
494
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
495
|
+
_.label = t[1];
|
|
496
|
+
t = op;
|
|
497
|
+
break;
|
|
498
|
+
}
|
|
499
|
+
if (t && _.label < t[2]) {
|
|
500
|
+
_.label = t[2];
|
|
501
|
+
_.ops.push(op);
|
|
502
|
+
break;
|
|
503
|
+
}
|
|
504
|
+
if (t[2])
|
|
505
|
+
_.ops.pop();
|
|
506
|
+
_.trys.pop();
|
|
507
|
+
continue;
|
|
508
|
+
}
|
|
509
|
+
op = body.call(thisArg, _);
|
|
510
|
+
}
|
|
511
|
+
catch (e) {
|
|
512
|
+
op = [6, e];
|
|
513
|
+
y = 0;
|
|
514
|
+
}
|
|
515
|
+
finally {
|
|
516
|
+
f = t = 0;
|
|
517
|
+
}
|
|
518
|
+
if (op[0] & 5)
|
|
519
|
+
throw op[1];
|
|
520
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
524
|
+
if (k2 === undefined)
|
|
525
|
+
k2 = k;
|
|
526
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
527
|
+
}) : (function (o, m, k, k2) {
|
|
528
|
+
if (k2 === undefined)
|
|
529
|
+
k2 = k;
|
|
530
|
+
o[k2] = m[k];
|
|
531
|
+
});
|
|
532
|
+
function __exportStar(m, exports) {
|
|
533
|
+
for (var p in m)
|
|
534
|
+
if (p !== "default" && !exports.hasOwnProperty(p))
|
|
535
|
+
__createBinding(exports, m, p);
|
|
536
|
+
}
|
|
537
|
+
function __values(o) {
|
|
538
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
539
|
+
if (m)
|
|
540
|
+
return m.call(o);
|
|
541
|
+
if (o && typeof o.length === "number")
|
|
542
|
+
return {
|
|
543
|
+
next: function () {
|
|
544
|
+
if (o && i >= o.length)
|
|
545
|
+
o = void 0;
|
|
546
|
+
return { value: o && o[i++], done: !o };
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
550
|
+
}
|
|
551
|
+
function __read(o, n) {
|
|
552
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
553
|
+
if (!m)
|
|
554
|
+
return o;
|
|
555
|
+
var i = m.call(o), r, ar = [], e;
|
|
556
|
+
try {
|
|
557
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
558
|
+
ar.push(r.value);
|
|
559
|
+
}
|
|
560
|
+
catch (error) {
|
|
561
|
+
e = { error: error };
|
|
562
|
+
}
|
|
563
|
+
finally {
|
|
564
|
+
try {
|
|
565
|
+
if (r && !r.done && (m = i["return"]))
|
|
566
|
+
m.call(i);
|
|
567
|
+
}
|
|
568
|
+
finally {
|
|
569
|
+
if (e)
|
|
570
|
+
throw e.error;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
return ar;
|
|
574
|
+
}
|
|
575
|
+
function __spread() {
|
|
576
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
577
|
+
ar = ar.concat(__read(arguments[i]));
|
|
578
|
+
return ar;
|
|
579
|
+
}
|
|
580
|
+
function __spreadArrays() {
|
|
581
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
582
|
+
s += arguments[i].length;
|
|
583
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
584
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
585
|
+
r[k] = a[j];
|
|
586
|
+
return r;
|
|
587
|
+
}
|
|
588
|
+
;
|
|
589
|
+
function __await(v) {
|
|
590
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
591
|
+
}
|
|
592
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
593
|
+
if (!Symbol.asyncIterator)
|
|
594
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
595
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
596
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
597
|
+
function verb(n) { if (g[n])
|
|
598
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
599
|
+
function resume(n, v) { try {
|
|
600
|
+
step(g[n](v));
|
|
601
|
+
}
|
|
602
|
+
catch (e) {
|
|
603
|
+
settle(q[0][3], e);
|
|
604
|
+
} }
|
|
605
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
606
|
+
function fulfill(value) { resume("next", value); }
|
|
607
|
+
function reject(value) { resume("throw", value); }
|
|
608
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
609
|
+
resume(q[0][0], q[0][1]); }
|
|
610
|
+
}
|
|
611
|
+
function __asyncDelegator(o) {
|
|
612
|
+
var i, p;
|
|
613
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
614
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
615
|
+
}
|
|
616
|
+
function __asyncValues(o) {
|
|
617
|
+
if (!Symbol.asyncIterator)
|
|
618
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
619
|
+
var m = o[Symbol.asyncIterator], i;
|
|
620
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
621
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
622
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
623
|
+
}
|
|
624
|
+
function __makeTemplateObject(cooked, raw) {
|
|
625
|
+
if (Object.defineProperty) {
|
|
626
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
627
|
+
}
|
|
628
|
+
else {
|
|
629
|
+
cooked.raw = raw;
|
|
630
|
+
}
|
|
631
|
+
return cooked;
|
|
632
|
+
}
|
|
633
|
+
;
|
|
634
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
635
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
636
|
+
}) : function (o, v) {
|
|
637
|
+
o["default"] = v;
|
|
638
|
+
};
|
|
639
|
+
function __importStar(mod) {
|
|
640
|
+
if (mod && mod.__esModule)
|
|
641
|
+
return mod;
|
|
642
|
+
var result = {};
|
|
643
|
+
if (mod != null)
|
|
644
|
+
for (var k in mod)
|
|
645
|
+
if (Object.hasOwnProperty.call(mod, k))
|
|
646
|
+
__createBinding(result, mod, k);
|
|
647
|
+
__setModuleDefault(result, mod);
|
|
648
|
+
return result;
|
|
649
|
+
}
|
|
650
|
+
function __importDefault(mod) {
|
|
651
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
652
|
+
}
|
|
653
|
+
function __classPrivateFieldGet(receiver, privateMap) {
|
|
654
|
+
if (!privateMap.has(receiver)) {
|
|
655
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
656
|
+
}
|
|
657
|
+
return privateMap.get(receiver);
|
|
658
|
+
}
|
|
659
|
+
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
660
|
+
if (!privateMap.has(receiver)) {
|
|
661
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
662
|
+
}
|
|
663
|
+
privateMap.set(receiver, value);
|
|
664
|
+
return value;
|
|
577
665
|
}
|
|
578
666
|
|
|
579
|
-
/**
|
|
580
|
-
* @license
|
|
581
|
-
* Copyright Google LLC All Rights Reserved.
|
|
582
|
-
*
|
|
583
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
584
|
-
* found in the LICENSE file at https://angular.io/license
|
|
585
|
-
*/
|
|
586
667
|
/** A class representing a range of dates. */
|
|
587
668
|
var DateRange = /** @class */ (function () {
|
|
588
669
|
function DateRange(
|
|
@@ -604,7 +685,7 @@
|
|
|
604
685
|
this._adapter = _adapter;
|
|
605
686
|
this._selectionChanged = new rxjs.Subject();
|
|
606
687
|
/** Emits when the selection has changed. */
|
|
607
|
-
this.selectionChanged = this._selectionChanged
|
|
688
|
+
this.selectionChanged = this._selectionChanged;
|
|
608
689
|
this.selection = selection;
|
|
609
690
|
}
|
|
610
691
|
/**
|
|
@@ -622,15 +703,15 @@
|
|
|
622
703
|
MatDateSelectionModel.prototype._isValidDateInstance = function (date) {
|
|
623
704
|
return this._adapter.isDateInstance(date) && this._adapter.isValid(date);
|
|
624
705
|
};
|
|
625
|
-
MatDateSelectionModel.decorators = [
|
|
626
|
-
{ type: i0.Directive }
|
|
627
|
-
];
|
|
628
|
-
MatDateSelectionModel.ctorParameters = function () { return [
|
|
629
|
-
{ type: undefined },
|
|
630
|
-
{ type: core.DateAdapter }
|
|
631
|
-
]; };
|
|
632
706
|
return MatDateSelectionModel;
|
|
633
707
|
}());
|
|
708
|
+
MatDateSelectionModel.decorators = [
|
|
709
|
+
{ type: i0.Directive }
|
|
710
|
+
];
|
|
711
|
+
MatDateSelectionModel.ctorParameters = function () { return [
|
|
712
|
+
{ type: undefined },
|
|
713
|
+
{ type: core.DateAdapter }
|
|
714
|
+
]; };
|
|
634
715
|
/** A selection model that contains a single date. */
|
|
635
716
|
var MatSingleDateSelectionModel = /** @class */ (function (_super) {
|
|
636
717
|
__extends(MatSingleDateSelectionModel, _super);
|
|
@@ -655,14 +736,14 @@
|
|
|
655
736
|
MatSingleDateSelectionModel.prototype.isComplete = function () {
|
|
656
737
|
return this.selection != null;
|
|
657
738
|
};
|
|
658
|
-
MatSingleDateSelectionModel.decorators = [
|
|
659
|
-
{ type: i0.Injectable }
|
|
660
|
-
];
|
|
661
|
-
MatSingleDateSelectionModel.ctorParameters = function () { return [
|
|
662
|
-
{ type: core.DateAdapter }
|
|
663
|
-
]; };
|
|
664
739
|
return MatSingleDateSelectionModel;
|
|
665
740
|
}(MatDateSelectionModel));
|
|
741
|
+
MatSingleDateSelectionModel.decorators = [
|
|
742
|
+
{ type: i0.Injectable }
|
|
743
|
+
];
|
|
744
|
+
MatSingleDateSelectionModel.ctorParameters = function () { return [
|
|
745
|
+
{ type: core.DateAdapter }
|
|
746
|
+
]; };
|
|
666
747
|
/** A selection model that contains a date range. */
|
|
667
748
|
var MatRangeDateSelectionModel = /** @class */ (function (_super) {
|
|
668
749
|
__extends(MatRangeDateSelectionModel, _super);
|
|
@@ -711,14 +792,14 @@
|
|
|
711
792
|
MatRangeDateSelectionModel.prototype.isComplete = function () {
|
|
712
793
|
return this.selection.start != null && this.selection.end != null;
|
|
713
794
|
};
|
|
714
|
-
MatRangeDateSelectionModel.decorators = [
|
|
715
|
-
{ type: i0.Injectable }
|
|
716
|
-
];
|
|
717
|
-
MatRangeDateSelectionModel.ctorParameters = function () { return [
|
|
718
|
-
{ type: core.DateAdapter }
|
|
719
|
-
]; };
|
|
720
795
|
return MatRangeDateSelectionModel;
|
|
721
796
|
}(MatDateSelectionModel));
|
|
797
|
+
MatRangeDateSelectionModel.decorators = [
|
|
798
|
+
{ type: i0.Injectable }
|
|
799
|
+
];
|
|
800
|
+
MatRangeDateSelectionModel.ctorParameters = function () { return [
|
|
801
|
+
{ type: core.DateAdapter }
|
|
802
|
+
]; };
|
|
722
803
|
/** @docs-private */
|
|
723
804
|
function MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(parent, adapter) {
|
|
724
805
|
return parent || new MatSingleDateSelectionModel(adapter);
|
|
@@ -777,14 +858,24 @@
|
|
|
777
858
|
}
|
|
778
859
|
return new DateRange(start, end);
|
|
779
860
|
};
|
|
780
|
-
DefaultMatCalendarRangeStrategy.decorators = [
|
|
781
|
-
{ type: i0.Injectable }
|
|
782
|
-
];
|
|
783
|
-
DefaultMatCalendarRangeStrategy.ctorParameters = function () { return [
|
|
784
|
-
{ type: core.DateAdapter }
|
|
785
|
-
]; };
|
|
786
861
|
return DefaultMatCalendarRangeStrategy;
|
|
787
862
|
}());
|
|
863
|
+
DefaultMatCalendarRangeStrategy.decorators = [
|
|
864
|
+
{ type: i0.Injectable }
|
|
865
|
+
];
|
|
866
|
+
DefaultMatCalendarRangeStrategy.ctorParameters = function () { return [
|
|
867
|
+
{ type: core.DateAdapter }
|
|
868
|
+
]; };
|
|
869
|
+
/** @docs-private */
|
|
870
|
+
function MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY(parent, adapter) {
|
|
871
|
+
return parent || new DefaultMatCalendarRangeStrategy(adapter);
|
|
872
|
+
}
|
|
873
|
+
/** @docs-private */
|
|
874
|
+
var MAT_CALENDAR_RANGE_STRATEGY_PROVIDER = {
|
|
875
|
+
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
876
|
+
deps: [[new i0.Optional(), new i0.SkipSelf(), MAT_DATE_RANGE_SELECTION_STRATEGY], core.DateAdapter],
|
|
877
|
+
useFactory: MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY,
|
|
878
|
+
};
|
|
788
879
|
|
|
789
880
|
/**
|
|
790
881
|
* @license
|
|
@@ -812,11 +903,13 @@
|
|
|
812
903
|
this._userSelection = new i0.EventEmitter();
|
|
813
904
|
/** Emits when any date is activated. */
|
|
814
905
|
this.activeDateChange = new i0.EventEmitter();
|
|
815
|
-
if (
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
906
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
907
|
+
if (!this._dateAdapter) {
|
|
908
|
+
throw createMissingDateImplError('DateAdapter');
|
|
909
|
+
}
|
|
910
|
+
if (!this._dateFormats) {
|
|
911
|
+
throw createMissingDateImplError('MAT_DATE_FORMATS');
|
|
912
|
+
}
|
|
820
913
|
}
|
|
821
914
|
this._activeDate = this._dateAdapter.today();
|
|
822
915
|
}
|
|
@@ -827,7 +920,7 @@
|
|
|
827
920
|
get: function () { return this._activeDate; },
|
|
828
921
|
set: function (value) {
|
|
829
922
|
var oldActiveDate = this._activeDate;
|
|
830
|
-
var validDate = this.
|
|
923
|
+
var validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();
|
|
831
924
|
this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
|
|
832
925
|
if (!this._hasSameMonthAndYear(oldActiveDate, this._activeDate)) {
|
|
833
926
|
this._init();
|
|
@@ -844,7 +937,7 @@
|
|
|
844
937
|
this._selected = value;
|
|
845
938
|
}
|
|
846
939
|
else {
|
|
847
|
-
this._selected = this.
|
|
940
|
+
this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
848
941
|
}
|
|
849
942
|
this._setRanges(this._selected);
|
|
850
943
|
},
|
|
@@ -855,7 +948,7 @@
|
|
|
855
948
|
/** The minimum selectable date. */
|
|
856
949
|
get: function () { return this._minDate; },
|
|
857
950
|
set: function (value) {
|
|
858
|
-
this._minDate = this.
|
|
951
|
+
this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
859
952
|
},
|
|
860
953
|
enumerable: false,
|
|
861
954
|
configurable: true
|
|
@@ -864,7 +957,7 @@
|
|
|
864
957
|
/** The maximum selectable date. */
|
|
865
958
|
get: function () { return this._maxDate; },
|
|
866
959
|
set: function (value) {
|
|
867
|
-
this._maxDate = this.
|
|
960
|
+
this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
868
961
|
},
|
|
869
962
|
enumerable: false,
|
|
870
963
|
configurable: true
|
|
@@ -875,6 +968,12 @@
|
|
|
875
968
|
.pipe(operators.startWith(null))
|
|
876
969
|
.subscribe(function () { return _this._init(); });
|
|
877
970
|
};
|
|
971
|
+
MatMonthView.prototype.ngOnChanges = function (changes) {
|
|
972
|
+
var comparisonChange = changes['comparisonStart'] || changes['comparisonEnd'];
|
|
973
|
+
if (comparisonChange && !comparisonChange.firstChange) {
|
|
974
|
+
this._setRanges(this.selected);
|
|
975
|
+
}
|
|
976
|
+
};
|
|
878
977
|
MatMonthView.prototype.ngOnDestroy = function () {
|
|
879
978
|
this._rerenderSubscription.unsubscribe();
|
|
880
979
|
};
|
|
@@ -1024,7 +1123,7 @@
|
|
|
1024
1123
|
var date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), i + 1);
|
|
1025
1124
|
var enabled = this._shouldEnableDate(date);
|
|
1026
1125
|
var ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.dateA11yLabel);
|
|
1027
|
-
var cellClasses = this.dateClass ? this.dateClass(date) : undefined;
|
|
1126
|
+
var cellClasses = this.dateClass ? this.dateClass(date, 'month') : undefined;
|
|
1028
1127
|
this._weeks[this._weeks.length - 1].push(new MatCalendarCell(i + 1, dateNames[i], ariaLabel, enabled, cellClasses, this._getCellCompareValue(date), date));
|
|
1029
1128
|
}
|
|
1030
1129
|
};
|
|
@@ -1060,13 +1159,6 @@
|
|
|
1060
1159
|
}
|
|
1061
1160
|
return null;
|
|
1062
1161
|
};
|
|
1063
|
-
/**
|
|
1064
|
-
* @param obj The object to check.
|
|
1065
|
-
* @returns The given object if it is both a date instance and valid, otherwise null.
|
|
1066
|
-
*/
|
|
1067
|
-
MatMonthView.prototype._getValidDateOrNull = function (obj) {
|
|
1068
|
-
return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
|
|
1069
|
-
};
|
|
1070
1162
|
/** Determines whether the user has the RTL layout direction. */
|
|
1071
1163
|
MatMonthView.prototype._isRtl = function () {
|
|
1072
1164
|
return this._dir && this._dir.value === 'rtl';
|
|
@@ -1085,38 +1177,38 @@
|
|
|
1085
1177
|
this._comparisonRangeStart = this._getCellCompareValue(this.comparisonStart);
|
|
1086
1178
|
this._comparisonRangeEnd = this._getCellCompareValue(this.comparisonEnd);
|
|
1087
1179
|
};
|
|
1088
|
-
MatMonthView.decorators = [
|
|
1089
|
-
{ type: i0.Component, args: [{
|
|
1090
|
-
selector: 'mat-month-view',
|
|
1091
|
-
template: "<table class=\"mat-calendar-table\" role=\"presentation\">\n <thead class=\"mat-calendar-table-header\">\n <tr>\n <th scope=\"col\" *ngFor=\"let day of _weekdays\" [attr.aria-label]=\"day.long\">{{day.narrow}}</th>\n </tr>\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"7\" aria-hidden=\"true\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_monthLabel\"\n [rows]=\"_weeks\"\n [todayValue]=\"_todayDate!\"\n [startValue]=\"_rangeStart!\"\n [endValue]=\"_rangeEnd!\"\n [comparisonStart]=\"_comparisonRangeStart\"\n [comparisonEnd]=\"_comparisonRangeEnd\"\n [previewStart]=\"_previewStart\"\n [previewEnd]=\"_previewEnd\"\n [isRange]=\"_isRange\"\n [labelMinRequiredCells]=\"3\"\n [activeCell]=\"_dateAdapter.getDate(activeDate) - 1\"\n (selectedValueChange)=\"_dateSelected($event)\"\n (previewChange)=\"_previewChanged($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
|
|
1092
|
-
exportAs: 'matMonthView',
|
|
1093
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1094
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1095
|
-
},] }
|
|
1096
|
-
];
|
|
1097
|
-
MatMonthView.ctorParameters = function () { return [
|
|
1098
|
-
{ type: i0.ChangeDetectorRef },
|
|
1099
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
|
|
1100
|
-
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
1101
|
-
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] },
|
|
1102
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATE_RANGE_SELECTION_STRATEGY,] }, { type: i0.Optional }] }
|
|
1103
|
-
]; };
|
|
1104
|
-
MatMonthView.propDecorators = {
|
|
1105
|
-
activeDate: [{ type: i0.Input }],
|
|
1106
|
-
selected: [{ type: i0.Input }],
|
|
1107
|
-
minDate: [{ type: i0.Input }],
|
|
1108
|
-
maxDate: [{ type: i0.Input }],
|
|
1109
|
-
dateFilter: [{ type: i0.Input }],
|
|
1110
|
-
dateClass: [{ type: i0.Input }],
|
|
1111
|
-
comparisonStart: [{ type: i0.Input }],
|
|
1112
|
-
comparisonEnd: [{ type: i0.Input }],
|
|
1113
|
-
selectedChange: [{ type: i0.Output }],
|
|
1114
|
-
_userSelection: [{ type: i0.Output }],
|
|
1115
|
-
activeDateChange: [{ type: i0.Output }],
|
|
1116
|
-
_matCalendarBody: [{ type: i0.ViewChild, args: [MatCalendarBody,] }]
|
|
1117
|
-
};
|
|
1118
1180
|
return MatMonthView;
|
|
1119
1181
|
}());
|
|
1182
|
+
MatMonthView.decorators = [
|
|
1183
|
+
{ type: i0.Component, args: [{
|
|
1184
|
+
selector: 'mat-month-view',
|
|
1185
|
+
template: "<table class=\"mat-calendar-table\" role=\"presentation\">\n <thead class=\"mat-calendar-table-header\">\n <tr>\n <th scope=\"col\" *ngFor=\"let day of _weekdays\" [attr.aria-label]=\"day.long\">{{day.narrow}}</th>\n </tr>\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"7\" aria-hidden=\"true\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_monthLabel\"\n [rows]=\"_weeks\"\n [todayValue]=\"_todayDate!\"\n [startValue]=\"_rangeStart!\"\n [endValue]=\"_rangeEnd!\"\n [comparisonStart]=\"_comparisonRangeStart\"\n [comparisonEnd]=\"_comparisonRangeEnd\"\n [previewStart]=\"_previewStart\"\n [previewEnd]=\"_previewEnd\"\n [isRange]=\"_isRange\"\n [labelMinRequiredCells]=\"3\"\n [activeCell]=\"_dateAdapter.getDate(activeDate) - 1\"\n (selectedValueChange)=\"_dateSelected($event)\"\n (previewChange)=\"_previewChanged($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
|
|
1186
|
+
exportAs: 'matMonthView',
|
|
1187
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1188
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1189
|
+
},] }
|
|
1190
|
+
];
|
|
1191
|
+
MatMonthView.ctorParameters = function () { return [
|
|
1192
|
+
{ type: i0.ChangeDetectorRef },
|
|
1193
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
|
|
1194
|
+
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
1195
|
+
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] },
|
|
1196
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATE_RANGE_SELECTION_STRATEGY,] }, { type: i0.Optional }] }
|
|
1197
|
+
]; };
|
|
1198
|
+
MatMonthView.propDecorators = {
|
|
1199
|
+
activeDate: [{ type: i0.Input }],
|
|
1200
|
+
selected: [{ type: i0.Input }],
|
|
1201
|
+
minDate: [{ type: i0.Input }],
|
|
1202
|
+
maxDate: [{ type: i0.Input }],
|
|
1203
|
+
dateFilter: [{ type: i0.Input }],
|
|
1204
|
+
dateClass: [{ type: i0.Input }],
|
|
1205
|
+
comparisonStart: [{ type: i0.Input }],
|
|
1206
|
+
comparisonEnd: [{ type: i0.Input }],
|
|
1207
|
+
selectedChange: [{ type: i0.Output }],
|
|
1208
|
+
_userSelection: [{ type: i0.Output }],
|
|
1209
|
+
activeDateChange: [{ type: i0.Output }],
|
|
1210
|
+
_matCalendarBody: [{ type: i0.ViewChild, args: [MatCalendarBody,] }]
|
|
1211
|
+
};
|
|
1120
1212
|
|
|
1121
1213
|
/**
|
|
1122
1214
|
* @license
|
|
@@ -1143,7 +1235,7 @@
|
|
|
1143
1235
|
this.yearSelected = new i0.EventEmitter();
|
|
1144
1236
|
/** Emits when any date is activated. */
|
|
1145
1237
|
this.activeDateChange = new i0.EventEmitter();
|
|
1146
|
-
if (!this._dateAdapter) {
|
|
1238
|
+
if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
1147
1239
|
throw createMissingDateImplError('DateAdapter');
|
|
1148
1240
|
}
|
|
1149
1241
|
this._activeDate = this._dateAdapter.today();
|
|
@@ -1153,7 +1245,7 @@
|
|
|
1153
1245
|
get: function () { return this._activeDate; },
|
|
1154
1246
|
set: function (value) {
|
|
1155
1247
|
var oldActiveDate = this._activeDate;
|
|
1156
|
-
var validDate = this.
|
|
1248
|
+
var validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();
|
|
1157
1249
|
this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
|
|
1158
1250
|
if (!isSameMultiYearView(this._dateAdapter, oldActiveDate, this._activeDate, this.minDate, this.maxDate)) {
|
|
1159
1251
|
this._init();
|
|
@@ -1170,7 +1262,7 @@
|
|
|
1170
1262
|
this._selected = value;
|
|
1171
1263
|
}
|
|
1172
1264
|
else {
|
|
1173
|
-
this._selected = this.
|
|
1265
|
+
this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
1174
1266
|
}
|
|
1175
1267
|
this._setSelectedYear(value);
|
|
1176
1268
|
},
|
|
@@ -1181,7 +1273,7 @@
|
|
|
1181
1273
|
/** The minimum selectable date. */
|
|
1182
1274
|
get: function () { return this._minDate; },
|
|
1183
1275
|
set: function (value) {
|
|
1184
|
-
this._minDate = this.
|
|
1276
|
+
this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
1185
1277
|
},
|
|
1186
1278
|
enumerable: false,
|
|
1187
1279
|
configurable: true
|
|
@@ -1190,7 +1282,7 @@
|
|
|
1190
1282
|
/** The maximum selectable date. */
|
|
1191
1283
|
get: function () { return this._maxDate; },
|
|
1192
1284
|
set: function (value) {
|
|
1193
|
-
this._maxDate = this.
|
|
1285
|
+
this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
1194
1286
|
},
|
|
1195
1287
|
enumerable: false,
|
|
1196
1288
|
configurable: true
|
|
@@ -1288,8 +1380,10 @@
|
|
|
1288
1380
|
};
|
|
1289
1381
|
/** Creates an MatCalendarCell for the given year. */
|
|
1290
1382
|
MatMultiYearView.prototype._createCellForYear = function (year) {
|
|
1291
|
-
var
|
|
1292
|
-
|
|
1383
|
+
var date = this._dateAdapter.createDate(year, 0, 1);
|
|
1384
|
+
var yearName = this._dateAdapter.getYearName(date);
|
|
1385
|
+
var cellClasses = this.dateClass ? this.dateClass(date, 'multi-year') : undefined;
|
|
1386
|
+
return new MatCalendarCell(year, yearName, yearName, this._shouldEnableYear(year), cellClasses);
|
|
1293
1387
|
};
|
|
1294
1388
|
/** Whether the given year is enabled. */
|
|
1295
1389
|
MatMultiYearView.prototype._shouldEnableYear = function (year) {
|
|
@@ -1312,13 +1406,6 @@
|
|
|
1312
1406
|
}
|
|
1313
1407
|
return false;
|
|
1314
1408
|
};
|
|
1315
|
-
/**
|
|
1316
|
-
* @param obj The object to check.
|
|
1317
|
-
* @returns The given object if it is both a date instance and valid, otherwise null.
|
|
1318
|
-
*/
|
|
1319
|
-
MatMultiYearView.prototype._getValidDateOrNull = function (obj) {
|
|
1320
|
-
return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
|
|
1321
|
-
};
|
|
1322
1409
|
/** Determines whether the user has the RTL layout direction. */
|
|
1323
1410
|
MatMultiYearView.prototype._isRtl = function () {
|
|
1324
1411
|
return this._dir && this._dir.value === 'rtl';
|
|
@@ -1336,33 +1423,34 @@
|
|
|
1336
1423
|
this._selectedYear = this._dateAdapter.getYear(value);
|
|
1337
1424
|
}
|
|
1338
1425
|
};
|
|
1339
|
-
MatMultiYearView.decorators = [
|
|
1340
|
-
{ type: i0.Component, args: [{
|
|
1341
|
-
selector: 'mat-multi-year-view',
|
|
1342
|
-
template: "<table class=\"mat-calendar-table\" role=\"presentation\">\n <thead class=\"mat-calendar-table-header\">\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [rows]=\"_years\"\n [todayValue]=\"_todayYear\"\n [startValue]=\"_selectedYear!\"\n [endValue]=\"_selectedYear!\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_getActiveCell()\"\n (selectedValueChange)=\"_yearSelected($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
|
|
1343
|
-
exportAs: 'matMultiYearView',
|
|
1344
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1345
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1346
|
-
},] }
|
|
1347
|
-
];
|
|
1348
|
-
MatMultiYearView.ctorParameters = function () { return [
|
|
1349
|
-
{ type: i0.ChangeDetectorRef },
|
|
1350
|
-
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
1351
|
-
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] }
|
|
1352
|
-
]; };
|
|
1353
|
-
MatMultiYearView.propDecorators = {
|
|
1354
|
-
activeDate: [{ type: i0.Input }],
|
|
1355
|
-
selected: [{ type: i0.Input }],
|
|
1356
|
-
minDate: [{ type: i0.Input }],
|
|
1357
|
-
maxDate: [{ type: i0.Input }],
|
|
1358
|
-
dateFilter: [{ type: i0.Input }],
|
|
1359
|
-
selectedChange: [{ type: i0.Output }],
|
|
1360
|
-
yearSelected: [{ type: i0.Output }],
|
|
1361
|
-
activeDateChange: [{ type: i0.Output }],
|
|
1362
|
-
_matCalendarBody: [{ type: i0.ViewChild, args: [MatCalendarBody,] }]
|
|
1363
|
-
};
|
|
1364
1426
|
return MatMultiYearView;
|
|
1365
1427
|
}());
|
|
1428
|
+
MatMultiYearView.decorators = [
|
|
1429
|
+
{ type: i0.Component, args: [{
|
|
1430
|
+
selector: 'mat-multi-year-view',
|
|
1431
|
+
template: "<table class=\"mat-calendar-table\" role=\"presentation\">\n <thead class=\"mat-calendar-table-header\">\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [rows]=\"_years\"\n [todayValue]=\"_todayYear\"\n [startValue]=\"_selectedYear!\"\n [endValue]=\"_selectedYear!\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_getActiveCell()\"\n (selectedValueChange)=\"_yearSelected($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
|
|
1432
|
+
exportAs: 'matMultiYearView',
|
|
1433
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1434
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1435
|
+
},] }
|
|
1436
|
+
];
|
|
1437
|
+
MatMultiYearView.ctorParameters = function () { return [
|
|
1438
|
+
{ type: i0.ChangeDetectorRef },
|
|
1439
|
+
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
1440
|
+
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] }
|
|
1441
|
+
]; };
|
|
1442
|
+
MatMultiYearView.propDecorators = {
|
|
1443
|
+
activeDate: [{ type: i0.Input }],
|
|
1444
|
+
selected: [{ type: i0.Input }],
|
|
1445
|
+
minDate: [{ type: i0.Input }],
|
|
1446
|
+
maxDate: [{ type: i0.Input }],
|
|
1447
|
+
dateFilter: [{ type: i0.Input }],
|
|
1448
|
+
dateClass: [{ type: i0.Input }],
|
|
1449
|
+
selectedChange: [{ type: i0.Output }],
|
|
1450
|
+
yearSelected: [{ type: i0.Output }],
|
|
1451
|
+
activeDateChange: [{ type: i0.Output }],
|
|
1452
|
+
_matCalendarBody: [{ type: i0.ViewChild, args: [MatCalendarBody,] }]
|
|
1453
|
+
};
|
|
1366
1454
|
function isSameMultiYearView(dateAdapter, date1, date2, minDate, maxDate) {
|
|
1367
1455
|
var year1 = dateAdapter.getYear(date1);
|
|
1368
1456
|
var year2 = dateAdapter.getYear(date2);
|
|
@@ -1423,11 +1511,13 @@
|
|
|
1423
1511
|
this.monthSelected = new i0.EventEmitter();
|
|
1424
1512
|
/** Emits when any date is activated. */
|
|
1425
1513
|
this.activeDateChange = new i0.EventEmitter();
|
|
1426
|
-
if (
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1514
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
1515
|
+
if (!this._dateAdapter) {
|
|
1516
|
+
throw createMissingDateImplError('DateAdapter');
|
|
1517
|
+
}
|
|
1518
|
+
if (!this._dateFormats) {
|
|
1519
|
+
throw createMissingDateImplError('MAT_DATE_FORMATS');
|
|
1520
|
+
}
|
|
1431
1521
|
}
|
|
1432
1522
|
this._activeDate = this._dateAdapter.today();
|
|
1433
1523
|
}
|
|
@@ -1436,7 +1526,7 @@
|
|
|
1436
1526
|
get: function () { return this._activeDate; },
|
|
1437
1527
|
set: function (value) {
|
|
1438
1528
|
var oldActiveDate = this._activeDate;
|
|
1439
|
-
var validDate = this.
|
|
1529
|
+
var validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) || this._dateAdapter.today();
|
|
1440
1530
|
this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
|
|
1441
1531
|
if (this._dateAdapter.getYear(oldActiveDate) !== this._dateAdapter.getYear(this._activeDate)) {
|
|
1442
1532
|
this._init();
|
|
@@ -1453,7 +1543,7 @@
|
|
|
1453
1543
|
this._selected = value;
|
|
1454
1544
|
}
|
|
1455
1545
|
else {
|
|
1456
|
-
this._selected = this.
|
|
1546
|
+
this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
1457
1547
|
}
|
|
1458
1548
|
this._setSelectedMonth(value);
|
|
1459
1549
|
},
|
|
@@ -1464,7 +1554,7 @@
|
|
|
1464
1554
|
/** The minimum selectable date. */
|
|
1465
1555
|
get: function () { return this._minDate; },
|
|
1466
1556
|
set: function (value) {
|
|
1467
|
-
this._minDate = this.
|
|
1557
|
+
this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
1468
1558
|
},
|
|
1469
1559
|
enumerable: false,
|
|
1470
1560
|
configurable: true
|
|
@@ -1473,7 +1563,7 @@
|
|
|
1473
1563
|
/** The maximum selectable date. */
|
|
1474
1564
|
get: function () { return this._maxDate; },
|
|
1475
1565
|
set: function (value) {
|
|
1476
|
-
this._maxDate = this.
|
|
1566
|
+
this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
1477
1567
|
},
|
|
1478
1568
|
enumerable: false,
|
|
1479
1569
|
configurable: true
|
|
@@ -1569,8 +1659,10 @@
|
|
|
1569
1659
|
};
|
|
1570
1660
|
/** Creates an MatCalendarCell for the given month. */
|
|
1571
1661
|
MatYearView.prototype._createCellForMonth = function (month, monthName) {
|
|
1572
|
-
var
|
|
1573
|
-
|
|
1662
|
+
var date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);
|
|
1663
|
+
var ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.monthYearA11yLabel);
|
|
1664
|
+
var cellClasses = this.dateClass ? this.dateClass(date, 'year') : undefined;
|
|
1665
|
+
return new MatCalendarCell(month, monthName.toLocaleUpperCase(), ariaLabel, this._shouldEnableMonth(month), cellClasses);
|
|
1574
1666
|
};
|
|
1575
1667
|
/** Whether the given month is enabled. */
|
|
1576
1668
|
MatYearView.prototype._shouldEnableMonth = function (month) {
|
|
@@ -1616,13 +1708,6 @@
|
|
|
1616
1708
|
}
|
|
1617
1709
|
return false;
|
|
1618
1710
|
};
|
|
1619
|
-
/**
|
|
1620
|
-
* @param obj The object to check.
|
|
1621
|
-
* @returns The given object if it is both a date instance and valid, otherwise null.
|
|
1622
|
-
*/
|
|
1623
|
-
MatYearView.prototype._getValidDateOrNull = function (obj) {
|
|
1624
|
-
return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
|
|
1625
|
-
};
|
|
1626
1711
|
/** Determines whether the user has the RTL layout direction. */
|
|
1627
1712
|
MatYearView.prototype._isRtl = function () {
|
|
1628
1713
|
return this._dir && this._dir.value === 'rtl';
|
|
@@ -1637,34 +1722,35 @@
|
|
|
1637
1722
|
this._selectedMonth = this._getMonthInCurrentYear(value);
|
|
1638
1723
|
}
|
|
1639
1724
|
};
|
|
1640
|
-
MatYearView.decorators = [
|
|
1641
|
-
{ type: i0.Component, args: [{
|
|
1642
|
-
selector: 'mat-year-view',
|
|
1643
|
-
template: "<table class=\"mat-calendar-table\" role=\"presentation\">\n <thead class=\"mat-calendar-table-header\">\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_yearLabel\"\n [rows]=\"_months\"\n [todayValue]=\"_todayMonth!\"\n [startValue]=\"_selectedMonth!\"\n [endValue]=\"_selectedMonth!\"\n [labelMinRequiredCells]=\"2\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_dateAdapter.getMonth(activeDate)\"\n (selectedValueChange)=\"_monthSelected($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
|
|
1644
|
-
exportAs: 'matYearView',
|
|
1645
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1646
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1647
|
-
},] }
|
|
1648
|
-
];
|
|
1649
|
-
MatYearView.ctorParameters = function () { return [
|
|
1650
|
-
{ type: i0.ChangeDetectorRef },
|
|
1651
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
|
|
1652
|
-
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
1653
|
-
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] }
|
|
1654
|
-
]; };
|
|
1655
|
-
MatYearView.propDecorators = {
|
|
1656
|
-
activeDate: [{ type: i0.Input }],
|
|
1657
|
-
selected: [{ type: i0.Input }],
|
|
1658
|
-
minDate: [{ type: i0.Input }],
|
|
1659
|
-
maxDate: [{ type: i0.Input }],
|
|
1660
|
-
dateFilter: [{ type: i0.Input }],
|
|
1661
|
-
selectedChange: [{ type: i0.Output }],
|
|
1662
|
-
monthSelected: [{ type: i0.Output }],
|
|
1663
|
-
activeDateChange: [{ type: i0.Output }],
|
|
1664
|
-
_matCalendarBody: [{ type: i0.ViewChild, args: [MatCalendarBody,] }]
|
|
1665
|
-
};
|
|
1666
1725
|
return MatYearView;
|
|
1667
1726
|
}());
|
|
1727
|
+
MatYearView.decorators = [
|
|
1728
|
+
{ type: i0.Component, args: [{
|
|
1729
|
+
selector: 'mat-year-view',
|
|
1730
|
+
template: "<table class=\"mat-calendar-table\" role=\"presentation\">\n <thead class=\"mat-calendar-table-header\">\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_yearLabel\"\n [rows]=\"_months\"\n [todayValue]=\"_todayMonth!\"\n [startValue]=\"_selectedMonth!\"\n [endValue]=\"_selectedMonth!\"\n [labelMinRequiredCells]=\"2\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_dateAdapter.getMonth(activeDate)\"\n (selectedValueChange)=\"_monthSelected($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
|
|
1731
|
+
exportAs: 'matYearView',
|
|
1732
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1733
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1734
|
+
},] }
|
|
1735
|
+
];
|
|
1736
|
+
MatYearView.ctorParameters = function () { return [
|
|
1737
|
+
{ type: i0.ChangeDetectorRef },
|
|
1738
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
|
|
1739
|
+
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
1740
|
+
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] }
|
|
1741
|
+
]; };
|
|
1742
|
+
MatYearView.propDecorators = {
|
|
1743
|
+
activeDate: [{ type: i0.Input }],
|
|
1744
|
+
selected: [{ type: i0.Input }],
|
|
1745
|
+
minDate: [{ type: i0.Input }],
|
|
1746
|
+
maxDate: [{ type: i0.Input }],
|
|
1747
|
+
dateFilter: [{ type: i0.Input }],
|
|
1748
|
+
dateClass: [{ type: i0.Input }],
|
|
1749
|
+
selectedChange: [{ type: i0.Output }],
|
|
1750
|
+
monthSelected: [{ type: i0.Output }],
|
|
1751
|
+
activeDateChange: [{ type: i0.Output }],
|
|
1752
|
+
_matCalendarBody: [{ type: i0.ViewChild, args: [MatCalendarBody,] }]
|
|
1753
|
+
};
|
|
1668
1754
|
|
|
1669
1755
|
/**
|
|
1670
1756
|
* @license
|
|
@@ -1779,24 +1865,24 @@
|
|
|
1779
1865
|
// Otherwise we are in 'multi-year' view.
|
|
1780
1866
|
return isSameMultiYearView(this._dateAdapter, date1, date2, this.calendar.minDate, this.calendar.maxDate);
|
|
1781
1867
|
};
|
|
1782
|
-
MatCalendarHeader.decorators = [
|
|
1783
|
-
{ type: i0.Component, args: [{
|
|
1784
|
-
selector: 'mat-calendar-header',
|
|
1785
|
-
template: "<div class=\"mat-calendar-header\">\n <div class=\"mat-calendar-controls\">\n <button mat-button type=\"button\" class=\"mat-calendar-period-button\"\n (click)=\"currentPeriodClicked()\" [attr.aria-label]=\"periodButtonLabel\"\n cdkAriaLive=\"polite\">\n {{periodButtonText}}\n <div class=\"mat-calendar-arrow\"\n [class.mat-calendar-invert]=\"calendar.currentView != 'month'\"></div>\n </button>\n\n <div class=\"mat-calendar-spacer\"></div>\n\n <ng-content></ng-content>\n\n <button mat-icon-button type=\"button\" class=\"mat-calendar-previous-button\"\n [disabled]=\"!previousEnabled()\" (click)=\"previousClicked()\"\n [attr.aria-label]=\"prevButtonLabel\">\n </button>\n\n <button mat-icon-button type=\"button\" class=\"mat-calendar-next-button\"\n [disabled]=\"!nextEnabled()\" (click)=\"nextClicked()\"\n [attr.aria-label]=\"nextButtonLabel\">\n </button>\n </div>\n</div>\n",
|
|
1786
|
-
exportAs: 'matCalendarHeader',
|
|
1787
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1788
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1789
|
-
},] }
|
|
1790
|
-
];
|
|
1791
|
-
MatCalendarHeader.ctorParameters = function () { return [
|
|
1792
|
-
{ type: MatDatepickerIntl },
|
|
1793
|
-
{ type: MatCalendar, decorators: [{ type: i0.Inject, args: [i0.forwardRef(function () { return MatCalendar; }),] }] },
|
|
1794
|
-
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
1795
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
|
|
1796
|
-
{ type: i0.ChangeDetectorRef }
|
|
1797
|
-
]; };
|
|
1798
1868
|
return MatCalendarHeader;
|
|
1799
1869
|
}());
|
|
1870
|
+
MatCalendarHeader.decorators = [
|
|
1871
|
+
{ type: i0.Component, args: [{
|
|
1872
|
+
selector: 'mat-calendar-header',
|
|
1873
|
+
template: "<div class=\"mat-calendar-header\">\n <div class=\"mat-calendar-controls\">\n <button mat-button type=\"button\" class=\"mat-calendar-period-button\"\n (click)=\"currentPeriodClicked()\" [attr.aria-label]=\"periodButtonLabel\"\n cdkAriaLive=\"polite\">\n {{periodButtonText}}\n <div class=\"mat-calendar-arrow\"\n [class.mat-calendar-invert]=\"calendar.currentView != 'month'\"></div>\n </button>\n\n <div class=\"mat-calendar-spacer\"></div>\n\n <ng-content></ng-content>\n\n <button mat-icon-button type=\"button\" class=\"mat-calendar-previous-button\"\n [disabled]=\"!previousEnabled()\" (click)=\"previousClicked()\"\n [attr.aria-label]=\"prevButtonLabel\">\n </button>\n\n <button mat-icon-button type=\"button\" class=\"mat-calendar-next-button\"\n [disabled]=\"!nextEnabled()\" (click)=\"nextClicked()\"\n [attr.aria-label]=\"nextButtonLabel\">\n </button>\n </div>\n</div>\n",
|
|
1874
|
+
exportAs: 'matCalendarHeader',
|
|
1875
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1876
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1877
|
+
},] }
|
|
1878
|
+
];
|
|
1879
|
+
MatCalendarHeader.ctorParameters = function () { return [
|
|
1880
|
+
{ type: MatDatepickerIntl },
|
|
1881
|
+
{ type: MatCalendar, decorators: [{ type: i0.Inject, args: [i0.forwardRef(function () { return MatCalendar; }),] }] },
|
|
1882
|
+
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
1883
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
|
|
1884
|
+
{ type: i0.ChangeDetectorRef }
|
|
1885
|
+
]; };
|
|
1800
1886
|
/**
|
|
1801
1887
|
* A calendar that is used as part of the datepicker.
|
|
1802
1888
|
* @docs-private
|
|
@@ -1836,11 +1922,13 @@
|
|
|
1836
1922
|
* Emits whenever there is a state change that the header may need to respond to.
|
|
1837
1923
|
*/
|
|
1838
1924
|
this.stateChanges = new rxjs.Subject();
|
|
1839
|
-
if (
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1925
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
1926
|
+
if (!this._dateAdapter) {
|
|
1927
|
+
throw createMissingDateImplError('DateAdapter');
|
|
1928
|
+
}
|
|
1929
|
+
if (!this._dateFormats) {
|
|
1930
|
+
throw createMissingDateImplError('MAT_DATE_FORMATS');
|
|
1931
|
+
}
|
|
1844
1932
|
}
|
|
1845
1933
|
this._intlChanges = _intl.changes.subscribe(function () {
|
|
1846
1934
|
_changeDetectorRef.markForCheck();
|
|
@@ -1851,7 +1939,7 @@
|
|
|
1851
1939
|
/** A date representing the period (month or year) to start the calendar in. */
|
|
1852
1940
|
get: function () { return this._startAt; },
|
|
1853
1941
|
set: function (value) {
|
|
1854
|
-
this._startAt = this.
|
|
1942
|
+
this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
1855
1943
|
},
|
|
1856
1944
|
enumerable: false,
|
|
1857
1945
|
configurable: true
|
|
@@ -1864,7 +1952,7 @@
|
|
|
1864
1952
|
this._selected = value;
|
|
1865
1953
|
}
|
|
1866
1954
|
else {
|
|
1867
|
-
this._selected = this.
|
|
1955
|
+
this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
1868
1956
|
}
|
|
1869
1957
|
},
|
|
1870
1958
|
enumerable: false,
|
|
@@ -1874,7 +1962,7 @@
|
|
|
1874
1962
|
/** The minimum selectable date. */
|
|
1875
1963
|
get: function () { return this._minDate; },
|
|
1876
1964
|
set: function (value) {
|
|
1877
|
-
this._minDate = this.
|
|
1965
|
+
this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
1878
1966
|
},
|
|
1879
1967
|
enumerable: false,
|
|
1880
1968
|
configurable: true
|
|
@@ -1883,7 +1971,7 @@
|
|
|
1883
1971
|
/** The maximum selectable date. */
|
|
1884
1972
|
get: function () { return this._maxDate; },
|
|
1885
1973
|
set: function (value) {
|
|
1886
|
-
this._maxDate = this.
|
|
1974
|
+
this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
1887
1975
|
},
|
|
1888
1976
|
enumerable: false,
|
|
1889
1977
|
configurable: true
|
|
@@ -1984,58 +2072,51 @@
|
|
|
1984
2072
|
this.activeDate = date;
|
|
1985
2073
|
this.currentView = view;
|
|
1986
2074
|
};
|
|
1987
|
-
/**
|
|
1988
|
-
* @param obj The object to check.
|
|
1989
|
-
* @returns The given object if it is both a date instance and valid, otherwise null.
|
|
1990
|
-
*/
|
|
1991
|
-
MatCalendar.prototype._getValidDateOrNull = function (obj) {
|
|
1992
|
-
return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
|
|
1993
|
-
};
|
|
1994
2075
|
/** Returns the component instance that corresponds to the current calendar view. */
|
|
1995
2076
|
MatCalendar.prototype._getCurrentViewComponent = function () {
|
|
1996
2077
|
return this.monthView || this.yearView || this.multiYearView;
|
|
1997
2078
|
};
|
|
1998
|
-
MatCalendar.decorators = [
|
|
1999
|
-
{ type: i0.Component, args: [{
|
|
2000
|
-
selector: 'mat-calendar',
|
|
2001
|
-
template: "<ng-template [cdkPortalOutlet]=\"_calendarHeaderPortal\"></ng-template>\n\n<div class=\"mat-calendar-content\" [ngSwitch]=\"currentView\" cdkMonitorSubtreeFocus tabindex=\"-1\">\n <mat-month-view\n *ngSwitchCase=\"'month'\"\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [dateClass]=\"dateClass\"\n [comparisonStart]=\"comparisonStart\"\n [comparisonEnd]=\"comparisonEnd\"\n (_userSelection)=\"_dateSelected($event)\">\n </mat-month-view>\n\n <mat-year-view\n *ngSwitchCase=\"'year'\"\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n (monthSelected)=\"_monthSelectedInYearView($event)\"\n (selectedChange)=\"_goToDateInView($event, 'month')\">\n </mat-year-view>\n\n <mat-multi-year-view\n *ngSwitchCase=\"'multi-year'\"\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n (yearSelected)=\"_yearSelectedInMultiYearView($event)\"\n (selectedChange)=\"_goToDateInView($event, 'year')\">\n </mat-multi-year-view>\n</div>\n",
|
|
2002
|
-
host: {
|
|
2003
|
-
'class': 'mat-calendar',
|
|
2004
|
-
},
|
|
2005
|
-
exportAs: 'matCalendar',
|
|
2006
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
2007
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2008
|
-
providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER],
|
|
2009
|
-
styles: [".mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:\"\";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:\"\";position:absolute;top:0;left:-8px;right:-8px;height:1px}\n"]
|
|
2010
|
-
},] }
|
|
2011
|
-
];
|
|
2012
|
-
MatCalendar.ctorParameters = function () { return [
|
|
2013
|
-
{ type: MatDatepickerIntl },
|
|
2014
|
-
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
2015
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
|
|
2016
|
-
{ type: i0.ChangeDetectorRef }
|
|
2017
|
-
]; };
|
|
2018
|
-
MatCalendar.propDecorators = {
|
|
2019
|
-
headerComponent: [{ type: i0.Input }],
|
|
2020
|
-
startAt: [{ type: i0.Input }],
|
|
2021
|
-
startView: [{ type: i0.Input }],
|
|
2022
|
-
selected: [{ type: i0.Input }],
|
|
2023
|
-
minDate: [{ type: i0.Input }],
|
|
2024
|
-
maxDate: [{ type: i0.Input }],
|
|
2025
|
-
dateFilter: [{ type: i0.Input }],
|
|
2026
|
-
dateClass: [{ type: i0.Input }],
|
|
2027
|
-
comparisonStart: [{ type: i0.Input }],
|
|
2028
|
-
comparisonEnd: [{ type: i0.Input }],
|
|
2029
|
-
selectedChange: [{ type: i0.Output }],
|
|
2030
|
-
yearSelected: [{ type: i0.Output }],
|
|
2031
|
-
monthSelected: [{ type: i0.Output }],
|
|
2032
|
-
_userSelection: [{ type: i0.Output }],
|
|
2033
|
-
monthView: [{ type: i0.ViewChild, args: [MatMonthView,] }],
|
|
2034
|
-
yearView: [{ type: i0.ViewChild, args: [MatYearView,] }],
|
|
2035
|
-
multiYearView: [{ type: i0.ViewChild, args: [MatMultiYearView,] }]
|
|
2036
|
-
};
|
|
2037
2079
|
return MatCalendar;
|
|
2038
2080
|
}());
|
|
2081
|
+
MatCalendar.decorators = [
|
|
2082
|
+
{ type: i0.Component, args: [{
|
|
2083
|
+
selector: 'mat-calendar',
|
|
2084
|
+
template: "<ng-template [cdkPortalOutlet]=\"_calendarHeaderPortal\"></ng-template>\n\n<div class=\"mat-calendar-content\" [ngSwitch]=\"currentView\" cdkMonitorSubtreeFocus tabindex=\"-1\">\n <mat-month-view\n *ngSwitchCase=\"'month'\"\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [dateClass]=\"dateClass\"\n [comparisonStart]=\"comparisonStart\"\n [comparisonEnd]=\"comparisonEnd\"\n (_userSelection)=\"_dateSelected($event)\">\n </mat-month-view>\n\n <mat-year-view\n *ngSwitchCase=\"'year'\"\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [dateClass]=\"dateClass\"\n (monthSelected)=\"_monthSelectedInYearView($event)\"\n (selectedChange)=\"_goToDateInView($event, 'month')\">\n </mat-year-view>\n\n <mat-multi-year-view\n *ngSwitchCase=\"'multi-year'\"\n [(activeDate)]=\"activeDate\"\n [selected]=\"selected\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [dateClass]=\"dateClass\"\n (yearSelected)=\"_yearSelectedInMultiYearView($event)\"\n (selectedChange)=\"_goToDateInView($event, 'year')\">\n </mat-multi-year-view>\n</div>\n",
|
|
2085
|
+
host: {
|
|
2086
|
+
'class': 'mat-calendar',
|
|
2087
|
+
},
|
|
2088
|
+
exportAs: 'matCalendar',
|
|
2089
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
2090
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2091
|
+
providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER],
|
|
2092
|
+
styles: [".mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:\"\";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:\"\";position:absolute;top:0;left:-8px;right:-8px;height:1px}\n"]
|
|
2093
|
+
},] }
|
|
2094
|
+
];
|
|
2095
|
+
MatCalendar.ctorParameters = function () { return [
|
|
2096
|
+
{ type: MatDatepickerIntl },
|
|
2097
|
+
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
2098
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
|
|
2099
|
+
{ type: i0.ChangeDetectorRef }
|
|
2100
|
+
]; };
|
|
2101
|
+
MatCalendar.propDecorators = {
|
|
2102
|
+
headerComponent: [{ type: i0.Input }],
|
|
2103
|
+
startAt: [{ type: i0.Input }],
|
|
2104
|
+
startView: [{ type: i0.Input }],
|
|
2105
|
+
selected: [{ type: i0.Input }],
|
|
2106
|
+
minDate: [{ type: i0.Input }],
|
|
2107
|
+
maxDate: [{ type: i0.Input }],
|
|
2108
|
+
dateFilter: [{ type: i0.Input }],
|
|
2109
|
+
dateClass: [{ type: i0.Input }],
|
|
2110
|
+
comparisonStart: [{ type: i0.Input }],
|
|
2111
|
+
comparisonEnd: [{ type: i0.Input }],
|
|
2112
|
+
selectedChange: [{ type: i0.Output }],
|
|
2113
|
+
yearSelected: [{ type: i0.Output }],
|
|
2114
|
+
monthSelected: [{ type: i0.Output }],
|
|
2115
|
+
_userSelection: [{ type: i0.Output }],
|
|
2116
|
+
monthView: [{ type: i0.ViewChild, args: [MatMonthView,] }],
|
|
2117
|
+
yearView: [{ type: i0.ViewChild, args: [MatYearView,] }],
|
|
2118
|
+
multiYearView: [{ type: i0.ViewChild, args: [MatMultiYearView,] }]
|
|
2119
|
+
};
|
|
2039
2120
|
|
|
2040
2121
|
/**
|
|
2041
2122
|
* @license
|
|
@@ -2071,13 +2152,6 @@
|
|
|
2071
2152
|
])
|
|
2072
2153
|
};
|
|
2073
2154
|
|
|
2074
|
-
/**
|
|
2075
|
-
* @license
|
|
2076
|
-
* Copyright Google LLC All Rights Reserved.
|
|
2077
|
-
*
|
|
2078
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
2079
|
-
* found in the LICENSE file at https://angular.io/license
|
|
2080
|
-
*/
|
|
2081
2155
|
/** Used to generate a unique ID for each datepicker instance. */
|
|
2082
2156
|
var datepickerUid = 0;
|
|
2083
2157
|
/** Injection token that determines the scroll handling while the calendar is open. */
|
|
@@ -2179,39 +2253,39 @@
|
|
|
2179
2253
|
// @breaking-change 11.0.0 Remove null check for `_model`.
|
|
2180
2254
|
return this._model ? this._model.selection : null;
|
|
2181
2255
|
};
|
|
2182
|
-
MatDatepickerContent.decorators = [
|
|
2183
|
-
{ type: i0.Component, args: [{
|
|
2184
|
-
selector: 'mat-datepicker-content',
|
|
2185
|
-
template: "<mat-calendar cdkTrapFocus\n [id]=\"datepicker.id\"\n [ngClass]=\"datepicker.panelClass\"\n [startAt]=\"datepicker.startAt\"\n [startView]=\"datepicker.startView\"\n [minDate]=\"datepicker._minDate\"\n [maxDate]=\"datepicker._maxDate\"\n [dateFilter]=\"datepicker._dateFilter\"\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 (_userSelection)=\"_handleUserSelection($event)\">\n</mat-calendar>\n",
|
|
2186
|
-
host: {
|
|
2187
|
-
'class': 'mat-datepicker-content',
|
|
2188
|
-
'[@transformPanel]': '_animationState',
|
|
2189
|
-
'(@transformPanel.done)': '_animationDone.next()',
|
|
2190
|
-
'[class.mat-datepicker-content-touch]': 'datepicker.touchUi',
|
|
2191
|
-
},
|
|
2192
|
-
animations: [
|
|
2193
|
-
matDatepickerAnimations.transformPanel,
|
|
2194
|
-
matDatepickerAnimations.fadeInCalendar,
|
|
2195
|
-
],
|
|
2196
|
-
exportAs: 'matDatepickerContent',
|
|
2197
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
2198
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2199
|
-
inputs: ['color'],
|
|
2200
|
-
styles: [".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}\n"]
|
|
2201
|
-
},] }
|
|
2202
|
-
];
|
|
2203
|
-
MatDatepickerContent.ctorParameters = function () { return [
|
|
2204
|
-
{ type: i0.ElementRef },
|
|
2205
|
-
{ type: i0.ChangeDetectorRef },
|
|
2206
|
-
{ type: MatDateSelectionModel },
|
|
2207
|
-
{ type: core.DateAdapter },
|
|
2208
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [MAT_DATE_RANGE_SELECTION_STRATEGY,] }] }
|
|
2209
|
-
]; };
|
|
2210
|
-
MatDatepickerContent.propDecorators = {
|
|
2211
|
-
_calendar: [{ type: i0.ViewChild, args: [MatCalendar,] }]
|
|
2212
|
-
};
|
|
2213
2256
|
return MatDatepickerContent;
|
|
2214
2257
|
}(_MatDatepickerContentMixinBase));
|
|
2258
|
+
MatDatepickerContent.decorators = [
|
|
2259
|
+
{ type: i0.Component, args: [{
|
|
2260
|
+
selector: 'mat-datepicker-content',
|
|
2261
|
+
template: "<mat-calendar cdkTrapFocus\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 (_userSelection)=\"_handleUserSelection($event)\">\n</mat-calendar>\n",
|
|
2262
|
+
host: {
|
|
2263
|
+
'class': 'mat-datepicker-content',
|
|
2264
|
+
'[@transformPanel]': '_animationState',
|
|
2265
|
+
'(@transformPanel.done)': '_animationDone.next()',
|
|
2266
|
+
'[class.mat-datepicker-content-touch]': 'datepicker.touchUi',
|
|
2267
|
+
},
|
|
2268
|
+
animations: [
|
|
2269
|
+
matDatepickerAnimations.transformPanel,
|
|
2270
|
+
matDatepickerAnimations.fadeInCalendar,
|
|
2271
|
+
],
|
|
2272
|
+
exportAs: 'matDatepickerContent',
|
|
2273
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
2274
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2275
|
+
inputs: ['color'],
|
|
2276
|
+
styles: [".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}\n"]
|
|
2277
|
+
},] }
|
|
2278
|
+
];
|
|
2279
|
+
MatDatepickerContent.ctorParameters = function () { return [
|
|
2280
|
+
{ type: i0.ElementRef },
|
|
2281
|
+
{ type: i0.ChangeDetectorRef },
|
|
2282
|
+
{ type: MatDateSelectionModel },
|
|
2283
|
+
{ type: core.DateAdapter },
|
|
2284
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [MAT_DATE_RANGE_SELECTION_STRATEGY,] }] }
|
|
2285
|
+
]; };
|
|
2286
|
+
MatDatepickerContent.propDecorators = {
|
|
2287
|
+
_calendar: [{ type: i0.ViewChild, args: [MatCalendar,] }]
|
|
2288
|
+
};
|
|
2215
2289
|
/** Base class for a datepicker. */
|
|
2216
2290
|
var MatDatepickerBase = /** @class */ (function () {
|
|
2217
2291
|
function MatDatepickerBase(_dialog, _overlay, _ngZone, _viewContainerRef, scrollStrategy, _dateAdapter, _dir, _document, _model) {
|
|
@@ -2250,9 +2324,11 @@
|
|
|
2250
2324
|
this.id = "mat-datepicker-" + datepickerUid++;
|
|
2251
2325
|
/** The element that was focused before the datepicker was opened. */
|
|
2252
2326
|
this._focusedElementBeforeOpen = null;
|
|
2327
|
+
/** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
|
|
2328
|
+
this._backdropHarnessClass = this.id + "-backdrop";
|
|
2253
2329
|
/** Emits when the datepicker's state changes. */
|
|
2254
2330
|
this._stateChanges = new rxjs.Subject();
|
|
2255
|
-
if (!this._dateAdapter) {
|
|
2331
|
+
if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
2256
2332
|
throw createMissingDateImplError('DateAdapter');
|
|
2257
2333
|
}
|
|
2258
2334
|
this._scrollStrategy = scrollStrategy;
|
|
@@ -2265,7 +2341,7 @@
|
|
|
2265
2341
|
return this._startAt || (this._datepickerInput ? this._datepickerInput.getStartValue() : null);
|
|
2266
2342
|
},
|
|
2267
2343
|
set: function (value) {
|
|
2268
|
-
this._startAt = this.
|
|
2344
|
+
this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
2269
2345
|
},
|
|
2270
2346
|
enumerable: false,
|
|
2271
2347
|
configurable: true
|
|
@@ -2313,33 +2389,23 @@
|
|
|
2313
2389
|
Object.defineProperty(MatDatepickerBase.prototype, "opened", {
|
|
2314
2390
|
/** Whether the calendar is open. */
|
|
2315
2391
|
get: function () { return this._opened; },
|
|
2316
|
-
set: function (value) {
|
|
2317
|
-
|
|
2318
|
-
configurable: true
|
|
2319
|
-
});
|
|
2320
|
-
Object.defineProperty(MatDatepickerBase.prototype, "_minDate", {
|
|
2321
|
-
/** The minimum selectable date. */
|
|
2322
|
-
get: function () {
|
|
2323
|
-
return this._datepickerInput && this._datepickerInput.min;
|
|
2324
|
-
},
|
|
2325
|
-
enumerable: false,
|
|
2326
|
-
configurable: true
|
|
2327
|
-
});
|
|
2328
|
-
Object.defineProperty(MatDatepickerBase.prototype, "_maxDate", {
|
|
2329
|
-
/** The maximum selectable date. */
|
|
2330
|
-
get: function () {
|
|
2331
|
-
return this._datepickerInput && this._datepickerInput.max;
|
|
2332
|
-
},
|
|
2333
|
-
enumerable: false,
|
|
2334
|
-
configurable: true
|
|
2335
|
-
});
|
|
2336
|
-
Object.defineProperty(MatDatepickerBase.prototype, "_dateFilter", {
|
|
2337
|
-
get: function () {
|
|
2338
|
-
return this._datepickerInput && this._datepickerInput.dateFilter;
|
|
2392
|
+
set: function (value) {
|
|
2393
|
+
coercion.coerceBooleanProperty(value) ? this.open() : this.close();
|
|
2339
2394
|
},
|
|
2340
2395
|
enumerable: false,
|
|
2341
2396
|
configurable: true
|
|
2342
2397
|
});
|
|
2398
|
+
/** The minimum selectable date. */
|
|
2399
|
+
MatDatepickerBase.prototype._getMinDate = function () {
|
|
2400
|
+
return this._datepickerInput && this._datepickerInput.min;
|
|
2401
|
+
};
|
|
2402
|
+
/** The maximum selectable date. */
|
|
2403
|
+
MatDatepickerBase.prototype._getMaxDate = function () {
|
|
2404
|
+
return this._datepickerInput && this._datepickerInput.max;
|
|
2405
|
+
};
|
|
2406
|
+
MatDatepickerBase.prototype._getDateFilter = function () {
|
|
2407
|
+
return this._datepickerInput && this._datepickerInput.dateFilter;
|
|
2408
|
+
};
|
|
2343
2409
|
MatDatepickerBase.prototype.ngOnChanges = function (changes) {
|
|
2344
2410
|
var positionChange = changes['xPosition'] || changes['yPosition'];
|
|
2345
2411
|
if (positionChange && !positionChange.firstChange && this._popupRef) {
|
|
@@ -2375,7 +2441,7 @@
|
|
|
2375
2441
|
*/
|
|
2376
2442
|
MatDatepickerBase.prototype._registerInput = function (input) {
|
|
2377
2443
|
var _this = this;
|
|
2378
|
-
if (this._datepickerInput) {
|
|
2444
|
+
if (this._datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
2379
2445
|
throw Error('A MatDatepicker can only be associated with a single input.');
|
|
2380
2446
|
}
|
|
2381
2447
|
this._inputStateChanges.unsubscribe();
|
|
@@ -2389,7 +2455,7 @@
|
|
|
2389
2455
|
if (this._opened || this.disabled) {
|
|
2390
2456
|
return;
|
|
2391
2457
|
}
|
|
2392
|
-
if (!this._datepickerInput) {
|
|
2458
|
+
if (!this._datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
2393
2459
|
throw Error('Attempted to open an MatDatepicker with no associated input.');
|
|
2394
2460
|
}
|
|
2395
2461
|
if (this._document) {
|
|
@@ -2455,6 +2521,7 @@
|
|
|
2455
2521
|
// datepicker dialog behaves consistently even if the user changed the defaults.
|
|
2456
2522
|
hasBackdrop: true,
|
|
2457
2523
|
disableClose: false,
|
|
2524
|
+
backdropClass: ['cdk-overlay-dark-backdrop', this._backdropHarnessClass],
|
|
2458
2525
|
width: '',
|
|
2459
2526
|
height: '',
|
|
2460
2527
|
minWidth: '',
|
|
@@ -2483,7 +2550,7 @@
|
|
|
2483
2550
|
this._popupComponentRef = this._popupRef.attach(portal$1);
|
|
2484
2551
|
this._forwardContentValues(this._popupComponentRef.instance);
|
|
2485
2552
|
// Update the position once the calendar has rendered.
|
|
2486
|
-
this._ngZone.onStable.
|
|
2553
|
+
this._ngZone.onStable.pipe(operators.take(1)).subscribe(function () {
|
|
2487
2554
|
_this._popupRef.updatePosition();
|
|
2488
2555
|
});
|
|
2489
2556
|
};
|
|
@@ -2504,7 +2571,7 @@
|
|
|
2504
2571
|
var overlayConfig = new overlay.OverlayConfig({
|
|
2505
2572
|
positionStrategy: this._setConnectedPositions(positionStrategy),
|
|
2506
2573
|
hasBackdrop: true,
|
|
2507
|
-
backdropClass: 'mat-overlay-transparent-backdrop',
|
|
2574
|
+
backdropClass: ['mat-overlay-transparent-backdrop', this._backdropHarnessClass],
|
|
2508
2575
|
direction: this._dir,
|
|
2509
2576
|
scrollStrategy: this._scrollStrategy(),
|
|
2510
2577
|
panelClass: 'mat-datepicker-popup',
|
|
@@ -2562,54 +2629,40 @@
|
|
|
2562
2629
|
}
|
|
2563
2630
|
]);
|
|
2564
2631
|
};
|
|
2565
|
-
/**
|
|
2566
|
-
* @param obj The object to check.
|
|
2567
|
-
* @returns The given object if it is both a date instance and valid, otherwise null.
|
|
2568
|
-
*/
|
|
2569
|
-
MatDatepickerBase.prototype._getValidDateOrNull = function (obj) {
|
|
2570
|
-
return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
|
|
2571
|
-
};
|
|
2572
|
-
MatDatepickerBase.decorators = [
|
|
2573
|
-
{ type: i0.Directive }
|
|
2574
|
-
];
|
|
2575
|
-
MatDatepickerBase.ctorParameters = function () { return [
|
|
2576
|
-
{ type: dialog.MatDialog },
|
|
2577
|
-
{ type: overlay.Overlay },
|
|
2578
|
-
{ type: i0.NgZone },
|
|
2579
|
-
{ type: i0.ViewContainerRef },
|
|
2580
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATEPICKER_SCROLL_STRATEGY,] }] },
|
|
2581
|
-
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
2582
|
-
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] },
|
|
2583
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [common.DOCUMENT,] }] },
|
|
2584
|
-
{ type: MatDateSelectionModel }
|
|
2585
|
-
]; };
|
|
2586
|
-
MatDatepickerBase.propDecorators = {
|
|
2587
|
-
calendarHeaderComponent: [{ type: i0.Input }],
|
|
2588
|
-
startAt: [{ type: i0.Input }],
|
|
2589
|
-
startView: [{ type: i0.Input }],
|
|
2590
|
-
color: [{ type: i0.Input }],
|
|
2591
|
-
touchUi: [{ type: i0.Input }],
|
|
2592
|
-
disabled: [{ type: i0.Input }],
|
|
2593
|
-
xPosition: [{ type: i0.Input }],
|
|
2594
|
-
yPosition: [{ type: i0.Input }],
|
|
2595
|
-
yearSelected: [{ type: i0.Output }],
|
|
2596
|
-
monthSelected: [{ type: i0.Output }],
|
|
2597
|
-
panelClass: [{ type: i0.Input }],
|
|
2598
|
-
dateClass: [{ type: i0.Input }],
|
|
2599
|
-
openedStream: [{ type: i0.Output, args: ['opened',] }],
|
|
2600
|
-
closedStream: [{ type: i0.Output, args: ['closed',] }],
|
|
2601
|
-
opened: [{ type: i0.Input }]
|
|
2602
|
-
};
|
|
2603
2632
|
return MatDatepickerBase;
|
|
2604
2633
|
}());
|
|
2634
|
+
MatDatepickerBase.decorators = [
|
|
2635
|
+
{ type: i0.Directive }
|
|
2636
|
+
];
|
|
2637
|
+
MatDatepickerBase.ctorParameters = function () { return [
|
|
2638
|
+
{ type: dialog.MatDialog },
|
|
2639
|
+
{ type: overlay.Overlay },
|
|
2640
|
+
{ type: i0.NgZone },
|
|
2641
|
+
{ type: i0.ViewContainerRef },
|
|
2642
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATEPICKER_SCROLL_STRATEGY,] }] },
|
|
2643
|
+
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
2644
|
+
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] },
|
|
2645
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [common.DOCUMENT,] }] },
|
|
2646
|
+
{ type: MatDateSelectionModel }
|
|
2647
|
+
]; };
|
|
2648
|
+
MatDatepickerBase.propDecorators = {
|
|
2649
|
+
calendarHeaderComponent: [{ type: i0.Input }],
|
|
2650
|
+
startAt: [{ type: i0.Input }],
|
|
2651
|
+
startView: [{ type: i0.Input }],
|
|
2652
|
+
color: [{ type: i0.Input }],
|
|
2653
|
+
touchUi: [{ type: i0.Input }],
|
|
2654
|
+
disabled: [{ type: i0.Input }],
|
|
2655
|
+
xPosition: [{ type: i0.Input }],
|
|
2656
|
+
yPosition: [{ type: i0.Input }],
|
|
2657
|
+
yearSelected: [{ type: i0.Output }],
|
|
2658
|
+
monthSelected: [{ type: i0.Output }],
|
|
2659
|
+
panelClass: [{ type: i0.Input }],
|
|
2660
|
+
dateClass: [{ type: i0.Input }],
|
|
2661
|
+
openedStream: [{ type: i0.Output, args: ['opened',] }],
|
|
2662
|
+
closedStream: [{ type: i0.Output, args: ['closed',] }],
|
|
2663
|
+
opened: [{ type: i0.Input }]
|
|
2664
|
+
};
|
|
2605
2665
|
|
|
2606
|
-
/**
|
|
2607
|
-
* @license
|
|
2608
|
-
* Copyright Google LLC All Rights Reserved.
|
|
2609
|
-
*
|
|
2610
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
2611
|
-
* found in the LICENSE file at https://angular.io/license
|
|
2612
|
-
*/
|
|
2613
2666
|
// TODO(mmalerba): We use a component instead of a directive here so the user can use implicit
|
|
2614
2667
|
// template reference variables (e.g. #d vs #d="matDatepicker"). We can change this to a directive
|
|
2615
2668
|
// if angular adds support for `exportAs: '$implicit'` on directives.
|
|
@@ -2619,18 +2672,18 @@
|
|
|
2619
2672
|
function MatDatepicker() {
|
|
2620
2673
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
2621
2674
|
}
|
|
2622
|
-
MatDatepicker.decorators = [
|
|
2623
|
-
{ type: i0.Component, args: [{
|
|
2624
|
-
selector: 'mat-datepicker',
|
|
2625
|
-
template: '',
|
|
2626
|
-
exportAs: 'matDatepicker',
|
|
2627
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2628
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
2629
|
-
providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER]
|
|
2630
|
-
},] }
|
|
2631
|
-
];
|
|
2632
2675
|
return MatDatepicker;
|
|
2633
2676
|
}(MatDatepickerBase));
|
|
2677
|
+
MatDatepicker.decorators = [
|
|
2678
|
+
{ type: i0.Component, args: [{
|
|
2679
|
+
selector: 'mat-datepicker',
|
|
2680
|
+
template: '',
|
|
2681
|
+
exportAs: 'matDatepicker',
|
|
2682
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
2683
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
2684
|
+
providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER]
|
|
2685
|
+
},] }
|
|
2686
|
+
];
|
|
2634
2687
|
|
|
2635
2688
|
/**
|
|
2636
2689
|
* @license
|
|
@@ -2683,14 +2736,14 @@
|
|
|
2683
2736
|
};
|
|
2684
2737
|
/** The form control validator for the date filter. */
|
|
2685
2738
|
this._filterValidator = function (control) {
|
|
2686
|
-
var controlValue = _this.
|
|
2739
|
+
var controlValue = _this._dateAdapter.getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
|
|
2687
2740
|
var dateFilter = _this._getDateFilter();
|
|
2688
2741
|
return !dateFilter || !controlValue || dateFilter(controlValue) ?
|
|
2689
2742
|
null : { 'matDatepickerFilter': true };
|
|
2690
2743
|
};
|
|
2691
2744
|
/** The form control validator for the min date. */
|
|
2692
2745
|
this._minValidator = function (control) {
|
|
2693
|
-
var controlValue = _this.
|
|
2746
|
+
var controlValue = _this._dateAdapter.getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
|
|
2694
2747
|
var min = _this._getMinDate();
|
|
2695
2748
|
return (!min || !controlValue ||
|
|
2696
2749
|
_this._dateAdapter.compareDate(min, controlValue) <= 0) ?
|
|
@@ -2698,7 +2751,7 @@
|
|
|
2698
2751
|
};
|
|
2699
2752
|
/** The form control validator for the max date. */
|
|
2700
2753
|
this._maxValidator = function (control) {
|
|
2701
|
-
var controlValue = _this.
|
|
2754
|
+
var controlValue = _this._dateAdapter.getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
|
|
2702
2755
|
var max = _this._getMaxDate();
|
|
2703
2756
|
return (!max || !controlValue ||
|
|
2704
2757
|
_this._dateAdapter.compareDate(max, controlValue) >= 0) ?
|
|
@@ -2706,11 +2759,13 @@
|
|
|
2706
2759
|
};
|
|
2707
2760
|
/** Whether the last value set on the input was valid. */
|
|
2708
2761
|
this._lastValueValid = false;
|
|
2709
|
-
if (
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2762
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
2763
|
+
if (!this._dateAdapter) {
|
|
2764
|
+
throw createMissingDateImplError('DateAdapter');
|
|
2765
|
+
}
|
|
2766
|
+
if (!this._dateFormats) {
|
|
2767
|
+
throw createMissingDateImplError('MAT_DATE_FORMATS');
|
|
2768
|
+
}
|
|
2714
2769
|
}
|
|
2715
2770
|
// Update the displayed date when the locale changes.
|
|
2716
2771
|
this._localeSubscription = _dateAdapter.localeChanges.subscribe(function () {
|
|
@@ -2725,7 +2780,7 @@
|
|
|
2725
2780
|
set: function (value) {
|
|
2726
2781
|
value = this._dateAdapter.deserialize(value);
|
|
2727
2782
|
this._lastValueValid = this._isValidValue(value);
|
|
2728
|
-
value = this.
|
|
2783
|
+
value = this._dateAdapter.getValidDateOrNull(value);
|
|
2729
2784
|
var oldDate = this.value;
|
|
2730
2785
|
this._assignValue(value);
|
|
2731
2786
|
this._formatValue(value);
|
|
@@ -2839,7 +2894,7 @@
|
|
|
2839
2894
|
var lastValueWasValid = this._lastValueValid;
|
|
2840
2895
|
var date = this._dateAdapter.parse(value, this._dateFormats.parse.dateInput);
|
|
2841
2896
|
this._lastValueValid = this._isValidValue(date);
|
|
2842
|
-
date = this.
|
|
2897
|
+
date = this._dateAdapter.getValidDateOrNull(date);
|
|
2843
2898
|
if (!this._dateAdapter.sameDate(date, this.value)) {
|
|
2844
2899
|
this._assignValue(date);
|
|
2845
2900
|
this._cvaOnChange(date);
|
|
@@ -2873,13 +2928,6 @@
|
|
|
2873
2928
|
this._elementRef.nativeElement.value =
|
|
2874
2929
|
value ? this._dateAdapter.format(value, this._dateFormats.display.dateInput) : '';
|
|
2875
2930
|
};
|
|
2876
|
-
/**
|
|
2877
|
-
* @param obj The object to check.
|
|
2878
|
-
* @returns The given object if it is both a date instance and valid, otherwise null.
|
|
2879
|
-
*/
|
|
2880
|
-
MatDatepickerInputBase.prototype._getValidDateOrNull = function (obj) {
|
|
2881
|
-
return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
|
|
2882
|
-
};
|
|
2883
2931
|
/** Assigns a value to the model. */
|
|
2884
2932
|
MatDatepickerInputBase.prototype._assignValue = function (value) {
|
|
2885
2933
|
// We may get some incoming values before the model was
|
|
@@ -2903,30 +2951,23 @@
|
|
|
2903
2951
|
MatDatepickerInputBase.prototype._parentDisabled = function () {
|
|
2904
2952
|
return false;
|
|
2905
2953
|
};
|
|
2906
|
-
MatDatepickerInputBase.decorators = [
|
|
2907
|
-
{ type: i0.Directive }
|
|
2908
|
-
];
|
|
2909
|
-
MatDatepickerInputBase.ctorParameters = function () { return [
|
|
2910
|
-
{ type: i0.ElementRef },
|
|
2911
|
-
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
2912
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] }
|
|
2913
|
-
]; };
|
|
2914
|
-
MatDatepickerInputBase.propDecorators = {
|
|
2915
|
-
value: [{ type: i0.Input }],
|
|
2916
|
-
disabled: [{ type: i0.Input }],
|
|
2917
|
-
dateChange: [{ type: i0.Output }],
|
|
2918
|
-
dateInput: [{ type: i0.Output }]
|
|
2919
|
-
};
|
|
2920
2954
|
return MatDatepickerInputBase;
|
|
2921
2955
|
}());
|
|
2956
|
+
MatDatepickerInputBase.decorators = [
|
|
2957
|
+
{ type: i0.Directive }
|
|
2958
|
+
];
|
|
2959
|
+
MatDatepickerInputBase.ctorParameters = function () { return [
|
|
2960
|
+
{ type: i0.ElementRef },
|
|
2961
|
+
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
2962
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] }
|
|
2963
|
+
]; };
|
|
2964
|
+
MatDatepickerInputBase.propDecorators = {
|
|
2965
|
+
value: [{ type: i0.Input }],
|
|
2966
|
+
disabled: [{ type: i0.Input }],
|
|
2967
|
+
dateChange: [{ type: i0.Output }],
|
|
2968
|
+
dateInput: [{ type: i0.Output }]
|
|
2969
|
+
};
|
|
2922
2970
|
|
|
2923
|
-
/**
|
|
2924
|
-
* @license
|
|
2925
|
-
* Copyright Google LLC All Rights Reserved.
|
|
2926
|
-
*
|
|
2927
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
2928
|
-
* found in the LICENSE file at https://angular.io/license
|
|
2929
|
-
*/
|
|
2930
2971
|
/** @docs-private */
|
|
2931
2972
|
var MAT_DATEPICKER_VALUE_ACCESSOR = {
|
|
2932
2973
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
@@ -2963,7 +3004,7 @@
|
|
|
2963
3004
|
/** The minimum valid date. */
|
|
2964
3005
|
get: function () { return this._min; },
|
|
2965
3006
|
set: function (value) {
|
|
2966
|
-
this._min = this.
|
|
3007
|
+
this._min = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
2967
3008
|
this._validatorOnChange();
|
|
2968
3009
|
},
|
|
2969
3010
|
enumerable: false,
|
|
@@ -2973,7 +3014,7 @@
|
|
|
2973
3014
|
/** The maximum valid date. */
|
|
2974
3015
|
get: function () { return this._max; },
|
|
2975
3016
|
set: function (value) {
|
|
2976
|
-
this._max = this.
|
|
3017
|
+
this._max = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
2977
3018
|
this._validatorOnChange();
|
|
2978
3019
|
},
|
|
2979
3020
|
enumerable: false,
|
|
@@ -3040,42 +3081,46 @@
|
|
|
3040
3081
|
MatDatepickerInput.prototype._canEmitChangeEvent = function () {
|
|
3041
3082
|
return true;
|
|
3042
3083
|
};
|
|
3043
|
-
MatDatepickerInput.decorators = [
|
|
3044
|
-
{ type: i0.Directive, args: [{
|
|
3045
|
-
selector: 'input[matDatepicker]',
|
|
3046
|
-
providers: [
|
|
3047
|
-
MAT_DATEPICKER_VALUE_ACCESSOR,
|
|
3048
|
-
MAT_DATEPICKER_VALIDATORS,
|
|
3049
|
-
{ provide: input.MAT_INPUT_VALUE_ACCESSOR, useExisting: MatDatepickerInput },
|
|
3050
|
-
],
|
|
3051
|
-
host: {
|
|
3052
|
-
'[attr.aria-haspopup]': '_datepicker ? "dialog" : null',
|
|
3053
|
-
'[attr.aria-owns]': '(_datepicker?.opened && _datepicker.id) || null',
|
|
3054
|
-
'[attr.min]': 'min ? _dateAdapter.toIso8601(min) : null',
|
|
3055
|
-
'[attr.max]': 'max ? _dateAdapter.toIso8601(max) : null',
|
|
3056
|
-
'[disabled]': 'disabled',
|
|
3057
|
-
'(input)': '_onInput($event.target.value)',
|
|
3058
|
-
'(change)': '_onChange()',
|
|
3059
|
-
'(blur)': '_onBlur()',
|
|
3060
|
-
'(keydown)': '_onKeydown($event)',
|
|
3061
|
-
},
|
|
3062
|
-
exportAs: 'matDatepickerInput',
|
|
3063
|
-
},] }
|
|
3064
|
-
];
|
|
3065
|
-
MatDatepickerInput.ctorParameters = function () { return [
|
|
3066
|
-
{ type: i0.ElementRef },
|
|
3067
|
-
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
3068
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
|
|
3069
|
-
{ type: formField.MatFormField, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [formField.MAT_FORM_FIELD,] }] }
|
|
3070
|
-
]; };
|
|
3071
|
-
MatDatepickerInput.propDecorators = {
|
|
3072
|
-
matDatepicker: [{ type: i0.Input }],
|
|
3073
|
-
min: [{ type: i0.Input }],
|
|
3074
|
-
max: [{ type: i0.Input }],
|
|
3075
|
-
dateFilter: [{ type: i0.Input, args: ['matDatepickerFilter',] }]
|
|
3076
|
-
};
|
|
3077
3084
|
return MatDatepickerInput;
|
|
3078
3085
|
}(MatDatepickerInputBase));
|
|
3086
|
+
MatDatepickerInput.decorators = [
|
|
3087
|
+
{ type: i0.Directive, args: [{
|
|
3088
|
+
selector: 'input[matDatepicker]',
|
|
3089
|
+
providers: [
|
|
3090
|
+
MAT_DATEPICKER_VALUE_ACCESSOR,
|
|
3091
|
+
MAT_DATEPICKER_VALIDATORS,
|
|
3092
|
+
{ provide: input.MAT_INPUT_VALUE_ACCESSOR, useExisting: MatDatepickerInput },
|
|
3093
|
+
],
|
|
3094
|
+
host: {
|
|
3095
|
+
'class': 'mat-datepicker-input',
|
|
3096
|
+
'[attr.aria-haspopup]': '_datepicker ? "dialog" : null',
|
|
3097
|
+
'[attr.aria-owns]': '(_datepicker?.opened && _datepicker.id) || null',
|
|
3098
|
+
'[attr.min]': 'min ? _dateAdapter.toIso8601(min) : null',
|
|
3099
|
+
'[attr.max]': 'max ? _dateAdapter.toIso8601(max) : null',
|
|
3100
|
+
// Used by the test harness to tie this input to its calendar. We can't depend on
|
|
3101
|
+
// `aria-owns` for this, because it's only defined while the calendar is open.
|
|
3102
|
+
'[attr.data-mat-calendar]': '_datepicker ? _datepicker.id : null',
|
|
3103
|
+
'[disabled]': 'disabled',
|
|
3104
|
+
'(input)': '_onInput($event.target.value)',
|
|
3105
|
+
'(change)': '_onChange()',
|
|
3106
|
+
'(blur)': '_onBlur()',
|
|
3107
|
+
'(keydown)': '_onKeydown($event)',
|
|
3108
|
+
},
|
|
3109
|
+
exportAs: 'matDatepickerInput',
|
|
3110
|
+
},] }
|
|
3111
|
+
];
|
|
3112
|
+
MatDatepickerInput.ctorParameters = function () { return [
|
|
3113
|
+
{ type: i0.ElementRef },
|
|
3114
|
+
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
3115
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
|
|
3116
|
+
{ type: formField.MatFormField, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [formField.MAT_FORM_FIELD,] }] }
|
|
3117
|
+
]; };
|
|
3118
|
+
MatDatepickerInput.propDecorators = {
|
|
3119
|
+
matDatepicker: [{ type: i0.Input }],
|
|
3120
|
+
min: [{ type: i0.Input }],
|
|
3121
|
+
max: [{ type: i0.Input }],
|
|
3122
|
+
dateFilter: [{ type: i0.Input, args: ['matDatepickerFilter',] }]
|
|
3123
|
+
};
|
|
3079
3124
|
|
|
3080
3125
|
/**
|
|
3081
3126
|
* @license
|
|
@@ -3088,13 +3133,13 @@
|
|
|
3088
3133
|
var MatDatepickerToggleIcon = /** @class */ (function () {
|
|
3089
3134
|
function MatDatepickerToggleIcon() {
|
|
3090
3135
|
}
|
|
3091
|
-
MatDatepickerToggleIcon.decorators = [
|
|
3092
|
-
{ type: i0.Directive, args: [{
|
|
3093
|
-
selector: '[matDatepickerToggleIcon]'
|
|
3094
|
-
},] }
|
|
3095
|
-
];
|
|
3096
3136
|
return MatDatepickerToggleIcon;
|
|
3097
3137
|
}());
|
|
3138
|
+
MatDatepickerToggleIcon.decorators = [
|
|
3139
|
+
{ type: i0.Directive, args: [{
|
|
3140
|
+
selector: '[matDatepickerToggleIcon]'
|
|
3141
|
+
},] }
|
|
3142
|
+
];
|
|
3098
3143
|
var MatDatepickerToggle = /** @class */ (function () {
|
|
3099
3144
|
function MatDatepickerToggle(_intl, _changeDetectorRef, defaultTabIndex) {
|
|
3100
3145
|
this._intl = _intl;
|
|
@@ -3145,49 +3190,44 @@
|
|
|
3145
3190
|
this._stateChanges.unsubscribe();
|
|
3146
3191
|
this._stateChanges = rxjs.merge(this._intl.changes, datepickerStateChanged, inputStateChanged, datepickerToggled).subscribe(function () { return _this._changeDetectorRef.markForCheck(); });
|
|
3147
3192
|
};
|
|
3148
|
-
MatDatepickerToggle.decorators = [
|
|
3149
|
-
{ type: i0.Component, args: [{
|
|
3150
|
-
selector: 'mat-datepicker-toggle',
|
|
3151
|
-
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",
|
|
3152
|
-
host: {
|
|
3153
|
-
'class': 'mat-datepicker-toggle',
|
|
3154
|
-
// Always set the tabindex to -1 so that it doesn't overlap with any custom tabindex the
|
|
3155
|
-
// consumer may have provided, while still being able to receive focus.
|
|
3156
|
-
'[attr.tabindex]': 'disabled ? null : -1',
|
|
3157
|
-
'[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',
|
|
3158
|
-
'[class.mat-accent]': 'datepicker && datepicker.color === "accent"',
|
|
3159
|
-
'[class.mat-warn]': 'datepicker && datepicker.color === "warn"',
|
|
3160
|
-
'(focus)': '_button.focus()',
|
|
3161
|
-
},
|
|
3162
|
-
exportAs: 'matDatepickerToggle',
|
|
3163
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
3164
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3165
|
-
styles: [".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}\n"]
|
|
3166
|
-
},] }
|
|
3167
|
-
];
|
|
3168
|
-
MatDatepickerToggle.ctorParameters = function () { return [
|
|
3169
|
-
{ type: MatDatepickerIntl },
|
|
3170
|
-
{ type: i0.ChangeDetectorRef },
|
|
3171
|
-
{ type: String, decorators: [{ type: i0.Attribute, args: ['tabindex',] }] }
|
|
3172
|
-
]; };
|
|
3173
|
-
MatDatepickerToggle.propDecorators = {
|
|
3174
|
-
datepicker: [{ type: i0.Input, args: ['for',] }],
|
|
3175
|
-
tabIndex: [{ type: i0.Input }],
|
|
3176
|
-
disabled: [{ type: i0.Input }],
|
|
3177
|
-
disableRipple: [{ type: i0.Input }],
|
|
3178
|
-
_customIcon: [{ type: i0.ContentChild, args: [MatDatepickerToggleIcon,] }],
|
|
3179
|
-
_button: [{ type: i0.ViewChild, args: ['button',] }]
|
|
3180
|
-
};
|
|
3181
3193
|
return MatDatepickerToggle;
|
|
3182
3194
|
}());
|
|
3195
|
+
MatDatepickerToggle.decorators = [
|
|
3196
|
+
{ type: i0.Component, args: [{
|
|
3197
|
+
selector: 'mat-datepicker-toggle',
|
|
3198
|
+
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",
|
|
3199
|
+
host: {
|
|
3200
|
+
'class': 'mat-datepicker-toggle',
|
|
3201
|
+
// Always set the tabindex to -1 so that it doesn't overlap with any custom tabindex the
|
|
3202
|
+
// consumer may have provided, while still being able to receive focus.
|
|
3203
|
+
'[attr.tabindex]': 'disabled ? null : -1',
|
|
3204
|
+
'[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',
|
|
3205
|
+
'[class.mat-accent]': 'datepicker && datepicker.color === "accent"',
|
|
3206
|
+
'[class.mat-warn]': 'datepicker && datepicker.color === "warn"',
|
|
3207
|
+
// Used by the test harness to tie this toggle to its datepicker.
|
|
3208
|
+
'[attr.data-mat-calendar]': 'datepicker ? datepicker.id : null',
|
|
3209
|
+
'(focus)': '_button.focus()',
|
|
3210
|
+
},
|
|
3211
|
+
exportAs: 'matDatepickerToggle',
|
|
3212
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
3213
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3214
|
+
styles: [".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}\n"]
|
|
3215
|
+
},] }
|
|
3216
|
+
];
|
|
3217
|
+
MatDatepickerToggle.ctorParameters = function () { return [
|
|
3218
|
+
{ type: MatDatepickerIntl },
|
|
3219
|
+
{ type: i0.ChangeDetectorRef },
|
|
3220
|
+
{ type: String, decorators: [{ type: i0.Attribute, args: ['tabindex',] }] }
|
|
3221
|
+
]; };
|
|
3222
|
+
MatDatepickerToggle.propDecorators = {
|
|
3223
|
+
datepicker: [{ type: i0.Input, args: ['for',] }],
|
|
3224
|
+
tabIndex: [{ type: i0.Input }],
|
|
3225
|
+
disabled: [{ type: i0.Input }],
|
|
3226
|
+
disableRipple: [{ type: i0.Input }],
|
|
3227
|
+
_customIcon: [{ type: i0.ContentChild, args: [MatDatepickerToggleIcon,] }],
|
|
3228
|
+
_button: [{ type: i0.ViewChild, args: ['button',] }]
|
|
3229
|
+
};
|
|
3183
3230
|
|
|
3184
|
-
/**
|
|
3185
|
-
* @license
|
|
3186
|
-
* Copyright Google LLC All Rights Reserved.
|
|
3187
|
-
*
|
|
3188
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
3189
|
-
* found in the LICENSE file at https://angular.io/license
|
|
3190
|
-
*/
|
|
3191
3231
|
/**
|
|
3192
3232
|
* Used to provide the date range input wrapper component
|
|
3193
3233
|
* to the parts without circular dependencies.
|
|
@@ -3268,21 +3308,21 @@
|
|
|
3268
3308
|
MatDateRangeInputPartBase.prototype._parentDisabled = function () {
|
|
3269
3309
|
return this._rangeInput._groupDisabled;
|
|
3270
3310
|
};
|
|
3271
|
-
MatDateRangeInputPartBase.decorators = [
|
|
3272
|
-
{ type: i0.Directive }
|
|
3273
|
-
];
|
|
3274
|
-
MatDateRangeInputPartBase.ctorParameters = function () { return [
|
|
3275
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATE_RANGE_INPUT_PARENT,] }] },
|
|
3276
|
-
{ type: i0.ElementRef },
|
|
3277
|
-
{ type: core.ErrorStateMatcher },
|
|
3278
|
-
{ type: i0.Injector },
|
|
3279
|
-
{ type: forms.NgForm, decorators: [{ type: i0.Optional }] },
|
|
3280
|
-
{ type: forms.FormGroupDirective, decorators: [{ type: i0.Optional }] },
|
|
3281
|
-
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
3282
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] }
|
|
3283
|
-
]; };
|
|
3284
3311
|
return MatDateRangeInputPartBase;
|
|
3285
3312
|
}(MatDatepickerInputBase));
|
|
3313
|
+
MatDateRangeInputPartBase.decorators = [
|
|
3314
|
+
{ type: i0.Directive }
|
|
3315
|
+
];
|
|
3316
|
+
MatDateRangeInputPartBase.ctorParameters = function () { return [
|
|
3317
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATE_RANGE_INPUT_PARENT,] }] },
|
|
3318
|
+
{ type: i0.ElementRef },
|
|
3319
|
+
{ type: core.ErrorStateMatcher },
|
|
3320
|
+
{ type: i0.Injector },
|
|
3321
|
+
{ type: forms.NgForm, decorators: [{ type: i0.Optional }] },
|
|
3322
|
+
{ type: forms.FormGroupDirective, decorators: [{ type: i0.Optional }] },
|
|
3323
|
+
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
3324
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] }
|
|
3325
|
+
]; };
|
|
3286
3326
|
var _MatDateRangeInputBase =
|
|
3287
3327
|
// Needs to be `as any`, because the base class is abstract.
|
|
3288
3328
|
core.mixinErrorState(MatDateRangeInputPartBase);
|
|
@@ -3297,7 +3337,7 @@
|
|
|
3297
3337
|
_super.call(this, rangeInput, elementRef, defaultErrorStateMatcher, injector, parentForm, parentFormGroup, dateAdapter, dateFormats) || this;
|
|
3298
3338
|
/** Validator that checks that the start date isn't after the end date. */
|
|
3299
3339
|
_this._startValidator = function (control) {
|
|
3300
|
-
var start = _this.
|
|
3340
|
+
var start = _this._dateAdapter.getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
|
|
3301
3341
|
var end = _this._model ? _this._model.selection.end : null;
|
|
3302
3342
|
return (!start || !end ||
|
|
3303
3343
|
_this._dateAdapter.compareDate(start, end) <= 0) ?
|
|
@@ -3330,41 +3370,41 @@
|
|
|
3330
3370
|
var value = element.value;
|
|
3331
3371
|
return value.length > 0 ? value : element.placeholder;
|
|
3332
3372
|
};
|
|
3333
|
-
MatStartDate.decorators = [
|
|
3334
|
-
{ type: i0.Directive, args: [{
|
|
3335
|
-
selector: 'input[matStartDate]',
|
|
3336
|
-
host: {
|
|
3337
|
-
'class': 'mat-date-range-input-inner',
|
|
3338
|
-
'[disabled]': 'disabled',
|
|
3339
|
-
'(input)': '_onInput($event.target.value)',
|
|
3340
|
-
'(change)': '_onChange()',
|
|
3341
|
-
'(keydown)': '_onKeydown($event)',
|
|
3342
|
-
'[attr.id]': '_rangeInput.id',
|
|
3343
|
-
'[attr.aria-haspopup]': '_rangeInput.rangePicker ? "dialog" : null',
|
|
3344
|
-
'[attr.aria-owns]': '(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null',
|
|
3345
|
-
'[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',
|
|
3346
|
-
'[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',
|
|
3347
|
-
'(blur)': '_onBlur()',
|
|
3348
|
-
'type': 'text',
|
|
3349
|
-
},
|
|
3350
|
-
providers: [
|
|
3351
|
-
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: MatStartDate, multi: true },
|
|
3352
|
-
{ provide: forms.NG_VALIDATORS, useExisting: MatStartDate, multi: true }
|
|
3353
|
-
]
|
|
3354
|
-
},] }
|
|
3355
|
-
];
|
|
3356
|
-
MatStartDate.ctorParameters = function () { return [
|
|
3357
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATE_RANGE_INPUT_PARENT,] }] },
|
|
3358
|
-
{ type: i0.ElementRef },
|
|
3359
|
-
{ type: core.ErrorStateMatcher },
|
|
3360
|
-
{ type: i0.Injector },
|
|
3361
|
-
{ type: forms.NgForm, decorators: [{ type: i0.Optional }] },
|
|
3362
|
-
{ type: forms.FormGroupDirective, decorators: [{ type: i0.Optional }] },
|
|
3363
|
-
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
3364
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] }
|
|
3365
|
-
]; };
|
|
3366
3373
|
return MatStartDate;
|
|
3367
3374
|
}(_MatDateRangeInputBase));
|
|
3375
|
+
MatStartDate.decorators = [
|
|
3376
|
+
{ type: i0.Directive, args: [{
|
|
3377
|
+
selector: 'input[matStartDate]',
|
|
3378
|
+
host: {
|
|
3379
|
+
'class': 'mat-start-date mat-date-range-input-inner',
|
|
3380
|
+
'[disabled]': 'disabled',
|
|
3381
|
+
'(input)': '_onInput($event.target.value)',
|
|
3382
|
+
'(change)': '_onChange()',
|
|
3383
|
+
'(keydown)': '_onKeydown($event)',
|
|
3384
|
+
'[attr.id]': '_rangeInput.id',
|
|
3385
|
+
'[attr.aria-haspopup]': '_rangeInput.rangePicker ? "dialog" : null',
|
|
3386
|
+
'[attr.aria-owns]': '(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null',
|
|
3387
|
+
'[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',
|
|
3388
|
+
'[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',
|
|
3389
|
+
'(blur)': '_onBlur()',
|
|
3390
|
+
'type': 'text',
|
|
3391
|
+
},
|
|
3392
|
+
providers: [
|
|
3393
|
+
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: MatStartDate, multi: true },
|
|
3394
|
+
{ provide: forms.NG_VALIDATORS, useExisting: MatStartDate, multi: true }
|
|
3395
|
+
]
|
|
3396
|
+
},] }
|
|
3397
|
+
];
|
|
3398
|
+
MatStartDate.ctorParameters = function () { return [
|
|
3399
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATE_RANGE_INPUT_PARENT,] }] },
|
|
3400
|
+
{ type: i0.ElementRef },
|
|
3401
|
+
{ type: core.ErrorStateMatcher },
|
|
3402
|
+
{ type: i0.Injector },
|
|
3403
|
+
{ type: forms.NgForm, decorators: [{ type: i0.Optional }] },
|
|
3404
|
+
{ type: forms.FormGroupDirective, decorators: [{ type: i0.Optional }] },
|
|
3405
|
+
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
3406
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] }
|
|
3407
|
+
]; };
|
|
3368
3408
|
/** Input for entering the end date in a `mat-date-range-input`. */
|
|
3369
3409
|
var MatEndDate = /** @class */ (function (_super) {
|
|
3370
3410
|
__extends(MatEndDate, _super);
|
|
@@ -3376,7 +3416,7 @@
|
|
|
3376
3416
|
_super.call(this, rangeInput, elementRef, defaultErrorStateMatcher, injector, parentForm, parentFormGroup, dateAdapter, dateFormats) || this;
|
|
3377
3417
|
/** Validator that checks that the end date isn't before the start date. */
|
|
3378
3418
|
_this._endValidator = function (control) {
|
|
3379
|
-
var end = _this.
|
|
3419
|
+
var end = _this._dateAdapter.getValidDateOrNull(_this._dateAdapter.deserialize(control.value));
|
|
3380
3420
|
var start = _this._model ? _this._model.selection.start : null;
|
|
3381
3421
|
return (!end || !start ||
|
|
3382
3422
|
_this._dateAdapter.compareDate(end, start) >= 0) ?
|
|
@@ -3405,77 +3445,40 @@
|
|
|
3405
3445
|
}
|
|
3406
3446
|
_super.prototype._onKeydown.call(this, event);
|
|
3407
3447
|
};
|
|
3408
|
-
MatEndDate.decorators = [
|
|
3409
|
-
{ type: i0.Directive, args: [{
|
|
3410
|
-
selector: 'input[matEndDate]',
|
|
3411
|
-
host: {
|
|
3412
|
-
'class': 'mat-date-range-input-inner',
|
|
3413
|
-
'[disabled]': 'disabled',
|
|
3414
|
-
'(input)': '_onInput($event.target.value)',
|
|
3415
|
-
'(change)': '_onChange()',
|
|
3416
|
-
'(keydown)': '_onKeydown($event)',
|
|
3417
|
-
'[attr.aria-haspopup]': '_rangeInput.rangePicker ? "dialog" : null',
|
|
3418
|
-
'[attr.aria-owns]': '(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null',
|
|
3419
|
-
'[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',
|
|
3420
|
-
'[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',
|
|
3421
|
-
'(blur)': '_onBlur()',
|
|
3422
|
-
'type': 'text',
|
|
3423
|
-
},
|
|
3424
|
-
providers: [
|
|
3425
|
-
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: MatEndDate, multi: true },
|
|
3426
|
-
{ provide: forms.NG_VALIDATORS, useExisting: MatEndDate, multi: true }
|
|
3427
|
-
]
|
|
3428
|
-
},] }
|
|
3429
|
-
];
|
|
3430
|
-
MatEndDate.ctorParameters = function () { return [
|
|
3431
|
-
{ type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATE_RANGE_INPUT_PARENT,] }] },
|
|
3432
|
-
{ type: i0.ElementRef },
|
|
3433
|
-
{ type: core.ErrorStateMatcher },
|
|
3434
|
-
{ type: i0.Injector },
|
|
3435
|
-
{ type: forms.NgForm, decorators: [{ type: i0.Optional }] },
|
|
3436
|
-
{ type: forms.FormGroupDirective, decorators: [{ type: i0.Optional }] },
|
|
3437
|
-
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
3438
|
-
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] }
|
|
3439
|
-
]; };
|
|
3440
3448
|
return MatEndDate;
|
|
3441
3449
|
}(_MatDateRangeInputBase));
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
}
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
providers: [MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER]
|
|
3475
|
-
},] }
|
|
3476
|
-
];
|
|
3477
|
-
return MatDateRangePicker;
|
|
3478
|
-
}(MatDatepickerBase));
|
|
3450
|
+
MatEndDate.decorators = [
|
|
3451
|
+
{ type: i0.Directive, args: [{
|
|
3452
|
+
selector: 'input[matEndDate]',
|
|
3453
|
+
host: {
|
|
3454
|
+
'class': 'mat-end-date mat-date-range-input-inner',
|
|
3455
|
+
'[disabled]': 'disabled',
|
|
3456
|
+
'(input)': '_onInput($event.target.value)',
|
|
3457
|
+
'(change)': '_onChange()',
|
|
3458
|
+
'(keydown)': '_onKeydown($event)',
|
|
3459
|
+
'[attr.aria-haspopup]': '_rangeInput.rangePicker ? "dialog" : null',
|
|
3460
|
+
'[attr.aria-owns]': '(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null',
|
|
3461
|
+
'[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',
|
|
3462
|
+
'[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',
|
|
3463
|
+
'(blur)': '_onBlur()',
|
|
3464
|
+
'type': 'text',
|
|
3465
|
+
},
|
|
3466
|
+
providers: [
|
|
3467
|
+
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: MatEndDate, multi: true },
|
|
3468
|
+
{ provide: forms.NG_VALIDATORS, useExisting: MatEndDate, multi: true }
|
|
3469
|
+
]
|
|
3470
|
+
},] }
|
|
3471
|
+
];
|
|
3472
|
+
MatEndDate.ctorParameters = function () { return [
|
|
3473
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [MAT_DATE_RANGE_INPUT_PARENT,] }] },
|
|
3474
|
+
{ type: i0.ElementRef },
|
|
3475
|
+
{ type: core.ErrorStateMatcher },
|
|
3476
|
+
{ type: i0.Injector },
|
|
3477
|
+
{ type: forms.NgForm, decorators: [{ type: i0.Optional }] },
|
|
3478
|
+
{ type: forms.FormGroupDirective, decorators: [{ type: i0.Optional }] },
|
|
3479
|
+
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
3480
|
+
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] }
|
|
3481
|
+
]; };
|
|
3479
3482
|
|
|
3480
3483
|
/**
|
|
3481
3484
|
* @license
|
|
@@ -3510,7 +3513,7 @@
|
|
|
3510
3513
|
this.comparisonEnd = null;
|
|
3511
3514
|
/** Emits when the input's state changes. */
|
|
3512
3515
|
this._stateChanges = new rxjs.Subject();
|
|
3513
|
-
if (!_dateAdapter) {
|
|
3516
|
+
if (!_dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
3514
3517
|
throw createMissingDateImplError('DateAdapter');
|
|
3515
3518
|
}
|
|
3516
3519
|
// TODO(crisbeto): remove `as any` after #18206 lands.
|
|
@@ -3583,7 +3586,7 @@
|
|
|
3583
3586
|
/** The minimum valid date. */
|
|
3584
3587
|
get: function () { return this._min; },
|
|
3585
3588
|
set: function (value) {
|
|
3586
|
-
this._min = this.
|
|
3589
|
+
this._min = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
3587
3590
|
this._revalidate();
|
|
3588
3591
|
},
|
|
3589
3592
|
enumerable: false,
|
|
@@ -3593,7 +3596,7 @@
|
|
|
3593
3596
|
/** The maximum valid date. */
|
|
3594
3597
|
get: function () { return this._max; },
|
|
3595
3598
|
set: function (value) {
|
|
3596
|
-
this._max = this.
|
|
3599
|
+
this._max = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
|
3597
3600
|
this._revalidate();
|
|
3598
3601
|
},
|
|
3599
3602
|
enumerable: false,
|
|
@@ -3660,11 +3663,13 @@
|
|
|
3660
3663
|
};
|
|
3661
3664
|
MatDateRangeInput.prototype.ngAfterContentInit = function () {
|
|
3662
3665
|
var _this = this;
|
|
3663
|
-
if (
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3666
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
3667
|
+
if (!this._startInput) {
|
|
3668
|
+
throw Error('mat-date-range-input must contain a matStartDate input');
|
|
3669
|
+
}
|
|
3670
|
+
if (!this._endInput) {
|
|
3671
|
+
throw Error('mat-date-range-input must contain a matEndDate input');
|
|
3672
|
+
}
|
|
3668
3673
|
}
|
|
3669
3674
|
if (this._model) {
|
|
3670
3675
|
this._registerModel(this._model);
|
|
@@ -3722,13 +3727,6 @@
|
|
|
3722
3727
|
var formField = this._formField;
|
|
3723
3728
|
return formField && formField._hasFloatingLabel() ? formField._labelId : null;
|
|
3724
3729
|
};
|
|
3725
|
-
/**
|
|
3726
|
-
* @param obj The object to check.
|
|
3727
|
-
* @returns The given object if it is both a date instance and valid, otherwise null.
|
|
3728
|
-
*/
|
|
3729
|
-
MatDateRangeInput.prototype._getValidDateOrNull = function (obj) {
|
|
3730
|
-
return (this._dateAdapter.isDateInstance(obj) && this._dateAdapter.isValid(obj)) ? obj : null;
|
|
3731
|
-
};
|
|
3732
3730
|
/** Re-runs the validators on the start/end inputs. */
|
|
3733
3731
|
MatDateRangeInput.prototype._revalidate = function () {
|
|
3734
3732
|
if (this._startInput) {
|
|
@@ -3747,50 +3745,87 @@
|
|
|
3747
3745
|
this._endInput._registerModel(model);
|
|
3748
3746
|
}
|
|
3749
3747
|
};
|
|
3750
|
-
MatDateRangeInput.decorators = [
|
|
3751
|
-
{ type: i0.Component, args: [{
|
|
3752
|
-
selector: 'mat-date-range-input',
|
|
3753
|
-
template: "<div\n class=\"mat-date-range-input-container\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"focused = $event !== null\">\n <div class=\"mat-date-range-input-start-wrapper\">\n <ng-content select=\"input[matStartDate]\"></ng-content>\n <span\n class=\"mat-date-range-input-mirror\"\n aria-hidden=\"true\">{{_getInputMirrorValue()}}</span>\n </div>\n\n <span\n class=\"mat-date-range-input-separator\"\n [class.mat-date-range-input-separator-hidden]=\"_shouldHideSeparator()\">{{separator}}</span>\n\n <div class=\"mat-date-range-input-end-wrapper\">\n <ng-content select=\"input[matEndDate]\"></ng-content>\n </div>\n</div>\n\n",
|
|
3754
|
-
exportAs: 'matDateRangeInput',
|
|
3755
|
-
host: {
|
|
3756
|
-
'class': 'mat-date-range-input',
|
|
3757
|
-
'[class.mat-date-range-input-hide-placeholders]': '_shouldHidePlaceholders()',
|
|
3758
|
-
'[attr.id]': 'null',
|
|
3759
|
-
'role': 'group',
|
|
3760
|
-
'[attr.aria-labelledby]': '_getAriaLabelledby()',
|
|
3761
|
-
'[attr.aria-describedby]': '_ariaDescribedBy',
|
|
3762
|
-
},
|
|
3763
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3764
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
3765
|
-
providers: [
|
|
3766
|
-
{ provide: formField.MatFormFieldControl, useExisting: MatDateRangeInput },
|
|
3767
|
-
{ provide: MAT_DATE_RANGE_INPUT_PARENT, useExisting: MatDateRangeInput },
|
|
3768
|
-
],
|
|
3769
|
-
styles: [".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\n"]
|
|
3770
|
-
},] }
|
|
3771
|
-
];
|
|
3772
|
-
MatDateRangeInput.ctorParameters = function () { return [
|
|
3773
|
-
{ type: i0.ChangeDetectorRef },
|
|
3774
|
-
{ type: i0.ElementRef },
|
|
3775
|
-
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }, { type: i0.Self }] },
|
|
3776
|
-
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
3777
|
-
{ type: formField.MatFormField, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [formField.MAT_FORM_FIELD,] }] }
|
|
3778
|
-
]; };
|
|
3779
|
-
MatDateRangeInput.propDecorators = {
|
|
3780
|
-
rangePicker: [{ type: i0.Input }],
|
|
3781
|
-
required: [{ type: i0.Input }],
|
|
3782
|
-
dateFilter: [{ type: i0.Input }],
|
|
3783
|
-
min: [{ type: i0.Input }],
|
|
3784
|
-
max: [{ type: i0.Input }],
|
|
3785
|
-
disabled: [{ type: i0.Input }],
|
|
3786
|
-
separator: [{ type: i0.Input }],
|
|
3787
|
-
comparisonStart: [{ type: i0.Input }],
|
|
3788
|
-
comparisonEnd: [{ type: i0.Input }],
|
|
3789
|
-
_startInput: [{ type: i0.ContentChild, args: [MatStartDate,] }],
|
|
3790
|
-
_endInput: [{ type: i0.ContentChild, args: [MatEndDate,] }]
|
|
3791
|
-
};
|
|
3792
3748
|
return MatDateRangeInput;
|
|
3793
3749
|
}());
|
|
3750
|
+
MatDateRangeInput.decorators = [
|
|
3751
|
+
{ type: i0.Component, args: [{
|
|
3752
|
+
selector: 'mat-date-range-input',
|
|
3753
|
+
template: "<div\n class=\"mat-date-range-input-container\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"focused = $event !== null\">\n <div class=\"mat-date-range-input-start-wrapper\">\n <ng-content select=\"input[matStartDate]\"></ng-content>\n <span\n class=\"mat-date-range-input-mirror\"\n aria-hidden=\"true\">{{_getInputMirrorValue()}}</span>\n </div>\n\n <span\n class=\"mat-date-range-input-separator\"\n [class.mat-date-range-input-separator-hidden]=\"_shouldHideSeparator()\">{{separator}}</span>\n\n <div class=\"mat-date-range-input-end-wrapper\">\n <ng-content select=\"input[matEndDate]\"></ng-content>\n </div>\n</div>\n\n",
|
|
3754
|
+
exportAs: 'matDateRangeInput',
|
|
3755
|
+
host: {
|
|
3756
|
+
'class': 'mat-date-range-input',
|
|
3757
|
+
'[class.mat-date-range-input-hide-placeholders]': '_shouldHidePlaceholders()',
|
|
3758
|
+
'[class.mat-date-range-input-required]': 'required',
|
|
3759
|
+
'[attr.id]': 'null',
|
|
3760
|
+
'role': 'group',
|
|
3761
|
+
'[attr.aria-labelledby]': '_getAriaLabelledby()',
|
|
3762
|
+
'[attr.aria-describedby]': '_ariaDescribedBy',
|
|
3763
|
+
// Used by the test harness to tie this input to its calendar. We can't depend on
|
|
3764
|
+
// `aria-owns` for this, because it's only defined while the calendar is open.
|
|
3765
|
+
'[attr.data-mat-calendar]': 'rangePicker ? rangePicker.id : null',
|
|
3766
|
+
},
|
|
3767
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3768
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
3769
|
+
providers: [
|
|
3770
|
+
{ provide: formField.MatFormFieldControl, useExisting: MatDateRangeInput },
|
|
3771
|
+
{ provide: MAT_DATE_RANGE_INPUT_PARENT, useExisting: MatDateRangeInput },
|
|
3772
|
+
],
|
|
3773
|
+
styles: [".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\n"]
|
|
3774
|
+
},] }
|
|
3775
|
+
];
|
|
3776
|
+
MatDateRangeInput.ctorParameters = function () { return [
|
|
3777
|
+
{ type: i0.ChangeDetectorRef },
|
|
3778
|
+
{ type: i0.ElementRef },
|
|
3779
|
+
{ type: forms.ControlContainer, decorators: [{ type: i0.Optional }, { type: i0.Self }] },
|
|
3780
|
+
{ type: core.DateAdapter, decorators: [{ type: i0.Optional }] },
|
|
3781
|
+
{ type: formField.MatFormField, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [formField.MAT_FORM_FIELD,] }] }
|
|
3782
|
+
]; };
|
|
3783
|
+
MatDateRangeInput.propDecorators = {
|
|
3784
|
+
rangePicker: [{ type: i0.Input }],
|
|
3785
|
+
required: [{ type: i0.Input }],
|
|
3786
|
+
dateFilter: [{ type: i0.Input }],
|
|
3787
|
+
min: [{ type: i0.Input }],
|
|
3788
|
+
max: [{ type: i0.Input }],
|
|
3789
|
+
disabled: [{ type: i0.Input }],
|
|
3790
|
+
separator: [{ type: i0.Input }],
|
|
3791
|
+
comparisonStart: [{ type: i0.Input }],
|
|
3792
|
+
comparisonEnd: [{ type: i0.Input }],
|
|
3793
|
+
_startInput: [{ type: i0.ContentChild, args: [MatStartDate,] }],
|
|
3794
|
+
_endInput: [{ type: i0.ContentChild, args: [MatEndDate,] }]
|
|
3795
|
+
};
|
|
3796
|
+
|
|
3797
|
+
// TODO(mmalerba): We use a component instead of a directive here so the user can use implicit
|
|
3798
|
+
// template reference variables (e.g. #d vs #d="matDateRangePicker"). We can change this to a
|
|
3799
|
+
// directive if angular adds support for `exportAs: '$implicit'` on directives.
|
|
3800
|
+
/** Component responsible for managing the date range picker popup/dialog. */
|
|
3801
|
+
var MatDateRangePicker = /** @class */ (function (_super) {
|
|
3802
|
+
__extends(MatDateRangePicker, _super);
|
|
3803
|
+
function MatDateRangePicker() {
|
|
3804
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3805
|
+
}
|
|
3806
|
+
MatDateRangePicker.prototype._forwardContentValues = function (instance) {
|
|
3807
|
+
_super.prototype._forwardContentValues.call(this, instance);
|
|
3808
|
+
var input = this._datepickerInput;
|
|
3809
|
+
if (input) {
|
|
3810
|
+
instance.comparisonStart = input.comparisonStart;
|
|
3811
|
+
instance.comparisonEnd = input.comparisonEnd;
|
|
3812
|
+
}
|
|
3813
|
+
};
|
|
3814
|
+
return MatDateRangePicker;
|
|
3815
|
+
}(MatDatepickerBase));
|
|
3816
|
+
MatDateRangePicker.decorators = [
|
|
3817
|
+
{ type: i0.Component, args: [{
|
|
3818
|
+
selector: 'mat-date-range-picker',
|
|
3819
|
+
template: '',
|
|
3820
|
+
exportAs: 'matDateRangePicker',
|
|
3821
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3822
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
3823
|
+
providers: [
|
|
3824
|
+
MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,
|
|
3825
|
+
MAT_CALENDAR_RANGE_STRATEGY_PROVIDER,
|
|
3826
|
+
]
|
|
3827
|
+
},] }
|
|
3828
|
+
];
|
|
3794
3829
|
|
|
3795
3830
|
/**
|
|
3796
3831
|
* @license
|
|
@@ -3802,67 +3837,63 @@
|
|
|
3802
3837
|
var MatDatepickerModule = /** @class */ (function () {
|
|
3803
3838
|
function MatDatepickerModule() {
|
|
3804
3839
|
}
|
|
3805
|
-
MatDatepickerModule.decorators = [
|
|
3806
|
-
{ type: i0.NgModule, args: [{
|
|
3807
|
-
imports: [
|
|
3808
|
-
common.CommonModule,
|
|
3809
|
-
button.MatButtonModule,
|
|
3810
|
-
dialog.MatDialogModule,
|
|
3811
|
-
overlay.OverlayModule,
|
|
3812
|
-
a11y.A11yModule,
|
|
3813
|
-
portal.PortalModule,
|
|
3814
|
-
],
|
|
3815
|
-
exports: [
|
|
3816
|
-
scrolling.CdkScrollableModule,
|
|
3817
|
-
MatCalendar,
|
|
3818
|
-
MatCalendarBody,
|
|
3819
|
-
MatDatepicker,
|
|
3820
|
-
MatDatepickerContent,
|
|
3821
|
-
MatDatepickerInput,
|
|
3822
|
-
MatDatepickerToggle,
|
|
3823
|
-
MatDatepickerToggleIcon,
|
|
3824
|
-
MatMonthView,
|
|
3825
|
-
MatYearView,
|
|
3826
|
-
MatMultiYearView,
|
|
3827
|
-
MatCalendarHeader,
|
|
3828
|
-
MatDateRangeInput,
|
|
3829
|
-
MatStartDate,
|
|
3830
|
-
MatEndDate,
|
|
3831
|
-
MatDateRangePicker,
|
|
3832
|
-
],
|
|
3833
|
-
declarations: [
|
|
3834
|
-
MatCalendar,
|
|
3835
|
-
MatCalendarBody,
|
|
3836
|
-
MatDatepicker,
|
|
3837
|
-
MatDatepickerContent,
|
|
3838
|
-
MatDatepickerInput,
|
|
3839
|
-
MatDatepickerToggle,
|
|
3840
|
-
MatDatepickerToggleIcon,
|
|
3841
|
-
MatMonthView,
|
|
3842
|
-
MatYearView,
|
|
3843
|
-
MatMultiYearView,
|
|
3844
|
-
MatCalendarHeader,
|
|
3845
|
-
MatDateRangeInput,
|
|
3846
|
-
MatStartDate,
|
|
3847
|
-
MatEndDate,
|
|
3848
|
-
MatDateRangePicker,
|
|
3849
|
-
],
|
|
3850
|
-
providers: [
|
|
3851
|
-
MatDatepickerIntl,
|
|
3852
|
-
MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,
|
|
3853
|
-
{
|
|
3854
|
-
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
3855
|
-
useClass: DefaultMatCalendarRangeStrategy
|
|
3856
|
-
}
|
|
3857
|
-
],
|
|
3858
|
-
entryComponents: [
|
|
3859
|
-
MatDatepickerContent,
|
|
3860
|
-
MatCalendarHeader,
|
|
3861
|
-
]
|
|
3862
|
-
},] }
|
|
3863
|
-
];
|
|
3864
3840
|
return MatDatepickerModule;
|
|
3865
3841
|
}());
|
|
3842
|
+
MatDatepickerModule.decorators = [
|
|
3843
|
+
{ type: i0.NgModule, args: [{
|
|
3844
|
+
imports: [
|
|
3845
|
+
common.CommonModule,
|
|
3846
|
+
button.MatButtonModule,
|
|
3847
|
+
dialog.MatDialogModule,
|
|
3848
|
+
overlay.OverlayModule,
|
|
3849
|
+
a11y.A11yModule,
|
|
3850
|
+
portal.PortalModule,
|
|
3851
|
+
],
|
|
3852
|
+
exports: [
|
|
3853
|
+
scrolling.CdkScrollableModule,
|
|
3854
|
+
MatCalendar,
|
|
3855
|
+
MatCalendarBody,
|
|
3856
|
+
MatDatepicker,
|
|
3857
|
+
MatDatepickerContent,
|
|
3858
|
+
MatDatepickerInput,
|
|
3859
|
+
MatDatepickerToggle,
|
|
3860
|
+
MatDatepickerToggleIcon,
|
|
3861
|
+
MatMonthView,
|
|
3862
|
+
MatYearView,
|
|
3863
|
+
MatMultiYearView,
|
|
3864
|
+
MatCalendarHeader,
|
|
3865
|
+
MatDateRangeInput,
|
|
3866
|
+
MatStartDate,
|
|
3867
|
+
MatEndDate,
|
|
3868
|
+
MatDateRangePicker,
|
|
3869
|
+
],
|
|
3870
|
+
declarations: [
|
|
3871
|
+
MatCalendar,
|
|
3872
|
+
MatCalendarBody,
|
|
3873
|
+
MatDatepicker,
|
|
3874
|
+
MatDatepickerContent,
|
|
3875
|
+
MatDatepickerInput,
|
|
3876
|
+
MatDatepickerToggle,
|
|
3877
|
+
MatDatepickerToggleIcon,
|
|
3878
|
+
MatMonthView,
|
|
3879
|
+
MatYearView,
|
|
3880
|
+
MatMultiYearView,
|
|
3881
|
+
MatCalendarHeader,
|
|
3882
|
+
MatDateRangeInput,
|
|
3883
|
+
MatStartDate,
|
|
3884
|
+
MatEndDate,
|
|
3885
|
+
MatDateRangePicker,
|
|
3886
|
+
],
|
|
3887
|
+
providers: [
|
|
3888
|
+
MatDatepickerIntl,
|
|
3889
|
+
MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
|
|
3890
|
+
],
|
|
3891
|
+
entryComponents: [
|
|
3892
|
+
MatDatepickerContent,
|
|
3893
|
+
MatCalendarHeader,
|
|
3894
|
+
]
|
|
3895
|
+
},] }
|
|
3896
|
+
];
|
|
3866
3897
|
|
|
3867
3898
|
/**
|
|
3868
3899
|
* @license
|
|
@@ -3913,9 +3944,11 @@
|
|
|
3913
3944
|
exports.matDatepickerAnimations = matDatepickerAnimations;
|
|
3914
3945
|
exports.yearsPerPage = yearsPerPage;
|
|
3915
3946
|
exports.yearsPerRow = yearsPerRow;
|
|
3916
|
-
exports.ɵangular_material_src_material_datepicker_datepicker_a =
|
|
3917
|
-
exports.ɵangular_material_src_material_datepicker_datepicker_b =
|
|
3918
|
-
exports.ɵangular_material_src_material_datepicker_datepicker_c =
|
|
3947
|
+
exports.ɵangular_material_src_material_datepicker_datepicker_a = MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY;
|
|
3948
|
+
exports.ɵangular_material_src_material_datepicker_datepicker_b = MAT_CALENDAR_RANGE_STRATEGY_PROVIDER;
|
|
3949
|
+
exports.ɵangular_material_src_material_datepicker_datepicker_c = MatDatepickerBase;
|
|
3950
|
+
exports.ɵangular_material_src_material_datepicker_datepicker_d = MatDatepickerInputBase;
|
|
3951
|
+
exports.ɵangular_material_src_material_datepicker_datepicker_e = MAT_DATE_RANGE_INPUT_PARENT;
|
|
3919
3952
|
|
|
3920
3953
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3921
3954
|
|