@angular/material 13.3.3 → 14.0.0-next.10
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/_index.scss +20 -1
- package/autocomplete/autocomplete-trigger.d.ts +13 -3
- package/autocomplete/autocomplete.d.ts +7 -1
- package/badge/_badge-theme.scss +3 -2
- package/checkbox/testing/checkbox-harness-filters.d.ts +2 -0
- package/chips/chip-input.d.ts +2 -5
- package/chips/chip-list.d.ts +20 -5
- package/chips/chip.d.ts +3 -1
- package/core/_core.scss +5 -7
- package/core/common-behaviors/error-state.d.ts +1 -2
- package/core/ripple/_ripple.scss +6 -3
- package/core/ripple/ripple-ref.d.ts +2 -1
- package/core/ripple/ripple-renderer.d.ts +16 -3
- package/core/style/_menu-common.scss +3 -2
- package/core/style/_vendor-prefixes.scss +1 -1
- package/datepicker/calendar-body.d.ts +12 -3
- package/datepicker/date-range-input-parts.d.ts +4 -1
- package/datepicker/month-view.d.ts +18 -0
- package/datepicker/multi-year-view.d.ts +18 -0
- package/datepicker/year-view.d.ts +18 -0
- package/dialog/dialog-animations.d.ts +10 -0
- package/dialog/dialog-config.d.ts +10 -1
- package/dialog/dialog-container.d.ts +12 -1
- package/dialog/dialog-content-directives.d.ts +5 -1
- package/dialog/public-api.d.ts +1 -1
- package/esm2020/autocomplete/autocomplete-module.mjs +5 -5
- package/esm2020/autocomplete/autocomplete-origin.mjs +7 -7
- package/esm2020/autocomplete/autocomplete-trigger.mjs +68 -39
- package/esm2020/autocomplete/autocomplete.mjs +19 -9
- package/esm2020/autocomplete/testing/autocomplete-harness.mjs +7 -1
- package/esm2020/badge/badge-module.mjs +5 -5
- package/esm2020/badge/badge.mjs +4 -4
- package/esm2020/bottom-sheet/bottom-sheet-container.mjs +5 -5
- package/esm2020/bottom-sheet/bottom-sheet-module.mjs +5 -5
- package/esm2020/bottom-sheet/bottom-sheet.mjs +4 -4
- package/esm2020/button/button-module.mjs +5 -5
- package/esm2020/button/button.mjs +9 -9
- package/esm2020/button-toggle/button-toggle-module.mjs +5 -5
- package/esm2020/button-toggle/button-toggle.mjs +8 -8
- package/esm2020/card/card-module.mjs +5 -5
- package/esm2020/card/card.mjs +44 -44
- package/esm2020/checkbox/checkbox-module.mjs +9 -9
- package/esm2020/checkbox/checkbox-required-validator.mjs +4 -4
- package/esm2020/checkbox/checkbox.mjs +5 -5
- package/esm2020/checkbox/testing/checkbox-harness-filters.mjs +1 -1
- package/esm2020/checkbox/testing/checkbox-harness.mjs +3 -2
- package/esm2020/chips/chip-input.mjs +4 -4
- package/esm2020/chips/chip-list.mjs +34 -9
- package/esm2020/chips/chip.mjs +18 -14
- package/esm2020/chips/chips-module.mjs +5 -5
- package/esm2020/core/common-behaviors/common-module.mjs +5 -5
- package/esm2020/core/common-behaviors/error-state.mjs +1 -8
- package/esm2020/core/datetime/index.mjs +9 -9
- package/esm2020/core/datetime/native-date-adapter.mjs +4 -4
- package/esm2020/core/error/error-options.mjs +7 -7
- package/esm2020/core/line/line.mjs +8 -8
- package/esm2020/core/option/index.mjs +5 -5
- package/esm2020/core/option/optgroup.mjs +8 -8
- package/esm2020/core/option/option.mjs +8 -8
- package/esm2020/core/ripple/index.mjs +5 -5
- package/esm2020/core/ripple/ripple-ref.mjs +5 -2
- package/esm2020/core/ripple/ripple-renderer.mjs +113 -53
- package/esm2020/core/ripple/ripple.mjs +4 -4
- package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
- package/esm2020/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +5 -5
- package/esm2020/core/version.mjs +1 -1
- package/esm2020/datepicker/calendar-body.mjs +27 -5
- package/esm2020/datepicker/calendar.mjs +8 -8
- package/esm2020/datepicker/date-range-input-parts.mjs +10 -10
- package/esm2020/datepicker/date-range-input.mjs +6 -6
- package/esm2020/datepicker/date-range-picker.mjs +4 -4
- package/esm2020/datepicker/date-range-selection-strategy.mjs +4 -4
- package/esm2020/datepicker/date-selection-model.mjs +10 -10
- package/esm2020/datepicker/datepicker-actions.mjs +12 -12
- package/esm2020/datepicker/datepicker-base.mjs +8 -8
- package/esm2020/datepicker/datepicker-input-base.mjs +4 -4
- package/esm2020/datepicker/datepicker-input.mjs +4 -4
- package/esm2020/datepicker/datepicker-intl.mjs +4 -4
- package/esm2020/datepicker/datepicker-module.mjs +5 -5
- package/esm2020/datepicker/datepicker-toggle.mjs +8 -8
- package/esm2020/datepicker/datepicker.mjs +4 -4
- package/esm2020/datepicker/month-view.mjs +36 -9
- package/esm2020/datepicker/multi-year-view.mjs +42 -10
- package/esm2020/datepicker/year-view.mjs +41 -10
- package/esm2020/dialog/dialog-animations.mjs +12 -5
- package/esm2020/dialog/dialog-config.mjs +6 -1
- package/esm2020/dialog/dialog-container.mjs +32 -19
- package/esm2020/dialog/dialog-content-directives.mjs +31 -15
- package/esm2020/dialog/dialog-module.mjs +5 -5
- package/esm2020/dialog/dialog.mjs +10 -10
- package/esm2020/dialog/public-api.mjs +2 -2
- package/esm2020/divider/divider-module.mjs +5 -5
- package/esm2020/divider/divider.mjs +5 -5
- package/esm2020/expansion/accordion.mjs +4 -4
- package/esm2020/expansion/expansion-module.mjs +5 -5
- package/esm2020/expansion/expansion-panel-base.mjs +14 -0
- package/esm2020/expansion/expansion-panel-content.mjs +14 -7
- package/esm2020/expansion/expansion-panel-header.mjs +11 -11
- package/esm2020/expansion/expansion-panel.mjs +13 -10
- package/esm2020/expansion/public-api.mjs +2 -1
- package/esm2020/form-field/error.mjs +4 -4
- package/esm2020/form-field/form-field-control.mjs +4 -4
- package/esm2020/form-field/form-field-module.mjs +5 -5
- package/esm2020/form-field/form-field.mjs +22 -14
- package/esm2020/form-field/hint.mjs +4 -4
- package/esm2020/form-field/label.mjs +4 -4
- package/esm2020/form-field/placeholder.mjs +4 -4
- package/esm2020/form-field/prefix.mjs +4 -4
- package/esm2020/form-field/suffix.mjs +4 -4
- package/esm2020/form-field/testing/public-api.mjs +4 -4
- package/esm2020/grid-list/grid-list-module.mjs +5 -5
- package/esm2020/grid-list/grid-list.mjs +6 -6
- package/esm2020/grid-list/grid-tile.mjs +17 -17
- package/esm2020/icon/icon-module.mjs +5 -5
- package/esm2020/icon/icon-registry.mjs +12 -14
- package/esm2020/icon/icon.mjs +31 -21
- package/esm2020/icon/testing/fake-icon-registry.mjs +9 -9
- package/esm2020/input/input-module.mjs +5 -5
- package/esm2020/input/input.mjs +20 -7
- package/esm2020/list/list-module.mjs +5 -5
- package/esm2020/list/list.mjs +21 -23
- package/esm2020/list/selection-list.mjs +14 -37
- package/esm2020/list/testing/list-item-harness-base.mjs +1 -9
- package/esm2020/menu/menu-content.mjs +7 -7
- package/esm2020/menu/menu-errors.mjs +1 -12
- package/esm2020/menu/menu-item.mjs +4 -4
- package/esm2020/menu/menu-module.mjs +5 -5
- package/esm2020/menu/menu-trigger.mjs +62 -64
- package/esm2020/menu/menu.mjs +8 -8
- package/esm2020/paginator/paginator-intl.mjs +4 -4
- package/esm2020/paginator/paginator-module.mjs +5 -5
- package/esm2020/paginator/paginator.mjs +12 -8
- package/esm2020/progress-bar/progress-bar-module.mjs +5 -5
- package/esm2020/progress-bar/progress-bar.mjs +5 -5
- package/esm2020/progress-spinner/progress-spinner-module.mjs +5 -5
- package/esm2020/progress-spinner/progress-spinner.mjs +8 -5
- package/esm2020/radio/radio-module.mjs +5 -5
- package/esm2020/radio/radio.mjs +14 -14
- package/esm2020/radio/testing/radio-harness-filters.mjs +1 -1
- package/esm2020/radio/testing/radio-harness.mjs +3 -2
- package/esm2020/select/select-module.mjs +5 -5
- package/esm2020/select/select.mjs +25 -13
- package/esm2020/sidenav/drawer.mjs +12 -12
- package/esm2020/sidenav/sidenav-module.mjs +5 -5
- package/esm2020/sidenav/sidenav.mjs +12 -12
- package/esm2020/slide-toggle/slide-toggle-module.mjs +9 -9
- package/esm2020/slide-toggle/slide-toggle-required-validator.mjs +4 -4
- package/esm2020/slide-toggle/slide-toggle.mjs +5 -5
- package/esm2020/slide-toggle/testing/slide-toggle-harness-filters.mjs +1 -1
- package/esm2020/slide-toggle/testing/slide-toggle-harness.mjs +4 -2
- package/esm2020/slider/slider-module.mjs +5 -5
- package/esm2020/slider/slider.mjs +5 -5
- package/esm2020/snack-bar/simple-snack-bar.mjs +5 -5
- package/esm2020/snack-bar/snack-bar-container.mjs +5 -5
- package/esm2020/snack-bar/snack-bar-module.mjs +5 -5
- package/esm2020/snack-bar/snack-bar.mjs +7 -7
- package/esm2020/sort/sort-header-intl.mjs +4 -4
- package/esm2020/sort/sort-header.mjs +15 -7
- package/esm2020/sort/sort-module.mjs +5 -5
- package/esm2020/sort/sort.mjs +4 -4
- package/esm2020/stepper/public-api.mjs +2 -2
- package/esm2020/stepper/step-content.mjs +4 -4
- package/esm2020/stepper/step-header.mjs +5 -5
- package/esm2020/stepper/step-label.mjs +4 -4
- package/esm2020/stepper/stepper-animations.mjs +9 -3
- package/esm2020/stepper/stepper-button.mjs +7 -7
- package/esm2020/stepper/stepper-icon.mjs +4 -4
- package/esm2020/stepper/stepper-intl.mjs +4 -4
- package/esm2020/stepper/stepper-module.mjs +6 -10
- package/esm2020/stepper/stepper.mjs +39 -63
- package/esm2020/table/cell.mjs +22 -22
- package/esm2020/table/row.mjs +22 -22
- package/esm2020/table/table-module.mjs +5 -5
- package/esm2020/table/table.mjs +9 -9
- package/esm2020/table/text-column.mjs +4 -4
- package/esm2020/tabs/ink-bar.mjs +4 -4
- package/esm2020/tabs/paginated-tab-header.mjs +16 -10
- package/esm2020/tabs/tab-body.mjs +18 -12
- package/esm2020/tabs/tab-config.mjs +1 -1
- package/esm2020/tabs/tab-content.mjs +4 -4
- package/esm2020/tabs/tab-group.mjs +36 -9
- package/esm2020/tabs/tab-header.mjs +8 -8
- package/esm2020/tabs/tab-label-wrapper.mjs +4 -4
- package/esm2020/tabs/tab-label.mjs +4 -4
- package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +18 -18
- package/esm2020/tabs/tab.mjs +4 -4
- package/esm2020/tabs/tabs-animations.mjs +16 -6
- package/esm2020/tabs/tabs-module.mjs +5 -5
- package/esm2020/toolbar/toolbar-module.mjs +5 -5
- package/esm2020/toolbar/toolbar.mjs +8 -8
- package/esm2020/tooltip/tooltip-module.mjs +5 -5
- package/esm2020/tooltip/tooltip.mjs +14 -14
- package/esm2020/tree/node.mjs +10 -10
- package/esm2020/tree/outlet.mjs +4 -4
- package/esm2020/tree/padding.mjs +4 -4
- package/esm2020/tree/toggle.mjs +4 -4
- package/esm2020/tree/tree-module.mjs +5 -5
- package/esm2020/tree/tree.mjs +5 -5
- package/expansion/expansion-panel-base.d.ts +22 -0
- package/expansion/expansion-panel-content.d.ts +4 -2
- package/expansion/public-api.d.ts +1 -0
- package/fesm2015/autocomplete/testing.mjs +6 -0
- package/fesm2015/autocomplete/testing.mjs.map +1 -1
- package/fesm2015/autocomplete.mjs +96 -56
- package/fesm2015/autocomplete.mjs.map +1 -1
- package/fesm2015/badge.mjs +7 -7
- package/fesm2015/badge.mjs.map +1 -1
- package/fesm2015/bottom-sheet.mjs +11 -11
- package/fesm2015/bottom-sheet.mjs.map +1 -1
- package/fesm2015/button-toggle.mjs +11 -11
- package/fesm2015/button-toggle.mjs.map +1 -1
- package/fesm2015/button.mjs +12 -12
- package/fesm2015/button.mjs.map +1 -1
- package/fesm2015/card.mjs +47 -47
- package/fesm2015/card.mjs.map +1 -1
- package/fesm2015/checkbox/testing.mjs +2 -1
- package/fesm2015/checkbox/testing.mjs.map +1 -1
- package/fesm2015/checkbox.mjs +15 -15
- package/fesm2015/checkbox.mjs.map +1 -1
- package/fesm2015/chips.mjs +57 -28
- package/fesm2015/chips.mjs.map +1 -1
- package/fesm2015/core.mjs +180 -122
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/datepicker.mjs +219 -107
- package/fesm2015/datepicker.mjs.map +1 -1
- package/fesm2015/dialog.mjs +116 -75
- package/fesm2015/dialog.mjs.map +1 -1
- package/fesm2015/divider.mjs +8 -8
- package/fesm2015/divider.mjs.map +1 -1
- package/fesm2015/expansion.mjs +56 -33
- package/fesm2015/expansion.mjs.map +1 -1
- package/fesm2015/form-field/testing.mjs +1 -1
- package/fesm2015/form-field/testing.mjs.map +1 -1
- package/fesm2015/form-field.mjs +47 -38
- package/fesm2015/form-field.mjs.map +1 -1
- package/fesm2015/grid-list.mjs +25 -25
- package/fesm2015/grid-list.mjs.map +1 -1
- package/fesm2015/icon/testing.mjs +8 -8
- package/fesm2015/icon/testing.mjs.map +1 -1
- package/fesm2015/icon.mjs +45 -37
- package/fesm2015/icon.mjs.map +1 -1
- package/fesm2015/input.mjs +24 -11
- package/fesm2015/input.mjs.map +1 -1
- package/fesm2015/list/testing.mjs +0 -10
- package/fesm2015/list/testing.mjs.map +1 -1
- package/fesm2015/list.mjs +40 -66
- package/fesm2015/list.mjs.map +1 -1
- package/fesm2015/menu.mjs +82 -93
- package/fesm2015/menu.mjs.map +1 -1
- package/fesm2015/paginator.mjs +18 -14
- package/fesm2015/paginator.mjs.map +1 -1
- package/fesm2015/progress-bar.mjs +8 -8
- package/fesm2015/progress-bar.mjs.map +1 -1
- package/fesm2015/progress-spinner.mjs +11 -8
- package/fesm2015/progress-spinner.mjs.map +1 -1
- package/fesm2015/radio/testing.mjs +2 -1
- package/fesm2015/radio/testing.mjs.map +1 -1
- package/fesm2015/radio.mjs +17 -17
- package/fesm2015/radio.mjs.map +1 -1
- package/fesm2015/select.mjs +28 -16
- package/fesm2015/select.mjs.map +1 -1
- package/fesm2015/sidenav.mjs +26 -26
- package/fesm2015/sidenav.mjs.map +1 -1
- package/fesm2015/slide-toggle/testing.mjs +3 -1
- package/fesm2015/slide-toggle/testing.mjs.map +1 -1
- package/fesm2015/slide-toggle.mjs +15 -15
- package/fesm2015/slide-toggle.mjs.map +1 -1
- package/fesm2015/slider.mjs +8 -8
- package/fesm2015/slider.mjs.map +1 -1
- package/fesm2015/snack-bar.mjs +18 -18
- package/fesm2015/snack-bar.mjs.map +1 -1
- package/fesm2015/sort.mjs +127 -119
- package/fesm2015/sort.mjs.map +1 -1
- package/fesm2015/stepper.mjs +72 -93
- package/fesm2015/stepper.mjs.map +1 -1
- package/fesm2015/table.mjs +57 -57
- package/fesm2015/table.mjs.map +1 -1
- package/fesm2015/tabs.mjs +125 -76
- package/fesm2015/tabs.mjs.map +1 -1
- package/fesm2015/toolbar.mjs +11 -11
- package/fesm2015/toolbar.mjs.map +1 -1
- package/fesm2015/tooltip.mjs +17 -17
- package/fesm2015/tooltip.mjs.map +1 -1
- package/fesm2015/tree.mjs +26 -26
- package/fesm2015/tree.mjs.map +1 -1
- package/fesm2020/autocomplete/testing.mjs +6 -0
- package/fesm2020/autocomplete/testing.mjs.map +1 -1
- package/fesm2020/autocomplete.mjs +95 -56
- package/fesm2020/autocomplete.mjs.map +1 -1
- package/fesm2020/badge.mjs +7 -7
- package/fesm2020/badge.mjs.map +1 -1
- package/fesm2020/bottom-sheet.mjs +11 -11
- package/fesm2020/bottom-sheet.mjs.map +1 -1
- package/fesm2020/button-toggle.mjs +11 -11
- package/fesm2020/button-toggle.mjs.map +1 -1
- package/fesm2020/button.mjs +12 -12
- package/fesm2020/button.mjs.map +1 -1
- package/fesm2020/card.mjs +47 -47
- package/fesm2020/card.mjs.map +1 -1
- package/fesm2020/checkbox/testing.mjs +2 -1
- package/fesm2020/checkbox/testing.mjs.map +1 -1
- package/fesm2020/checkbox.mjs +15 -15
- package/fesm2020/checkbox.mjs.map +1 -1
- package/fesm2020/chips.mjs +57 -28
- package/fesm2020/chips.mjs.map +1 -1
- package/fesm2020/core.mjs +179 -122
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/datepicker.mjs +219 -107
- package/fesm2020/datepicker.mjs.map +1 -1
- package/fesm2020/dialog.mjs +115 -75
- package/fesm2020/dialog.mjs.map +1 -1
- package/fesm2020/divider.mjs +8 -8
- package/fesm2020/divider.mjs.map +1 -1
- package/fesm2020/expansion.mjs +54 -33
- package/fesm2020/expansion.mjs.map +1 -1
- package/fesm2020/form-field/testing.mjs +1 -1
- package/fesm2020/form-field/testing.mjs.map +1 -1
- package/fesm2020/form-field.mjs +46 -38
- package/fesm2020/form-field.mjs.map +1 -1
- package/fesm2020/grid-list.mjs +25 -25
- package/fesm2020/grid-list.mjs.map +1 -1
- package/fesm2020/icon/testing.mjs +8 -8
- package/fesm2020/icon/testing.mjs.map +1 -1
- package/fesm2020/icon.mjs +45 -37
- package/fesm2020/icon.mjs.map +1 -1
- package/fesm2020/input.mjs +23 -10
- package/fesm2020/input.mjs.map +1 -1
- package/fesm2020/list/testing.mjs +0 -8
- package/fesm2020/list/testing.mjs.map +1 -1
- package/fesm2020/list.mjs +37 -62
- package/fesm2020/list.mjs.map +1 -1
- package/fesm2020/menu.mjs +80 -93
- package/fesm2020/menu.mjs.map +1 -1
- package/fesm2020/paginator.mjs +18 -14
- package/fesm2020/paginator.mjs.map +1 -1
- package/fesm2020/progress-bar.mjs +8 -8
- package/fesm2020/progress-bar.mjs.map +1 -1
- package/fesm2020/progress-spinner.mjs +11 -8
- package/fesm2020/progress-spinner.mjs.map +1 -1
- package/fesm2020/radio/testing.mjs +2 -1
- package/fesm2020/radio/testing.mjs.map +1 -1
- package/fesm2020/radio.mjs +17 -17
- package/fesm2020/radio.mjs.map +1 -1
- package/fesm2020/select.mjs +28 -16
- package/fesm2020/select.mjs.map +1 -1
- package/fesm2020/sidenav.mjs +26 -26
- package/fesm2020/sidenav.mjs.map +1 -1
- package/fesm2020/slide-toggle/testing.mjs +3 -1
- package/fesm2020/slide-toggle/testing.mjs.map +1 -1
- package/fesm2020/slide-toggle.mjs +15 -15
- package/fesm2020/slide-toggle.mjs.map +1 -1
- package/fesm2020/slider.mjs +8 -8
- package/fesm2020/slider.mjs.map +1 -1
- package/fesm2020/snack-bar.mjs +18 -18
- package/fesm2020/snack-bar.mjs.map +1 -1
- package/fesm2020/sort.mjs +23 -15
- package/fesm2020/sort.mjs.map +1 -1
- package/fesm2020/stepper.mjs +72 -93
- package/fesm2020/stepper.mjs.map +1 -1
- package/fesm2020/table.mjs +57 -57
- package/fesm2020/table.mjs.map +1 -1
- package/fesm2020/tabs.mjs +125 -76
- package/fesm2020/tabs.mjs.map +1 -1
- package/fesm2020/toolbar.mjs +11 -11
- package/fesm2020/toolbar.mjs.map +1 -1
- package/fesm2020/tooltip.mjs +17 -17
- package/fesm2020/tooltip.mjs.map +1 -1
- package/fesm2020/tree.mjs +26 -26
- package/fesm2020/tree.mjs.map +1 -1
- package/form-field/form-field-control.d.ts +3 -3
- package/form-field/form-field.d.ts +15 -8
- package/form-field/testing/public-api.d.ts +1 -1
- package/icon/icon-registry.d.ts +7 -9
- package/icon/icon.d.ts +12 -3
- package/icon/testing/fake-icon-registry.d.ts +1 -1
- package/input/input.d.ts +11 -1
- package/list/selection-list.d.ts +4 -21
- package/list/testing/list-item-harness-base.d.ts +1 -7
- package/menu/menu-errors.d.ts +0 -5
- package/menu/menu-trigger.d.ts +14 -10
- package/package.json +7 -7
- package/paginator/paginator.d.ts +12 -1
- 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/progress-spinner.d.ts +3 -1
- package/radio/testing/radio-harness-filters.d.ts +2 -0
- package/schematics/migration.json +5 -0
- package/schematics/ng-add/fonts/material-fonts.js +4 -13
- package/schematics/ng-add/fonts/material-fonts.mjs +4 -13
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/index.mjs +2 -2
- package/schematics/ng-add/schema.d.ts +2 -2
- package/schematics/ng-add/schema.js +1 -1
- package/schematics/ng-add/schema.json +12 -4
- package/schematics/ng-add/schema.mjs +1 -1
- package/schematics/ng-add/setup-project.js +16 -23
- package/schematics/ng-add/setup-project.mjs +16 -23
- package/schematics/ng-add/theming/theming.js +28 -39
- package/schematics/ng-add/theming/theming.mjs +28 -39
- package/schematics/ng-generate/address-form/index.js +5 -14
- package/schematics/ng-generate/address-form/index.mjs +5 -14
- package/schematics/ng-generate/dashboard/index.js +5 -14
- package/schematics/ng-generate/dashboard/index.mjs +5 -14
- package/schematics/ng-generate/navigation/index.js +5 -14
- package/schematics/ng-generate/navigation/index.mjs +5 -14
- package/schematics/ng-generate/table/index.js +5 -14
- package/schematics/ng-generate/table/index.mjs +5 -14
- package/schematics/ng-generate/tree/index.js +5 -14
- package/schematics/ng-generate/tree/index.mjs +5 -14
- package/schematics/ng-update/data/constructor-checks.js +11 -1
- package/schematics/ng-update/data/constructor-checks.mjs +11 -1
- package/schematics/ng-update/data/css-selectors.js +7 -1
- package/schematics/ng-update/data/css-selectors.mjs +7 -1
- package/schematics/ng-update/index.d.ts +2 -0
- package/schematics/ng-update/index.js +7 -2
- package/schematics/ng-update/index.mjs +7 -2
- package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +4 -4
- package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.mjs +4 -4
- package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.js +14 -23
- package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.mjs +14 -23
- package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.js +3 -15
- package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.mjs +3 -15
- package/schematics/ng-update/migrations/theming-api-v12/migration.js +5 -5
- package/schematics/ng-update/migrations/theming-api-v12/migration.mjs +5 -5
- package/select/select.d.ts +11 -0
- package/slide-toggle/testing/slide-toggle-harness-filters.d.ts +4 -0
- package/sort/sort-header.d.ts +4 -4
- package/sort/sort.d.ts +4 -0
- package/stepper/public-api.d.ts +1 -1
- package/stepper/stepper-animations.d.ts +2 -0
- package/stepper/stepper-module.d.ts +1 -1
- package/stepper/stepper.d.ts +15 -38
- package/tabs/_tabs-common.scss +6 -5
- package/tabs/paginated-tab-header.d.ts +4 -2
- package/tabs/tab-body.d.ts +3 -1
- package/tabs/tab-config.d.ts +6 -0
- package/tabs/tab-group.d.ts +12 -2
|
@@ -101,6 +101,9 @@ class MatProgressSpinner extends _MatProgressSpinnerBase {
|
|
|
101
101
|
this.mode = 'indeterminate';
|
|
102
102
|
}
|
|
103
103
|
if (defaults) {
|
|
104
|
+
if (defaults.color) {
|
|
105
|
+
this.color = this.defaultColor = defaults.color;
|
|
106
|
+
}
|
|
104
107
|
if (defaults.diameter) {
|
|
105
108
|
this.diameter = defaults.diameter;
|
|
106
109
|
}
|
|
@@ -237,9 +240,9 @@ class MatProgressSpinner extends _MatProgressSpinnerBase {
|
|
|
237
240
|
* than the document head.
|
|
238
241
|
*/
|
|
239
242
|
MatProgressSpinner._diameters = new WeakMap();
|
|
240
|
-
MatProgressSpinner.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
241
|
-
MatProgressSpinner.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
243
|
+
MatProgressSpinner.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatProgressSpinner, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: DOCUMENT, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS }, { token: i0.ChangeDetectorRef }, { token: i2.ViewportRuler }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
244
|
+
MatProgressSpinner.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "14.0.0-next.9", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: { color: "color", diameter: "diameter", strokeWidth: "strokeWidth", mode: "mode", value: "value" }, host: { attributes: { "role": "progressbar", "tabindex": "-1" }, properties: { "class._mat-animation-noopable": "_noopAnimations", "style.width.px": "diameter", "style.height.px": "diameter", "attr.aria-valuemin": "mode === \"determinate\" ? 0 : null", "attr.aria-valuemax": "mode === \"determinate\" ? 100 : null", "attr.aria-valuenow": "mode === \"determinate\" ? value : null", "attr.mode": "mode" }, classAttribute: "mat-progress-spinner mat-spinner" }, exportAs: ["matProgressSpinner"], usesInheritance: true, ngImport: i0, template: "<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n", styles: [".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:rgba(0,0,0,0);transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:CanvasText}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}"], directives: [{ type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatProgressSpinner, decorators: [{
|
|
243
246
|
type: Component,
|
|
244
247
|
args: [{ selector: 'mat-progress-spinner, mat-spinner', exportAs: 'matProgressSpinner', host: {
|
|
245
248
|
'role': 'progressbar',
|
|
@@ -255,7 +258,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
255
258
|
'[attr.aria-valuemax]': 'mode === "determinate" ? 100 : null',
|
|
256
259
|
'[attr.aria-valuenow]': 'mode === "determinate" ? value : null',
|
|
257
260
|
'[attr.mode]': 'mode',
|
|
258
|
-
}, inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n", styles: [".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:
|
|
261
|
+
}, inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n", styles: [".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:rgba(0,0,0,0);transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:CanvasText}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}"] }]
|
|
259
262
|
}], ctorParameters: function () {
|
|
260
263
|
return [{ type: i0.ElementRef }, { type: i1.Platform }, { type: undefined, decorators: [{
|
|
261
264
|
type: Optional
|
|
@@ -290,10 +293,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
290
293
|
*/
|
|
291
294
|
class MatProgressSpinnerModule {
|
|
292
295
|
}
|
|
293
|
-
MatProgressSpinnerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
294
|
-
MatProgressSpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
295
|
-
MatProgressSpinnerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
296
|
+
MatProgressSpinnerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatProgressSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
297
|
+
MatProgressSpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatProgressSpinnerModule, declarations: [MatProgressSpinner], imports: [MatCommonModule, CommonModule], exports: [MatProgressSpinner, MatCommonModule] });
|
|
298
|
+
MatProgressSpinnerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatProgressSpinnerModule, imports: [[MatCommonModule, CommonModule], MatCommonModule] });
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatProgressSpinnerModule, decorators: [{
|
|
297
300
|
type: NgModule,
|
|
298
301
|
args: [{
|
|
299
302
|
imports: [MatCommonModule, CommonModule],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-spinner.mjs","sources":["../../../../../../src/material/progress-spinner/progress-spinner.ts","../../../../../../src/material/progress-spinner/progress-spinner.html","../../../../../../src/material/progress-spinner/progress-spinner-module.ts","../../../../../../src/material/progress-spinner/public-api.ts","../../../../../../src/material/progress-spinner/index.ts","../../../../../../src/material/progress-spinner/progress-spinner_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {Platform, _getShadowRoot} from '@angular/cdk/platform';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n Optional,\n ViewEncapsulation,\n OnInit,\n ChangeDetectorRef,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport {CanColor, mixinColor} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {Subscription} from 'rxjs';\n\n/** Possible mode for a progress spinner. */\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\n\n/**\n * Base reference size of the spinner.\n * @docs-private\n */\nconst BASE_SIZE = 100;\n\n/**\n * Base reference stroke width of the spinner.\n * @docs-private\n */\nconst BASE_STROKE_WIDTH = 10;\n\n// Boilerplate for applying mixins to MatProgressSpinner.\n/** @docs-private */\nconst _MatProgressSpinnerBase = mixinColor(\n class {\n constructor(public _elementRef: ElementRef) {}\n },\n 'primary',\n);\n\n/** Default `mat-progress-spinner` options that can be overridden. */\nexport interface MatProgressSpinnerDefaultOptions {\n /** Diameter of the spinner. */\n diameter?: number;\n /** Width of the spinner's stroke. */\n strokeWidth?: number;\n /**\n * Whether the animations should be force to be enabled, ignoring if the current environment is\n * using NoopAnimationsModule.\n */\n _forceAnimations?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-spinner`. */\nexport const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS =\n new InjectionToken<MatProgressSpinnerDefaultOptions>('mat-progress-spinner-default-options', {\n providedIn: 'root',\n factory: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,\n });\n\n/** @docs-private */\nexport function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY(): MatProgressSpinnerDefaultOptions {\n return {diameter: BASE_SIZE};\n}\n\n// .0001 percentage difference is necessary in order to avoid unwanted animation frames\n// for example because the animation duration is 4 seconds, .1% accounts to 4ms\n// which are enough to see the flicker described in\n// https://github.com/angular/components/issues/8984\nconst INDETERMINATE_ANIMATION_TEMPLATE = `\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n`;\n\n/**\n * `<mat-progress-spinner>` component.\n */\n@Component({\n selector: 'mat-progress-spinner, mat-spinner',\n exportAs: 'matProgressSpinner',\n host: {\n 'role': 'progressbar',\n // `mat-spinner` is here for backward compatibility.\n 'class': 'mat-progress-spinner mat-spinner',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n 'tabindex': '-1',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n '[attr.aria-valuemin]': 'mode === \"determinate\" ? 0 : null',\n '[attr.aria-valuemax]': 'mode === \"determinate\" ? 100 : null',\n '[attr.aria-valuenow]': 'mode === \"determinate\" ? value : null',\n '[attr.mode]': 'mode',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatProgressSpinner\n extends _MatProgressSpinnerBase\n implements OnInit, OnDestroy, CanColor\n{\n private _diameter = BASE_SIZE;\n private _value = 0;\n private _strokeWidth: number;\n private _resizeSubscription = Subscription.EMPTY;\n\n /**\n * Element to which we should add the generated style tags for the indeterminate animation.\n * For most elements this is the document, but for the ones in the Shadow DOM we need to\n * use the shadow root.\n */\n private _styleRoot: Node;\n\n /**\n * Tracks diameters of existing instances to de-dupe generated styles (default d = 100).\n * We need to keep track of which elements the diameters were attached to, because for\n * elements in the Shadow DOM the style tags are attached to the shadow root, rather\n * than the document head.\n */\n private static _diameters = new WeakMap<Node, Set<number>>();\n\n /** Whether the _mat-animation-noopable class should be applied, disabling animations. */\n _noopAnimations: boolean;\n\n /** A string that is used for setting the spinner animation-name CSS property */\n _spinnerAnimationLabel: string;\n\n /** The diameter of the progress spinner (will set width and height of svg). */\n @Input()\n get diameter(): number {\n return this._diameter;\n }\n set diameter(size: NumberInput) {\n this._diameter = coerceNumberProperty(size);\n this._spinnerAnimationLabel = this._getSpinnerAnimationLabel();\n\n // If this is set before `ngOnInit`, the style root may not have been resolved yet.\n if (this._styleRoot) {\n this._attachStyleNode();\n }\n }\n\n /** Stroke width of the progress spinner. */\n @Input()\n get strokeWidth(): number {\n return this._strokeWidth || this.diameter / 10;\n }\n set strokeWidth(value: NumberInput) {\n this._strokeWidth = coerceNumberProperty(value);\n }\n\n /** Mode of the progress circle */\n @Input() mode: ProgressSpinnerMode = 'determinate';\n\n /** Value of the progress circle. */\n @Input()\n get value(): number {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(newValue: NumberInput) {\n this._value = Math.max(0, Math.min(100, coerceNumberProperty(newValue)));\n }\n\n constructor(\n elementRef: ElementRef<HTMLElement>,\n _platform: Platform,\n @Optional() @Inject(DOCUMENT) private _document: any,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode: string,\n @Inject(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS)\n defaults?: MatProgressSpinnerDefaultOptions,\n /**\n * @deprecated `changeDetectorRef`, `viewportRuler` and `ngZone`\n * parameters to become required.\n * @breaking-change 14.0.0\n */\n changeDetectorRef?: ChangeDetectorRef,\n viewportRuler?: ViewportRuler,\n ngZone?: NgZone,\n ) {\n super(elementRef);\n\n const trackedDiameters = MatProgressSpinner._diameters;\n this._spinnerAnimationLabel = this._getSpinnerAnimationLabel();\n\n // The base size is already inserted via the component's structural styles. We still\n // need to track it so we don't end up adding the same styles again.\n if (!trackedDiameters.has(_document.head)) {\n trackedDiameters.set(_document.head, new Set<number>([BASE_SIZE]));\n }\n\n this._noopAnimations =\n animationMode === 'NoopAnimations' && !!defaults && !defaults._forceAnimations;\n\n if (elementRef.nativeElement.nodeName.toLowerCase() === 'mat-spinner') {\n this.mode = 'indeterminate';\n }\n\n if (defaults) {\n if (defaults.diameter) {\n this.diameter = defaults.diameter;\n }\n\n if (defaults.strokeWidth) {\n this.strokeWidth = defaults.strokeWidth;\n }\n }\n\n // Safari has an issue where the circle isn't positioned correctly when the page has a\n // different zoom level from the default. This handler triggers a recalculation of the\n // `transform-origin` when the page zoom level changes.\n // See `_getCircleTransformOrigin` for more info.\n // @breaking-change 14.0.0 Remove null checks for `_changeDetectorRef`,\n // `viewportRuler` and `ngZone`.\n if (_platform.isBrowser && _platform.SAFARI && viewportRuler && changeDetectorRef && ngZone) {\n this._resizeSubscription = viewportRuler.change(150).subscribe(() => {\n // When the window is resize while the spinner is in `indeterminate` mode, we\n // have to mark for check so the transform origin of the circle can be recomputed.\n if (this.mode === 'indeterminate') {\n ngZone.run(() => changeDetectorRef.markForCheck());\n }\n });\n }\n }\n\n ngOnInit() {\n const element = this._elementRef.nativeElement;\n\n // Note that we need to look up the root node in ngOnInit, rather than the constructor, because\n // Angular seems to create the element outside the shadow root and then moves it inside, if the\n // node is inside an `ngIf` and a ShadowDom-encapsulated component.\n this._styleRoot = _getShadowRoot(element) || this._document.head;\n this._attachStyleNode();\n element.classList.add('mat-progress-spinner-indeterminate-animation');\n }\n\n ngOnDestroy() {\n this._resizeSubscription.unsubscribe();\n }\n\n /** The radius of the spinner, adjusted for stroke width. */\n _getCircleRadius() {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n\n /** The view box of the spinner's svg element. */\n _getViewBox() {\n const viewBox = this._getCircleRadius() * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n\n /** The stroke circumference of the svg circle. */\n _getStrokeCircumference(): number {\n return 2 * Math.PI * this._getCircleRadius();\n }\n\n /** The dash offset of the svg circle. */\n _getStrokeDashOffset() {\n if (this.mode === 'determinate') {\n return (this._getStrokeCircumference() * (100 - this._value)) / 100;\n }\n\n return null;\n }\n\n /** Stroke width of the circle in percent. */\n _getCircleStrokeWidth() {\n return (this.strokeWidth / this.diameter) * 100;\n }\n\n /** Gets the `transform-origin` for the inner circle element. */\n _getCircleTransformOrigin(svg: HTMLElement): string {\n // Safari has an issue where the `transform-origin` doesn't work as expected when the page\n // has a different zoom level from the default. The problem appears to be that a zoom\n // is applied on the `svg` node itself. We can work around it by calculating the origin\n // based on the zoom level. On all other browsers the `currentScale` appears to always be 1.\n const scale = ((svg as unknown as SVGSVGElement).currentScale ?? 1) * 50;\n return `${scale}% ${scale}%`;\n }\n\n /** Dynamically generates a style tag containing the correct animation for this diameter. */\n private _attachStyleNode(): void {\n const styleRoot = this._styleRoot;\n const currentDiameter = this._diameter;\n const diameters = MatProgressSpinner._diameters;\n let diametersForElement = diameters.get(styleRoot);\n\n if (!diametersForElement || !diametersForElement.has(currentDiameter)) {\n const styleTag: HTMLStyleElement = this._document.createElement('style');\n styleTag.setAttribute('mat-spinner-animation', this._spinnerAnimationLabel);\n styleTag.textContent = this._getAnimationText();\n styleRoot.appendChild(styleTag);\n\n if (!diametersForElement) {\n diametersForElement = new Set<number>();\n diameters.set(styleRoot, diametersForElement);\n }\n\n diametersForElement.add(currentDiameter);\n }\n }\n\n /** Generates animation styles adjusted for the spinner's diameter. */\n private _getAnimationText(): string {\n const strokeCircumference = this._getStrokeCircumference();\n return (\n INDETERMINATE_ANIMATION_TEMPLATE\n // Animation should begin at 5% and end at 80%\n .replace(/START_VALUE/g, `${0.95 * strokeCircumference}`)\n .replace(/END_VALUE/g, `${0.2 * strokeCircumference}`)\n .replace(/DIAMETER/g, `${this._spinnerAnimationLabel}`)\n );\n }\n\n /** Returns the circle diameter formatted for use with the animation-name CSS property. */\n private _getSpinnerAnimationLabel(): string {\n // The string of a float point number will include a period ‘.’ character,\n // which is not valid for a CSS animation-name.\n return this.diameter.toString().replace('.', '_');\n }\n}\n","<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatProgressSpinner} from './progress-spinner';\n\n@NgModule({\n imports: [MatCommonModule, CommonModule],\n exports: [MatProgressSpinner, MatCommonModule],\n declarations: [MatProgressSpinner],\n})\nexport class MatProgressSpinnerModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MatProgressSpinner} from './progress-spinner';\n\nexport * from './progress-spinner-module';\nexport {\n MatProgressSpinner,\n MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS,\n ProgressSpinnerMode,\n MatProgressSpinnerDefaultOptions,\n MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,\n} from './progress-spinner';\n\n/**\n * @deprecated Import `MatProgressSpinner` instead. Note that the\n * `mat-spinner` selector isn't deprecated.\n * @breaking-change 8.0.0\n */\n// tslint:disable-next-line:variable-name\nexport const MatSpinner = MatProgressSpinner;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;AAMG;AA2BH;;;AAGG;AACH,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB;;;AAGG;AACH,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B;AACA;AACA,MAAM,uBAAuB,GAAG,UAAU,CACxC,MAAA;AACE,IAAA,WAAA,CAAmB,WAAuB,EAAA;AAAvB,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;KAAI;CAC/C,EACD,SAAS,CACV,CAAC;AAeF;MACa,oCAAoC,GAC/C,IAAI,cAAc,CAAmC,sCAAsC,EAAE;AAC3F,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,4CAA4C;AACtD,CAAA,EAAE;AAEL;SACgB,4CAA4C,GAAA;AAC1D,IAAA,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,CAAC;AAC/B,CAAC;AAED;AACA;AACA;AACA;AACA,MAAM,gCAAgC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;CAsBxC,CAAC;AAEF;;AAEG;AAyBG,MAAO,kBACX,SAAQ,uBAAuB,CAAA;IAiE/B,WACE,CAAA,UAAmC,EACnC,SAAmB,EACmB,SAAc,EACT,aAAqB,EAEhE,QAA2C;AAC3C;;;;AAIG;IACH,iBAAqC,EACrC,aAA6B,EAC7B,MAAe,EAAA;QAEf,KAAK,CAAC,UAAU,CAAC,CAAC;AAboB,QAAA,I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;;;;AAMG;MAWU,wBAAwB,CAAA;;qHAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;sHAAxB,wBAAwB,EAAA,YAAA,EAAA,CAFpB,kBAAkB,CAFvB,EAAA,OAAA,EAAA,CAAA,eAAe,EAAE,YAAY,CAAA,EAAA,OAAA,EAAA,CAC7B,kBAAkB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;AAGlC,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,YAJ1B,CAAC,eAAe,EAAE,YAAY,CAAC,EACV,eAAe,CAAA,EAAA,CAAA,CAAA;2FAGlC,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,eAAe,EAAE,YAAY,CAAC;AACxC,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,CAAC;oBAC9C,YAAY,EAAE,CAAC,kBAAkB,CAAC;iBACnC,CAAA;;;AChBD;;;;;;AAMG;AAaH;;;;AAIG;AACH;AACO,MAAM,UAAU,GAAG;;ACzB1B;;;;;;AAMG;;ACNH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"progress-spinner.mjs","sources":["../../../../../../src/material/progress-spinner/progress-spinner.ts","../../../../../../src/material/progress-spinner/progress-spinner.html","../../../../../../src/material/progress-spinner/progress-spinner-module.ts","../../../../../../src/material/progress-spinner/public-api.ts","../../../../../../src/material/progress-spinner/index.ts","../../../../../../src/material/progress-spinner/progress-spinner_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {Platform, _getShadowRoot} from '@angular/cdk/platform';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n Optional,\n ViewEncapsulation,\n OnInit,\n ChangeDetectorRef,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport {CanColor, mixinColor, ThemePalette} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {Subscription} from 'rxjs';\n\n/** Possible mode for a progress spinner. */\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\n\n/**\n * Base reference size of the spinner.\n * @docs-private\n */\nconst BASE_SIZE = 100;\n\n/**\n * Base reference stroke width of the spinner.\n * @docs-private\n */\nconst BASE_STROKE_WIDTH = 10;\n\n// Boilerplate for applying mixins to MatProgressSpinner.\n/** @docs-private */\nconst _MatProgressSpinnerBase = mixinColor(\n class {\n constructor(public _elementRef: ElementRef) {}\n },\n 'primary',\n);\n\n/** Default `mat-progress-spinner` options that can be overridden. */\nexport interface MatProgressSpinnerDefaultOptions {\n /** Default color of the spinner. */\n color?: ThemePalette;\n /** Diameter of the spinner. */\n diameter?: number;\n /** Width of the spinner's stroke. */\n strokeWidth?: number;\n /**\n * Whether the animations should be force to be enabled, ignoring if the current environment is\n * using NoopAnimationsModule.\n */\n _forceAnimations?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-spinner`. */\nexport const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS =\n new InjectionToken<MatProgressSpinnerDefaultOptions>('mat-progress-spinner-default-options', {\n providedIn: 'root',\n factory: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,\n });\n\n/** @docs-private */\nexport function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY(): MatProgressSpinnerDefaultOptions {\n return {diameter: BASE_SIZE};\n}\n\n// .0001 percentage difference is necessary in order to avoid unwanted animation frames\n// for example because the animation duration is 4 seconds, .1% accounts to 4ms\n// which are enough to see the flicker described in\n// https://github.com/angular/components/issues/8984\nconst INDETERMINATE_ANIMATION_TEMPLATE = `\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n`;\n\n/**\n * `<mat-progress-spinner>` component.\n */\n@Component({\n selector: 'mat-progress-spinner, mat-spinner',\n exportAs: 'matProgressSpinner',\n host: {\n 'role': 'progressbar',\n // `mat-spinner` is here for backward compatibility.\n 'class': 'mat-progress-spinner mat-spinner',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n 'tabindex': '-1',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n '[attr.aria-valuemin]': 'mode === \"determinate\" ? 0 : null',\n '[attr.aria-valuemax]': 'mode === \"determinate\" ? 100 : null',\n '[attr.aria-valuenow]': 'mode === \"determinate\" ? value : null',\n '[attr.mode]': 'mode',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatProgressSpinner\n extends _MatProgressSpinnerBase\n implements OnInit, OnDestroy, CanColor\n{\n private _diameter = BASE_SIZE;\n private _value = 0;\n private _strokeWidth: number;\n private _resizeSubscription = Subscription.EMPTY;\n\n /**\n * Element to which we should add the generated style tags for the indeterminate animation.\n * For most elements this is the document, but for the ones in the Shadow DOM we need to\n * use the shadow root.\n */\n private _styleRoot: Node;\n\n /**\n * Tracks diameters of existing instances to de-dupe generated styles (default d = 100).\n * We need to keep track of which elements the diameters were attached to, because for\n * elements in the Shadow DOM the style tags are attached to the shadow root, rather\n * than the document head.\n */\n private static _diameters = new WeakMap<Node, Set<number>>();\n\n /** Whether the _mat-animation-noopable class should be applied, disabling animations. */\n _noopAnimations: boolean;\n\n /** A string that is used for setting the spinner animation-name CSS property */\n _spinnerAnimationLabel: string;\n\n /** The diameter of the progress spinner (will set width and height of svg). */\n @Input()\n get diameter(): number {\n return this._diameter;\n }\n set diameter(size: NumberInput) {\n this._diameter = coerceNumberProperty(size);\n this._spinnerAnimationLabel = this._getSpinnerAnimationLabel();\n\n // If this is set before `ngOnInit`, the style root may not have been resolved yet.\n if (this._styleRoot) {\n this._attachStyleNode();\n }\n }\n\n /** Stroke width of the progress spinner. */\n @Input()\n get strokeWidth(): number {\n return this._strokeWidth || this.diameter / 10;\n }\n set strokeWidth(value: NumberInput) {\n this._strokeWidth = coerceNumberProperty(value);\n }\n\n /** Mode of the progress circle */\n @Input() mode: ProgressSpinnerMode = 'determinate';\n\n /** Value of the progress circle. */\n @Input()\n get value(): number {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(newValue: NumberInput) {\n this._value = Math.max(0, Math.min(100, coerceNumberProperty(newValue)));\n }\n\n constructor(\n elementRef: ElementRef<HTMLElement>,\n _platform: Platform,\n @Optional() @Inject(DOCUMENT) private _document: any,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode: string,\n @Inject(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS)\n defaults?: MatProgressSpinnerDefaultOptions,\n /**\n * @deprecated `changeDetectorRef`, `viewportRuler` and `ngZone`\n * parameters to become required.\n * @breaking-change 14.0.0\n */\n changeDetectorRef?: ChangeDetectorRef,\n viewportRuler?: ViewportRuler,\n ngZone?: NgZone,\n ) {\n super(elementRef);\n\n const trackedDiameters = MatProgressSpinner._diameters;\n this._spinnerAnimationLabel = this._getSpinnerAnimationLabel();\n\n // The base size is already inserted via the component's structural styles. We still\n // need to track it so we don't end up adding the same styles again.\n if (!trackedDiameters.has(_document.head)) {\n trackedDiameters.set(_document.head, new Set<number>([BASE_SIZE]));\n }\n\n this._noopAnimations =\n animationMode === 'NoopAnimations' && !!defaults && !defaults._forceAnimations;\n\n if (elementRef.nativeElement.nodeName.toLowerCase() === 'mat-spinner') {\n this.mode = 'indeterminate';\n }\n\n if (defaults) {\n if (defaults.color) {\n this.color = this.defaultColor = defaults.color;\n }\n\n if (defaults.diameter) {\n this.diameter = defaults.diameter;\n }\n\n if (defaults.strokeWidth) {\n this.strokeWidth = defaults.strokeWidth;\n }\n }\n\n // Safari has an issue where the circle isn't positioned correctly when the page has a\n // different zoom level from the default. This handler triggers a recalculation of the\n // `transform-origin` when the page zoom level changes.\n // See `_getCircleTransformOrigin` for more info.\n // @breaking-change 14.0.0 Remove null checks for `_changeDetectorRef`,\n // `viewportRuler` and `ngZone`.\n if (_platform.isBrowser && _platform.SAFARI && viewportRuler && changeDetectorRef && ngZone) {\n this._resizeSubscription = viewportRuler.change(150).subscribe(() => {\n // When the window is resize while the spinner is in `indeterminate` mode, we\n // have to mark for check so the transform origin of the circle can be recomputed.\n if (this.mode === 'indeterminate') {\n ngZone.run(() => changeDetectorRef.markForCheck());\n }\n });\n }\n }\n\n ngOnInit() {\n const element = this._elementRef.nativeElement;\n\n // Note that we need to look up the root node in ngOnInit, rather than the constructor, because\n // Angular seems to create the element outside the shadow root and then moves it inside, if the\n // node is inside an `ngIf` and a ShadowDom-encapsulated component.\n this._styleRoot = _getShadowRoot(element) || this._document.head;\n this._attachStyleNode();\n element.classList.add('mat-progress-spinner-indeterminate-animation');\n }\n\n ngOnDestroy() {\n this._resizeSubscription.unsubscribe();\n }\n\n /** The radius of the spinner, adjusted for stroke width. */\n _getCircleRadius() {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n\n /** The view box of the spinner's svg element. */\n _getViewBox() {\n const viewBox = this._getCircleRadius() * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n\n /** The stroke circumference of the svg circle. */\n _getStrokeCircumference(): number {\n return 2 * Math.PI * this._getCircleRadius();\n }\n\n /** The dash offset of the svg circle. */\n _getStrokeDashOffset() {\n if (this.mode === 'determinate') {\n return (this._getStrokeCircumference() * (100 - this._value)) / 100;\n }\n\n return null;\n }\n\n /** Stroke width of the circle in percent. */\n _getCircleStrokeWidth() {\n return (this.strokeWidth / this.diameter) * 100;\n }\n\n /** Gets the `transform-origin` for the inner circle element. */\n _getCircleTransformOrigin(svg: HTMLElement): string {\n // Safari has an issue where the `transform-origin` doesn't work as expected when the page\n // has a different zoom level from the default. The problem appears to be that a zoom\n // is applied on the `svg` node itself. We can work around it by calculating the origin\n // based on the zoom level. On all other browsers the `currentScale` appears to always be 1.\n const scale = ((svg as unknown as SVGSVGElement).currentScale ?? 1) * 50;\n return `${scale}% ${scale}%`;\n }\n\n /** Dynamically generates a style tag containing the correct animation for this diameter. */\n private _attachStyleNode(): void {\n const styleRoot = this._styleRoot;\n const currentDiameter = this._diameter;\n const diameters = MatProgressSpinner._diameters;\n let diametersForElement = diameters.get(styleRoot);\n\n if (!diametersForElement || !diametersForElement.has(currentDiameter)) {\n const styleTag: HTMLStyleElement = this._document.createElement('style');\n styleTag.setAttribute('mat-spinner-animation', this._spinnerAnimationLabel);\n styleTag.textContent = this._getAnimationText();\n styleRoot.appendChild(styleTag);\n\n if (!diametersForElement) {\n diametersForElement = new Set<number>();\n diameters.set(styleRoot, diametersForElement);\n }\n\n diametersForElement.add(currentDiameter);\n }\n }\n\n /** Generates animation styles adjusted for the spinner's diameter. */\n private _getAnimationText(): string {\n const strokeCircumference = this._getStrokeCircumference();\n return (\n INDETERMINATE_ANIMATION_TEMPLATE\n // Animation should begin at 5% and end at 80%\n .replace(/START_VALUE/g, `${0.95 * strokeCircumference}`)\n .replace(/END_VALUE/g, `${0.2 * strokeCircumference}`)\n .replace(/DIAMETER/g, `${this._spinnerAnimationLabel}`)\n );\n }\n\n /** Returns the circle diameter formatted for use with the animation-name CSS property. */\n private _getSpinnerAnimationLabel(): string {\n // The string of a float point number will include a period ‘.’ character,\n // which is not valid for a CSS animation-name.\n return this.diameter.toString().replace('.', '_');\n }\n}\n","<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatProgressSpinner} from './progress-spinner';\n\n@NgModule({\n imports: [MatCommonModule, CommonModule],\n exports: [MatProgressSpinner, MatCommonModule],\n declarations: [MatProgressSpinner],\n})\nexport class MatProgressSpinnerModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MatProgressSpinner} from './progress-spinner';\n\nexport * from './progress-spinner-module';\nexport {\n MatProgressSpinner,\n MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS,\n ProgressSpinnerMode,\n MatProgressSpinnerDefaultOptions,\n MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,\n} from './progress-spinner';\n\n/**\n * @deprecated Import `MatProgressSpinner` instead. Note that the\n * `mat-spinner` selector isn't deprecated.\n * @breaking-change 8.0.0\n */\n// tslint:disable-next-line:variable-name\nexport const MatSpinner = MatProgressSpinner;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;AAMG;AA2BH;;;AAGG;AACH,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB;;;AAGG;AACH,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B;AACA;AACA,MAAM,uBAAuB,GAAG,UAAU,CACxC,MAAA;AACE,IAAA,WAAA,CAAmB,WAAuB,EAAA;AAAvB,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;KAAI;CAC/C,EACD,SAAS,CACV,CAAC;AAiBF;MACa,oCAAoC,GAC/C,IAAI,cAAc,CAAmC,sCAAsC,EAAE;AAC3F,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,4CAA4C;AACtD,CAAA,EAAE;AAEL;SACgB,4CAA4C,GAAA;AAC1D,IAAA,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,CAAC;AAC/B,CAAC;AAED;AACA;AACA;AACA;AACA,MAAM,gCAAgC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;CAsBxC,CAAC;AAEF;;AAEG;AAyBG,MAAO,kBACX,SAAQ,uBAAuB,CAAA;IAiE/B,WACE,CAAA,UAAmC,EACnC,SAAmB,EACmB,SAAc,EACT,aAAqB,EAEhE,QAA2C;AAC3C;;;;AAIG;IACH,iBAAqC,EACrC,aAA6B,EAC7B,MAAe,EAAA;QAEf,KAAK,CAAC,UAAU,CAAC,CAAC;AAboB,QAAA,IAA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BAgBF,WAAW,EAAA,CAAA;sBADd,KAAK;gBASG,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBAIF,KAAK,EAAA,CAAA;sBADR,KAAK;;;AElMR;;;;;;AAMG;MAWU,wBAAwB,CAAA;;4HAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6HAAxB,wBAAwB,EAAA,YAAA,EAAA,CAFpB,kBAAkB,CAFvB,EAAA,OAAA,EAAA,CAAA,eAAe,EAAE,YAAY,CAAA,EAAA,OAAA,EAAA,CAC7B,kBAAkB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;AAGlC,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,YAJ1B,CAAC,eAAe,EAAE,YAAY,CAAC,EACV,eAAe,CAAA,EAAA,CAAA,CAAA;kGAGlC,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,eAAe,EAAE,YAAY,CAAC;AACxC,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,CAAC;oBAC9C,YAAY,EAAE,CAAC,kBAAkB,CAAC;iBACnC,CAAA;;;AChBD;;;;;;AAMG;AAaH;;;;AAIG;AACH;AACO,MAAM,UAAU,GAAG;;ACzB1B;;;;;;AAMG;;ACNH;;AAEG;;;;"}
|
|
@@ -257,7 +257,8 @@ class MatRadioButtonHarness extends _MatRadioButtonHarnessBase {
|
|
|
257
257
|
static with(options = {}) {
|
|
258
258
|
return new HarnessPredicate(MatRadioButtonHarness, options)
|
|
259
259
|
.addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabelText(), label))
|
|
260
|
-
.addOption('name', options.name, (harness, name) => __awaiter(this, void 0, void 0, function* () { return (yield harness.getName()) === name; }))
|
|
260
|
+
.addOption('name', options.name, (harness, name) => __awaiter(this, void 0, void 0, function* () { return (yield harness.getName()) === name; }))
|
|
261
|
+
.addOption('checked', options.checked, (harness, checked) => __awaiter(this, void 0, void 0, function* () { return (yield harness.isChecked()) == checked; }));
|
|
261
262
|
}
|
|
262
263
|
}
|
|
263
264
|
/** The selector for the host element of a `MatRadioButton` instance. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/radio/testing/radio-harness.ts","../../../../../../../src/material/radio/testing/public-api.ts","../../../../../../../src/material/radio/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n AsyncFactoryFn,\n BaseHarnessFilters,\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {RadioButtonHarnessFilters, RadioGroupHarnessFilters} from './radio-harness-filters';\n\nexport abstract class _MatRadioGroupHarnessBase<\n ButtonType extends ComponentHarnessConstructor<Button> & {\n with: (options?: ButtonFilters) => HarnessPredicate<Button>;\n },\n Button extends ComponentHarness & {\n isChecked(): Promise<boolean>;\n getValue(): Promise<string | null>;\n getName(): Promise<string | null>;\n check(): Promise<void>;\n },\n ButtonFilters extends BaseHarnessFilters,\n> extends ComponentHarness {\n protected abstract _buttonClass: ButtonType;\n\n /** Gets the name of the radio-group. */\n async getName(): Promise<string | null> {\n const hostName = await this._getGroupNameFromHost();\n // It's not possible to always determine the \"name\" of a radio-group by reading\n // the attribute. This is because the radio-group does not set the \"name\" as an\n // element attribute if the \"name\" value is set through a binding.\n if (hostName !== null) {\n return hostName;\n }\n // In case we couldn't determine the \"name\" of a radio-group by reading the\n // \"name\" attribute, we try to determine the \"name\" of the group by going\n // through all radio buttons.\n const radioNames = await this._getNamesFromRadioButtons();\n if (!radioNames.length) {\n return null;\n }\n if (!this._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error('Radio buttons in radio-group have mismatching names.');\n }\n return radioNames[0]!;\n }\n\n /** Gets the id of the radio-group. */\n async getId(): Promise<string | null> {\n return (await this.host()).getProperty<string | null>('id');\n }\n\n /** Gets the checked radio-button in a radio-group. */\n async getCheckedRadioButton(): Promise<Button | null> {\n for (let radioButton of await this.getRadioButtons()) {\n if (await radioButton.isChecked()) {\n return radioButton;\n }\n }\n return null;\n }\n\n /** Gets the checked value of the radio-group. */\n async getCheckedValue(): Promise<string | null> {\n const checkedRadio = await this.getCheckedRadioButton();\n if (!checkedRadio) {\n return null;\n }\n return checkedRadio.getValue();\n }\n\n /**\n * Gets a list of radio buttons which are part of the radio-group.\n * @param filter Optionally filters which radio buttons are included.\n */\n async getRadioButtons(filter?: ButtonFilters): Promise<Button[]> {\n return this.locatorForAll(this._buttonClass.with(filter))();\n }\n\n /**\n * Checks a radio button in this group.\n * @param filter An optional filter to apply to the child radio buttons. The first tab matching\n * the filter will be selected.\n */\n async checkRadioButton(filter?: ButtonFilters): Promise<void> {\n const radioButtons = await this.getRadioButtons(filter);\n if (!radioButtons.length) {\n throw Error(`Could not find radio button matching ${JSON.stringify(filter)}`);\n }\n return radioButtons[0].check();\n }\n\n /** Gets the name attribute of the host element. */\n private async _getGroupNameFromHost() {\n return (await this.host()).getAttribute('name');\n }\n\n /** Gets a list of the name attributes of all child radio buttons. */\n private async _getNamesFromRadioButtons(): Promise<string[]> {\n const groupNames: string[] = [];\n for (let radio of await this.getRadioButtons()) {\n const radioName = await radio.getName();\n if (radioName !== null) {\n groupNames.push(radioName);\n }\n }\n return groupNames;\n }\n\n /** Checks if the specified radio names are all equal. */\n private _checkRadioNamesInGroupEqual(radioNames: string[]): boolean {\n let groupName: string | null = null;\n for (let radioName of radioNames) {\n if (groupName === null) {\n groupName = radioName;\n } else if (groupName !== radioName) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Checks if a radio-group harness has the given name. Throws if a radio-group with\n * matching name could be found but has mismatching radio-button names.\n */\n protected static async _checkRadioGroupName(\n harness: _MatRadioGroupHarnessBase<any, any, any>,\n name: string,\n ) {\n // Check if there is a radio-group which has the \"name\" attribute set\n // to the expected group name. It's not possible to always determine\n // the \"name\" of a radio-group by reading the attribute. This is because\n // the radio-group does not set the \"name\" as an element attribute if the\n // \"name\" value is set through a binding.\n if ((await harness._getGroupNameFromHost()) === name) {\n return true;\n }\n // Check if there is a group with radio-buttons that all have the same\n // expected name. This implies that the group has the given name. It's\n // not possible to always determine the name of a radio-group through\n // the attribute because there is\n const radioNames = await harness._getNamesFromRadioButtons();\n if (radioNames.indexOf(name) === -1) {\n return false;\n }\n if (!harness._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error(\n `The locator found a radio-group with name \"${name}\", but some ` +\n `radio-button's within the group have mismatching names, which is invalid.`,\n );\n }\n return true;\n }\n}\n\n/** Harness for interacting with a standard mat-radio-group in tests. */\nexport class MatRadioGroupHarness extends _MatRadioGroupHarnessBase<\n typeof MatRadioButtonHarness,\n MatRadioButtonHarness,\n RadioButtonHarnessFilters\n> {\n /** The selector for the host element of a `MatRadioGroup` instance. */\n static hostSelector = '.mat-radio-group';\n protected _buttonClass = MatRadioButtonHarness;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatRadioGroupHarness` that meets\n * certain criteria.\n * @param options Options for filtering which radio group instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: RadioGroupHarnessFilters = {}): HarnessPredicate<MatRadioGroupHarness> {\n return new HarnessPredicate(MatRadioGroupHarness, options).addOption(\n 'name',\n options.name,\n this._checkRadioGroupName,\n );\n }\n}\n\nexport abstract class _MatRadioButtonHarnessBase extends ComponentHarness {\n protected abstract _textLabel: AsyncFactoryFn<TestElement>;\n protected abstract _clickLabel: AsyncFactoryFn<TestElement>;\n private _input = this.locatorFor('input');\n\n /** Whether the radio-button is checked. */\n async isChecked(): Promise<boolean> {\n const checked = (await this._input()).getProperty<boolean>('checked');\n return coerceBooleanProperty(await checked);\n }\n\n /** Whether the radio-button is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this._input()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Whether the radio-button is required. */\n async isRequired(): Promise<boolean> {\n const required = (await this._input()).getAttribute('required');\n return coerceBooleanProperty(await required);\n }\n\n /** Gets the radio-button's name. */\n async getName(): Promise<string | null> {\n return (await this._input()).getAttribute('name');\n }\n\n /** Gets the radio-button's id. */\n async getId(): Promise<string | null> {\n return (await this.host()).getProperty<string>('id');\n }\n\n /**\n * Gets the value of the radio-button. The radio-button value will be converted to a string.\n *\n * Note: This means that for radio-button's with an object as a value `[object Object]` is\n * intentionally returned.\n */\n async getValue(): Promise<string | null> {\n return (await this._input()).getProperty('value');\n }\n\n /** Gets the radio-button's label text. */\n async getLabelText(): Promise<string> {\n return (await this._textLabel()).text();\n }\n\n /** Focuses the radio-button. */\n async focus(): Promise<void> {\n return (await this._input()).focus();\n }\n\n /** Blurs the radio-button. */\n async blur(): Promise<void> {\n return (await this._input()).blur();\n }\n\n /** Whether the radio-button is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._input()).isFocused();\n }\n\n /**\n * Puts the radio-button in a checked state by clicking it if it is currently unchecked,\n * or doing nothing if it is already checked.\n */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n return (await this._clickLabel()).click();\n }\n }\n}\n\n/** Harness for interacting with a standard mat-radio-button in tests. */\nexport class MatRadioButtonHarness extends _MatRadioButtonHarnessBase {\n /** The selector for the host element of a `MatRadioButton` instance. */\n static hostSelector = '.mat-radio-button';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatRadioButtonHarness` that meets\n * certain criteria.\n * @param options Options for filtering which radio button instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: RadioButtonHarnessFilters = {}): HarnessPredicate<MatRadioButtonHarness> {\n return new HarnessPredicate(MatRadioButtonHarness, options)\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getLabelText(), label),\n )\n .addOption('name', options.name, async (harness, name) => (await harness.getName()) === name);\n }\n\n protected _textLabel = this.locatorFor('.mat-radio-label-content');\n protected _clickLabel = this.locatorFor('.mat-radio-label');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './radio-harness';\nexport * from './radio-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAmBM,MAAgB,yBAWpB,SAAQ,gBAAgB,CAAA;;IAIlB,OAAO,GAAA;;AACX,YAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,EAAE,CAAC;;;;YAIpD,IAAI,QAAQ,KAAK,IAAI,EAAE;AACrB,gBAAA,OAAO,QAAQ,CAAC;AACjB,aAAA;;;;AAID,YAAA,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,yBAAyB,EAAE,CAAC;AAC1D,YAAA,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;AACtB,gBAAA,OAAO,IAAI,CAAC;AACb,aAAA;AACD,YAAA,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,EAAE;AAClD,gBAAA,MAAM,KAAK,CAAC,sDAAsD,CAAC,CAAC;AACrE,aAAA;AACD,YAAA,OAAO,UAAU,CAAC,CAAC,CAAE,CAAC;SACvB,CAAA,CAAA;AAAA,KAAA;;IAGK,KAAK,GAAA;;AACT,YAAA,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW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AAA;AAAA,KAAA;AACF,CAAA;AAED;AACM,MAAO,qBAAsB,SAAQ,0BAA0B,CAAA;AAArE,IAAA,WAAA,GAAA;;QAkBY,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;QACzD,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;KAC7D;AAhBC;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAAC,OAAA,GAAqC,EAAE,EAAA;AACjD,QAAA,OAAO,IAAI,gBAAgB,CAAC,qBAAqB,EAAE,OAAO,CAAC;aACxD,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KAChD,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAC9D;aACA,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAO,OAAO,EAAE,IAAI,KAAK,SAAA,CAAA,IAAA,EAAA,KAAA,CAAA,EAAA,KAAA,CAAA,EAAA,aAAA,EAAA,OAAA,CAAC,MAAM,OAAO,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA,EAAA,CAAA,CAAC,CAAC;KACjG;;AAfD;AACO,qBAAY,CAAA,YAAA,GAAG,mBAAmB;;AC1Q3C;;;;;;AAMG;;ACNH;;;;;;AAMG;;;;"}
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/radio/testing/radio-harness.ts","../../../../../../../src/material/radio/testing/public-api.ts","../../../../../../../src/material/radio/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n AsyncFactoryFn,\n BaseHarnessFilters,\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {RadioButtonHarnessFilters, RadioGroupHarnessFilters} from './radio-harness-filters';\n\nexport abstract class _MatRadioGroupHarnessBase<\n ButtonType extends ComponentHarnessConstructor<Button> & {\n with: (options?: ButtonFilters) => HarnessPredicate<Button>;\n },\n Button extends ComponentHarness & {\n isChecked(): Promise<boolean>;\n getValue(): Promise<string | null>;\n getName(): Promise<string | null>;\n check(): Promise<void>;\n },\n ButtonFilters extends BaseHarnessFilters,\n> extends ComponentHarness {\n protected abstract _buttonClass: ButtonType;\n\n /** Gets the name of the radio-group. */\n async getName(): Promise<string | null> {\n const hostName = await this._getGroupNameFromHost();\n // It's not possible to always determine the \"name\" of a radio-group by reading\n // the attribute. This is because the radio-group does not set the \"name\" as an\n // element attribute if the \"name\" value is set through a binding.\n if (hostName !== null) {\n return hostName;\n }\n // In case we couldn't determine the \"name\" of a radio-group by reading the\n // \"name\" attribute, we try to determine the \"name\" of the group by going\n // through all radio buttons.\n const radioNames = await this._getNamesFromRadioButtons();\n if (!radioNames.length) {\n return null;\n }\n if (!this._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error('Radio buttons in radio-group have mismatching names.');\n }\n return radioNames[0]!;\n }\n\n /** Gets the id of the radio-group. */\n async getId(): Promise<string | null> {\n return (await this.host()).getProperty<string | null>('id');\n }\n\n /** Gets the checked radio-button in a radio-group. */\n async getCheckedRadioButton(): Promise<Button | null> {\n for (let radioButton of await this.getRadioButtons()) {\n if (await radioButton.isChecked()) {\n return radioButton;\n }\n }\n return null;\n }\n\n /** Gets the checked value of the radio-group. */\n async getCheckedValue(): Promise<string | null> {\n const checkedRadio = await this.getCheckedRadioButton();\n if (!checkedRadio) {\n return null;\n }\n return checkedRadio.getValue();\n }\n\n /**\n * Gets a list of radio buttons which are part of the radio-group.\n * @param filter Optionally filters which radio buttons are included.\n */\n async getRadioButtons(filter?: ButtonFilters): Promise<Button[]> {\n return this.locatorForAll(this._buttonClass.with(filter))();\n }\n\n /**\n * Checks a radio button in this group.\n * @param filter An optional filter to apply to the child radio buttons. The first tab matching\n * the filter will be selected.\n */\n async checkRadioButton(filter?: ButtonFilters): Promise<void> {\n const radioButtons = await this.getRadioButtons(filter);\n if (!radioButtons.length) {\n throw Error(`Could not find radio button matching ${JSON.stringify(filter)}`);\n }\n return radioButtons[0].check();\n }\n\n /** Gets the name attribute of the host element. */\n private async _getGroupNameFromHost() {\n return (await this.host()).getAttribute('name');\n }\n\n /** Gets a list of the name attributes of all child radio buttons. */\n private async _getNamesFromRadioButtons(): Promise<string[]> {\n const groupNames: string[] = [];\n for (let radio of await this.getRadioButtons()) {\n const radioName = await radio.getName();\n if (radioName !== null) {\n groupNames.push(radioName);\n }\n }\n return groupNames;\n }\n\n /** Checks if the specified radio names are all equal. */\n private _checkRadioNamesInGroupEqual(radioNames: string[]): boolean {\n let groupName: string | null = null;\n for (let radioName of radioNames) {\n if (groupName === null) {\n groupName = radioName;\n } else if (groupName !== radioName) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Checks if a radio-group harness has the given name. Throws if a radio-group with\n * matching name could be found but has mismatching radio-button names.\n */\n protected static async _checkRadioGroupName(\n harness: _MatRadioGroupHarnessBase<any, any, any>,\n name: string,\n ) {\n // Check if there is a radio-group which has the \"name\" attribute set\n // to the expected group name. It's not possible to always determine\n // the \"name\" of a radio-group by reading the attribute. This is because\n // the radio-group does not set the \"name\" as an element attribute if the\n // \"name\" value is set through a binding.\n if ((await harness._getGroupNameFromHost()) === name) {\n return true;\n }\n // Check if there is a group with radio-buttons that all have the same\n // expected name. This implies that the group has the given name. It's\n // not possible to always determine the name of a radio-group through\n // the attribute because there is\n const radioNames = await harness._getNamesFromRadioButtons();\n if (radioNames.indexOf(name) === -1) {\n return false;\n }\n if (!harness._checkRadioNamesInGroupEqual(radioNames)) {\n throw Error(\n `The locator found a radio-group with name \"${name}\", but some ` +\n `radio-button's within the group have mismatching names, which is invalid.`,\n );\n }\n return true;\n }\n}\n\n/** Harness for interacting with a standard mat-radio-group in tests. */\nexport class MatRadioGroupHarness extends _MatRadioGroupHarnessBase<\n typeof MatRadioButtonHarness,\n MatRadioButtonHarness,\n RadioButtonHarnessFilters\n> {\n /** The selector for the host element of a `MatRadioGroup` instance. */\n static hostSelector = '.mat-radio-group';\n protected _buttonClass = MatRadioButtonHarness;\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatRadioGroupHarness` that meets\n * certain criteria.\n * @param options Options for filtering which radio group instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: RadioGroupHarnessFilters = {}): HarnessPredicate<MatRadioGroupHarness> {\n return new HarnessPredicate(MatRadioGroupHarness, options).addOption(\n 'name',\n options.name,\n this._checkRadioGroupName,\n );\n }\n}\n\nexport abstract class _MatRadioButtonHarnessBase extends ComponentHarness {\n protected abstract _textLabel: AsyncFactoryFn<TestElement>;\n protected abstract _clickLabel: AsyncFactoryFn<TestElement>;\n private _input = this.locatorFor('input');\n\n /** Whether the radio-button is checked. */\n async isChecked(): Promise<boolean> {\n const checked = (await this._input()).getProperty<boolean>('checked');\n return coerceBooleanProperty(await checked);\n }\n\n /** Whether the radio-button is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this._input()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Whether the radio-button is required. */\n async isRequired(): Promise<boolean> {\n const required = (await this._input()).getAttribute('required');\n return coerceBooleanProperty(await required);\n }\n\n /** Gets the radio-button's name. */\n async getName(): Promise<string | null> {\n return (await this._input()).getAttribute('name');\n }\n\n /** Gets the radio-button's id. */\n async getId(): Promise<string | null> {\n return (await this.host()).getProperty<string>('id');\n }\n\n /**\n * Gets the value of the radio-button. The radio-button value will be converted to a string.\n *\n * Note: This means that for radio-button's with an object as a value `[object Object]` is\n * intentionally returned.\n */\n async getValue(): Promise<string | null> {\n return (await this._input()).getProperty('value');\n }\n\n /** Gets the radio-button's label text. */\n async getLabelText(): Promise<string> {\n return (await this._textLabel()).text();\n }\n\n /** Focuses the radio-button. */\n async focus(): Promise<void> {\n return (await this._input()).focus();\n }\n\n /** Blurs the radio-button. */\n async blur(): Promise<void> {\n return (await this._input()).blur();\n }\n\n /** Whether the radio-button is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._input()).isFocused();\n }\n\n /**\n * Puts the radio-button in a checked state by clicking it if it is currently unchecked,\n * or doing nothing if it is already checked.\n */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n return (await this._clickLabel()).click();\n }\n }\n}\n\n/** Harness for interacting with a standard mat-radio-button in tests. */\nexport class MatRadioButtonHarness extends _MatRadioButtonHarnessBase {\n /** The selector for the host element of a `MatRadioButton` instance. */\n static hostSelector = '.mat-radio-button';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatRadioButtonHarness` that meets\n * certain criteria.\n * @param options Options for filtering which radio button instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: RadioButtonHarnessFilters = {}): HarnessPredicate<MatRadioButtonHarness> {\n return new HarnessPredicate(MatRadioButtonHarness, options)\n .addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getLabelText(), label),\n )\n .addOption('name', options.name, async (harness, name) => (await harness.getName()) === name)\n .addOption(\n 'checked',\n options.checked,\n async (harness, checked) => (await harness.isChecked()) == checked,\n );\n }\n\n protected _textLabel = this.locatorFor('.mat-radio-label-content');\n protected _clickLabel = this.locatorFor('.mat-radio-label');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './radio-harness';\nexport * from './radio-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAmBM,MAAgB,yBAWpB,SAAQ,gBAAgB,CAAA;;IAI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CAAO,OAAO,EAAE,IAAI,oDAAK,OAAA,CAAC,MAAM,OAAO,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA,EAAA,CAAA,CAAC;aAC5F,SAAS,CACR,SAAS,EACT,OAAO,CAAC,OAAO,EACf,CAAO,OAAO,EAAE,OAAO,KAAK,SAAA,CAAA,IAAA,EAAA,KAAA,CAAA,EAAA,KAAA,CAAA,EAAA,aAAA,EAAA,OAAA,CAAC,MAAM,OAAO,CAAC,SAAS,EAAE,KAAK,OAAO,CAAA,EAAA,CAAA,CACnE,CAAC;KACL;;AApBD;AACO,qBAAY,CAAA,YAAA,GAAG,mBAAmB;;AC1Q3C;;;;;;AAMG;;ACNH;;;;;;AAMG;;;;"}
|
package/fesm2015/radio.mjs
CHANGED
|
@@ -232,9 +232,9 @@ class _MatRadioGroupBase {
|
|
|
232
232
|
this._changeDetector.markForCheck();
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
_MatRadioGroupBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
236
|
-
_MatRadioGroupBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
235
|
+
_MatRadioGroupBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: _MatRadioGroupBase, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
236
|
+
_MatRadioGroupBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.9", type: _MatRadioGroupBase, inputs: { color: "color", name: "name", labelPosition: "labelPosition", value: "value", selected: "selected", disabled: "disabled", required: "required" }, outputs: { change: "change" }, ngImport: i0 });
|
|
237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: _MatRadioGroupBase, decorators: [{
|
|
238
238
|
type: Directive
|
|
239
239
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { change: [{
|
|
240
240
|
type: Output
|
|
@@ -258,12 +258,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
258
258
|
*/
|
|
259
259
|
class MatRadioGroup extends _MatRadioGroupBase {
|
|
260
260
|
}
|
|
261
|
-
MatRadioGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
262
|
-
MatRadioGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
261
|
+
MatRadioGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatRadioGroup, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
262
|
+
MatRadioGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.9", type: MatRadioGroup, selector: "mat-radio-group", host: { attributes: { "role": "radiogroup" }, classAttribute: "mat-radio-group" }, providers: [
|
|
263
263
|
MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,
|
|
264
264
|
{ provide: MAT_RADIO_GROUP, useExisting: MatRadioGroup },
|
|
265
265
|
], queries: [{ propertyName: "_radios", predicate: i0.forwardRef(function () { return MatRadioButton; }), descendants: true }], exportAs: ["matRadioGroup"], usesInheritance: true, ngImport: i0 });
|
|
266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatRadioGroup, decorators: [{
|
|
267
267
|
type: Directive,
|
|
268
268
|
args: [{
|
|
269
269
|
selector: 'mat-radio-group',
|
|
@@ -519,9 +519,9 @@ class _MatRadioButtonBase extends _MatRadioButtonMixinBase {
|
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
|
-
_MatRadioButtonBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
523
|
-
_MatRadioButtonBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
522
|
+
_MatRadioButtonBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: _MatRadioButtonBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
523
|
+
_MatRadioButtonBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.9", type: _MatRadioButtonBase, inputs: { id: "id", name: "name", ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], ariaDescribedby: ["aria-describedby", "ariaDescribedby"], checked: "checked", value: "value", labelPosition: "labelPosition", disabled: "disabled", required: "required", color: "color" }, outputs: { change: "change" }, viewQueries: [{ propertyName: "_inputElement", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0 });
|
|
524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: _MatRadioButtonBase, decorators: [{
|
|
525
525
|
type: Directive
|
|
526
526
|
}], ctorParameters: function () { return [{ type: _MatRadioGroupBase }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FocusMonitor }, { type: i2.UniqueSelectionDispatcher }, { type: undefined }, { type: undefined }, { type: undefined }]; }, propDecorators: { id: [{
|
|
527
527
|
type: Input
|
|
@@ -562,9 +562,9 @@ class MatRadioButton extends _MatRadioButtonBase {
|
|
|
562
562
|
super(radioGroup, elementRef, changeDetector, focusMonitor, radioDispatcher, animationMode, providerOverride, tabIndex);
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
MatRadioButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
566
|
-
MatRadioButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
567
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
565
|
+
MatRadioButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatRadioButton, deps: [{ token: MAT_RADIO_GROUP, optional: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusMonitor }, { token: i2.UniqueSelectionDispatcher }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: MAT_RADIO_DEFAULT_OPTIONS, optional: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
566
|
+
MatRadioButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "14.0.0-next.9", type: MatRadioButton, selector: "mat-radio-button", inputs: { disableRipple: "disableRipple", tabIndex: "tabIndex" }, host: { listeners: { "focus": "_inputElement.nativeElement.focus()" }, properties: { "class.mat-radio-checked": "checked", "class.mat-radio-disabled": "disabled", "class._mat-animation-noopable": "_noopAnimations", "class.mat-primary": "color === \"primary\"", "class.mat-accent": "color === \"accent\"", "class.mat-warn": "color === \"warn\"", "attr.tabindex": "null", "attr.id": "id", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" }, classAttribute: "mat-radio-button" }, exportAs: ["matRadioButton"], usesInheritance: true, ngImport: i0, template: "<!-- TODO(jelbourn): render the radio on either side of the content -->\n<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->\n<label [attr.for]=\"inputId\" class=\"mat-radio-label\" #label>\n <!-- The actual 'radio' part of the control. -->\n <span class=\"mat-radio-container\">\n <span class=\"mat-radio-outer-circle\"></span>\n <span class=\"mat-radio-inner-circle\"></span>\n <input #input class=\"mat-radio-input\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInputInteraction($event)\"\n (click)=\"_onInputClick($event)\">\n\n <!-- The ripple comes after the input so that we can target it with a CSS\n sibling selector when the input is focused. -->\n <span mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: _noopAnimations ? 0 : 150}\">\n\n <span class=\"mat-ripple-element mat-radio-persistent-ripple\"></span>\n </span>\n </span>\n\n <!-- The label content for radio control. -->\n <span class=\"mat-radio-label-content\" [class.mat-radio-label-before]=\"labelPosition == 'before'\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\"> </span>\n <ng-content></ng-content>\n </span>\n</label>\n", styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-radio-label{-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;opacity:0;transition:transform ease 280ms,background-color ease 280ms,opacity linear 1ms 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5);opacity:1;transition:transform ease 280ms,background-color ease 280ms}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-label-content{-webkit-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{opacity:0;position:absolute;top:0;left:0;margin:0;width:100%;height:100%;cursor:inherit;z-index:-1}.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-ripple,.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-ripple{outline:solid 3px}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}"], directives: [{ type: i3.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
567
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatRadioButton, decorators: [{
|
|
568
568
|
type: Component,
|
|
569
569
|
args: [{ selector: 'mat-radio-button', inputs: ['disableRipple', 'tabIndex'], encapsulation: ViewEncapsulation.None, exportAs: 'matRadioButton', host: {
|
|
570
570
|
'class': 'mat-radio-button',
|
|
@@ -584,7 +584,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
584
584
|
// programmatically set, for example inside of a focus trap, in this case we want to forward
|
|
585
585
|
// the focus to the native element.
|
|
586
586
|
'(focus)': '_inputElement.nativeElement.focus()',
|
|
587
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- TODO(jelbourn): render the radio on either side of the content -->\n<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->\n<label [attr.for]=\"inputId\" class=\"mat-radio-label\" #label>\n <!-- The actual 'radio' part of the control. -->\n <span class=\"mat-radio-container\">\n <span class=\"mat-radio-outer-circle\"></span>\n <span class=\"mat-radio-inner-circle\"></span>\n <input #input class=\"mat-radio-input\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInputInteraction($event)\"\n (click)=\"_onInputClick($event)\">\n\n <!-- The ripple comes after the input so that we can target it with a CSS\n sibling selector when the input is focused. -->\n <span mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: _noopAnimations ? 0 : 150}\">\n\n <span class=\"mat-ripple-element mat-radio-persistent-ripple\"></span>\n </span>\n </span>\n\n <!-- The label content for radio control. -->\n <span class=\"mat-radio-label-content\" [class.mat-radio-label-before]=\"labelPosition == 'before'\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\"> </span>\n <ng-content></ng-content>\n </span>\n</label>\n", styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:
|
|
587
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- TODO(jelbourn): render the radio on either side of the content -->\n<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->\n<label [attr.for]=\"inputId\" class=\"mat-radio-label\" #label>\n <!-- The actual 'radio' part of the control. -->\n <span class=\"mat-radio-container\">\n <span class=\"mat-radio-outer-circle\"></span>\n <span class=\"mat-radio-inner-circle\"></span>\n <input #input class=\"mat-radio-input\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInputInteraction($event)\"\n (click)=\"_onInputClick($event)\">\n\n <!-- The ripple comes after the input so that we can target it with a CSS\n sibling selector when the input is focused. -->\n <span mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: _noopAnimations ? 0 : 150}\">\n\n <span class=\"mat-ripple-element mat-radio-persistent-ripple\"></span>\n </span>\n </span>\n\n <!-- The label content for radio control. -->\n <span class=\"mat-radio-label-content\" [class.mat-radio-label-before]=\"labelPosition == 'before'\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\"> </span>\n <ng-content></ng-content>\n </span>\n</label>\n", styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-radio-label{-webkit-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;opacity:0;transition:transform ease 280ms,background-color ease 280ms,opacity linear 1ms 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5);opacity:1;transition:transform ease 280ms,background-color ease 280ms}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-label-content{-webkit-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{opacity:0;position:absolute;top:0;left:0;margin:0;width:100%;height:100%;cursor:inherit;z-index:-1}.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-ripple,.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-ripple{outline:solid 3px}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}"] }]
|
|
588
588
|
}], ctorParameters: function () {
|
|
589
589
|
return [{ type: MatRadioGroup, decorators: [{
|
|
590
590
|
type: Optional
|
|
@@ -616,10 +616,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
|
|
|
616
616
|
*/
|
|
617
617
|
class MatRadioModule {
|
|
618
618
|
}
|
|
619
|
-
MatRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
620
|
-
MatRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
621
|
-
MatRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
622
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
619
|
+
MatRadioModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
620
|
+
MatRadioModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatRadioModule, declarations: [MatRadioGroup, MatRadioButton], imports: [MatRippleModule, MatCommonModule], exports: [MatRadioGroup, MatRadioButton, MatCommonModule] });
|
|
621
|
+
MatRadioModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatRadioModule, imports: [[MatRippleModule, MatCommonModule], MatCommonModule] });
|
|
622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: MatRadioModule, decorators: [{
|
|
623
623
|
type: NgModule,
|
|
624
624
|
args: [{
|
|
625
625
|
imports: [MatRippleModule, MatCommonModule],
|