@angular/material 2.0.0-beta.0 → 2.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +4 -165
- package/_theming.scss +3878 -0
- package/autocomplete/index.d.ts +8 -5
- package/autocomplete/index.metadata.json +12 -1
- package/autocomplete/package.json +7 -0
- package/autocomplete/typings/autocomplete-module.d.ts +2 -0
- package/autocomplete/typings/autocomplete-trigger.d.ts +159 -0
- package/autocomplete/typings/autocomplete.d.ts +62 -0
- package/autocomplete/typings/index.d.ts +4 -0
- package/autocomplete/typings/index.metadata.json +1 -0
- package/autocomplete/typings/public-api.d.ts +10 -0
- package/autocomplete.d.ts +8 -0
- package/autocomplete.metadata.json +12 -0
- package/bundles/material-autocomplete.umd.js +2969 -0
- package/bundles/material-autocomplete.umd.js.map +1 -0
- package/bundles/material-autocomplete.umd.min.js +10 -0
- package/bundles/material-autocomplete.umd.min.js.map +1 -0
- package/bundles/material-button-toggle.umd.js +2284 -0
- package/bundles/material-button-toggle.umd.js.map +1 -0
- package/bundles/material-button-toggle.umd.min.js +10 -0
- package/bundles/material-button-toggle.umd.min.js.map +1 -0
- package/bundles/material-button.umd.js +2092 -0
- package/bundles/material-button.umd.js.map +1 -0
- package/bundles/material-button.umd.min.js +10 -0
- package/bundles/material-button.umd.min.js.map +1 -0
- package/bundles/material-card.umd.js +2006 -0
- package/bundles/material-card.umd.js.map +1 -0
- package/bundles/material-card.umd.min.js +9 -0
- package/bundles/material-card.umd.min.js.map +1 -0
- package/bundles/material-checkbox.umd.js +2327 -0
- package/bundles/material-checkbox.umd.js.map +1 -0
- package/bundles/material-checkbox.umd.min.js +10 -0
- package/bundles/material-checkbox.umd.min.js.map +1 -0
- package/bundles/material-chips.umd.js +3542 -0
- package/bundles/material-chips.umd.js.map +1 -0
- package/bundles/material-chips.umd.min.js +10 -0
- package/bundles/material-chips.umd.min.js.map +1 -0
- package/bundles/material-core.umd.js +2206 -0
- package/bundles/material-core.umd.js.map +1 -0
- package/bundles/material-core.umd.min.js +9 -0
- package/bundles/material-core.umd.min.js.map +1 -0
- package/bundles/material-datepicker.umd.js +6128 -0
- package/bundles/material-datepicker.umd.js.map +1 -0
- package/bundles/material-datepicker.umd.min.js +12 -0
- package/bundles/material-datepicker.umd.min.js.map +1 -0
- package/bundles/material-dialog.umd.js +2530 -0
- package/bundles/material-dialog.umd.js.map +1 -0
- package/bundles/material-dialog.umd.min.js +10 -0
- package/bundles/material-dialog.umd.min.js.map +1 -0
- package/bundles/material-expansion.umd.js +2128 -0
- package/bundles/material-expansion.umd.js.map +1 -0
- package/bundles/material-expansion.umd.min.js +9 -0
- package/bundles/material-expansion.umd.min.js.map +1 -0
- package/bundles/material-form-field.umd.js +2091 -0
- package/bundles/material-form-field.umd.js.map +1 -0
- package/bundles/material-form-field.umd.min.js +10 -0
- package/bundles/material-form-field.umd.min.js.map +1 -0
- package/bundles/material-grid-list.umd.js +2621 -0
- package/bundles/material-grid-list.umd.js.map +1 -0
- package/bundles/material-grid-list.umd.min.js +10 -0
- package/bundles/material-grid-list.umd.min.js.map +1 -0
- package/bundles/material-icon.umd.js +2442 -0
- package/bundles/material-icon.umd.js.map +1 -0
- package/bundles/material-icon.umd.min.js +10 -0
- package/bundles/material-icon.umd.min.js.map +1 -0
- package/bundles/material-input.umd.js +2716 -0
- package/bundles/material-input.umd.js.map +1 -0
- package/bundles/material-input.umd.min.js +10 -0
- package/bundles/material-input.umd.min.js.map +1 -0
- package/bundles/material-list.umd.js +2611 -0
- package/bundles/material-list.umd.js.map +1 -0
- package/bundles/material-list.umd.min.js +11 -0
- package/bundles/material-list.umd.min.js.map +1 -0
- package/bundles/material-menu.umd.js +2613 -0
- package/bundles/material-menu.umd.js.map +1 -0
- package/bundles/material-menu.umd.min.js +10 -0
- package/bundles/material-menu.umd.min.js.map +1 -0
- package/bundles/material-paginator.umd.js +5228 -0
- package/bundles/material-paginator.umd.js.map +1 -0
- package/bundles/material-paginator.umd.min.js +11 -0
- package/bundles/material-paginator.umd.min.js.map +1 -0
- package/bundles/material-progress-bar.umd.js +1784 -0
- package/bundles/material-progress-bar.umd.js.map +1 -0
- package/bundles/material-progress-bar.umd.min.js +9 -0
- package/bundles/material-progress-bar.umd.min.js.map +1 -0
- package/bundles/material-progress-spinner.umd.js +2005 -0
- package/bundles/material-progress-spinner.umd.js.map +1 -0
- package/bundles/material-progress-spinner.umd.min.js +10 -0
- package/bundles/material-progress-spinner.umd.min.js.map +1 -0
- package/bundles/material-radio.umd.js +2530 -0
- package/bundles/material-radio.umd.js.map +1 -0
- package/bundles/material-radio.umd.min.js +10 -0
- package/bundles/material-radio.umd.min.js.map +1 -0
- package/bundles/material-select.umd.js +3843 -0
- package/bundles/material-select.umd.js.map +1 -0
- package/bundles/material-select.umd.min.js +10 -0
- package/bundles/material-select.umd.min.js.map +1 -0
- package/bundles/material-sidenav.umd.js +2577 -0
- package/bundles/material-sidenav.umd.js.map +1 -0
- package/bundles/material-sidenav.umd.min.js +10 -0
- package/bundles/material-sidenav.umd.min.js.map +1 -0
- package/bundles/material-slide-toggle.umd.js +2253 -0
- package/bundles/material-slide-toggle.umd.js.map +1 -0
- package/bundles/material-slide-toggle.umd.min.js +10 -0
- package/bundles/material-slide-toggle.umd.min.js.map +1 -0
- package/bundles/material-slider.umd.js +2621 -0
- package/bundles/material-slider.umd.js.map +1 -0
- package/bundles/material-slider.umd.min.js +10 -0
- package/bundles/material-slider.umd.min.js.map +1 -0
- package/bundles/material-snack-bar.umd.js +2258 -0
- package/bundles/material-snack-bar.umd.js.map +1 -0
- package/bundles/material-snack-bar.umd.min.js +10 -0
- package/bundles/material-snack-bar.umd.min.js.map +1 -0
- package/bundles/material-sort.umd.js +1917 -0
- package/bundles/material-sort.umd.js.map +1 -0
- package/bundles/material-sort.umd.min.js +9 -0
- package/bundles/material-sort.umd.min.js.map +1 -0
- package/bundles/material-stepper.umd.js +3271 -0
- package/bundles/material-stepper.umd.js.map +1 -0
- package/bundles/material-stepper.umd.min.js +10 -0
- package/bundles/material-stepper.umd.min.js.map +1 -0
- package/bundles/material-table.umd.js +1976 -0
- package/bundles/material-table.umd.js.map +1 -0
- package/bundles/material-table.umd.min.js +9 -0
- package/bundles/material-table.umd.min.js.map +1 -0
- package/bundles/material-tabs.umd.js +3341 -0
- package/bundles/material-tabs.umd.js.map +1 -0
- package/bundles/material-tabs.umd.min.js +10 -0
- package/bundles/material-tabs.umd.min.js.map +1 -0
- package/bundles/material-toolbar.umd.js +1790 -0
- package/bundles/material-toolbar.umd.js.map +1 -0
- package/bundles/material-toolbar.umd.min.js +9 -0
- package/bundles/material-toolbar.umd.min.js.map +1 -0
- package/bundles/material-tooltip.umd.js +2339 -0
- package/bundles/material-tooltip.umd.js.map +1 -0
- package/bundles/material-tooltip.umd.min.js +10 -0
- package/bundles/material-tooltip.umd.min.js.map +1 -0
- package/bundles/material.umd.js +21541 -12552
- package/bundles/material.umd.js.map +1 -0
- package/bundles/material.umd.min.js +22 -0
- package/bundles/material.umd.min.js.map +1 -0
- package/button/index.d.ts +8 -1
- package/button/index.metadata.json +12 -1
- package/button/package.json +7 -0
- package/button/typings/button-module.d.ts +2 -0
- package/button/typings/button.d.ts +77 -0
- package/button/typings/index.d.ts +4 -0
- package/button/typings/index.metadata.json +1 -0
- package/button/typings/public-api.d.ts +9 -0
- package/button-toggle/index.d.ts +8 -1
- package/button-toggle/index.metadata.json +12 -1
- package/button-toggle/package.json +7 -0
- package/button-toggle/typings/button-toggle-module.d.ts +2 -0
- package/button-toggle/typings/button-toggle.d.ts +163 -0
- package/button-toggle/typings/index.d.ts +4 -0
- package/button-toggle/typings/index.metadata.json +1 -0
- package/button-toggle/typings/public-api.d.ts +9 -0
- package/button-toggle.d.ts +8 -0
- package/button-toggle.metadata.json +12 -0
- package/button.d.ts +8 -0
- package/button.metadata.json +12 -0
- package/card/index.d.ts +8 -1
- package/card/index.metadata.json +12 -1
- package/card/package.json +7 -0
- package/card/typings/card-module.d.ts +2 -0
- package/card/typings/card.d.ts +95 -0
- package/card/typings/index.d.ts +4 -0
- package/card/typings/index.metadata.json +1 -0
- package/card/typings/public-api.d.ts +9 -0
- package/card.d.ts +8 -0
- package/card.metadata.json +12 -0
- package/checkbox/index.d.ts +8 -1
- package/checkbox/index.metadata.json +12 -1
- package/checkbox/package.json +7 -0
- package/checkbox/typings/checkbox-module.d.ts +2 -0
- package/checkbox/typings/checkbox-required-validator.d.ts +18 -0
- package/checkbox/typings/checkbox.d.ts +157 -0
- package/checkbox/typings/index.d.ts +4 -0
- package/checkbox/typings/index.metadata.json +1 -0
- package/checkbox/typings/public-api.d.ts +10 -0
- package/checkbox.d.ts +8 -0
- package/checkbox.metadata.json +12 -0
- package/chips/index.d.ts +8 -2
- package/chips/index.metadata.json +12 -1
- package/chips/package.json +7 -0
- package/chips/typings/chip-input.d.ts +43 -0
- package/chips/typings/chip-list.d.ts +222 -0
- package/chips/typings/chip.d.ts +123 -0
- package/chips/typings/chips-module.d.ts +2 -0
- package/chips/typings/index.d.ts +4 -0
- package/chips/typings/index.metadata.json +1 -0
- package/chips/typings/public-api.d.ts +11 -0
- package/chips.d.ts +8 -0
- package/chips.metadata.json +12 -0
- package/core/index.d.ts +8 -1
- package/core/index.metadata.json +12 -1
- package/core/package.json +7 -0
- package/core/typings/animation/animation.d.ts +20 -0
- package/core/typings/common-behaviors/color.d.ts +22 -0
- package/core/typings/common-behaviors/common-module.d.ts +25 -0
- package/core/typings/common-behaviors/constructor.d.ts +9 -0
- package/core/typings/common-behaviors/disable-ripple.d.ts +7 -0
- package/core/typings/common-behaviors/disabled.d.ts +7 -0
- package/core/typings/common-behaviors/index.d.ts +12 -0
- package/core/typings/common-behaviors/tabindex.d.ts +15 -0
- package/core/typings/compatibility/compatibility.d.ts +32 -0
- package/core/typings/datetime/date-adapter.d.ts +198 -0
- package/core/typings/datetime/date-formats.d.ts +20 -0
- package/core/typings/datetime/index.d.ts +8 -0
- package/core/typings/datetime/native-date-adapter.d.ts +50 -0
- package/core/typings/datetime/native-date-formats.d.ts +9 -0
- package/core/typings/error/error-options.d.ts +9 -0
- package/core/typings/gestures/gesture-annotations.d.ts +51 -0
- package/core/{gestures → typings/gestures}/gesture-config.d.ts +0 -0
- package/core/typings/index.d.ts +5 -0
- package/core/typings/index.metadata.json +1 -0
- package/core/typings/line/line.d.ts +30 -0
- package/core/typings/option/index.d.ts +4 -0
- package/core/typings/option/optgroup.d.ts +14 -0
- package/core/typings/option/option.d.ts +90 -0
- package/core/typings/placeholder/placeholder-options.d.ts +15 -0
- package/core/typings/public-api.d.ts +22 -0
- package/core/typings/ripple/index.d.ts +5 -0
- package/core/typings/ripple/ripple-ref.d.ts +28 -0
- package/core/typings/ripple/ripple-renderer.d.ts +69 -0
- package/core/typings/ripple/ripple.d.ts +65 -0
- package/core/typings/selection/index.d.ts +3 -0
- package/core/typings/selection/pseudo-checkbox/pseudo-checkbox.d.ts +20 -0
- package/core/typings/style/apply-transform.d.ts +13 -0
- package/core/typings/style/index.d.ts +8 -0
- package/core/typings/testing/month-constants.d.ts +12 -0
- package/core/typings/util/object-extend.d.ts +15 -0
- package/core.d.ts +7 -0
- package/core.metadata.json +12 -1
- package/datepicker/index.d.ts +8 -0
- package/datepicker/index.metadata.json +12 -0
- package/datepicker/package.json +7 -0
- package/datepicker/typings/calendar-body.d.ts +52 -0
- package/datepicker/typings/calendar.d.ts +97 -0
- package/datepicker/typings/coerce-date-property.d.ts +19 -0
- package/datepicker/typings/datepicker-errors.d.ts +9 -0
- package/datepicker/typings/datepicker-input.d.ts +92 -0
- package/datepicker/typings/datepicker-intl.d.ts +25 -0
- package/datepicker/typings/datepicker-module.d.ts +2 -0
- package/datepicker/typings/datepicker-toggle.d.ts +24 -0
- package/datepicker/typings/datepicker.d.ts +117 -0
- package/datepicker/typings/index.d.ts +4 -0
- package/datepicker/typings/index.metadata.json +1 -0
- package/datepicker/typings/month-view.d.ts +66 -0
- package/datepicker/typings/public-api.d.ts +17 -0
- package/datepicker/typings/year-view.d.ts +55 -0
- package/datepicker.d.ts +8 -0
- package/datepicker.metadata.json +12 -0
- package/dialog/index.d.ts +8 -9
- package/dialog/index.metadata.json +12 -1
- package/dialog/package.json +7 -0
- package/dialog/typings/dialog-config.d.ts +54 -0
- package/dialog/typings/dialog-container.d.ts +68 -0
- package/dialog/typings/dialog-content-directives.d.ts +43 -0
- package/dialog/typings/dialog-module.d.ts +2 -0
- package/dialog/typings/dialog-ref.d.ts +68 -0
- package/dialog/typings/dialog.d.ts +108 -0
- package/dialog/typings/index.d.ts +4 -0
- package/dialog/typings/index.metadata.json +1 -0
- package/dialog/typings/public-api.d.ts +13 -0
- package/dialog.d.ts +8 -0
- package/dialog.metadata.json +12 -0
- package/esm2015/autocomplete.js +673 -0
- package/esm2015/autocomplete.js.map +1 -0
- package/esm2015/button-toggle.js +589 -0
- package/esm2015/button-toggle.js.map +1 -0
- package/esm2015/button.js +318 -0
- package/esm2015/button.js.map +1 -0
- package/esm2015/card.js +312 -0
- package/esm2015/card.js.map +1 -0
- package/esm2015/checkbox.js +500 -0
- package/esm2015/checkbox.js.map +1 -0
- package/esm2015/chips.js +1330 -0
- package/esm2015/chips.js.map +1 -0
- package/esm2015/core.js +2117 -0
- package/esm2015/core.js.map +1 -0
- package/esm2015/datepicker.js +1813 -0
- package/esm2015/datepicker.js.map +1 -0
- package/esm2015/dialog.js +854 -0
- package/esm2015/dialog.js.map +1 -0
- package/esm2015/expansion.js +587 -0
- package/esm2015/expansion.js.map +1 -0
- package/esm2015/form-field.js +535 -0
- package/esm2015/form-field.js.map +1 -0
- package/esm2015/grid-list.js +827 -0
- package/esm2015/grid-list.js.map +1 -0
- package/esm2015/icon.js +735 -0
- package/esm2015/icon.js.map +1 -0
- package/esm2015/input.js +585 -0
- package/esm2015/input.js.map +1 -0
- package/esm2015/list.js +640 -0
- package/esm2015/list.js.map +1 -0
- package/esm2015/material.js +51 -0
- package/esm2015/material.js.map +1 -0
- package/esm2015/menu.js +923 -0
- package/esm2015/menu.js.map +1 -0
- package/esm2015/paginator.js +303 -0
- package/esm2015/paginator.js.map +1 -0
- package/esm2015/progress-bar.js +133 -0
- package/esm2015/progress-bar.js.map +1 -0
- package/esm2015/progress-spinner.js +303 -0
- package/esm2015/progress-spinner.js.map +1 -0
- package/esm2015/radio.js +709 -0
- package/esm2015/radio.js.map +1 -0
- package/esm2015/select.js +1394 -0
- package/esm2015/select.js.map +1 -0
- package/esm2015/sidenav.js +866 -0
- package/esm2015/sidenav.js.map +1 -0
- package/esm2015/slide-toggle.js +428 -0
- package/esm2015/slide-toggle.js.map +1 -0
- package/esm2015/slider.js +834 -0
- package/esm2015/slider.js.map +1 -0
- package/esm2015/snack-bar.js +596 -0
- package/esm2015/snack-bar.js.map +1 -0
- package/esm2015/sort.js +371 -0
- package/esm2015/sort.js.map +1 -0
- package/esm2015/stepper.js +395 -0
- package/esm2015/stepper.js.map +1 -0
- package/esm2015/table.js +272 -0
- package/esm2015/table.js.map +1 -0
- package/esm2015/tabs.js +1480 -0
- package/esm2015/tabs.js.map +1 -0
- package/esm2015/toolbar.js +89 -0
- package/esm2015/toolbar.js.map +1 -0
- package/esm2015/tooltip.js +671 -0
- package/esm2015/tooltip.js.map +1 -0
- package/esm5/autocomplete.es5.js +712 -0
- package/esm5/autocomplete.es5.js.map +1 -0
- package/esm5/button-toggle.es5.js +646 -0
- package/esm5/button-toggle.es5.js.map +1 -0
- package/esm5/button.es5.js +344 -0
- package/esm5/button.es5.js.map +1 -0
- package/esm5/card.es5.js +355 -0
- package/esm5/card.es5.js.map +1 -0
- package/esm5/checkbox.es5.js +538 -0
- package/esm5/checkbox.es5.js.map +1 -0
- package/esm5/chips.es5.js +1464 -0
- package/esm5/chips.es5.js.map +1 -0
- package/esm5/core.es5.js +2126 -0
- package/esm5/core.es5.js.map +1 -0
- package/esm5/datepicker.es5.js +1946 -0
- package/esm5/datepicker.es5.js.map +1 -0
- package/esm5/dialog.es5.js +894 -0
- package/esm5/dialog.es5.js.map +1 -0
- package/esm5/expansion.es5.js +622 -0
- package/esm5/expansion.es5.js.map +1 -0
- package/esm5/form-field.es5.js +580 -0
- package/esm5/form-field.es5.js.map +1 -0
- package/esm5/grid-list.es5.js +888 -0
- package/esm5/grid-list.es5.js.map +1 -0
- package/esm5/icon.es5.js +754 -0
- package/esm5/icon.es5.js.map +1 -0
- package/esm5/input.es5.js +630 -0
- package/esm5/input.es5.js.map +1 -0
- package/esm5/list.es5.js +704 -0
- package/esm5/list.es5.js.map +1 -0
- package/esm5/material.es5.js +51 -0
- package/esm5/material.es5.js.map +1 -0
- package/esm5/menu.es5.js +962 -0
- package/esm5/menu.es5.js.map +1 -0
- package/esm5/paginator.es5.js +328 -0
- package/esm5/paginator.es5.js.map +1 -0
- package/esm5/progress-bar.es5.js +147 -0
- package/esm5/progress-bar.es5.js.map +1 -0
- package/esm5/progress-spinner.es5.js +317 -0
- package/esm5/progress-spinner.es5.js.map +1 -0
- package/esm5/radio.es5.js +786 -0
- package/esm5/radio.es5.js.map +1 -0
- package/esm5/select.es5.js +1481 -0
- package/esm5/select.es5.js.map +1 -0
- package/esm5/sidenav.es5.js +946 -0
- package/esm5/sidenav.es5.js.map +1 -0
- package/esm5/slide-toggle.es5.js +455 -0
- package/esm5/slide-toggle.es5.js.map +1 -0
- package/esm5/slider.es5.js +938 -0
- package/esm5/slider.es5.js.map +1 -0
- package/esm5/snack-bar.es5.js +622 -0
- package/esm5/snack-bar.es5.js.map +1 -0
- package/esm5/sort.es5.js +389 -0
- package/esm5/sort.es5.js.map +1 -0
- package/esm5/stepper.es5.js +448 -0
- package/esm5/stepper.es5.js.map +1 -0
- package/esm5/table.es5.js +323 -0
- package/esm5/table.es5.js.map +1 -0
- package/esm5/tabs.es5.js +1591 -0
- package/esm5/tabs.es5.js.map +1 -0
- package/esm5/toolbar.es5.js +100 -0
- package/esm5/toolbar.es5.js.map +1 -0
- package/esm5/tooltip.es5.js +705 -0
- package/esm5/tooltip.es5.js.map +1 -0
- package/expansion/index.d.ts +8 -0
- package/expansion/index.metadata.json +12 -0
- package/expansion/package.json +7 -0
- package/expansion/typings/accordion-item.d.ts +41 -0
- package/expansion/typings/accordion.d.ts +29 -0
- package/expansion/typings/expansion-module.d.ts +2 -0
- package/expansion/typings/expansion-panel-header.d.ts +49 -0
- package/expansion/typings/expansion-panel.d.ts +40 -0
- package/expansion/typings/index.d.ts +5 -0
- package/expansion/typings/index.metadata.json +1 -0
- package/expansion/typings/public-api.d.ts +12 -0
- package/expansion.d.ts +8 -0
- package/expansion.metadata.json +12 -0
- package/form-field/index.d.ts +8 -0
- package/form-field/index.metadata.json +12 -0
- package/form-field/package.json +7 -0
- package/form-field/typings/error.d.ts +4 -0
- package/form-field/typings/form-field-control.d.ts +47 -0
- package/form-field/typings/form-field-errors.d.ts +13 -0
- package/form-field/typings/form-field-module.d.ts +2 -0
- package/form-field/typings/form-field.d.ts +78 -0
- package/form-field/typings/hint.d.ts +7 -0
- package/form-field/typings/index.d.ts +4 -0
- package/form-field/typings/index.metadata.json +1 -0
- package/form-field/typings/placeholder.d.ts +3 -0
- package/form-field/typings/prefix.d.ts +3 -0
- package/form-field/typings/public-api.d.ts +16 -0
- package/form-field/typings/suffix.d.ts +3 -0
- package/form-field.d.ts +8 -0
- package/form-field.metadata.json +12 -0
- package/grid-list/index.d.ts +8 -1
- package/grid-list/index.metadata.json +12 -1
- package/grid-list/package.json +7 -0
- package/grid-list/typings/grid-list-measure.d.ts +17 -0
- package/grid-list/typings/grid-list-module.d.ts +2 -0
- package/grid-list/typings/grid-list.d.ts +53 -0
- package/grid-list/typings/grid-tile.d.ts +55 -0
- package/grid-list/typings/index.d.ts +5 -0
- package/grid-list/typings/index.metadata.json +1 -0
- package/grid-list/typings/public-api.d.ts +10 -0
- package/grid-list/typings/tile-coordinator.d.ts +64 -0
- package/grid-list/typings/tile-styler.d.ts +129 -0
- package/grid-list.d.ts +8 -0
- package/grid-list.metadata.json +12 -0
- package/icon/index.d.ts +8 -1
- package/icon/index.metadata.json +12 -1
- package/icon/package.json +7 -0
- package/icon/typings/icon-module.d.ts +2 -0
- package/icon/typings/icon-registry.d.ts +187 -0
- package/icon/typings/icon.d.ts +69 -0
- package/icon/typings/index.d.ts +4 -0
- package/icon/typings/index.metadata.json +1 -0
- package/icon/typings/public-api.d.ts +10 -0
- package/icon.d.ts +8 -0
- package/icon.metadata.json +12 -0
- package/input/index.d.ts +8 -4
- package/input/index.metadata.json +12 -1
- package/input/package.json +7 -0
- package/input/typings/autosize.d.ts +43 -0
- package/input/typings/index.d.ts +4 -0
- package/input/typings/index.metadata.json +1 -0
- package/input/typings/input-errors.d.ts +9 -0
- package/input/typings/input-module.d.ts +2 -0
- package/input/typings/input.d.ts +85 -0
- package/input/typings/public-api.d.ts +11 -0
- package/input.d.ts +8 -0
- package/input.metadata.json +12 -0
- package/list/index.d.ts +8 -1
- package/list/index.metadata.json +12 -1
- package/list/package.json +7 -0
- package/list/typings/index.d.ts +4 -0
- package/list/typings/index.metadata.json +1 -0
- package/list/typings/list-module.d.ts +2 -0
- package/list/typings/list.d.ts +77 -0
- package/list/typings/public-api.d.ts +10 -0
- package/list/typings/selection-list.d.ts +103 -0
- package/list.d.ts +8 -0
- package/list.metadata.json +12 -0
- package/material.d.ts +39 -0
- package/material.metadata.json +105 -0
- package/menu/index.d.ts +8 -5
- package/menu/index.metadata.json +12 -1
- package/menu/package.json +7 -0
- package/menu/typings/index.d.ts +6 -0
- package/menu/typings/index.metadata.json +1 -0
- package/menu/typings/menu-animations.d.ts +27 -0
- package/menu/typings/menu-directive.d.ts +89 -0
- package/menu/typings/menu-errors.d.ts +24 -0
- package/menu/typings/menu-item.d.ts +42 -0
- package/menu/typings/menu-module.d.ts +2 -0
- package/menu/typings/menu-panel.d.ts +22 -0
- package/menu/typings/menu-positions.d.ts +9 -0
- package/menu/typings/menu-trigger.d.ts +115 -0
- package/menu/typings/menu.d.ts +12 -0
- package/menu/typings/public-api.d.ts +11 -0
- package/menu.d.ts +8 -0
- package/menu.metadata.json +12 -0
- package/package.json +10 -9
- package/paginator/index.d.ts +8 -0
- package/paginator/index.metadata.json +12 -0
- package/paginator/package.json +7 -0
- package/paginator/typings/index.d.ts +4 -0
- package/paginator/typings/index.metadata.json +1 -0
- package/paginator/typings/paginator-intl.d.ts +20 -0
- package/paginator/typings/paginator-module.d.ts +2 -0
- package/paginator/typings/paginator.d.ts +75 -0
- package/paginator/typings/public-api.d.ts +10 -0
- package/paginator.d.ts +8 -0
- package/paginator.metadata.json +12 -0
- package/prebuilt-themes/deeppurple-amber.css +1 -0
- package/prebuilt-themes/indigo-pink.css +1 -0
- package/prebuilt-themes/pink-bluegrey.css +1 -0
- package/prebuilt-themes/purple-green.css +1 -0
- package/progress-bar/index.d.ts +8 -1
- package/progress-bar/index.metadata.json +12 -1
- package/progress-bar/package.json +7 -0
- package/progress-bar/typings/index.d.ts +4 -0
- package/progress-bar/typings/index.metadata.json +1 -0
- package/progress-bar/typings/progress-bar-module.d.ts +2 -0
- package/progress-bar/typings/progress-bar.d.ts +32 -0
- package/progress-bar/typings/public-api.d.ts +9 -0
- package/progress-bar.d.ts +8 -0
- package/progress-bar.metadata.json +12 -0
- package/progress-spinner/index.d.ts +8 -2
- package/progress-spinner/index.metadata.json +12 -1
- package/progress-spinner/package.json +7 -0
- package/progress-spinner/typings/index.d.ts +4 -0
- package/progress-spinner/typings/index.metadata.json +1 -0
- package/progress-spinner/typings/progress-spinner-module.d.ts +3 -0
- package/progress-spinner/typings/progress-spinner.d.ts +69 -0
- package/progress-spinner/typings/public-api.d.ts +9 -0
- package/progress-spinner.d.ts +8 -0
- package/progress-spinner.metadata.json +12 -0
- package/radio/index.d.ts +8 -1
- package/radio/index.metadata.json +12 -1
- package/radio/package.json +7 -0
- package/radio/typings/index.d.ts +4 -0
- package/radio/typings/index.metadata.json +1 -0
- package/radio/typings/public-api.d.ts +9 -0
- package/radio/typings/radio-module.d.ts +2 -0
- package/radio/typings/radio.d.ts +215 -0
- package/radio.d.ts +8 -0
- package/radio.metadata.json +12 -0
- package/select/index.d.ts +8 -7
- package/select/index.metadata.json +12 -1
- package/select/package.json +7 -0
- package/select/typings/index.d.ts +4 -0
- package/select/typings/index.metadata.json +1 -0
- package/select/typings/public-api.d.ts +10 -0
- package/select/typings/select-animations.d.ts +30 -0
- package/select/typings/select-errors.d.ts +26 -0
- package/select/typings/select-module.d.ts +2 -0
- package/select/typings/select.d.ts +393 -0
- package/select.d.ts +8 -0
- package/select.metadata.json +12 -0
- package/sidenav/index.d.ts +8 -1
- package/sidenav/index.metadata.json +12 -1
- package/sidenav/package.json +7 -0
- package/sidenav/typings/drawer.d.ts +190 -0
- package/sidenav/typings/index.d.ts +4 -0
- package/sidenav/typings/index.metadata.json +1 -0
- package/sidenav/typings/public-api.d.ts +10 -0
- package/sidenav/typings/sidenav-module.d.ts +2 -0
- package/sidenav/typings/sidenav.d.ts +33 -0
- package/sidenav.d.ts +8 -0
- package/sidenav.metadata.json +12 -0
- package/slide-toggle/index.d.ts +8 -1
- package/slide-toggle/index.metadata.json +12 -1
- package/slide-toggle/package.json +7 -0
- package/slide-toggle/typings/index.d.ts +4 -0
- package/slide-toggle/typings/index.metadata.json +1 -0
- package/slide-toggle/typings/public-api.d.ts +9 -0
- package/slide-toggle/typings/slide-toggle-module.d.ts +2 -0
- package/slide-toggle/typings/slide-toggle.d.ts +93 -0
- package/slide-toggle.d.ts +8 -0
- package/slide-toggle.metadata.json +12 -0
- package/slider/index.d.ts +8 -1
- package/slider/index.metadata.json +12 -1
- package/slider/package.json +7 -0
- package/slider/typings/index.d.ts +4 -0
- package/slider/typings/index.metadata.json +1 -0
- package/slider/typings/public-api.d.ts +9 -0
- package/slider/typings/slider-module.d.ts +2 -0
- package/slider/typings/slider.d.ts +207 -0
- package/slider.d.ts +8 -0
- package/slider.metadata.json +12 -0
- package/snack-bar/index.d.ts +8 -4
- package/snack-bar/index.metadata.json +12 -1
- package/snack-bar/package.json +7 -0
- package/snack-bar/typings/index.d.ts +4 -0
- package/snack-bar/typings/index.metadata.json +1 -0
- package/snack-bar/typings/public-api.d.ts +13 -0
- package/snack-bar/typings/simple-snack-bar.d.ts +18 -0
- package/snack-bar/typings/snack-bar-config.d.ts +38 -0
- package/snack-bar/typings/snack-bar-container.d.ts +55 -0
- package/snack-bar/typings/snack-bar-module.d.ts +2 -0
- package/snack-bar/typings/snack-bar-ref.d.ts +51 -0
- package/snack-bar/typings/snack-bar.d.ts +70 -0
- package/snack-bar.d.ts +8 -0
- package/snack-bar.metadata.json +12 -0
- package/sort/index.d.ts +8 -0
- package/sort/index.metadata.json +12 -0
- package/sort/package.json +7 -0
- package/sort/typings/index.d.ts +4 -0
- package/sort/typings/index.metadata.json +1 -0
- package/sort/typings/public-api.d.ts +12 -0
- package/sort/typings/sort-direction.d.ts +8 -0
- package/sort/typings/sort-errors.d.ts +15 -0
- package/sort/typings/sort-header-intl.d.ts +17 -0
- package/sort/typings/sort-header.d.ts +43 -0
- package/sort/typings/sort-module.d.ts +2 -0
- package/sort/typings/sort.d.ts +55 -0
- package/sort.d.ts +8 -0
- package/sort.metadata.json +12 -0
- package/stepper/index.d.ts +8 -0
- package/stepper/index.metadata.json +12 -0
- package/stepper/package.json +7 -0
- package/stepper/typings/index.d.ts +4 -0
- package/stepper/typings/index.metadata.json +1 -0
- package/stepper/typings/public-api.d.ts +13 -0
- package/stepper/typings/step-header.d.ts +41 -0
- package/stepper/typings/step-label.d.ts +14 -0
- package/stepper/typings/stepper-button.d.ts +10 -0
- package/stepper/typings/stepper-intl.d.ts +11 -0
- package/stepper/typings/stepper-module.d.ts +2 -0
- package/stepper/typings/stepper.d.ts +26 -0
- package/stepper.d.ts +8 -0
- package/stepper.metadata.json +12 -0
- package/table/index.d.ts +8 -0
- package/table/index.metadata.json +12 -0
- package/table/package.json +7 -0
- package/table/typings/cell.d.ts +43 -0
- package/table/typings/index.d.ts +4 -0
- package/table/typings/index.metadata.json +1 -0
- package/table/typings/public-api.d.ts +11 -0
- package/table/typings/row.d.ts +25 -0
- package/table/typings/table-module.d.ts +2 -0
- package/table/typings/table.d.ts +8 -0
- package/table.d.ts +8 -0
- package/table.metadata.json +12 -0
- package/tabs/index.d.ts +8 -7
- package/tabs/index.metadata.json +12 -1
- package/tabs/package.json +7 -0
- package/tabs/typings/index.d.ts +8 -0
- package/tabs/typings/index.metadata.json +1 -0
- package/tabs/typings/ink-bar.d.ts +33 -0
- package/tabs/typings/public-api.d.ts +16 -0
- package/tabs/typings/tab-body.d.ts +69 -0
- package/tabs/typings/tab-group.d.ts +104 -0
- package/tabs/typings/tab-header.d.ts +158 -0
- package/tabs/typings/tab-label-wrapper.d.ts +25 -0
- package/tabs/typings/tab-label.d.ts +15 -0
- package/tabs/typings/tab-nav-bar/index.d.ts +8 -0
- package/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts +78 -0
- package/tabs/typings/tab.d.ts +50 -0
- package/tabs/typings/tabs-module.d.ts +2 -0
- package/tabs.d.ts +8 -0
- package/tabs.metadata.json +12 -0
- package/toolbar/index.d.ts +8 -1
- package/toolbar/index.metadata.json +12 -1
- package/toolbar/package.json +7 -0
- package/toolbar/typings/index.d.ts +4 -0
- package/toolbar/typings/index.metadata.json +1 -0
- package/toolbar/typings/public-api.d.ts +9 -0
- package/toolbar/typings/toolbar-module.d.ts +2 -0
- package/toolbar/typings/toolbar.d.ts +21 -0
- package/toolbar.d.ts +8 -0
- package/toolbar.metadata.json +12 -0
- package/tooltip/index.d.ts +8 -1
- package/tooltip/index.metadata.json +12 -1
- package/tooltip/package.json +7 -0
- package/tooltip/typings/index.d.ts +4 -0
- package/tooltip/typings/index.metadata.json +1 -0
- package/tooltip/typings/public-api.d.ts +9 -0
- package/tooltip/typings/tooltip-module.d.ts +2 -0
- package/tooltip/typings/tooltip.d.ts +175 -0
- package/tooltip.d.ts +8 -0
- package/tooltip.metadata.json +12 -0
- package/typings/autocomplete/autocomplete-module.d.ts +2 -0
- package/typings/autocomplete/autocomplete-trigger.d.ts +159 -0
- package/typings/autocomplete/autocomplete.d.ts +62 -0
- package/typings/autocomplete/index.d.ts +4 -0
- package/typings/autocomplete/index.metadata.json +1 -0
- package/typings/autocomplete/public-api.d.ts +10 -0
- package/typings/button/button-module.d.ts +2 -0
- package/typings/button/button.d.ts +77 -0
- package/typings/button/index.d.ts +4 -0
- package/typings/button/index.metadata.json +1 -0
- package/typings/button/public-api.d.ts +9 -0
- package/typings/button-toggle/button-toggle-module.d.ts +2 -0
- package/typings/button-toggle/button-toggle.d.ts +163 -0
- package/typings/button-toggle/index.d.ts +4 -0
- package/typings/button-toggle/index.metadata.json +1 -0
- package/typings/button-toggle/public-api.d.ts +9 -0
- package/typings/card/card-module.d.ts +2 -0
- package/typings/card/card.d.ts +95 -0
- package/typings/card/index.d.ts +4 -0
- package/typings/card/index.metadata.json +1 -0
- package/typings/card/public-api.d.ts +9 -0
- package/typings/checkbox/checkbox-module.d.ts +2 -0
- package/typings/checkbox/checkbox-required-validator.d.ts +18 -0
- package/typings/checkbox/checkbox.d.ts +157 -0
- package/typings/checkbox/index.d.ts +4 -0
- package/typings/checkbox/index.metadata.json +1 -0
- package/typings/checkbox/public-api.d.ts +10 -0
- package/typings/chips/chip-input.d.ts +43 -0
- package/typings/chips/chip-list.d.ts +222 -0
- package/typings/chips/chip.d.ts +123 -0
- package/typings/chips/chips-module.d.ts +2 -0
- package/typings/chips/index.d.ts +4 -0
- package/typings/chips/index.metadata.json +1 -0
- package/typings/chips/public-api.d.ts +11 -0
- package/typings/core/animation/animation.d.ts +20 -0
- package/typings/core/common-behaviors/color.d.ts +22 -0
- package/typings/core/common-behaviors/common-module.d.ts +25 -0
- package/typings/core/common-behaviors/constructor.d.ts +9 -0
- package/typings/core/common-behaviors/disable-ripple.d.ts +7 -0
- package/typings/core/common-behaviors/disabled.d.ts +7 -0
- package/typings/core/common-behaviors/index.d.ts +12 -0
- package/typings/core/common-behaviors/tabindex.d.ts +15 -0
- package/typings/core/compatibility/compatibility.d.ts +32 -0
- package/typings/core/datetime/date-adapter.d.ts +198 -0
- package/typings/core/datetime/date-formats.d.ts +20 -0
- package/typings/core/datetime/index.d.ts +8 -0
- package/typings/core/datetime/native-date-adapter.d.ts +50 -0
- package/typings/core/datetime/native-date-formats.d.ts +9 -0
- package/typings/core/error/error-options.d.ts +9 -0
- package/typings/core/gestures/gesture-annotations.d.ts +51 -0
- package/typings/core/gestures/gesture-config.d.ts +23 -0
- package/typings/core/index.d.ts +5 -0
- package/typings/core/index.metadata.json +1 -0
- package/typings/core/line/line.d.ts +30 -0
- package/typings/core/option/index.d.ts +4 -0
- package/typings/core/option/optgroup.d.ts +14 -0
- package/typings/core/option/option.d.ts +90 -0
- package/typings/core/placeholder/placeholder-options.d.ts +15 -0
- package/typings/core/public-api.d.ts +22 -0
- package/typings/core/ripple/index.d.ts +5 -0
- package/typings/core/ripple/ripple-ref.d.ts +28 -0
- package/typings/core/ripple/ripple-renderer.d.ts +69 -0
- package/typings/core/ripple/ripple.d.ts +65 -0
- package/typings/core/selection/index.d.ts +3 -0
- package/typings/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +20 -0
- package/typings/core/style/apply-transform.d.ts +13 -0
- package/typings/core/style/index.d.ts +8 -0
- package/typings/core/testing/month-constants.d.ts +12 -0
- package/typings/core/util/object-extend.d.ts +15 -0
- package/typings/datepicker/calendar-body.d.ts +52 -0
- package/typings/datepicker/calendar.d.ts +97 -0
- package/typings/datepicker/coerce-date-property.d.ts +19 -0
- package/typings/datepicker/datepicker-errors.d.ts +9 -0
- package/typings/datepicker/datepicker-input.d.ts +92 -0
- package/typings/datepicker/datepicker-intl.d.ts +25 -0
- package/typings/datepicker/datepicker-module.d.ts +2 -0
- package/typings/datepicker/datepicker-toggle.d.ts +24 -0
- package/typings/datepicker/datepicker.d.ts +117 -0
- package/typings/datepicker/index.d.ts +4 -0
- package/typings/datepicker/index.metadata.json +1 -0
- package/typings/datepicker/month-view.d.ts +66 -0
- package/typings/datepicker/public-api.d.ts +17 -0
- package/typings/datepicker/year-view.d.ts +55 -0
- package/typings/dialog/dialog-config.d.ts +54 -0
- package/typings/dialog/dialog-container.d.ts +68 -0
- package/typings/dialog/dialog-content-directives.d.ts +43 -0
- package/typings/dialog/dialog-module.d.ts +2 -0
- package/typings/dialog/dialog-ref.d.ts +68 -0
- package/typings/dialog/dialog.d.ts +108 -0
- package/typings/dialog/index.d.ts +4 -0
- package/typings/dialog/index.metadata.json +1 -0
- package/typings/dialog/public-api.d.ts +13 -0
- package/typings/expansion/accordion-item.d.ts +41 -0
- package/typings/expansion/accordion.d.ts +29 -0
- package/typings/expansion/expansion-module.d.ts +2 -0
- package/typings/expansion/expansion-panel-header.d.ts +49 -0
- package/typings/expansion/expansion-panel.d.ts +40 -0
- package/typings/expansion/index.d.ts +5 -0
- package/typings/expansion/index.metadata.json +1 -0
- package/typings/expansion/public-api.d.ts +12 -0
- package/typings/form-field/error.d.ts +4 -0
- package/typings/form-field/form-field-control.d.ts +47 -0
- package/typings/form-field/form-field-errors.d.ts +13 -0
- package/typings/form-field/form-field-module.d.ts +2 -0
- package/typings/form-field/form-field.d.ts +78 -0
- package/typings/form-field/hint.d.ts +7 -0
- package/typings/form-field/index.d.ts +4 -0
- package/typings/form-field/index.metadata.json +1 -0
- package/typings/form-field/placeholder.d.ts +3 -0
- package/typings/form-field/prefix.d.ts +3 -0
- package/typings/form-field/public-api.d.ts +16 -0
- package/typings/form-field/suffix.d.ts +3 -0
- package/typings/grid-list/grid-list-measure.d.ts +17 -0
- package/typings/grid-list/grid-list-module.d.ts +2 -0
- package/typings/grid-list/grid-list.d.ts +53 -0
- package/typings/grid-list/grid-tile.d.ts +55 -0
- package/typings/grid-list/index.d.ts +5 -0
- package/typings/grid-list/index.metadata.json +1 -0
- package/typings/grid-list/public-api.d.ts +10 -0
- package/typings/grid-list/tile-coordinator.d.ts +64 -0
- package/typings/grid-list/tile-styler.d.ts +129 -0
- package/typings/icon/icon-module.d.ts +2 -0
- package/typings/icon/icon-registry.d.ts +187 -0
- package/typings/icon/icon.d.ts +69 -0
- package/typings/icon/index.d.ts +4 -0
- package/typings/icon/index.metadata.json +1 -0
- package/typings/icon/public-api.d.ts +10 -0
- package/typings/index.d.ts +4 -0
- package/typings/index.metadata.json +1 -0
- package/typings/input/autosize.d.ts +43 -0
- package/typings/input/index.d.ts +4 -0
- package/typings/input/index.metadata.json +1 -0
- package/typings/input/input-errors.d.ts +9 -0
- package/typings/input/input-module.d.ts +2 -0
- package/typings/input/input.d.ts +85 -0
- package/typings/input/public-api.d.ts +11 -0
- package/typings/list/index.d.ts +4 -0
- package/typings/list/index.metadata.json +1 -0
- package/typings/list/list-module.d.ts +2 -0
- package/typings/list/list.d.ts +77 -0
- package/typings/list/public-api.d.ts +10 -0
- package/typings/list/selection-list.d.ts +103 -0
- package/typings/menu/index.d.ts +6 -0
- package/typings/menu/index.metadata.json +1 -0
- package/typings/menu/menu-animations.d.ts +27 -0
- package/typings/menu/menu-directive.d.ts +89 -0
- package/typings/menu/menu-errors.d.ts +24 -0
- package/typings/menu/menu-item.d.ts +42 -0
- package/typings/menu/menu-module.d.ts +2 -0
- package/typings/menu/menu-panel.d.ts +22 -0
- package/typings/menu/menu-positions.d.ts +9 -0
- package/typings/menu/menu-trigger.d.ts +115 -0
- package/typings/menu/menu.d.ts +12 -0
- package/typings/menu/public-api.d.ts +11 -0
- package/typings/paginator/index.d.ts +4 -0
- package/typings/paginator/index.metadata.json +1 -0
- package/typings/paginator/paginator-intl.d.ts +20 -0
- package/typings/paginator/paginator-module.d.ts +2 -0
- package/typings/paginator/paginator.d.ts +75 -0
- package/typings/paginator/public-api.d.ts +10 -0
- package/typings/progress-bar/index.d.ts +4 -0
- package/typings/progress-bar/index.metadata.json +1 -0
- package/typings/progress-bar/progress-bar-module.d.ts +2 -0
- package/typings/progress-bar/progress-bar.d.ts +32 -0
- package/typings/progress-bar/public-api.d.ts +9 -0
- package/typings/progress-spinner/index.d.ts +4 -0
- package/typings/progress-spinner/index.metadata.json +1 -0
- package/typings/progress-spinner/progress-spinner-module.d.ts +3 -0
- package/typings/progress-spinner/progress-spinner.d.ts +69 -0
- package/typings/progress-spinner/public-api.d.ts +9 -0
- package/typings/public-api.d.ts +39 -0
- package/typings/radio/index.d.ts +4 -0
- package/typings/radio/index.metadata.json +1 -0
- package/typings/radio/public-api.d.ts +9 -0
- package/typings/radio/radio-module.d.ts +2 -0
- package/typings/radio/radio.d.ts +215 -0
- package/typings/select/index.d.ts +4 -0
- package/typings/select/index.metadata.json +1 -0
- package/typings/select/public-api.d.ts +10 -0
- package/typings/select/select-animations.d.ts +30 -0
- package/typings/select/select-errors.d.ts +26 -0
- package/typings/select/select-module.d.ts +2 -0
- package/typings/select/select.d.ts +393 -0
- package/typings/sidenav/drawer.d.ts +190 -0
- package/typings/sidenav/index.d.ts +4 -0
- package/typings/sidenav/index.metadata.json +1 -0
- package/typings/sidenav/public-api.d.ts +10 -0
- package/typings/sidenav/sidenav-module.d.ts +2 -0
- package/typings/sidenav/sidenav.d.ts +33 -0
- package/typings/slide-toggle/index.d.ts +4 -0
- package/typings/slide-toggle/index.metadata.json +1 -0
- package/typings/slide-toggle/public-api.d.ts +9 -0
- package/typings/slide-toggle/slide-toggle-module.d.ts +2 -0
- package/typings/slide-toggle/slide-toggle.d.ts +93 -0
- package/typings/slider/index.d.ts +4 -0
- package/typings/slider/index.metadata.json +1 -0
- package/typings/slider/public-api.d.ts +9 -0
- package/typings/slider/slider-module.d.ts +2 -0
- package/typings/slider/slider.d.ts +207 -0
- package/typings/snack-bar/index.d.ts +4 -0
- package/typings/snack-bar/index.metadata.json +1 -0
- package/typings/snack-bar/public-api.d.ts +13 -0
- package/typings/snack-bar/simple-snack-bar.d.ts +18 -0
- package/typings/snack-bar/snack-bar-config.d.ts +38 -0
- package/typings/snack-bar/snack-bar-container.d.ts +55 -0
- package/typings/snack-bar/snack-bar-module.d.ts +2 -0
- package/typings/snack-bar/snack-bar-ref.d.ts +51 -0
- package/typings/snack-bar/snack-bar.d.ts +70 -0
- package/typings/sort/index.d.ts +4 -0
- package/typings/sort/index.metadata.json +1 -0
- package/typings/sort/public-api.d.ts +12 -0
- package/typings/sort/sort-direction.d.ts +8 -0
- package/typings/sort/sort-errors.d.ts +15 -0
- package/typings/sort/sort-header-intl.d.ts +17 -0
- package/typings/sort/sort-header.d.ts +43 -0
- package/typings/sort/sort-module.d.ts +2 -0
- package/typings/sort/sort.d.ts +55 -0
- package/typings/stepper/index.d.ts +4 -0
- package/typings/stepper/index.metadata.json +1 -0
- package/typings/stepper/public-api.d.ts +13 -0
- package/typings/stepper/step-header.d.ts +41 -0
- package/typings/stepper/step-label.d.ts +14 -0
- package/typings/stepper/stepper-button.d.ts +10 -0
- package/typings/stepper/stepper-intl.d.ts +11 -0
- package/typings/stepper/stepper-module.d.ts +2 -0
- package/typings/stepper/stepper.d.ts +26 -0
- package/typings/table/cell.d.ts +43 -0
- package/typings/table/index.d.ts +4 -0
- package/typings/table/index.metadata.json +1 -0
- package/typings/table/public-api.d.ts +11 -0
- package/typings/table/row.d.ts +25 -0
- package/typings/table/table-module.d.ts +2 -0
- package/typings/table/table.d.ts +8 -0
- package/typings/tabs/index.d.ts +8 -0
- package/typings/tabs/index.metadata.json +1 -0
- package/typings/tabs/ink-bar.d.ts +33 -0
- package/typings/tabs/public-api.d.ts +16 -0
- package/typings/tabs/tab-body.d.ts +69 -0
- package/typings/tabs/tab-group.d.ts +104 -0
- package/typings/tabs/tab-header.d.ts +158 -0
- package/typings/tabs/tab-label-wrapper.d.ts +25 -0
- package/typings/tabs/tab-label.d.ts +15 -0
- package/typings/tabs/tab-nav-bar/index.d.ts +8 -0
- package/typings/tabs/tab-nav-bar/tab-nav-bar.d.ts +78 -0
- package/typings/tabs/tab.d.ts +50 -0
- package/typings/tabs/tabs-module.d.ts +2 -0
- package/typings/toolbar/index.d.ts +4 -0
- package/typings/toolbar/index.metadata.json +1 -0
- package/typings/toolbar/public-api.d.ts +9 -0
- package/typings/toolbar/toolbar-module.d.ts +2 -0
- package/typings/toolbar/toolbar.d.ts +21 -0
- package/typings/tooltip/index.d.ts +4 -0
- package/typings/tooltip/index.metadata.json +1 -0
- package/typings/tooltip/public-api.d.ts +9 -0
- package/typings/tooltip/tooltip-module.d.ts +2 -0
- package/typings/tooltip/tooltip.d.ts +175 -0
- package/typings/version.d.ts +10 -0
- package/autocomplete/README.md +0 -5
- package/autocomplete/_autocomplete-theme.scss +0 -5
- package/autocomplete/autocomplete.css +0 -0
- package/autocomplete/autocomplete.css.map +0 -1
- package/autocomplete/autocomplete.d.ts +0 -2
- package/autocomplete/autocomplete.html +0 -1
- package/autocomplete/autocomplete.js +0 -25
- package/autocomplete/autocomplete.js.map +0 -1
- package/autocomplete/autocomplete.metadata.json +0 -1
- package/autocomplete/autocomplete.scss +0 -0
- package/autocomplete/index.js +0 -34
- package/autocomplete/index.js.map +0 -1
- package/button/OVERVIEW.md +0 -25
- package/button/README.md +0 -116
- package/button/_button-base.scss +0 -111
- package/button/_button-theme.scss +0 -85
- package/button/button.css +0 -1
- package/button/button.css.map +0 -1
- package/button/button.d.ts +0 -46
- package/button/button.html +0 -1
- package/button/button.js +0 -203
- package/button/button.js.map +0 -1
- package/button/button.metadata.json +0 -1
- package/button/button.scss +0 -105
- package/button/index.js +0 -3
- package/button/index.js.map +0 -1
- package/button-toggle/OVERVIEW.md +0 -22
- package/button-toggle/README.md +0 -139
- package/button-toggle/_button-toggle-theme.scss +0 -14
- package/button-toggle/button-toggle.css +0 -1
- package/button-toggle/button-toggle.css.map +0 -1
- package/button-toggle/button-toggle.d.ts +0 -136
- package/button-toggle/button-toggle.html +0 -1
- package/button-toggle/button-toggle.js +0 -502
- package/button-toggle/button-toggle.js.map +0 -1
- package/button-toggle/button-toggle.metadata.json +0 -1
- package/button-toggle/button-toggle.scss +0 -49
- package/button-toggle/index.js +0 -3
- package/button-toggle/index.js.map +0 -1
- package/card/OVERVIEW.md +0 -45
- package/card/README.md +0 -116
- package/card/_card-theme.scss +0 -17
- package/card/card-header.html +0 -1
- package/card/card-title-group.html +0 -1
- package/card/card.css +0 -1
- package/card/card.css.map +0 -1
- package/card/card.d.ts +0 -54
- package/card/card.html +0 -1
- package/card/card.js +0 -174
- package/card/card.js.map +0 -1
- package/card/card.metadata.json +0 -1
- package/card/card.scss +0 -227
- package/card/index.js +0 -3
- package/card/index.js.map +0 -1
- package/checkbox/OVERVIEW.md +0 -28
- package/checkbox/README.md +0 -93
- package/checkbox/_checkbox-theme.scss +0 -84
- package/checkbox/checkbox.css +0 -1
- package/checkbox/checkbox.css.map +0 -1
- package/checkbox/checkbox.d.ts +0 -155
- package/checkbox/checkbox.html +0 -1
- package/checkbox/checkbox.js +0 -432
- package/checkbox/checkbox.js.map +0 -1
- package/checkbox/checkbox.metadata.json +0 -1
- package/checkbox/checkbox.scss +0 -431
- package/checkbox/index.js +0 -3
- package/checkbox/index.js.map +0 -1
- package/chips/OVERVIEW.md +0 -40
- package/chips/README.md +0 -7
- package/chips/_chips-theme.scss +0 -49
- package/chips/chip-list.d.ts +0 -66
- package/chips/chip-list.js +0 -210
- package/chips/chip-list.js.map +0 -1
- package/chips/chip-list.metadata.json +0 -1
- package/chips/chip.d.ts +0 -53
- package/chips/chip.js +0 -177
- package/chips/chip.js.map +0 -1
- package/chips/chip.metadata.json +0 -1
- package/chips/chips.css +0 -1
- package/chips/chips.css.map +0 -1
- package/chips/chips.scss +0 -80
- package/chips/index.js +0 -4
- package/chips/index.js.map +0 -1
- package/core/README.md +0 -1
- package/core/_core.scss +0 -27
- package/core/a11y/README.md +0 -30
- package/core/a11y/_a11y.scss +0 -24
- package/core/a11y/fake-mousedown.d.ts +0 -8
- package/core/a11y/fake-mousedown.js +0 -12
- package/core/a11y/fake-mousedown.js.map +0 -1
- package/core/a11y/fake-mousedown.metadata.json +0 -1
- package/core/a11y/focus-trap.d.ts +0 -41
- package/core/a11y/focus-trap.html +0 -1
- package/core/a11y/focus-trap.js +0 -129
- package/core/a11y/focus-trap.js.map +0 -1
- package/core/a11y/focus-trap.metadata.json +0 -1
- package/core/a11y/index.d.ts +0 -7
- package/core/a11y/index.js +0 -40
- package/core/a11y/index.js.map +0 -1
- package/core/a11y/index.metadata.json +0 -1
- package/core/a11y/interactivity-checker.d.ts +0 -45
- package/core/a11y/interactivity-checker.js +0 -210
- package/core/a11y/interactivity-checker.js.map +0 -1
- package/core/a11y/interactivity-checker.metadata.json +0 -1
- package/core/a11y/list-key-manager.d.ts +0 -83
- package/core/a11y/list-key-manager.js +0 -157
- package/core/a11y/list-key-manager.js.map +0 -1
- package/core/a11y/list-key-manager.metadata.json +0 -1
- package/core/a11y/live-announcer.d.ts +0 -17
- package/core/a11y/live-announcer.js +0 -63
- package/core/a11y/live-announcer.js.map +0 -1
- package/core/a11y/live-announcer.metadata.json +0 -1
- package/core/animation/animation.d.ts +0 -13
- package/core/animation/animation.js +0 -21
- package/core/animation/animation.js.map +0 -1
- package/core/animation/animation.metadata.json +0 -1
- package/core/async/promise-completer.d.ts +0 -7
- package/core/async/promise-completer.js +0 -13
- package/core/async/promise-completer.js.map +0 -1
- package/core/async/promise-completer.metadata.json +0 -1
- package/core/coercion/boolean-property.d.ts +0 -2
- package/core/coercion/boolean-property.js +0 -6
- package/core/coercion/boolean-property.js.map +0 -1
- package/core/coercion/boolean-property.metadata.json +0 -1
- package/core/coercion/number-property.d.ts +0 -2
- package/core/coercion/number-property.js +0 -10
- package/core/coercion/number-property.js.map +0 -1
- package/core/coercion/number-property.metadata.json +0 -1
- package/core/compatibility/default-mode.d.ts +0 -19
- package/core/compatibility/default-mode.js +0 -61
- package/core/compatibility/default-mode.js.map +0 -1
- package/core/compatibility/default-mode.metadata.json +0 -1
- package/core/compatibility/no-conflict-mode.d.ts +0 -10
- package/core/compatibility/no-conflict-mode.js +0 -47
- package/core/compatibility/no-conflict-mode.js.map +0 -1
- package/core/compatibility/no-conflict-mode.metadata.json +0 -1
- package/core/coordination/unique-selection-dispatcher.d.ts +0 -21
- package/core/coordination/unique-selection-dispatcher.js +0 -46
- package/core/coordination/unique-selection-dispatcher.js.map +0 -1
- package/core/coordination/unique-selection-dispatcher.metadata.json +0 -1
- package/core/core.d.ts +0 -45
- package/core/core.js +0 -110
- package/core/core.js.map +0 -1
- package/core/core.metadata.json +0 -1
- package/core/errors/error.d.ts +0 -7
- package/core/errors/error.js +0 -20
- package/core/errors/error.js.map +0 -1
- package/core/errors/error.metadata.json +0 -1
- package/core/gestures/gesture-annotations.d.ts +0 -44
- package/core/gestures/gesture-annotations.js +0 -7
- package/core/gestures/gesture-annotations.js.map +0 -1
- package/core/gestures/gesture-config.js +0 -85
- package/core/gestures/gesture-config.js.map +0 -1
- package/core/gestures/gesture-config.metadata.json +0 -1
- package/core/index.js +0 -3
- package/core/index.js.map +0 -1
- package/core/keyboard/keycodes.d.ts +0 -14
- package/core/keyboard/keycodes.js +0 -20
- package/core/keyboard/keycodes.js.map +0 -1
- package/core/keyboard/keycodes.metadata.json +0 -1
- package/core/line/line.d.ts +0 -23
- package/core/line/line.js +0 -74
- package/core/line/line.js.map +0 -1
- package/core/line/line.metadata.json +0 -1
- package/core/observe-content/observe-content.d.ts +0 -17
- package/core/observe-content/observe-content.js +0 -66
- package/core/observe-content/observe-content.js.map +0 -1
- package/core/observe-content/observe-content.metadata.json +0 -1
- package/core/overlay/_overlay.scss +0 -68
- package/core/overlay/generic-component-type.d.ts +0 -3
- package/core/overlay/generic-component-type.js +0 -3
- package/core/overlay/generic-component-type.js.map +0 -1
- package/core/overlay/overlay-container.d.ts +0 -19
- package/core/overlay/overlay-container.js +0 -33
- package/core/overlay/overlay-container.js.map +0 -1
- package/core/overlay/overlay-container.metadata.json +0 -1
- package/core/overlay/overlay-directives.d.ts +0 -80
- package/core/overlay/overlay-directives.js +0 -316
- package/core/overlay/overlay-directives.js.map +0 -1
- package/core/overlay/overlay-directives.metadata.json +0 -1
- package/core/overlay/overlay-ref.d.ts +0 -56
- package/core/overlay/overlay-ref.js +0 -155
- package/core/overlay/overlay-ref.js.map +0 -1
- package/core/overlay/overlay-ref.metadata.json +0 -1
- package/core/overlay/overlay-state.d.ts +0 -24
- package/core/overlay/overlay-state.js +0 -17
- package/core/overlay/overlay-state.js.map +0 -1
- package/core/overlay/overlay-state.metadata.json +0 -1
- package/core/overlay/overlay.d.ts +0 -54
- package/core/overlay/overlay.js +0 -97
- package/core/overlay/overlay.js.map +0 -1
- package/core/overlay/overlay.metadata.json +0 -1
- package/core/overlay/position/connected-position-strategy.d.ts +0 -133
- package/core/overlay/position/connected-position-strategy.js +0 -292
- package/core/overlay/position/connected-position-strategy.js.map +0 -1
- package/core/overlay/position/connected-position-strategy.metadata.json +0 -1
- package/core/overlay/position/connected-position.d.ts +0 -56
- package/core/overlay/position/connected-position.js +0 -65
- package/core/overlay/position/connected-position.js.map +0 -1
- package/core/overlay/position/connected-position.metadata.json +0 -1
- package/core/overlay/position/fake-viewport-ruler.d.ts +0 -15
- package/core/overlay/position/fake-viewport-ruler.js +0 -16
- package/core/overlay/position/fake-viewport-ruler.js.map +0 -1
- package/core/overlay/position/fake-viewport-ruler.metadata.json +0 -1
- package/core/overlay/position/global-position-strategy.d.ts +0 -75
- package/core/overlay/position/global-position-strategy.js +0 -148
- package/core/overlay/position/global-position-strategy.js.map +0 -1
- package/core/overlay/position/global-position-strategy.metadata.json +0 -1
- package/core/overlay/position/overlay-position-builder.d.ts +0 -21
- package/core/overlay/position/overlay-position-builder.js +0 -41
- package/core/overlay/position/overlay-position-builder.js.map +0 -1
- package/core/overlay/position/overlay-position-builder.metadata.json +0 -1
- package/core/overlay/position/position-strategy.d.ts +0 -7
- package/core/overlay/position/position-strategy.js +0 -3
- package/core/overlay/position/position-strategy.js.map +0 -1
- package/core/overlay/position/relative-position-strategy.d.ts +0 -9
- package/core/overlay/position/relative-position-strategy.js +0 -16
- package/core/overlay/position/relative-position-strategy.js.map +0 -1
- package/core/overlay/position/relative-position-strategy.metadata.json +0 -1
- package/core/overlay/position/viewport-ruler.d.ts +0 -16
- package/core/overlay/position/viewport-ruler.js +0 -67
- package/core/overlay/position/viewport-ruler.js.map +0 -1
- package/core/overlay/position/viewport-ruler.metadata.json +0 -1
- package/core/overlay/scroll/scroll-dispatcher.d.ts +0 -44
- package/core/overlay/scroll/scroll-dispatcher.js +0 -94
- package/core/overlay/scroll/scroll-dispatcher.js.map +0 -1
- package/core/overlay/scroll/scroll-dispatcher.metadata.json +0 -1
- package/core/overlay/scroll/scrollable.d.ts +0 -21
- package/core/overlay/scroll/scrollable.js +0 -48
- package/core/overlay/scroll/scrollable.js.map +0 -1
- package/core/overlay/scroll/scrollable.metadata.json +0 -1
- package/core/platform/features.d.ts +0 -2
- package/core/platform/features.js +0 -37
- package/core/platform/features.js.map +0 -1
- package/core/platform/features.metadata.json +0 -1
- package/core/platform/index.d.ts +0 -6
- package/core/platform/index.js +0 -30
- package/core/platform/index.js.map +0 -1
- package/core/platform/index.metadata.json +0 -1
- package/core/platform/platform.d.ts +0 -16
- package/core/platform/platform.js +0 -48
- package/core/platform/platform.js.map +0 -1
- package/core/platform/platform.metadata.json +0 -1
- package/core/portal/README.md +0 -72
- package/core/portal/dom-portal-host.d.ts +0 -31
- package/core/portal/dom-portal-host.js +0 -108
- package/core/portal/dom-portal-host.js.map +0 -1
- package/core/portal/dom-portal-host.metadata.json +0 -1
- package/core/portal/portal-directives.d.ts +0 -49
- package/core/portal/portal-directives.js +0 -148
- package/core/portal/portal-directives.js.map +0 -1
- package/core/portal/portal-directives.metadata.json +0 -1
- package/core/portal/portal-errors.d.ts +0 -43
- package/core/portal/portal-errors.js +0 -75
- package/core/portal/portal-errors.js.map +0 -1
- package/core/portal/portal-errors.metadata.json +0 -1
- package/core/portal/portal.d.ts +0 -85
- package/core/portal/portal.js +0 -155
- package/core/portal/portal.js.map +0 -1
- package/core/portal/portal.metadata.json +0 -1
- package/core/projection/projection.d.ts +0 -45
- package/core/projection/projection.js +0 -111
- package/core/projection/projection.js.map +0 -1
- package/core/projection/projection.metadata.json +0 -1
- package/core/ripple/README.md +0 -27
- package/core/ripple/_ripple.scss +0 -106
- package/core/ripple/ripple-renderer.d.ts +0 -76
- package/core/ripple/ripple-renderer.js +0 -177
- package/core/ripple/ripple-renderer.js.map +0 -1
- package/core/ripple/ripple-renderer.metadata.json +0 -1
- package/core/ripple/ripple.d.ts +0 -92
- package/core/ripple/ripple.js +0 -295
- package/core/ripple/ripple.js.map +0 -1
- package/core/ripple/ripple.metadata.json +0 -1
- package/core/rtl/dir.d.ts +0 -21
- package/core/rtl/dir.js +0 -87
- package/core/rtl/dir.js.map +0 -1
- package/core/rtl/dir.metadata.json +0 -1
- package/core/style/_button-common.scss +0 -7
- package/core/style/_elevation.scss +0 -174
- package/core/style/_form-common.scss +0 -12
- package/core/style/_layout-common.scss +0 -8
- package/core/style/_list-common.scss +0 -49
- package/core/style/_menu-common.scss +0 -89
- package/core/style/_variables.scss +0 -64
- package/core/style/apply-transform.d.ts +0 -6
- package/core/style/apply-transform.js +0 -14
- package/core/style/apply-transform.js.map +0 -1
- package/core/style/apply-transform.metadata.json +0 -1
- package/core/theming/_all-theme.scss +0 -52
- package/core/theming/_palette.scss +0 -694
- package/core/theming/_theming.scss +0 -84
- package/core/theming/prebuilt/deeppurple-amber.css +0 -1
- package/core/theming/prebuilt/deeppurple-amber.css.map +0 -1
- package/core/theming/prebuilt/deeppurple-amber.scss +0 -14
- package/core/theming/prebuilt/indigo-pink.css +0 -1
- package/core/theming/prebuilt/indigo-pink.css.map +0 -1
- package/core/theming/prebuilt/indigo-pink.scss +0 -14
- package/core/theming/prebuilt/pink-bluegrey.css +0 -1
- package/core/theming/prebuilt/pink-bluegrey.css.map +0 -1
- package/core/theming/prebuilt/pink-bluegrey.scss +0 -14
- package/core/theming/prebuilt/purple-green.css +0 -1
- package/core/theming/prebuilt/purple-green.css.map +0 -1
- package/core/theming/prebuilt/purple-green.scss +0 -14
- package/core/typography/_typography.scss +0 -6
- package/core/util/object-extend.d.ts +0 -8
- package/core/util/object-extend.js +0 -29
- package/core/util/object-extend.js.map +0 -1
- package/core/util/object-extend.metadata.json +0 -1
- package/core.js +0 -3
- package/core.js.map +0 -1
- package/dialog/OVERVIEW.md +0 -39
- package/dialog/README.md +0 -102
- package/dialog/_dialog-theme.scss +0 -11
- package/dialog/dialog-config.d.ts +0 -26
- package/dialog/dialog-config.js +0 -19
- package/dialog/dialog-config.js.map +0 -1
- package/dialog/dialog-config.metadata.json +0 -1
- package/dialog/dialog-container.d.ts +0 -37
- package/dialog/dialog-container.html +0 -1
- package/dialog/dialog-container.js +0 -97
- package/dialog/dialog-container.js.map +0 -1
- package/dialog/dialog-container.metadata.json +0 -1
- package/dialog/dialog-content-directives.d.ts +0 -26
- package/dialog/dialog-content-directives.js +0 -81
- package/dialog/dialog-content-directives.js.map +0 -1
- package/dialog/dialog-content-directives.metadata.json +0 -1
- package/dialog/dialog-errors.d.ts +0 -8
- package/dialog/dialog-errors.js +0 -19
- package/dialog/dialog-errors.js.map +0 -1
- package/dialog/dialog-errors.metadata.json +0 -1
- package/dialog/dialog-injector.d.ts +0 -9
- package/dialog/dialog-injector.js +0 -17
- package/dialog/dialog-injector.js.map +0 -1
- package/dialog/dialog-injector.metadata.json +0 -1
- package/dialog/dialog-ref.d.ts +0 -22
- package/dialog/dialog-ref.js +0 -31
- package/dialog/dialog-ref.js.map +0 -1
- package/dialog/dialog-ref.metadata.json +0 -1
- package/dialog/dialog.css +0 -1
- package/dialog/dialog.css.map +0 -1
- package/dialog/dialog.d.ts +0 -57
- package/dialog/dialog.js +0 -157
- package/dialog/dialog.js.map +0 -1
- package/dialog/dialog.metadata.json +0 -1
- package/dialog/dialog.scss +0 -54
- package/dialog/index.js +0 -59
- package/dialog/index.js.map +0 -1
- package/grid-list/OVERVIEW.md +0 -43
- package/grid-list/README.md +0 -105
- package/grid-list/_grid-list-theme.scss +0 -6
- package/grid-list/grid-list-errors.d.ts +0 -22
- package/grid-list/grid-list-errors.js +0 -41
- package/grid-list/grid-list-errors.js.map +0 -1
- package/grid-list/grid-list-errors.metadata.json +0 -1
- package/grid-list/grid-list-measure.d.ts +0 -10
- package/grid-list/grid-list-measure.js +0 -16
- package/grid-list/grid-list-measure.js.map +0 -1
- package/grid-list/grid-list-measure.metadata.json +0 -1
- package/grid-list/grid-list.css +0 -1
- package/grid-list/grid-list.css.map +0 -1
- package/grid-list/grid-list.d.ts +0 -49
- package/grid-list/grid-list.html +0 -1
- package/grid-list/grid-list.js +0 -166
- package/grid-list/grid-list.js.map +0 -1
- package/grid-list/grid-list.metadata.json +0 -1
- package/grid-list/grid-list.scss +0 -91
- package/grid-list/grid-tile-text.html +0 -1
- package/grid-list/grid-tile.d.ts +0 -30
- package/grid-list/grid-tile.html +0 -1
- package/grid-list/grid-tile.js +0 -81
- package/grid-list/grid-tile.js.map +0 -1
- package/grid-list/grid-tile.metadata.json +0 -1
- package/grid-list/index.js +0 -3
- package/grid-list/index.js.map +0 -1
- package/grid-list/tile-coordinator.d.ts +0 -56
- package/grid-list/tile-coordinator.js +0 -129
- package/grid-list/tile-coordinator.js.map +0 -1
- package/grid-list/tile-coordinator.metadata.json +0 -1
- package/grid-list/tile-styler.d.ts +0 -112
- package/grid-list/tile-styler.js +0 -211
- package/grid-list/tile-styler.js.map +0 -1
- package/grid-list/tile-styler.metadata.json +0 -1
- package/icon/OVERVIEW.md +0 -88
- package/icon/README.md +0 -129
- package/icon/_icon-theme.scss +0 -25
- package/icon/fake-svgs.d.ts +0 -6
- package/icon/fake-svgs.js +0 -31
- package/icon/fake-svgs.js.map +0 -1
- package/icon/fake-svgs.metadata.json +0 -1
- package/icon/icon-registry.d.ts +0 -180
- package/icon/icon-registry.js +0 -413
- package/icon/icon-registry.js.map +0 -1
- package/icon/icon-registry.metadata.json +0 -1
- package/icon/icon.css +0 -1
- package/icon/icon.css.map +0 -1
- package/icon/icon.d.ts +0 -91
- package/icon/icon.js +0 -264
- package/icon/icon.js.map +0 -1
- package/icon/icon.metadata.json +0 -1
- package/icon/icon.scss +0 -13
- package/icon/index.js +0 -3
- package/icon/index.js.map +0 -1
- package/index.d.ts +0 -25
- package/index.js +0 -27
- package/index.js.map +0 -1
- package/index.metadata.json +0 -1
- package/input/OVERVIEW.md +0 -72
- package/input/README.md +0 -183
- package/input/_input-theme.scss +0 -62
- package/input/autosize.d.ts +0 -29
- package/input/autosize.js +0 -94
- package/input/autosize.js.map +0 -1
- package/input/autosize.metadata.json +0 -1
- package/input/index.js +0 -6
- package/input/index.js.map +0 -1
- package/input/input-container-errors.d.ts +0 -17
- package/input/input-container-errors.js +0 -41
- package/input/input-container-errors.js.map +0 -1
- package/input/input-container-errors.metadata.json +0 -1
- package/input/input-container.css +0 -1
- package/input/input-container.css.map +0 -1
- package/input/input-container.d.ts +0 -95
- package/input/input-container.html +0 -1
- package/input/input-container.js +0 -352
- package/input/input-container.js.map +0 -1
- package/input/input-container.metadata.json +0 -1
- package/input/input-container.scss +0 -32
- package/input/input.css +0 -1
- package/input/input.css.map +0 -1
- package/input/input.d.ts +0 -184
- package/input/input.html +0 -1
- package/input/input.js +0 -564
- package/input/input.js.map +0 -1
- package/input/input.metadata.json +0 -1
- package/input/input.scss +0 -202
- package/list/OVERVIEW.md +0 -124
- package/list/README.md +0 -154
- package/list/_list-theme.scss +0 -28
- package/list/index.js +0 -3
- package/list/index.js.map +0 -1
- package/list/list-item.html +0 -1
- package/list/list.css +0 -1
- package/list/list.css.map +0 -1
- package/list/list.d.ts +0 -23
- package/list/list.js +0 -119
- package/list/list.js.map +0 -1
- package/list/list.metadata.json +0 -1
- package/list/list.scss +0 -181
- package/menu/OVERVIEW.md +0 -62
- package/menu/README.md +0 -171
- package/menu/_menu-theme.scss +0 -29
- package/menu/index.js +0 -7
- package/menu/index.js.map +0 -1
- package/menu/menu-animations.d.ts +0 -19
- package/menu/menu-animations.js +0 -43
- package/menu/menu-animations.js.map +0 -1
- package/menu/menu-animations.metadata.json +0 -1
- package/menu/menu-directive.d.ts +0 -46
- package/menu/menu-directive.js +0 -136
- package/menu/menu-directive.js.map +0 -1
- package/menu/menu-directive.metadata.json +0 -1
- package/menu/menu-errors.d.ts +0 -24
- package/menu/menu-errors.js +0 -43
- package/menu/menu-errors.js.map +0 -1
- package/menu/menu-errors.metadata.json +0 -1
- package/menu/menu-item.d.ts +0 -20
- package/menu/menu-item.html +0 -1
- package/menu/menu-item.js +0 -77
- package/menu/menu-item.js.map +0 -1
- package/menu/menu-item.metadata.json +0 -1
- package/menu/menu-panel.d.ts +0 -10
- package/menu/menu-panel.js +0 -3
- package/menu/menu-panel.js.map +0 -1
- package/menu/menu-positions.d.ts +0 -2
- package/menu/menu-positions.js +0 -3
- package/menu/menu-positions.js.map +0 -1
- package/menu/menu-trigger.d.ts +0 -92
- package/menu/menu-trigger.js +0 -246
- package/menu/menu-trigger.js.map +0 -1
- package/menu/menu-trigger.metadata.json +0 -1
- package/menu/menu.css +0 -1
- package/menu/menu.css.map +0 -1
- package/menu/menu.d.ts +0 -9
- package/menu/menu.html +0 -1
- package/menu/menu.js +0 -40
- package/menu/menu.js.map +0 -1
- package/menu/menu.metadata.json +0 -1
- package/menu/menu.scss +0 -44
- package/module.d.ts +0 -6
- package/module.js +0 -132
- package/module.js.map +0 -1
- package/module.metadata.json +0 -1
- package/progress-bar/OVERVIEW.md +0 -30
- package/progress-bar/README.md +0 -54
- package/progress-bar/_progress-bar-theme.scss +0 -70
- package/progress-bar/index.js +0 -3
- package/progress-bar/index.js.map +0 -1
- package/progress-bar/progress-bar.css +0 -1
- package/progress-bar/progress-bar.css.map +0 -1
- package/progress-bar/progress-bar.d.ts +0 -36
- package/progress-bar/progress-bar.html +0 -1
- package/progress-bar/progress-bar.js +0 -124
- package/progress-bar/progress-bar.js.map +0 -1
- package/progress-bar/progress-bar.metadata.json +0 -1
- package/progress-bar/progress-bar.scss +0 -230
- package/progress-spinner/OVERVIEW.md +0 -23
- package/progress-spinner/README.md +0 -51
- package/progress-spinner/_progress-spinner-theme.scss +0 -23
- package/progress-spinner/index.js +0 -4
- package/progress-spinner/index.js.map +0 -1
- package/progress-spinner/progress-circle.d.ts +0 -4
- package/progress-spinner/progress-circle.js +0 -6
- package/progress-spinner/progress-circle.js.map +0 -1
- package/progress-spinner/progress-circle.metadata.json +0 -1
- package/progress-spinner/progress-spinner.css +0 -1
- package/progress-spinner/progress-spinner.css.map +0 -1
- package/progress-spinner/progress-spinner.d.ts +0 -80
- package/progress-spinner/progress-spinner.html +0 -1
- package/progress-spinner/progress-spinner.js +0 -337
- package/progress-spinner/progress-spinner.js.map +0 -1
- package/progress-spinner/progress-spinner.metadata.json +0 -1
- package/progress-spinner/progress-spinner.scss +0 -68
- package/radio/OVERVIEW.md +0 -29
- package/radio/README.md +0 -55
- package/radio/_radio-theme.scss +0 -39
- package/radio/index.js +0 -3
- package/radio/index.js.map +0 -1
- package/radio/radio.css +0 -1
- package/radio/radio.css.map +0 -1
- package/radio/radio.d.ts +0 -179
- package/radio/radio.html +0 -1
- package/radio/radio.js +0 -552
- package/radio/radio.js.map +0 -1
- package/radio/radio.metadata.json +0 -1
- package/radio/radio.scss +0 -102
- package/select/OVERVIEW.md +0 -8
- package/select/README.md +0 -3
- package/select/_select-theme.scss +0 -64
- package/select/index.js +0 -38
- package/select/index.js.map +0 -1
- package/select/option.d.ts +0 -44
- package/select/option.html +0 -1
- package/select/option.js +0 -135
- package/select/option.js.map +0 -1
- package/select/option.metadata.json +0 -1
- package/select/select-animations.d.ts +0 -29
- package/select/select-animations.js +0 -66
- package/select/select-animations.js.map +0 -1
- package/select/select-animations.metadata.json +0 -1
- package/select/select.css +0 -1
- package/select/select.css.map +0 -1
- package/select/select.d.ts +0 -258
- package/select/select.html +0 -1
- package/select/select.js +0 -604
- package/select/select.js.map +0 -1
- package/select/select.metadata.json +0 -1
- package/select/select.scss +0 -131
- package/sidenav/OVERVIEW.md +0 -70
- package/sidenav/README.md +0 -166
- package/sidenav/_sidenav-theme.scss +0 -37
- package/sidenav/index.js +0 -3
- package/sidenav/index.js.map +0 -1
- package/sidenav/sidenav-container.html +0 -1
- package/sidenav/sidenav-transitions.css +0 -1
- package/sidenav/sidenav-transitions.css.map +0 -1
- package/sidenav/sidenav-transitions.scss +0 -14
- package/sidenav/sidenav.css +0 -1
- package/sidenav/sidenav.css.map +0 -1
- package/sidenav/sidenav.d.ts +0 -182
- package/sidenav/sidenav.html +0 -1
- package/sidenav/sidenav.js +0 -580
- package/sidenav/sidenav.js.map +0 -1
- package/sidenav/sidenav.metadata.json +0 -1
- package/sidenav/sidenav.scss +0 -151
- package/slide-toggle/OVERVIEW.md +0 -24
- package/slide-toggle/README.md +0 -66
- package/slide-toggle/_slide-toggle-theme.scss +0 -89
- package/slide-toggle/index.js +0 -3
- package/slide-toggle/index.js.map +0 -1
- package/slide-toggle/slide-toggle.css +0 -1
- package/slide-toggle/slide-toggle.css.map +0 -1
- package/slide-toggle/slide-toggle.d.ts +0 -84
- package/slide-toggle/slide-toggle.html +0 -1
- package/slide-toggle/slide-toggle.js +0 -347
- package/slide-toggle/slide-toggle.js.map +0 -1
- package/slide-toggle/slide-toggle.metadata.json +0 -1
- package/slide-toggle/slide-toggle.scss +0 -158
- package/slider/OVERVIEW.md +0 -87
- package/slider/README.md +0 -150
- package/slider/_slider-theme.scss +0 -32
- package/slider/index.js +0 -3
- package/slider/index.js.map +0 -1
- package/slider/slider.css +0 -1
- package/slider/slider.css.map +0 -1
- package/slider/slider.d.ts +0 -176
- package/slider/slider.html +0 -1
- package/slider/slider.js +0 -609
- package/slider/slider.js.map +0 -1
- package/slider/slider.metadata.json +0 -1
- package/slider/slider.scss +0 -307
- package/slider/test-gesture-config.d.ts +0 -21
- package/slider/test-gesture-config.js +0 -60
- package/slider/test-gesture-config.js.map +0 -1
- package/slider/test-gesture-config.metadata.json +0 -1
- package/snack-bar/OVERVIEW.md +0 -47
- package/snack-bar/README.md +0 -37
- package/snack-bar/index.js +0 -6
- package/snack-bar/index.js.map +0 -1
- package/snack-bar/simple-snack-bar.css +0 -1
- package/snack-bar/simple-snack-bar.css.map +0 -1
- package/snack-bar/simple-snack-bar.d.ts +0 -17
- package/snack-bar/simple-snack-bar.html +0 -1
- package/snack-bar/simple-snack-bar.js +0 -38
- package/snack-bar/simple-snack-bar.js.map +0 -1
- package/snack-bar/simple-snack-bar.metadata.json +0 -1
- package/snack-bar/simple-snack-bar.scss +0 -28
- package/snack-bar/snack-bar-config.d.ts +0 -15
- package/snack-bar/snack-bar-config.js +0 -18
- package/snack-bar/snack-bar-config.js.map +0 -1
- package/snack-bar/snack-bar-config.metadata.json +0 -1
- package/snack-bar/snack-bar-container.css +0 -1
- package/snack-bar/snack-bar-container.css.map +0 -1
- package/snack-bar/snack-bar-container.d.ts +0 -43
- package/snack-bar/snack-bar-container.html +0 -1
- package/snack-bar/snack-bar-container.js +0 -124
- package/snack-bar/snack-bar-container.js.map +0 -1
- package/snack-bar/snack-bar-container.metadata.json +0 -1
- package/snack-bar/snack-bar-container.scss +0 -27
- package/snack-bar/snack-bar-errors.d.ts +0 -8
- package/snack-bar/snack-bar-errors.js +0 -19
- package/snack-bar/snack-bar-errors.js.map +0 -1
- package/snack-bar/snack-bar-errors.metadata.json +0 -1
- package/snack-bar/snack-bar-ref.d.ts +0 -38
- package/snack-bar/snack-bar-ref.js +0 -70
- package/snack-bar/snack-bar-ref.js.map +0 -1
- package/snack-bar/snack-bar-ref.metadata.json +0 -1
- package/snack-bar/snack-bar.d.ts +0 -45
- package/snack-bar/snack-bar.js +0 -145
- package/snack-bar/snack-bar.js.map +0 -1
- package/snack-bar/snack-bar.metadata.json +0 -1
- package/system-config-spec.d.ts +0 -2
- package/tabs/OVERVIEW.md +0 -81
- package/tabs/README.md +0 -64
- package/tabs/Tabs Pagination.png +0 -0
- package/tabs/_tabs-common.scss +0 -42
- package/tabs/_tabs-theme.scss +0 -24
- package/tabs/index.js +0 -9
- package/tabs/index.js.map +0 -1
- package/tabs/ink-bar.d.ts +0 -27
- package/tabs/ink-bar.js +0 -58
- package/tabs/ink-bar.js.map +0 -1
- package/tabs/ink-bar.metadata.json +0 -1
- package/tabs/tab-body.d.ts +0 -59
- package/tabs/tab-body.html +0 -1
- package/tabs/tab-body.js +0 -157
- package/tabs/tab-body.js.map +0 -1
- package/tabs/tab-body.metadata.json +0 -1
- package/tabs/tab-group.css +0 -1
- package/tabs/tab-group.css.map +0 -1
- package/tabs/tab-group.d.ts +0 -71
- package/tabs/tab-group.html +0 -1
- package/tabs/tab-group.js +0 -236
- package/tabs/tab-group.js.map +0 -1
- package/tabs/tab-group.metadata.json +0 -1
- package/tabs/tab-group.scss +0 -59
- package/tabs/tab-header.css +0 -1
- package/tabs/tab-header.css.map +0 -1
- package/tabs/tab-header.d.ts +0 -137
- package/tabs/tab-header.html +0 -1
- package/tabs/tab-header.js +0 -354
- package/tabs/tab-header.js.map +0 -1
- package/tabs/tab-header.metadata.json +0 -1
- package/tabs/tab-header.scss +0 -85
- package/tabs/tab-label-wrapper.d.ts +0 -15
- package/tabs/tab-label-wrapper.js +0 -53
- package/tabs/tab-label-wrapper.js.map +0 -1
- package/tabs/tab-label-wrapper.metadata.json +0 -1
- package/tabs/tab-label.d.ts +0 -6
- package/tabs/tab-label.js +0 -32
- package/tabs/tab-label.js.map +0 -1
- package/tabs/tab-label.metadata.json +0 -1
- package/tabs/tab-nav-bar/index.d.ts +0 -1
- package/tabs/tab-nav-bar/index.js +0 -3
- package/tabs/tab-nav-bar/index.js.map +0 -1
- package/tabs/tab-nav-bar/index.metadata.json +0 -1
- package/tabs/tab-nav-bar/tab-nav-bar.css +0 -1
- package/tabs/tab-nav-bar/tab-nav-bar.css.map +0 -1
- package/tabs/tab-nav-bar/tab-nav-bar.d.ts +0 -37
- package/tabs/tab-nav-bar/tab-nav-bar.html +0 -1
- package/tabs/tab-nav-bar/tab-nav-bar.js +0 -103
- package/tabs/tab-nav-bar/tab-nav-bar.js.map +0 -1
- package/tabs/tab-nav-bar/tab-nav-bar.metadata.json +0 -1
- package/tabs/tab-nav-bar/tab-nav-bar.scss +0 -26
- package/tabs/tab.d.ts +0 -30
- package/tabs/tab.html +0 -1
- package/tabs/tab.js +0 -74
- package/tabs/tab.js.map +0 -1
- package/tabs/tab.metadata.json +0 -1
- package/toolbar/OVERVIEW.md +0 -51
- package/toolbar/README.md +0 -68
- package/toolbar/_toolbar-theme.scss +0 -33
- package/toolbar/index.js +0 -3
- package/toolbar/index.js.map +0 -1
- package/toolbar/toolbar.css +0 -1
- package/toolbar/toolbar.css.map +0 -1
- package/toolbar/toolbar.d.ts +0 -16
- package/toolbar/toolbar.html +0 -1
- package/toolbar/toolbar.js +0 -84
- package/toolbar/toolbar.js.map +0 -1
- package/toolbar/toolbar.metadata.json +0 -1
- package/toolbar/toolbar.scss +0 -58
- package/tooltip/OVERVIEW.md +0 -35
- package/tooltip/README.md +0 -28
- package/tooltip/_tooltip-theme.scss +0 -9
- package/tooltip/index.js +0 -3
- package/tooltip/index.js.map +0 -1
- package/tooltip/tooltip-errors.d.ts +0 -8
- package/tooltip/tooltip-errors.js +0 -19
- package/tooltip/tooltip-errors.js.map +0 -1
- package/tooltip/tooltip-errors.metadata.json +0 -1
- package/tooltip/tooltip.css +0 -1
- package/tooltip/tooltip.css.map +0 -1
- package/tooltip/tooltip.d.ts +0 -116
- package/tooltip/tooltip.html +0 -1
- package/tooltip/tooltip.js +0 -387
- package/tooltip/tooltip.js.map +0 -1
- package/tooltip/tooltip.metadata.json +0 -1
- package/tooltip/tooltip.scss +0 -26
- package/tsconfig-srcs.json +0 -31
- package/tsconfig.json +0 -34
- package/typedoc.json +0 -20
- package/typings.d.ts +0 -1
|
@@ -0,0 +1,2716 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
(function (global, factory) {
|
|
9
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/platform'), require('@angular/common'), require('@angular/core'), require('@angular/animations'), require('@angular/cdk/coercion'), require('@angular/cdk/rxjs'), require('@angular/cdk/bidi'), require('rxjs/Subject'), require('@angular/platform-browser'), require('@angular/cdk/keycodes'), require('rxjs/observable/fromEvent'), require('@angular/forms')) :
|
|
10
|
+
typeof define === 'function' && define.amd ? define(['exports', '@angular/cdk/platform', '@angular/common', '@angular/core', '@angular/animations', '@angular/cdk/coercion', '@angular/cdk/rxjs', '@angular/cdk/bidi', 'rxjs/Subject', '@angular/platform-browser', '@angular/cdk/keycodes', 'rxjs/observable/fromEvent', '@angular/forms'], factory) :
|
|
11
|
+
(factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.input = global.ng.material.input || {}),global.ng.cdk.platform,global.ng.common,global.ng.core,global.ng.animations,global.ng.cdk.coercion,global.ng.cdk.rxjs,global.ng.cdk.bidi,global.Rx,global.ng.platformBrowser,global.ng.cdk.keycodes,global.Rx.Observable,global.ng.forms));
|
|
12
|
+
}(this, (function (exports,_angular_cdk_platform,_angular_common,_angular_core,_angular_animations,_angular_cdk_coercion,_angular_cdk_rxjs,_angular_cdk_bidi,rxjs_Subject,_angular_platformBrowser,_angular_cdk_keycodes,rxjs_observable_fromEvent,_angular_forms) { 'use strict';
|
|
13
|
+
|
|
14
|
+
/*! *****************************************************************************
|
|
15
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
16
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
17
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
18
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
|
|
20
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
21
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
22
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
23
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
24
|
+
|
|
25
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
26
|
+
and limitations under the License.
|
|
27
|
+
***************************************************************************** */
|
|
28
|
+
/* global Reflect, Promise */
|
|
29
|
+
|
|
30
|
+
var extendStatics = Object.setPrototypeOf ||
|
|
31
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
32
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
33
|
+
|
|
34
|
+
function __extends(d, b) {
|
|
35
|
+
extendStatics(d, b);
|
|
36
|
+
function __() { this.constructor = d; }
|
|
37
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
var MATERIAL_COMPATIBILITY_MODE = new _angular_core.InjectionToken('md-compatibility-mode');
|
|
41
|
+
/**
|
|
42
|
+
* Injection token that configures whether the Material sanity checks are enabled.
|
|
43
|
+
*/
|
|
44
|
+
var MATERIAL_SANITY_CHECKS = new _angular_core.InjectionToken('mat-sanity-checks');
|
|
45
|
+
/**
|
|
46
|
+
* Mixin to augment a directive with a `disabled` property.
|
|
47
|
+
* @template T
|
|
48
|
+
* @param {?} base
|
|
49
|
+
* @return {?}
|
|
50
|
+
*/
|
|
51
|
+
function mixinDisabled(base) {
|
|
52
|
+
return (function (_super) {
|
|
53
|
+
__extends(class_1, _super);
|
|
54
|
+
/**
|
|
55
|
+
* @param {...?} args
|
|
56
|
+
*/
|
|
57
|
+
function class_1() {
|
|
58
|
+
var args = [];
|
|
59
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
60
|
+
args[_i] = arguments[_i];
|
|
61
|
+
}
|
|
62
|
+
var _this = _super.apply(this, args) || this;
|
|
63
|
+
_this._disabled = false;
|
|
64
|
+
return _this;
|
|
65
|
+
}
|
|
66
|
+
Object.defineProperty(class_1.prototype, "disabled", {
|
|
67
|
+
/**
|
|
68
|
+
* @return {?}
|
|
69
|
+
*/
|
|
70
|
+
get: function () { return this._disabled; },
|
|
71
|
+
/**
|
|
72
|
+
* @param {?} value
|
|
73
|
+
* @return {?}
|
|
74
|
+
*/
|
|
75
|
+
set: function (value) { this._disabled = _angular_cdk_coercion.coerceBooleanProperty(value); },
|
|
76
|
+
enumerable: true,
|
|
77
|
+
configurable: true
|
|
78
|
+
});
|
|
79
|
+
return class_1;
|
|
80
|
+
}(base));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* InjectionToken for datepicker that can be used to override default locale code.
|
|
85
|
+
*/
|
|
86
|
+
var MAT_DATE_LOCALE = new _angular_core.InjectionToken('MAT_DATE_LOCALE');
|
|
87
|
+
/**
|
|
88
|
+
* Adapts type `D` to be usable as a date by cdk-based components that work with dates.
|
|
89
|
+
* @abstract
|
|
90
|
+
*/
|
|
91
|
+
var DateAdapter = (function () {
|
|
92
|
+
function DateAdapter() {
|
|
93
|
+
this._localeChanges = new rxjs_Subject.Subject();
|
|
94
|
+
}
|
|
95
|
+
Object.defineProperty(DateAdapter.prototype, "localeChanges", {
|
|
96
|
+
/**
|
|
97
|
+
* A stream that emits when the locale changes.
|
|
98
|
+
* @return {?}
|
|
99
|
+
*/
|
|
100
|
+
get: function () { return this._localeChanges; },
|
|
101
|
+
enumerable: true,
|
|
102
|
+
configurable: true
|
|
103
|
+
});
|
|
104
|
+
/**
|
|
105
|
+
* Gets the year component of the given date.
|
|
106
|
+
* @abstract
|
|
107
|
+
* @param {?} date The date to extract the year from.
|
|
108
|
+
* @return {?} The year component.
|
|
109
|
+
*/
|
|
110
|
+
DateAdapter.prototype.getYear = function (date) { };
|
|
111
|
+
/**
|
|
112
|
+
* Gets the month component of the given date.
|
|
113
|
+
* @abstract
|
|
114
|
+
* @param {?} date The date to extract the month from.
|
|
115
|
+
* @return {?} The month component (0-indexed, 0 = January).
|
|
116
|
+
*/
|
|
117
|
+
DateAdapter.prototype.getMonth = function (date) { };
|
|
118
|
+
/**
|
|
119
|
+
* Gets the date of the month component of the given date.
|
|
120
|
+
* @abstract
|
|
121
|
+
* @param {?} date The date to extract the date of the month from.
|
|
122
|
+
* @return {?} The month component (1-indexed, 1 = first of month).
|
|
123
|
+
*/
|
|
124
|
+
DateAdapter.prototype.getDate = function (date) { };
|
|
125
|
+
/**
|
|
126
|
+
* Gets the day of the week component of the given date.
|
|
127
|
+
* @abstract
|
|
128
|
+
* @param {?} date The date to extract the day of the week from.
|
|
129
|
+
* @return {?} The month component (0-indexed, 0 = Sunday).
|
|
130
|
+
*/
|
|
131
|
+
DateAdapter.prototype.getDayOfWeek = function (date) { };
|
|
132
|
+
/**
|
|
133
|
+
* Gets a list of names for the months.
|
|
134
|
+
* @abstract
|
|
135
|
+
* @param {?} style The naming style (e.g. long = 'January', short = 'Jan', narrow = 'J').
|
|
136
|
+
* @return {?} An ordered list of all month names, starting with January.
|
|
137
|
+
*/
|
|
138
|
+
DateAdapter.prototype.getMonthNames = function (style$$1) { };
|
|
139
|
+
/**
|
|
140
|
+
* Gets a list of names for the dates of the month.
|
|
141
|
+
* @abstract
|
|
142
|
+
* @return {?} An ordered list of all date of the month names, starting with '1'.
|
|
143
|
+
*/
|
|
144
|
+
DateAdapter.prototype.getDateNames = function () { };
|
|
145
|
+
/**
|
|
146
|
+
* Gets a list of names for the days of the week.
|
|
147
|
+
* @abstract
|
|
148
|
+
* @param {?} style The naming style (e.g. long = 'Sunday', short = 'Sun', narrow = 'S').
|
|
149
|
+
* @return {?} An ordered list of all weekday names, starting with Sunday.
|
|
150
|
+
*/
|
|
151
|
+
DateAdapter.prototype.getDayOfWeekNames = function (style$$1) { };
|
|
152
|
+
/**
|
|
153
|
+
* Gets the name for the year of the given date.
|
|
154
|
+
* @abstract
|
|
155
|
+
* @param {?} date The date to get the year name for.
|
|
156
|
+
* @return {?} The name of the given year (e.g. '2017').
|
|
157
|
+
*/
|
|
158
|
+
DateAdapter.prototype.getYearName = function (date) { };
|
|
159
|
+
/**
|
|
160
|
+
* Gets the first day of the week.
|
|
161
|
+
* @abstract
|
|
162
|
+
* @return {?} The first day of the week (0-indexed, 0 = Sunday).
|
|
163
|
+
*/
|
|
164
|
+
DateAdapter.prototype.getFirstDayOfWeek = function () { };
|
|
165
|
+
/**
|
|
166
|
+
* Gets the number of days in the month of the given date.
|
|
167
|
+
* @abstract
|
|
168
|
+
* @param {?} date The date whose month should be checked.
|
|
169
|
+
* @return {?} The number of days in the month of the given date.
|
|
170
|
+
*/
|
|
171
|
+
DateAdapter.prototype.getNumDaysInMonth = function (date) { };
|
|
172
|
+
/**
|
|
173
|
+
* Clones the given date.
|
|
174
|
+
* @abstract
|
|
175
|
+
* @param {?} date The date to clone
|
|
176
|
+
* @return {?} A new date equal to the given date.
|
|
177
|
+
*/
|
|
178
|
+
DateAdapter.prototype.clone = function (date) { };
|
|
179
|
+
/**
|
|
180
|
+
* Creates a date with the given year, month, and date. Does not allow over/under-flow of the
|
|
181
|
+
* month and date.
|
|
182
|
+
* @abstract
|
|
183
|
+
* @param {?} year The full year of the date. (e.g. 89 means the year 89, not the year 1989).
|
|
184
|
+
* @param {?} month The month of the date (0-indexed, 0 = January). Must be an integer 0 - 11.
|
|
185
|
+
* @param {?} date The date of month of the date. Must be an integer 1 - length of the given month.
|
|
186
|
+
* @return {?} The new date, or null if invalid.
|
|
187
|
+
*/
|
|
188
|
+
DateAdapter.prototype.createDate = function (year, month, date) { };
|
|
189
|
+
/**
|
|
190
|
+
* Gets today's date.
|
|
191
|
+
* @abstract
|
|
192
|
+
* @return {?} Today's date.
|
|
193
|
+
*/
|
|
194
|
+
DateAdapter.prototype.today = function () { };
|
|
195
|
+
/**
|
|
196
|
+
* Parses a date from a value.
|
|
197
|
+
* @abstract
|
|
198
|
+
* @param {?} value The value to parse.
|
|
199
|
+
* @param {?} parseFormat The expected format of the value being parsed
|
|
200
|
+
* (type is implementation-dependent).
|
|
201
|
+
* @return {?} The parsed date.
|
|
202
|
+
*/
|
|
203
|
+
DateAdapter.prototype.parse = function (value, parseFormat) { };
|
|
204
|
+
/**
|
|
205
|
+
* Formats a date as a string.
|
|
206
|
+
* @abstract
|
|
207
|
+
* @param {?} date The value to format.
|
|
208
|
+
* @param {?} displayFormat The format to use to display the date as a string.
|
|
209
|
+
* @return {?} The formatted date string.
|
|
210
|
+
*/
|
|
211
|
+
DateAdapter.prototype.format = function (date, displayFormat) { };
|
|
212
|
+
/**
|
|
213
|
+
* Adds the given number of years to the date. Years are counted as if flipping 12 pages on the
|
|
214
|
+
* calendar for each year and then finding the closest date in the new month. For example when
|
|
215
|
+
* adding 1 year to Feb 29, 2016, the resulting date will be Feb 28, 2017.
|
|
216
|
+
* @abstract
|
|
217
|
+
* @param {?} date The date to add years to.
|
|
218
|
+
* @param {?} years The number of years to add (may be negative).
|
|
219
|
+
* @return {?} A new date equal to the given one with the specified number of years added.
|
|
220
|
+
*/
|
|
221
|
+
DateAdapter.prototype.addCalendarYears = function (date, years) { };
|
|
222
|
+
/**
|
|
223
|
+
* Adds the given number of months to the date. Months are counted as if flipping a page on the
|
|
224
|
+
* calendar for each month and then finding the closest date in the new month. For example when
|
|
225
|
+
* adding 1 month to Jan 31, 2017, the resulting date will be Feb 28, 2017.
|
|
226
|
+
* @abstract
|
|
227
|
+
* @param {?} date The date to add months to.
|
|
228
|
+
* @param {?} months The number of months to add (may be negative).
|
|
229
|
+
* @return {?} A new date equal to the given one with the specified number of months added.
|
|
230
|
+
*/
|
|
231
|
+
DateAdapter.prototype.addCalendarMonths = function (date, months) { };
|
|
232
|
+
/**
|
|
233
|
+
* Adds the given number of days to the date. Days are counted as if moving one cell on the
|
|
234
|
+
* calendar for each day.
|
|
235
|
+
* @abstract
|
|
236
|
+
* @param {?} date The date to add days to.
|
|
237
|
+
* @param {?} days The number of days to add (may be negative).
|
|
238
|
+
* @return {?} A new date equal to the given one with the specified number of days added.
|
|
239
|
+
*/
|
|
240
|
+
DateAdapter.prototype.addCalendarDays = function (date, days) { };
|
|
241
|
+
/**
|
|
242
|
+
* Gets the RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339) for the given date.
|
|
243
|
+
* @abstract
|
|
244
|
+
* @param {?} date The date to get the ISO date string for.
|
|
245
|
+
* @return {?} The ISO date string date string.
|
|
246
|
+
*/
|
|
247
|
+
DateAdapter.prototype.toIso8601 = function (date) { };
|
|
248
|
+
/**
|
|
249
|
+
* Creates a date from an RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339).
|
|
250
|
+
* @abstract
|
|
251
|
+
* @param {?} iso8601String The ISO date string to create a date from
|
|
252
|
+
* @return {?} The date created from the ISO date string.
|
|
253
|
+
*/
|
|
254
|
+
DateAdapter.prototype.fromIso8601 = function (iso8601String) { };
|
|
255
|
+
/**
|
|
256
|
+
* Checks whether the given object is considered a date instance by this DateAdapter.
|
|
257
|
+
* @abstract
|
|
258
|
+
* @param {?} obj The object to check
|
|
259
|
+
* @return {?} Whether the object is a date instance.
|
|
260
|
+
*/
|
|
261
|
+
DateAdapter.prototype.isDateInstance = function (obj) { };
|
|
262
|
+
/**
|
|
263
|
+
* Checks whether the given date is valid.
|
|
264
|
+
* @abstract
|
|
265
|
+
* @param {?} date The date to check.
|
|
266
|
+
* @return {?} Whether the date is valid.
|
|
267
|
+
*/
|
|
268
|
+
DateAdapter.prototype.isValid = function (date) { };
|
|
269
|
+
/**
|
|
270
|
+
* Sets the locale used for all dates.
|
|
271
|
+
* @param {?} locale The new locale.
|
|
272
|
+
* @return {?}
|
|
273
|
+
*/
|
|
274
|
+
DateAdapter.prototype.setLocale = function (locale) {
|
|
275
|
+
this.locale = locale;
|
|
276
|
+
this._localeChanges.next();
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Compares two dates.
|
|
280
|
+
* @param {?} first The first date to compare.
|
|
281
|
+
* @param {?} second The second date to compare.
|
|
282
|
+
* @return {?} 0 if the dates are equal, a number less than 0 if the first date is earlier,
|
|
283
|
+
* a number greater than 0 if the first date is later.
|
|
284
|
+
*/
|
|
285
|
+
DateAdapter.prototype.compareDate = function (first$$1, second) {
|
|
286
|
+
return this.getYear(first$$1) - this.getYear(second) ||
|
|
287
|
+
this.getMonth(first$$1) - this.getMonth(second) ||
|
|
288
|
+
this.getDate(first$$1) - this.getDate(second);
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* Checks if two dates are equal.
|
|
292
|
+
* @param {?} first The first date to check.
|
|
293
|
+
* @param {?} second The second date to check.
|
|
294
|
+
* Null dates are considered equal to other null dates.
|
|
295
|
+
* @return {?}
|
|
296
|
+
*/
|
|
297
|
+
DateAdapter.prototype.sameDate = function (first$$1, second) {
|
|
298
|
+
return first$$1 && second ? !this.compareDate(first$$1, second) : first$$1 == second;
|
|
299
|
+
};
|
|
300
|
+
/**
|
|
301
|
+
* Clamp the given date between min and max dates.
|
|
302
|
+
* @param {?} date The date to clamp.
|
|
303
|
+
* @param {?=} min The minimum value to allow. If null or omitted no min is enforced.
|
|
304
|
+
* @param {?=} max The maximum value to allow. If null or omitted no max is enforced.
|
|
305
|
+
* @return {?} `min` if `date` is less than `min`, `max` if date is greater than `max`,
|
|
306
|
+
* otherwise `date`.
|
|
307
|
+
*/
|
|
308
|
+
DateAdapter.prototype.clampDate = function (date, min, max) {
|
|
309
|
+
if (min && this.compareDate(date, min) < 0) {
|
|
310
|
+
return min;
|
|
311
|
+
}
|
|
312
|
+
if (max && this.compareDate(date, max) > 0) {
|
|
313
|
+
return max;
|
|
314
|
+
}
|
|
315
|
+
return date;
|
|
316
|
+
};
|
|
317
|
+
return DateAdapter;
|
|
318
|
+
}());
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Extends an object with the *enumerable* and *own* properties of one or more source objects,
|
|
322
|
+
* similar to Object.assign.
|
|
323
|
+
*
|
|
324
|
+
* @param {?} dest The object which will have properties copied to it.
|
|
325
|
+
* @param {...?} sources The source objects from which properties will be copied.
|
|
326
|
+
* @return {?}
|
|
327
|
+
*/
|
|
328
|
+
function extendObject(dest) {
|
|
329
|
+
var sources = [];
|
|
330
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
331
|
+
sources[_i - 1] = arguments[_i];
|
|
332
|
+
}
|
|
333
|
+
if (dest == null) {
|
|
334
|
+
throw TypeError('Cannot convert undefined or null to object');
|
|
335
|
+
}
|
|
336
|
+
for (var _a = 0, sources_1 = sources; _a < sources_1.length; _a++) {
|
|
337
|
+
var source = sources_1[_a];
|
|
338
|
+
if (source != null) {
|
|
339
|
+
for (var /** @type {?} */ key in source) {
|
|
340
|
+
if (source.hasOwnProperty(key)) {
|
|
341
|
+
dest[key] = source[key];
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return dest;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Whether the browser supports the Intl API.
|
|
351
|
+
*/
|
|
352
|
+
var SUPPORTS_INTL_API = typeof Intl != 'undefined';
|
|
353
|
+
/**
|
|
354
|
+
* The default month names to use if Intl API is not available.
|
|
355
|
+
*/
|
|
356
|
+
var DEFAULT_MONTH_NAMES = {
|
|
357
|
+
'long': [
|
|
358
|
+
'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',
|
|
359
|
+
'October', 'November', 'December'
|
|
360
|
+
],
|
|
361
|
+
'short': ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
362
|
+
'narrow': ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D']
|
|
363
|
+
};
|
|
364
|
+
/**
|
|
365
|
+
* The default date names to use if Intl API is not available.
|
|
366
|
+
*/
|
|
367
|
+
var DEFAULT_DATE_NAMES = range(31, function (i) { return String(i + 1); });
|
|
368
|
+
/**
|
|
369
|
+
* The default day of the week names to use if Intl API is not available.
|
|
370
|
+
*/
|
|
371
|
+
var DEFAULT_DAY_OF_WEEK_NAMES = {
|
|
372
|
+
'long': ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
373
|
+
'short': ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
374
|
+
'narrow': ['S', 'M', 'T', 'W', 'T', 'F', 'S']
|
|
375
|
+
};
|
|
376
|
+
/**
|
|
377
|
+
* Matches strings that have the form of a valid RFC 3339 string
|
|
378
|
+
* (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date
|
|
379
|
+
* because the regex will match strings an with out of bounds month, date, etc.
|
|
380
|
+
*/
|
|
381
|
+
var ISO_8601_REGEX = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;
|
|
382
|
+
/**
|
|
383
|
+
* Creates an array and fills it with values.
|
|
384
|
+
* @template T
|
|
385
|
+
* @param {?} length
|
|
386
|
+
* @param {?} valueFunction
|
|
387
|
+
* @return {?}
|
|
388
|
+
*/
|
|
389
|
+
function range(length, valueFunction) {
|
|
390
|
+
var /** @type {?} */ valuesArray = Array(length);
|
|
391
|
+
for (var /** @type {?} */ i = 0; i < length; i++) {
|
|
392
|
+
valuesArray[i] = valueFunction(i);
|
|
393
|
+
}
|
|
394
|
+
return valuesArray;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Adapts the native JS Date for use with cdk-based components that work with dates.
|
|
398
|
+
*/
|
|
399
|
+
var NativeDateAdapter = (function (_super) {
|
|
400
|
+
__extends(NativeDateAdapter, _super);
|
|
401
|
+
/**
|
|
402
|
+
* @param {?} matDateLocale
|
|
403
|
+
*/
|
|
404
|
+
function NativeDateAdapter(matDateLocale) {
|
|
405
|
+
var _this = _super.call(this) || this;
|
|
406
|
+
/**
|
|
407
|
+
* Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
|
|
408
|
+
* Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
|
|
409
|
+
* the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
|
|
410
|
+
* will produce `'8/13/1800'`.
|
|
411
|
+
*/
|
|
412
|
+
_this.useUtcForDisplay = true;
|
|
413
|
+
_super.prototype.setLocale.call(_this, matDateLocale);
|
|
414
|
+
return _this;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* @param {?} date
|
|
418
|
+
* @return {?}
|
|
419
|
+
*/
|
|
420
|
+
NativeDateAdapter.prototype.getYear = function (date) {
|
|
421
|
+
return date.getFullYear();
|
|
422
|
+
};
|
|
423
|
+
/**
|
|
424
|
+
* @param {?} date
|
|
425
|
+
* @return {?}
|
|
426
|
+
*/
|
|
427
|
+
NativeDateAdapter.prototype.getMonth = function (date) {
|
|
428
|
+
return date.getMonth();
|
|
429
|
+
};
|
|
430
|
+
/**
|
|
431
|
+
* @param {?} date
|
|
432
|
+
* @return {?}
|
|
433
|
+
*/
|
|
434
|
+
NativeDateAdapter.prototype.getDate = function (date) {
|
|
435
|
+
return date.getDate();
|
|
436
|
+
};
|
|
437
|
+
/**
|
|
438
|
+
* @param {?} date
|
|
439
|
+
* @return {?}
|
|
440
|
+
*/
|
|
441
|
+
NativeDateAdapter.prototype.getDayOfWeek = function (date) {
|
|
442
|
+
return date.getDay();
|
|
443
|
+
};
|
|
444
|
+
/**
|
|
445
|
+
* @param {?} style
|
|
446
|
+
* @return {?}
|
|
447
|
+
*/
|
|
448
|
+
NativeDateAdapter.prototype.getMonthNames = function (style$$1) {
|
|
449
|
+
var _this = this;
|
|
450
|
+
if (SUPPORTS_INTL_API) {
|
|
451
|
+
var /** @type {?} */ dtf_1 = new Intl.DateTimeFormat(this.locale, { month: style$$1 });
|
|
452
|
+
return range(12, function (i) { return _this._stripDirectionalityCharacters(dtf_1.format(new Date(2017, i, 1))); });
|
|
453
|
+
}
|
|
454
|
+
return DEFAULT_MONTH_NAMES[style$$1];
|
|
455
|
+
};
|
|
456
|
+
/**
|
|
457
|
+
* @return {?}
|
|
458
|
+
*/
|
|
459
|
+
NativeDateAdapter.prototype.getDateNames = function () {
|
|
460
|
+
var _this = this;
|
|
461
|
+
if (SUPPORTS_INTL_API) {
|
|
462
|
+
var /** @type {?} */ dtf_2 = new Intl.DateTimeFormat(this.locale, { day: 'numeric' });
|
|
463
|
+
return range(31, function (i) { return _this._stripDirectionalityCharacters(dtf_2.format(new Date(2017, 0, i + 1))); });
|
|
464
|
+
}
|
|
465
|
+
return DEFAULT_DATE_NAMES;
|
|
466
|
+
};
|
|
467
|
+
/**
|
|
468
|
+
* @param {?} style
|
|
469
|
+
* @return {?}
|
|
470
|
+
*/
|
|
471
|
+
NativeDateAdapter.prototype.getDayOfWeekNames = function (style$$1) {
|
|
472
|
+
var _this = this;
|
|
473
|
+
if (SUPPORTS_INTL_API) {
|
|
474
|
+
var /** @type {?} */ dtf_3 = new Intl.DateTimeFormat(this.locale, { weekday: style$$1 });
|
|
475
|
+
return range(7, function (i) { return _this._stripDirectionalityCharacters(dtf_3.format(new Date(2017, 0, i + 1))); });
|
|
476
|
+
}
|
|
477
|
+
return DEFAULT_DAY_OF_WEEK_NAMES[style$$1];
|
|
478
|
+
};
|
|
479
|
+
/**
|
|
480
|
+
* @param {?} date
|
|
481
|
+
* @return {?}
|
|
482
|
+
*/
|
|
483
|
+
NativeDateAdapter.prototype.getYearName = function (date) {
|
|
484
|
+
if (SUPPORTS_INTL_API) {
|
|
485
|
+
var /** @type {?} */ dtf = new Intl.DateTimeFormat(this.locale, { year: 'numeric' });
|
|
486
|
+
return this._stripDirectionalityCharacters(dtf.format(date));
|
|
487
|
+
}
|
|
488
|
+
return String(this.getYear(date));
|
|
489
|
+
};
|
|
490
|
+
/**
|
|
491
|
+
* @return {?}
|
|
492
|
+
*/
|
|
493
|
+
NativeDateAdapter.prototype.getFirstDayOfWeek = function () {
|
|
494
|
+
// We can't tell using native JS Date what the first day of the week is, we default to Sunday.
|
|
495
|
+
return 0;
|
|
496
|
+
};
|
|
497
|
+
/**
|
|
498
|
+
* @param {?} date
|
|
499
|
+
* @return {?}
|
|
500
|
+
*/
|
|
501
|
+
NativeDateAdapter.prototype.getNumDaysInMonth = function (date) {
|
|
502
|
+
return this.getDate(this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0));
|
|
503
|
+
};
|
|
504
|
+
/**
|
|
505
|
+
* @param {?} date
|
|
506
|
+
* @return {?}
|
|
507
|
+
*/
|
|
508
|
+
NativeDateAdapter.prototype.clone = function (date) {
|
|
509
|
+
return this.createDate(this.getYear(date), this.getMonth(date), this.getDate(date));
|
|
510
|
+
};
|
|
511
|
+
/**
|
|
512
|
+
* @param {?} year
|
|
513
|
+
* @param {?} month
|
|
514
|
+
* @param {?} date
|
|
515
|
+
* @return {?}
|
|
516
|
+
*/
|
|
517
|
+
NativeDateAdapter.prototype.createDate = function (year, month, date) {
|
|
518
|
+
// Check for invalid month and date (except upper bound on date which we have to check after
|
|
519
|
+
// creating the Date).
|
|
520
|
+
if (month < 0 || month > 11) {
|
|
521
|
+
throw Error("Invalid month index \"" + month + "\". Month index has to be between 0 and 11.");
|
|
522
|
+
}
|
|
523
|
+
if (date < 1) {
|
|
524
|
+
throw Error("Invalid date \"" + date + "\". Date has to be greater than 0.");
|
|
525
|
+
}
|
|
526
|
+
var /** @type {?} */ result = this._createDateWithOverflow(year, month, date);
|
|
527
|
+
// Check that the date wasn't above the upper bound for the month, causing the month to overflow
|
|
528
|
+
if (result.getMonth() != month) {
|
|
529
|
+
throw Error("Invalid date \"" + date + "\" for month with index \"" + month + "\".");
|
|
530
|
+
}
|
|
531
|
+
return result;
|
|
532
|
+
};
|
|
533
|
+
/**
|
|
534
|
+
* @return {?}
|
|
535
|
+
*/
|
|
536
|
+
NativeDateAdapter.prototype.today = function () {
|
|
537
|
+
return new Date();
|
|
538
|
+
};
|
|
539
|
+
/**
|
|
540
|
+
* @param {?} value
|
|
541
|
+
* @return {?}
|
|
542
|
+
*/
|
|
543
|
+
NativeDateAdapter.prototype.parse = function (value) {
|
|
544
|
+
// We have no way using the native JS Date to set the parse format or locale, so we ignore these
|
|
545
|
+
// parameters.
|
|
546
|
+
if (typeof value == 'number') {
|
|
547
|
+
return new Date(value);
|
|
548
|
+
}
|
|
549
|
+
return value ? new Date(Date.parse(value)) : null;
|
|
550
|
+
};
|
|
551
|
+
/**
|
|
552
|
+
* @param {?} date
|
|
553
|
+
* @param {?} displayFormat
|
|
554
|
+
* @return {?}
|
|
555
|
+
*/
|
|
556
|
+
NativeDateAdapter.prototype.format = function (date, displayFormat) {
|
|
557
|
+
if (!this.isValid(date)) {
|
|
558
|
+
throw Error('NativeDateAdapter: Cannot format invalid date.');
|
|
559
|
+
}
|
|
560
|
+
if (SUPPORTS_INTL_API) {
|
|
561
|
+
if (this.useUtcForDisplay) {
|
|
562
|
+
date = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
563
|
+
displayFormat = extendObject({}, displayFormat, { timeZone: 'utc' });
|
|
564
|
+
}
|
|
565
|
+
var /** @type {?} */ dtf = new Intl.DateTimeFormat(this.locale, displayFormat);
|
|
566
|
+
return this._stripDirectionalityCharacters(dtf.format(date));
|
|
567
|
+
}
|
|
568
|
+
return this._stripDirectionalityCharacters(date.toDateString());
|
|
569
|
+
};
|
|
570
|
+
/**
|
|
571
|
+
* @param {?} date
|
|
572
|
+
* @param {?} years
|
|
573
|
+
* @return {?}
|
|
574
|
+
*/
|
|
575
|
+
NativeDateAdapter.prototype.addCalendarYears = function (date, years) {
|
|
576
|
+
return this.addCalendarMonths(date, years * 12);
|
|
577
|
+
};
|
|
578
|
+
/**
|
|
579
|
+
* @param {?} date
|
|
580
|
+
* @param {?} months
|
|
581
|
+
* @return {?}
|
|
582
|
+
*/
|
|
583
|
+
NativeDateAdapter.prototype.addCalendarMonths = function (date, months) {
|
|
584
|
+
var /** @type {?} */ newDate = this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + months, this.getDate(date));
|
|
585
|
+
// It's possible to wind up in the wrong month if the original month has more days than the new
|
|
586
|
+
// month. In this case we want to go to the last day of the desired month.
|
|
587
|
+
// Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't
|
|
588
|
+
// guarantee this.
|
|
589
|
+
if (this.getMonth(newDate) != ((this.getMonth(date) + months) % 12 + 12) % 12) {
|
|
590
|
+
newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0);
|
|
591
|
+
}
|
|
592
|
+
return newDate;
|
|
593
|
+
};
|
|
594
|
+
/**
|
|
595
|
+
* @param {?} date
|
|
596
|
+
* @param {?} days
|
|
597
|
+
* @return {?}
|
|
598
|
+
*/
|
|
599
|
+
NativeDateAdapter.prototype.addCalendarDays = function (date, days) {
|
|
600
|
+
return this._createDateWithOverflow(this.getYear(date), this.getMonth(date), this.getDate(date) + days);
|
|
601
|
+
};
|
|
602
|
+
/**
|
|
603
|
+
* @param {?} date
|
|
604
|
+
* @return {?}
|
|
605
|
+
*/
|
|
606
|
+
NativeDateAdapter.prototype.toIso8601 = function (date) {
|
|
607
|
+
return [
|
|
608
|
+
date.getUTCFullYear(),
|
|
609
|
+
this._2digit(date.getUTCMonth() + 1),
|
|
610
|
+
this._2digit(date.getUTCDate())
|
|
611
|
+
].join('-');
|
|
612
|
+
};
|
|
613
|
+
/**
|
|
614
|
+
* @param {?} iso8601String
|
|
615
|
+
* @return {?}
|
|
616
|
+
*/
|
|
617
|
+
NativeDateAdapter.prototype.fromIso8601 = function (iso8601String) {
|
|
618
|
+
// The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the
|
|
619
|
+
// string is the right format first.
|
|
620
|
+
if (ISO_8601_REGEX.test(iso8601String)) {
|
|
621
|
+
var /** @type {?} */ d = new Date(iso8601String);
|
|
622
|
+
if (this.isValid(d)) {
|
|
623
|
+
return d;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
return null;
|
|
627
|
+
};
|
|
628
|
+
/**
|
|
629
|
+
* @param {?} obj
|
|
630
|
+
* @return {?}
|
|
631
|
+
*/
|
|
632
|
+
NativeDateAdapter.prototype.isDateInstance = function (obj) {
|
|
633
|
+
return obj instanceof Date;
|
|
634
|
+
};
|
|
635
|
+
/**
|
|
636
|
+
* @param {?} date
|
|
637
|
+
* @return {?}
|
|
638
|
+
*/
|
|
639
|
+
NativeDateAdapter.prototype.isValid = function (date) {
|
|
640
|
+
return !isNaN(date.getTime());
|
|
641
|
+
};
|
|
642
|
+
/**
|
|
643
|
+
* Creates a date but allows the month and date to overflow.
|
|
644
|
+
* @param {?} year
|
|
645
|
+
* @param {?} month
|
|
646
|
+
* @param {?} date
|
|
647
|
+
* @return {?}
|
|
648
|
+
*/
|
|
649
|
+
NativeDateAdapter.prototype._createDateWithOverflow = function (year, month, date) {
|
|
650
|
+
var /** @type {?} */ result = new Date(year, month, date);
|
|
651
|
+
// We need to correct for the fact that JS native Date treats years in range [0, 99] as
|
|
652
|
+
// abbreviations for 19xx.
|
|
653
|
+
if (year >= 0 && year < 100) {
|
|
654
|
+
result.setFullYear(this.getYear(result) - 1900);
|
|
655
|
+
}
|
|
656
|
+
return result;
|
|
657
|
+
};
|
|
658
|
+
/**
|
|
659
|
+
* Pads a number to make it two digits.
|
|
660
|
+
* @param {?} n The number to pad.
|
|
661
|
+
* @return {?} The padded number.
|
|
662
|
+
*/
|
|
663
|
+
NativeDateAdapter.prototype._2digit = function (n) {
|
|
664
|
+
return ('00' + n).slice(-2);
|
|
665
|
+
};
|
|
666
|
+
/**
|
|
667
|
+
* Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
|
|
668
|
+
* other browsers do not. We remove them to make output consistent and because they interfere with
|
|
669
|
+
* date parsing.
|
|
670
|
+
* @param {?} str The string to strip direction characters from.
|
|
671
|
+
* @return {?} The stripped string.
|
|
672
|
+
*/
|
|
673
|
+
NativeDateAdapter.prototype._stripDirectionalityCharacters = function (str) {
|
|
674
|
+
return str.replace(/[\u200e\u200f]/g, '');
|
|
675
|
+
};
|
|
676
|
+
NativeDateAdapter.decorators = [
|
|
677
|
+
{ type: _angular_core.Injectable },
|
|
678
|
+
];
|
|
679
|
+
/**
|
|
680
|
+
* @nocollapse
|
|
681
|
+
*/
|
|
682
|
+
NativeDateAdapter.ctorParameters = function () { return [
|
|
683
|
+
{ type: undefined, decorators: [{ type: _angular_core.Optional }, { type: _angular_core.Inject, args: [MAT_DATE_LOCALE,] },] },
|
|
684
|
+
]; };
|
|
685
|
+
return NativeDateAdapter;
|
|
686
|
+
}(DateAdapter));
|
|
687
|
+
|
|
688
|
+
var MAT_DATE_FORMATS = new _angular_core.InjectionToken('mat-date-formats');
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Provider that defines how form controls behave with regards to displaying error messages.
|
|
692
|
+
*/
|
|
693
|
+
var ErrorStateMatcher = (function () {
|
|
694
|
+
function ErrorStateMatcher() {
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* @param {?} control
|
|
698
|
+
* @param {?} form
|
|
699
|
+
* @return {?}
|
|
700
|
+
*/
|
|
701
|
+
ErrorStateMatcher.prototype.isErrorState = function (control, form) {
|
|
702
|
+
return !!(control && control.invalid && (control.touched || (form && form.submitted)));
|
|
703
|
+
};
|
|
704
|
+
ErrorStateMatcher.decorators = [
|
|
705
|
+
{ type: _angular_core.Injectable },
|
|
706
|
+
];
|
|
707
|
+
/**
|
|
708
|
+
* @nocollapse
|
|
709
|
+
*/
|
|
710
|
+
ErrorStateMatcher.ctorParameters = function () { return []; };
|
|
711
|
+
return ErrorStateMatcher;
|
|
712
|
+
}());
|
|
713
|
+
|
|
714
|
+
var GestureConfig = (function (_super) {
|
|
715
|
+
__extends(GestureConfig, _super);
|
|
716
|
+
function GestureConfig() {
|
|
717
|
+
var _this = _super.call(this) || this;
|
|
718
|
+
_this._hammer = typeof window !== 'undefined' ? ((window)).Hammer : null;
|
|
719
|
+
/* List of new event names to add to the gesture support list */
|
|
720
|
+
_this.events = _this._hammer ? [
|
|
721
|
+
'longpress',
|
|
722
|
+
'slide',
|
|
723
|
+
'slidestart',
|
|
724
|
+
'slideend',
|
|
725
|
+
'slideright',
|
|
726
|
+
'slideleft'
|
|
727
|
+
] : [];
|
|
728
|
+
if (!_this._hammer && _angular_core.isDevMode()) {
|
|
729
|
+
console.warn('Could not find HammerJS. Certain Angular Material ' +
|
|
730
|
+
'components may not work correctly.');
|
|
731
|
+
}
|
|
732
|
+
return _this;
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Builds Hammer instance manually to add custom recognizers that match the Material Design spec.
|
|
736
|
+
*
|
|
737
|
+
* Our gesture names come from the Material Design gestures spec:
|
|
738
|
+
* https://www.google.com/design/spec/patterns/gestures.html#gestures-touch-mechanics
|
|
739
|
+
*
|
|
740
|
+
* More information on default recognizers can be found in Hammer docs:
|
|
741
|
+
* http://hammerjs.github.io/recognizer-pan/
|
|
742
|
+
* http://hammerjs.github.io/recognizer-press/
|
|
743
|
+
*
|
|
744
|
+
* @param {?} element Element to which to assign the new HammerJS gestures.
|
|
745
|
+
* @return {?} Newly-created HammerJS instance.
|
|
746
|
+
*/
|
|
747
|
+
GestureConfig.prototype.buildHammer = function (element) {
|
|
748
|
+
var /** @type {?} */ mc = new this._hammer(element);
|
|
749
|
+
// Default Hammer Recognizers.
|
|
750
|
+
var /** @type {?} */ pan = new this._hammer.Pan();
|
|
751
|
+
var /** @type {?} */ swipe = new this._hammer.Swipe();
|
|
752
|
+
var /** @type {?} */ press = new this._hammer.Press();
|
|
753
|
+
// Notice that a HammerJS recognizer can only depend on one other recognizer once.
|
|
754
|
+
// Otherwise the previous `recognizeWith` will be dropped.
|
|
755
|
+
// TODO: Confirm threshold numbers with Material Design UX Team
|
|
756
|
+
var /** @type {?} */ slide = this._createRecognizer(pan, { event: 'slide', threshold: 0 }, swipe);
|
|
757
|
+
var /** @type {?} */ longpress = this._createRecognizer(press, { event: 'longpress', time: 500 });
|
|
758
|
+
// Overwrite the default `pan` event to use the swipe event.
|
|
759
|
+
pan.recognizeWith(swipe);
|
|
760
|
+
// Add customized gestures to Hammer manager
|
|
761
|
+
mc.add([swipe, press, pan, slide, longpress]);
|
|
762
|
+
return (mc);
|
|
763
|
+
};
|
|
764
|
+
/**
|
|
765
|
+
* Creates a new recognizer, without affecting the default recognizers of HammerJS
|
|
766
|
+
* @param {?} base
|
|
767
|
+
* @param {?} options
|
|
768
|
+
* @param {...?} inheritances
|
|
769
|
+
* @return {?}
|
|
770
|
+
*/
|
|
771
|
+
GestureConfig.prototype._createRecognizer = function (base, options) {
|
|
772
|
+
var inheritances = [];
|
|
773
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
774
|
+
inheritances[_i - 2] = arguments[_i];
|
|
775
|
+
}
|
|
776
|
+
var /** @type {?} */ recognizer = new ((base.constructor))(options);
|
|
777
|
+
inheritances.push(base);
|
|
778
|
+
inheritances.forEach(function (item) { return recognizer.recognizeWith(item); });
|
|
779
|
+
return recognizer;
|
|
780
|
+
};
|
|
781
|
+
GestureConfig.decorators = [
|
|
782
|
+
{ type: _angular_core.Injectable },
|
|
783
|
+
];
|
|
784
|
+
/**
|
|
785
|
+
* @nocollapse
|
|
786
|
+
*/
|
|
787
|
+
GestureConfig.ctorParameters = function () { return []; };
|
|
788
|
+
return GestureConfig;
|
|
789
|
+
}(_angular_platformBrowser.HammerGestureConfig));
|
|
790
|
+
|
|
791
|
+
var RippleState = {};
|
|
792
|
+
RippleState.FADING_IN = 0;
|
|
793
|
+
RippleState.VISIBLE = 1;
|
|
794
|
+
RippleState.FADING_OUT = 2;
|
|
795
|
+
RippleState.HIDDEN = 3;
|
|
796
|
+
RippleState[RippleState.FADING_IN] = "FADING_IN";
|
|
797
|
+
RippleState[RippleState.VISIBLE] = "VISIBLE";
|
|
798
|
+
RippleState[RippleState.FADING_OUT] = "FADING_OUT";
|
|
799
|
+
RippleState[RippleState.HIDDEN] = "HIDDEN";
|
|
800
|
+
/**
|
|
801
|
+
* Reference to a previously launched ripple element.
|
|
802
|
+
*/
|
|
803
|
+
var RippleRef = (function () {
|
|
804
|
+
/**
|
|
805
|
+
* @param {?} _renderer
|
|
806
|
+
* @param {?} element
|
|
807
|
+
* @param {?} config
|
|
808
|
+
*/
|
|
809
|
+
function RippleRef(_renderer, element, config) {
|
|
810
|
+
this._renderer = _renderer;
|
|
811
|
+
this.element = element;
|
|
812
|
+
this.config = config;
|
|
813
|
+
/**
|
|
814
|
+
* Current state of the ripple reference.
|
|
815
|
+
*/
|
|
816
|
+
this.state = RippleState.HIDDEN;
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Fades out the ripple element.
|
|
820
|
+
* @return {?}
|
|
821
|
+
*/
|
|
822
|
+
RippleRef.prototype.fadeOut = function () {
|
|
823
|
+
this._renderer.fadeOutRipple(this);
|
|
824
|
+
};
|
|
825
|
+
return RippleRef;
|
|
826
|
+
}());
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* Fade-in duration for the ripples. Can be modified with the speedFactor option.
|
|
830
|
+
*/
|
|
831
|
+
var RIPPLE_FADE_IN_DURATION = 450;
|
|
832
|
+
/**
|
|
833
|
+
* Fade-out duration for the ripples in milliseconds. This can't be modified by the speedFactor.
|
|
834
|
+
*/
|
|
835
|
+
var RIPPLE_FADE_OUT_DURATION = 400;
|
|
836
|
+
/**
|
|
837
|
+
* Helper service that performs DOM manipulations. Not intended to be used outside this module.
|
|
838
|
+
* The constructor takes a reference to the ripple directive's host element and a map of DOM
|
|
839
|
+
* event handlers to be installed on the element that triggers ripple animations.
|
|
840
|
+
* This will eventually become a custom renderer once Angular support exists.
|
|
841
|
+
* \@docs-private
|
|
842
|
+
*/
|
|
843
|
+
var RippleRenderer = (function () {
|
|
844
|
+
/**
|
|
845
|
+
* @param {?} elementRef
|
|
846
|
+
* @param {?} _ngZone
|
|
847
|
+
* @param {?} platform
|
|
848
|
+
*/
|
|
849
|
+
function RippleRenderer(elementRef, _ngZone, platform) {
|
|
850
|
+
this._ngZone = _ngZone;
|
|
851
|
+
/**
|
|
852
|
+
* Whether the pointer is currently being held on the trigger or not.
|
|
853
|
+
*/
|
|
854
|
+
this._isPointerDown = false;
|
|
855
|
+
/**
|
|
856
|
+
* Events to be registered on the trigger element.
|
|
857
|
+
*/
|
|
858
|
+
this._triggerEvents = new Map();
|
|
859
|
+
/**
|
|
860
|
+
* Set of currently active ripple references.
|
|
861
|
+
*/
|
|
862
|
+
this._activeRipples = new Set();
|
|
863
|
+
/**
|
|
864
|
+
* Ripple config for all ripples created by events.
|
|
865
|
+
*/
|
|
866
|
+
this.rippleConfig = {};
|
|
867
|
+
/**
|
|
868
|
+
* Whether mouse ripples should be created or not.
|
|
869
|
+
*/
|
|
870
|
+
this.rippleDisabled = false;
|
|
871
|
+
// Only do anything if we're on the browser.
|
|
872
|
+
if (platform.isBrowser) {
|
|
873
|
+
this._containerElement = elementRef.nativeElement;
|
|
874
|
+
// Specify events which need to be registered on the trigger.
|
|
875
|
+
this._triggerEvents.set('mousedown', this.onMousedown.bind(this));
|
|
876
|
+
this._triggerEvents.set('touchstart', this.onTouchstart.bind(this));
|
|
877
|
+
this._triggerEvents.set('mouseup', this.onPointerUp.bind(this));
|
|
878
|
+
this._triggerEvents.set('touchend', this.onPointerUp.bind(this));
|
|
879
|
+
this._triggerEvents.set('mouseleave', this.onPointerLeave.bind(this));
|
|
880
|
+
// By default use the host element as trigger element.
|
|
881
|
+
this.setTriggerElement(this._containerElement);
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Fades in a ripple at the given coordinates.
|
|
886
|
+
* @param {?} x Coordinate within the element, along the X axis at which to start the ripple.
|
|
887
|
+
* @param {?} y
|
|
888
|
+
* @param {?=} config Extra ripple options.
|
|
889
|
+
* @return {?}
|
|
890
|
+
*/
|
|
891
|
+
RippleRenderer.prototype.fadeInRipple = function (x, y, config) {
|
|
892
|
+
var _this = this;
|
|
893
|
+
if (config === void 0) { config = {}; }
|
|
894
|
+
var /** @type {?} */ containerRect = this._containerElement.getBoundingClientRect();
|
|
895
|
+
if (config.centered) {
|
|
896
|
+
x = containerRect.left + containerRect.width / 2;
|
|
897
|
+
y = containerRect.top + containerRect.height / 2;
|
|
898
|
+
}
|
|
899
|
+
var /** @type {?} */ radius = config.radius || distanceToFurthestCorner(x, y, containerRect);
|
|
900
|
+
var /** @type {?} */ duration = RIPPLE_FADE_IN_DURATION * (1 / (config.speedFactor || 1));
|
|
901
|
+
var /** @type {?} */ offsetX = x - containerRect.left;
|
|
902
|
+
var /** @type {?} */ offsetY = y - containerRect.top;
|
|
903
|
+
var /** @type {?} */ ripple = document.createElement('div');
|
|
904
|
+
ripple.classList.add('mat-ripple-element');
|
|
905
|
+
ripple.style.left = offsetX - radius + "px";
|
|
906
|
+
ripple.style.top = offsetY - radius + "px";
|
|
907
|
+
ripple.style.height = radius * 2 + "px";
|
|
908
|
+
ripple.style.width = radius * 2 + "px";
|
|
909
|
+
// If the color is not set, the default CSS color will be used.
|
|
910
|
+
ripple.style.backgroundColor = config.color || null;
|
|
911
|
+
ripple.style.transitionDuration = duration + "ms";
|
|
912
|
+
this._containerElement.appendChild(ripple);
|
|
913
|
+
// By default the browser does not recalculate the styles of dynamically created
|
|
914
|
+
// ripple elements. This is critical because then the `scale` would not animate properly.
|
|
915
|
+
enforceStyleRecalculation(ripple);
|
|
916
|
+
ripple.style.transform = 'scale(1)';
|
|
917
|
+
// Exposed reference to the ripple that will be returned.
|
|
918
|
+
var /** @type {?} */ rippleRef = new RippleRef(this, ripple, config);
|
|
919
|
+
rippleRef.state = RippleState.FADING_IN;
|
|
920
|
+
// Add the ripple reference to the list of all active ripples.
|
|
921
|
+
this._activeRipples.add(rippleRef);
|
|
922
|
+
// Wait for the ripple element to be completely faded in.
|
|
923
|
+
// Once it's faded in, the ripple can be hidden immediately if the mouse is released.
|
|
924
|
+
this.runTimeoutOutsideZone(function () {
|
|
925
|
+
rippleRef.state = RippleState.VISIBLE;
|
|
926
|
+
if (!config.persistent && !_this._isPointerDown) {
|
|
927
|
+
rippleRef.fadeOut();
|
|
928
|
+
}
|
|
929
|
+
}, duration);
|
|
930
|
+
return rippleRef;
|
|
931
|
+
};
|
|
932
|
+
/**
|
|
933
|
+
* Fades out a ripple reference.
|
|
934
|
+
* @param {?} rippleRef
|
|
935
|
+
* @return {?}
|
|
936
|
+
*/
|
|
937
|
+
RippleRenderer.prototype.fadeOutRipple = function (rippleRef) {
|
|
938
|
+
// For ripples that are not active anymore, don't re-un the fade-out animation.
|
|
939
|
+
if (!this._activeRipples.delete(rippleRef)) {
|
|
940
|
+
return;
|
|
941
|
+
}
|
|
942
|
+
var /** @type {?} */ rippleEl = rippleRef.element;
|
|
943
|
+
rippleEl.style.transitionDuration = RIPPLE_FADE_OUT_DURATION + "ms";
|
|
944
|
+
rippleEl.style.opacity = '0';
|
|
945
|
+
rippleRef.state = RippleState.FADING_OUT;
|
|
946
|
+
// Once the ripple faded out, the ripple can be safely removed from the DOM.
|
|
947
|
+
this.runTimeoutOutsideZone(function () {
|
|
948
|
+
rippleRef.state = RippleState.HIDDEN; /** @type {?} */
|
|
949
|
+
((rippleEl.parentNode)).removeChild(rippleEl);
|
|
950
|
+
}, RIPPLE_FADE_OUT_DURATION);
|
|
951
|
+
};
|
|
952
|
+
/**
|
|
953
|
+
* Fades out all currently active ripples.
|
|
954
|
+
* @return {?}
|
|
955
|
+
*/
|
|
956
|
+
RippleRenderer.prototype.fadeOutAll = function () {
|
|
957
|
+
this._activeRipples.forEach(function (ripple) { return ripple.fadeOut(); });
|
|
958
|
+
};
|
|
959
|
+
/**
|
|
960
|
+
* Sets the trigger element and registers the mouse events.
|
|
961
|
+
* @param {?} element
|
|
962
|
+
* @return {?}
|
|
963
|
+
*/
|
|
964
|
+
RippleRenderer.prototype.setTriggerElement = function (element) {
|
|
965
|
+
var _this = this;
|
|
966
|
+
// Remove all previously register event listeners from the trigger element.
|
|
967
|
+
if (this._triggerElement) {
|
|
968
|
+
this._triggerEvents.forEach(function (fn, type) {
|
|
969
|
+
((_this._triggerElement)).removeEventListener(type, fn);
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
if (element) {
|
|
973
|
+
// If the element is not null, register all event listeners on the trigger element.
|
|
974
|
+
this._ngZone.runOutsideAngular(function () {
|
|
975
|
+
_this._triggerEvents.forEach(function (fn, type) { return element.addEventListener(type, fn); });
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
this._triggerElement = element;
|
|
979
|
+
};
|
|
980
|
+
/**
|
|
981
|
+
* Function being called whenever the trigger is being pressed.
|
|
982
|
+
* @param {?} event
|
|
983
|
+
* @return {?}
|
|
984
|
+
*/
|
|
985
|
+
RippleRenderer.prototype.onMousedown = function (event) {
|
|
986
|
+
if (!this.rippleDisabled) {
|
|
987
|
+
this._isPointerDown = true;
|
|
988
|
+
this.fadeInRipple(event.clientX, event.clientY, this.rippleConfig);
|
|
989
|
+
}
|
|
990
|
+
};
|
|
991
|
+
/**
|
|
992
|
+
* Function being called whenever the pointer is being released.
|
|
993
|
+
* @return {?}
|
|
994
|
+
*/
|
|
995
|
+
RippleRenderer.prototype.onPointerUp = function () {
|
|
996
|
+
this._isPointerDown = false;
|
|
997
|
+
// Fade-out all ripples that are completely visible and not persistent.
|
|
998
|
+
this._activeRipples.forEach(function (ripple) {
|
|
999
|
+
if (!ripple.config.persistent && ripple.state === RippleState.VISIBLE) {
|
|
1000
|
+
ripple.fadeOut();
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
};
|
|
1004
|
+
/**
|
|
1005
|
+
* Function being called whenever the pointer leaves the trigger.
|
|
1006
|
+
* @return {?}
|
|
1007
|
+
*/
|
|
1008
|
+
RippleRenderer.prototype.onPointerLeave = function () {
|
|
1009
|
+
if (this._isPointerDown) {
|
|
1010
|
+
this.onPointerUp();
|
|
1011
|
+
}
|
|
1012
|
+
};
|
|
1013
|
+
/**
|
|
1014
|
+
* Function being called whenever the trigger is being touched.
|
|
1015
|
+
* @param {?} event
|
|
1016
|
+
* @return {?}
|
|
1017
|
+
*/
|
|
1018
|
+
RippleRenderer.prototype.onTouchstart = function (event) {
|
|
1019
|
+
if (!this.rippleDisabled) {
|
|
1020
|
+
var _a = event.touches[0], clientX = _a.clientX, clientY = _a.clientY;
|
|
1021
|
+
this._isPointerDown = true;
|
|
1022
|
+
this.fadeInRipple(clientX, clientY, this.rippleConfig);
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
1025
|
+
/**
|
|
1026
|
+
* Runs a timeout outside of the Angular zone to avoid triggering the change detection.
|
|
1027
|
+
* @param {?} fn
|
|
1028
|
+
* @param {?=} delay
|
|
1029
|
+
* @return {?}
|
|
1030
|
+
*/
|
|
1031
|
+
RippleRenderer.prototype.runTimeoutOutsideZone = function (fn, delay) {
|
|
1032
|
+
if (delay === void 0) { delay = 0; }
|
|
1033
|
+
this._ngZone.runOutsideAngular(function () { return setTimeout(fn, delay); });
|
|
1034
|
+
};
|
|
1035
|
+
return RippleRenderer;
|
|
1036
|
+
}());
|
|
1037
|
+
/**
|
|
1038
|
+
* @param {?} element
|
|
1039
|
+
* @return {?}
|
|
1040
|
+
*/
|
|
1041
|
+
function enforceStyleRecalculation(element) {
|
|
1042
|
+
// Enforce a style recalculation by calling `getComputedStyle` and accessing any property.
|
|
1043
|
+
// Calling `getPropertyValue` is important to let optimizers know that this is not a noop.
|
|
1044
|
+
// See: https://gist.github.com/paulirish/5d52fb081b3570c81e3a
|
|
1045
|
+
window.getComputedStyle(element).getPropertyValue('opacity');
|
|
1046
|
+
}
|
|
1047
|
+
/**
|
|
1048
|
+
* Returns the distance from the point (x, y) to the furthest corner of a rectangle.
|
|
1049
|
+
* @param {?} x
|
|
1050
|
+
* @param {?} y
|
|
1051
|
+
* @param {?} rect
|
|
1052
|
+
* @return {?}
|
|
1053
|
+
*/
|
|
1054
|
+
function distanceToFurthestCorner(x, y, rect) {
|
|
1055
|
+
var /** @type {?} */ distX = Math.max(Math.abs(x - rect.left), Math.abs(x - rect.right));
|
|
1056
|
+
var /** @type {?} */ distY = Math.max(Math.abs(y - rect.top), Math.abs(y - rect.bottom));
|
|
1057
|
+
return Math.sqrt(distX * distX + distY * distY);
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Injection token that can be used to specify the global ripple options.
|
|
1062
|
+
*/
|
|
1063
|
+
var MAT_RIPPLE_GLOBAL_OPTIONS = new _angular_core.InjectionToken('mat-ripple-global-options');
|
|
1064
|
+
var MatRipple = (function () {
|
|
1065
|
+
/**
|
|
1066
|
+
* @param {?} elementRef
|
|
1067
|
+
* @param {?} ngZone
|
|
1068
|
+
* @param {?} platform
|
|
1069
|
+
* @param {?} globalOptions
|
|
1070
|
+
*/
|
|
1071
|
+
function MatRipple(elementRef, ngZone, platform, globalOptions) {
|
|
1072
|
+
/**
|
|
1073
|
+
* If set, the radius in pixels of foreground ripples when fully expanded. If unset, the radius
|
|
1074
|
+
* will be the distance from the center of the ripple to the furthest corner of the host element's
|
|
1075
|
+
* bounding rectangle.
|
|
1076
|
+
*/
|
|
1077
|
+
this.radius = 0;
|
|
1078
|
+
/**
|
|
1079
|
+
* If set, the normal duration of ripple animations is divided by this value. For example,
|
|
1080
|
+
* setting it to 0.5 will cause the animations to take twice as long.
|
|
1081
|
+
* A changed speedFactor will not modify the fade-out duration of the ripples.
|
|
1082
|
+
*/
|
|
1083
|
+
this.speedFactor = 1;
|
|
1084
|
+
this._rippleRenderer = new RippleRenderer(elementRef, ngZone, platform);
|
|
1085
|
+
this._globalOptions = globalOptions ? globalOptions : {};
|
|
1086
|
+
this._updateRippleRenderer();
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* @param {?} changes
|
|
1090
|
+
* @return {?}
|
|
1091
|
+
*/
|
|
1092
|
+
MatRipple.prototype.ngOnChanges = function (changes) {
|
|
1093
|
+
if ((changes['trigger'] || changes['_matRippleTrigger']) && this.trigger) {
|
|
1094
|
+
this._rippleRenderer.setTriggerElement(this.trigger);
|
|
1095
|
+
}
|
|
1096
|
+
this._updateRippleRenderer();
|
|
1097
|
+
};
|
|
1098
|
+
/**
|
|
1099
|
+
* @return {?}
|
|
1100
|
+
*/
|
|
1101
|
+
MatRipple.prototype.ngOnDestroy = function () {
|
|
1102
|
+
// Set the trigger element to null to cleanup all listeners.
|
|
1103
|
+
this._rippleRenderer.setTriggerElement(null);
|
|
1104
|
+
};
|
|
1105
|
+
/**
|
|
1106
|
+
* Launches a manual ripple at the specified position.
|
|
1107
|
+
* @param {?} x
|
|
1108
|
+
* @param {?} y
|
|
1109
|
+
* @param {?=} config
|
|
1110
|
+
* @return {?}
|
|
1111
|
+
*/
|
|
1112
|
+
MatRipple.prototype.launch = function (x, y, config) {
|
|
1113
|
+
if (config === void 0) { config = this.rippleConfig; }
|
|
1114
|
+
return this._rippleRenderer.fadeInRipple(x, y, config);
|
|
1115
|
+
};
|
|
1116
|
+
/**
|
|
1117
|
+
* Fades out all currently showing ripple elements.
|
|
1118
|
+
* @return {?}
|
|
1119
|
+
*/
|
|
1120
|
+
MatRipple.prototype.fadeOutAll = function () {
|
|
1121
|
+
this._rippleRenderer.fadeOutAll();
|
|
1122
|
+
};
|
|
1123
|
+
Object.defineProperty(MatRipple.prototype, "rippleConfig", {
|
|
1124
|
+
/**
|
|
1125
|
+
* Ripple configuration from the directive's input values.
|
|
1126
|
+
* @return {?}
|
|
1127
|
+
*/
|
|
1128
|
+
get: function () {
|
|
1129
|
+
return {
|
|
1130
|
+
centered: this.centered,
|
|
1131
|
+
speedFactor: this.speedFactor * (this._globalOptions.baseSpeedFactor || 1),
|
|
1132
|
+
radius: this.radius,
|
|
1133
|
+
color: this.color
|
|
1134
|
+
};
|
|
1135
|
+
},
|
|
1136
|
+
enumerable: true,
|
|
1137
|
+
configurable: true
|
|
1138
|
+
});
|
|
1139
|
+
/**
|
|
1140
|
+
* Updates the ripple renderer with the latest ripple configuration.
|
|
1141
|
+
* @return {?}
|
|
1142
|
+
*/
|
|
1143
|
+
MatRipple.prototype._updateRippleRenderer = function () {
|
|
1144
|
+
this._rippleRenderer.rippleDisabled = this._globalOptions.disabled || this.disabled;
|
|
1145
|
+
this._rippleRenderer.rippleConfig = this.rippleConfig;
|
|
1146
|
+
};
|
|
1147
|
+
MatRipple.decorators = [
|
|
1148
|
+
{ type: _angular_core.Directive, args: [{
|
|
1149
|
+
selector: '[mat-ripple], [matRipple]',
|
|
1150
|
+
exportAs: 'matRipple',
|
|
1151
|
+
host: {
|
|
1152
|
+
'class': 'mat-ripple',
|
|
1153
|
+
'[class.mat-ripple-unbounded]': 'unbounded'
|
|
1154
|
+
}
|
|
1155
|
+
},] },
|
|
1156
|
+
];
|
|
1157
|
+
/**
|
|
1158
|
+
* @nocollapse
|
|
1159
|
+
*/
|
|
1160
|
+
MatRipple.ctorParameters = function () { return [
|
|
1161
|
+
{ type: _angular_core.ElementRef, },
|
|
1162
|
+
{ type: _angular_core.NgZone, },
|
|
1163
|
+
{ type: _angular_cdk_platform.Platform, },
|
|
1164
|
+
{ type: undefined, decorators: [{ type: _angular_core.Optional }, { type: _angular_core.Inject, args: [MAT_RIPPLE_GLOBAL_OPTIONS,] },] },
|
|
1165
|
+
]; };
|
|
1166
|
+
MatRipple.propDecorators = {
|
|
1167
|
+
'trigger': [{ type: _angular_core.Input, args: ['matRippleTrigger',] },],
|
|
1168
|
+
'centered': [{ type: _angular_core.Input, args: ['matRippleCentered',] },],
|
|
1169
|
+
'disabled': [{ type: _angular_core.Input, args: ['matRippleDisabled',] },],
|
|
1170
|
+
'radius': [{ type: _angular_core.Input, args: ['matRippleRadius',] },],
|
|
1171
|
+
'speedFactor': [{ type: _angular_core.Input, args: ['matRippleSpeedFactor',] },],
|
|
1172
|
+
'color': [{ type: _angular_core.Input, args: ['matRippleColor',] },],
|
|
1173
|
+
'unbounded': [{ type: _angular_core.Input, args: ['matRippleUnbounded',] },],
|
|
1174
|
+
};
|
|
1175
|
+
return MatRipple;
|
|
1176
|
+
}());
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* \@docs-private
|
|
1180
|
+
*/
|
|
1181
|
+
var MatOptgroupBase = (function () {
|
|
1182
|
+
function MatOptgroupBase() {
|
|
1183
|
+
}
|
|
1184
|
+
return MatOptgroupBase;
|
|
1185
|
+
}());
|
|
1186
|
+
var _MatOptgroupMixinBase = mixinDisabled(MatOptgroupBase);
|
|
1187
|
+
// Counter for unique group ids.
|
|
1188
|
+
var _uniqueOptgroupIdCounter = 0;
|
|
1189
|
+
/**
|
|
1190
|
+
* Component that is used to group instances of `mat-option`.
|
|
1191
|
+
*/
|
|
1192
|
+
var MatOptgroup = (function (_super) {
|
|
1193
|
+
__extends(MatOptgroup, _super);
|
|
1194
|
+
function MatOptgroup() {
|
|
1195
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
1196
|
+
/**
|
|
1197
|
+
* Unique id for the underlying label.
|
|
1198
|
+
*/
|
|
1199
|
+
_this._labelId = "mat-optgroup-label-" + _uniqueOptgroupIdCounter++;
|
|
1200
|
+
return _this;
|
|
1201
|
+
}
|
|
1202
|
+
MatOptgroup.decorators = [
|
|
1203
|
+
{ type: _angular_core.Component, args: [{selector: 'mat-optgroup',
|
|
1204
|
+
exportAs: 'matOptgroup',
|
|
1205
|
+
template: "<label class=\"mat-optgroup-label\" [id]=\"_labelId\">{{ label }}</label><ng-content select=\"mat-option\"></ng-content>",
|
|
1206
|
+
encapsulation: _angular_core.ViewEncapsulation.None,
|
|
1207
|
+
preserveWhitespaces: false,
|
|
1208
|
+
changeDetection: _angular_core.ChangeDetectionStrategy.OnPush,
|
|
1209
|
+
inputs: ['disabled'],
|
|
1210
|
+
host: {
|
|
1211
|
+
'class': 'mat-optgroup',
|
|
1212
|
+
'role': 'group',
|
|
1213
|
+
'[class.mat-optgroup-disabled]': 'disabled',
|
|
1214
|
+
'[attr.aria-disabled]': 'disabled.toString()',
|
|
1215
|
+
'[attr.aria-labelledby]': '_labelId',
|
|
1216
|
+
}
|
|
1217
|
+
},] },
|
|
1218
|
+
];
|
|
1219
|
+
/**
|
|
1220
|
+
* @nocollapse
|
|
1221
|
+
*/
|
|
1222
|
+
MatOptgroup.ctorParameters = function () { return []; };
|
|
1223
|
+
MatOptgroup.propDecorators = {
|
|
1224
|
+
'label': [{ type: _angular_core.Input },],
|
|
1225
|
+
};
|
|
1226
|
+
return MatOptgroup;
|
|
1227
|
+
}(_MatOptgroupMixinBase));
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* Option IDs need to be unique across components, so this counter exists outside of
|
|
1231
|
+
* the component definition.
|
|
1232
|
+
*/
|
|
1233
|
+
var _uniqueIdCounter = 0;
|
|
1234
|
+
/**
|
|
1235
|
+
* Event object emitted by MatOption when selected or deselected.
|
|
1236
|
+
*/
|
|
1237
|
+
var MatOptionSelectionChange = (function () {
|
|
1238
|
+
/**
|
|
1239
|
+
* @param {?} source
|
|
1240
|
+
* @param {?=} isUserInput
|
|
1241
|
+
*/
|
|
1242
|
+
function MatOptionSelectionChange(source, isUserInput) {
|
|
1243
|
+
if (isUserInput === void 0) { isUserInput = false; }
|
|
1244
|
+
this.source = source;
|
|
1245
|
+
this.isUserInput = isUserInput;
|
|
1246
|
+
}
|
|
1247
|
+
return MatOptionSelectionChange;
|
|
1248
|
+
}());
|
|
1249
|
+
/**
|
|
1250
|
+
* Single option inside of a `<mat-select>` element.
|
|
1251
|
+
*/
|
|
1252
|
+
var MatOption = (function () {
|
|
1253
|
+
/**
|
|
1254
|
+
* @param {?} _element
|
|
1255
|
+
* @param {?} _changeDetectorRef
|
|
1256
|
+
* @param {?} group
|
|
1257
|
+
*/
|
|
1258
|
+
function MatOption(_element, _changeDetectorRef, group) {
|
|
1259
|
+
this._element = _element;
|
|
1260
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
1261
|
+
this.group = group;
|
|
1262
|
+
this._selected = false;
|
|
1263
|
+
this._active = false;
|
|
1264
|
+
this._multiple = false;
|
|
1265
|
+
this._disableRipple = false;
|
|
1266
|
+
/**
|
|
1267
|
+
* Whether the option is disabled.
|
|
1268
|
+
*/
|
|
1269
|
+
this._disabled = false;
|
|
1270
|
+
this._id = "mat-option-" + _uniqueIdCounter++;
|
|
1271
|
+
/**
|
|
1272
|
+
* Event emitted when the option is selected or deselected.
|
|
1273
|
+
*/
|
|
1274
|
+
this.onSelectionChange = new _angular_core.EventEmitter();
|
|
1275
|
+
}
|
|
1276
|
+
Object.defineProperty(MatOption.prototype, "multiple", {
|
|
1277
|
+
/**
|
|
1278
|
+
* Whether the wrapping component is in multiple selection mode.
|
|
1279
|
+
* @return {?}
|
|
1280
|
+
*/
|
|
1281
|
+
get: function () { return this._multiple; },
|
|
1282
|
+
/**
|
|
1283
|
+
* @param {?} value
|
|
1284
|
+
* @return {?}
|
|
1285
|
+
*/
|
|
1286
|
+
set: function (value) {
|
|
1287
|
+
if (value !== this._multiple) {
|
|
1288
|
+
this._multiple = value;
|
|
1289
|
+
this._changeDetectorRef.markForCheck();
|
|
1290
|
+
}
|
|
1291
|
+
},
|
|
1292
|
+
enumerable: true,
|
|
1293
|
+
configurable: true
|
|
1294
|
+
});
|
|
1295
|
+
Object.defineProperty(MatOption.prototype, "id", {
|
|
1296
|
+
/**
|
|
1297
|
+
* The unique ID of the option.
|
|
1298
|
+
* @return {?}
|
|
1299
|
+
*/
|
|
1300
|
+
get: function () { return this._id; },
|
|
1301
|
+
enumerable: true,
|
|
1302
|
+
configurable: true
|
|
1303
|
+
});
|
|
1304
|
+
Object.defineProperty(MatOption.prototype, "selected", {
|
|
1305
|
+
/**
|
|
1306
|
+
* Whether or not the option is currently selected.
|
|
1307
|
+
* @return {?}
|
|
1308
|
+
*/
|
|
1309
|
+
get: function () { return this._selected; },
|
|
1310
|
+
enumerable: true,
|
|
1311
|
+
configurable: true
|
|
1312
|
+
});
|
|
1313
|
+
Object.defineProperty(MatOption.prototype, "disabled", {
|
|
1314
|
+
/**
|
|
1315
|
+
* Whether the option is disabled.
|
|
1316
|
+
* @return {?}
|
|
1317
|
+
*/
|
|
1318
|
+
get: function () { return (this.group && this.group.disabled) || this._disabled; },
|
|
1319
|
+
/**
|
|
1320
|
+
* @param {?} value
|
|
1321
|
+
* @return {?}
|
|
1322
|
+
*/
|
|
1323
|
+
set: function (value) { this._disabled = _angular_cdk_coercion.coerceBooleanProperty(value); },
|
|
1324
|
+
enumerable: true,
|
|
1325
|
+
configurable: true
|
|
1326
|
+
});
|
|
1327
|
+
Object.defineProperty(MatOption.prototype, "disableRipple", {
|
|
1328
|
+
/**
|
|
1329
|
+
* Whether ripples for the option are disabled.
|
|
1330
|
+
* @return {?}
|
|
1331
|
+
*/
|
|
1332
|
+
get: function () { return this._disableRipple; },
|
|
1333
|
+
/**
|
|
1334
|
+
* @param {?} value
|
|
1335
|
+
* @return {?}
|
|
1336
|
+
*/
|
|
1337
|
+
set: function (value) {
|
|
1338
|
+
this._disableRipple = value;
|
|
1339
|
+
this._changeDetectorRef.markForCheck();
|
|
1340
|
+
},
|
|
1341
|
+
enumerable: true,
|
|
1342
|
+
configurable: true
|
|
1343
|
+
});
|
|
1344
|
+
Object.defineProperty(MatOption.prototype, "active", {
|
|
1345
|
+
/**
|
|
1346
|
+
* Whether or not the option is currently active and ready to be selected.
|
|
1347
|
+
* An active option displays styles as if it is focused, but the
|
|
1348
|
+
* focus is actually retained somewhere else. This comes in handy
|
|
1349
|
+
* for components like autocomplete where focus must remain on the input.
|
|
1350
|
+
* @return {?}
|
|
1351
|
+
*/
|
|
1352
|
+
get: function () {
|
|
1353
|
+
return this._active;
|
|
1354
|
+
},
|
|
1355
|
+
enumerable: true,
|
|
1356
|
+
configurable: true
|
|
1357
|
+
});
|
|
1358
|
+
Object.defineProperty(MatOption.prototype, "viewValue", {
|
|
1359
|
+
/**
|
|
1360
|
+
* The displayed value of the option. It is necessary to show the selected option in the
|
|
1361
|
+
* select's trigger.
|
|
1362
|
+
* @return {?}
|
|
1363
|
+
*/
|
|
1364
|
+
get: function () {
|
|
1365
|
+
// TODO(kara): Add input property alternative for node envs.
|
|
1366
|
+
return (this._getHostElement().textContent || '').trim();
|
|
1367
|
+
},
|
|
1368
|
+
enumerable: true,
|
|
1369
|
+
configurable: true
|
|
1370
|
+
});
|
|
1371
|
+
/**
|
|
1372
|
+
* Selects the option.
|
|
1373
|
+
* @return {?}
|
|
1374
|
+
*/
|
|
1375
|
+
MatOption.prototype.select = function () {
|
|
1376
|
+
this._selected = true;
|
|
1377
|
+
this._changeDetectorRef.markForCheck();
|
|
1378
|
+
this._emitSelectionChangeEvent();
|
|
1379
|
+
};
|
|
1380
|
+
/**
|
|
1381
|
+
* Deselects the option.
|
|
1382
|
+
* @return {?}
|
|
1383
|
+
*/
|
|
1384
|
+
MatOption.prototype.deselect = function () {
|
|
1385
|
+
this._selected = false;
|
|
1386
|
+
this._changeDetectorRef.markForCheck();
|
|
1387
|
+
this._emitSelectionChangeEvent();
|
|
1388
|
+
};
|
|
1389
|
+
/**
|
|
1390
|
+
* Sets focus onto this option.
|
|
1391
|
+
* @return {?}
|
|
1392
|
+
*/
|
|
1393
|
+
MatOption.prototype.focus = function () {
|
|
1394
|
+
var /** @type {?} */ element = this._getHostElement();
|
|
1395
|
+
if (typeof element.focus === 'function') {
|
|
1396
|
+
element.focus();
|
|
1397
|
+
}
|
|
1398
|
+
};
|
|
1399
|
+
/**
|
|
1400
|
+
* This method sets display styles on the option to make it appear
|
|
1401
|
+
* active. This is used by the ActiveDescendantKeyManager so key
|
|
1402
|
+
* events will display the proper options as active on arrow key events.
|
|
1403
|
+
* @return {?}
|
|
1404
|
+
*/
|
|
1405
|
+
MatOption.prototype.setActiveStyles = function () {
|
|
1406
|
+
if (!this._active) {
|
|
1407
|
+
this._active = true;
|
|
1408
|
+
this._changeDetectorRef.markForCheck();
|
|
1409
|
+
}
|
|
1410
|
+
};
|
|
1411
|
+
/**
|
|
1412
|
+
* This method removes display styles on the option that made it appear
|
|
1413
|
+
* active. This is used by the ActiveDescendantKeyManager so key
|
|
1414
|
+
* events will display the proper options as active on arrow key events.
|
|
1415
|
+
* @return {?}
|
|
1416
|
+
*/
|
|
1417
|
+
MatOption.prototype.setInactiveStyles = function () {
|
|
1418
|
+
if (this._active) {
|
|
1419
|
+
this._active = false;
|
|
1420
|
+
this._changeDetectorRef.markForCheck();
|
|
1421
|
+
}
|
|
1422
|
+
};
|
|
1423
|
+
/**
|
|
1424
|
+
* Gets the label to be used when determining whether the option should be focused.
|
|
1425
|
+
* @return {?}
|
|
1426
|
+
*/
|
|
1427
|
+
MatOption.prototype.getLabel = function () {
|
|
1428
|
+
return this.viewValue;
|
|
1429
|
+
};
|
|
1430
|
+
/**
|
|
1431
|
+
* Ensures the option is selected when activated from the keyboard.
|
|
1432
|
+
* @param {?} event
|
|
1433
|
+
* @return {?}
|
|
1434
|
+
*/
|
|
1435
|
+
MatOption.prototype._handleKeydown = function (event) {
|
|
1436
|
+
if (event.keyCode === _angular_cdk_keycodes.ENTER || event.keyCode === _angular_cdk_keycodes.SPACE) {
|
|
1437
|
+
this._selectViaInteraction();
|
|
1438
|
+
// Prevent the page from scrolling down and form submits.
|
|
1439
|
+
event.preventDefault();
|
|
1440
|
+
}
|
|
1441
|
+
};
|
|
1442
|
+
/**
|
|
1443
|
+
* Selects the option while indicating the selection came from the user. Used to
|
|
1444
|
+
* determine if the select's view -> model callback should be invoked.
|
|
1445
|
+
* @return {?}
|
|
1446
|
+
*/
|
|
1447
|
+
MatOption.prototype._selectViaInteraction = function () {
|
|
1448
|
+
if (!this.disabled) {
|
|
1449
|
+
this._selected = this.multiple ? !this._selected : true;
|
|
1450
|
+
this._changeDetectorRef.markForCheck();
|
|
1451
|
+
this._emitSelectionChangeEvent(true);
|
|
1452
|
+
}
|
|
1453
|
+
};
|
|
1454
|
+
/**
|
|
1455
|
+
* Returns the correct tabindex for the option depending on disabled state.
|
|
1456
|
+
* @return {?}
|
|
1457
|
+
*/
|
|
1458
|
+
MatOption.prototype._getTabIndex = function () {
|
|
1459
|
+
return this.disabled ? '-1' : '0';
|
|
1460
|
+
};
|
|
1461
|
+
/**
|
|
1462
|
+
* Gets the host DOM element.
|
|
1463
|
+
* @return {?}
|
|
1464
|
+
*/
|
|
1465
|
+
MatOption.prototype._getHostElement = function () {
|
|
1466
|
+
return this._element.nativeElement;
|
|
1467
|
+
};
|
|
1468
|
+
/**
|
|
1469
|
+
* Emits the selection change event.
|
|
1470
|
+
* @param {?=} isUserInput
|
|
1471
|
+
* @return {?}
|
|
1472
|
+
*/
|
|
1473
|
+
MatOption.prototype._emitSelectionChangeEvent = function (isUserInput) {
|
|
1474
|
+
if (isUserInput === void 0) { isUserInput = false; }
|
|
1475
|
+
this.onSelectionChange.emit(new MatOptionSelectionChange(this, isUserInput));
|
|
1476
|
+
};
|
|
1477
|
+
/**
|
|
1478
|
+
* Counts the amount of option group labels that precede the specified option.
|
|
1479
|
+
* @param {?} optionIndex Index of the option at which to start counting.
|
|
1480
|
+
* @param {?} options Flat list of all of the options.
|
|
1481
|
+
* @param {?} optionGroups Flat list of all of the option groups.
|
|
1482
|
+
* @return {?}
|
|
1483
|
+
*/
|
|
1484
|
+
MatOption.countGroupLabelsBeforeOption = function (optionIndex, options, optionGroups) {
|
|
1485
|
+
if (optionGroups.length) {
|
|
1486
|
+
var /** @type {?} */ optionsArray = options.toArray();
|
|
1487
|
+
var /** @type {?} */ groups = optionGroups.toArray();
|
|
1488
|
+
var /** @type {?} */ groupCounter = 0;
|
|
1489
|
+
for (var /** @type {?} */ i = 0; i < optionIndex + 1; i++) {
|
|
1490
|
+
if (optionsArray[i].group && optionsArray[i].group === groups[groupCounter]) {
|
|
1491
|
+
groupCounter++;
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
return groupCounter;
|
|
1495
|
+
}
|
|
1496
|
+
return 0;
|
|
1497
|
+
};
|
|
1498
|
+
MatOption.decorators = [
|
|
1499
|
+
{ type: _angular_core.Component, args: [{selector: 'mat-option',
|
|
1500
|
+
exportAs: 'matOption',
|
|
1501
|
+
host: {
|
|
1502
|
+
'role': 'option',
|
|
1503
|
+
'[attr.tabindex]': '_getTabIndex()',
|
|
1504
|
+
'[class.mat-selected]': 'selected',
|
|
1505
|
+
'[class.mat-option-multiple]': 'multiple',
|
|
1506
|
+
'[class.mat-active]': 'active',
|
|
1507
|
+
'[id]': 'id',
|
|
1508
|
+
'[attr.aria-selected]': 'selected.toString()',
|
|
1509
|
+
'[attr.aria-disabled]': 'disabled.toString()',
|
|
1510
|
+
'[class.mat-option-disabled]': 'disabled',
|
|
1511
|
+
'(click)': '_selectViaInteraction()',
|
|
1512
|
+
'(keydown)': '_handleKeydown($event)',
|
|
1513
|
+
'class': 'mat-option',
|
|
1514
|
+
},
|
|
1515
|
+
template: "<span *ngIf=\"multiple\"><mat-pseudo-checkbox class=\"mat-option-pseudo-checkbox\" [state]=\"selected ? 'checked' : ''\" [disabled]=\"disabled\"></mat-pseudo-checkbox></span><span class=\"mat-option-text\"><ng-content></ng-content></span><div class=\"mat-option-ripple\" mat-ripple [matRippleTrigger]=\"_getHostElement()\" [matRippleDisabled]=\"disabled || disableRipple\"></div>",
|
|
1516
|
+
encapsulation: _angular_core.ViewEncapsulation.None,
|
|
1517
|
+
preserveWhitespaces: false,
|
|
1518
|
+
changeDetection: _angular_core.ChangeDetectionStrategy.OnPush,
|
|
1519
|
+
},] },
|
|
1520
|
+
];
|
|
1521
|
+
/**
|
|
1522
|
+
* @nocollapse
|
|
1523
|
+
*/
|
|
1524
|
+
MatOption.ctorParameters = function () { return [
|
|
1525
|
+
{ type: _angular_core.ElementRef, },
|
|
1526
|
+
{ type: _angular_core.ChangeDetectorRef, },
|
|
1527
|
+
{ type: MatOptgroup, decorators: [{ type: _angular_core.Optional },] },
|
|
1528
|
+
]; };
|
|
1529
|
+
MatOption.propDecorators = {
|
|
1530
|
+
'value': [{ type: _angular_core.Input },],
|
|
1531
|
+
'disabled': [{ type: _angular_core.Input },],
|
|
1532
|
+
'onSelectionChange': [{ type: _angular_core.Output },],
|
|
1533
|
+
};
|
|
1534
|
+
return MatOption;
|
|
1535
|
+
}());
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* InjectionToken that can be used to specify the global placeholder options.
|
|
1539
|
+
*/
|
|
1540
|
+
var MAT_PLACEHOLDER_GLOBAL_OPTIONS = new _angular_core.InjectionToken('mat-placeholder-global-options');
|
|
1541
|
+
|
|
1542
|
+
var nextUniqueId$1 = 0;
|
|
1543
|
+
/**
|
|
1544
|
+
* Single error message to be shown underneath the form field.
|
|
1545
|
+
*/
|
|
1546
|
+
var MatError = (function () {
|
|
1547
|
+
function MatError() {
|
|
1548
|
+
this.id = "mat-error-" + nextUniqueId$1++;
|
|
1549
|
+
}
|
|
1550
|
+
MatError.decorators = [
|
|
1551
|
+
{ type: _angular_core.Directive, args: [{
|
|
1552
|
+
selector: 'mat-error',
|
|
1553
|
+
host: {
|
|
1554
|
+
'class': 'mat-error',
|
|
1555
|
+
'role': 'alert',
|
|
1556
|
+
'[attr.id]': 'id',
|
|
1557
|
+
}
|
|
1558
|
+
},] },
|
|
1559
|
+
];
|
|
1560
|
+
/**
|
|
1561
|
+
* @nocollapse
|
|
1562
|
+
*/
|
|
1563
|
+
MatError.ctorParameters = function () { return []; };
|
|
1564
|
+
MatError.propDecorators = {
|
|
1565
|
+
'id': [{ type: _angular_core.Input },],
|
|
1566
|
+
};
|
|
1567
|
+
return MatError;
|
|
1568
|
+
}());
|
|
1569
|
+
|
|
1570
|
+
/**
|
|
1571
|
+
* An interface which allows a control to work inside of a `MatFormField`.
|
|
1572
|
+
* @abstract
|
|
1573
|
+
*/
|
|
1574
|
+
var MatFormFieldControl = (function () {
|
|
1575
|
+
function MatFormFieldControl() {
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* Sets the list of element IDs that currently describe this control.
|
|
1579
|
+
* @abstract
|
|
1580
|
+
* @param {?} ids
|
|
1581
|
+
* @return {?}
|
|
1582
|
+
*/
|
|
1583
|
+
MatFormFieldControl.prototype.setDescribedByIds = function (ids) { };
|
|
1584
|
+
/**
|
|
1585
|
+
* Handles a click on the control's container.
|
|
1586
|
+
* @abstract
|
|
1587
|
+
* @param {?} event
|
|
1588
|
+
* @return {?}
|
|
1589
|
+
*/
|
|
1590
|
+
MatFormFieldControl.prototype.onContainerClick = function (event) { };
|
|
1591
|
+
return MatFormFieldControl;
|
|
1592
|
+
}());
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* \@docs-private
|
|
1596
|
+
* @return {?}
|
|
1597
|
+
*/
|
|
1598
|
+
function getMatFormFieldPlaceholderConflictError() {
|
|
1599
|
+
return Error('Placeholder attribute and child element were both specified.');
|
|
1600
|
+
}
|
|
1601
|
+
/**
|
|
1602
|
+
* \@docs-private
|
|
1603
|
+
* @param {?} align
|
|
1604
|
+
* @return {?}
|
|
1605
|
+
*/
|
|
1606
|
+
function getMatFormFieldDuplicatedHintError(align) {
|
|
1607
|
+
return Error("A hint was already declared for 'align=\"" + align + "\"'.");
|
|
1608
|
+
}
|
|
1609
|
+
/**
|
|
1610
|
+
* \@docs-private
|
|
1611
|
+
* @return {?}
|
|
1612
|
+
*/
|
|
1613
|
+
function getMatFormFieldMissingControlError() {
|
|
1614
|
+
return Error('mat-form-field must contain a MatFormFieldControl. ' +
|
|
1615
|
+
'Did you forget to add matInput to the native input or textarea element?');
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
var nextUniqueId$2 = 0;
|
|
1619
|
+
/**
|
|
1620
|
+
* Hint text to be shown underneath the form field control.
|
|
1621
|
+
*/
|
|
1622
|
+
var MatHint = (function () {
|
|
1623
|
+
function MatHint() {
|
|
1624
|
+
/**
|
|
1625
|
+
* Whether to align the hint label at the start or end of the line.
|
|
1626
|
+
*/
|
|
1627
|
+
this.align = 'start';
|
|
1628
|
+
/**
|
|
1629
|
+
* Unique ID for the hint. Used for the aria-describedby on the form field control.
|
|
1630
|
+
*/
|
|
1631
|
+
this.id = "mat-hint-" + nextUniqueId$2++;
|
|
1632
|
+
}
|
|
1633
|
+
MatHint.decorators = [
|
|
1634
|
+
{ type: _angular_core.Directive, args: [{
|
|
1635
|
+
selector: 'mat-hint',
|
|
1636
|
+
host: {
|
|
1637
|
+
'class': 'mat-hint',
|
|
1638
|
+
'[class.mat-right]': 'align == "end"',
|
|
1639
|
+
'[attr.id]': 'id',
|
|
1640
|
+
// Remove align attribute to prevent it from interfering with layout.
|
|
1641
|
+
'[attr.align]': 'null',
|
|
1642
|
+
}
|
|
1643
|
+
},] },
|
|
1644
|
+
];
|
|
1645
|
+
/**
|
|
1646
|
+
* @nocollapse
|
|
1647
|
+
*/
|
|
1648
|
+
MatHint.ctorParameters = function () { return []; };
|
|
1649
|
+
MatHint.propDecorators = {
|
|
1650
|
+
'align': [{ type: _angular_core.Input },],
|
|
1651
|
+
'id': [{ type: _angular_core.Input },],
|
|
1652
|
+
};
|
|
1653
|
+
return MatHint;
|
|
1654
|
+
}());
|
|
1655
|
+
|
|
1656
|
+
/**
|
|
1657
|
+
* The floating placeholder for an `MatFormField`.
|
|
1658
|
+
*/
|
|
1659
|
+
var MatPlaceholder = (function () {
|
|
1660
|
+
function MatPlaceholder() {
|
|
1661
|
+
}
|
|
1662
|
+
MatPlaceholder.decorators = [
|
|
1663
|
+
{ type: _angular_core.Directive, args: [{
|
|
1664
|
+
selector: 'mat-placeholder'
|
|
1665
|
+
},] },
|
|
1666
|
+
];
|
|
1667
|
+
/**
|
|
1668
|
+
* @nocollapse
|
|
1669
|
+
*/
|
|
1670
|
+
MatPlaceholder.ctorParameters = function () { return []; };
|
|
1671
|
+
return MatPlaceholder;
|
|
1672
|
+
}());
|
|
1673
|
+
|
|
1674
|
+
/**
|
|
1675
|
+
* Prefix to be placed the the front of the form field.
|
|
1676
|
+
*/
|
|
1677
|
+
var MatPrefix = (function () {
|
|
1678
|
+
function MatPrefix() {
|
|
1679
|
+
}
|
|
1680
|
+
MatPrefix.decorators = [
|
|
1681
|
+
{ type: _angular_core.Directive, args: [{
|
|
1682
|
+
selector: '[matPrefix]',
|
|
1683
|
+
},] },
|
|
1684
|
+
];
|
|
1685
|
+
/**
|
|
1686
|
+
* @nocollapse
|
|
1687
|
+
*/
|
|
1688
|
+
MatPrefix.ctorParameters = function () { return []; };
|
|
1689
|
+
return MatPrefix;
|
|
1690
|
+
}());
|
|
1691
|
+
|
|
1692
|
+
/**
|
|
1693
|
+
* Suffix to be placed at the end of the form field.
|
|
1694
|
+
*/
|
|
1695
|
+
var MatSuffix = (function () {
|
|
1696
|
+
function MatSuffix() {
|
|
1697
|
+
}
|
|
1698
|
+
MatSuffix.decorators = [
|
|
1699
|
+
{ type: _angular_core.Directive, args: [{
|
|
1700
|
+
selector: '[matSuffix]',
|
|
1701
|
+
},] },
|
|
1702
|
+
];
|
|
1703
|
+
/**
|
|
1704
|
+
* @nocollapse
|
|
1705
|
+
*/
|
|
1706
|
+
MatSuffix.ctorParameters = function () { return []; };
|
|
1707
|
+
return MatSuffix;
|
|
1708
|
+
}());
|
|
1709
|
+
|
|
1710
|
+
var nextUniqueId$1$1 = 0;
|
|
1711
|
+
/**
|
|
1712
|
+
* Container for form controls that applies Material Design styling and behavior.
|
|
1713
|
+
*/
|
|
1714
|
+
var MatFormField = (function () {
|
|
1715
|
+
/**
|
|
1716
|
+
* @param {?} _elementRef
|
|
1717
|
+
* @param {?} _renderer
|
|
1718
|
+
* @param {?} _changeDetectorRef
|
|
1719
|
+
* @param {?} placeholderOptions
|
|
1720
|
+
*/
|
|
1721
|
+
function MatFormField(_elementRef, _renderer, _changeDetectorRef, placeholderOptions) {
|
|
1722
|
+
this._elementRef = _elementRef;
|
|
1723
|
+
this._renderer = _renderer;
|
|
1724
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
1725
|
+
/**
|
|
1726
|
+
* Color of the form field underline, based on the theme.
|
|
1727
|
+
*/
|
|
1728
|
+
this.color = 'primary';
|
|
1729
|
+
/**
|
|
1730
|
+
* Override for the logic that disables the placeholder animation in certain cases.
|
|
1731
|
+
*/
|
|
1732
|
+
this._showAlwaysAnimate = false;
|
|
1733
|
+
/**
|
|
1734
|
+
* State of the mat-hint and mat-error animations.
|
|
1735
|
+
*/
|
|
1736
|
+
this._subscriptAnimationState = '';
|
|
1737
|
+
this._hintLabel = '';
|
|
1738
|
+
// Unique id for the hint label.
|
|
1739
|
+
this._hintLabelId = "mat-hint-" + nextUniqueId$1$1++;
|
|
1740
|
+
this._placeholderOptions = placeholderOptions ? placeholderOptions : {};
|
|
1741
|
+
this.floatPlaceholder = this._placeholderOptions.float || 'auto';
|
|
1742
|
+
}
|
|
1743
|
+
Object.defineProperty(MatFormField.prototype, "dividerColor", {
|
|
1744
|
+
/**
|
|
1745
|
+
* @deprecated Use `color` instead.
|
|
1746
|
+
* @return {?}
|
|
1747
|
+
*/
|
|
1748
|
+
get: function () { return this.color; },
|
|
1749
|
+
/**
|
|
1750
|
+
* @param {?} value
|
|
1751
|
+
* @return {?}
|
|
1752
|
+
*/
|
|
1753
|
+
set: function (value) { this.color = value; },
|
|
1754
|
+
enumerable: true,
|
|
1755
|
+
configurable: true
|
|
1756
|
+
});
|
|
1757
|
+
Object.defineProperty(MatFormField.prototype, "hideRequiredMarker", {
|
|
1758
|
+
/**
|
|
1759
|
+
* Whether the required marker should be hidden.
|
|
1760
|
+
* @return {?}
|
|
1761
|
+
*/
|
|
1762
|
+
get: function () { return this._hideRequiredMarker; },
|
|
1763
|
+
/**
|
|
1764
|
+
* @param {?} value
|
|
1765
|
+
* @return {?}
|
|
1766
|
+
*/
|
|
1767
|
+
set: function (value) {
|
|
1768
|
+
this._hideRequiredMarker = _angular_cdk_coercion.coerceBooleanProperty(value);
|
|
1769
|
+
},
|
|
1770
|
+
enumerable: true,
|
|
1771
|
+
configurable: true
|
|
1772
|
+
});
|
|
1773
|
+
Object.defineProperty(MatFormField.prototype, "_shouldAlwaysFloat", {
|
|
1774
|
+
/**
|
|
1775
|
+
* Whether the floating label should always float or not.
|
|
1776
|
+
* @return {?}
|
|
1777
|
+
*/
|
|
1778
|
+
get: function () {
|
|
1779
|
+
return this._floatPlaceholder === 'always' && !this._showAlwaysAnimate;
|
|
1780
|
+
},
|
|
1781
|
+
enumerable: true,
|
|
1782
|
+
configurable: true
|
|
1783
|
+
});
|
|
1784
|
+
Object.defineProperty(MatFormField.prototype, "_canPlaceholderFloat", {
|
|
1785
|
+
/**
|
|
1786
|
+
* Whether the placeholder can float or not.
|
|
1787
|
+
* @return {?}
|
|
1788
|
+
*/
|
|
1789
|
+
get: function () { return this._floatPlaceholder !== 'never'; },
|
|
1790
|
+
enumerable: true,
|
|
1791
|
+
configurable: true
|
|
1792
|
+
});
|
|
1793
|
+
Object.defineProperty(MatFormField.prototype, "hintLabel", {
|
|
1794
|
+
/**
|
|
1795
|
+
* Text for the form field hint.
|
|
1796
|
+
* @return {?}
|
|
1797
|
+
*/
|
|
1798
|
+
get: function () { return this._hintLabel; },
|
|
1799
|
+
/**
|
|
1800
|
+
* @param {?} value
|
|
1801
|
+
* @return {?}
|
|
1802
|
+
*/
|
|
1803
|
+
set: function (value) {
|
|
1804
|
+
this._hintLabel = value;
|
|
1805
|
+
this._processHints();
|
|
1806
|
+
},
|
|
1807
|
+
enumerable: true,
|
|
1808
|
+
configurable: true
|
|
1809
|
+
});
|
|
1810
|
+
Object.defineProperty(MatFormField.prototype, "floatPlaceholder", {
|
|
1811
|
+
/**
|
|
1812
|
+
* Whether the placeholder should always float, never float or float as the user types.
|
|
1813
|
+
* @return {?}
|
|
1814
|
+
*/
|
|
1815
|
+
get: function () { return this._floatPlaceholder; },
|
|
1816
|
+
/**
|
|
1817
|
+
* @param {?} value
|
|
1818
|
+
* @return {?}
|
|
1819
|
+
*/
|
|
1820
|
+
set: function (value) {
|
|
1821
|
+
if (value !== this._floatPlaceholder) {
|
|
1822
|
+
this._floatPlaceholder = value || this._placeholderOptions.float || 'auto';
|
|
1823
|
+
this._changeDetectorRef.markForCheck();
|
|
1824
|
+
}
|
|
1825
|
+
},
|
|
1826
|
+
enumerable: true,
|
|
1827
|
+
configurable: true
|
|
1828
|
+
});
|
|
1829
|
+
/**
|
|
1830
|
+
* @return {?}
|
|
1831
|
+
*/
|
|
1832
|
+
MatFormField.prototype.ngAfterContentInit = function () {
|
|
1833
|
+
var _this = this;
|
|
1834
|
+
this._validateControlChild();
|
|
1835
|
+
if (this._control.controlType) {
|
|
1836
|
+
this._renderer.addClass(this._elementRef.nativeElement, "mat-form-field-type-" + this._control.controlType);
|
|
1837
|
+
}
|
|
1838
|
+
// Subscribe to changes in the child control state in order to update the form field UI.
|
|
1839
|
+
_angular_cdk_rxjs.startWith.call(this._control.stateChanges, null).subscribe(function () {
|
|
1840
|
+
_this._validatePlaceholders();
|
|
1841
|
+
_this._syncDescribedByIds();
|
|
1842
|
+
_this._changeDetectorRef.markForCheck();
|
|
1843
|
+
});
|
|
1844
|
+
var /** @type {?} */ ngControl = this._control.ngControl;
|
|
1845
|
+
if (ngControl && ngControl.valueChanges) {
|
|
1846
|
+
ngControl.valueChanges.subscribe(function () {
|
|
1847
|
+
_this._changeDetectorRef.markForCheck();
|
|
1848
|
+
});
|
|
1849
|
+
}
|
|
1850
|
+
// Re-validate when the number of hints changes.
|
|
1851
|
+
_angular_cdk_rxjs.startWith.call(this._hintChildren.changes, null).subscribe(function () {
|
|
1852
|
+
_this._processHints();
|
|
1853
|
+
_this._changeDetectorRef.markForCheck();
|
|
1854
|
+
});
|
|
1855
|
+
// Update the aria-described by when the number of errors changes.
|
|
1856
|
+
_angular_cdk_rxjs.startWith.call(this._errorChildren.changes, null).subscribe(function () {
|
|
1857
|
+
_this._syncDescribedByIds();
|
|
1858
|
+
_this._changeDetectorRef.markForCheck();
|
|
1859
|
+
});
|
|
1860
|
+
};
|
|
1861
|
+
/**
|
|
1862
|
+
* @return {?}
|
|
1863
|
+
*/
|
|
1864
|
+
MatFormField.prototype.ngAfterContentChecked = function () {
|
|
1865
|
+
this._validateControlChild();
|
|
1866
|
+
};
|
|
1867
|
+
/**
|
|
1868
|
+
* @return {?}
|
|
1869
|
+
*/
|
|
1870
|
+
MatFormField.prototype.ngAfterViewInit = function () {
|
|
1871
|
+
// Avoid animations on load.
|
|
1872
|
+
this._subscriptAnimationState = 'enter';
|
|
1873
|
+
this._changeDetectorRef.detectChanges();
|
|
1874
|
+
};
|
|
1875
|
+
/**
|
|
1876
|
+
* Determines whether a class from the NgControl should be forwarded to the host element.
|
|
1877
|
+
* @param {?} prop
|
|
1878
|
+
* @return {?}
|
|
1879
|
+
*/
|
|
1880
|
+
MatFormField.prototype._shouldForward = function (prop) {
|
|
1881
|
+
var /** @type {?} */ ngControl = this._control ? this._control.ngControl : null;
|
|
1882
|
+
return ngControl && ((ngControl))[prop];
|
|
1883
|
+
};
|
|
1884
|
+
/**
|
|
1885
|
+
* Whether the form field has a placeholder.
|
|
1886
|
+
* @return {?}
|
|
1887
|
+
*/
|
|
1888
|
+
MatFormField.prototype._hasPlaceholder = function () {
|
|
1889
|
+
return !!(this._control.placeholder || this._placeholderChild);
|
|
1890
|
+
};
|
|
1891
|
+
/**
|
|
1892
|
+
* Determines whether to display hints or errors.
|
|
1893
|
+
* @return {?}
|
|
1894
|
+
*/
|
|
1895
|
+
MatFormField.prototype._getDisplayedMessages = function () {
|
|
1896
|
+
return (this._errorChildren && this._errorChildren.length > 0 &&
|
|
1897
|
+
this._control.errorState) ? 'error' : 'hint';
|
|
1898
|
+
};
|
|
1899
|
+
/**
|
|
1900
|
+
* Animates the placeholder up and locks it in position.
|
|
1901
|
+
* @return {?}
|
|
1902
|
+
*/
|
|
1903
|
+
MatFormField.prototype._animateAndLockPlaceholder = function () {
|
|
1904
|
+
var _this = this;
|
|
1905
|
+
if (this._placeholder && this._canPlaceholderFloat) {
|
|
1906
|
+
this._showAlwaysAnimate = true;
|
|
1907
|
+
this._floatPlaceholder = 'always';
|
|
1908
|
+
_angular_cdk_rxjs.first.call(rxjs_observable_fromEvent.fromEvent(this._placeholder.nativeElement, 'transitionend')).subscribe(function () {
|
|
1909
|
+
_this._showAlwaysAnimate = false;
|
|
1910
|
+
});
|
|
1911
|
+
this._changeDetectorRef.markForCheck();
|
|
1912
|
+
}
|
|
1913
|
+
};
|
|
1914
|
+
/**
|
|
1915
|
+
* Ensure that there is only one placeholder (either `placeholder` attribute on the child control
|
|
1916
|
+
* or child element with the `mat-placeholder` directive).
|
|
1917
|
+
* @return {?}
|
|
1918
|
+
*/
|
|
1919
|
+
MatFormField.prototype._validatePlaceholders = function () {
|
|
1920
|
+
if (this._control.placeholder && this._placeholderChild) {
|
|
1921
|
+
throw getMatFormFieldPlaceholderConflictError();
|
|
1922
|
+
}
|
|
1923
|
+
};
|
|
1924
|
+
/**
|
|
1925
|
+
* Does any extra processing that is required when handling the hints.
|
|
1926
|
+
* @return {?}
|
|
1927
|
+
*/
|
|
1928
|
+
MatFormField.prototype._processHints = function () {
|
|
1929
|
+
this._validateHints();
|
|
1930
|
+
this._syncDescribedByIds();
|
|
1931
|
+
};
|
|
1932
|
+
/**
|
|
1933
|
+
* Ensure that there is a maximum of one of each `<mat-hint>` alignment specified, with the
|
|
1934
|
+
* attribute being considered as `align="start"`.
|
|
1935
|
+
* @return {?}
|
|
1936
|
+
*/
|
|
1937
|
+
MatFormField.prototype._validateHints = function () {
|
|
1938
|
+
var _this = this;
|
|
1939
|
+
if (this._hintChildren) {
|
|
1940
|
+
var /** @type {?} */ startHint_1;
|
|
1941
|
+
var /** @type {?} */ endHint_1;
|
|
1942
|
+
this._hintChildren.forEach(function (hint) {
|
|
1943
|
+
if (hint.align == 'start') {
|
|
1944
|
+
if (startHint_1 || _this.hintLabel) {
|
|
1945
|
+
throw getMatFormFieldDuplicatedHintError('start');
|
|
1946
|
+
}
|
|
1947
|
+
startHint_1 = hint;
|
|
1948
|
+
}
|
|
1949
|
+
else if (hint.align == 'end') {
|
|
1950
|
+
if (endHint_1) {
|
|
1951
|
+
throw getMatFormFieldDuplicatedHintError('end');
|
|
1952
|
+
}
|
|
1953
|
+
endHint_1 = hint;
|
|
1954
|
+
}
|
|
1955
|
+
});
|
|
1956
|
+
}
|
|
1957
|
+
};
|
|
1958
|
+
/**
|
|
1959
|
+
* Sets the list of element IDs that describe the child control. This allows the control to update
|
|
1960
|
+
* its `aria-describedby` attribute accordingly.
|
|
1961
|
+
* @return {?}
|
|
1962
|
+
*/
|
|
1963
|
+
MatFormField.prototype._syncDescribedByIds = function () {
|
|
1964
|
+
if (this._control) {
|
|
1965
|
+
var /** @type {?} */ ids = [];
|
|
1966
|
+
if (this._getDisplayedMessages() === 'hint') {
|
|
1967
|
+
var /** @type {?} */ startHint = this._hintChildren ?
|
|
1968
|
+
this._hintChildren.find(function (hint) { return hint.align === 'start'; }) : null;
|
|
1969
|
+
var /** @type {?} */ endHint = this._hintChildren ?
|
|
1970
|
+
this._hintChildren.find(function (hint) { return hint.align === 'end'; }) : null;
|
|
1971
|
+
if (startHint) {
|
|
1972
|
+
ids.push(startHint.id);
|
|
1973
|
+
}
|
|
1974
|
+
else if (this._hintLabel) {
|
|
1975
|
+
ids.push(this._hintLabelId);
|
|
1976
|
+
}
|
|
1977
|
+
if (endHint) {
|
|
1978
|
+
ids.push(endHint.id);
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
else if (this._errorChildren) {
|
|
1982
|
+
ids = this._errorChildren.map(function (error) { return error.id; });
|
|
1983
|
+
}
|
|
1984
|
+
this._control.setDescribedByIds(ids);
|
|
1985
|
+
}
|
|
1986
|
+
};
|
|
1987
|
+
/**
|
|
1988
|
+
* Throws an error if the form field's control is missing.
|
|
1989
|
+
* @return {?}
|
|
1990
|
+
*/
|
|
1991
|
+
MatFormField.prototype._validateControlChild = function () {
|
|
1992
|
+
if (!this._control) {
|
|
1993
|
+
throw getMatFormFieldMissingControlError();
|
|
1994
|
+
}
|
|
1995
|
+
};
|
|
1996
|
+
MatFormField.decorators = [
|
|
1997
|
+
{ type: _angular_core.Component, args: [{// TODO(mmalerba): the input-container selectors and classes are deprecated and will be removed.
|
|
1998
|
+
selector: 'mat-input-container, mat-form-field',
|
|
1999
|
+
exportAs: 'matFormField',
|
|
2000
|
+
template: "<div class=\"mat-input-wrapper mat-form-field-wrapper\"><div class=\"mat-input-flex mat-form-field-flex\" #connectionContainer (click)=\"_control.onContainerClick && _control.onContainerClick($event)\"><div class=\"mat-input-prefix mat-form-field-prefix\" *ngIf=\"_prefixChildren.length\"><ng-content select=\"[matPrefix]\"></ng-content></div><div class=\"mat-input-infix mat-form-field-infix\"><ng-content></ng-content><span class=\"mat-input-placeholder-wrapper mat-form-field-placeholder-wrapper\"><label class=\"mat-input-placeholder mat-form-field-placeholder\" [attr.for]=\"_control.id\" [attr.aria-owns]=\"_control.id\" [class.mat-empty]=\"_control.empty && !_shouldAlwaysFloat\" [class.mat-form-field-empty]=\"_control.empty && !_shouldAlwaysFloat\" [class.mat-accent]=\"color == 'accent'\" [class.mat-warn]=\"color == 'warn'\" #placeholder *ngIf=\"_hasPlaceholder()\"><ng-content select=\"mat-placeholder\"></ng-content>{{_control.placeholder}} <span class=\"mat-placeholder-required mat-form-field-required-marker\" aria-hidden=\"true\" *ngIf=\"!hideRequiredMarker && _control.required\">*</span></label></span></div><div class=\"mat-input-suffix mat-form-field-suffix\" *ngIf=\"_suffixChildren.length\"><ng-content select=\"[matSuffix]\"></ng-content></div></div><div class=\"mat-input-underline mat-form-field-underline\" #underline [class.mat-disabled]=\"_control.disabled\"><span class=\"mat-input-ripple mat-form-field-ripple\" [class.mat-accent]=\"color == 'accent'\" [class.mat-warn]=\"color == 'warn'\"></span></div><div class=\"mat-input-subscript-wrapper mat-form-field-subscript-wrapper\" [ngSwitch]=\"_getDisplayedMessages()\"><div *ngSwitchCase=\"'error'\" [@transitionMessages]=\"_subscriptAnimationState\"><ng-content select=\"mat-error\"></ng-content></div><div class=\"mat-input-hint-wrapper mat-form-field-hint-wrapper\" *ngSwitchCase=\"'hint'\" [@transitionMessages]=\"_subscriptAnimationState\"><div *ngIf=\"hintLabel\" [id]=\"_hintLabelId\" class=\"mat-hint\">{{hintLabel}}</div><ng-content select=\"mat-hint:not([align='end'])\"></ng-content><div class=\"mat-input-hint-spacer mat-form-field-hint-spacer\"></div><ng-content select=\"mat-hint[align='end']\"></ng-content></div></div></div>",
|
|
2001
|
+
// MatInput is a directive and can't have styles, so we need to include its styles here.
|
|
2002
|
+
// The MatInput styles are fairly minimal so it shouldn't be a big deal for people who
|
|
2003
|
+
// aren't using MatInput.
|
|
2004
|
+
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;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none}.mat-form-field-prefix .mat-icon,.mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-prefix .mat-icon-button,.mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0}.mat-form-field-placeholder-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}.mat-form-field-placeholder{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform:perspective(100px);-ms-transform:none;transform-origin:0 0;transition:transform .4s cubic-bezier(.25,.8,.25,1),color .4s cubic-bezier(.25,.8,.25,1),width .4s cubic-bezier(.25,.8,.25,1);display:none}[dir=rtl] .mat-form-field-placeholder{transform-origin:100% 0;left:auto;right:0}.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-placeholder,.mat-form-field-empty.mat-form-field-placeholder{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-placeholder-wrapper .mat-form-field-placeholder{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-placeholder-wrapper .mat-form-field-placeholder{display:block;transition:none}.mat-form-field-placeholder:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;height:1px;width:100%}.mat-form-field-underline.mat-disabled{background-position:0;background-color:transparent}.mat-form-field-underline .mat-form-field-ripple{position:absolute;height:1px;top:0;left:0;width:100%;transform-origin:50%;transform:scaleX(.5);visibility:hidden;transition:background-color .3s cubic-bezier(.55,0,.55,.2)}.mat-focused .mat-form-field-underline .mat-form-field-ripple{height:2px}.mat-focused .mat-form-field-underline .mat-form-field-ripple,.mat-form-field-invalid .mat-form-field-underline .mat-form-field-ripple{visibility:visible;transform:scaleX(1);transition:transform 150ms linear,background-color .3s cubic-bezier(.55,0,.55,.2)}.mat-form-field-subscript-wrapper{position:absolute;width:100%;overflow:hidden}.mat-form-field-placeholder-wrapper .mat-icon,.mat-form-field-subscript-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-input-element{font:inherit;background:0 0;color:currentColor;border:none;outline:0;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::placeholder{color:transparent!important}.mat-input-element::-moz-placeholder{color:transparent!important}.mat-input-element::-webkit-input-placeholder{color:transparent!important}.mat-input-element:-ms-input-placeholder{color:transparent!important}textarea.mat-input-element{resize:vertical;overflow:auto}"],
|
|
2005
|
+
animations: [
|
|
2006
|
+
// TODO(mmalerba): Use angular animations for placeholder animation as well.
|
|
2007
|
+
_angular_animations.trigger('transitionMessages', [
|
|
2008
|
+
_angular_animations.state('enter', _angular_animations.style({ opacity: 1, transform: 'translateY(0%)' })),
|
|
2009
|
+
_angular_animations.transition('void => enter', [
|
|
2010
|
+
_angular_animations.style({ opacity: 0, transform: 'translateY(-100%)' }),
|
|
2011
|
+
_angular_animations.animate('300ms cubic-bezier(0.55, 0, 0.55, 0.2)'),
|
|
2012
|
+
]),
|
|
2013
|
+
]),
|
|
2014
|
+
],
|
|
2015
|
+
host: {
|
|
2016
|
+
'class': 'mat-input-container mat-form-field',
|
|
2017
|
+
'[class.mat-input-invalid]': '_control.errorState',
|
|
2018
|
+
'[class.mat-form-field-invalid]': '_control.errorState',
|
|
2019
|
+
'[class.mat-form-field-can-float]': '_canPlaceholderFloat',
|
|
2020
|
+
'[class.mat-form-field-should-float]': '_control.shouldPlaceholderFloat || _shouldAlwaysFloat',
|
|
2021
|
+
'[class.mat-focused]': '_control.focused',
|
|
2022
|
+
'[class.mat-primary]': 'color == "primary"',
|
|
2023
|
+
'[class.mat-accent]': 'color == "accent"',
|
|
2024
|
+
'[class.mat-warn]': 'color == "warn"',
|
|
2025
|
+
'[class.ng-untouched]': '_shouldForward("untouched")',
|
|
2026
|
+
'[class.ng-touched]': '_shouldForward("touched")',
|
|
2027
|
+
'[class.ng-pristine]': '_shouldForward("pristine")',
|
|
2028
|
+
'[class.ng-dirty]': '_shouldForward("dirty")',
|
|
2029
|
+
'[class.ng-valid]': '_shouldForward("valid")',
|
|
2030
|
+
'[class.ng-invalid]': '_shouldForward("invalid")',
|
|
2031
|
+
'[class.ng-pending]': '_shouldForward("pending")',
|
|
2032
|
+
},
|
|
2033
|
+
encapsulation: _angular_core.ViewEncapsulation.None,
|
|
2034
|
+
preserveWhitespaces: false,
|
|
2035
|
+
changeDetection: _angular_core.ChangeDetectionStrategy.OnPush,
|
|
2036
|
+
},] },
|
|
2037
|
+
];
|
|
2038
|
+
/**
|
|
2039
|
+
* @nocollapse
|
|
2040
|
+
*/
|
|
2041
|
+
MatFormField.ctorParameters = function () { return [
|
|
2042
|
+
{ type: _angular_core.ElementRef, },
|
|
2043
|
+
{ type: _angular_core.Renderer2, },
|
|
2044
|
+
{ type: _angular_core.ChangeDetectorRef, },
|
|
2045
|
+
{ type: undefined, decorators: [{ type: _angular_core.Optional }, { type: _angular_core.Inject, args: [MAT_PLACEHOLDER_GLOBAL_OPTIONS,] },] },
|
|
2046
|
+
]; };
|
|
2047
|
+
MatFormField.propDecorators = {
|
|
2048
|
+
'color': [{ type: _angular_core.Input },],
|
|
2049
|
+
'dividerColor': [{ type: _angular_core.Input },],
|
|
2050
|
+
'hideRequiredMarker': [{ type: _angular_core.Input },],
|
|
2051
|
+
'hintLabel': [{ type: _angular_core.Input },],
|
|
2052
|
+
'floatPlaceholder': [{ type: _angular_core.Input },],
|
|
2053
|
+
'underlineRef': [{ type: _angular_core.ViewChild, args: ['underline',] },],
|
|
2054
|
+
'_connectionContainerRef': [{ type: _angular_core.ViewChild, args: ['connectionContainer',] },],
|
|
2055
|
+
'_placeholder': [{ type: _angular_core.ViewChild, args: ['placeholder',] },],
|
|
2056
|
+
'_control': [{ type: _angular_core.ContentChild, args: [MatFormFieldControl,] },],
|
|
2057
|
+
'_placeholderChild': [{ type: _angular_core.ContentChild, args: [MatPlaceholder,] },],
|
|
2058
|
+
'_errorChildren': [{ type: _angular_core.ContentChildren, args: [MatError,] },],
|
|
2059
|
+
'_hintChildren': [{ type: _angular_core.ContentChildren, args: [MatHint,] },],
|
|
2060
|
+
'_prefixChildren': [{ type: _angular_core.ContentChildren, args: [MatPrefix,] },],
|
|
2061
|
+
'_suffixChildren': [{ type: _angular_core.ContentChildren, args: [MatSuffix,] },],
|
|
2062
|
+
};
|
|
2063
|
+
return MatFormField;
|
|
2064
|
+
}());
|
|
2065
|
+
|
|
2066
|
+
var MatFormFieldModule = (function () {
|
|
2067
|
+
function MatFormFieldModule() {
|
|
2068
|
+
}
|
|
2069
|
+
MatFormFieldModule.decorators = [
|
|
2070
|
+
{ type: _angular_core.NgModule, args: [{
|
|
2071
|
+
declarations: [
|
|
2072
|
+
MatError,
|
|
2073
|
+
MatHint,
|
|
2074
|
+
MatFormField,
|
|
2075
|
+
MatPlaceholder,
|
|
2076
|
+
MatPrefix,
|
|
2077
|
+
MatSuffix,
|
|
2078
|
+
],
|
|
2079
|
+
imports: [
|
|
2080
|
+
_angular_common.CommonModule,
|
|
2081
|
+
_angular_cdk_platform.PlatformModule,
|
|
2082
|
+
],
|
|
2083
|
+
exports: [
|
|
2084
|
+
MatError,
|
|
2085
|
+
MatHint,
|
|
2086
|
+
MatFormField,
|
|
2087
|
+
MatPlaceholder,
|
|
2088
|
+
MatPrefix,
|
|
2089
|
+
MatSuffix,
|
|
2090
|
+
],
|
|
2091
|
+
},] },
|
|
2092
|
+
];
|
|
2093
|
+
/**
|
|
2094
|
+
* @nocollapse
|
|
2095
|
+
*/
|
|
2096
|
+
MatFormFieldModule.ctorParameters = function () { return []; };
|
|
2097
|
+
return MatFormFieldModule;
|
|
2098
|
+
}());
|
|
2099
|
+
|
|
2100
|
+
/**
|
|
2101
|
+
* Directive to automatically resize a textarea to fit its content.
|
|
2102
|
+
*/
|
|
2103
|
+
var MatTextareaAutosize = (function () {
|
|
2104
|
+
/**
|
|
2105
|
+
* @param {?} _elementRef
|
|
2106
|
+
* @param {?} _platform
|
|
2107
|
+
*/
|
|
2108
|
+
function MatTextareaAutosize(_elementRef, _platform) {
|
|
2109
|
+
this._elementRef = _elementRef;
|
|
2110
|
+
this._platform = _platform;
|
|
2111
|
+
}
|
|
2112
|
+
Object.defineProperty(MatTextareaAutosize.prototype, "minRows", {
|
|
2113
|
+
/**
|
|
2114
|
+
* @return {?}
|
|
2115
|
+
*/
|
|
2116
|
+
get: function () { return this._minRows; },
|
|
2117
|
+
/**
|
|
2118
|
+
* @param {?} value
|
|
2119
|
+
* @return {?}
|
|
2120
|
+
*/
|
|
2121
|
+
set: function (value) {
|
|
2122
|
+
this._minRows = value;
|
|
2123
|
+
this._setMinHeight();
|
|
2124
|
+
},
|
|
2125
|
+
enumerable: true,
|
|
2126
|
+
configurable: true
|
|
2127
|
+
});
|
|
2128
|
+
Object.defineProperty(MatTextareaAutosize.prototype, "maxRows", {
|
|
2129
|
+
/**
|
|
2130
|
+
* @return {?}
|
|
2131
|
+
*/
|
|
2132
|
+
get: function () { return this._maxRows; },
|
|
2133
|
+
/**
|
|
2134
|
+
* @param {?} value
|
|
2135
|
+
* @return {?}
|
|
2136
|
+
*/
|
|
2137
|
+
set: function (value) {
|
|
2138
|
+
this._maxRows = value;
|
|
2139
|
+
this._setMaxHeight();
|
|
2140
|
+
},
|
|
2141
|
+
enumerable: true,
|
|
2142
|
+
configurable: true
|
|
2143
|
+
});
|
|
2144
|
+
/**
|
|
2145
|
+
* Sets the minimum height of the textarea as determined by minRows.
|
|
2146
|
+
* @return {?}
|
|
2147
|
+
*/
|
|
2148
|
+
MatTextareaAutosize.prototype._setMinHeight = function () {
|
|
2149
|
+
var /** @type {?} */ minHeight = this.minRows && this._cachedLineHeight ?
|
|
2150
|
+
this.minRows * this._cachedLineHeight + "px" : null;
|
|
2151
|
+
if (minHeight) {
|
|
2152
|
+
this._setTextareaStyle('minHeight', minHeight);
|
|
2153
|
+
}
|
|
2154
|
+
};
|
|
2155
|
+
/**
|
|
2156
|
+
* Sets the maximum height of the textarea as determined by maxRows.
|
|
2157
|
+
* @return {?}
|
|
2158
|
+
*/
|
|
2159
|
+
MatTextareaAutosize.prototype._setMaxHeight = function () {
|
|
2160
|
+
var /** @type {?} */ maxHeight = this.maxRows && this._cachedLineHeight ?
|
|
2161
|
+
this.maxRows * this._cachedLineHeight + "px" : null;
|
|
2162
|
+
if (maxHeight) {
|
|
2163
|
+
this._setTextareaStyle('maxHeight', maxHeight);
|
|
2164
|
+
}
|
|
2165
|
+
};
|
|
2166
|
+
/**
|
|
2167
|
+
* @return {?}
|
|
2168
|
+
*/
|
|
2169
|
+
MatTextareaAutosize.prototype.ngAfterViewInit = function () {
|
|
2170
|
+
if (this._platform.isBrowser) {
|
|
2171
|
+
this.resizeToFitContent();
|
|
2172
|
+
}
|
|
2173
|
+
};
|
|
2174
|
+
/**
|
|
2175
|
+
* Sets a style property on the textarea element.
|
|
2176
|
+
* @param {?} property
|
|
2177
|
+
* @param {?} value
|
|
2178
|
+
* @return {?}
|
|
2179
|
+
*/
|
|
2180
|
+
MatTextareaAutosize.prototype._setTextareaStyle = function (property, value) {
|
|
2181
|
+
var /** @type {?} */ textarea = (this._elementRef.nativeElement);
|
|
2182
|
+
textarea.style[property] = value;
|
|
2183
|
+
};
|
|
2184
|
+
/**
|
|
2185
|
+
* Cache the height of a single-row textarea if it has not already been cached.
|
|
2186
|
+
*
|
|
2187
|
+
* We need to know how large a single "row" of a textarea is in order to apply minRows and
|
|
2188
|
+
* maxRows. For the initial version, we will assume that the height of a single line in the
|
|
2189
|
+
* textarea does not ever change.
|
|
2190
|
+
* @return {?}
|
|
2191
|
+
*/
|
|
2192
|
+
MatTextareaAutosize.prototype._cacheTextareaLineHeight = function () {
|
|
2193
|
+
if (this._cachedLineHeight) {
|
|
2194
|
+
return;
|
|
2195
|
+
}
|
|
2196
|
+
var /** @type {?} */ textarea = (this._elementRef.nativeElement);
|
|
2197
|
+
// Use a clone element because we have to override some styles.
|
|
2198
|
+
var /** @type {?} */ textareaClone = (textarea.cloneNode(false));
|
|
2199
|
+
textareaClone.rows = 1;
|
|
2200
|
+
// Use `position: absolute` so that this doesn't cause a browser layout and use
|
|
2201
|
+
// `visibility: hidden` so that nothing is rendered. Clear any other styles that
|
|
2202
|
+
// would affect the height.
|
|
2203
|
+
textareaClone.style.position = 'absolute';
|
|
2204
|
+
textareaClone.style.visibility = 'hidden';
|
|
2205
|
+
textareaClone.style.border = 'none';
|
|
2206
|
+
textareaClone.style.padding = '0';
|
|
2207
|
+
textareaClone.style.height = '';
|
|
2208
|
+
textareaClone.style.minHeight = '';
|
|
2209
|
+
textareaClone.style.maxHeight = '';
|
|
2210
|
+
// In Firefox it happens that textarea elements are always bigger than the specified amount
|
|
2211
|
+
// of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.
|
|
2212
|
+
// As a workaround that removes the extra space for the scrollbar, we can just set overflow
|
|
2213
|
+
// to hidden. This ensures that there is no invalid calculation of the line height.
|
|
2214
|
+
// See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654
|
|
2215
|
+
textareaClone.style.overflow = 'hidden'; /** @type {?} */
|
|
2216
|
+
((textarea.parentNode)).appendChild(textareaClone);
|
|
2217
|
+
this._cachedLineHeight = textareaClone.clientHeight; /** @type {?} */
|
|
2218
|
+
((textarea.parentNode)).removeChild(textareaClone);
|
|
2219
|
+
// Min and max heights have to be re-calculated if the cached line height changes
|
|
2220
|
+
this._setMinHeight();
|
|
2221
|
+
this._setMaxHeight();
|
|
2222
|
+
};
|
|
2223
|
+
/**
|
|
2224
|
+
* @return {?}
|
|
2225
|
+
*/
|
|
2226
|
+
MatTextareaAutosize.prototype.ngDoCheck = function () {
|
|
2227
|
+
if (this._platform.isBrowser) {
|
|
2228
|
+
this.resizeToFitContent();
|
|
2229
|
+
}
|
|
2230
|
+
};
|
|
2231
|
+
/**
|
|
2232
|
+
* Resize the textarea to fit its content.
|
|
2233
|
+
* @return {?}
|
|
2234
|
+
*/
|
|
2235
|
+
MatTextareaAutosize.prototype.resizeToFitContent = function () {
|
|
2236
|
+
this._cacheTextareaLineHeight();
|
|
2237
|
+
// If we haven't determined the line-height yet, we know we're still hidden and there's no point
|
|
2238
|
+
// in checking the height of the textarea.
|
|
2239
|
+
if (!this._cachedLineHeight) {
|
|
2240
|
+
return;
|
|
2241
|
+
}
|
|
2242
|
+
var /** @type {?} */ textarea = (this._elementRef.nativeElement);
|
|
2243
|
+
var /** @type {?} */ value = textarea.value;
|
|
2244
|
+
// Only resize of the value changed since these calculations can be expensive.
|
|
2245
|
+
if (value === this._previousValue) {
|
|
2246
|
+
return;
|
|
2247
|
+
}
|
|
2248
|
+
// Reset the textarea height to auto in order to shrink back to its default size.
|
|
2249
|
+
// Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.
|
|
2250
|
+
textarea.style.height = 'auto';
|
|
2251
|
+
textarea.style.overflow = 'hidden';
|
|
2252
|
+
// Use the scrollHeight to know how large the textarea *would* be if fit its entire value.
|
|
2253
|
+
textarea.style.height = textarea.scrollHeight + "px";
|
|
2254
|
+
textarea.style.overflow = '';
|
|
2255
|
+
this._previousValue = value;
|
|
2256
|
+
};
|
|
2257
|
+
MatTextareaAutosize.decorators = [
|
|
2258
|
+
{ type: _angular_core.Directive, args: [{
|
|
2259
|
+
selector: "textarea[mat-autosize], textarea[matTextareaAutosize]",
|
|
2260
|
+
exportAs: 'matTextareaAutosize',
|
|
2261
|
+
host: {
|
|
2262
|
+
// Textarea elements that have the directive applied should have a single row by default.
|
|
2263
|
+
// Browsers normally show two rows by default and therefore this limits the minRows binding.
|
|
2264
|
+
'rows': '1',
|
|
2265
|
+
},
|
|
2266
|
+
},] },
|
|
2267
|
+
];
|
|
2268
|
+
/**
|
|
2269
|
+
* @nocollapse
|
|
2270
|
+
*/
|
|
2271
|
+
MatTextareaAutosize.ctorParameters = function () { return [
|
|
2272
|
+
{ type: _angular_core.ElementRef, },
|
|
2273
|
+
{ type: _angular_cdk_platform.Platform, },
|
|
2274
|
+
]; };
|
|
2275
|
+
MatTextareaAutosize.propDecorators = {
|
|
2276
|
+
'minRows': [{ type: _angular_core.Input, args: ['matAutosizeMinRows',] },],
|
|
2277
|
+
'maxRows': [{ type: _angular_core.Input, args: ['matAutosizeMaxRows',] },],
|
|
2278
|
+
};
|
|
2279
|
+
return MatTextareaAutosize;
|
|
2280
|
+
}());
|
|
2281
|
+
|
|
2282
|
+
/**
|
|
2283
|
+
* \@docs-private
|
|
2284
|
+
* @param {?} type
|
|
2285
|
+
* @return {?}
|
|
2286
|
+
*/
|
|
2287
|
+
function getMatInputUnsupportedTypeError(type) {
|
|
2288
|
+
return Error("Input type \"" + type + "\" isn't supported by matInput.");
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.
|
|
2292
|
+
var MAT_INPUT_INVALID_TYPES = [
|
|
2293
|
+
'button',
|
|
2294
|
+
'checkbox',
|
|
2295
|
+
'color',
|
|
2296
|
+
'file',
|
|
2297
|
+
'hidden',
|
|
2298
|
+
'image',
|
|
2299
|
+
'radio',
|
|
2300
|
+
'range',
|
|
2301
|
+
'reset',
|
|
2302
|
+
'submit'
|
|
2303
|
+
];
|
|
2304
|
+
var nextUniqueId = 0;
|
|
2305
|
+
/**
|
|
2306
|
+
* Directive that allows a native input to work inside a `MatFormField`.
|
|
2307
|
+
*/
|
|
2308
|
+
var MatInput = (function () {
|
|
2309
|
+
/**
|
|
2310
|
+
* @param {?} _elementRef
|
|
2311
|
+
* @param {?} _renderer
|
|
2312
|
+
* @param {?} _platform
|
|
2313
|
+
* @param {?} ngControl
|
|
2314
|
+
* @param {?} _parentForm
|
|
2315
|
+
* @param {?} _parentFormGroup
|
|
2316
|
+
* @param {?} _defaultErrorStateMatcher
|
|
2317
|
+
*/
|
|
2318
|
+
function MatInput(_elementRef, _renderer, _platform, ngControl, _parentForm, _parentFormGroup, _defaultErrorStateMatcher) {
|
|
2319
|
+
this._elementRef = _elementRef;
|
|
2320
|
+
this._renderer = _renderer;
|
|
2321
|
+
this._platform = _platform;
|
|
2322
|
+
this.ngControl = ngControl;
|
|
2323
|
+
this._parentForm = _parentForm;
|
|
2324
|
+
this._parentFormGroup = _parentFormGroup;
|
|
2325
|
+
this._defaultErrorStateMatcher = _defaultErrorStateMatcher;
|
|
2326
|
+
/**
|
|
2327
|
+
* Variables used as cache for getters and setters.
|
|
2328
|
+
*/
|
|
2329
|
+
this._type = 'text';
|
|
2330
|
+
this._disabled = false;
|
|
2331
|
+
this._required = false;
|
|
2332
|
+
this._uid = "mat-input-" + nextUniqueId++;
|
|
2333
|
+
this._previousNativeValue = this.value;
|
|
2334
|
+
this._readonly = false;
|
|
2335
|
+
/**
|
|
2336
|
+
* Whether the input is focused.
|
|
2337
|
+
*/
|
|
2338
|
+
this.focused = false;
|
|
2339
|
+
/**
|
|
2340
|
+
* Whether the input is in an error state.
|
|
2341
|
+
*/
|
|
2342
|
+
this.errorState = false;
|
|
2343
|
+
/**
|
|
2344
|
+
* Stream that emits whenever the state of the input changes such that the wrapping `MatFormField`
|
|
2345
|
+
* needs to run change detection.
|
|
2346
|
+
*/
|
|
2347
|
+
this.stateChanges = new rxjs_Subject.Subject();
|
|
2348
|
+
/**
|
|
2349
|
+
* A name for this control that can be used by `mat-form-field`.
|
|
2350
|
+
*/
|
|
2351
|
+
this.controlType = 'mat-input';
|
|
2352
|
+
/**
|
|
2353
|
+
* Placeholder attribute of the element.
|
|
2354
|
+
*/
|
|
2355
|
+
this.placeholder = '';
|
|
2356
|
+
this._neverEmptyInputTypes = [
|
|
2357
|
+
'date',
|
|
2358
|
+
'datetime',
|
|
2359
|
+
'datetime-local',
|
|
2360
|
+
'month',
|
|
2361
|
+
'time',
|
|
2362
|
+
'week'
|
|
2363
|
+
].filter(function (t) { return _angular_cdk_platform.getSupportedInputTypes().has(t); });
|
|
2364
|
+
// Force setter to be called in case id was not specified.
|
|
2365
|
+
this.id = this.id;
|
|
2366
|
+
// On some versions of iOS the caret gets stuck in the wrong place when holding down the delete
|
|
2367
|
+
// key. In order to get around this we need to "jiggle" the caret loose. Since this bug only
|
|
2368
|
+
// exists on iOS, we only bother to install the listener on iOS.
|
|
2369
|
+
if (_platform.IOS) {
|
|
2370
|
+
_renderer.listen(_elementRef.nativeElement, 'keyup', function (event) {
|
|
2371
|
+
var el = event.target;
|
|
2372
|
+
if (!el.value && !el.selectionStart && !el.selectionEnd) {
|
|
2373
|
+
// Note: Just setting `0, 0` doesn't fix the issue. Setting `1, 1` fixes it for the first
|
|
2374
|
+
// time that you type text and then hold delete. Toggling to `1, 1` and then back to
|
|
2375
|
+
// `0, 0` seems to completely fix it.
|
|
2376
|
+
el.setSelectionRange(1, 1);
|
|
2377
|
+
el.setSelectionRange(0, 0);
|
|
2378
|
+
}
|
|
2379
|
+
});
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
Object.defineProperty(MatInput.prototype, "disabled", {
|
|
2383
|
+
/**
|
|
2384
|
+
* Whether the element is disabled.
|
|
2385
|
+
* @return {?}
|
|
2386
|
+
*/
|
|
2387
|
+
get: function () { return this.ngControl ? this.ngControl.disabled : this._disabled; },
|
|
2388
|
+
/**
|
|
2389
|
+
* @param {?} value
|
|
2390
|
+
* @return {?}
|
|
2391
|
+
*/
|
|
2392
|
+
set: function (value) { this._disabled = _angular_cdk_coercion.coerceBooleanProperty(value); },
|
|
2393
|
+
enumerable: true,
|
|
2394
|
+
configurable: true
|
|
2395
|
+
});
|
|
2396
|
+
Object.defineProperty(MatInput.prototype, "id", {
|
|
2397
|
+
/**
|
|
2398
|
+
* Unique id of the element.
|
|
2399
|
+
* @return {?}
|
|
2400
|
+
*/
|
|
2401
|
+
get: function () { return this._id; },
|
|
2402
|
+
/**
|
|
2403
|
+
* @param {?} value
|
|
2404
|
+
* @return {?}
|
|
2405
|
+
*/
|
|
2406
|
+
set: function (value) { this._id = value || this._uid; },
|
|
2407
|
+
enumerable: true,
|
|
2408
|
+
configurable: true
|
|
2409
|
+
});
|
|
2410
|
+
Object.defineProperty(MatInput.prototype, "required", {
|
|
2411
|
+
/**
|
|
2412
|
+
* Whether the element is required.
|
|
2413
|
+
* @return {?}
|
|
2414
|
+
*/
|
|
2415
|
+
get: function () { return this._required; },
|
|
2416
|
+
/**
|
|
2417
|
+
* @param {?} value
|
|
2418
|
+
* @return {?}
|
|
2419
|
+
*/
|
|
2420
|
+
set: function (value) { this._required = _angular_cdk_coercion.coerceBooleanProperty(value); },
|
|
2421
|
+
enumerable: true,
|
|
2422
|
+
configurable: true
|
|
2423
|
+
});
|
|
2424
|
+
Object.defineProperty(MatInput.prototype, "type", {
|
|
2425
|
+
/**
|
|
2426
|
+
* Input type of the element.
|
|
2427
|
+
* @return {?}
|
|
2428
|
+
*/
|
|
2429
|
+
get: function () { return this._type; },
|
|
2430
|
+
/**
|
|
2431
|
+
* @param {?} value
|
|
2432
|
+
* @return {?}
|
|
2433
|
+
*/
|
|
2434
|
+
set: function (value) {
|
|
2435
|
+
this._type = value || 'text';
|
|
2436
|
+
this._validateType();
|
|
2437
|
+
// When using Angular inputs, developers are no longer able to set the properties on the native
|
|
2438
|
+
// input element. To ensure that bindings for `type` work, we need to sync the setter
|
|
2439
|
+
// with the native property. Textarea elements don't support the type property or attribute.
|
|
2440
|
+
if (!this._isTextarea() && _angular_cdk_platform.getSupportedInputTypes().has(this._type)) {
|
|
2441
|
+
this._renderer.setProperty(this._elementRef.nativeElement, 'type', this._type);
|
|
2442
|
+
}
|
|
2443
|
+
},
|
|
2444
|
+
enumerable: true,
|
|
2445
|
+
configurable: true
|
|
2446
|
+
});
|
|
2447
|
+
Object.defineProperty(MatInput.prototype, "value", {
|
|
2448
|
+
/**
|
|
2449
|
+
* The input element's value.
|
|
2450
|
+
* @return {?}
|
|
2451
|
+
*/
|
|
2452
|
+
get: function () { return this._elementRef.nativeElement.value; },
|
|
2453
|
+
/**
|
|
2454
|
+
* @param {?} value
|
|
2455
|
+
* @return {?}
|
|
2456
|
+
*/
|
|
2457
|
+
set: function (value) {
|
|
2458
|
+
if (value !== this.value) {
|
|
2459
|
+
this._elementRef.nativeElement.value = value;
|
|
2460
|
+
this.stateChanges.next();
|
|
2461
|
+
}
|
|
2462
|
+
},
|
|
2463
|
+
enumerable: true,
|
|
2464
|
+
configurable: true
|
|
2465
|
+
});
|
|
2466
|
+
Object.defineProperty(MatInput.prototype, "readonly", {
|
|
2467
|
+
/**
|
|
2468
|
+
* Whether the element is readonly.
|
|
2469
|
+
* @return {?}
|
|
2470
|
+
*/
|
|
2471
|
+
get: function () { return this._readonly; },
|
|
2472
|
+
/**
|
|
2473
|
+
* @param {?} value
|
|
2474
|
+
* @return {?}
|
|
2475
|
+
*/
|
|
2476
|
+
set: function (value) { this._readonly = _angular_cdk_coercion.coerceBooleanProperty(value); },
|
|
2477
|
+
enumerable: true,
|
|
2478
|
+
configurable: true
|
|
2479
|
+
});
|
|
2480
|
+
/**
|
|
2481
|
+
* @return {?}
|
|
2482
|
+
*/
|
|
2483
|
+
MatInput.prototype.ngOnChanges = function () {
|
|
2484
|
+
this.stateChanges.next();
|
|
2485
|
+
};
|
|
2486
|
+
/**
|
|
2487
|
+
* @return {?}
|
|
2488
|
+
*/
|
|
2489
|
+
MatInput.prototype.ngOnDestroy = function () {
|
|
2490
|
+
this.stateChanges.complete();
|
|
2491
|
+
};
|
|
2492
|
+
/**
|
|
2493
|
+
* @return {?}
|
|
2494
|
+
*/
|
|
2495
|
+
MatInput.prototype.ngDoCheck = function () {
|
|
2496
|
+
if (this.ngControl) {
|
|
2497
|
+
// We need to re-evaluate this on every change detection cycle, because there are some
|
|
2498
|
+
// error triggers that we can't subscribe to (e.g. parent form submissions). This means
|
|
2499
|
+
// that whatever logic is in here has to be super lean or we risk destroying the performance.
|
|
2500
|
+
this._updateErrorState();
|
|
2501
|
+
}
|
|
2502
|
+
else {
|
|
2503
|
+
// When the input isn't used together with `@angular/forms`, we need to check manually for
|
|
2504
|
+
// changes to the native `value` property in order to update the floating label.
|
|
2505
|
+
this._dirtyCheckNativeValue();
|
|
2506
|
+
}
|
|
2507
|
+
};
|
|
2508
|
+
/**
|
|
2509
|
+
* @return {?}
|
|
2510
|
+
*/
|
|
2511
|
+
MatInput.prototype.focus = function () { this._elementRef.nativeElement.focus(); };
|
|
2512
|
+
/**
|
|
2513
|
+
* Callback for the cases where the focused state of the input changes.
|
|
2514
|
+
* @param {?} isFocused
|
|
2515
|
+
* @return {?}
|
|
2516
|
+
*/
|
|
2517
|
+
MatInput.prototype._focusChanged = function (isFocused) {
|
|
2518
|
+
if (isFocused !== this.focused && !this.readonly) {
|
|
2519
|
+
this.focused = isFocused;
|
|
2520
|
+
this.stateChanges.next();
|
|
2521
|
+
}
|
|
2522
|
+
};
|
|
2523
|
+
/**
|
|
2524
|
+
* @return {?}
|
|
2525
|
+
*/
|
|
2526
|
+
MatInput.prototype._onInput = function () {
|
|
2527
|
+
// This is a noop function and is used to let Angular know whenever the value changes.
|
|
2528
|
+
// Angular will run a new change detection each time the `input` event has been dispatched.
|
|
2529
|
+
// It's necessary that Angular recognizes the value change, because when floatingLabel
|
|
2530
|
+
// is set to false and Angular forms aren't used, the placeholder won't recognize the
|
|
2531
|
+
// value changes and will not disappear.
|
|
2532
|
+
// Listening to the input event wouldn't be necessary when the input is using the
|
|
2533
|
+
// FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.
|
|
2534
|
+
};
|
|
2535
|
+
/**
|
|
2536
|
+
* Re-evaluates the error state. This is only relevant with \@angular/forms.
|
|
2537
|
+
* @return {?}
|
|
2538
|
+
*/
|
|
2539
|
+
MatInput.prototype._updateErrorState = function () {
|
|
2540
|
+
var /** @type {?} */ oldState = this.errorState;
|
|
2541
|
+
var /** @type {?} */ parent = this._parentFormGroup || this._parentForm;
|
|
2542
|
+
var /** @type {?} */ matcher = this.errorStateMatcher || this._defaultErrorStateMatcher;
|
|
2543
|
+
var /** @type {?} */ control = this.ngControl ? (this.ngControl.control) : null;
|
|
2544
|
+
var /** @type {?} */ newState = matcher.isErrorState(control, parent);
|
|
2545
|
+
if (newState !== oldState) {
|
|
2546
|
+
this.errorState = newState;
|
|
2547
|
+
this.stateChanges.next();
|
|
2548
|
+
}
|
|
2549
|
+
};
|
|
2550
|
+
/**
|
|
2551
|
+
* Does some manual dirty checking on the native input `value` property.
|
|
2552
|
+
* @return {?}
|
|
2553
|
+
*/
|
|
2554
|
+
MatInput.prototype._dirtyCheckNativeValue = function () {
|
|
2555
|
+
var /** @type {?} */ newValue = this.value;
|
|
2556
|
+
if (this._previousNativeValue !== newValue) {
|
|
2557
|
+
this._previousNativeValue = newValue;
|
|
2558
|
+
this.stateChanges.next();
|
|
2559
|
+
}
|
|
2560
|
+
};
|
|
2561
|
+
/**
|
|
2562
|
+
* Make sure the input is a supported type.
|
|
2563
|
+
* @return {?}
|
|
2564
|
+
*/
|
|
2565
|
+
MatInput.prototype._validateType = function () {
|
|
2566
|
+
if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1) {
|
|
2567
|
+
throw getMatInputUnsupportedTypeError(this._type);
|
|
2568
|
+
}
|
|
2569
|
+
};
|
|
2570
|
+
/**
|
|
2571
|
+
* Checks whether the input type is one of the types that are never empty.
|
|
2572
|
+
* @return {?}
|
|
2573
|
+
*/
|
|
2574
|
+
MatInput.prototype._isNeverEmpty = function () {
|
|
2575
|
+
return this._neverEmptyInputTypes.indexOf(this._type) > -1;
|
|
2576
|
+
};
|
|
2577
|
+
/**
|
|
2578
|
+
* Checks whether the input is invalid based on the native validation.
|
|
2579
|
+
* @return {?}
|
|
2580
|
+
*/
|
|
2581
|
+
MatInput.prototype._isBadInput = function () {
|
|
2582
|
+
// The `validity` property won't be present on platform-server.
|
|
2583
|
+
var /** @type {?} */ validity = ((this._elementRef.nativeElement)).validity;
|
|
2584
|
+
return validity && validity.badInput;
|
|
2585
|
+
};
|
|
2586
|
+
/**
|
|
2587
|
+
* Determines if the component host is a textarea. If not recognizable it returns false.
|
|
2588
|
+
* @return {?}
|
|
2589
|
+
*/
|
|
2590
|
+
MatInput.prototype._isTextarea = function () {
|
|
2591
|
+
var /** @type {?} */ nativeElement = this._elementRef.nativeElement;
|
|
2592
|
+
// In Universal, we don't have access to `nodeName`, but the same can be achieved with `name`.
|
|
2593
|
+
// Note that this shouldn't be necessary once Angular switches to an API that resembles the
|
|
2594
|
+
// DOM closer.
|
|
2595
|
+
var /** @type {?} */ nodeName = this._platform.isBrowser ? nativeElement.nodeName : nativeElement.name;
|
|
2596
|
+
return nodeName ? nodeName.toLowerCase() === 'textarea' : false;
|
|
2597
|
+
};
|
|
2598
|
+
Object.defineProperty(MatInput.prototype, "empty", {
|
|
2599
|
+
/**
|
|
2600
|
+
* @return {?}
|
|
2601
|
+
*/
|
|
2602
|
+
get: function () {
|
|
2603
|
+
return !this._isNeverEmpty() &&
|
|
2604
|
+
(this.value == null || this.value === '') &&
|
|
2605
|
+
// Check if the input contains bad input. If so, we know that it only appears empty because
|
|
2606
|
+
// the value failed to parse. From the user's perspective it is not empty.
|
|
2607
|
+
// TODO(mmalerba): Add e2e test for bad input case.
|
|
2608
|
+
!this._isBadInput();
|
|
2609
|
+
},
|
|
2610
|
+
enumerable: true,
|
|
2611
|
+
configurable: true
|
|
2612
|
+
});
|
|
2613
|
+
Object.defineProperty(MatInput.prototype, "shouldPlaceholderFloat", {
|
|
2614
|
+
/**
|
|
2615
|
+
* @return {?}
|
|
2616
|
+
*/
|
|
2617
|
+
get: function () { return this.focused || !this.empty; },
|
|
2618
|
+
enumerable: true,
|
|
2619
|
+
configurable: true
|
|
2620
|
+
});
|
|
2621
|
+
/**
|
|
2622
|
+
* @param {?} ids
|
|
2623
|
+
* @return {?}
|
|
2624
|
+
*/
|
|
2625
|
+
MatInput.prototype.setDescribedByIds = function (ids) { this._ariaDescribedby = ids.join(' '); };
|
|
2626
|
+
/**
|
|
2627
|
+
* @return {?}
|
|
2628
|
+
*/
|
|
2629
|
+
MatInput.prototype.onContainerClick = function () { this.focus(); };
|
|
2630
|
+
MatInput.decorators = [
|
|
2631
|
+
{ type: _angular_core.Directive, args: [{
|
|
2632
|
+
selector: "input[matInput], textarea[matInput]",
|
|
2633
|
+
exportAs: 'matInput',
|
|
2634
|
+
host: {
|
|
2635
|
+
'class': 'mat-input-element mat-form-field-autofill-control',
|
|
2636
|
+
// Native input properties that are overwritten by Angular inputs need to be synced with
|
|
2637
|
+
// the native input element. Otherwise property bindings for those don't work.
|
|
2638
|
+
'[attr.id]': 'id',
|
|
2639
|
+
'[placeholder]': 'placeholder',
|
|
2640
|
+
'[disabled]': 'disabled',
|
|
2641
|
+
'[required]': 'required',
|
|
2642
|
+
'[readonly]': 'readonly',
|
|
2643
|
+
'[attr.aria-describedby]': '_ariaDescribedby || null',
|
|
2644
|
+
'[attr.aria-invalid]': 'errorState',
|
|
2645
|
+
'(blur)': '_focusChanged(false)',
|
|
2646
|
+
'(focus)': '_focusChanged(true)',
|
|
2647
|
+
'(input)': '_onInput()',
|
|
2648
|
+
},
|
|
2649
|
+
providers: [{ provide: MatFormFieldControl, useExisting: MatInput }],
|
|
2650
|
+
},] },
|
|
2651
|
+
];
|
|
2652
|
+
/**
|
|
2653
|
+
* @nocollapse
|
|
2654
|
+
*/
|
|
2655
|
+
MatInput.ctorParameters = function () { return [
|
|
2656
|
+
{ type: _angular_core.ElementRef, },
|
|
2657
|
+
{ type: _angular_core.Renderer2, },
|
|
2658
|
+
{ type: _angular_cdk_platform.Platform, },
|
|
2659
|
+
{ type: _angular_forms.NgControl, decorators: [{ type: _angular_core.Optional }, { type: _angular_core.Self },] },
|
|
2660
|
+
{ type: _angular_forms.NgForm, decorators: [{ type: _angular_core.Optional },] },
|
|
2661
|
+
{ type: _angular_forms.FormGroupDirective, decorators: [{ type: _angular_core.Optional },] },
|
|
2662
|
+
{ type: ErrorStateMatcher, },
|
|
2663
|
+
]; };
|
|
2664
|
+
MatInput.propDecorators = {
|
|
2665
|
+
'disabled': [{ type: _angular_core.Input },],
|
|
2666
|
+
'id': [{ type: _angular_core.Input },],
|
|
2667
|
+
'placeholder': [{ type: _angular_core.Input },],
|
|
2668
|
+
'required': [{ type: _angular_core.Input },],
|
|
2669
|
+
'type': [{ type: _angular_core.Input },],
|
|
2670
|
+
'errorStateMatcher': [{ type: _angular_core.Input },],
|
|
2671
|
+
'value': [{ type: _angular_core.Input },],
|
|
2672
|
+
'readonly': [{ type: _angular_core.Input },],
|
|
2673
|
+
};
|
|
2674
|
+
return MatInput;
|
|
2675
|
+
}());
|
|
2676
|
+
|
|
2677
|
+
var MatInputModule = (function () {
|
|
2678
|
+
function MatInputModule() {
|
|
2679
|
+
}
|
|
2680
|
+
MatInputModule.decorators = [
|
|
2681
|
+
{ type: _angular_core.NgModule, args: [{
|
|
2682
|
+
declarations: [
|
|
2683
|
+
MatInput,
|
|
2684
|
+
MatTextareaAutosize,
|
|
2685
|
+
],
|
|
2686
|
+
imports: [
|
|
2687
|
+
_angular_common.CommonModule,
|
|
2688
|
+
MatFormFieldModule,
|
|
2689
|
+
_angular_cdk_platform.PlatformModule,
|
|
2690
|
+
],
|
|
2691
|
+
exports: [
|
|
2692
|
+
// We re-export the `MatFormFieldModule` since `MatInput` will almost always
|
|
2693
|
+
// be used together with `MatFormField`.
|
|
2694
|
+
MatFormFieldModule,
|
|
2695
|
+
MatInput,
|
|
2696
|
+
MatTextareaAutosize,
|
|
2697
|
+
],
|
|
2698
|
+
providers: [ErrorStateMatcher],
|
|
2699
|
+
},] },
|
|
2700
|
+
];
|
|
2701
|
+
/**
|
|
2702
|
+
* @nocollapse
|
|
2703
|
+
*/
|
|
2704
|
+
MatInputModule.ctorParameters = function () { return []; };
|
|
2705
|
+
return MatInputModule;
|
|
2706
|
+
}());
|
|
2707
|
+
|
|
2708
|
+
exports.MatInputModule = MatInputModule;
|
|
2709
|
+
exports.MatTextareaAutosize = MatTextareaAutosize;
|
|
2710
|
+
exports.MatInput = MatInput;
|
|
2711
|
+
exports.getMatInputUnsupportedTypeError = getMatInputUnsupportedTypeError;
|
|
2712
|
+
|
|
2713
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2714
|
+
|
|
2715
|
+
})));
|
|
2716
|
+
//# sourceMappingURL=material-input.umd.js.map
|