@angular/material 10.0.0-rc.3 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_theming.scss +17 -17
- package/autocomplete/index.metadata.json +1 -1
- package/autocomplete/testing/autocomplete-harness.d.ts +2 -0
- package/bundles/material-autocomplete-testing.umd.js +11 -0
- package/bundles/material-autocomplete-testing.umd.js.map +1 -1
- package/bundles/material-autocomplete-testing.umd.min.js +2 -2
- package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
- package/bundles/material-autocomplete.umd.js +3 -1
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +5 -5
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-badge-testing.umd.min.js +1 -1
- package/bundles/material-badge-testing.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js +1 -1
- package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
- package/bundles/material-button-testing.umd.js +11 -0
- package/bundles/material-button-testing.umd.js.map +1 -1
- package/bundles/material-button-testing.umd.min.js +2 -2
- package/bundles/material-button-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.js +11 -0
- package/bundles/material-button-toggle-testing.umd.js.map +1 -1
- package/bundles/material-button-toggle-testing.umd.min.js +3 -3
- package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +12 -3
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.min.js +2 -2
- package/bundles/material-button-toggle.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +7 -2
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +4 -4
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card-testing.umd.js +335 -0
- package/bundles/material-card-testing.umd.js.map +1 -0
- package/bundles/material-card-testing.umd.min.js +44 -0
- package/bundles/material-card-testing.umd.min.js.map +1 -0
- package/bundles/material-checkbox-testing.umd.js +11 -0
- package/bundles/material-checkbox-testing.umd.js.map +1 -1
- package/bundles/material-checkbox-testing.umd.min.js +3 -3
- package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-chips.umd.js +36 -12
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-chips.umd.min.js +4 -4
- package/bundles/material-chips.umd.min.js.map +1 -1
- package/bundles/material-core-testing.umd.min.js +1 -1
- package/bundles/material-core-testing.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +11 -3
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +11 -11
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +20 -11
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +5 -5
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-dialog-testing.umd.min.js +1 -1
- package/bundles/material-dialog-testing.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +45 -8
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js +14 -7
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-divider-testing.umd.min.js +1 -1
- package/bundles/material-divider-testing.umd.min.js.map +1 -1
- package/bundles/material-expansion-testing.umd.js +11 -0
- package/bundles/material-expansion-testing.umd.js.map +1 -1
- package/bundles/material-expansion-testing.umd.min.js +3 -3
- package/bundles/material-expansion-testing.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing.umd.js +32 -0
- package/bundles/material-form-field-testing.umd.js.map +1 -1
- package/bundles/material-form-field-testing.umd.min.js +4 -4
- package/bundles/material-form-field-testing.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +47 -21
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +5 -5
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-grid-list-testing.umd.min.js +1 -1
- package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
- package/bundles/material-grid-list.umd.js +2 -2
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +2 -2
- package/bundles/material-grid-list.umd.min.js.map +1 -1
- package/bundles/material-input-testing.umd.js +23 -6
- package/bundles/material-input-testing.umd.js.map +1 -1
- package/bundles/material-input-testing.umd.min.js +3 -3
- package/bundles/material-input-testing.umd.min.js.map +1 -1
- package/bundles/material-input.umd.js +28 -3
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-input.umd.min.js +3 -3
- package/bundles/material-input.umd.min.js.map +1 -1
- package/bundles/material-list-testing.umd.js +33 -0
- package/bundles/material-list-testing.umd.js.map +1 -1
- package/bundles/material-list-testing.umd.min.js +2 -2
- package/bundles/material-list-testing.umd.min.js.map +1 -1
- package/bundles/material-list.umd.js +3 -3
- package/bundles/material-list.umd.min.js +1 -1
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu-testing.umd.js +22 -0
- package/bundles/material-menu-testing.umd.js.map +1 -1
- package/bundles/material-menu-testing.umd.min.js +2 -2
- package/bundles/material-menu-testing.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +13 -2
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +4 -4
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-paginator-testing.umd.min.js +1 -1
- package/bundles/material-paginator-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js +1 -1
- package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.js +1 -1
- package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
- package/bundles/material-progress-spinner-testing.umd.min.js +2 -2
- package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +2 -2
- package/bundles/material-progress-spinner.umd.min.js +3 -3
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio-testing.umd.js +11 -0
- package/bundles/material-radio-testing.umd.js.map +1 -1
- package/bundles/material-radio-testing.umd.min.js +3 -3
- package/bundles/material-radio-testing.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +15 -5
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +2 -2
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select-testing.umd.js +11 -0
- package/bundles/material-select-testing.umd.js.map +1 -1
- package/bundles/material-select-testing.umd.min.js +2 -2
- package/bundles/material-select-testing.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +11 -3
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +4 -4
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-sidenav-testing.umd.min.js +1 -1
- package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
- package/bundles/material-sidenav.umd.js +41 -17
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.min.js +2 -2
- package/bundles/material-sidenav.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.js +11 -0
- package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.min.js +2 -2
- package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slider-testing.umd.js +11 -0
- package/bundles/material-slider-testing.umd.js.map +1 -1
- package/bundles/material-slider-testing.umd.min.js +2 -2
- package/bundles/material-slider-testing.umd.min.js.map +1 -1
- package/bundles/material-snack-bar-testing.umd.min.js +1 -1
- package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +47 -39
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +2 -2
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-sort-testing.umd.js +10 -10
- package/bundles/material-sort-testing.umd.js.map +1 -1
- package/bundles/material-sort-testing.umd.min.js +3 -3
- package/bundles/material-sort-testing.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +25 -12
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +5 -5
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-table-testing.umd.min.js +1 -1
- package/bundles/material-table-testing.umd.min.js.map +1 -1
- package/bundles/material-table.umd.min.js +2 -2
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs-testing.umd.min.js +1 -1
- package/bundles/material-tabs-testing.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +23 -4
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +5 -12
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-toolbar-testing.umd.js +330 -0
- package/bundles/material-toolbar-testing.umd.js.map +1 -0
- package/bundles/material-toolbar-testing.umd.min.js +44 -0
- package/bundles/material-toolbar-testing.umd.min.js.map +1 -0
- package/bundles/material-tooltip-testing.umd.min.js +1 -1
- package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +14 -1
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js +3 -3
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js.map +1 -1
- package/button/_button-base.scss +1 -1
- package/button/_button-theme.scss +8 -8
- package/button/index.metadata.json +1 -1
- package/button/testing/button-harness.d.ts +2 -0
- package/button-toggle/button-toggle.d.ts +10 -3
- package/button-toggle/index.metadata.json +1 -1
- package/button-toggle/testing/button-toggle-harness.d.ts +2 -0
- package/card/testing/card-harness-filters.d.ts +17 -0
- package/card/testing/card-harness.d.ts +36 -0
- package/card/testing/index.d.ts +8 -0
- package/card/testing/package.json +9 -0
- package/card/testing/public-api.d.ts +9 -0
- package/checkbox/index.metadata.json +1 -1
- package/checkbox/testing/checkbox-harness.d.ts +2 -0
- package/chips/chip.d.ts +19 -1
- package/chips/index.metadata.json +1 -1
- package/core/focus-indicators/_focus-indicators.scss +6 -6
- package/core/index.metadata.json +1 -1
- package/core/option/optgroup.d.ts +7 -0
- package/core/ripple/ripple-ref.d.ts +21 -2
- package/core/ripple/ripple-renderer.d.ts +1 -19
- package/core/ripple/ripple.d.ts +2 -2
- package/core/style/_list-common.scss +1 -1
- package/datepicker/date-range-input-parts.d.ts +2 -4
- package/datepicker/date-range-input.d.ts +4 -4
- package/datepicker/date-range-picker.d.ts +10 -3
- package/datepicker/datepicker.d.ts +2 -3
- package/datepicker/index.metadata.json +1 -1
- package/datepicker/public-api.d.ts +1 -1
- package/dialog/dialog-container.d.ts +9 -2
- package/dialog/dialog-content-directives.d.ts +1 -0
- package/dialog/dialog-ref.d.ts +7 -0
- package/dialog/index.metadata.json +1 -1
- package/esm2015/autocomplete/autocomplete-module.js +18 -22
- package/esm2015/autocomplete/autocomplete-origin.js +16 -20
- package/esm2015/autocomplete/autocomplete-trigger.js +519 -521
- package/esm2015/autocomplete/autocomplete.js +126 -130
- package/esm2015/autocomplete/testing/autocomplete-harness.js +99 -97
- package/esm2015/badge/badge-module.js +13 -17
- package/esm2015/badge/badge.js +184 -188
- package/esm2015/badge/testing/badge-harness.js +74 -78
- package/esm2015/bottom-sheet/bottom-sheet-container.js +161 -165
- package/esm2015/bottom-sheet/bottom-sheet-module.js +15 -19
- package/esm2015/bottom-sheet/bottom-sheet.js +124 -128
- package/esm2015/bottom-sheet/testing/bottom-sheet-harness.js +29 -33
- package/esm2015/button/button-module.js +20 -24
- package/esm2015/button/button.js +111 -114
- package/esm2015/button/testing/button-harness.js +60 -58
- package/esm2015/button-toggle/button-toggle-module.js +10 -14
- package/esm2015/button-toggle/button-toggle.js +368 -368
- package/esm2015/button-toggle/testing/button-toggle-group-harness.js +42 -46
- package/esm2015/button-toggle/testing/button-toggle-harness.js +113 -111
- package/esm2015/card/card-module.js +30 -34
- package/esm2015/card/card.js +147 -203
- package/esm2015/card/testing/card-harness-filters.js +8 -0
- package/esm2015/card/testing/card-harness.js +52 -0
- package/esm2015/card/testing/index.js +9 -0
- package/esm2015/card/testing/public-api.js +10 -0
- package/esm2015/card/testing/testing.externs.js +0 -0
- package/esm2015/checkbox/checkbox-module.js +21 -29
- package/esm2015/checkbox/checkbox-required-validator.js +9 -13
- package/esm2015/checkbox/checkbox.js +315 -319
- package/esm2015/checkbox/testing/checkbox-harness.js +150 -148
- package/esm2015/chips/chip-input.js +119 -123
- package/esm2015/chips/chip-list.js +572 -576
- package/esm2015/chips/chip.js +333 -328
- package/esm2015/chips/chips-module.js +16 -20
- package/esm2015/core/animation/animation.js +12 -20
- package/esm2015/core/common-behaviors/common-module.js +91 -95
- package/esm2015/core/datetime/index.js +19 -27
- package/esm2015/core/datetime/native-date-adapter.js +202 -206
- package/esm2015/core/error/error-options.js +16 -24
- package/esm2015/core/line/line.js +18 -26
- package/esm2015/core/option/index.js +10 -14
- package/esm2015/core/option/optgroup.js +36 -33
- package/esm2015/core/option/option.js +181 -185
- package/esm2015/core/ripple/index.js +10 -14
- package/esm2015/core/ripple/ripple-ref.js +1 -1
- package/esm2015/core/ripple/ripple-renderer.js +1 -1
- package/esm2015/core/ripple/ripple.js +102 -106
- package/esm2015/core/selection/index.js +9 -13
- package/esm2015/core/selection/pseudo-checkbox/pseudo-checkbox.js +32 -36
- package/esm2015/core/testing/optgroup-harness.js +39 -43
- package/esm2015/core/testing/option-harness.js +51 -55
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/calendar-body.js +214 -218
- package/esm2015/datepicker/calendar.js +295 -303
- package/esm2015/datepicker/date-range-input-parts.js +214 -229
- package/esm2015/datepicker/date-range-input.js +244 -242
- package/esm2015/datepicker/date-range-picker.js +19 -23
- package/esm2015/datepicker/date-range-selection-strategy.js +31 -35
- package/esm2015/datepicker/date-selection-model.js +110 -122
- package/esm2015/datepicker/datepicker-base.js +418 -426
- package/esm2015/datepicker/datepicker-input-base.js +227 -224
- package/esm2015/datepicker/datepicker-input.js +111 -115
- package/esm2015/datepicker/datepicker-intl.js +37 -41
- package/esm2015/datepicker/datepicker-module.js +62 -66
- package/esm2015/datepicker/datepicker-toggle.js +81 -89
- package/esm2015/datepicker/datepicker.js +13 -17
- package/esm2015/datepicker/month-view.js +283 -287
- package/esm2015/datepicker/multi-year-view.js +198 -202
- package/esm2015/datepicker/public-api.js +2 -2
- package/esm2015/datepicker/year-view.js +220 -224
- package/esm2015/dialog/dialog-container.js +175 -164
- package/esm2015/dialog/dialog-content-directives.js +105 -114
- package/esm2015/dialog/dialog-module.js +32 -36
- package/esm2015/dialog/dialog-ref.js +17 -3
- package/esm2015/dialog/dialog.js +236 -240
- package/esm2015/dialog/testing/dialog-harness.js +58 -62
- package/esm2015/divider/divider-module.js +10 -14
- package/esm2015/divider/divider.js +33 -37
- package/esm2015/divider/testing/divider-harness.js +16 -20
- package/esm2015/expansion/accordion.js +73 -77
- package/esm2015/expansion/expansion-module.js +26 -30
- package/esm2015/expansion/expansion-panel-content.js +13 -17
- package/esm2015/expansion/expansion-panel-header.js +168 -180
- package/esm2015/expansion/expansion-panel.js +144 -152
- package/esm2015/expansion/testing/accordion-harness.js +24 -28
- package/esm2015/expansion/testing/expansion-harness.js +136 -134
- package/esm2015/form-field/error.js +26 -23
- package/esm2015/form-field/form-field-control.js +6 -10
- package/esm2015/form-field/form-field-module.js +31 -35
- package/esm2015/form-field/form-field.js +407 -409
- package/esm2015/form-field/hint.js +35 -29
- package/esm2015/form-field/label.js +8 -12
- package/esm2015/form-field/placeholder.js +8 -12
- package/esm2015/form-field/prefix.js +16 -13
- package/esm2015/form-field/suffix.js +16 -13
- package/esm2015/form-field/testing/form-field-harness.js +220 -206
- package/esm2015/grid-list/grid-list-module.js +26 -30
- package/esm2015/grid-list/grid-list.js +108 -112
- package/esm2015/grid-list/grid-tile.js +91 -111
- package/esm2015/grid-list/testing/grid-list-harness.js +62 -66
- package/esm2015/grid-list/testing/grid-tile-harness.js +69 -73
- package/esm2015/grid-list/tile-styler.js +1 -1
- package/esm2015/icon/icon-module.js +10 -14
- package/esm2015/icon/icon-registry.js +406 -410
- package/esm2015/icon/icon.js +228 -232
- package/esm2015/icon/testing/fake-icon-registry.js +66 -74
- package/esm2015/input/autosize.js +30 -34
- package/esm2015/input/input-module.js +21 -25
- package/esm2015/input/input.js +305 -284
- package/esm2015/input/testing/input-harness.js +129 -123
- package/esm2015/list/list-module.js +32 -36
- package/esm2015/list/list.js +165 -189
- package/esm2015/list/selection-list.js +503 -511
- package/esm2015/list/testing/action-list-harness.js +55 -57
- package/esm2015/list/testing/list-harness.js +31 -39
- package/esm2015/list/testing/list-item-harness-base.js +13 -17
- package/esm2015/list/testing/nav-list-harness.js +62 -64
- package/esm2015/list/testing/selection-list-harness.js +136 -138
- package/esm2015/menu/menu-content.js +74 -71
- package/esm2015/menu/menu-item.js +119 -123
- package/esm2015/menu/menu-module.js +29 -37
- package/esm2015/menu/menu-panel.js +1 -1
- package/esm2015/menu/menu-trigger.js +402 -405
- package/esm2015/menu/menu.js +329 -339
- package/esm2015/menu/testing/menu-harness.js +193 -189
- package/esm2015/paginator/paginator-intl.js +36 -40
- package/esm2015/paginator/paginator-module.js +16 -20
- package/esm2015/paginator/paginator.js +205 -209
- package/esm2015/paginator/testing/paginator-harness.js +91 -95
- package/esm2015/progress-bar/progress-bar-module.js +10 -14
- package/esm2015/progress-bar/progress-bar.js +114 -118
- package/esm2015/progress-bar/testing/progress-bar-harness.js +27 -31
- package/esm2015/progress-spinner/progress-spinner-module.js +17 -21
- package/esm2015/progress-spinner/progress-spinner.js +181 -189
- package/esm2015/progress-spinner/testing/progress-spinner-harness.js +28 -32
- package/esm2015/radio/radio-module.js +10 -14
- package/esm2015/radio/radio.js +437 -444
- package/esm2015/radio/testing/radio-harness.js +241 -243
- package/esm2015/select/select-module.js +23 -27
- package/esm2015/select/select.js +917 -918
- package/esm2015/select/testing/select-harness.js +138 -136
- package/esm2015/sidenav/drawer.js +632 -620
- package/esm2015/sidenav/sidenav-module.js +31 -35
- package/esm2015/sidenav/sidenav.js +104 -116
- package/esm2015/sidenav/testing/drawer-harness.js +40 -44
- package/esm2015/sidenav/testing/sidenav-harness.js +20 -24
- package/esm2015/slide-toggle/slide-toggle-module.js +27 -35
- package/esm2015/slide-toggle/slide-toggle-required-validator.js +9 -13
- package/esm2015/slide-toggle/slide-toggle.js +184 -188
- package/esm2015/slide-toggle/testing/slide-toggle-harness.js +123 -121
- package/esm2015/slider/slider-module.js +10 -14
- package/esm2015/slider/slider.js +640 -644
- package/esm2015/slider/testing/slider-harness.js +129 -127
- package/esm2015/snack-bar/simple-snack-bar.js +32 -36
- package/esm2015/snack-bar/snack-bar-container.js +144 -148
- package/esm2015/snack-bar/snack-bar-module.js +17 -21
- package/esm2015/snack-bar/snack-bar-ref.js +1 -1
- package/esm2015/snack-bar/snack-bar.js +208 -205
- package/esm2015/snack-bar/testing/snack-bar-harness.js +112 -116
- package/esm2015/sort/sort-header-intl.js +21 -21
- package/esm2015/sort/sort-header.js +200 -194
- package/esm2015/sort/sort-module.js +11 -15
- package/esm2015/sort/sort.js +92 -96
- package/esm2015/sort/testing/sort-harness.js +28 -32
- package/esm2015/sort/testing/sort-header-harness.js +66 -67
- package/esm2015/stepper/step-header.js +78 -82
- package/esm2015/stepper/step-label.js +8 -12
- package/esm2015/stepper/stepper-button.js +23 -31
- package/esm2015/stepper/stepper-icon.js +16 -20
- package/esm2015/stepper/stepper-intl.js +15 -19
- package/esm2015/stepper/stepper-module.js +40 -44
- package/esm2015/stepper/stepper.js +139 -155
- package/esm2015/table/cell.js +94 -122
- package/esm2015/table/row.js +90 -118
- package/esm2015/table/table-module.js +13 -17
- package/esm2015/table/table.js +26 -30
- package/esm2015/table/testing/cell-harness.js +56 -68
- package/esm2015/table/testing/row-harness.js +90 -102
- package/esm2015/table/testing/table-harness.js +65 -69
- package/esm2015/table/text-column.js +17 -21
- package/esm2015/tabs/index.js +4 -2
- package/esm2015/tabs/ink-bar.js +55 -59
- package/esm2015/tabs/paginated-tab-header.js +415 -419
- package/esm2015/tabs/tab-body.js +179 -191
- package/esm2015/tabs/tab-content.js +21 -16
- package/esm2015/tabs/tab-group.js +263 -271
- package/esm2015/tabs/tab-header.js +69 -77
- package/esm2015/tabs/tab-label-wrapper.js +29 -33
- package/esm2015/tabs/tab-label.js +16 -13
- package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +199 -215
- package/esm2015/tabs/tab.js +80 -83
- package/esm2015/tabs/tabs-module.js +38 -42
- package/esm2015/tabs/testing/tab-group-harness.js +52 -56
- package/esm2015/tabs/testing/tab-harness.js +78 -82
- package/esm2015/toolbar/testing/index.js +9 -0
- package/esm2015/toolbar/testing/public-api.js +10 -0
- package/esm2015/toolbar/testing/testing.externs.js +0 -0
- package/esm2015/toolbar/testing/toolbar-harness-filters.js +8 -0
- package/esm2015/toolbar/testing/toolbar-harness.js +47 -0
- package/esm2015/toolbar/toolbar-module.js +10 -14
- package/esm2015/toolbar/toolbar.js +61 -69
- package/esm2015/tooltip/testing/tooltip-harness.js +43 -47
- package/esm2015/tooltip/tooltip-module.js +17 -21
- package/esm2015/tooltip/tooltip.js +502 -497
- package/esm2015/tree/data-source/flat-data-source.js +1 -1
- package/esm2015/tree/node.js +99 -111
- package/esm2015/tree/outlet.js +19 -23
- package/esm2015/tree/padding.js +13 -17
- package/esm2015/tree/toggle.js +15 -19
- package/esm2015/tree/tree-module.js +10 -14
- package/esm2015/tree/tree.js +23 -27
- package/expansion/testing/expansion-harness.d.ts +2 -0
- package/fesm2015/autocomplete/testing.js +98 -95
- package/fesm2015/autocomplete/testing.js.map +1 -1
- package/fesm2015/autocomplete.js +677 -687
- package/fesm2015/autocomplete.js.map +1 -1
- package/fesm2015/badge/testing.js +73 -76
- package/fesm2015/badge/testing.js.map +1 -1
- package/fesm2015/badge.js +195 -201
- package/fesm2015/badge.js.map +1 -1
- package/fesm2015/bottom-sheet/testing.js +28 -31
- package/fesm2015/bottom-sheet/testing.js.map +1 -1
- package/fesm2015/bottom-sheet.js +297 -306
- package/fesm2015/bottom-sheet.js.map +1 -1
- package/fesm2015/button/testing.js +59 -56
- package/fesm2015/button/testing.js.map +1 -1
- package/fesm2015/button-toggle/testing.js +155 -155
- package/fesm2015/button-toggle/testing.js.map +1 -1
- package/fesm2015/button-toggle.js +377 -378
- package/fesm2015/button-toggle.js.map +1 -1
- package/fesm2015/button.js +129 -133
- package/fesm2015/button.js.map +1 -1
- package/fesm2015/card/testing.js +79 -0
- package/fesm2015/card/testing.js.map +1 -0
- package/fesm2015/card.js +175 -220
- package/fesm2015/card.js.map +1 -1
- package/fesm2015/checkbox/testing.js +149 -146
- package/fesm2015/checkbox/testing.js.map +1 -1
- package/fesm2015/checkbox.js +342 -354
- package/fesm2015/checkbox.js.map +1 -1
- package/fesm2015/chips.js +1039 -1039
- package/fesm2015/chips.js.map +1 -1
- package/fesm2015/core/testing.js +88 -94
- package/fesm2015/core/testing.js.map +1 -1
- package/fesm2015/core.js +729 -773
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker.js +2821 -2884
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/dialog/testing.js +57 -60
- package/fesm2015/dialog/testing.js.map +1 -1
- package/fesm2015/dialog.js +564 -549
- package/fesm2015/dialog.js.map +1 -1
- package/fesm2015/divider/testing.js +15 -18
- package/fesm2015/divider/testing.js.map +1 -1
- package/fesm2015/divider.js +41 -47
- package/fesm2015/divider.js.map +1 -1
- package/fesm2015/expansion/testing.js +159 -159
- package/fesm2015/expansion/testing.js.map +1 -1
- package/fesm2015/expansion.js +422 -446
- package/fesm2015/expansion.js.map +1 -1
- package/fesm2015/form-field/testing.js +219 -204
- package/fesm2015/form-field/testing.js.map +1 -1
- package/fesm2015/form-field.js +538 -532
- package/fesm2015/form-field.js.map +1 -1
- package/fesm2015/grid-list/testing.js +129 -135
- package/fesm2015/grid-list/testing.js.map +1 -1
- package/fesm2015/grid-list.js +221 -242
- package/fesm2015/grid-list.js.map +1 -1
- package/fesm2015/icon/testing.js +65 -71
- package/fesm2015/icon/testing.js.map +1 -1
- package/fesm2015/icon.js +660 -669
- package/fesm2015/icon.js.map +1 -1
- package/fesm2015/input/testing.js +128 -121
- package/fesm2015/input/testing.js.map +1 -1
- package/fesm2015/input.js +353 -337
- package/fesm2015/input.js.map +1 -1
- package/fesm2015/list/testing.js +298 -307
- package/fesm2015/list/testing.js.map +1 -1
- package/fesm2015/list.js +698 -725
- package/fesm2015/list.js.map +1 -1
- package/fesm2015/menu/testing.js +192 -186
- package/fesm2015/menu/testing.js.map +1 -1
- package/fesm2015/menu.js +948 -962
- package/fesm2015/menu.js.map +1 -1
- package/fesm2015/paginator/testing.js +90 -93
- package/fesm2015/paginator/testing.js.map +1 -1
- package/fesm2015/paginator.js +247 -256
- package/fesm2015/paginator.js.map +1 -1
- package/fesm2015/progress-bar/testing.js +26 -29
- package/fesm2015/progress-bar/testing.js.map +1 -1
- package/fesm2015/progress-bar.js +122 -128
- package/fesm2015/progress-bar.js.map +1 -1
- package/fesm2015/progress-spinner/testing.js +27 -30
- package/fesm2015/progress-spinner/testing.js.map +1 -1
- package/fesm2015/progress-spinner.js +196 -205
- package/fesm2015/progress-spinner.js.map +1 -1
- package/fesm2015/radio/testing.js +240 -240
- package/fesm2015/radio/testing.js.map +1 -1
- package/fesm2015/radio.js +447 -453
- package/fesm2015/radio.js.map +1 -1
- package/fesm2015/select/testing.js +137 -134
- package/fesm2015/select/testing.js.map +1 -1
- package/fesm2015/select.js +939 -941
- package/fesm2015/select.js.map +1 -1
- package/fesm2015/sidenav/testing.js +58 -64
- package/fesm2015/sidenav/testing.js.map +1 -1
- package/fesm2015/sidenav.js +765 -762
- package/fesm2015/sidenav.js.map +1 -1
- package/fesm2015/slide-toggle/testing.js +122 -119
- package/fesm2015/slide-toggle/testing.js.map +1 -1
- package/fesm2015/slide-toggle.js +217 -229
- package/fesm2015/slide-toggle.js.map +1 -1
- package/fesm2015/slider/testing.js +128 -125
- package/fesm2015/slider/testing.js.map +1 -1
- package/fesm2015/slider.js +648 -654
- package/fesm2015/slider.js.map +1 -1
- package/fesm2015/snack-bar/testing.js +111 -114
- package/fesm2015/snack-bar/testing.js.map +1 -1
- package/fesm2015/snack-bar.js +426 -431
- package/fesm2015/snack-bar.js.map +1 -1
- package/fesm2015/sort/testing.js +92 -95
- package/fesm2015/sort/testing.js.map +1 -1
- package/fesm2015/sort.js +320 -318
- package/fesm2015/sort.js.map +1 -1
- package/fesm2015/stepper.js +312 -345
- package/fesm2015/stepper.js.map +1 -1
- package/fesm2015/table/testing.js +208 -229
- package/fesm2015/table/testing.js.map +1 -1
- package/fesm2015/table.js +235 -286
- package/fesm2015/table.js.map +1 -1
- package/fesm2015/tabs/testing.js +128 -134
- package/fesm2015/tabs/testing.js.map +1 -1
- package/fesm2015/tabs.js +1362 -1399
- package/fesm2015/tabs.js.map +1 -1
- package/fesm2015/toolbar/testing.js +74 -0
- package/fesm2015/toolbar/testing.js.map +1 -0
- package/fesm2015/toolbar.js +69 -78
- package/fesm2015/toolbar.js.map +1 -1
- package/fesm2015/tooltip/testing.js +42 -45
- package/fesm2015/tooltip/testing.js.map +1 -1
- package/fesm2015/tooltip.js +517 -513
- package/fesm2015/tooltip.js.map +1 -1
- package/fesm2015/tree.js +173 -197
- package/fesm2015/tree.js.map +1 -1
- package/form-field/error.d.ts +7 -0
- package/form-field/hint.d.ts +10 -0
- package/form-field/index.metadata.json +1 -1
- package/form-field/prefix.d.ts +7 -0
- package/form-field/suffix.d.ts +7 -0
- package/form-field/testing/form-field-harness.d.ts +8 -0
- package/grid-list/grid-list.d.ts +2 -1
- package/grid-list/index.metadata.json +1 -1
- package/grid-list/tile-styler.d.ts +10 -5
- package/input/_input-theme.scss +2 -2
- package/input/index.metadata.json +1 -1
- package/input/input.d.ts +6 -2
- package/input/testing/input-harness.d.ts +2 -0
- package/list/index.metadata.json +1 -1
- package/list/testing/action-list-harness.d.ts +2 -0
- package/list/testing/nav-list-harness.d.ts +2 -0
- package/list/testing/selection-list-harness.d.ts +2 -0
- package/menu/index.metadata.json +1 -1
- package/menu/menu-content.d.ts +7 -1
- package/menu/menu-panel.d.ts +1 -0
- package/menu/menu.d.ts +4 -0
- package/menu/testing/menu-harness.d.ts +4 -0
- package/package.json +6 -6
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-spinner/index.metadata.json +1 -1
- package/radio/index.metadata.json +1 -1
- package/radio/radio.d.ts +6 -0
- package/radio/testing/radio-harness.d.ts +2 -0
- package/schematics/migration.json +5 -0
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +3 -3
- package/schematics/ng-generate/navigation/schema.json +5 -0
- package/schematics/ng-update/data/index.js +1 -1
- package/schematics/ng-update/index.d.ts +2 -0
- package/schematics/ng-update/index.js +7 -2
- package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +639 -639
- package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.js +1 -1
- package/select/index.metadata.json +1 -1
- package/select/select.d.ts +6 -0
- package/select/testing/select-harness.d.ts +2 -0
- package/sidenav/drawer.d.ts +15 -3
- package/sidenav/index.metadata.json +1 -1
- package/slide-toggle/index.metadata.json +1 -1
- package/slide-toggle/testing/slide-toggle-harness.d.ts +2 -0
- package/slider/testing/slider-harness.d.ts +2 -0
- package/snack-bar/index.metadata.json +1 -1
- package/snack-bar/simple-snack-bar.d.ts +13 -1
- package/snack-bar/snack-bar-container.d.ts +16 -3
- package/snack-bar/snack-bar-ref.d.ts +3 -3
- package/snack-bar/snack-bar.d.ts +10 -3
- package/sort/index.metadata.json +1 -1
- package/sort/sort-header-intl.d.ts +5 -1
- package/sort/sort-header.d.ts +3 -1
- package/sort/testing/sort-header-harness.d.ts +6 -2
- package/tabs/index.d.ts +3 -1
- package/tabs/index.metadata.json +1 -1
- package/tabs/tab-content.d.ts +7 -1
- package/tabs/tab-label.d.ts +7 -0
- package/toolbar/testing/index.d.ts +8 -0
- package/toolbar/testing/package.json +9 -0
- package/toolbar/testing/public-api.d.ts +9 -0
- package/toolbar/testing/toolbar-harness-filters.d.ts +13 -0
- package/toolbar/testing/toolbar-harness.d.ts +31 -0
- package/tooltip/index.metadata.json +1 -1
- package/tooltip/tooltip.d.ts +1 -0
- package/tree/data-source/flat-data-source.d.ts +4 -4
- package/tree/index.metadata.json +1 -1
package/fesm2015/form-field.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ObserversModule } from '@angular/cdk/observers';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { Directive, Input,
|
|
3
|
+
import { InjectionToken, Directive, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, ElementRef, ChangeDetectorRef, Optional, Inject, NgZone, ViewChild, ContentChild, ContentChildren, NgModule } from '@angular/core';
|
|
4
4
|
import { mixinColor, MAT_LABEL_GLOBAL_OPTIONS, MatCommonModule } from '@angular/material/core';
|
|
5
5
|
import { Directionality } from '@angular/cdk/bidi';
|
|
6
6
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
@@ -18,28 +18,32 @@ import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
|
|
|
18
18
|
* found in the LICENSE file at https://angular.io/license
|
|
19
19
|
*/
|
|
20
20
|
let nextUniqueId = 0;
|
|
21
|
+
/**
|
|
22
|
+
* Injection token that can be used to reference instances of `MatError`. It serves as
|
|
23
|
+
* alternative token to the actual `MatError` class which could cause unnecessary
|
|
24
|
+
* retention of the class and its directive metadata.
|
|
25
|
+
*/
|
|
26
|
+
const MAT_ERROR = new InjectionToken('MatError');
|
|
21
27
|
/** Single error message to be shown underneath the form field. */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this.id = `mat-error-${nextUniqueId++}`;
|
|
26
|
-
}
|
|
28
|
+
class MatError {
|
|
29
|
+
constructor() {
|
|
30
|
+
this.id = `mat-error-${nextUniqueId++}`;
|
|
27
31
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
32
|
+
}
|
|
33
|
+
MatError.decorators = [
|
|
34
|
+
{ type: Directive, args: [{
|
|
35
|
+
selector: 'mat-error',
|
|
36
|
+
host: {
|
|
37
|
+
'class': 'mat-error',
|
|
38
|
+
'role': 'alert',
|
|
39
|
+
'[attr.id]': 'id',
|
|
40
|
+
},
|
|
41
|
+
providers: [{ provide: MAT_ERROR, useExisting: MatError }],
|
|
42
|
+
},] }
|
|
43
|
+
];
|
|
44
|
+
MatError.propDecorators = {
|
|
45
|
+
id: [{ type: Input }]
|
|
46
|
+
};
|
|
43
47
|
|
|
44
48
|
/**
|
|
45
49
|
* @license
|
|
@@ -72,14 +76,11 @@ const matFormFieldAnimations = {
|
|
|
72
76
|
* found in the LICENSE file at https://angular.io/license
|
|
73
77
|
*/
|
|
74
78
|
/** An interface which allows a control to work inside of a `MatFormField`. */
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
];
|
|
81
|
-
return MatFormFieldControl;
|
|
82
|
-
})();
|
|
79
|
+
class MatFormFieldControl {
|
|
80
|
+
}
|
|
81
|
+
MatFormFieldControl.decorators = [
|
|
82
|
+
{ type: Directive }
|
|
83
|
+
];
|
|
83
84
|
|
|
84
85
|
/**
|
|
85
86
|
* @license
|
|
@@ -109,34 +110,41 @@ function getMatFormFieldMissingControlError() {
|
|
|
109
110
|
* found in the LICENSE file at https://angular.io/license
|
|
110
111
|
*/
|
|
111
112
|
let nextUniqueId$1 = 0;
|
|
113
|
+
/**
|
|
114
|
+
* Injection token that can be used to reference instances of `MatHint`. It serves as
|
|
115
|
+
* alternative token to the actual `MatHint` class which could cause unnecessary
|
|
116
|
+
* retention of the class and its directive metadata.
|
|
117
|
+
*
|
|
118
|
+
* *Note*: This is not part of the public API as the MDC-based form-field will not
|
|
119
|
+
* need a lightweight token for `MatHint` and we want to reduce breaking changes.
|
|
120
|
+
*/
|
|
121
|
+
const _MAT_HINT = new InjectionToken('MatHint');
|
|
112
122
|
/** Hint text to be shown underneath the form field control. */
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
this.id = `mat-hint-${nextUniqueId$1++}`;
|
|
120
|
-
}
|
|
123
|
+
class MatHint {
|
|
124
|
+
constructor() {
|
|
125
|
+
/** Whether to align the hint label at the start or end of the line. */
|
|
126
|
+
this.align = 'start';
|
|
127
|
+
/** Unique ID for the hint. Used for the aria-describedby on the form field control. */
|
|
128
|
+
this.id = `mat-hint-${nextUniqueId$1++}`;
|
|
121
129
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
}
|
|
130
|
+
}
|
|
131
|
+
MatHint.decorators = [
|
|
132
|
+
{ type: Directive, args: [{
|
|
133
|
+
selector: 'mat-hint',
|
|
134
|
+
host: {
|
|
135
|
+
'class': 'mat-hint',
|
|
136
|
+
'[class.mat-right]': 'align == "end"',
|
|
137
|
+
'[attr.id]': 'id',
|
|
138
|
+
// Remove align attribute to prevent it from interfering with layout.
|
|
139
|
+
'[attr.align]': 'null',
|
|
140
|
+
},
|
|
141
|
+
providers: [{ provide: _MAT_HINT, useExisting: MatHint }],
|
|
142
|
+
},] }
|
|
143
|
+
];
|
|
144
|
+
MatHint.propDecorators = {
|
|
145
|
+
align: [{ type: Input }],
|
|
146
|
+
id: [{ type: Input }]
|
|
147
|
+
};
|
|
140
148
|
|
|
141
149
|
/**
|
|
142
150
|
* @license
|
|
@@ -146,16 +154,13 @@ let MatHint = /** @class */ (() => {
|
|
|
146
154
|
* found in the LICENSE file at https://angular.io/license
|
|
147
155
|
*/
|
|
148
156
|
/** The floating label for a `mat-form-field`. */
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
];
|
|
157
|
-
return MatLabel;
|
|
158
|
-
})();
|
|
157
|
+
class MatLabel {
|
|
158
|
+
}
|
|
159
|
+
MatLabel.decorators = [
|
|
160
|
+
{ type: Directive, args: [{
|
|
161
|
+
selector: 'mat-label'
|
|
162
|
+
},] }
|
|
163
|
+
];
|
|
159
164
|
|
|
160
165
|
/**
|
|
161
166
|
* @license
|
|
@@ -170,16 +175,13 @@ let MatLabel = /** @class */ (() => {
|
|
|
170
175
|
* placeholder.
|
|
171
176
|
* @breaking-change 8.0.0
|
|
172
177
|
*/
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
];
|
|
181
|
-
return MatPlaceholder;
|
|
182
|
-
})();
|
|
178
|
+
class MatPlaceholder {
|
|
179
|
+
}
|
|
180
|
+
MatPlaceholder.decorators = [
|
|
181
|
+
{ type: Directive, args: [{
|
|
182
|
+
selector: 'mat-placeholder'
|
|
183
|
+
},] }
|
|
184
|
+
];
|
|
183
185
|
|
|
184
186
|
/**
|
|
185
187
|
* @license
|
|
@@ -188,17 +190,21 @@ let MatPlaceholder = /** @class */ (() => {
|
|
|
188
190
|
* Use of this source code is governed by an MIT-style license that can be
|
|
189
191
|
* found in the LICENSE file at https://angular.io/license
|
|
190
192
|
*/
|
|
193
|
+
/**
|
|
194
|
+
* Injection token that can be used to reference instances of `MatPrefix`. It serves as
|
|
195
|
+
* alternative token to the actual `MatPrefix` class which could cause unnecessary
|
|
196
|
+
* retention of the class and its directive metadata.
|
|
197
|
+
*/
|
|
198
|
+
const MAT_PREFIX = new InjectionToken('MatPrefix');
|
|
191
199
|
/** Prefix to be placed in front of the form field. */
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return MatPrefix;
|
|
201
|
-
})();
|
|
200
|
+
class MatPrefix {
|
|
201
|
+
}
|
|
202
|
+
MatPrefix.decorators = [
|
|
203
|
+
{ type: Directive, args: [{
|
|
204
|
+
selector: '[matPrefix]',
|
|
205
|
+
providers: [{ provide: MAT_PREFIX, useExisting: MatPrefix }],
|
|
206
|
+
},] }
|
|
207
|
+
];
|
|
202
208
|
|
|
203
209
|
/**
|
|
204
210
|
* @license
|
|
@@ -207,17 +213,21 @@ let MatPrefix = /** @class */ (() => {
|
|
|
207
213
|
* Use of this source code is governed by an MIT-style license that can be
|
|
208
214
|
* found in the LICENSE file at https://angular.io/license
|
|
209
215
|
*/
|
|
216
|
+
/**
|
|
217
|
+
* Injection token that can be used to reference instances of `MatSuffix`. It serves as
|
|
218
|
+
* alternative token to the actual `MatSuffix` class which could cause unnecessary
|
|
219
|
+
* retention of the class and its directive metadata.
|
|
220
|
+
*/
|
|
221
|
+
const MAT_SUFFIX = new InjectionToken('MatSuffix');
|
|
210
222
|
/** Suffix to be placed at the end of the form field. */
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
return MatSuffix;
|
|
220
|
-
})();
|
|
223
|
+
class MatSuffix {
|
|
224
|
+
}
|
|
225
|
+
MatSuffix.decorators = [
|
|
226
|
+
{ type: Directive, args: [{
|
|
227
|
+
selector: '[matSuffix]',
|
|
228
|
+
providers: [{ provide: MAT_SUFFIX, useExisting: MatSuffix }],
|
|
229
|
+
},] }
|
|
230
|
+
];
|
|
221
231
|
|
|
222
232
|
/**
|
|
223
233
|
* @license
|
|
@@ -255,437 +265,436 @@ const MAT_FORM_FIELD_DEFAULT_OPTIONS = new InjectionToken('MAT_FORM_FIELD_DEFAUL
|
|
|
255
265
|
*/
|
|
256
266
|
const MAT_FORM_FIELD = new InjectionToken('MatFormField');
|
|
257
267
|
/** Container for form controls that applies Material Design styling and behavior. */
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
this._ngZone = _ngZone;
|
|
268
|
-
/**
|
|
269
|
-
* Whether the outline gap needs to be calculated
|
|
270
|
-
* immediately on the next change detection run.
|
|
271
|
-
*/
|
|
272
|
-
this._outlineGapCalculationNeededImmediately = false;
|
|
273
|
-
/** Whether the outline gap needs to be calculated next time the zone has stabilized. */
|
|
274
|
-
this._outlineGapCalculationNeededOnStable = false;
|
|
275
|
-
this._destroyed = new Subject();
|
|
276
|
-
/** Override for the logic that disables the label animation in certain cases. */
|
|
277
|
-
this._showAlwaysAnimate = false;
|
|
278
|
-
/** State of the mat-hint and mat-error animations. */
|
|
279
|
-
this._subscriptAnimationState = '';
|
|
280
|
-
this._hintLabel = '';
|
|
281
|
-
// Unique id for the hint label.
|
|
282
|
-
this._hintLabelId = `mat-hint-${nextUniqueId$2++}`;
|
|
283
|
-
// Unique id for the internal form field label.
|
|
284
|
-
this._labelId = `mat-form-field-label-${nextUniqueId$2++}`;
|
|
285
|
-
this._labelOptions = labelOptions ? labelOptions : {};
|
|
286
|
-
this.floatLabel = this._getDefaultFloatLabelState();
|
|
287
|
-
this._animationsEnabled = _animationMode !== 'NoopAnimations';
|
|
288
|
-
// Set the default through here so we invoke the setter on the first run.
|
|
289
|
-
this.appearance = (_defaults && _defaults.appearance) ? _defaults.appearance : 'legacy';
|
|
290
|
-
this._hideRequiredMarker = (_defaults && _defaults.hideRequiredMarker != null) ?
|
|
291
|
-
_defaults.hideRequiredMarker : false;
|
|
292
|
-
}
|
|
293
|
-
/** The form-field appearance style. */
|
|
294
|
-
get appearance() { return this._appearance; }
|
|
295
|
-
set appearance(value) {
|
|
296
|
-
const oldValue = this._appearance;
|
|
297
|
-
this._appearance = value || (this._defaults && this._defaults.appearance) || 'legacy';
|
|
298
|
-
if (this._appearance === 'outline' && oldValue !== value) {
|
|
299
|
-
this._outlineGapCalculationNeededOnStable = true;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
/** Whether the required marker should be hidden. */
|
|
303
|
-
get hideRequiredMarker() { return this._hideRequiredMarker; }
|
|
304
|
-
set hideRequiredMarker(value) {
|
|
305
|
-
this._hideRequiredMarker = coerceBooleanProperty(value);
|
|
306
|
-
}
|
|
307
|
-
/** Whether the floating label should always float or not. */
|
|
308
|
-
get _shouldAlwaysFloat() {
|
|
309
|
-
return this.floatLabel === 'always' && !this._showAlwaysAnimate;
|
|
310
|
-
}
|
|
311
|
-
/** Whether the label can float or not. */
|
|
312
|
-
get _canLabelFloat() { return this.floatLabel !== 'never'; }
|
|
313
|
-
/** Text for the form field hint. */
|
|
314
|
-
get hintLabel() { return this._hintLabel; }
|
|
315
|
-
set hintLabel(value) {
|
|
316
|
-
this._hintLabel = value;
|
|
317
|
-
this._processHints();
|
|
318
|
-
}
|
|
268
|
+
class MatFormField extends _MatFormFieldMixinBase {
|
|
269
|
+
constructor(_elementRef, _changeDetectorRef, labelOptions, _dir, _defaults, _platform, _ngZone, _animationMode) {
|
|
270
|
+
super(_elementRef);
|
|
271
|
+
this._elementRef = _elementRef;
|
|
272
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
273
|
+
this._dir = _dir;
|
|
274
|
+
this._defaults = _defaults;
|
|
275
|
+
this._platform = _platform;
|
|
276
|
+
this._ngZone = _ngZone;
|
|
319
277
|
/**
|
|
320
|
-
* Whether the
|
|
321
|
-
*
|
|
322
|
-
* Note: only the legacy appearance supports the `never` option. `never` was originally added as a
|
|
323
|
-
* way to make the floating label emulate the behavior of a standard input placeholder. However
|
|
324
|
-
* the form field now supports both floating labels and placeholders. Therefore in the non-legacy
|
|
325
|
-
* appearances the `never` option has been disabled in favor of just using the placeholder.
|
|
278
|
+
* Whether the outline gap needs to be calculated
|
|
279
|
+
* immediately on the next change detection run.
|
|
326
280
|
*/
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
281
|
+
this._outlineGapCalculationNeededImmediately = false;
|
|
282
|
+
/** Whether the outline gap needs to be calculated next time the zone has stabilized. */
|
|
283
|
+
this._outlineGapCalculationNeededOnStable = false;
|
|
284
|
+
this._destroyed = new Subject();
|
|
285
|
+
/** Override for the logic that disables the label animation in certain cases. */
|
|
286
|
+
this._showAlwaysAnimate = false;
|
|
287
|
+
/** State of the mat-hint and mat-error animations. */
|
|
288
|
+
this._subscriptAnimationState = '';
|
|
289
|
+
this._hintLabel = '';
|
|
290
|
+
// Unique id for the hint label.
|
|
291
|
+
this._hintLabelId = `mat-hint-${nextUniqueId$2++}`;
|
|
292
|
+
// Unique id for the internal form field label.
|
|
293
|
+
this._labelId = `mat-form-field-label-${nextUniqueId$2++}`;
|
|
294
|
+
this._labelOptions = labelOptions ? labelOptions : {};
|
|
295
|
+
this.floatLabel = this._getDefaultFloatLabelState();
|
|
296
|
+
this._animationsEnabled = _animationMode !== 'NoopAnimations';
|
|
297
|
+
// Set the default through here so we invoke the setter on the first run.
|
|
298
|
+
this.appearance = (_defaults && _defaults.appearance) ? _defaults.appearance : 'legacy';
|
|
299
|
+
this._hideRequiredMarker = (_defaults && _defaults.hideRequiredMarker != null) ?
|
|
300
|
+
_defaults.hideRequiredMarker : false;
|
|
301
|
+
}
|
|
302
|
+
/** The form-field appearance style. */
|
|
303
|
+
get appearance() { return this._appearance; }
|
|
304
|
+
set appearance(value) {
|
|
305
|
+
const oldValue = this._appearance;
|
|
306
|
+
this._appearance = value || (this._defaults && this._defaults.appearance) || 'legacy';
|
|
307
|
+
if (this._appearance === 'outline' && oldValue !== value) {
|
|
308
|
+
this._outlineGapCalculationNeededOnStable = true;
|
|
346
309
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
310
|
+
}
|
|
311
|
+
/** Whether the required marker should be hidden. */
|
|
312
|
+
get hideRequiredMarker() { return this._hideRequiredMarker; }
|
|
313
|
+
set hideRequiredMarker(value) {
|
|
314
|
+
this._hideRequiredMarker = coerceBooleanProperty(value);
|
|
315
|
+
}
|
|
316
|
+
/** Whether the floating label should always float or not. */
|
|
317
|
+
get _shouldAlwaysFloat() {
|
|
318
|
+
return this.floatLabel === 'always' && !this._showAlwaysAnimate;
|
|
319
|
+
}
|
|
320
|
+
/** Whether the label can float or not. */
|
|
321
|
+
get _canLabelFloat() { return this.floatLabel !== 'never'; }
|
|
322
|
+
/** Text for the form field hint. */
|
|
323
|
+
get hintLabel() { return this._hintLabel; }
|
|
324
|
+
set hintLabel(value) {
|
|
325
|
+
this._hintLabel = value;
|
|
326
|
+
this._processHints();
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Whether the label should always float, never float or float as the user types.
|
|
330
|
+
*
|
|
331
|
+
* Note: only the legacy appearance supports the `never` option. `never` was originally added as a
|
|
332
|
+
* way to make the floating label emulate the behavior of a standard input placeholder. However
|
|
333
|
+
* the form field now supports both floating labels and placeholders. Therefore in the non-legacy
|
|
334
|
+
* appearances the `never` option has been disabled in favor of just using the placeholder.
|
|
335
|
+
*/
|
|
336
|
+
get floatLabel() {
|
|
337
|
+
return this.appearance !== 'legacy' && this._floatLabel === 'never' ? 'auto' : this._floatLabel;
|
|
338
|
+
}
|
|
339
|
+
set floatLabel(value) {
|
|
340
|
+
if (value !== this._floatLabel) {
|
|
341
|
+
this._floatLabel = value || this._getDefaultFloatLabelState();
|
|
342
|
+
this._changeDetectorRef.markForCheck();
|
|
353
343
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
this.
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
344
|
+
}
|
|
345
|
+
get _control() {
|
|
346
|
+
// TODO(crisbeto): we need this workaround in order to support both Ivy and ViewEngine.
|
|
347
|
+
// We should clean this up once Ivy is the default renderer.
|
|
348
|
+
return this._explicitFormFieldControl || this._controlNonStatic || this._controlStatic;
|
|
349
|
+
}
|
|
350
|
+
set _control(value) {
|
|
351
|
+
this._explicitFormFieldControl = value;
|
|
352
|
+
}
|
|
353
|
+
get _labelChild() {
|
|
354
|
+
return this._labelChildNonStatic || this._labelChildStatic;
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Gets an ElementRef for the element that a overlay attached to the form-field should be
|
|
358
|
+
* positioned relative to.
|
|
359
|
+
*/
|
|
360
|
+
getConnectedOverlayOrigin() {
|
|
361
|
+
return this._connectionContainerRef || this._elementRef;
|
|
362
|
+
}
|
|
363
|
+
ngAfterContentInit() {
|
|
364
|
+
this._validateControlChild();
|
|
365
|
+
const control = this._control;
|
|
366
|
+
if (control.controlType) {
|
|
367
|
+
this._elementRef.nativeElement.classList.add(`mat-form-field-type-${control.controlType}`);
|
|
368
|
+
}
|
|
369
|
+
// Subscribe to changes in the child control state in order to update the form field UI.
|
|
370
|
+
control.stateChanges.pipe(startWith(null)).subscribe(() => {
|
|
371
|
+
this._validatePlaceholders();
|
|
372
|
+
this._syncDescribedByIds();
|
|
373
|
+
this._changeDetectorRef.markForCheck();
|
|
374
|
+
});
|
|
375
|
+
// Run change detection if the value changes.
|
|
376
|
+
if (control.ngControl && control.ngControl.valueChanges) {
|
|
377
|
+
control.ngControl.valueChanges
|
|
378
|
+
.pipe(takeUntil(this._destroyed))
|
|
379
|
+
.subscribe(() => this._changeDetectorRef.markForCheck());
|
|
380
|
+
}
|
|
381
|
+
// Note that we have to run outside of the `NgZone` explicitly,
|
|
382
|
+
// in order to avoid throwing users into an infinite loop
|
|
383
|
+
// if `zone-patch-rxjs` is included.
|
|
384
|
+
this._ngZone.runOutsideAngular(() => {
|
|
385
|
+
this._ngZone.onStable.asObservable().pipe(takeUntil(this._destroyed)).subscribe(() => {
|
|
386
|
+
if (this._outlineGapCalculationNeededOnStable) {
|
|
387
|
+
this.updateOutlineGap();
|
|
388
|
+
}
|
|
396
389
|
});
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
this.
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
this._subscriptAnimationState = 'enter';
|
|
419
|
-
this._changeDetectorRef.detectChanges();
|
|
420
|
-
}
|
|
421
|
-
ngOnDestroy() {
|
|
422
|
-
this._destroyed.next();
|
|
423
|
-
this._destroyed.complete();
|
|
424
|
-
}
|
|
425
|
-
/** Determines whether a class from the NgControl should be forwarded to the host element. */
|
|
426
|
-
_shouldForward(prop) {
|
|
427
|
-
const ngControl = this._control ? this._control.ngControl : null;
|
|
428
|
-
return ngControl && ngControl[prop];
|
|
429
|
-
}
|
|
430
|
-
_hasPlaceholder() {
|
|
431
|
-
return !!(this._control && this._control.placeholder || this._placeholderChild);
|
|
432
|
-
}
|
|
433
|
-
_hasLabel() {
|
|
434
|
-
return !!this._labelChild;
|
|
435
|
-
}
|
|
436
|
-
_shouldLabelFloat() {
|
|
437
|
-
return this._canLabelFloat && (this._control.shouldLabelFloat || this._shouldAlwaysFloat);
|
|
438
|
-
}
|
|
439
|
-
_hideControlPlaceholder() {
|
|
440
|
-
// In the legacy appearance the placeholder is promoted to a label if no label is given.
|
|
441
|
-
return this.appearance === 'legacy' && !this._hasLabel() ||
|
|
442
|
-
this._hasLabel() && !this._shouldLabelFloat();
|
|
443
|
-
}
|
|
444
|
-
_hasFloatingLabel() {
|
|
445
|
-
// In the legacy appearance the placeholder is promoted to a label if no label is given.
|
|
446
|
-
return this._hasLabel() || this.appearance === 'legacy' && this._hasPlaceholder();
|
|
447
|
-
}
|
|
448
|
-
/** Determines whether to display hints or errors. */
|
|
449
|
-
_getDisplayedMessages() {
|
|
450
|
-
return (this._errorChildren && this._errorChildren.length > 0 &&
|
|
451
|
-
this._control.errorState) ? 'error' : 'hint';
|
|
452
|
-
}
|
|
453
|
-
/** Animates the placeholder up and locks it in position. */
|
|
454
|
-
_animateAndLockLabel() {
|
|
455
|
-
if (this._hasFloatingLabel() && this._canLabelFloat) {
|
|
456
|
-
// If animations are disabled, we shouldn't go in here,
|
|
457
|
-
// because the `transitionend` will never fire.
|
|
458
|
-
if (this._animationsEnabled && this._label) {
|
|
459
|
-
this._showAlwaysAnimate = true;
|
|
460
|
-
fromEvent(this._label.nativeElement, 'transitionend').pipe(take(1)).subscribe(() => {
|
|
461
|
-
this._showAlwaysAnimate = false;
|
|
390
|
+
});
|
|
391
|
+
// Run change detection and update the outline if the suffix or prefix changes.
|
|
392
|
+
merge(this._prefixChildren.changes, this._suffixChildren.changes).subscribe(() => {
|
|
393
|
+
this._outlineGapCalculationNeededOnStable = true;
|
|
394
|
+
this._changeDetectorRef.markForCheck();
|
|
395
|
+
});
|
|
396
|
+
// Re-validate when the number of hints changes.
|
|
397
|
+
this._hintChildren.changes.pipe(startWith(null)).subscribe(() => {
|
|
398
|
+
this._processHints();
|
|
399
|
+
this._changeDetectorRef.markForCheck();
|
|
400
|
+
});
|
|
401
|
+
// Update the aria-described by when the number of errors changes.
|
|
402
|
+
this._errorChildren.changes.pipe(startWith(null)).subscribe(() => {
|
|
403
|
+
this._syncDescribedByIds();
|
|
404
|
+
this._changeDetectorRef.markForCheck();
|
|
405
|
+
});
|
|
406
|
+
if (this._dir) {
|
|
407
|
+
this._dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {
|
|
408
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
409
|
+
this._ngZone.runOutsideAngular(() => {
|
|
410
|
+
requestAnimationFrame(() => this.updateOutlineGap());
|
|
462
411
|
});
|
|
463
412
|
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Ensure that there is only one placeholder (either `placeholder` attribute on the child control
|
|
470
|
-
* or child element with the `mat-placeholder` directive).
|
|
471
|
-
*/
|
|
472
|
-
_validatePlaceholders() {
|
|
473
|
-
if (this._control.placeholder && this._placeholderChild) {
|
|
474
|
-
throw getMatFormFieldPlaceholderConflictError();
|
|
475
|
-
}
|
|
413
|
+
else {
|
|
414
|
+
this.updateOutlineGap();
|
|
415
|
+
}
|
|
416
|
+
});
|
|
476
417
|
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
418
|
+
}
|
|
419
|
+
ngAfterContentChecked() {
|
|
420
|
+
this._validateControlChild();
|
|
421
|
+
if (this._outlineGapCalculationNeededImmediately) {
|
|
422
|
+
this.updateOutlineGap();
|
|
481
423
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
424
|
+
}
|
|
425
|
+
ngAfterViewInit() {
|
|
426
|
+
// Avoid animations on load.
|
|
427
|
+
this._subscriptAnimationState = 'enter';
|
|
428
|
+
this._changeDetectorRef.detectChanges();
|
|
429
|
+
}
|
|
430
|
+
ngOnDestroy() {
|
|
431
|
+
this._destroyed.next();
|
|
432
|
+
this._destroyed.complete();
|
|
433
|
+
}
|
|
434
|
+
/** Determines whether a class from the NgControl should be forwarded to the host element. */
|
|
435
|
+
_shouldForward(prop) {
|
|
436
|
+
const ngControl = this._control ? this._control.ngControl : null;
|
|
437
|
+
return ngControl && ngControl[prop];
|
|
438
|
+
}
|
|
439
|
+
_hasPlaceholder() {
|
|
440
|
+
return !!(this._control && this._control.placeholder || this._placeholderChild);
|
|
441
|
+
}
|
|
442
|
+
_hasLabel() {
|
|
443
|
+
return !!this._labelChild;
|
|
444
|
+
}
|
|
445
|
+
_shouldLabelFloat() {
|
|
446
|
+
return this._canLabelFloat &&
|
|
447
|
+
((this._control && this._control.shouldLabelFloat) || this._shouldAlwaysFloat);
|
|
448
|
+
}
|
|
449
|
+
_hideControlPlaceholder() {
|
|
450
|
+
// In the legacy appearance the placeholder is promoted to a label if no label is given.
|
|
451
|
+
return this.appearance === 'legacy' && !this._hasLabel() ||
|
|
452
|
+
this._hasLabel() && !this._shouldLabelFloat();
|
|
453
|
+
}
|
|
454
|
+
_hasFloatingLabel() {
|
|
455
|
+
// In the legacy appearance the placeholder is promoted to a label if no label is given.
|
|
456
|
+
return this._hasLabel() || this.appearance === 'legacy' && this._hasPlaceholder();
|
|
457
|
+
}
|
|
458
|
+
/** Determines whether to display hints or errors. */
|
|
459
|
+
_getDisplayedMessages() {
|
|
460
|
+
return (this._errorChildren && this._errorChildren.length > 0 &&
|
|
461
|
+
this._control.errorState) ? 'error' : 'hint';
|
|
462
|
+
}
|
|
463
|
+
/** Animates the placeholder up and locks it in position. */
|
|
464
|
+
_animateAndLockLabel() {
|
|
465
|
+
if (this._hasFloatingLabel() && this._canLabelFloat) {
|
|
466
|
+
// If animations are disabled, we shouldn't go in here,
|
|
467
|
+
// because the `transitionend` will never fire.
|
|
468
|
+
if (this._animationsEnabled && this._label) {
|
|
469
|
+
this._showAlwaysAnimate = true;
|
|
470
|
+
fromEvent(this._label.nativeElement, 'transitionend').pipe(take(1)).subscribe(() => {
|
|
471
|
+
this._showAlwaysAnimate = false;
|
|
503
472
|
});
|
|
504
473
|
}
|
|
474
|
+
this.floatLabel = 'always';
|
|
475
|
+
this._changeDetectorRef.markForCheck();
|
|
505
476
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Ensure that there is only one placeholder (either `placeholder` attribute on the child control
|
|
480
|
+
* or child element with the `mat-placeholder` directive).
|
|
481
|
+
*/
|
|
482
|
+
_validatePlaceholders() {
|
|
483
|
+
if (this._control.placeholder && this._placeholderChild) {
|
|
484
|
+
throw getMatFormFieldPlaceholderConflictError();
|
|
509
485
|
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
_syncDescribedByIds()
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
486
|
+
}
|
|
487
|
+
/** Does any extra processing that is required when handling the hints. */
|
|
488
|
+
_processHints() {
|
|
489
|
+
this._validateHints();
|
|
490
|
+
this._syncDescribedByIds();
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Ensure that there is a maximum of one of each `<mat-hint>` alignment specified, with the
|
|
494
|
+
* attribute being considered as `align="start"`.
|
|
495
|
+
*/
|
|
496
|
+
_validateHints() {
|
|
497
|
+
if (this._hintChildren) {
|
|
498
|
+
let startHint;
|
|
499
|
+
let endHint;
|
|
500
|
+
this._hintChildren.forEach((hint) => {
|
|
501
|
+
if (hint.align === 'start') {
|
|
502
|
+
if (startHint || this.hintLabel) {
|
|
503
|
+
throw getMatFormFieldDuplicatedHintError('start');
|
|
527
504
|
}
|
|
505
|
+
startHint = hint;
|
|
506
|
+
}
|
|
507
|
+
else if (hint.align === 'end') {
|
|
528
508
|
if (endHint) {
|
|
529
|
-
|
|
509
|
+
throw getMatFormFieldDuplicatedHintError('end');
|
|
530
510
|
}
|
|
511
|
+
endHint = hint;
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
/** Gets the default float label state. */
|
|
517
|
+
_getDefaultFloatLabelState() {
|
|
518
|
+
return (this._defaults && this._defaults.floatLabel) || this._labelOptions.float || 'auto';
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Sets the list of element IDs that describe the child control. This allows the control to update
|
|
522
|
+
* its `aria-describedby` attribute accordingly.
|
|
523
|
+
*/
|
|
524
|
+
_syncDescribedByIds() {
|
|
525
|
+
if (this._control) {
|
|
526
|
+
let ids = [];
|
|
527
|
+
if (this._getDisplayedMessages() === 'hint') {
|
|
528
|
+
const startHint = this._hintChildren ?
|
|
529
|
+
this._hintChildren.find(hint => hint.align === 'start') : null;
|
|
530
|
+
const endHint = this._hintChildren ?
|
|
531
|
+
this._hintChildren.find(hint => hint.align === 'end') : null;
|
|
532
|
+
if (startHint) {
|
|
533
|
+
ids.push(startHint.id);
|
|
531
534
|
}
|
|
532
|
-
else if (this.
|
|
533
|
-
ids
|
|
535
|
+
else if (this._hintLabel) {
|
|
536
|
+
ids.push(this._hintLabelId);
|
|
537
|
+
}
|
|
538
|
+
if (endHint) {
|
|
539
|
+
ids.push(endHint.id);
|
|
534
540
|
}
|
|
535
|
-
this._control.setDescribedByIds(ids);
|
|
536
541
|
}
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
_validateControlChild() {
|
|
540
|
-
if (!this._control) {
|
|
541
|
-
throw getMatFormFieldMissingControlError();
|
|
542
|
+
else if (this._errorChildren) {
|
|
543
|
+
ids = this._errorChildren.map(error => error.id);
|
|
542
544
|
}
|
|
545
|
+
this._control.setDescribedByIds(ids);
|
|
543
546
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
547
|
+
}
|
|
548
|
+
/** Throws an error if the form field's control is missing. */
|
|
549
|
+
_validateControlChild() {
|
|
550
|
+
if (!this._control) {
|
|
551
|
+
throw getMatFormFieldMissingControlError();
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Updates the width and position of the gap in the outline. Only relevant for the outline
|
|
556
|
+
* appearance.
|
|
557
|
+
*/
|
|
558
|
+
updateOutlineGap() {
|
|
559
|
+
const labelEl = this._label ? this._label.nativeElement : null;
|
|
560
|
+
if (this.appearance !== 'outline' || !labelEl || !labelEl.children.length ||
|
|
561
|
+
!labelEl.textContent.trim()) {
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
if (!this._platform.isBrowser) {
|
|
565
|
+
// getBoundingClientRect isn't available on the server.
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
568
|
+
// If the element is not present in the DOM, the outline gap will need to be calculated
|
|
569
|
+
// the next time it is checked and in the DOM.
|
|
570
|
+
if (!this._isAttachedToDOM()) {
|
|
571
|
+
this._outlineGapCalculationNeededImmediately = true;
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
let startWidth = 0;
|
|
575
|
+
let gapWidth = 0;
|
|
576
|
+
const container = this._connectionContainerRef.nativeElement;
|
|
577
|
+
const startEls = container.querySelectorAll('.mat-form-field-outline-start');
|
|
578
|
+
const gapEls = container.querySelectorAll('.mat-form-field-outline-gap');
|
|
579
|
+
if (this._label && this._label.nativeElement.children.length) {
|
|
580
|
+
const containerRect = container.getBoundingClientRect();
|
|
581
|
+
// If the container's width and height are zero, it means that the element is
|
|
582
|
+
// invisible and we can't calculate the outline gap. Mark the element as needing
|
|
583
|
+
// to be checked the next time the zone stabilizes. We can't do this immediately
|
|
584
|
+
// on the next change detection, because even if the element becomes visible,
|
|
585
|
+
// the `ClientRect` won't be reclaculated immediately. We reset the
|
|
586
|
+
// `_outlineGapCalculationNeededImmediately` flag some we don't run the checks twice.
|
|
587
|
+
if (containerRect.width === 0 && containerRect.height === 0) {
|
|
588
|
+
this._outlineGapCalculationNeededOnStable = true;
|
|
589
|
+
this._outlineGapCalculationNeededImmediately = false;
|
|
562
590
|
return;
|
|
563
591
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
const containerRect = container.getBoundingClientRect();
|
|
571
|
-
// If the container's width and height are zero, it means that the element is
|
|
572
|
-
// invisible and we can't calculate the outline gap. Mark the element as needing
|
|
573
|
-
// to be checked the next time the zone stabilizes. We can't do this immediately
|
|
574
|
-
// on the next change detection, because even if the element becomes visible,
|
|
575
|
-
// the `ClientRect` won't be reclaculated immediately. We reset the
|
|
576
|
-
// `_outlineGapCalculationNeededImmediately` flag some we don't run the checks twice.
|
|
577
|
-
if (containerRect.width === 0 && containerRect.height === 0) {
|
|
578
|
-
this._outlineGapCalculationNeededOnStable = true;
|
|
579
|
-
this._outlineGapCalculationNeededImmediately = false;
|
|
580
|
-
return;
|
|
581
|
-
}
|
|
582
|
-
const containerStart = this._getStartEnd(containerRect);
|
|
583
|
-
const labelStart = this._getStartEnd(labelEl.children[0].getBoundingClientRect());
|
|
584
|
-
let labelWidth = 0;
|
|
585
|
-
for (const child of labelEl.children) {
|
|
586
|
-
labelWidth += child.offsetWidth;
|
|
587
|
-
}
|
|
588
|
-
startWidth = Math.abs(labelStart - containerStart) - outlineGapPadding;
|
|
589
|
-
gapWidth = labelWidth > 0 ? labelWidth * floatingLabelScale + outlineGapPadding * 2 : 0;
|
|
590
|
-
}
|
|
591
|
-
for (let i = 0; i < startEls.length; i++) {
|
|
592
|
-
startEls[i].style.width = `${startWidth}px`;
|
|
593
|
-
}
|
|
594
|
-
for (let i = 0; i < gapEls.length; i++) {
|
|
595
|
-
gapEls[i].style.width = `${gapWidth}px`;
|
|
592
|
+
const containerStart = this._getStartEnd(containerRect);
|
|
593
|
+
const labelChildren = labelEl.children;
|
|
594
|
+
const labelStart = this._getStartEnd(labelChildren[0].getBoundingClientRect());
|
|
595
|
+
let labelWidth = 0;
|
|
596
|
+
for (let i = 0; i < labelChildren.length; i++) {
|
|
597
|
+
labelWidth += labelChildren[i].offsetWidth;
|
|
596
598
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
+
startWidth = Math.abs(labelStart - containerStart) - outlineGapPadding;
|
|
600
|
+
gapWidth = labelWidth > 0 ? labelWidth * floatingLabelScale + outlineGapPadding * 2 : 0;
|
|
599
601
|
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
return (this._dir && this._dir.value === 'rtl') ? rect.right : rect.left;
|
|
602
|
+
for (let i = 0; i < startEls.length; i++) {
|
|
603
|
+
startEls[i].style.width = `${startWidth}px`;
|
|
603
604
|
}
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
const element = this._elementRef.nativeElement;
|
|
607
|
-
if (element.getRootNode) {
|
|
608
|
-
const rootNode = element.getRootNode();
|
|
609
|
-
// If the element is inside the DOM the root node will be either the document
|
|
610
|
-
// or the closest shadow root, otherwise it'll be the element itself.
|
|
611
|
-
return rootNode && rootNode !== element;
|
|
612
|
-
}
|
|
613
|
-
// Otherwise fall back to checking if it's in the document. This doesn't account for
|
|
614
|
-
// shadow DOM, however browser that support shadow DOM should support `getRootNode` as well.
|
|
615
|
-
return document.documentElement.contains(element);
|
|
605
|
+
for (let i = 0; i < gapEls.length; i++) {
|
|
606
|
+
gapEls[i].style.width = `${gapWidth}px`;
|
|
616
607
|
}
|
|
608
|
+
this._outlineGapCalculationNeededOnStable =
|
|
609
|
+
this._outlineGapCalculationNeededImmediately = false;
|
|
610
|
+
}
|
|
611
|
+
/** Gets the start end of the rect considering the current directionality. */
|
|
612
|
+
_getStartEnd(rect) {
|
|
613
|
+
return (this._dir && this._dir.value === 'rtl') ? rect.right : rect.left;
|
|
617
614
|
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
],
|
|
655
|
-
styles: [".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:scaleX(1);transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n", ".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\"\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n", ".mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\" \";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\"\";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n", ".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n", ".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n", ".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"]
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
appearance: [{ type: Input }],
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
}
|
|
615
|
+
/** Checks whether the form field is attached to the DOM. */
|
|
616
|
+
_isAttachedToDOM() {
|
|
617
|
+
const element = this._elementRef.nativeElement;
|
|
618
|
+
if (element.getRootNode) {
|
|
619
|
+
const rootNode = element.getRootNode();
|
|
620
|
+
// If the element is inside the DOM the root node will be either the document
|
|
621
|
+
// or the closest shadow root, otherwise it'll be the element itself.
|
|
622
|
+
return rootNode && rootNode !== element;
|
|
623
|
+
}
|
|
624
|
+
// Otherwise fall back to checking if it's in the document. This doesn't account for
|
|
625
|
+
// shadow DOM, however browser that support shadow DOM should support `getRootNode` as well.
|
|
626
|
+
return document.documentElement.contains(element);
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
MatFormField.decorators = [
|
|
630
|
+
{ type: Component, args: [{
|
|
631
|
+
selector: 'mat-form-field',
|
|
632
|
+
exportAs: 'matFormField',
|
|
633
|
+
template: "<div class=\"mat-form-field-wrapper\">\n <div class=\"mat-form-field-flex\" #connectionContainer\n (click)=\"_control.onContainerClick && _control.onContainerClick($event)\">\n\n <!-- Outline used for outline appearance. -->\n <ng-container *ngIf=\"appearance == 'outline'\">\n <div class=\"mat-form-field-outline\">\n <div class=\"mat-form-field-outline-start\"></div>\n <div class=\"mat-form-field-outline-gap\"></div>\n <div class=\"mat-form-field-outline-end\"></div>\n </div>\n <div class=\"mat-form-field-outline mat-form-field-outline-thick\">\n <div class=\"mat-form-field-outline-start\"></div>\n <div class=\"mat-form-field-outline-gap\"></div>\n <div class=\"mat-form-field-outline-end\"></div>\n </div>\n </ng-container>\n\n <div class=\"mat-form-field-prefix\" *ngIf=\"_prefixChildren.length\">\n <ng-content select=\"[matPrefix]\"></ng-content>\n </div>\n\n <div class=\"mat-form-field-infix\" #inputContainer>\n <ng-content></ng-content>\n\n <span class=\"mat-form-field-label-wrapper\">\n <!-- We add aria-owns as a workaround for an issue in JAWS & NVDA where the label isn't\n read if it comes before the control in the DOM. -->\n <label class=\"mat-form-field-label\"\n (cdkObserveContent)=\"updateOutlineGap()\"\n [cdkObserveContentDisabled]=\"appearance != 'outline'\"\n [id]=\"_labelId\"\n [attr.for]=\"_control.id\"\n [attr.aria-owns]=\"_control.id\"\n [class.mat-empty]=\"_control.empty && !_shouldAlwaysFloat\"\n [class.mat-form-field-empty]=\"_control.empty && !_shouldAlwaysFloat\"\n [class.mat-accent]=\"color == 'accent'\"\n [class.mat-warn]=\"color == 'warn'\"\n #label\n *ngIf=\"_hasFloatingLabel()\"\n [ngSwitch]=\"_hasLabel()\">\n\n <!-- @breaking-change 8.0.0 remove in favor of mat-label element an placeholder attr. -->\n <ng-container *ngSwitchCase=\"false\">\n <ng-content select=\"mat-placeholder\"></ng-content>\n <span>{{_control.placeholder}}</span>\n </ng-container>\n\n <ng-content select=\"mat-label\" *ngSwitchCase=\"true\"></ng-content>\n\n <!-- @breaking-change 8.0.0 remove `mat-placeholder-required` class -->\n <span\n class=\"mat-placeholder-required mat-form-field-required-marker\"\n aria-hidden=\"true\"\n *ngIf=\"!hideRequiredMarker && _control.required && !_control.disabled\"> *</span>\n </label>\n </span>\n </div>\n\n <div class=\"mat-form-field-suffix\" *ngIf=\"_suffixChildren.length\">\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </div>\n\n <!-- Underline used for legacy, standard, and box appearances. -->\n <div class=\"mat-form-field-underline\" #underline\n *ngIf=\"appearance != 'outline'\">\n <span class=\"mat-form-field-ripple\"\n [class.mat-accent]=\"color == 'accent'\"\n [class.mat-warn]=\"color == 'warn'\"></span>\n </div>\n\n <div class=\"mat-form-field-subscript-wrapper\"\n [ngSwitch]=\"_getDisplayedMessages()\">\n <div *ngSwitchCase=\"'error'\" [@transitionMessages]=\"_subscriptAnimationState\">\n <ng-content select=\"mat-error\"></ng-content>\n </div>\n\n <div class=\"mat-form-field-hint-wrapper\" *ngSwitchCase=\"'hint'\"\n [@transitionMessages]=\"_subscriptAnimationState\">\n <!-- TODO(mmalerba): use an actual <mat-hint> once all selectors are switched to mat-* -->\n <div *ngIf=\"hintLabel\" [id]=\"_hintLabelId\" class=\"mat-hint\">{{hintLabel}}</div>\n <ng-content select=\"mat-hint:not([align='end'])\"></ng-content>\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint[align='end']\"></ng-content>\n </div>\n </div>\n</div>\n",
|
|
634
|
+
animations: [matFormFieldAnimations.transitionMessages],
|
|
635
|
+
host: {
|
|
636
|
+
'class': 'mat-form-field',
|
|
637
|
+
'[class.mat-form-field-appearance-standard]': 'appearance == "standard"',
|
|
638
|
+
'[class.mat-form-field-appearance-fill]': 'appearance == "fill"',
|
|
639
|
+
'[class.mat-form-field-appearance-outline]': 'appearance == "outline"',
|
|
640
|
+
'[class.mat-form-field-appearance-legacy]': 'appearance == "legacy"',
|
|
641
|
+
'[class.mat-form-field-invalid]': '_control.errorState',
|
|
642
|
+
'[class.mat-form-field-can-float]': '_canLabelFloat',
|
|
643
|
+
'[class.mat-form-field-should-float]': '_shouldLabelFloat()',
|
|
644
|
+
'[class.mat-form-field-has-label]': '_hasFloatingLabel()',
|
|
645
|
+
'[class.mat-form-field-hide-placeholder]': '_hideControlPlaceholder()',
|
|
646
|
+
'[class.mat-form-field-disabled]': '_control.disabled',
|
|
647
|
+
'[class.mat-form-field-autofilled]': '_control.autofilled',
|
|
648
|
+
'[class.mat-focused]': '_control.focused',
|
|
649
|
+
'[class.mat-accent]': 'color == "accent"',
|
|
650
|
+
'[class.mat-warn]': 'color == "warn"',
|
|
651
|
+
'[class.ng-untouched]': '_shouldForward("untouched")',
|
|
652
|
+
'[class.ng-touched]': '_shouldForward("touched")',
|
|
653
|
+
'[class.ng-pristine]': '_shouldForward("pristine")',
|
|
654
|
+
'[class.ng-dirty]': '_shouldForward("dirty")',
|
|
655
|
+
'[class.ng-valid]': '_shouldForward("valid")',
|
|
656
|
+
'[class.ng-invalid]': '_shouldForward("invalid")',
|
|
657
|
+
'[class.ng-pending]': '_shouldForward("pending")',
|
|
658
|
+
'[class._mat-animation-noopable]': '!_animationsEnabled',
|
|
659
|
+
},
|
|
660
|
+
inputs: ['color'],
|
|
661
|
+
encapsulation: ViewEncapsulation.None,
|
|
662
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
663
|
+
providers: [
|
|
664
|
+
{ provide: MAT_FORM_FIELD, useExisting: MatFormField },
|
|
665
|
+
],
|
|
666
|
+
styles: [".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:scaleX(1);transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n", ".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\"\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n", ".mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\" \";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\"\";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n", ".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n", ".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n", ".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"]
|
|
667
|
+
},] }
|
|
668
|
+
];
|
|
669
|
+
MatFormField.ctorParameters = () => [
|
|
670
|
+
{ type: ElementRef },
|
|
671
|
+
{ type: ChangeDetectorRef },
|
|
672
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_LABEL_GLOBAL_OPTIONS,] }] },
|
|
673
|
+
{ type: Directionality, decorators: [{ type: Optional }] },
|
|
674
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_FORM_FIELD_DEFAULT_OPTIONS,] }] },
|
|
675
|
+
{ type: Platform },
|
|
676
|
+
{ type: NgZone },
|
|
677
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] }
|
|
678
|
+
];
|
|
679
|
+
MatFormField.propDecorators = {
|
|
680
|
+
appearance: [{ type: Input }],
|
|
681
|
+
hideRequiredMarker: [{ type: Input }],
|
|
682
|
+
hintLabel: [{ type: Input }],
|
|
683
|
+
floatLabel: [{ type: Input }],
|
|
684
|
+
underlineRef: [{ type: ViewChild, args: ['underline',] }],
|
|
685
|
+
_connectionContainerRef: [{ type: ViewChild, args: ['connectionContainer', { static: true },] }],
|
|
686
|
+
_inputContainerRef: [{ type: ViewChild, args: ['inputContainer',] }],
|
|
687
|
+
_label: [{ type: ViewChild, args: ['label',] }],
|
|
688
|
+
_controlNonStatic: [{ type: ContentChild, args: [MatFormFieldControl,] }],
|
|
689
|
+
_controlStatic: [{ type: ContentChild, args: [MatFormFieldControl, { static: true },] }],
|
|
690
|
+
_labelChildNonStatic: [{ type: ContentChild, args: [MatLabel,] }],
|
|
691
|
+
_labelChildStatic: [{ type: ContentChild, args: [MatLabel, { static: true },] }],
|
|
692
|
+
_placeholderChild: [{ type: ContentChild, args: [MatPlaceholder,] }],
|
|
693
|
+
_errorChildren: [{ type: ContentChildren, args: [MAT_ERROR, { descendants: true },] }],
|
|
694
|
+
_hintChildren: [{ type: ContentChildren, args: [_MAT_HINT, { descendants: true },] }],
|
|
695
|
+
_prefixChildren: [{ type: ContentChildren, args: [MAT_PREFIX, { descendants: true },] }],
|
|
696
|
+
_suffixChildren: [{ type: ContentChildren, args: [MAT_SUFFIX, { descendants: true },] }]
|
|
697
|
+
};
|
|
689
698
|
|
|
690
699
|
/**
|
|
691
700
|
* @license
|
|
@@ -694,39 +703,36 @@ let MatFormField = /** @class */ (() => {
|
|
|
694
703
|
* Use of this source code is governed by an MIT-style license that can be
|
|
695
704
|
* found in the LICENSE file at https://angular.io/license
|
|
696
705
|
*/
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
];
|
|
728
|
-
return MatFormFieldModule;
|
|
729
|
-
})();
|
|
706
|
+
class MatFormFieldModule {
|
|
707
|
+
}
|
|
708
|
+
MatFormFieldModule.decorators = [
|
|
709
|
+
{ type: NgModule, args: [{
|
|
710
|
+
declarations: [
|
|
711
|
+
MatError,
|
|
712
|
+
MatFormField,
|
|
713
|
+
MatHint,
|
|
714
|
+
MatLabel,
|
|
715
|
+
MatPlaceholder,
|
|
716
|
+
MatPrefix,
|
|
717
|
+
MatSuffix,
|
|
718
|
+
],
|
|
719
|
+
imports: [
|
|
720
|
+
CommonModule,
|
|
721
|
+
MatCommonModule,
|
|
722
|
+
ObserversModule,
|
|
723
|
+
],
|
|
724
|
+
exports: [
|
|
725
|
+
MatCommonModule,
|
|
726
|
+
MatError,
|
|
727
|
+
MatFormField,
|
|
728
|
+
MatHint,
|
|
729
|
+
MatLabel,
|
|
730
|
+
MatPlaceholder,
|
|
731
|
+
MatPrefix,
|
|
732
|
+
MatSuffix,
|
|
733
|
+
],
|
|
734
|
+
},] }
|
|
735
|
+
];
|
|
730
736
|
|
|
731
737
|
/**
|
|
732
738
|
* @license
|
|
@@ -740,5 +746,5 @@ let MatFormFieldModule = /** @class */ (() => {
|
|
|
740
746
|
* Generated bundle index. Do not edit.
|
|
741
747
|
*/
|
|
742
748
|
|
|
743
|
-
export { MAT_FORM_FIELD, MAT_FORM_FIELD_DEFAULT_OPTIONS, MatError, MatFormField, MatFormFieldControl, MatFormFieldModule, MatHint, MatLabel, MatPlaceholder, MatPrefix, MatSuffix, getMatFormFieldDuplicatedHintError, getMatFormFieldMissingControlError, getMatFormFieldPlaceholderConflictError, matFormFieldAnimations };
|
|
749
|
+
export { MAT_ERROR, MAT_FORM_FIELD, MAT_FORM_FIELD_DEFAULT_OPTIONS, MAT_PREFIX, MAT_SUFFIX, MatError, MatFormField, MatFormFieldControl, MatFormFieldModule, MatHint, MatLabel, MatPlaceholder, MatPrefix, MatSuffix, _MAT_HINT, getMatFormFieldDuplicatedHintError, getMatFormFieldMissingControlError, getMatFormFieldPlaceholderConflictError, matFormFieldAnimations };
|
|
744
750
|
//# sourceMappingURL=form-field.js.map
|