@angular/material 2.0.0-alpha.9-3 → 2.0.0-beta.11
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 +21 -0
- package/README.md +4 -145
- package/_theming.scss +3872 -0
- package/autocomplete/index.d.ts +8 -0
- package/autocomplete/index.metadata.json +11 -0
- 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 +55 -0
- package/autocomplete/typings/index.d.ts +4 -0
- package/autocomplete/typings/index.metadata.json +1 -0
- package/autocomplete/typings/mat-exports.d.ts +17 -0
- package/autocomplete/typings/public_api.d.ts +11 -0
- package/autocomplete.d.ts +8 -0
- package/autocomplete.metadata.json +11 -0
- package/bundles/material-autocomplete.umd.js +3293 -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 +2689 -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 +2503 -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 +2438 -0
- package/bundles/material-card.umd.js.map +1 -0
- package/bundles/material-card.umd.min.js +10 -0
- package/bundles/material-card.umd.min.js.map +1 -0
- package/bundles/material-checkbox.umd.js +2692 -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 +4121 -0
- package/bundles/material-chips.umd.js.map +1 -0
- package/bundles/material-chips.umd.min.js +11 -0
- package/bundles/material-chips.umd.min.js.map +1 -0
- package/bundles/material-core.umd.js +2505 -0
- package/bundles/material-core.umd.js.map +1 -0
- package/bundles/material-core.umd.min.js +10 -0
- package/bundles/material-core.umd.min.js.map +1 -0
- package/bundles/material-datepicker.umd.js +6568 -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 +2980 -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-examples.umd.js +3627 -0
- package/bundles/material-examples.umd.js.map +1 -0
- package/bundles/material-examples.umd.min.js +12 -0
- package/bundles/material-examples.umd.min.js.map +1 -0
- package/bundles/material-expansion.umd.js +2678 -0
- package/bundles/material-expansion.umd.js.map +1 -0
- package/bundles/material-expansion.umd.min.js +10 -0
- package/bundles/material-expansion.umd.min.js.map +1 -0
- package/bundles/material-form-field.umd.js +2629 -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 +3000 -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 +2862 -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 +3214 -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 +2908 -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 +3016 -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 +4990 -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 +2204 -0
- package/bundles/material-progress-bar.umd.js.map +1 -0
- package/bundles/material-progress-bar.umd.min.js +10 -0
- package/bundles/material-progress-bar.umd.min.js.map +1 -0
- package/bundles/material-progress-spinner.umd.js +2594 -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 +2936 -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 +3611 -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 +2781 -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 +2657 -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 +3043 -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 +2717 -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 +2479 -0
- package/bundles/material-sort.umd.js.map +1 -0
- package/bundles/material-sort.umd.min.js +10 -0
- package/bundles/material-sort.umd.min.js.map +1 -0
- package/bundles/material-stepper.umd.js +3598 -0
- package/bundles/material-stepper.umd.js.map +1 -0
- package/bundles/material-stepper.umd.min.js +11 -0
- package/bundles/material-stepper.umd.min.js.map +1 -0
- package/bundles/material-table.umd.js +2458 -0
- package/bundles/material-table.umd.js.map +1 -0
- package/bundles/material-table.umd.min.js +10 -0
- package/bundles/material-table.umd.min.js.map +1 -0
- package/bundles/material-tabs.umd.js +3742 -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 +2211 -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 +2821 -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 +23785 -0
- package/bundles/material.umd.js.map +1 -0
- package/bundles/material.umd.min.js +23 -0
- package/bundles/material.umd.min.js.map +1 -0
- package/button/index.d.ts +8 -1
- package/button/index.metadata.json +11 -1
- package/button/package.json +7 -0
- package/button/typings/button-module.d.ts +2 -0
- package/button/typings/button.d.ts +80 -0
- package/button/typings/index.d.ts +4 -0
- package/button/typings/index.metadata.json +1 -0
- package/button/typings/mat-exports.d.ts +18 -0
- package/button/typings/public_api.d.ts +10 -0
- package/button-toggle/index.d.ts +8 -1
- package/button-toggle/index.metadata.json +11 -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 +156 -0
- package/button-toggle/typings/index.d.ts +4 -0
- package/button-toggle/typings/index.metadata.json +1 -0
- package/button-toggle/typings/mat-exports.d.ts +16 -0
- package/button-toggle/typings/public_api.d.ts +10 -0
- package/button-toggle.d.ts +8 -0
- package/button-toggle.metadata.json +11 -0
- package/button.d.ts +8 -0
- package/button.metadata.json +11 -0
- package/card/index.d.ts +8 -1
- package/card/index.metadata.json +11 -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/mat-exports.d.ts +24 -0
- package/card/typings/public_api.d.ts +10 -0
- package/card.d.ts +8 -0
- package/card.metadata.json +11 -0
- package/checkbox/index.d.ts +8 -1
- package/checkbox/index.metadata.json +11 -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 +159 -0
- package/checkbox/typings/index.d.ts +4 -0
- package/checkbox/typings/index.metadata.json +1 -0
- package/checkbox/typings/mat-exports.d.ts +17 -0
- package/checkbox/typings/public_api.d.ts +11 -0
- package/checkbox.d.ts +8 -0
- package/checkbox.metadata.json +11 -0
- package/chips/index.d.ts +8 -0
- package/chips/index.metadata.json +11 -0
- package/chips/package.json +7 -0
- package/chips/typings/chip-input.d.ts +54 -0
- package/chips/typings/chip-list.d.ts +219 -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/mat-exports.d.ts +21 -0
- package/chips/typings/public_api.d.ts +12 -0
- package/chips.d.ts +8 -0
- package/chips.metadata.json +11 -0
- package/core/index.d.ts +8 -1
- package/core/index.metadata.json +11 -1
- package/core/package.json +7 -0
- package/core/typings/a11y/index.d.ts +8 -0
- package/core/typings/animation/animation.d.ts +20 -0
- package/core/typings/bidi/index.d.ts +8 -0
- package/core/typings/common-behaviors/color.d.ts +22 -0
- package/core/typings/common-behaviors/common-module.d.ts +24 -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 +40 -0
- package/core/typings/coordination/unique-selection-dispatcher.d.ts +40 -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 +19 -0
- package/core/typings/gestures/gesture-annotations.d.ts +51 -0
- package/core/typings/gestures/gesture-config.d.ts +23 -0
- package/core/typings/index.d.ts +5 -0
- package/core/typings/index.metadata.json +1 -0
- package/core/typings/keyboard/keycodes.d.ts +8 -0
- package/core/typings/line/line.d.ts +30 -0
- package/core/typings/mat-exports.d.ts +36 -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 +97 -0
- package/core/typings/overlay/index.d.ts +8 -0
- package/core/typings/placeholder/placeholder-options.d.ts +15 -0
- package/core/typings/platform/features.d.ts +8 -0
- package/core/typings/platform/index.d.ts +10 -0
- package/core/typings/platform/platform.d.ts +8 -0
- package/core/typings/portal/dom-portal-host.d.ts +8 -0
- package/core/typings/portal/portal-directives.d.ts +8 -0
- package/core/typings/portal/portal-injector.d.ts +19 -0
- package/core/typings/portal/portal.d.ts +8 -0
- package/core/typings/public_api.d.ts +34 -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 +64 -0
- package/core/typings/ripple/ripple.d.ts +73 -0
- package/core/typings/rxjs/index.d.ts +9 -0
- package/core/typings/rxjs/rx-chain.d.ts +8 -0
- package/core/typings/rxjs/rx-operators.d.ts +8 -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 +5 -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 +11 -1
- package/datepicker/index.d.ts +8 -0
- package/datepicker/index.metadata.json +11 -0
- package/datepicker/package.json +7 -0
- package/datepicker/typings/calendar-body.d.ts +52 -0
- package/datepicker/typings/calendar.d.ts +90 -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 +94 -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/mat-exports.d.ts +33 -0
- package/datepicker/typings/month-view.d.ts +65 -0
- package/datepicker/typings/public_api.d.ts +18 -0
- package/datepicker/typings/year-view.d.ts +54 -0
- package/datepicker.d.ts +8 -0
- package/datepicker.metadata.json +11 -0
- package/dialog/index.d.ts +8 -4
- package/dialog/index.metadata.json +11 -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 +45 -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/mat-exports.d.ts +26 -0
- package/dialog/typings/public_api.d.ts +14 -0
- package/dialog.d.ts +8 -0
- package/dialog.metadata.json +11 -0
- package/esm2015/autocomplete.js +661 -0
- package/esm2015/autocomplete.js.map +1 -0
- package/esm2015/button-toggle.js +567 -0
- package/esm2015/button-toggle.js.map +1 -0
- package/esm2015/button.js +323 -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 +504 -0
- package/esm2015/checkbox.js.map +1 -0
- package/esm2015/chips.js +1332 -0
- package/esm2015/chips.js.map +1 -0
- package/esm2015/core.js +2316 -0
- package/esm2015/core.js.map +1 -0
- package/esm2015/datepicker.js +1808 -0
- package/esm2015/datepicker.js.map +1 -0
- package/esm2015/dialog.js +849 -0
- package/esm2015/dialog.js.map +1 -0
- package/esm2015/expansion.js +581 -0
- package/esm2015/expansion.js.map +1 -0
- package/esm2015/form-field.js +522 -0
- package/esm2015/form-field.js.map +1 -0
- package/esm2015/grid-list.js +825 -0
- package/esm2015/grid-list.js.map +1 -0
- package/esm2015/icon.js +733 -0
- package/esm2015/icon.js.map +1 -0
- package/esm2015/input.js +568 -0
- package/esm2015/input.js.map +1 -0
- package/esm2015/list.js +666 -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 +917 -0
- package/esm2015/menu.js.map +1 -0
- package/esm2015/paginator.js +304 -0
- package/esm2015/paginator.js.map +1 -0
- package/esm2015/progress-bar.js +132 -0
- package/esm2015/progress-bar.js.map +1 -0
- package/esm2015/progress-spinner.js +438 -0
- package/esm2015/progress-spinner.js.map +1 -0
- package/esm2015/radio.js +707 -0
- package/esm2015/radio.js.map +1 -0
- package/esm2015/select.js +1378 -0
- package/esm2015/select.js.map +1 -0
- package/esm2015/sidenav.js +666 -0
- package/esm2015/sidenav.js.map +1 -0
- package/esm2015/slide-toggle.js +429 -0
- package/esm2015/slide-toggle.js.map +1 -0
- package/esm2015/slider.js +833 -0
- package/esm2015/slider.js.map +1 -0
- package/esm2015/snack-bar.js +606 -0
- package/esm2015/snack-bar.js.map +1 -0
- package/esm2015/sort.js +387 -0
- package/esm2015/sort.js.map +1 -0
- package/esm2015/stepper.js +330 -0
- package/esm2015/stepper.js.map +1 -0
- package/esm2015/table.js +312 -0
- package/esm2015/table.js.map +1 -0
- package/esm2015/tabs.js +1477 -0
- package/esm2015/tabs.js.map +1 -0
- package/esm2015/toolbar.js +88 -0
- package/esm2015/toolbar.js.map +1 -0
- package/esm2015/tooltip.js +701 -0
- package/esm2015/tooltip.js.map +1 -0
- package/esm5/autocomplete.es5.js +691 -0
- package/esm5/autocomplete.es5.js.map +1 -0
- package/esm5/button-toggle.es5.js +619 -0
- package/esm5/button-toggle.es5.js.map +1 -0
- package/esm5/button.es5.js +341 -0
- package/esm5/button.es5.js.map +1 -0
- package/esm5/card.es5.js +349 -0
- package/esm5/card.es5.js.map +1 -0
- package/esm5/checkbox.es5.js +534 -0
- package/esm5/checkbox.es5.js.map +1 -0
- package/esm5/chips.es5.js +1466 -0
- package/esm5/chips.es5.js.map +1 -0
- package/esm5/core.es5.js +2316 -0
- package/esm5/core.es5.js.map +1 -0
- package/esm5/datepicker.es5.js +1936 -0
- package/esm5/datepicker.es5.js.map +1 -0
- package/esm5/dialog.es5.js +877 -0
- package/esm5/dialog.es5.js.map +1 -0
- package/esm5/expansion.es5.js +608 -0
- package/esm5/expansion.es5.js.map +1 -0
- package/esm5/form-field.es5.js +556 -0
- package/esm5/form-field.es5.js.map +1 -0
- package/esm5/grid-list.es5.js +877 -0
- package/esm5/grid-list.es5.js.map +1 -0
- package/esm5/icon.es5.js +746 -0
- package/esm5/icon.es5.js.map +1 -0
- package/esm5/input.es5.js +606 -0
- package/esm5/input.es5.js.map +1 -0
- package/esm5/list.es5.js +726 -0
- package/esm5/list.es5.js.map +1 -0
- package/esm5/material.es5.js +48 -0
- package/esm5/material.es5.js.map +1 -0
- package/esm5/menu.es5.js +953 -0
- package/esm5/menu.es5.js.map +1 -0
- package/esm5/paginator.es5.js +324 -0
- package/esm5/paginator.es5.js.map +1 -0
- package/esm5/progress-bar.es5.js +142 -0
- package/esm5/progress-bar.es5.js.map +1 -0
- package/esm5/progress-spinner.es5.js +474 -0
- package/esm5/progress-spinner.es5.js.map +1 -0
- package/esm5/radio.es5.js +779 -0
- package/esm5/radio.es5.js.map +1 -0
- package/esm5/select.es5.js +1444 -0
- package/esm5/select.es5.js.map +1 -0
- package/esm5/sidenav.es5.js +719 -0
- package/esm5/sidenav.es5.js.map +1 -0
- package/esm5/slide-toggle.es5.js +451 -0
- package/esm5/slide-toggle.es5.js.map +1 -0
- package/esm5/slider.es5.js +932 -0
- package/esm5/slider.es5.js.map +1 -0
- package/esm5/snack-bar.es5.js +623 -0
- package/esm5/snack-bar.es5.js.map +1 -0
- package/esm5/sort.es5.js +418 -0
- package/esm5/sort.es5.js.map +1 -0
- package/esm5/stepper.es5.js +376 -0
- package/esm5/stepper.es5.js.map +1 -0
- package/esm5/table.es5.js +370 -0
- package/esm5/table.es5.js.map +1 -0
- package/esm5/tabs.es5.js +1576 -0
- package/esm5/tabs.es5.js.map +1 -0
- package/esm5/toolbar.es5.js +94 -0
- package/esm5/toolbar.es5.js.map +1 -0
- package/esm5/tooltip.es5.js +759 -0
- package/esm5/tooltip.es5.js.map +1 -0
- package/expansion/index.d.ts +8 -0
- package/expansion/index.metadata.json +11 -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 +56 -0
- package/expansion/typings/expansion-panel.d.ts +39 -0
- package/expansion/typings/index.d.ts +5 -0
- package/expansion/typings/index.metadata.json +1 -0
- package/expansion/typings/mat-exports.d.ts +20 -0
- package/expansion/typings/public_api.d.ts +13 -0
- package/expansion.d.ts +8 -0
- package/expansion.metadata.json +11 -0
- package/form-field/index.d.ts +8 -0
- package/form-field/index.metadata.json +11 -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 +39 -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 +77 -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/mat-exports.d.ts +23 -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 +17 -0
- package/form-field/typings/suffix.d.ts +3 -0
- package/form-field.d.ts +8 -0
- package/form-field.metadata.json +11 -0
- package/grid-list/index.d.ts +8 -1
- package/grid-list/index.metadata.json +11 -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/mat-exports.d.ts +13 -0
- package/grid-list/typings/public_api.d.ts +11 -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 +11 -0
- package/icon/index.d.ts +8 -1
- package/icon/index.metadata.json +11 -1
- package/icon/package.json +7 -0
- package/icon/typings/icon-module.d.ts +2 -0
- package/icon/typings/icon-registry.d.ts +194 -0
- package/icon/typings/icon.d.ts +76 -0
- package/icon/typings/index.d.ts +4 -0
- package/icon/typings/index.metadata.json +1 -0
- package/icon/typings/mat-exports.d.ts +14 -0
- package/icon/typings/public_api.d.ts +11 -0
- package/icon.d.ts +8 -0
- package/icon.metadata.json +11 -0
- package/input/index.d.ts +8 -1
- package/input/index.metadata.json +11 -1
- package/input/package.json +7 -0
- package/input/typings/autosize.d.ts +45 -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 +78 -0
- package/input/typings/mat-exports.d.ts +13 -0
- package/input/typings/public_api.d.ts +12 -0
- package/input.d.ts +8 -0
- package/input.metadata.json +11 -0
- package/list/index.d.ts +8 -1
- package/list/index.metadata.json +11 -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 +78 -0
- package/list/typings/mat-exports.d.ts +27 -0
- package/list/typings/public_api.d.ts +11 -0
- package/list/typings/selection-list.d.ts +112 -0
- package/list.d.ts +8 -0
- package/list.metadata.json +11 -0
- package/material.d.ts +39 -0
- package/material.metadata.json +102 -0
- package/menu/index.d.ts +8 -1
- package/menu/index.metadata.json +11 -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/mat-exports.d.ts +16 -0
- package/menu/typings/menu-animations.d.ts +27 -0
- package/menu/typings/menu-directive.d.ts +86 -0
- package/menu/typings/menu-errors.d.ts +24 -0
- package/menu/typings/menu-item.d.ts +40 -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 +116 -0
- package/menu/typings/menu.d.ts +12 -0
- package/menu/typings/public_api.d.ts +12 -0
- package/menu.d.ts +8 -0
- package/menu.metadata.json +11 -0
- package/package.json +10 -8
- package/paginator/index.d.ts +8 -0
- package/paginator/index.metadata.json +11 -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/mat-exports.d.ts +13 -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 +11 -0
- package/paginator.d.ts +8 -0
- package/paginator.metadata.json +11 -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 +11 -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/mat-exports.d.ts +11 -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 +10 -0
- package/progress-bar.d.ts +8 -0
- package/progress-bar.metadata.json +11 -0
- package/progress-spinner/index.d.ts +8 -0
- package/progress-spinner/index.metadata.json +11 -0
- 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/mat-exports.d.ts +14 -0
- package/progress-spinner/typings/progress-spinner-module.d.ts +2 -0
- package/progress-spinner/typings/progress-spinner.d.ts +98 -0
- package/progress-spinner/typings/public_api.d.ts +10 -0
- package/progress-spinner.d.ts +8 -0
- package/progress-spinner.metadata.json +11 -0
- package/radio/index.d.ts +8 -1
- package/radio/index.metadata.json +11 -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/mat-exports.d.ts +16 -0
- package/radio/typings/public_api.d.ts +10 -0
- package/radio/typings/radio-module.d.ts +2 -0
- package/radio/typings/radio.d.ts +217 -0
- package/radio.d.ts +8 -0
- package/radio.metadata.json +11 -0
- package/select/index.d.ts +8 -5
- package/select/index.metadata.json +11 -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/mat-exports.d.ts +17 -0
- package/select/typings/public_api.d.ts +11 -0
- package/select/typings/select-animations.d.ts +36 -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 +412 -0
- package/select.d.ts +8 -0
- package/select.metadata.json +11 -0
- package/sidenav/index.d.ts +8 -1
- package/sidenav/index.metadata.json +11 -1
- package/sidenav/package.json +7 -0
- package/sidenav/typings/drawer.d.ts +178 -0
- package/sidenav/typings/index.d.ts +4 -0
- package/sidenav/typings/index.metadata.json +1 -0
- package/sidenav/typings/mat-exports.d.ts +16 -0
- package/sidenav/typings/public_api.d.ts +11 -0
- package/sidenav/typings/sidenav-module.d.ts +2 -0
- package/sidenav/typings/sidenav.d.ts +6 -0
- package/sidenav.d.ts +8 -0
- package/sidenav.metadata.json +11 -0
- package/slide-toggle/index.d.ts +8 -1
- package/slide-toggle/index.metadata.json +11 -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/mat-exports.d.ts +14 -0
- package/slide-toggle/typings/public_api.d.ts +10 -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 +11 -0
- package/slider/index.d.ts +8 -1
- package/slider/index.metadata.json +11 -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/mat-exports.d.ts +14 -0
- package/slider/typings/public_api.d.ts +10 -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 +11 -0
- package/snack-bar/index.d.ts +8 -4
- package/snack-bar/index.metadata.json +11 -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/mat-exports.d.ts +18 -0
- package/snack-bar/typings/public_api.d.ts +14 -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 +61 -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 +11 -0
- package/sort/index.d.ts +8 -0
- package/sort/index.metadata.json +11 -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/mat-exports.d.ts +16 -0
- package/sort/typings/public_api.d.ts +13 -0
- package/sort/typings/sort-direction.d.ts +8 -0
- package/sort/typings/sort-errors.d.ts +13 -0
- package/sort/typings/sort-header-intl.d.ts +17 -0
- package/sort/typings/sort-header.d.ts +44 -0
- package/sort/typings/sort-module.d.ts +2 -0
- package/sort/typings/sort.d.ts +59 -0
- package/sort.d.ts +8 -0
- package/sort.metadata.json +11 -0
- package/stepper/index.d.ts +8 -0
- package/stepper/index.metadata.json +11 -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/mat-exports.d.ts +21 -0
- package/stepper/typings/public_api.d.ts +13 -0
- package/stepper/typings/step-header.d.ts +23 -0
- package/stepper/typings/step-label.d.ts +14 -0
- package/stepper/typings/stepper-button.d.ts +10 -0
- package/stepper/typings/stepper-module.d.ts +2 -0
- package/stepper/typings/stepper.d.ts +27 -0
- package/stepper.d.ts +8 -0
- package/stepper.metadata.json +11 -0
- package/table/index.d.ts +8 -0
- package/table/index.metadata.json +11 -0
- package/table/package.json +7 -0
- package/table/typings/cell.d.ts +44 -0
- package/table/typings/index.d.ts +4 -0
- package/table/typings/index.metadata.json +1 -0
- package/table/typings/mat-exports.d.ts +20 -0
- package/table/typings/public_api.d.ts +12 -0
- package/table/typings/row.d.ts +30 -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 +11 -0
- package/tabs/index.d.ts +8 -1
- package/tabs/index.metadata.json +11 -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/mat-exports.d.ts +31 -0
- package/tabs/typings/public_api.d.ts +17 -0
- package/tabs/typings/tab-body.d.ts +69 -0
- package/tabs/typings/tab-group.d.ts +100 -0
- package/tabs/typings/tab-header.d.ts +156 -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 +77 -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 +11 -0
- package/toolbar/index.d.ts +8 -1
- package/toolbar/index.metadata.json +11 -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/mat-exports.d.ts +13 -0
- package/toolbar/typings/public_api.d.ts +10 -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 +11 -0
- package/tooltip/index.d.ts +8 -1
- package/tooltip/index.metadata.json +11 -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/mat-exports.d.ts +14 -0
- package/tooltip/typings/public_api.d.ts +10 -0
- package/tooltip/typings/tooltip-module.d.ts +2 -0
- package/tooltip/typings/tooltip.d.ts +177 -0
- package/tooltip.d.ts +8 -0
- package/tooltip.metadata.json +11 -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 +55 -0
- package/typings/autocomplete/index.d.ts +4 -0
- package/typings/autocomplete/index.metadata.json +1 -0
- package/typings/autocomplete/mat-exports.d.ts +17 -0
- package/typings/autocomplete/public_api.d.ts +11 -0
- package/typings/button/button-module.d.ts +2 -0
- package/typings/button/button.d.ts +80 -0
- package/typings/button/index.d.ts +4 -0
- package/typings/button/index.metadata.json +1 -0
- package/typings/button/mat-exports.d.ts +18 -0
- package/typings/button/public_api.d.ts +10 -0
- package/typings/button-toggle/button-toggle-module.d.ts +2 -0
- package/typings/button-toggle/button-toggle.d.ts +156 -0
- package/typings/button-toggle/index.d.ts +4 -0
- package/typings/button-toggle/index.metadata.json +1 -0
- package/typings/button-toggle/mat-exports.d.ts +16 -0
- package/typings/button-toggle/public_api.d.ts +10 -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/mat-exports.d.ts +24 -0
- package/typings/card/public_api.d.ts +10 -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 +159 -0
- package/typings/checkbox/index.d.ts +4 -0
- package/typings/checkbox/index.metadata.json +1 -0
- package/typings/checkbox/mat-exports.d.ts +17 -0
- package/typings/checkbox/public_api.d.ts +11 -0
- package/typings/chips/chip-input.d.ts +54 -0
- package/typings/chips/chip-list.d.ts +219 -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/mat-exports.d.ts +21 -0
- package/typings/chips/public_api.d.ts +12 -0
- package/typings/core/a11y/index.d.ts +8 -0
- package/typings/core/animation/animation.d.ts +20 -0
- package/typings/core/bidi/index.d.ts +8 -0
- package/typings/core/common-behaviors/color.d.ts +22 -0
- package/typings/core/common-behaviors/common-module.d.ts +24 -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 +40 -0
- package/typings/core/coordination/unique-selection-dispatcher.d.ts +40 -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 +19 -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/keyboard/keycodes.d.ts +8 -0
- package/typings/core/line/line.d.ts +30 -0
- package/typings/core/mat-exports.d.ts +36 -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 +97 -0
- package/typings/core/overlay/index.d.ts +8 -0
- package/typings/core/placeholder/placeholder-options.d.ts +15 -0
- package/typings/core/platform/features.d.ts +8 -0
- package/typings/core/platform/index.d.ts +10 -0
- package/typings/core/platform/platform.d.ts +8 -0
- package/typings/core/portal/dom-portal-host.d.ts +8 -0
- package/typings/core/portal/portal-directives.d.ts +8 -0
- package/typings/core/portal/portal-injector.d.ts +19 -0
- package/typings/core/portal/portal.d.ts +8 -0
- package/typings/core/public_api.d.ts +34 -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 +64 -0
- package/typings/core/ripple/ripple.d.ts +73 -0
- package/typings/core/rxjs/index.d.ts +9 -0
- package/typings/core/rxjs/rx-chain.d.ts +8 -0
- package/typings/core/rxjs/rx-operators.d.ts +8 -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 +5 -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 +90 -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 +94 -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/mat-exports.d.ts +33 -0
- package/typings/datepicker/month-view.d.ts +65 -0
- package/typings/datepicker/public_api.d.ts +18 -0
- package/typings/datepicker/year-view.d.ts +54 -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 +45 -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/mat-exports.d.ts +26 -0
- package/typings/dialog/public_api.d.ts +14 -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 +56 -0
- package/typings/expansion/expansion-panel.d.ts +39 -0
- package/typings/expansion/index.d.ts +5 -0
- package/typings/expansion/index.metadata.json +1 -0
- package/typings/expansion/mat-exports.d.ts +20 -0
- package/typings/expansion/public_api.d.ts +13 -0
- package/typings/form-field/error.d.ts +4 -0
- package/typings/form-field/form-field-control.d.ts +39 -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 +77 -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/mat-exports.d.ts +23 -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 +17 -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/mat-exports.d.ts +13 -0
- package/typings/grid-list/public_api.d.ts +11 -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 +194 -0
- package/typings/icon/icon.d.ts +76 -0
- package/typings/icon/index.d.ts +4 -0
- package/typings/icon/index.metadata.json +1 -0
- package/typings/icon/mat-exports.d.ts +14 -0
- package/typings/icon/public_api.d.ts +11 -0
- package/typings/index.d.ts +4 -0
- package/typings/index.metadata.json +26 -0
- package/typings/input/autosize.d.ts +45 -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 +78 -0
- package/typings/input/mat-exports.d.ts +13 -0
- package/typings/input/public_api.d.ts +12 -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 +78 -0
- package/typings/list/mat-exports.d.ts +27 -0
- package/typings/list/public_api.d.ts +11 -0
- package/typings/list/selection-list.d.ts +112 -0
- package/typings/menu/index.d.ts +6 -0
- package/typings/menu/index.metadata.json +1 -0
- package/typings/menu/mat-exports.d.ts +16 -0
- package/typings/menu/menu-animations.d.ts +27 -0
- package/typings/menu/menu-directive.d.ts +86 -0
- package/typings/menu/menu-errors.d.ts +24 -0
- package/typings/menu/menu-item.d.ts +40 -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 +116 -0
- package/typings/menu/menu.d.ts +12 -0
- package/typings/menu/public_api.d.ts +12 -0
- package/typings/paginator/index.d.ts +4 -0
- package/typings/paginator/index.metadata.json +1 -0
- package/typings/paginator/mat-exports.d.ts +13 -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 +11 -0
- package/typings/progress-bar/index.d.ts +4 -0
- package/typings/progress-bar/index.metadata.json +1 -0
- package/typings/progress-bar/mat-exports.d.ts +11 -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 +10 -0
- package/typings/progress-spinner/index.d.ts +4 -0
- package/typings/progress-spinner/index.metadata.json +1 -0
- package/typings/progress-spinner/mat-exports.d.ts +14 -0
- package/typings/progress-spinner/progress-spinner-module.d.ts +2 -0
- package/typings/progress-spinner/progress-spinner.d.ts +98 -0
- package/typings/progress-spinner/public_api.d.ts +10 -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/mat-exports.d.ts +16 -0
- package/typings/radio/public_api.d.ts +10 -0
- package/typings/radio/radio-module.d.ts +2 -0
- package/typings/radio/radio.d.ts +217 -0
- package/typings/select/index.d.ts +4 -0
- package/typings/select/index.metadata.json +1 -0
- package/typings/select/mat-exports.d.ts +17 -0
- package/typings/select/public_api.d.ts +11 -0
- package/typings/select/select-animations.d.ts +36 -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 +412 -0
- package/typings/sidenav/drawer.d.ts +178 -0
- package/typings/sidenav/index.d.ts +4 -0
- package/typings/sidenav/index.metadata.json +1 -0
- package/typings/sidenav/mat-exports.d.ts +16 -0
- package/typings/sidenav/public_api.d.ts +11 -0
- package/typings/sidenav/sidenav-module.d.ts +2 -0
- package/typings/sidenav/sidenav.d.ts +6 -0
- package/typings/slide-toggle/index.d.ts +4 -0
- package/typings/slide-toggle/index.metadata.json +1 -0
- package/typings/slide-toggle/mat-exports.d.ts +14 -0
- package/typings/slide-toggle/public_api.d.ts +10 -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/mat-exports.d.ts +14 -0
- package/typings/slider/public_api.d.ts +10 -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/mat-exports.d.ts +18 -0
- package/typings/snack-bar/public_api.d.ts +14 -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 +61 -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/mat-exports.d.ts +16 -0
- package/typings/sort/public_api.d.ts +13 -0
- package/typings/sort/sort-direction.d.ts +8 -0
- package/typings/sort/sort-errors.d.ts +13 -0
- package/typings/sort/sort-header-intl.d.ts +17 -0
- package/typings/sort/sort-header.d.ts +44 -0
- package/typings/sort/sort-module.d.ts +2 -0
- package/typings/sort/sort.d.ts +59 -0
- package/typings/stepper/index.d.ts +4 -0
- package/typings/stepper/index.metadata.json +1 -0
- package/typings/stepper/mat-exports.d.ts +21 -0
- package/typings/stepper/public_api.d.ts +13 -0
- package/typings/stepper/step-header.d.ts +23 -0
- package/typings/stepper/step-label.d.ts +14 -0
- package/typings/stepper/stepper-button.d.ts +10 -0
- package/typings/stepper/stepper-module.d.ts +2 -0
- package/typings/stepper/stepper.d.ts +27 -0
- package/typings/table/cell.d.ts +44 -0
- package/typings/table/index.d.ts +4 -0
- package/typings/table/index.metadata.json +1 -0
- package/typings/table/mat-exports.d.ts +20 -0
- package/typings/table/public_api.d.ts +12 -0
- package/typings/table/row.d.ts +30 -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/mat-exports.d.ts +31 -0
- package/typings/tabs/public_api.d.ts +17 -0
- package/typings/tabs/tab-body.d.ts +69 -0
- package/typings/tabs/tab-group.d.ts +100 -0
- package/typings/tabs/tab-header.d.ts +156 -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 +77 -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/mat-exports.d.ts +13 -0
- package/typings/toolbar/public_api.d.ts +10 -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/mat-exports.d.ts +14 -0
- package/typings/tooltip/public_api.d.ts +10 -0
- package/typings/tooltip/tooltip-module.d.ts +2 -0
- package/typings/tooltip/tooltip.d.ts +177 -0
- package/typings/version.d.ts +10 -0
- package/button/README.md +0 -115
- package/button/_button-base.scss +0 -116
- package/button/_button-theme.scss +0 -85
- package/button/button.css +0 -101
- package/button/button.css.map +0 -1
- package/button/button.d.ts +0 -35
- package/button/button.html +0 -6
- package/button/button.js +0 -196
- package/button/button.js.map +0 -1
- package/button/button.metadata.json +0 -1
- package/button/button.scss +0 -72
- package/button/index.js +0 -3
- package/button/index.js.map +0 -1
- package/button-toggle/README.md +0 -149
- package/button-toggle/_button-toggle-theme.scss +0 -14
- package/button-toggle/button-toggle.css +0 -24
- package/button-toggle/button-toggle.css.map +0 -1
- package/button-toggle/button-toggle.d.ts +0 -110
- package/button-toggle/button-toggle.html +0 -14
- package/button-toggle/button-toggle.js +0 -436
- 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 -34
- package/button-toggle/index.js +0 -3
- package/button-toggle/index.js.map +0 -1
- package/card/README.md +0 -116
- package/card/_card-theme.scss +0 -17
- package/card/card-header.html +0 -5
- package/card/card-title-group.html +0 -5
- package/card/card.css +0 -140
- package/card/card.css.map +0 -1
- package/card/card.d.ts +0 -35
- package/card/card.html +0 -1
- package/card/card.js +0 -187
- package/card/card.js.map +0 -1
- package/card/card.metadata.json +0 -1
- package/card/card.scss +0 -226
- package/card/index.js +0 -3
- package/card/index.js.map +0 -1
- package/checkbox/README.md +0 -79
- package/checkbox/_checkbox-theme.scss +0 -69
- package/checkbox/checkbox.css +0 -241
- package/checkbox/checkbox.css.map +0 -1
- package/checkbox/checkbox.d.ts +0 -127
- package/checkbox/checkbox.html +0 -37
- package/checkbox/checkbox.js +0 -344
- package/checkbox/checkbox.js.map +0 -1
- package/checkbox/checkbox.metadata.json +0 -1
- package/checkbox/checkbox.scss +0 -412
- package/checkbox/index.js +0 -3
- package/checkbox/index.js.map +0 -1
- package/core/README.md +0 -2
- package/core/_core.scss +0 -27
- package/core/a11y/README.md +0 -30
- package/core/a11y/_a11y.scss +0 -13
- package/core/a11y/focus-trap.d.ts +0 -23
- package/core/a11y/focus-trap.js +0 -82
- 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 -10
- package/core/a11y/index.js +0 -37
- package/core/a11y/index.js.map +0 -1
- package/core/a11y/index.metadata.json +0 -1
- package/core/a11y/interactivity-checker.d.ts +0 -31
- package/core/a11y/interactivity-checker.js +0 -122
- package/core/a11y/interactivity-checker.js.map +0 -1
- package/core/a11y/interactivity-checker.metadata.json +0 -1
- package/core/a11y/live-announcer.d.ts +0 -13
- package/core/a11y/live-announcer.js +0 -56
- package/core/a11y/live-announcer.js.map +0 -1
- package/core/a11y/live-announcer.metadata.json +0 -1
- package/core/annotations/field-value.d.ts +0 -16
- package/core/annotations/field-value.js +0 -30
- package/core/annotations/field-value.js.map +0 -1
- package/core/async/promise-completer.d.ts +0 -6
- package/core/async/promise-completer.js +0 -12
- package/core/async/promise-completer.js.map +0 -1
- package/core/coordination/unique-selection-dispatcher.d.ts +0 -17
- package/core/coordination/unique-selection-dispatcher.js +0 -42
- 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 -28
- package/core/core.js +0 -71
- package/core/core.js.map +0 -1
- package/core/core.metadata.json +0 -1
- package/core/errors/error.d.ts +0 -6
- package/core/errors/error.js +0 -19
- package/core/errors/error.js.map +0 -1
- package/core/gestures/MdGestureConfig.d.ts +0 -7
- package/core/gestures/MdGestureConfig.js +0 -84
- package/core/gestures/MdGestureConfig.js.map +0 -1
- package/core/gestures/MdGestureConfig.metadata.json +0 -1
- package/core/index.js +0 -3
- package/core/index.js.map +0 -1
- package/core/keyboard/keycodes.d.ts +0 -6
- package/core/keyboard/keycodes.js +0 -12
- package/core/keyboard/keycodes.js.map +0 -1
- package/core/keyboard/keycodes.metadata.json +0 -1
- package/core/line/line.d.ts +0 -19
- package/core/line/line.js +0 -65
- package/core/line/line.js.map +0 -1
- package/core/line/line.metadata.json +0 -1
- 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-directives.d.ts +0 -36
- package/core/overlay/overlay-directives.js +0 -120
- 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 -28
- package/core/overlay/overlay-ref.js +0 -82
- package/core/overlay/overlay-ref.js.map +0 -1
- package/core/overlay/overlay-state.d.ts +0 -11
- package/core/overlay/overlay-state.js +0 -13
- package/core/overlay/overlay-state.js.map +0 -1
- package/core/overlay/overlay.css +0 -2
- package/core/overlay/overlay.css.map +0 -1
- package/core/overlay/overlay.d.ts +0 -51
- package/core/overlay/overlay.js +0 -93
- package/core/overlay/overlay.js.map +0 -1
- package/core/overlay/overlay.metadata.json +0 -1
- package/core/overlay/overlay.scss +0 -55
- package/core/overlay/position/connected-position-strategy.d.ts +0 -69
- package/core/overlay/position/connected-position-strategy.js +0 -164
- package/core/overlay/position/connected-position-strategy.js.map +0 -1
- package/core/overlay/position/connected-position.d.ts +0 -22
- package/core/overlay/position/connected-position.js +0 -12
- package/core/overlay/position/connected-position.js.map +0 -1
- package/core/overlay/position/global-position-strategy.d.ts +0 -45
- package/core/overlay/position/global-position-strategy.js +0 -102
- package/core/overlay/position/global-position-strategy.js.map +0 -1
- package/core/overlay/position/overlay-position-builder.d.ts +0 -14
- package/core/overlay/position/overlay-position-builder.js +0 -34
- 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 -5
- 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 -7
- package/core/overlay/position/relative-position-strategy.js +0 -12
- package/core/overlay/position/relative-position-strategy.js.map +0 -1
- package/core/overlay/position/viewport-ruler.d.ts +0 -16
- package/core/overlay/position/viewport-ruler.js +0 -71
- package/core/overlay/position/viewport-ruler.js.map +0 -1
- package/core/overlay/position/viewport-ruler.metadata.json +0 -1
- package/core/portal/README.md +0 -72
- package/core/portal/dom-portal-host.d.ts +0 -17
- package/core/portal/dom-portal-host.js +0 -56
- package/core/portal/dom-portal-host.js.map +0 -1
- package/core/portal/portal-directives.d.ts +0 -38
- package/core/portal/portal-directives.js +0 -124
- 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 -29
- package/core/portal/portal-errors.js +0 -66
- package/core/portal/portal-errors.js.map +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/ripple/README.md +0 -27
- package/core/ripple/_ripple.scss +0 -106
- package/core/ripple/ripple-renderer.d.ts +0 -65
- package/core/ripple/ripple-renderer.js +0 -149
- 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 -75
- package/core/ripple/ripple.js +0 -179
- package/core/ripple/ripple.js.map +0 -1
- package/core/ripple/ripple.metadata.json +0 -1
- package/core/rtl/dir.d.ts +0 -17
- package/core/rtl/dir.js +0 -83
- 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/_list-common.scss +0 -49
- package/core/style/_sidenav-common.scss +0 -8
- package/core/style/_variables.scss +0 -55
- 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/theming/_all-theme.scss +0 -46
- package/core/theming/_palette.scss +0 -694
- package/core/theming/_theming.scss +0 -84
- package/core/theming/prebuilt/deeppurple-amber.css +0 -446
- 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 -446
- 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 -446
- 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 -446
- 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.js +0 -3
- package/core.js.map +0 -1
- package/dialog/README.md +0 -0
- package/dialog/_dialog-theme.scss +0 -11
- package/dialog/dialog-config.d.ts +0 -11
- package/dialog/dialog-config.js +0 -12
- package/dialog/dialog-config.js.map +0 -1
- package/dialog/dialog-container.css +0 -7
- package/dialog/dialog-container.css.map +0 -1
- package/dialog/dialog-container.d.ts +0 -29
- package/dialog/dialog-container.html +0 -3
- package/dialog/dialog-container.js +0 -88
- package/dialog/dialog-container.js.map +0 -1
- package/dialog/dialog-container.metadata.json +0 -1
- package/dialog/dialog-container.scss +0 -12
- package/dialog/dialog-errors.d.ts +0 -5
- package/dialog/dialog-errors.js +0 -16
- package/dialog/dialog-errors.js.map +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-ref.d.ts +0 -20
- package/dialog/dialog-ref.js +0 -29
- package/dialog/dialog-ref.js.map +0 -1
- package/dialog/dialog.d.ts +0 -51
- package/dialog/dialog.js +0 -128
- package/dialog/dialog.js.map +0 -1
- package/dialog/dialog.metadata.json +0 -1
- package/dialog/index.js +0 -6
- package/dialog/index.js.map +0 -1
- package/grid-list/README.md +0 -118
- package/grid-list/_grid-list-theme.scss +0 -6
- package/grid-list/grid-list-errors.d.ts +0 -19
- package/grid-list/grid-list-errors.js +0 -38
- package/grid-list/grid-list-errors.js.map +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 -78
- 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 -3
- package/grid-list/grid-list.js +0 -165
- 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 -3
- package/grid-list/grid-tile.d.ts +0 -28
- package/grid-list/grid-tile.html +0 -4
- package/grid-list/grid-tile.js +0 -87
- 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 -51
- package/grid-list/tile-coordinator.js +0 -124
- package/grid-list/tile-coordinator.js.map +0 -1
- package/grid-list/tile-styler.d.ts +0 -88
- package/grid-list/tile-styler.js +0 -190
- package/grid-list/tile-styler.js.map +0 -1
- package/icon/README.md +0 -116
- package/icon/_icon-theme.scss +0 -6
- package/icon/fake-svgs.d.ts +0 -5
- package/icon/fake-svgs.js +0 -29
- package/icon/fake-svgs.js.map +0 -1
- package/icon/icon-registry.d.ts +0 -148
- package/icon/icon-registry.js +0 -375
- package/icon/icon-registry.js.map +0 -1
- package/icon/icon-registry.metadata.json +0 -1
- package/icon/icon.css +0 -8
- package/icon/icon.css.map +0 -1
- package/icon/icon.d.ts +0 -85
- package/icon/icon.js +0 -252
- 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 -23
- package/index.js +0 -25
- package/index.js.map +0 -1
- package/index.metadata.json +0 -1
- package/input/README.md +0 -121
- package/input/_input-theme.scss +0 -64
- package/input/index.js +0 -3
- package/input/index.js.map +0 -1
- package/input/input.css +0 -109
- package/input/input.css.map +0 -1
- package/input/input.d.ts +0 -134
- package/input/input.html +0 -65
- package/input/input.js +0 -471
- package/input/input.js.map +0 -1
- package/input/input.metadata.json +0 -1
- package/input/input.scss +0 -198
- package/list/README.md +0 -167
- 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 -5
- package/list/list.css +0 -139
- package/list/list.css.map +0 -1
- package/list/list.d.ts +0 -24
- package/list/list.js +0 -113
- package/list/list.js.map +0 -1
- package/list/list.metadata.json +0 -1
- package/list/list.scss +0 -168
- package/material.umd.js +0 -9017
- package/material.umd.js.map +0 -1
- package/menu/README.md +0 -164
- package/menu/_menu-theme.scss +0 -25
- package/menu/index.js +0 -3
- package/menu/index.js.map +0 -1
- package/menu/menu-directive.d.ts +0 -54
- package/menu/menu-directive.js +0 -158
- package/menu/menu-directive.js.map +0 -1
- package/menu/menu-directive.metadata.json +0 -1
- package/menu/menu-errors.d.ts +0 -21
- package/menu/menu-errors.js +0 -40
- package/menu/menu-errors.js.map +0 -1
- package/menu/menu-item.d.ts +0 -18
- package/menu/menu-item.js +0 -74
- package/menu/menu-item.js.map +0 -1
- package/menu/menu-item.metadata.json +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 -62
- package/menu/menu-trigger.js +0 -169
- package/menu/menu-trigger.js.map +0 -1
- package/menu/menu-trigger.metadata.json +0 -1
- package/menu/menu.css +0 -41
- package/menu/menu.css.map +0 -1
- package/menu/menu.d.ts +0 -7
- package/menu/menu.html +0 -6
- package/menu/menu.js +0 -39
- package/menu/menu.js.map +0 -1
- package/menu/menu.metadata.json +0 -1
- package/menu/menu.scss +0 -59
- package/module.d.ts +0 -6
- package/module.js +0 -117
- package/module.js.map +0 -1
- package/module.metadata.json +0 -1
- package/progress-bar/README.md +0 -54
- package/progress-bar/_progress-bar-theme.scss +0 -78
- package/progress-bar/index.js +0 -3
- package/progress-bar/index.js.map +0 -1
- package/progress-bar/progress-bar.css +0 -114
- package/progress-bar/progress-bar.css.map +0 -1
- package/progress-bar/progress-bar.d.ts +0 -34
- package/progress-bar/progress-bar.html +0 -5
- package/progress-bar/progress-bar.js +0 -122
- 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 -229
- package/progress-circle/README.md +0 -51
- package/progress-circle/_progress-circle-theme.scss +0 -23
- package/progress-circle/index.d.ts +0 -1
- package/progress-circle/index.js +0 -3
- package/progress-circle/index.js.map +0 -1
- package/progress-circle/index.metadata.json +0 -1
- package/progress-circle/progress-circle.css +0 -43
- package/progress-circle/progress-circle.css.map +0 -1
- package/progress-circle/progress-circle.d.ts +0 -76
- package/progress-circle/progress-circle.html +0 -9
- package/progress-circle/progress-circle.js +0 -315
- package/progress-circle/progress-circle.js.map +0 -1
- package/progress-circle/progress-circle.metadata.json +0 -1
- package/progress-circle/progress-circle.scss +0 -67
- package/radio/README.md +0 -79
- package/radio/_radio-theme.scss +0 -36
- package/radio/index.js +0 -3
- package/radio/index.js.map +0 -1
- package/radio/radio.css +0 -82
- package/radio/radio.css.map +0 -1
- package/radio/radio.d.ts +0 -127
- package/radio/radio.html +0 -27
- package/radio/radio.js +0 -445
- package/radio/radio.js.map +0 -1
- package/radio/radio.metadata.json +0 -1
- package/radio/radio.scss +0 -92
- package/select/index.js +0 -33
- package/select/index.js.map +0 -1
- package/select/select.css +0 -2
- package/select/select.css.map +0 -1
- package/select/select.d.ts +0 -2
- package/select/select.html +0 -1
- package/select/select.js +0 -25
- package/select/select.js.map +0 -1
- package/select/select.metadata.json +0 -1
- package/select/select.scss +0 -0
- package/sidenav/README.md +0 -83
- package/sidenav/_sidenav-theme.scss +0 -37
- package/sidenav/index.js +0 -3
- package/sidenav/index.js.map +0 -1
- package/sidenav/sidenav-transitions.css +0 -10
- package/sidenav/sidenav-transitions.css.map +0 -1
- package/sidenav/sidenav-transitions.scss +0 -14
- package/sidenav/sidenav.css +0 -111
- package/sidenav/sidenav.css.map +0 -1
- package/sidenav/sidenav.d.ts +0 -141
- package/sidenav/sidenav.html +0 -8
- package/sidenav/sidenav.js +0 -479
- package/sidenav/sidenav.js.map +0 -1
- package/sidenav/sidenav.metadata.json +0 -1
- package/sidenav/sidenav.scss +0 -133
- package/slide-toggle/README.md +0 -66
- package/slide-toggle/_slide-toggle-theme.scss +0 -77
- package/slide-toggle/index.js +0 -3
- package/slide-toggle/index.js.map +0 -1
- package/slide-toggle/slide-toggle.css +0 -88
- package/slide-toggle/slide-toggle.css.map +0 -1
- package/slide-toggle/slide-toggle.d.ts +0 -74
- package/slide-toggle/slide-toggle.html +0 -33
- package/slide-toggle/slide-toggle.js +0 -317
- 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 -140
- package/slider/README.md +0 -97
- package/slider/_slider-theme.scss +0 -33
- package/slider/index.js +0 -3
- package/slider/index.js.map +0 -1
- package/slider/slider.css +0 -122
- package/slider/slider.css.map +0 -1
- package/slider/slider.d.ts +0 -155
- package/slider/slider.html +0 -21
- package/slider/slider.js +0 -433
- package/slider/slider.js.map +0 -1
- package/slider/slider.metadata.json +0 -1
- package/slider/slider.scss +0 -186
- package/slider/test-gesture-config.d.ts +0 -21
- package/slider/test-gesture-config.js +0 -59
- package/slider/test-gesture-config.js.map +0 -1
- package/slider/test-gesture-config.metadata.json +0 -1
- package/snack-bar/README.md +0 -38
- package/snack-bar/index.js +0 -6
- package/snack-bar/index.js.map +0 -1
- package/snack-bar/simple-snack-bar.css +0 -27
- 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 -3
- 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 -11
- package/snack-bar/snack-bar-config.js +0 -10
- package/snack-bar/snack-bar-config.js.map +0 -1
- package/snack-bar/snack-bar-container.css +0 -12
- package/snack-bar/snack-bar-container.css.map +0 -1
- package/snack-bar/snack-bar-container.d.ts +0 -15
- package/snack-bar/snack-bar-container.html +0 -1
- package/snack-bar/snack-bar-container.js +0 -53
- 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 -19
- package/snack-bar/snack-bar-errors.d.ts +0 -4
- package/snack-bar/snack-bar-errors.js +0 -15
- package/snack-bar/snack-bar-errors.js.map +0 -1
- package/snack-bar/snack-bar-ref.d.ts +0 -17
- package/snack-bar/snack-bar-ref.js +0 -28
- package/snack-bar/snack-bar-ref.js.map +0 -1
- package/snack-bar/snack-bar.d.ts +0 -41
- package/snack-bar/snack-bar.js +0 -110
- package/snack-bar/snack-bar.js.map +0 -1
- package/snack-bar/snack-bar.metadata.json +0 -1
- package/tabs/README.md +0 -47
- package/tabs/_tabs-theme.scss +0 -23
- package/tabs/index.js +0 -3
- package/tabs/index.js.map +0 -1
- package/tabs/ink-bar.d.ts +0 -24
- package/tabs/ink-bar.js +0 -50
- package/tabs/ink-bar.js.map +0 -1
- package/tabs/ink-bar.metadata.json +0 -1
- package/tabs/tab-content.d.ts +0 -6
- package/tabs/tab-content.js +0 -32
- package/tabs/tab-content.js.map +0 -1
- package/tabs/tab-content.metadata.json +0 -1
- package/tabs/tab-group.css +0 -55
- package/tabs/tab-group.css.map +0 -1
- package/tabs/tab-group.html +0 -27
- package/tabs/tab-group.scss +0 -72
- package/tabs/tab-label-wrapper.d.ts +0 -10
- package/tabs/tab-label-wrapper.js +0 -31
- 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/tabs.d.ts +0 -79
- package/tabs/tabs.js +0 -290
- package/tabs/tabs.js.map +0 -1
- package/tabs/tabs.metadata.json +0 -1
- 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 -19
- package/toolbar/toolbar.css.map +0 -1
- package/toolbar/toolbar.d.ts +0 -17
- package/toolbar/toolbar.html +0 -6
- package/toolbar/toolbar.js +0 -83
- package/toolbar/toolbar.js.map +0 -1
- package/toolbar/toolbar.metadata.json +0 -1
- package/toolbar/toolbar.scss +0 -36
- package/tooltip/README.md +0 -32
- package/tooltip/_tooltip-theme.scss +0 -9
- package/tooltip/index.js +0 -3
- package/tooltip/index.js.map +0 -1
- package/tooltip/tooltip.css +0 -14
- package/tooltip/tooltip.css.map +0 -1
- package/tooltip/tooltip.d.ts +0 -67
- package/tooltip/tooltip.html +0 -0
- package/tooltip/tooltip.js +0 -210
- package/tooltip/tooltip.js.map +0 -1
- package/tooltip/tooltip.metadata.json +0 -1
- package/tooltip/tooltip.scss +0 -21
- package/tsconfig-spec.json +0 -33
- package/tsconfig.json +0 -33
- package/typings.d.ts +0 -1
package/esm2015/core.js
ADDED
|
@@ -0,0 +1,2316 @@
|
|
|
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
|
+
import { A11yModule, CdkMonitorFocus, FOCUS_MONITOR_PROVIDER, FocusMonitor } from '@angular/cdk/a11y';
|
|
9
|
+
import { BidiModule, DIRECTIONALITY_PROVIDER, DIR_DOCUMENT, Dir, Directionality } from '@angular/cdk/bidi';
|
|
10
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive, ElementRef, EventEmitter, Inject, Injectable, InjectionToken, Input, LOCALE_ID, NgModule, NgZone, Optional, Output, SkipSelf, ViewEncapsulation, isDevMode } from '@angular/core';
|
|
11
|
+
import { DOCUMENT, HammerGestureConfig } from '@angular/platform-browser';
|
|
12
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
13
|
+
import { Subject } from 'rxjs/Subject';
|
|
14
|
+
import { A, BACKSPACE, DELETE, DOWN_ARROW, END, ENTER, ESCAPE, HOME, LEFT_ARROW, PAGE_DOWN, PAGE_UP, RIGHT_ARROW, SPACE, TAB, UP_ARROW, Z } from '@angular/cdk/keycodes';
|
|
15
|
+
import { CommonModule } from '@angular/common';
|
|
16
|
+
import { ScrollDispatchModule, VIEWPORT_RULER_PROVIDER, ViewportRuler } from '@angular/cdk/scrolling';
|
|
17
|
+
import { Platform, PlatformModule, getSupportedInputTypes } from '@angular/cdk/platform';
|
|
18
|
+
import { BlockScrollStrategy, CloseScrollStrategy, ConnectedOverlayDirective, ConnectedOverlayPositionChange, ConnectedPositionStrategy, ConnectionPositionPair, FullscreenOverlayContainer, GlobalPositionStrategy, NoopScrollStrategy, OVERLAY_PROVIDERS, Overlay, OverlayConfig, OverlayContainer, OverlayModule, OverlayOrigin, OverlayRef, RepositionScrollStrategy, ScrollDispatcher, ScrollStrategyOptions, Scrollable, ScrollingVisibility, VIEWPORT_RULER_PROVIDER as VIEWPORT_RULER_PROVIDER$1, ViewportRuler as ViewportRuler$1 } from '@angular/cdk/overlay';
|
|
19
|
+
import { BasePortalHost, ComponentPortal, DomPortalHost, Portal, PortalHostDirective, PortalModule, TemplatePortal, TemplatePortalDirective } from '@angular/cdk/portal';
|
|
20
|
+
import { AuditTimeBrand, CatchBrand, DebounceTimeBrand, DoBrand, FilterBrand, FinallyBrand, FirstBrand, MapBrand, RxChain, ShareBrand, StartWithBrand, SwitchMapBrand, TakeUntilBrand, auditTime, catchOperator, debounceTime, doOperator, filter, finallyOperator, first, map, share, startWith, switchMap, takeUntil } from '@angular/cdk/rxjs';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* \@docs-private
|
|
24
|
+
*/
|
|
25
|
+
class AnimationCurves {
|
|
26
|
+
}
|
|
27
|
+
AnimationCurves.STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)';
|
|
28
|
+
AnimationCurves.DECELERATION_CURVE = 'cubic-bezier(0.0,0.0,0.2,1)';
|
|
29
|
+
AnimationCurves.ACCELERATION_CURVE = 'cubic-bezier(0.4,0.0,1,1)';
|
|
30
|
+
AnimationCurves.SHARP_CURVE = 'cubic-bezier(0.4,0.0,0.6,1)';
|
|
31
|
+
/**
|
|
32
|
+
* \@docs-private
|
|
33
|
+
*/
|
|
34
|
+
class AnimationDurations {
|
|
35
|
+
}
|
|
36
|
+
AnimationDurations.COMPLEX = '375ms';
|
|
37
|
+
AnimationDurations.ENTERING = '225ms';
|
|
38
|
+
AnimationDurations.EXITING = '195ms';
|
|
39
|
+
|
|
40
|
+
const MATERIAL_COMPATIBILITY_MODE = new InjectionToken('md-compatibility-mode');
|
|
41
|
+
/**
|
|
42
|
+
* Returns an exception to be thrown if the consumer has used
|
|
43
|
+
* an invalid Material prefix on a component.
|
|
44
|
+
* \@docs-private
|
|
45
|
+
* @param {?} prefix
|
|
46
|
+
* @param {?} nodeName
|
|
47
|
+
* @return {?}
|
|
48
|
+
*/
|
|
49
|
+
function getMdCompatibilityInvalidPrefixError(prefix, nodeName) {
|
|
50
|
+
return Error(`The "${prefix}-" prefix cannot be used in ng-material v1 compatibility mode. ` +
|
|
51
|
+
`It was used on an "${nodeName.toLowerCase()}" element.`);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Selector that matches all elements that may have style collisions with AngularJS Material.
|
|
55
|
+
*/
|
|
56
|
+
const MAT_ELEMENTS_SELECTOR = `
|
|
57
|
+
[mat-button],
|
|
58
|
+
[mat-fab],
|
|
59
|
+
[mat-icon-button],
|
|
60
|
+
[mat-mini-fab],
|
|
61
|
+
[mat-raised-button],
|
|
62
|
+
[matCardSubtitle],
|
|
63
|
+
[matCardTitle],
|
|
64
|
+
[matCellDef],
|
|
65
|
+
[matColumnDef],
|
|
66
|
+
[matDialogActions],
|
|
67
|
+
[matDialogClose],
|
|
68
|
+
[matDialogContent],
|
|
69
|
+
[matDialogTitle],
|
|
70
|
+
[matHeaderCellDef],
|
|
71
|
+
[matHeaderRowDef],
|
|
72
|
+
[matLine],
|
|
73
|
+
[matRowDef],
|
|
74
|
+
[matStepLabel],
|
|
75
|
+
[matStepperNext],
|
|
76
|
+
[matStepperPrevious],
|
|
77
|
+
[matTabLabel],
|
|
78
|
+
[matTabLink],
|
|
79
|
+
[matTabNav],
|
|
80
|
+
[matTooltip],
|
|
81
|
+
[matInput],
|
|
82
|
+
[matPrefix],
|
|
83
|
+
[matSuffix],
|
|
84
|
+
mat-autocomplete,
|
|
85
|
+
mat-button-toggle,
|
|
86
|
+
mat-button-toggle,
|
|
87
|
+
mat-button-toggle-group,
|
|
88
|
+
mat-card,
|
|
89
|
+
mat-card-actions,
|
|
90
|
+
mat-card-content,
|
|
91
|
+
mat-card-footer,
|
|
92
|
+
mat-card-header,
|
|
93
|
+
mat-card-subtitle,
|
|
94
|
+
mat-card-title,
|
|
95
|
+
mat-card-title-group,
|
|
96
|
+
mat-cell,
|
|
97
|
+
mat-checkbox,
|
|
98
|
+
mat-chip,
|
|
99
|
+
mat-dialog-actions,
|
|
100
|
+
mat-dialog-container,
|
|
101
|
+
mat-dialog-content,
|
|
102
|
+
mat-divider,
|
|
103
|
+
mat-error,
|
|
104
|
+
mat-grid-list,
|
|
105
|
+
mat-grid-tile,
|
|
106
|
+
mat-grid-tile-footer,
|
|
107
|
+
mat-grid-tile-header,
|
|
108
|
+
mat-header-cell,
|
|
109
|
+
mat-header-row,
|
|
110
|
+
mat-hint,
|
|
111
|
+
mat-horizontal-stepper,
|
|
112
|
+
mat-icon,
|
|
113
|
+
mat-input-container,
|
|
114
|
+
mat-form-field,
|
|
115
|
+
mat-list,
|
|
116
|
+
mat-list-item,
|
|
117
|
+
mat-menu,
|
|
118
|
+
mat-nav-list,
|
|
119
|
+
mat-option,
|
|
120
|
+
mat-placeholder,
|
|
121
|
+
mat-progress-bar,
|
|
122
|
+
mat-pseudo-checkbox,
|
|
123
|
+
mat-radio-button,
|
|
124
|
+
mat-radio-group,
|
|
125
|
+
mat-row,
|
|
126
|
+
mat-select,
|
|
127
|
+
mat-sidenav,
|
|
128
|
+
mat-sidenav-container,
|
|
129
|
+
mat-slider,
|
|
130
|
+
mat-spinner,
|
|
131
|
+
mat-step,
|
|
132
|
+
mat-tab,
|
|
133
|
+
mat-table,
|
|
134
|
+
mat-tab-group,
|
|
135
|
+
mat-toolbar,
|
|
136
|
+
mat-vertical-stepper`;
|
|
137
|
+
/**
|
|
138
|
+
* Selector that matches all elements that may have style collisions with AngularJS Material.
|
|
139
|
+
*/
|
|
140
|
+
const MD_ELEMENTS_SELECTOR = `
|
|
141
|
+
[md-button],
|
|
142
|
+
[md-fab],
|
|
143
|
+
[md-icon-button],
|
|
144
|
+
[md-mini-fab],
|
|
145
|
+
[md-raised-button],
|
|
146
|
+
[mdCardSubtitle],
|
|
147
|
+
[mdCardTitle],
|
|
148
|
+
[mdCellDef],
|
|
149
|
+
[mdColumnDef],
|
|
150
|
+
[mdDialogActions],
|
|
151
|
+
[mdDialogClose],
|
|
152
|
+
[mdDialogContent],
|
|
153
|
+
[mdDialogTitle],
|
|
154
|
+
[mdHeaderCellDef],
|
|
155
|
+
[mdHeaderRowDef],
|
|
156
|
+
[mdLine],
|
|
157
|
+
[mdRowDef],
|
|
158
|
+
[mdStepLabel],
|
|
159
|
+
[mdStepperNext],
|
|
160
|
+
[mdStepperPrevious],
|
|
161
|
+
[mdTabLabel],
|
|
162
|
+
[mdTabLink],
|
|
163
|
+
[mdTabNav],
|
|
164
|
+
[mdTooltip],
|
|
165
|
+
[mdInput],
|
|
166
|
+
[mdPrefix],
|
|
167
|
+
[mdSuffix],
|
|
168
|
+
md-autocomplete,
|
|
169
|
+
md-button-toggle,
|
|
170
|
+
md-button-toggle,
|
|
171
|
+
md-button-toggle-group,
|
|
172
|
+
md-card,
|
|
173
|
+
md-card-actions,
|
|
174
|
+
md-card-content,
|
|
175
|
+
md-card-footer,
|
|
176
|
+
md-card-header,
|
|
177
|
+
md-card-subtitle,
|
|
178
|
+
md-card-title,
|
|
179
|
+
md-card-title-group,
|
|
180
|
+
md-cell,
|
|
181
|
+
md-checkbox,
|
|
182
|
+
md-chip,
|
|
183
|
+
md-dialog-actions,
|
|
184
|
+
md-dialog-container,
|
|
185
|
+
md-dialog-content,
|
|
186
|
+
md-divider,
|
|
187
|
+
md-error,
|
|
188
|
+
md-grid-list,
|
|
189
|
+
md-grid-tile,
|
|
190
|
+
md-grid-tile-footer,
|
|
191
|
+
md-grid-tile-header,
|
|
192
|
+
md-header-cell,
|
|
193
|
+
md-header-row,
|
|
194
|
+
md-hint,
|
|
195
|
+
md-horizontal-stepper,
|
|
196
|
+
md-icon,
|
|
197
|
+
md-input-container,
|
|
198
|
+
md-form-field,
|
|
199
|
+
md-list,
|
|
200
|
+
md-list-item,
|
|
201
|
+
md-menu,
|
|
202
|
+
md-nav-list,
|
|
203
|
+
md-option,
|
|
204
|
+
md-placeholder,
|
|
205
|
+
md-progress-bar,
|
|
206
|
+
md-pseudo-checkbox,
|
|
207
|
+
md-radio-button,
|
|
208
|
+
md-radio-group,
|
|
209
|
+
md-row,
|
|
210
|
+
md-select,
|
|
211
|
+
md-sidenav,
|
|
212
|
+
md-sidenav-container,
|
|
213
|
+
md-slider,
|
|
214
|
+
md-spinner,
|
|
215
|
+
md-step,
|
|
216
|
+
md-tab,
|
|
217
|
+
md-table,
|
|
218
|
+
md-tab-group,
|
|
219
|
+
md-toolbar,
|
|
220
|
+
md-vertical-stepper`;
|
|
221
|
+
/**
|
|
222
|
+
* Directive that enforces that the `mat-` prefix cannot be used.
|
|
223
|
+
*/
|
|
224
|
+
class MatPrefixRejector {
|
|
225
|
+
/**
|
|
226
|
+
* @param {?} isCompatibilityMode
|
|
227
|
+
* @param {?} elementRef
|
|
228
|
+
*/
|
|
229
|
+
constructor(isCompatibilityMode, elementRef) {
|
|
230
|
+
if (!isCompatibilityMode) {
|
|
231
|
+
throw getMdCompatibilityInvalidPrefixError('mat', elementRef.nativeElement.nodeName);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
MatPrefixRejector.decorators = [
|
|
236
|
+
{ type: Directive, args: [{ selector: MAT_ELEMENTS_SELECTOR },] },
|
|
237
|
+
];
|
|
238
|
+
/**
|
|
239
|
+
* @nocollapse
|
|
240
|
+
*/
|
|
241
|
+
MatPrefixRejector.ctorParameters = () => [
|
|
242
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MATERIAL_COMPATIBILITY_MODE,] },] },
|
|
243
|
+
{ type: ElementRef, },
|
|
244
|
+
];
|
|
245
|
+
/**
|
|
246
|
+
* Directive that enforces that the `md-` prefix cannot be used.
|
|
247
|
+
*/
|
|
248
|
+
class MdPrefixRejector {
|
|
249
|
+
/**
|
|
250
|
+
* @param {?} isCompatibilityMode
|
|
251
|
+
* @param {?} elementRef
|
|
252
|
+
*/
|
|
253
|
+
constructor(isCompatibilityMode, elementRef) {
|
|
254
|
+
if (isCompatibilityMode) {
|
|
255
|
+
throw getMdCompatibilityInvalidPrefixError('md', elementRef.nativeElement.nodeName);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
MdPrefixRejector.decorators = [
|
|
260
|
+
{ type: Directive, args: [{ selector: MD_ELEMENTS_SELECTOR },] },
|
|
261
|
+
];
|
|
262
|
+
/**
|
|
263
|
+
* @nocollapse
|
|
264
|
+
*/
|
|
265
|
+
MdPrefixRejector.ctorParameters = () => [
|
|
266
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MATERIAL_COMPATIBILITY_MODE,] },] },
|
|
267
|
+
{ type: ElementRef, },
|
|
268
|
+
];
|
|
269
|
+
/**
|
|
270
|
+
* Module that enforces the default compatibility mode settings. When this module is loaded
|
|
271
|
+
* without NoConflictStyleCompatibilityMode also being imported, it will throw an error if
|
|
272
|
+
* there are any uses of the `mat-` prefix.
|
|
273
|
+
*/
|
|
274
|
+
class CompatibilityModule {
|
|
275
|
+
}
|
|
276
|
+
CompatibilityModule.decorators = [
|
|
277
|
+
{ type: NgModule, args: [{
|
|
278
|
+
declarations: [MatPrefixRejector, MdPrefixRejector],
|
|
279
|
+
exports: [MatPrefixRejector, MdPrefixRejector],
|
|
280
|
+
},] },
|
|
281
|
+
];
|
|
282
|
+
/**
|
|
283
|
+
* @nocollapse
|
|
284
|
+
*/
|
|
285
|
+
CompatibilityModule.ctorParameters = () => [];
|
|
286
|
+
/**
|
|
287
|
+
* Module that enforces "no-conflict" compatibility mode settings. When this module is loaded,
|
|
288
|
+
* it will throw an error if there are any uses of the `md-` prefix.
|
|
289
|
+
*/
|
|
290
|
+
class NoConflictStyleCompatibilityMode {
|
|
291
|
+
}
|
|
292
|
+
NoConflictStyleCompatibilityMode.decorators = [
|
|
293
|
+
{ type: NgModule, args: [{
|
|
294
|
+
providers: [{
|
|
295
|
+
provide: MATERIAL_COMPATIBILITY_MODE, useValue: true,
|
|
296
|
+
}],
|
|
297
|
+
},] },
|
|
298
|
+
];
|
|
299
|
+
/**
|
|
300
|
+
* @nocollapse
|
|
301
|
+
*/
|
|
302
|
+
NoConflictStyleCompatibilityMode.ctorParameters = () => [];
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Injection token that configures whether the Material sanity checks are enabled.
|
|
306
|
+
*/
|
|
307
|
+
const MATERIAL_SANITY_CHECKS = new InjectionToken('md-sanity-checks');
|
|
308
|
+
/**
|
|
309
|
+
* Module that captures anything that should be loaded and/or run for *all* Angular Material
|
|
310
|
+
* components. This includes Bidi, compatibility mode, etc.
|
|
311
|
+
*
|
|
312
|
+
* This module should be imported to each top-level component module (e.g., MdTabsModule).
|
|
313
|
+
*/
|
|
314
|
+
class MdCommonModule {
|
|
315
|
+
/**
|
|
316
|
+
* @param {?} _document
|
|
317
|
+
* @param {?} _sanityChecksEnabled
|
|
318
|
+
*/
|
|
319
|
+
constructor(_document, _sanityChecksEnabled) {
|
|
320
|
+
this._document = _document;
|
|
321
|
+
/**
|
|
322
|
+
* Whether we've done the global sanity checks (e.g. a theme is loaded, there is a doctype).
|
|
323
|
+
*/
|
|
324
|
+
this._hasDoneGlobalChecks = false;
|
|
325
|
+
if (_sanityChecksEnabled && !this._hasDoneGlobalChecks && _document && isDevMode()) {
|
|
326
|
+
this._checkDoctype();
|
|
327
|
+
this._checkTheme();
|
|
328
|
+
this._hasDoneGlobalChecks = true;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* @return {?}
|
|
333
|
+
*/
|
|
334
|
+
_checkDoctype() {
|
|
335
|
+
if (!this._document.doctype) {
|
|
336
|
+
console.warn('Current document does not have a doctype. This may cause ' +
|
|
337
|
+
'some Angular Material components not to behave as expected.');
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* @return {?}
|
|
342
|
+
*/
|
|
343
|
+
_checkTheme() {
|
|
344
|
+
if (typeof getComputedStyle === 'function') {
|
|
345
|
+
const /** @type {?} */ testElement = this._document.createElement('div');
|
|
346
|
+
testElement.classList.add('mat-theme-loaded-marker');
|
|
347
|
+
this._document.body.appendChild(testElement);
|
|
348
|
+
if (getComputedStyle(testElement).display !== 'none') {
|
|
349
|
+
console.warn('Could not find Angular Material core theme. Most Material ' +
|
|
350
|
+
'components may not work as expected. For more info refer ' +
|
|
351
|
+
'to the theming guide: https://material.angular.io/guide/theming');
|
|
352
|
+
}
|
|
353
|
+
this._document.body.removeChild(testElement);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
MdCommonModule.decorators = [
|
|
358
|
+
{ type: NgModule, args: [{
|
|
359
|
+
imports: [CompatibilityModule, BidiModule],
|
|
360
|
+
exports: [CompatibilityModule, BidiModule],
|
|
361
|
+
providers: [{
|
|
362
|
+
provide: MATERIAL_SANITY_CHECKS, useValue: true,
|
|
363
|
+
}],
|
|
364
|
+
},] },
|
|
365
|
+
];
|
|
366
|
+
/**
|
|
367
|
+
* @nocollapse
|
|
368
|
+
*/
|
|
369
|
+
MdCommonModule.ctorParameters = () => [
|
|
370
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] },] },
|
|
371
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MATERIAL_SANITY_CHECKS,] },] },
|
|
372
|
+
];
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Mixin to augment a directive with a `disabled` property.
|
|
376
|
+
* @template T
|
|
377
|
+
* @param {?} base
|
|
378
|
+
* @return {?}
|
|
379
|
+
*/
|
|
380
|
+
function mixinDisabled(base) {
|
|
381
|
+
return class extends base {
|
|
382
|
+
/**
|
|
383
|
+
* @param {...?} args
|
|
384
|
+
*/
|
|
385
|
+
constructor(...args) {
|
|
386
|
+
super(...args);
|
|
387
|
+
this._disabled = false;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* @return {?}
|
|
391
|
+
*/
|
|
392
|
+
get disabled() { return this._disabled; }
|
|
393
|
+
/**
|
|
394
|
+
* @param {?} value
|
|
395
|
+
* @return {?}
|
|
396
|
+
*/
|
|
397
|
+
set disabled(value) { this._disabled = coerceBooleanProperty(value); }
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Mixin to augment a directive with a `color` property.
|
|
403
|
+
* @template T
|
|
404
|
+
* @param {?} base
|
|
405
|
+
* @param {?=} defaultColor
|
|
406
|
+
* @return {?}
|
|
407
|
+
*/
|
|
408
|
+
function mixinColor(base, defaultColor) {
|
|
409
|
+
return class extends base {
|
|
410
|
+
/**
|
|
411
|
+
* @return {?}
|
|
412
|
+
*/
|
|
413
|
+
get color() { return this._color; }
|
|
414
|
+
/**
|
|
415
|
+
* @param {?} value
|
|
416
|
+
* @return {?}
|
|
417
|
+
*/
|
|
418
|
+
set color(value) {
|
|
419
|
+
const /** @type {?} */ colorPalette = value || defaultColor;
|
|
420
|
+
if (colorPalette !== this._color) {
|
|
421
|
+
if (this._color) {
|
|
422
|
+
this._renderer.removeClass(this._elementRef.nativeElement, `mat-${this._color}`);
|
|
423
|
+
}
|
|
424
|
+
if (colorPalette) {
|
|
425
|
+
this._renderer.addClass(this._elementRef.nativeElement, `mat-${colorPalette}`);
|
|
426
|
+
}
|
|
427
|
+
this._color = colorPalette;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* @param {...?} args
|
|
432
|
+
*/
|
|
433
|
+
constructor(...args) {
|
|
434
|
+
super(...args);
|
|
435
|
+
// Set the default color that can be specified from the mixin.
|
|
436
|
+
this.color = defaultColor;
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Mixin to augment a directive with a `disableRipple` property.
|
|
443
|
+
* @template T
|
|
444
|
+
* @param {?} base
|
|
445
|
+
* @return {?}
|
|
446
|
+
*/
|
|
447
|
+
function mixinDisableRipple(base) {
|
|
448
|
+
return class extends base {
|
|
449
|
+
/**
|
|
450
|
+
* @param {...?} args
|
|
451
|
+
*/
|
|
452
|
+
constructor(...args) {
|
|
453
|
+
super(...args);
|
|
454
|
+
this._disableRipple = false;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Whether the ripple effect is disabled or not.
|
|
458
|
+
* @return {?}
|
|
459
|
+
*/
|
|
460
|
+
get disableRipple() { return this._disableRipple; }
|
|
461
|
+
/**
|
|
462
|
+
* @param {?} value
|
|
463
|
+
* @return {?}
|
|
464
|
+
*/
|
|
465
|
+
set disableRipple(value) { this._disableRipple = coerceBooleanProperty(value); }
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Mixin to augment a directive with a `tabIndex` property.
|
|
471
|
+
* @template T
|
|
472
|
+
* @param {?} base
|
|
473
|
+
* @param {?=} defaultTabIndex
|
|
474
|
+
* @return {?}
|
|
475
|
+
*/
|
|
476
|
+
function mixinTabIndex(base, defaultTabIndex = 0) {
|
|
477
|
+
return class extends base {
|
|
478
|
+
/**
|
|
479
|
+
* @param {...?} args
|
|
480
|
+
*/
|
|
481
|
+
constructor(...args) {
|
|
482
|
+
super(...args);
|
|
483
|
+
this._tabIndex = defaultTabIndex;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* @return {?}
|
|
487
|
+
*/
|
|
488
|
+
get tabIndex() { return this.disabled ? -1 : this._tabIndex; }
|
|
489
|
+
/**
|
|
490
|
+
* @param {?} value
|
|
491
|
+
* @return {?}
|
|
492
|
+
*/
|
|
493
|
+
set tabIndex(value) {
|
|
494
|
+
// If the specified tabIndex value is null or undefined, fall back to the default value.
|
|
495
|
+
this._tabIndex = value != null ? value : defaultTabIndex;
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Class to coordinate unique selection based on name.
|
|
502
|
+
* Intended to be consumed as an Angular service.
|
|
503
|
+
* This service is needed because native radio change events are only fired on the item currently
|
|
504
|
+
* being selected, and we still need to uncheck the previous selection.
|
|
505
|
+
*
|
|
506
|
+
* This service does not *store* any IDs and names because they may change at any time, so it is
|
|
507
|
+
* less error-prone if they are simply passed through when the events occur.
|
|
508
|
+
*/
|
|
509
|
+
class UniqueSelectionDispatcher {
|
|
510
|
+
constructor() {
|
|
511
|
+
this._listeners = [];
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Notify other items that selection for the given name has been set.
|
|
515
|
+
* @param {?} id ID of the item.
|
|
516
|
+
* @param {?} name Name of the item.
|
|
517
|
+
* @return {?}
|
|
518
|
+
*/
|
|
519
|
+
notify(id, name) {
|
|
520
|
+
for (let /** @type {?} */ listener of this._listeners) {
|
|
521
|
+
listener(id, name);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Listen for future changes to item selection.
|
|
526
|
+
* @param {?} listener
|
|
527
|
+
* @return {?} Function used to deregister listener
|
|
528
|
+
*
|
|
529
|
+
*/
|
|
530
|
+
listen(listener) {
|
|
531
|
+
this._listeners.push(listener);
|
|
532
|
+
return () => {
|
|
533
|
+
this._listeners = this._listeners.filter((registered) => {
|
|
534
|
+
return listener !== registered;
|
|
535
|
+
});
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
UniqueSelectionDispatcher.decorators = [
|
|
540
|
+
{ type: Injectable },
|
|
541
|
+
];
|
|
542
|
+
/**
|
|
543
|
+
* @nocollapse
|
|
544
|
+
*/
|
|
545
|
+
UniqueSelectionDispatcher.ctorParameters = () => [];
|
|
546
|
+
/**
|
|
547
|
+
* \@docs-private
|
|
548
|
+
* @param {?} parentDispatcher
|
|
549
|
+
* @return {?}
|
|
550
|
+
*/
|
|
551
|
+
function UNIQUE_SELECTION_DISPATCHER_PROVIDER_FACTORY(parentDispatcher) {
|
|
552
|
+
return parentDispatcher || new UniqueSelectionDispatcher();
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* \@docs-private
|
|
556
|
+
*/
|
|
557
|
+
const UNIQUE_SELECTION_DISPATCHER_PROVIDER = {
|
|
558
|
+
// If there is already a dispatcher available, use that. Otherwise, provide a new one.
|
|
559
|
+
provide: UniqueSelectionDispatcher,
|
|
560
|
+
deps: [[new Optional(), new SkipSelf(), UniqueSelectionDispatcher]],
|
|
561
|
+
useFactory: UNIQUE_SELECTION_DISPATCHER_PROVIDER_FACTORY
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* InjectionToken for datepicker that can be used to override default locale code.
|
|
566
|
+
*/
|
|
567
|
+
const MAT_DATE_LOCALE = new InjectionToken('MAT_DATE_LOCALE');
|
|
568
|
+
/**
|
|
569
|
+
* Provider for MAT_DATE_LOCALE injection token.
|
|
570
|
+
*/
|
|
571
|
+
const MAT_DATE_LOCALE_PROVIDER = { provide: MAT_DATE_LOCALE, useExisting: LOCALE_ID };
|
|
572
|
+
/**
|
|
573
|
+
* Adapts type `D` to be usable as a date by cdk-based components that work with dates.
|
|
574
|
+
* @abstract
|
|
575
|
+
*/
|
|
576
|
+
class DateAdapter {
|
|
577
|
+
constructor() {
|
|
578
|
+
this._localeChanges = new Subject();
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* A stream that emits when the locale changes.
|
|
582
|
+
* @return {?}
|
|
583
|
+
*/
|
|
584
|
+
get localeChanges() { return this._localeChanges; }
|
|
585
|
+
/**
|
|
586
|
+
* Gets the year component of the given date.
|
|
587
|
+
* @abstract
|
|
588
|
+
* @param {?} date The date to extract the year from.
|
|
589
|
+
* @return {?} The year component.
|
|
590
|
+
*/
|
|
591
|
+
getYear(date) { }
|
|
592
|
+
/**
|
|
593
|
+
* Gets the month component of the given date.
|
|
594
|
+
* @abstract
|
|
595
|
+
* @param {?} date The date to extract the month from.
|
|
596
|
+
* @return {?} The month component (0-indexed, 0 = January).
|
|
597
|
+
*/
|
|
598
|
+
getMonth(date) { }
|
|
599
|
+
/**
|
|
600
|
+
* Gets the date of the month component of the given date.
|
|
601
|
+
* @abstract
|
|
602
|
+
* @param {?} date The date to extract the date of the month from.
|
|
603
|
+
* @return {?} The month component (1-indexed, 1 = first of month).
|
|
604
|
+
*/
|
|
605
|
+
getDate(date) { }
|
|
606
|
+
/**
|
|
607
|
+
* Gets the day of the week component of the given date.
|
|
608
|
+
* @abstract
|
|
609
|
+
* @param {?} date The date to extract the day of the week from.
|
|
610
|
+
* @return {?} The month component (0-indexed, 0 = Sunday).
|
|
611
|
+
*/
|
|
612
|
+
getDayOfWeek(date) { }
|
|
613
|
+
/**
|
|
614
|
+
* Gets a list of names for the months.
|
|
615
|
+
* @abstract
|
|
616
|
+
* @param {?} style The naming style (e.g. long = 'January', short = 'Jan', narrow = 'J').
|
|
617
|
+
* @return {?} An ordered list of all month names, starting with January.
|
|
618
|
+
*/
|
|
619
|
+
getMonthNames(style) { }
|
|
620
|
+
/**
|
|
621
|
+
* Gets a list of names for the dates of the month.
|
|
622
|
+
* @abstract
|
|
623
|
+
* @return {?} An ordered list of all date of the month names, starting with '1'.
|
|
624
|
+
*/
|
|
625
|
+
getDateNames() { }
|
|
626
|
+
/**
|
|
627
|
+
* Gets a list of names for the days of the week.
|
|
628
|
+
* @abstract
|
|
629
|
+
* @param {?} style The naming style (e.g. long = 'Sunday', short = 'Sun', narrow = 'S').
|
|
630
|
+
* @return {?} An ordered list of all weekday names, starting with Sunday.
|
|
631
|
+
*/
|
|
632
|
+
getDayOfWeekNames(style) { }
|
|
633
|
+
/**
|
|
634
|
+
* Gets the name for the year of the given date.
|
|
635
|
+
* @abstract
|
|
636
|
+
* @param {?} date The date to get the year name for.
|
|
637
|
+
* @return {?} The name of the given year (e.g. '2017').
|
|
638
|
+
*/
|
|
639
|
+
getYearName(date) { }
|
|
640
|
+
/**
|
|
641
|
+
* Gets the first day of the week.
|
|
642
|
+
* @abstract
|
|
643
|
+
* @return {?} The first day of the week (0-indexed, 0 = Sunday).
|
|
644
|
+
*/
|
|
645
|
+
getFirstDayOfWeek() { }
|
|
646
|
+
/**
|
|
647
|
+
* Gets the number of days in the month of the given date.
|
|
648
|
+
* @abstract
|
|
649
|
+
* @param {?} date The date whose month should be checked.
|
|
650
|
+
* @return {?} The number of days in the month of the given date.
|
|
651
|
+
*/
|
|
652
|
+
getNumDaysInMonth(date) { }
|
|
653
|
+
/**
|
|
654
|
+
* Clones the given date.
|
|
655
|
+
* @abstract
|
|
656
|
+
* @param {?} date The date to clone
|
|
657
|
+
* @return {?} A new date equal to the given date.
|
|
658
|
+
*/
|
|
659
|
+
clone(date) { }
|
|
660
|
+
/**
|
|
661
|
+
* Creates a date with the given year, month, and date. Does not allow over/under-flow of the
|
|
662
|
+
* month and date.
|
|
663
|
+
* @abstract
|
|
664
|
+
* @param {?} year The full year of the date. (e.g. 89 means the year 89, not the year 1989).
|
|
665
|
+
* @param {?} month The month of the date (0-indexed, 0 = January). Must be an integer 0 - 11.
|
|
666
|
+
* @param {?} date The date of month of the date. Must be an integer 1 - length of the given month.
|
|
667
|
+
* @return {?} The new date, or null if invalid.
|
|
668
|
+
*/
|
|
669
|
+
createDate(year, month, date) { }
|
|
670
|
+
/**
|
|
671
|
+
* Gets today's date.
|
|
672
|
+
* @abstract
|
|
673
|
+
* @return {?} Today's date.
|
|
674
|
+
*/
|
|
675
|
+
today() { }
|
|
676
|
+
/**
|
|
677
|
+
* Parses a date from a value.
|
|
678
|
+
* @abstract
|
|
679
|
+
* @param {?} value The value to parse.
|
|
680
|
+
* @param {?} parseFormat The expected format of the value being parsed
|
|
681
|
+
* (type is implementation-dependent).
|
|
682
|
+
* @return {?} The parsed date.
|
|
683
|
+
*/
|
|
684
|
+
parse(value, parseFormat) { }
|
|
685
|
+
/**
|
|
686
|
+
* Formats a date as a string.
|
|
687
|
+
* @abstract
|
|
688
|
+
* @param {?} date The value to format.
|
|
689
|
+
* @param {?} displayFormat The format to use to display the date as a string.
|
|
690
|
+
* @return {?} The formatted date string.
|
|
691
|
+
*/
|
|
692
|
+
format(date, displayFormat) { }
|
|
693
|
+
/**
|
|
694
|
+
* Adds the given number of years to the date. Years are counted as if flipping 12 pages on the
|
|
695
|
+
* calendar for each year and then finding the closest date in the new month. For example when
|
|
696
|
+
* adding 1 year to Feb 29, 2016, the resulting date will be Feb 28, 2017.
|
|
697
|
+
* @abstract
|
|
698
|
+
* @param {?} date The date to add years to.
|
|
699
|
+
* @param {?} years The number of years to add (may be negative).
|
|
700
|
+
* @return {?} A new date equal to the given one with the specified number of years added.
|
|
701
|
+
*/
|
|
702
|
+
addCalendarYears(date, years) { }
|
|
703
|
+
/**
|
|
704
|
+
* Adds the given number of months to the date. Months are counted as if flipping a page on the
|
|
705
|
+
* calendar for each month and then finding the closest date in the new month. For example when
|
|
706
|
+
* adding 1 month to Jan 31, 2017, the resulting date will be Feb 28, 2017.
|
|
707
|
+
* @abstract
|
|
708
|
+
* @param {?} date The date to add months to.
|
|
709
|
+
* @param {?} months The number of months to add (may be negative).
|
|
710
|
+
* @return {?} A new date equal to the given one with the specified number of months added.
|
|
711
|
+
*/
|
|
712
|
+
addCalendarMonths(date, months) { }
|
|
713
|
+
/**
|
|
714
|
+
* Adds the given number of days to the date. Days are counted as if moving one cell on the
|
|
715
|
+
* calendar for each day.
|
|
716
|
+
* @abstract
|
|
717
|
+
* @param {?} date The date to add days to.
|
|
718
|
+
* @param {?} days The number of days to add (may be negative).
|
|
719
|
+
* @return {?} A new date equal to the given one with the specified number of days added.
|
|
720
|
+
*/
|
|
721
|
+
addCalendarDays(date, days) { }
|
|
722
|
+
/**
|
|
723
|
+
* Gets the RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339) for the given date.
|
|
724
|
+
* @abstract
|
|
725
|
+
* @param {?} date The date to get the ISO date string for.
|
|
726
|
+
* @return {?} The ISO date string date string.
|
|
727
|
+
*/
|
|
728
|
+
toIso8601(date) { }
|
|
729
|
+
/**
|
|
730
|
+
* Creates a date from an RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339).
|
|
731
|
+
* @abstract
|
|
732
|
+
* @param {?} iso8601String The ISO date string to create a date from
|
|
733
|
+
* @return {?} The date created from the ISO date string.
|
|
734
|
+
*/
|
|
735
|
+
fromIso8601(iso8601String) { }
|
|
736
|
+
/**
|
|
737
|
+
* Checks whether the given object is considered a date instance by this DateAdapter.
|
|
738
|
+
* @abstract
|
|
739
|
+
* @param {?} obj The object to check
|
|
740
|
+
* @return {?} Whether the object is a date instance.
|
|
741
|
+
*/
|
|
742
|
+
isDateInstance(obj) { }
|
|
743
|
+
/**
|
|
744
|
+
* Checks whether the given date is valid.
|
|
745
|
+
* @abstract
|
|
746
|
+
* @param {?} date The date to check.
|
|
747
|
+
* @return {?} Whether the date is valid.
|
|
748
|
+
*/
|
|
749
|
+
isValid(date) { }
|
|
750
|
+
/**
|
|
751
|
+
* Sets the locale used for all dates.
|
|
752
|
+
* @param {?} locale The new locale.
|
|
753
|
+
* @return {?}
|
|
754
|
+
*/
|
|
755
|
+
setLocale(locale) {
|
|
756
|
+
this.locale = locale;
|
|
757
|
+
this._localeChanges.next();
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* Compares two dates.
|
|
761
|
+
* @param {?} first The first date to compare.
|
|
762
|
+
* @param {?} second The second date to compare.
|
|
763
|
+
* @return {?} 0 if the dates are equal, a number less than 0 if the first date is earlier,
|
|
764
|
+
* a number greater than 0 if the first date is later.
|
|
765
|
+
*/
|
|
766
|
+
compareDate(first$$1, second) {
|
|
767
|
+
return this.getYear(first$$1) - this.getYear(second) ||
|
|
768
|
+
this.getMonth(first$$1) - this.getMonth(second) ||
|
|
769
|
+
this.getDate(first$$1) - this.getDate(second);
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Checks if two dates are equal.
|
|
773
|
+
* @param {?} first The first date to check.
|
|
774
|
+
* @param {?} second The second date to check.
|
|
775
|
+
* Null dates are considered equal to other null dates.
|
|
776
|
+
* @return {?}
|
|
777
|
+
*/
|
|
778
|
+
sameDate(first$$1, second) {
|
|
779
|
+
return first$$1 && second ? !this.compareDate(first$$1, second) : first$$1 == second;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Clamp the given date between min and max dates.
|
|
783
|
+
* @param {?} date The date to clamp.
|
|
784
|
+
* @param {?=} min The minimum value to allow. If null or omitted no min is enforced.
|
|
785
|
+
* @param {?=} max The maximum value to allow. If null or omitted no max is enforced.
|
|
786
|
+
* @return {?} `min` if `date` is less than `min`, `max` if date is greater than `max`,
|
|
787
|
+
* otherwise `date`.
|
|
788
|
+
*/
|
|
789
|
+
clampDate(date, min, max) {
|
|
790
|
+
if (min && this.compareDate(date, min) < 0) {
|
|
791
|
+
return min;
|
|
792
|
+
}
|
|
793
|
+
if (max && this.compareDate(date, max) > 0) {
|
|
794
|
+
return max;
|
|
795
|
+
}
|
|
796
|
+
return date;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Extends an object with the *enumerable* and *own* properties of one or more source objects,
|
|
802
|
+
* similar to Object.assign.
|
|
803
|
+
*
|
|
804
|
+
* @param {?} dest The object which will have properties copied to it.
|
|
805
|
+
* @param {...?} sources The source objects from which properties will be copied.
|
|
806
|
+
* @return {?}
|
|
807
|
+
*/
|
|
808
|
+
function extendObject(dest, ...sources) {
|
|
809
|
+
if (dest == null) {
|
|
810
|
+
throw TypeError('Cannot convert undefined or null to object');
|
|
811
|
+
}
|
|
812
|
+
for (let /** @type {?} */ source of sources) {
|
|
813
|
+
if (source != null) {
|
|
814
|
+
for (let /** @type {?} */ key in source) {
|
|
815
|
+
if (source.hasOwnProperty(key)) {
|
|
816
|
+
dest[key] = source[key];
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
return dest;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Whether the browser supports the Intl API.
|
|
826
|
+
*/
|
|
827
|
+
const SUPPORTS_INTL_API = typeof Intl != 'undefined';
|
|
828
|
+
/**
|
|
829
|
+
* The default month names to use if Intl API is not available.
|
|
830
|
+
*/
|
|
831
|
+
const DEFAULT_MONTH_NAMES = {
|
|
832
|
+
'long': [
|
|
833
|
+
'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',
|
|
834
|
+
'October', 'November', 'December'
|
|
835
|
+
],
|
|
836
|
+
'short': ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
837
|
+
'narrow': ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D']
|
|
838
|
+
};
|
|
839
|
+
/**
|
|
840
|
+
* The default date names to use if Intl API is not available.
|
|
841
|
+
*/
|
|
842
|
+
const DEFAULT_DATE_NAMES = range(31, i => String(i + 1));
|
|
843
|
+
/**
|
|
844
|
+
* The default day of the week names to use if Intl API is not available.
|
|
845
|
+
*/
|
|
846
|
+
const DEFAULT_DAY_OF_WEEK_NAMES = {
|
|
847
|
+
'long': ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
848
|
+
'short': ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
849
|
+
'narrow': ['S', 'M', 'T', 'W', 'T', 'F', 'S']
|
|
850
|
+
};
|
|
851
|
+
/**
|
|
852
|
+
* Matches strings that have the form of a valid RFC 3339 string
|
|
853
|
+
* (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date
|
|
854
|
+
* because the regex will match strings an with out of bounds month, date, etc.
|
|
855
|
+
*/
|
|
856
|
+
const ISO_8601_REGEX = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;
|
|
857
|
+
/**
|
|
858
|
+
* Creates an array and fills it with values.
|
|
859
|
+
* @template T
|
|
860
|
+
* @param {?} length
|
|
861
|
+
* @param {?} valueFunction
|
|
862
|
+
* @return {?}
|
|
863
|
+
*/
|
|
864
|
+
function range(length, valueFunction) {
|
|
865
|
+
const /** @type {?} */ valuesArray = Array(length);
|
|
866
|
+
for (let /** @type {?} */ i = 0; i < length; i++) {
|
|
867
|
+
valuesArray[i] = valueFunction(i);
|
|
868
|
+
}
|
|
869
|
+
return valuesArray;
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Adapts the native JS Date for use with cdk-based components that work with dates.
|
|
873
|
+
*/
|
|
874
|
+
class NativeDateAdapter extends DateAdapter {
|
|
875
|
+
/**
|
|
876
|
+
* @param {?} matDateLocale
|
|
877
|
+
*/
|
|
878
|
+
constructor(matDateLocale) {
|
|
879
|
+
super();
|
|
880
|
+
/**
|
|
881
|
+
* Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
|
|
882
|
+
* Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
|
|
883
|
+
* the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
|
|
884
|
+
* will produce `'8/13/1800'`.
|
|
885
|
+
*/
|
|
886
|
+
this.useUtcForDisplay = true;
|
|
887
|
+
super.setLocale(matDateLocale);
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* @param {?} date
|
|
891
|
+
* @return {?}
|
|
892
|
+
*/
|
|
893
|
+
getYear(date) {
|
|
894
|
+
return date.getFullYear();
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* @param {?} date
|
|
898
|
+
* @return {?}
|
|
899
|
+
*/
|
|
900
|
+
getMonth(date) {
|
|
901
|
+
return date.getMonth();
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* @param {?} date
|
|
905
|
+
* @return {?}
|
|
906
|
+
*/
|
|
907
|
+
getDate(date) {
|
|
908
|
+
return date.getDate();
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* @param {?} date
|
|
912
|
+
* @return {?}
|
|
913
|
+
*/
|
|
914
|
+
getDayOfWeek(date) {
|
|
915
|
+
return date.getDay();
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* @param {?} style
|
|
919
|
+
* @return {?}
|
|
920
|
+
*/
|
|
921
|
+
getMonthNames(style) {
|
|
922
|
+
if (SUPPORTS_INTL_API) {
|
|
923
|
+
let /** @type {?} */ dtf = new Intl.DateTimeFormat(this.locale, { month: style });
|
|
924
|
+
return range(12, i => this._stripDirectionalityCharacters(dtf.format(new Date(2017, i, 1))));
|
|
925
|
+
}
|
|
926
|
+
return DEFAULT_MONTH_NAMES[style];
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* @return {?}
|
|
930
|
+
*/
|
|
931
|
+
getDateNames() {
|
|
932
|
+
if (SUPPORTS_INTL_API) {
|
|
933
|
+
let /** @type {?} */ dtf = new Intl.DateTimeFormat(this.locale, { day: 'numeric' });
|
|
934
|
+
return range(31, i => this._stripDirectionalityCharacters(dtf.format(new Date(2017, 0, i + 1))));
|
|
935
|
+
}
|
|
936
|
+
return DEFAULT_DATE_NAMES;
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* @param {?} style
|
|
940
|
+
* @return {?}
|
|
941
|
+
*/
|
|
942
|
+
getDayOfWeekNames(style) {
|
|
943
|
+
if (SUPPORTS_INTL_API) {
|
|
944
|
+
let /** @type {?} */ dtf = new Intl.DateTimeFormat(this.locale, { weekday: style });
|
|
945
|
+
return range(7, i => this._stripDirectionalityCharacters(dtf.format(new Date(2017, 0, i + 1))));
|
|
946
|
+
}
|
|
947
|
+
return DEFAULT_DAY_OF_WEEK_NAMES[style];
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* @param {?} date
|
|
951
|
+
* @return {?}
|
|
952
|
+
*/
|
|
953
|
+
getYearName(date) {
|
|
954
|
+
if (SUPPORTS_INTL_API) {
|
|
955
|
+
let /** @type {?} */ dtf = new Intl.DateTimeFormat(this.locale, { year: 'numeric' });
|
|
956
|
+
return this._stripDirectionalityCharacters(dtf.format(date));
|
|
957
|
+
}
|
|
958
|
+
return String(this.getYear(date));
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* @return {?}
|
|
962
|
+
*/
|
|
963
|
+
getFirstDayOfWeek() {
|
|
964
|
+
// We can't tell using native JS Date what the first day of the week is, we default to Sunday.
|
|
965
|
+
return 0;
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* @param {?} date
|
|
969
|
+
* @return {?}
|
|
970
|
+
*/
|
|
971
|
+
getNumDaysInMonth(date) {
|
|
972
|
+
return this.getDate(this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0));
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* @param {?} date
|
|
976
|
+
* @return {?}
|
|
977
|
+
*/
|
|
978
|
+
clone(date) {
|
|
979
|
+
return this.createDate(this.getYear(date), this.getMonth(date), this.getDate(date));
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* @param {?} year
|
|
983
|
+
* @param {?} month
|
|
984
|
+
* @param {?} date
|
|
985
|
+
* @return {?}
|
|
986
|
+
*/
|
|
987
|
+
createDate(year, month, date) {
|
|
988
|
+
// Check for invalid month and date (except upper bound on date which we have to check after
|
|
989
|
+
// creating the Date).
|
|
990
|
+
if (month < 0 || month > 11) {
|
|
991
|
+
throw Error(`Invalid month index "${month}". Month index has to be between 0 and 11.`);
|
|
992
|
+
}
|
|
993
|
+
if (date < 1) {
|
|
994
|
+
throw Error(`Invalid date "${date}". Date has to be greater than 0.`);
|
|
995
|
+
}
|
|
996
|
+
let /** @type {?} */ result = this._createDateWithOverflow(year, month, date);
|
|
997
|
+
// Check that the date wasn't above the upper bound for the month, causing the month to overflow
|
|
998
|
+
if (result.getMonth() != month) {
|
|
999
|
+
throw Error(`Invalid date "${date}" for month with index "${month}".`);
|
|
1000
|
+
}
|
|
1001
|
+
return result;
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* @return {?}
|
|
1005
|
+
*/
|
|
1006
|
+
today() {
|
|
1007
|
+
return new Date();
|
|
1008
|
+
}
|
|
1009
|
+
/**
|
|
1010
|
+
* @param {?} value
|
|
1011
|
+
* @return {?}
|
|
1012
|
+
*/
|
|
1013
|
+
parse(value) {
|
|
1014
|
+
// We have no way using the native JS Date to set the parse format or locale, so we ignore these
|
|
1015
|
+
// parameters.
|
|
1016
|
+
if (typeof value == 'number') {
|
|
1017
|
+
return new Date(value);
|
|
1018
|
+
}
|
|
1019
|
+
return value ? new Date(Date.parse(value)) : null;
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* @param {?} date
|
|
1023
|
+
* @param {?} displayFormat
|
|
1024
|
+
* @return {?}
|
|
1025
|
+
*/
|
|
1026
|
+
format(date, displayFormat) {
|
|
1027
|
+
if (!this.isValid(date)) {
|
|
1028
|
+
throw Error('NativeDateAdapter: Cannot format invalid date.');
|
|
1029
|
+
}
|
|
1030
|
+
if (SUPPORTS_INTL_API) {
|
|
1031
|
+
if (this.useUtcForDisplay) {
|
|
1032
|
+
date = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
1033
|
+
displayFormat = extendObject({}, displayFormat, { timeZone: 'utc' });
|
|
1034
|
+
}
|
|
1035
|
+
let /** @type {?} */ dtf = new Intl.DateTimeFormat(this.locale, displayFormat);
|
|
1036
|
+
return this._stripDirectionalityCharacters(dtf.format(date));
|
|
1037
|
+
}
|
|
1038
|
+
return this._stripDirectionalityCharacters(date.toDateString());
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* @param {?} date
|
|
1042
|
+
* @param {?} years
|
|
1043
|
+
* @return {?}
|
|
1044
|
+
*/
|
|
1045
|
+
addCalendarYears(date, years) {
|
|
1046
|
+
return this.addCalendarMonths(date, years * 12);
|
|
1047
|
+
}
|
|
1048
|
+
/**
|
|
1049
|
+
* @param {?} date
|
|
1050
|
+
* @param {?} months
|
|
1051
|
+
* @return {?}
|
|
1052
|
+
*/
|
|
1053
|
+
addCalendarMonths(date, months) {
|
|
1054
|
+
let /** @type {?} */ newDate = this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + months, this.getDate(date));
|
|
1055
|
+
// It's possible to wind up in the wrong month if the original month has more days than the new
|
|
1056
|
+
// month. In this case we want to go to the last day of the desired month.
|
|
1057
|
+
// Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't
|
|
1058
|
+
// guarantee this.
|
|
1059
|
+
if (this.getMonth(newDate) != ((this.getMonth(date) + months) % 12 + 12) % 12) {
|
|
1060
|
+
newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0);
|
|
1061
|
+
}
|
|
1062
|
+
return newDate;
|
|
1063
|
+
}
|
|
1064
|
+
/**
|
|
1065
|
+
* @param {?} date
|
|
1066
|
+
* @param {?} days
|
|
1067
|
+
* @return {?}
|
|
1068
|
+
*/
|
|
1069
|
+
addCalendarDays(date, days) {
|
|
1070
|
+
return this._createDateWithOverflow(this.getYear(date), this.getMonth(date), this.getDate(date) + days);
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* @param {?} date
|
|
1074
|
+
* @return {?}
|
|
1075
|
+
*/
|
|
1076
|
+
toIso8601(date) {
|
|
1077
|
+
return [
|
|
1078
|
+
date.getUTCFullYear(),
|
|
1079
|
+
this._2digit(date.getUTCMonth() + 1),
|
|
1080
|
+
this._2digit(date.getUTCDate())
|
|
1081
|
+
].join('-');
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* @param {?} iso8601String
|
|
1085
|
+
* @return {?}
|
|
1086
|
+
*/
|
|
1087
|
+
fromIso8601(iso8601String) {
|
|
1088
|
+
// The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the
|
|
1089
|
+
// string is the right format first.
|
|
1090
|
+
if (ISO_8601_REGEX.test(iso8601String)) {
|
|
1091
|
+
let /** @type {?} */ d = new Date(iso8601String);
|
|
1092
|
+
if (this.isValid(d)) {
|
|
1093
|
+
return d;
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
return null;
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* @param {?} obj
|
|
1100
|
+
* @return {?}
|
|
1101
|
+
*/
|
|
1102
|
+
isDateInstance(obj) {
|
|
1103
|
+
return obj instanceof Date;
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* @param {?} date
|
|
1107
|
+
* @return {?}
|
|
1108
|
+
*/
|
|
1109
|
+
isValid(date) {
|
|
1110
|
+
return !isNaN(date.getTime());
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* Creates a date but allows the month and date to overflow.
|
|
1114
|
+
* @param {?} year
|
|
1115
|
+
* @param {?} month
|
|
1116
|
+
* @param {?} date
|
|
1117
|
+
* @return {?}
|
|
1118
|
+
*/
|
|
1119
|
+
_createDateWithOverflow(year, month, date) {
|
|
1120
|
+
let /** @type {?} */ result = new Date(year, month, date);
|
|
1121
|
+
// We need to correct for the fact that JS native Date treats years in range [0, 99] as
|
|
1122
|
+
// abbreviations for 19xx.
|
|
1123
|
+
if (year >= 0 && year < 100) {
|
|
1124
|
+
result.setFullYear(this.getYear(result) - 1900);
|
|
1125
|
+
}
|
|
1126
|
+
return result;
|
|
1127
|
+
}
|
|
1128
|
+
/**
|
|
1129
|
+
* Pads a number to make it two digits.
|
|
1130
|
+
* @param {?} n The number to pad.
|
|
1131
|
+
* @return {?} The padded number.
|
|
1132
|
+
*/
|
|
1133
|
+
_2digit(n) {
|
|
1134
|
+
return ('00' + n).slice(-2);
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
|
|
1138
|
+
* other browsers do not. We remove them to make output consistent and because they interfere with
|
|
1139
|
+
* date parsing.
|
|
1140
|
+
* @param {?} str The string to strip direction characters from.
|
|
1141
|
+
* @return {?} The stripped string.
|
|
1142
|
+
*/
|
|
1143
|
+
_stripDirectionalityCharacters(str) {
|
|
1144
|
+
return str.replace(/[\u200e\u200f]/g, '');
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
NativeDateAdapter.decorators = [
|
|
1148
|
+
{ type: Injectable },
|
|
1149
|
+
];
|
|
1150
|
+
/**
|
|
1151
|
+
* @nocollapse
|
|
1152
|
+
*/
|
|
1153
|
+
NativeDateAdapter.ctorParameters = () => [
|
|
1154
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DATE_LOCALE,] },] },
|
|
1155
|
+
];
|
|
1156
|
+
|
|
1157
|
+
const MD_DATE_FORMATS = new InjectionToken('md-date-formats');
|
|
1158
|
+
|
|
1159
|
+
const MD_NATIVE_DATE_FORMATS = {
|
|
1160
|
+
parse: {
|
|
1161
|
+
dateInput: null,
|
|
1162
|
+
},
|
|
1163
|
+
display: {
|
|
1164
|
+
dateInput: { year: 'numeric', month: 'numeric', day: 'numeric' },
|
|
1165
|
+
monthYearLabel: { year: 'numeric', month: 'short' },
|
|
1166
|
+
dateA11yLabel: { year: 'numeric', month: 'long', day: 'numeric' },
|
|
1167
|
+
monthYearA11yLabel: { year: 'numeric', month: 'long' },
|
|
1168
|
+
}
|
|
1169
|
+
};
|
|
1170
|
+
|
|
1171
|
+
class NativeDateModule {
|
|
1172
|
+
}
|
|
1173
|
+
NativeDateModule.decorators = [
|
|
1174
|
+
{ type: NgModule, args: [{
|
|
1175
|
+
providers: [
|
|
1176
|
+
{ provide: DateAdapter, useClass: NativeDateAdapter },
|
|
1177
|
+
MAT_DATE_LOCALE_PROVIDER
|
|
1178
|
+
],
|
|
1179
|
+
},] },
|
|
1180
|
+
];
|
|
1181
|
+
/**
|
|
1182
|
+
* @nocollapse
|
|
1183
|
+
*/
|
|
1184
|
+
NativeDateModule.ctorParameters = () => [];
|
|
1185
|
+
class MdNativeDateModule {
|
|
1186
|
+
}
|
|
1187
|
+
MdNativeDateModule.decorators = [
|
|
1188
|
+
{ type: NgModule, args: [{
|
|
1189
|
+
imports: [NativeDateModule],
|
|
1190
|
+
providers: [{ provide: MD_DATE_FORMATS, useValue: MD_NATIVE_DATE_FORMATS }],
|
|
1191
|
+
},] },
|
|
1192
|
+
];
|
|
1193
|
+
/**
|
|
1194
|
+
* @nocollapse
|
|
1195
|
+
*/
|
|
1196
|
+
MdNativeDateModule.ctorParameters = () => [];
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* Injection token that can be used to specify the global error options.
|
|
1200
|
+
*/
|
|
1201
|
+
const MD_ERROR_GLOBAL_OPTIONS = new InjectionToken('md-error-global-options');
|
|
1202
|
+
/**
|
|
1203
|
+
* Returns whether control is invalid and is either touched or is a part of a submitted form.
|
|
1204
|
+
* @param {?} control
|
|
1205
|
+
* @param {?} form
|
|
1206
|
+
* @return {?}
|
|
1207
|
+
*/
|
|
1208
|
+
function defaultErrorStateMatcher(control, form) {
|
|
1209
|
+
const /** @type {?} */ isSubmitted = form && form.submitted;
|
|
1210
|
+
return !!(control.invalid && (control.touched || isSubmitted));
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Returns whether control is invalid and is either dirty or is a part of a submitted form.
|
|
1214
|
+
* @param {?} control
|
|
1215
|
+
* @param {?} form
|
|
1216
|
+
* @return {?}
|
|
1217
|
+
*/
|
|
1218
|
+
function showOnDirtyErrorStateMatcher(control, form) {
|
|
1219
|
+
const /** @type {?} */ isSubmitted = form && form.submitted;
|
|
1220
|
+
return !!(control.invalid && (control.dirty || isSubmitted));
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
class GestureConfig extends HammerGestureConfig {
|
|
1224
|
+
constructor() {
|
|
1225
|
+
super();
|
|
1226
|
+
this._hammer = typeof window !== 'undefined' ? ((window)).Hammer : null;
|
|
1227
|
+
/* List of new event names to add to the gesture support list */
|
|
1228
|
+
this.events = this._hammer ? [
|
|
1229
|
+
'longpress',
|
|
1230
|
+
'slide',
|
|
1231
|
+
'slidestart',
|
|
1232
|
+
'slideend',
|
|
1233
|
+
'slideright',
|
|
1234
|
+
'slideleft'
|
|
1235
|
+
] : [];
|
|
1236
|
+
if (!this._hammer && isDevMode()) {
|
|
1237
|
+
console.warn('Could not find HammerJS. Certain Angular Material ' +
|
|
1238
|
+
'components may not work correctly.');
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* Builds Hammer instance manually to add custom recognizers that match the Material Design spec.
|
|
1243
|
+
*
|
|
1244
|
+
* Our gesture names come from the Material Design gestures spec:
|
|
1245
|
+
* https://www.google.com/design/spec/patterns/gestures.html#gestures-touch-mechanics
|
|
1246
|
+
*
|
|
1247
|
+
* More information on default recognizers can be found in Hammer docs:
|
|
1248
|
+
* http://hammerjs.github.io/recognizer-pan/
|
|
1249
|
+
* http://hammerjs.github.io/recognizer-press/
|
|
1250
|
+
*
|
|
1251
|
+
* @param {?} element Element to which to assign the new HammerJS gestures.
|
|
1252
|
+
* @return {?} Newly-created HammerJS instance.
|
|
1253
|
+
*/
|
|
1254
|
+
buildHammer(element) {
|
|
1255
|
+
const /** @type {?} */ mc = new this._hammer(element);
|
|
1256
|
+
// Default Hammer Recognizers.
|
|
1257
|
+
let /** @type {?} */ pan = new this._hammer.Pan();
|
|
1258
|
+
let /** @type {?} */ swipe = new this._hammer.Swipe();
|
|
1259
|
+
let /** @type {?} */ press = new this._hammer.Press();
|
|
1260
|
+
// Notice that a HammerJS recognizer can only depend on one other recognizer once.
|
|
1261
|
+
// Otherwise the previous `recognizeWith` will be dropped.
|
|
1262
|
+
// TODO: Confirm threshold numbers with Material Design UX Team
|
|
1263
|
+
let /** @type {?} */ slide = this._createRecognizer(pan, { event: 'slide', threshold: 0 }, swipe);
|
|
1264
|
+
let /** @type {?} */ longpress = this._createRecognizer(press, { event: 'longpress', time: 500 });
|
|
1265
|
+
// Overwrite the default `pan` event to use the swipe event.
|
|
1266
|
+
pan.recognizeWith(swipe);
|
|
1267
|
+
// Add customized gestures to Hammer manager
|
|
1268
|
+
mc.add([swipe, press, pan, slide, longpress]);
|
|
1269
|
+
return (mc);
|
|
1270
|
+
}
|
|
1271
|
+
/**
|
|
1272
|
+
* Creates a new recognizer, without affecting the default recognizers of HammerJS
|
|
1273
|
+
* @param {?} base
|
|
1274
|
+
* @param {?} options
|
|
1275
|
+
* @param {...?} inheritances
|
|
1276
|
+
* @return {?}
|
|
1277
|
+
*/
|
|
1278
|
+
_createRecognizer(base, options, ...inheritances) {
|
|
1279
|
+
let /** @type {?} */ recognizer = new ((base.constructor))(options);
|
|
1280
|
+
inheritances.push(base);
|
|
1281
|
+
inheritances.forEach(item => recognizer.recognizeWith(item));
|
|
1282
|
+
return recognizer;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
GestureConfig.decorators = [
|
|
1286
|
+
{ type: Injectable },
|
|
1287
|
+
];
|
|
1288
|
+
/**
|
|
1289
|
+
* @nocollapse
|
|
1290
|
+
*/
|
|
1291
|
+
GestureConfig.ctorParameters = () => [];
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* Shared directive to count lines inside a text area, such as a list item.
|
|
1295
|
+
* Line elements can be extracted with a \@ContentChildren(MdLine) query, then
|
|
1296
|
+
* counted by checking the query list's length.
|
|
1297
|
+
*/
|
|
1298
|
+
class MdLine {
|
|
1299
|
+
}
|
|
1300
|
+
MdLine.decorators = [
|
|
1301
|
+
{ type: Directive, args: [{
|
|
1302
|
+
selector: '[md-line], [mat-line], [mdLine], [matLine]',
|
|
1303
|
+
host: { 'class': 'mat-line' }
|
|
1304
|
+
},] },
|
|
1305
|
+
];
|
|
1306
|
+
/**
|
|
1307
|
+
* @nocollapse
|
|
1308
|
+
*/
|
|
1309
|
+
MdLine.ctorParameters = () => [];
|
|
1310
|
+
/**
|
|
1311
|
+
* Helper that takes a query list of lines and sets the correct class on the host.
|
|
1312
|
+
* \@docs-private
|
|
1313
|
+
*/
|
|
1314
|
+
class MdLineSetter {
|
|
1315
|
+
/**
|
|
1316
|
+
* @param {?} _lines
|
|
1317
|
+
* @param {?} _renderer
|
|
1318
|
+
* @param {?} _element
|
|
1319
|
+
*/
|
|
1320
|
+
constructor(_lines, _renderer, _element) {
|
|
1321
|
+
this._lines = _lines;
|
|
1322
|
+
this._renderer = _renderer;
|
|
1323
|
+
this._element = _element;
|
|
1324
|
+
this._setLineClass(this._lines.length);
|
|
1325
|
+
this._lines.changes.subscribe(() => {
|
|
1326
|
+
this._setLineClass(this._lines.length);
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1329
|
+
/**
|
|
1330
|
+
* @param {?} count
|
|
1331
|
+
* @return {?}
|
|
1332
|
+
*/
|
|
1333
|
+
_setLineClass(count) {
|
|
1334
|
+
this._resetClasses();
|
|
1335
|
+
if (count === 2 || count === 3) {
|
|
1336
|
+
this._setClass(`mat-${count}-line`, true);
|
|
1337
|
+
}
|
|
1338
|
+
else if (count > 3) {
|
|
1339
|
+
this._setClass(`mat-multi-line`, true);
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
/**
|
|
1343
|
+
* @return {?}
|
|
1344
|
+
*/
|
|
1345
|
+
_resetClasses() {
|
|
1346
|
+
this._setClass('mat-2-line', false);
|
|
1347
|
+
this._setClass('mat-3-line', false);
|
|
1348
|
+
this._setClass('mat-multi-line', false);
|
|
1349
|
+
}
|
|
1350
|
+
/**
|
|
1351
|
+
* @param {?} className
|
|
1352
|
+
* @param {?} isAdd
|
|
1353
|
+
* @return {?}
|
|
1354
|
+
*/
|
|
1355
|
+
_setClass(className, isAdd) {
|
|
1356
|
+
if (isAdd) {
|
|
1357
|
+
this._renderer.addClass(this._element.nativeElement, className);
|
|
1358
|
+
}
|
|
1359
|
+
else {
|
|
1360
|
+
this._renderer.removeClass(this._element.nativeElement, className);
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
class MdLineModule {
|
|
1365
|
+
}
|
|
1366
|
+
MdLineModule.decorators = [
|
|
1367
|
+
{ type: NgModule, args: [{
|
|
1368
|
+
imports: [MdCommonModule],
|
|
1369
|
+
exports: [MdLine, MdCommonModule],
|
|
1370
|
+
declarations: [MdLine],
|
|
1371
|
+
},] },
|
|
1372
|
+
];
|
|
1373
|
+
/**
|
|
1374
|
+
* @nocollapse
|
|
1375
|
+
*/
|
|
1376
|
+
MdLineModule.ctorParameters = () => [];
|
|
1377
|
+
|
|
1378
|
+
let RippleState = {};
|
|
1379
|
+
RippleState.FADING_IN = 0;
|
|
1380
|
+
RippleState.VISIBLE = 1;
|
|
1381
|
+
RippleState.FADING_OUT = 2;
|
|
1382
|
+
RippleState.HIDDEN = 3;
|
|
1383
|
+
RippleState[RippleState.FADING_IN] = "FADING_IN";
|
|
1384
|
+
RippleState[RippleState.VISIBLE] = "VISIBLE";
|
|
1385
|
+
RippleState[RippleState.FADING_OUT] = "FADING_OUT";
|
|
1386
|
+
RippleState[RippleState.HIDDEN] = "HIDDEN";
|
|
1387
|
+
/**
|
|
1388
|
+
* Reference to a previously launched ripple element.
|
|
1389
|
+
*/
|
|
1390
|
+
class RippleRef {
|
|
1391
|
+
/**
|
|
1392
|
+
* @param {?} _renderer
|
|
1393
|
+
* @param {?} element
|
|
1394
|
+
* @param {?} config
|
|
1395
|
+
*/
|
|
1396
|
+
constructor(_renderer, element, config) {
|
|
1397
|
+
this._renderer = _renderer;
|
|
1398
|
+
this.element = element;
|
|
1399
|
+
this.config = config;
|
|
1400
|
+
/**
|
|
1401
|
+
* Current state of the ripple reference.
|
|
1402
|
+
*/
|
|
1403
|
+
this.state = RippleState.HIDDEN;
|
|
1404
|
+
}
|
|
1405
|
+
/**
|
|
1406
|
+
* Fades out the ripple element.
|
|
1407
|
+
* @return {?}
|
|
1408
|
+
*/
|
|
1409
|
+
fadeOut() {
|
|
1410
|
+
this._renderer.fadeOutRipple(this);
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
/**
|
|
1415
|
+
* Fade-in duration for the ripples. Can be modified with the speedFactor option.
|
|
1416
|
+
*/
|
|
1417
|
+
const RIPPLE_FADE_IN_DURATION = 450;
|
|
1418
|
+
/**
|
|
1419
|
+
* Fade-out duration for the ripples in milliseconds. This can't be modified by the speedFactor.
|
|
1420
|
+
*/
|
|
1421
|
+
const RIPPLE_FADE_OUT_DURATION = 400;
|
|
1422
|
+
/**
|
|
1423
|
+
* Helper service that performs DOM manipulations. Not intended to be used outside this module.
|
|
1424
|
+
* The constructor takes a reference to the ripple directive's host element and a map of DOM
|
|
1425
|
+
* event handlers to be installed on the element that triggers ripple animations.
|
|
1426
|
+
* This will eventually become a custom renderer once Angular support exists.
|
|
1427
|
+
* \@docs-private
|
|
1428
|
+
*/
|
|
1429
|
+
class RippleRenderer {
|
|
1430
|
+
/**
|
|
1431
|
+
* @param {?} elementRef
|
|
1432
|
+
* @param {?} _ngZone
|
|
1433
|
+
* @param {?} _ruler
|
|
1434
|
+
* @param {?} platform
|
|
1435
|
+
*/
|
|
1436
|
+
constructor(elementRef, _ngZone, _ruler, platform) {
|
|
1437
|
+
this._ngZone = _ngZone;
|
|
1438
|
+
this._ruler = _ruler;
|
|
1439
|
+
/**
|
|
1440
|
+
* Whether the mouse is currently down or not.
|
|
1441
|
+
*/
|
|
1442
|
+
this._isMousedown = false;
|
|
1443
|
+
/**
|
|
1444
|
+
* Events to be registered on the trigger element.
|
|
1445
|
+
*/
|
|
1446
|
+
this._triggerEvents = new Map();
|
|
1447
|
+
/**
|
|
1448
|
+
* Set of currently active ripple references.
|
|
1449
|
+
*/
|
|
1450
|
+
this._activeRipples = new Set();
|
|
1451
|
+
/**
|
|
1452
|
+
* Ripple config for all ripples created by events.
|
|
1453
|
+
*/
|
|
1454
|
+
this.rippleConfig = {};
|
|
1455
|
+
/**
|
|
1456
|
+
* Whether mouse ripples should be created or not.
|
|
1457
|
+
*/
|
|
1458
|
+
this.rippleDisabled = false;
|
|
1459
|
+
// Only do anything if we're on the browser.
|
|
1460
|
+
if (platform.isBrowser) {
|
|
1461
|
+
this._containerElement = elementRef.nativeElement;
|
|
1462
|
+
// Specify events which need to be registered on the trigger.
|
|
1463
|
+
this._triggerEvents.set('mousedown', this.onMousedown.bind(this));
|
|
1464
|
+
this._triggerEvents.set('mouseup', this.onMouseup.bind(this));
|
|
1465
|
+
this._triggerEvents.set('mouseleave', this.onMouseLeave.bind(this));
|
|
1466
|
+
// By default use the host element as trigger element.
|
|
1467
|
+
this.setTriggerElement(this._containerElement);
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
/**
|
|
1471
|
+
* Fades in a ripple at the given coordinates.
|
|
1472
|
+
* @param {?} pageX
|
|
1473
|
+
* @param {?} pageY
|
|
1474
|
+
* @param {?=} config
|
|
1475
|
+
* @return {?}
|
|
1476
|
+
*/
|
|
1477
|
+
fadeInRipple(pageX, pageY, config = {}) {
|
|
1478
|
+
let /** @type {?} */ containerRect = this._containerElement.getBoundingClientRect();
|
|
1479
|
+
if (config.centered) {
|
|
1480
|
+
pageX = containerRect.left + containerRect.width / 2;
|
|
1481
|
+
pageY = containerRect.top + containerRect.height / 2;
|
|
1482
|
+
}
|
|
1483
|
+
else {
|
|
1484
|
+
// Subtract scroll values from the coordinates because calculations below
|
|
1485
|
+
// are always relative to the viewport rectangle.
|
|
1486
|
+
let /** @type {?} */ scrollPosition = this._ruler.getViewportScrollPosition();
|
|
1487
|
+
pageX -= scrollPosition.left;
|
|
1488
|
+
pageY -= scrollPosition.top;
|
|
1489
|
+
}
|
|
1490
|
+
let /** @type {?} */ radius = config.radius || distanceToFurthestCorner(pageX, pageY, containerRect);
|
|
1491
|
+
let /** @type {?} */ duration = RIPPLE_FADE_IN_DURATION * (1 / (config.speedFactor || 1));
|
|
1492
|
+
let /** @type {?} */ offsetX = pageX - containerRect.left;
|
|
1493
|
+
let /** @type {?} */ offsetY = pageY - containerRect.top;
|
|
1494
|
+
let /** @type {?} */ ripple = document.createElement('div');
|
|
1495
|
+
ripple.classList.add('mat-ripple-element');
|
|
1496
|
+
ripple.style.left = `${offsetX - radius}px`;
|
|
1497
|
+
ripple.style.top = `${offsetY - radius}px`;
|
|
1498
|
+
ripple.style.height = `${radius * 2}px`;
|
|
1499
|
+
ripple.style.width = `${radius * 2}px`;
|
|
1500
|
+
// If the color is not set, the default CSS color will be used.
|
|
1501
|
+
ripple.style.backgroundColor = config.color || null;
|
|
1502
|
+
ripple.style.transitionDuration = `${duration}ms`;
|
|
1503
|
+
this._containerElement.appendChild(ripple);
|
|
1504
|
+
// By default the browser does not recalculate the styles of dynamically created
|
|
1505
|
+
// ripple elements. This is critical because then the `scale` would not animate properly.
|
|
1506
|
+
enforceStyleRecalculation(ripple);
|
|
1507
|
+
ripple.style.transform = 'scale(1)';
|
|
1508
|
+
// Exposed reference to the ripple that will be returned.
|
|
1509
|
+
let /** @type {?} */ rippleRef = new RippleRef(this, ripple, config);
|
|
1510
|
+
rippleRef.state = RippleState.FADING_IN;
|
|
1511
|
+
// Add the ripple reference to the list of all active ripples.
|
|
1512
|
+
this._activeRipples.add(rippleRef);
|
|
1513
|
+
// Wait for the ripple element to be completely faded in.
|
|
1514
|
+
// Once it's faded in, the ripple can be hidden immediately if the mouse is released.
|
|
1515
|
+
this.runTimeoutOutsideZone(() => {
|
|
1516
|
+
rippleRef.state = RippleState.VISIBLE;
|
|
1517
|
+
if (!config.persistent && !this._isMousedown) {
|
|
1518
|
+
rippleRef.fadeOut();
|
|
1519
|
+
}
|
|
1520
|
+
}, duration);
|
|
1521
|
+
return rippleRef;
|
|
1522
|
+
}
|
|
1523
|
+
/**
|
|
1524
|
+
* Fades out a ripple reference.
|
|
1525
|
+
* @param {?} rippleRef
|
|
1526
|
+
* @return {?}
|
|
1527
|
+
*/
|
|
1528
|
+
fadeOutRipple(rippleRef) {
|
|
1529
|
+
// For ripples that are not active anymore, don't re-un the fade-out animation.
|
|
1530
|
+
if (!this._activeRipples.delete(rippleRef)) {
|
|
1531
|
+
return;
|
|
1532
|
+
}
|
|
1533
|
+
let /** @type {?} */ rippleEl = rippleRef.element;
|
|
1534
|
+
rippleEl.style.transitionDuration = `${RIPPLE_FADE_OUT_DURATION}ms`;
|
|
1535
|
+
rippleEl.style.opacity = '0';
|
|
1536
|
+
rippleRef.state = RippleState.FADING_OUT;
|
|
1537
|
+
// Once the ripple faded out, the ripple can be safely removed from the DOM.
|
|
1538
|
+
this.runTimeoutOutsideZone(() => {
|
|
1539
|
+
rippleRef.state = RippleState.HIDDEN; /** @type {?} */
|
|
1540
|
+
((rippleEl.parentNode)).removeChild(rippleEl);
|
|
1541
|
+
}, RIPPLE_FADE_OUT_DURATION);
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* Fades out all currently active ripples.
|
|
1545
|
+
* @return {?}
|
|
1546
|
+
*/
|
|
1547
|
+
fadeOutAll() {
|
|
1548
|
+
this._activeRipples.forEach(ripple => ripple.fadeOut());
|
|
1549
|
+
}
|
|
1550
|
+
/**
|
|
1551
|
+
* Sets the trigger element and registers the mouse events.
|
|
1552
|
+
* @param {?} element
|
|
1553
|
+
* @return {?}
|
|
1554
|
+
*/
|
|
1555
|
+
setTriggerElement(element) {
|
|
1556
|
+
// Remove all previously register event listeners from the trigger element.
|
|
1557
|
+
if (this._triggerElement) {
|
|
1558
|
+
this._triggerEvents.forEach((fn, type) => {
|
|
1559
|
+
((this._triggerElement)).removeEventListener(type, fn);
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
if (element) {
|
|
1563
|
+
// If the element is not null, register all event listeners on the trigger element.
|
|
1564
|
+
this._ngZone.runOutsideAngular(() => {
|
|
1565
|
+
this._triggerEvents.forEach((fn, type) => element.addEventListener(type, fn));
|
|
1566
|
+
});
|
|
1567
|
+
}
|
|
1568
|
+
this._triggerElement = element;
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1571
|
+
* Listener being called on mousedown event.
|
|
1572
|
+
* @param {?} event
|
|
1573
|
+
* @return {?}
|
|
1574
|
+
*/
|
|
1575
|
+
onMousedown(event) {
|
|
1576
|
+
if (!this.rippleDisabled) {
|
|
1577
|
+
this._isMousedown = true;
|
|
1578
|
+
this.fadeInRipple(event.pageX, event.pageY, this.rippleConfig);
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
/**
|
|
1582
|
+
* Listener being called on mouseup event.
|
|
1583
|
+
* @return {?}
|
|
1584
|
+
*/
|
|
1585
|
+
onMouseup() {
|
|
1586
|
+
this._isMousedown = false;
|
|
1587
|
+
// Fade-out all ripples that are completely visible and not persistent.
|
|
1588
|
+
this._activeRipples.forEach(ripple => {
|
|
1589
|
+
if (!ripple.config.persistent && ripple.state === RippleState.VISIBLE) {
|
|
1590
|
+
ripple.fadeOut();
|
|
1591
|
+
}
|
|
1592
|
+
});
|
|
1593
|
+
}
|
|
1594
|
+
/**
|
|
1595
|
+
* Listener being called on mouseleave event.
|
|
1596
|
+
* @return {?}
|
|
1597
|
+
*/
|
|
1598
|
+
onMouseLeave() {
|
|
1599
|
+
if (this._isMousedown) {
|
|
1600
|
+
this.onMouseup();
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
/**
|
|
1604
|
+
* Runs a timeout outside of the Angular zone to avoid triggering the change detection.
|
|
1605
|
+
* @param {?} fn
|
|
1606
|
+
* @param {?=} delay
|
|
1607
|
+
* @return {?}
|
|
1608
|
+
*/
|
|
1609
|
+
runTimeoutOutsideZone(fn, delay = 0) {
|
|
1610
|
+
this._ngZone.runOutsideAngular(() => setTimeout(fn, delay));
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
/**
|
|
1614
|
+
* @param {?} element
|
|
1615
|
+
* @return {?}
|
|
1616
|
+
*/
|
|
1617
|
+
function enforceStyleRecalculation(element) {
|
|
1618
|
+
// Enforce a style recalculation by calling `getComputedStyle` and accessing any property.
|
|
1619
|
+
// Calling `getPropertyValue` is important to let optimizers know that this is not a noop.
|
|
1620
|
+
// See: https://gist.github.com/paulirish/5d52fb081b3570c81e3a
|
|
1621
|
+
window.getComputedStyle(element).getPropertyValue('opacity');
|
|
1622
|
+
}
|
|
1623
|
+
/**
|
|
1624
|
+
* Returns the distance from the point (x, y) to the furthest corner of a rectangle.
|
|
1625
|
+
* @param {?} x
|
|
1626
|
+
* @param {?} y
|
|
1627
|
+
* @param {?} rect
|
|
1628
|
+
* @return {?}
|
|
1629
|
+
*/
|
|
1630
|
+
function distanceToFurthestCorner(x, y, rect) {
|
|
1631
|
+
const /** @type {?} */ distX = Math.max(Math.abs(x - rect.left), Math.abs(x - rect.right));
|
|
1632
|
+
const /** @type {?} */ distY = Math.max(Math.abs(y - rect.top), Math.abs(y - rect.bottom));
|
|
1633
|
+
return Math.sqrt(distX * distX + distY * distY);
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
/**
|
|
1637
|
+
* Injection token that can be used to specify the global ripple options.
|
|
1638
|
+
*/
|
|
1639
|
+
const MD_RIPPLE_GLOBAL_OPTIONS = new InjectionToken('md-ripple-global-options');
|
|
1640
|
+
class MdRipple {
|
|
1641
|
+
/**
|
|
1642
|
+
* @param {?} elementRef
|
|
1643
|
+
* @param {?} ngZone
|
|
1644
|
+
* @param {?} ruler
|
|
1645
|
+
* @param {?} platform
|
|
1646
|
+
* @param {?} globalOptions
|
|
1647
|
+
*/
|
|
1648
|
+
constructor(elementRef, ngZone, ruler, platform, globalOptions) {
|
|
1649
|
+
/**
|
|
1650
|
+
* If set, the radius in pixels of foreground ripples when fully expanded. If unset, the radius
|
|
1651
|
+
* will be the distance from the center of the ripple to the furthest corner of the host element's
|
|
1652
|
+
* bounding rectangle.
|
|
1653
|
+
*/
|
|
1654
|
+
this.radius = 0;
|
|
1655
|
+
/**
|
|
1656
|
+
* If set, the normal duration of ripple animations is divided by this value. For example,
|
|
1657
|
+
* setting it to 0.5 will cause the animations to take twice as long.
|
|
1658
|
+
* A changed speedFactor will not modify the fade-out duration of the ripples.
|
|
1659
|
+
*/
|
|
1660
|
+
this.speedFactor = 1;
|
|
1661
|
+
this._rippleRenderer = new RippleRenderer(elementRef, ngZone, ruler, platform);
|
|
1662
|
+
this._globalOptions = globalOptions ? globalOptions : {};
|
|
1663
|
+
this._updateRippleRenderer();
|
|
1664
|
+
}
|
|
1665
|
+
/**
|
|
1666
|
+
* @return {?}
|
|
1667
|
+
*/
|
|
1668
|
+
get _matRippleTrigger() { return this.trigger; }
|
|
1669
|
+
/**
|
|
1670
|
+
* @param {?} v
|
|
1671
|
+
* @return {?}
|
|
1672
|
+
*/
|
|
1673
|
+
set _matRippleTrigger(v) { this.trigger = v; }
|
|
1674
|
+
/**
|
|
1675
|
+
* @return {?}
|
|
1676
|
+
*/
|
|
1677
|
+
get _matRippleCentered() { return this.centered; }
|
|
1678
|
+
/**
|
|
1679
|
+
* @param {?} v
|
|
1680
|
+
* @return {?}
|
|
1681
|
+
*/
|
|
1682
|
+
set _matRippleCentered(v) { this.centered = v; }
|
|
1683
|
+
/**
|
|
1684
|
+
* @return {?}
|
|
1685
|
+
*/
|
|
1686
|
+
get _matRippleDisabled() { return this.disabled; }
|
|
1687
|
+
/**
|
|
1688
|
+
* @param {?} v
|
|
1689
|
+
* @return {?}
|
|
1690
|
+
*/
|
|
1691
|
+
set _matRippleDisabled(v) { this.disabled = v; }
|
|
1692
|
+
/**
|
|
1693
|
+
* @return {?}
|
|
1694
|
+
*/
|
|
1695
|
+
get _matRippleRadius() { return this.radius; }
|
|
1696
|
+
/**
|
|
1697
|
+
* @param {?} v
|
|
1698
|
+
* @return {?}
|
|
1699
|
+
*/
|
|
1700
|
+
set _matRippleRadius(v) { this.radius = v; }
|
|
1701
|
+
/**
|
|
1702
|
+
* @return {?}
|
|
1703
|
+
*/
|
|
1704
|
+
get _matRippleSpeedFactor() { return this.speedFactor; }
|
|
1705
|
+
/**
|
|
1706
|
+
* @param {?} v
|
|
1707
|
+
* @return {?}
|
|
1708
|
+
*/
|
|
1709
|
+
set _matRippleSpeedFactor(v) { this.speedFactor = v; }
|
|
1710
|
+
/**
|
|
1711
|
+
* @return {?}
|
|
1712
|
+
*/
|
|
1713
|
+
get _matRippleColor() { return this.color; }
|
|
1714
|
+
/**
|
|
1715
|
+
* @param {?} v
|
|
1716
|
+
* @return {?}
|
|
1717
|
+
*/
|
|
1718
|
+
set _matRippleColor(v) { this.color = v; }
|
|
1719
|
+
/**
|
|
1720
|
+
* @return {?}
|
|
1721
|
+
*/
|
|
1722
|
+
get _matRippleUnbounded() { return this.unbounded; }
|
|
1723
|
+
/**
|
|
1724
|
+
* @param {?} v
|
|
1725
|
+
* @return {?}
|
|
1726
|
+
*/
|
|
1727
|
+
set _matRippleUnbounded(v) { this.unbounded = v; }
|
|
1728
|
+
/**
|
|
1729
|
+
* @param {?} changes
|
|
1730
|
+
* @return {?}
|
|
1731
|
+
*/
|
|
1732
|
+
ngOnChanges(changes) {
|
|
1733
|
+
if ((changes['trigger'] || changes['_matRippleTrigger']) && this.trigger) {
|
|
1734
|
+
this._rippleRenderer.setTriggerElement(this.trigger);
|
|
1735
|
+
}
|
|
1736
|
+
this._updateRippleRenderer();
|
|
1737
|
+
}
|
|
1738
|
+
/**
|
|
1739
|
+
* @return {?}
|
|
1740
|
+
*/
|
|
1741
|
+
ngOnDestroy() {
|
|
1742
|
+
// Set the trigger element to null to cleanup all listeners.
|
|
1743
|
+
this._rippleRenderer.setTriggerElement(null);
|
|
1744
|
+
}
|
|
1745
|
+
/**
|
|
1746
|
+
* Launches a manual ripple at the specified position.
|
|
1747
|
+
* @param {?} pageX
|
|
1748
|
+
* @param {?} pageY
|
|
1749
|
+
* @param {?=} config
|
|
1750
|
+
* @return {?}
|
|
1751
|
+
*/
|
|
1752
|
+
launch(pageX, pageY, config = this.rippleConfig) {
|
|
1753
|
+
return this._rippleRenderer.fadeInRipple(pageX, pageY, config);
|
|
1754
|
+
}
|
|
1755
|
+
/**
|
|
1756
|
+
* Fades out all currently showing ripple elements.
|
|
1757
|
+
* @return {?}
|
|
1758
|
+
*/
|
|
1759
|
+
fadeOutAll() {
|
|
1760
|
+
this._rippleRenderer.fadeOutAll();
|
|
1761
|
+
}
|
|
1762
|
+
/**
|
|
1763
|
+
* Ripple configuration from the directive's input values.
|
|
1764
|
+
* @return {?}
|
|
1765
|
+
*/
|
|
1766
|
+
get rippleConfig() {
|
|
1767
|
+
return {
|
|
1768
|
+
centered: this.centered,
|
|
1769
|
+
speedFactor: this.speedFactor * (this._globalOptions.baseSpeedFactor || 1),
|
|
1770
|
+
radius: this.radius,
|
|
1771
|
+
color: this.color
|
|
1772
|
+
};
|
|
1773
|
+
}
|
|
1774
|
+
/**
|
|
1775
|
+
* Updates the ripple renderer with the latest ripple configuration.
|
|
1776
|
+
* @return {?}
|
|
1777
|
+
*/
|
|
1778
|
+
_updateRippleRenderer() {
|
|
1779
|
+
this._rippleRenderer.rippleDisabled = this._globalOptions.disabled || this.disabled;
|
|
1780
|
+
this._rippleRenderer.rippleConfig = this.rippleConfig;
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
MdRipple.decorators = [
|
|
1784
|
+
{ type: Directive, args: [{
|
|
1785
|
+
selector: '[md-ripple], [mat-ripple], [mdRipple], [matRipple]',
|
|
1786
|
+
exportAs: 'mdRipple, matRipple',
|
|
1787
|
+
host: {
|
|
1788
|
+
'class': 'mat-ripple',
|
|
1789
|
+
'[class.mat-ripple-unbounded]': 'unbounded'
|
|
1790
|
+
}
|
|
1791
|
+
},] },
|
|
1792
|
+
];
|
|
1793
|
+
/**
|
|
1794
|
+
* @nocollapse
|
|
1795
|
+
*/
|
|
1796
|
+
MdRipple.ctorParameters = () => [
|
|
1797
|
+
{ type: ElementRef, },
|
|
1798
|
+
{ type: NgZone, },
|
|
1799
|
+
{ type: ViewportRuler, },
|
|
1800
|
+
{ type: Platform, },
|
|
1801
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MD_RIPPLE_GLOBAL_OPTIONS,] },] },
|
|
1802
|
+
];
|
|
1803
|
+
MdRipple.propDecorators = {
|
|
1804
|
+
'trigger': [{ type: Input, args: ['mdRippleTrigger',] },],
|
|
1805
|
+
'centered': [{ type: Input, args: ['mdRippleCentered',] },],
|
|
1806
|
+
'disabled': [{ type: Input, args: ['mdRippleDisabled',] },],
|
|
1807
|
+
'radius': [{ type: Input, args: ['mdRippleRadius',] },],
|
|
1808
|
+
'speedFactor': [{ type: Input, args: ['mdRippleSpeedFactor',] },],
|
|
1809
|
+
'color': [{ type: Input, args: ['mdRippleColor',] },],
|
|
1810
|
+
'unbounded': [{ type: Input, args: ['mdRippleUnbounded',] },],
|
|
1811
|
+
'_matRippleTrigger': [{ type: Input, args: ['matRippleTrigger',] },],
|
|
1812
|
+
'_matRippleCentered': [{ type: Input, args: ['matRippleCentered',] },],
|
|
1813
|
+
'_matRippleDisabled': [{ type: Input, args: ['matRippleDisabled',] },],
|
|
1814
|
+
'_matRippleRadius': [{ type: Input, args: ['matRippleRadius',] },],
|
|
1815
|
+
'_matRippleSpeedFactor': [{ type: Input, args: ['matRippleSpeedFactor',] },],
|
|
1816
|
+
'_matRippleColor': [{ type: Input, args: ['matRippleColor',] },],
|
|
1817
|
+
'_matRippleUnbounded': [{ type: Input, args: ['matRippleUnbounded',] },],
|
|
1818
|
+
};
|
|
1819
|
+
|
|
1820
|
+
class MdRippleModule {
|
|
1821
|
+
}
|
|
1822
|
+
MdRippleModule.decorators = [
|
|
1823
|
+
{ type: NgModule, args: [{
|
|
1824
|
+
imports: [MdCommonModule, PlatformModule, ScrollDispatchModule],
|
|
1825
|
+
exports: [MdRipple, MdCommonModule],
|
|
1826
|
+
declarations: [MdRipple],
|
|
1827
|
+
providers: [VIEWPORT_RULER_PROVIDER],
|
|
1828
|
+
},] },
|
|
1829
|
+
];
|
|
1830
|
+
/**
|
|
1831
|
+
* @nocollapse
|
|
1832
|
+
*/
|
|
1833
|
+
MdRippleModule.ctorParameters = () => [];
|
|
1834
|
+
|
|
1835
|
+
/**
|
|
1836
|
+
* Component that shows a simplified checkbox without including any kind of "real" checkbox.
|
|
1837
|
+
* Meant to be used when the checkbox is purely decorative and a large number of them will be
|
|
1838
|
+
* included, such as for the options in a multi-select. Uses no SVGs or complex animations.
|
|
1839
|
+
* Note that theming is meant to be handled by the parent element, e.g.
|
|
1840
|
+
* `mat-primary .mat-pseudo-checkbox`.
|
|
1841
|
+
*
|
|
1842
|
+
* Note that this component will be completely invisible to screen-reader users. This is *not*
|
|
1843
|
+
* interchangeable with <md-checkbox> and should *not* be used if the user would directly interact
|
|
1844
|
+
* with the checkbox. The pseudo-checkbox should only be used as an implementation detail of
|
|
1845
|
+
* more complex components that appropriately handle selected / checked state.
|
|
1846
|
+
* \@docs-private
|
|
1847
|
+
*/
|
|
1848
|
+
class MdPseudoCheckbox {
|
|
1849
|
+
constructor() {
|
|
1850
|
+
/**
|
|
1851
|
+
* Display state of the checkbox.
|
|
1852
|
+
*/
|
|
1853
|
+
this.state = 'unchecked';
|
|
1854
|
+
/**
|
|
1855
|
+
* Whether the checkbox is disabled.
|
|
1856
|
+
*/
|
|
1857
|
+
this.disabled = false;
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
MdPseudoCheckbox.decorators = [
|
|
1861
|
+
{ type: Component, args: [{encapsulation: ViewEncapsulation.None,
|
|
1862
|
+
preserveWhitespaces: false,
|
|
1863
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1864
|
+
selector: 'md-pseudo-checkbox, mat-pseudo-checkbox',
|
|
1865
|
+
styles: [".mat-pseudo-checkbox{width:20px;height:20px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:'';border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:9px;left:2px;width:16px;opacity:1}.mat-pseudo-checkbox-checked::after{top:5px;left:3px;width:12px;height:5px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1}"],
|
|
1866
|
+
template: '',
|
|
1867
|
+
host: {
|
|
1868
|
+
'class': 'mat-pseudo-checkbox',
|
|
1869
|
+
'[class.mat-pseudo-checkbox-indeterminate]': 'state === "indeterminate"',
|
|
1870
|
+
'[class.mat-pseudo-checkbox-checked]': 'state === "checked"',
|
|
1871
|
+
'[class.mat-pseudo-checkbox-disabled]': 'disabled',
|
|
1872
|
+
},
|
|
1873
|
+
},] },
|
|
1874
|
+
];
|
|
1875
|
+
/**
|
|
1876
|
+
* @nocollapse
|
|
1877
|
+
*/
|
|
1878
|
+
MdPseudoCheckbox.ctorParameters = () => [];
|
|
1879
|
+
MdPseudoCheckbox.propDecorators = {
|
|
1880
|
+
'state': [{ type: Input },],
|
|
1881
|
+
'disabled': [{ type: Input },],
|
|
1882
|
+
};
|
|
1883
|
+
|
|
1884
|
+
class MdPseudoCheckboxModule {
|
|
1885
|
+
}
|
|
1886
|
+
MdPseudoCheckboxModule.decorators = [
|
|
1887
|
+
{ type: NgModule, args: [{
|
|
1888
|
+
exports: [MdPseudoCheckbox],
|
|
1889
|
+
declarations: [MdPseudoCheckbox]
|
|
1890
|
+
},] },
|
|
1891
|
+
];
|
|
1892
|
+
/**
|
|
1893
|
+
* @nocollapse
|
|
1894
|
+
*/
|
|
1895
|
+
MdPseudoCheckboxModule.ctorParameters = () => [];
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* \@docs-private
|
|
1899
|
+
*/
|
|
1900
|
+
class MdOptgroupBase {
|
|
1901
|
+
}
|
|
1902
|
+
const _MdOptgroupMixinBase = mixinDisabled(MdOptgroupBase);
|
|
1903
|
+
// Counter for unique group ids.
|
|
1904
|
+
let _uniqueOptgroupIdCounter = 0;
|
|
1905
|
+
/**
|
|
1906
|
+
* Component that is used to group instances of `md-option`.
|
|
1907
|
+
*/
|
|
1908
|
+
class MdOptgroup extends _MdOptgroupMixinBase {
|
|
1909
|
+
constructor() {
|
|
1910
|
+
super(...arguments);
|
|
1911
|
+
/**
|
|
1912
|
+
* Unique id for the underlying label.
|
|
1913
|
+
*/
|
|
1914
|
+
this._labelId = `mat-optgroup-label-${_uniqueOptgroupIdCounter++}`;
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
MdOptgroup.decorators = [
|
|
1918
|
+
{ type: Component, args: [{selector: 'md-optgroup, mat-optgroup',
|
|
1919
|
+
template: "<label class=\"mat-optgroup-label\" [id]=\"_labelId\">{{ label }}</label><ng-content select=\"md-option, mat-option\"></ng-content>",
|
|
1920
|
+
encapsulation: ViewEncapsulation.None,
|
|
1921
|
+
preserveWhitespaces: false,
|
|
1922
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1923
|
+
inputs: ['disabled'],
|
|
1924
|
+
host: {
|
|
1925
|
+
'class': 'mat-optgroup',
|
|
1926
|
+
'role': 'group',
|
|
1927
|
+
'[class.mat-optgroup-disabled]': 'disabled',
|
|
1928
|
+
'[attr.aria-disabled]': 'disabled.toString()',
|
|
1929
|
+
'[attr.aria-labelledby]': '_labelId',
|
|
1930
|
+
}
|
|
1931
|
+
},] },
|
|
1932
|
+
];
|
|
1933
|
+
/**
|
|
1934
|
+
* @nocollapse
|
|
1935
|
+
*/
|
|
1936
|
+
MdOptgroup.ctorParameters = () => [];
|
|
1937
|
+
MdOptgroup.propDecorators = {
|
|
1938
|
+
'label': [{ type: Input },],
|
|
1939
|
+
};
|
|
1940
|
+
|
|
1941
|
+
/**
|
|
1942
|
+
* Option IDs need to be unique across components, so this counter exists outside of
|
|
1943
|
+
* the component definition.
|
|
1944
|
+
*/
|
|
1945
|
+
let _uniqueIdCounter = 0;
|
|
1946
|
+
/**
|
|
1947
|
+
* Event object emitted by MdOption when selected or deselected.
|
|
1948
|
+
*/
|
|
1949
|
+
class MdOptionSelectionChange {
|
|
1950
|
+
/**
|
|
1951
|
+
* @param {?} source
|
|
1952
|
+
* @param {?=} isUserInput
|
|
1953
|
+
*/
|
|
1954
|
+
constructor(source, isUserInput = false) {
|
|
1955
|
+
this.source = source;
|
|
1956
|
+
this.isUserInput = isUserInput;
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
/**
|
|
1960
|
+
* Single option inside of a `<md-select>` element.
|
|
1961
|
+
*/
|
|
1962
|
+
class MdOption {
|
|
1963
|
+
/**
|
|
1964
|
+
* @param {?} _element
|
|
1965
|
+
* @param {?} _changeDetectorRef
|
|
1966
|
+
* @param {?} group
|
|
1967
|
+
*/
|
|
1968
|
+
constructor(_element, _changeDetectorRef, group) {
|
|
1969
|
+
this._element = _element;
|
|
1970
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
1971
|
+
this.group = group;
|
|
1972
|
+
this._selected = false;
|
|
1973
|
+
this._active = false;
|
|
1974
|
+
this._multiple = false;
|
|
1975
|
+
this._disableRipple = false;
|
|
1976
|
+
/**
|
|
1977
|
+
* Whether the option is disabled.
|
|
1978
|
+
*/
|
|
1979
|
+
this._disabled = false;
|
|
1980
|
+
this._id = `md-option-${_uniqueIdCounter++}`;
|
|
1981
|
+
/**
|
|
1982
|
+
* Event emitted when the option is selected or deselected.
|
|
1983
|
+
*/
|
|
1984
|
+
this.onSelectionChange = new EventEmitter();
|
|
1985
|
+
}
|
|
1986
|
+
/**
|
|
1987
|
+
* Whether the wrapping component is in multiple selection mode.
|
|
1988
|
+
* @return {?}
|
|
1989
|
+
*/
|
|
1990
|
+
get multiple() { return this._multiple; }
|
|
1991
|
+
/**
|
|
1992
|
+
* @param {?} value
|
|
1993
|
+
* @return {?}
|
|
1994
|
+
*/
|
|
1995
|
+
set multiple(value) {
|
|
1996
|
+
if (value !== this._multiple) {
|
|
1997
|
+
this._multiple = value;
|
|
1998
|
+
this._changeDetectorRef.markForCheck();
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
/**
|
|
2002
|
+
* The unique ID of the option.
|
|
2003
|
+
* @return {?}
|
|
2004
|
+
*/
|
|
2005
|
+
get id() { return this._id; }
|
|
2006
|
+
/**
|
|
2007
|
+
* Whether or not the option is currently selected.
|
|
2008
|
+
* @return {?}
|
|
2009
|
+
*/
|
|
2010
|
+
get selected() { return this._selected; }
|
|
2011
|
+
/**
|
|
2012
|
+
* Whether the option is disabled.
|
|
2013
|
+
* @return {?}
|
|
2014
|
+
*/
|
|
2015
|
+
get disabled() { return (this.group && this.group.disabled) || this._disabled; }
|
|
2016
|
+
/**
|
|
2017
|
+
* @param {?} value
|
|
2018
|
+
* @return {?}
|
|
2019
|
+
*/
|
|
2020
|
+
set disabled(value) { this._disabled = coerceBooleanProperty(value); }
|
|
2021
|
+
/**
|
|
2022
|
+
* Whether ripples for the option are disabled.
|
|
2023
|
+
* @return {?}
|
|
2024
|
+
*/
|
|
2025
|
+
get disableRipple() { return this._disableRipple; }
|
|
2026
|
+
/**
|
|
2027
|
+
* @param {?} value
|
|
2028
|
+
* @return {?}
|
|
2029
|
+
*/
|
|
2030
|
+
set disableRipple(value) {
|
|
2031
|
+
this._disableRipple = value;
|
|
2032
|
+
this._changeDetectorRef.markForCheck();
|
|
2033
|
+
}
|
|
2034
|
+
/**
|
|
2035
|
+
* Whether or not the option is currently active and ready to be selected.
|
|
2036
|
+
* An active option displays styles as if it is focused, but the
|
|
2037
|
+
* focus is actually retained somewhere else. This comes in handy
|
|
2038
|
+
* for components like autocomplete where focus must remain on the input.
|
|
2039
|
+
* @return {?}
|
|
2040
|
+
*/
|
|
2041
|
+
get active() {
|
|
2042
|
+
return this._active;
|
|
2043
|
+
}
|
|
2044
|
+
/**
|
|
2045
|
+
* The displayed value of the option. It is necessary to show the selected option in the
|
|
2046
|
+
* select's trigger.
|
|
2047
|
+
* @return {?}
|
|
2048
|
+
*/
|
|
2049
|
+
get viewValue() {
|
|
2050
|
+
// TODO(kara): Add input property alternative for node envs.
|
|
2051
|
+
return (this._getHostElement().textContent || '').trim();
|
|
2052
|
+
}
|
|
2053
|
+
/**
|
|
2054
|
+
* Selects the option.
|
|
2055
|
+
* @return {?}
|
|
2056
|
+
*/
|
|
2057
|
+
select() {
|
|
2058
|
+
this._selected = true;
|
|
2059
|
+
this._changeDetectorRef.markForCheck();
|
|
2060
|
+
this._emitSelectionChangeEvent();
|
|
2061
|
+
}
|
|
2062
|
+
/**
|
|
2063
|
+
* Deselects the option.
|
|
2064
|
+
* @return {?}
|
|
2065
|
+
*/
|
|
2066
|
+
deselect() {
|
|
2067
|
+
this._selected = false;
|
|
2068
|
+
this._changeDetectorRef.markForCheck();
|
|
2069
|
+
this._emitSelectionChangeEvent();
|
|
2070
|
+
}
|
|
2071
|
+
/**
|
|
2072
|
+
* Sets focus onto this option.
|
|
2073
|
+
* @return {?}
|
|
2074
|
+
*/
|
|
2075
|
+
focus() {
|
|
2076
|
+
const /** @type {?} */ element = this._getHostElement();
|
|
2077
|
+
if (typeof element.focus === 'function') {
|
|
2078
|
+
element.focus();
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
/**
|
|
2082
|
+
* This method sets display styles on the option to make it appear
|
|
2083
|
+
* active. This is used by the ActiveDescendantKeyManager so key
|
|
2084
|
+
* events will display the proper options as active on arrow key events.
|
|
2085
|
+
* @return {?}
|
|
2086
|
+
*/
|
|
2087
|
+
setActiveStyles() {
|
|
2088
|
+
if (!this._active) {
|
|
2089
|
+
this._active = true;
|
|
2090
|
+
this._changeDetectorRef.markForCheck();
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
/**
|
|
2094
|
+
* This method removes display styles on the option that made it appear
|
|
2095
|
+
* active. This is used by the ActiveDescendantKeyManager so key
|
|
2096
|
+
* events will display the proper options as active on arrow key events.
|
|
2097
|
+
* @return {?}
|
|
2098
|
+
*/
|
|
2099
|
+
setInactiveStyles() {
|
|
2100
|
+
if (this._active) {
|
|
2101
|
+
this._active = false;
|
|
2102
|
+
this._changeDetectorRef.markForCheck();
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
/**
|
|
2106
|
+
* Gets the label to be used when determining whether the option should be focused.
|
|
2107
|
+
* @return {?}
|
|
2108
|
+
*/
|
|
2109
|
+
getLabel() {
|
|
2110
|
+
return this.viewValue;
|
|
2111
|
+
}
|
|
2112
|
+
/**
|
|
2113
|
+
* Ensures the option is selected when activated from the keyboard.
|
|
2114
|
+
* @param {?} event
|
|
2115
|
+
* @return {?}
|
|
2116
|
+
*/
|
|
2117
|
+
_handleKeydown(event) {
|
|
2118
|
+
if (event.keyCode === ENTER || event.keyCode === SPACE) {
|
|
2119
|
+
this._selectViaInteraction();
|
|
2120
|
+
// Prevent the page from scrolling down and form submits.
|
|
2121
|
+
event.preventDefault();
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
/**
|
|
2125
|
+
* Selects the option while indicating the selection came from the user. Used to
|
|
2126
|
+
* determine if the select's view -> model callback should be invoked.
|
|
2127
|
+
* @return {?}
|
|
2128
|
+
*/
|
|
2129
|
+
_selectViaInteraction() {
|
|
2130
|
+
if (!this.disabled) {
|
|
2131
|
+
this._selected = this.multiple ? !this._selected : true;
|
|
2132
|
+
this._changeDetectorRef.markForCheck();
|
|
2133
|
+
this._emitSelectionChangeEvent(true);
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
/**
|
|
2137
|
+
* Returns the correct tabindex for the option depending on disabled state.
|
|
2138
|
+
* @return {?}
|
|
2139
|
+
*/
|
|
2140
|
+
_getTabIndex() {
|
|
2141
|
+
return this.disabled ? '-1' : '0';
|
|
2142
|
+
}
|
|
2143
|
+
/**
|
|
2144
|
+
* Gets the host DOM element.
|
|
2145
|
+
* @return {?}
|
|
2146
|
+
*/
|
|
2147
|
+
_getHostElement() {
|
|
2148
|
+
return this._element.nativeElement;
|
|
2149
|
+
}
|
|
2150
|
+
/**
|
|
2151
|
+
* Emits the selection change event.
|
|
2152
|
+
* @param {?=} isUserInput
|
|
2153
|
+
* @return {?}
|
|
2154
|
+
*/
|
|
2155
|
+
_emitSelectionChangeEvent(isUserInput = false) {
|
|
2156
|
+
this.onSelectionChange.emit(new MdOptionSelectionChange(this, isUserInput));
|
|
2157
|
+
}
|
|
2158
|
+
/**
|
|
2159
|
+
* Counts the amount of option group labels that precede the specified option.
|
|
2160
|
+
* @param {?} optionIndex Index of the option at which to start counting.
|
|
2161
|
+
* @param {?} options Flat list of all of the options.
|
|
2162
|
+
* @param {?} optionGroups Flat list of all of the option groups.
|
|
2163
|
+
* @return {?}
|
|
2164
|
+
*/
|
|
2165
|
+
static countGroupLabelsBeforeOption(optionIndex, options, optionGroups) {
|
|
2166
|
+
if (optionGroups.length) {
|
|
2167
|
+
let /** @type {?} */ optionsArray = options.toArray();
|
|
2168
|
+
let /** @type {?} */ groups = optionGroups.toArray();
|
|
2169
|
+
let /** @type {?} */ groupCounter = 0;
|
|
2170
|
+
for (let /** @type {?} */ i = 0; i < optionIndex + 1; i++) {
|
|
2171
|
+
if (optionsArray[i].group && optionsArray[i].group === groups[groupCounter]) {
|
|
2172
|
+
groupCounter++;
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
return groupCounter;
|
|
2176
|
+
}
|
|
2177
|
+
return 0;
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2180
|
+
MdOption.decorators = [
|
|
2181
|
+
{ type: Component, args: [{selector: 'md-option, mat-option',
|
|
2182
|
+
host: {
|
|
2183
|
+
'role': 'option',
|
|
2184
|
+
'[attr.tabindex]': '_getTabIndex()',
|
|
2185
|
+
'[class.mat-selected]': 'selected',
|
|
2186
|
+
'[class.mat-option-multiple]': 'multiple',
|
|
2187
|
+
'[class.mat-active]': 'active',
|
|
2188
|
+
'[id]': 'id',
|
|
2189
|
+
'[attr.aria-selected]': 'selected.toString()',
|
|
2190
|
+
'[attr.aria-disabled]': 'disabled.toString()',
|
|
2191
|
+
'[class.mat-option-disabled]': 'disabled',
|
|
2192
|
+
'(click)': '_selectViaInteraction()',
|
|
2193
|
+
'(keydown)': '_handleKeydown($event)',
|
|
2194
|
+
'class': 'mat-option',
|
|
2195
|
+
},
|
|
2196
|
+
template: "<span *ngIf=\"multiple\"><mat-pseudo-checkbox class=\"mat-option-pseudo-checkbox\" [state]=\"selected ? 'checked' : ''\" [disabled]=\"disabled\"></mat-pseudo-checkbox></span><ng-content></ng-content><div class=\"mat-option-ripple\" mat-ripple [matRippleTrigger]=\"_getHostElement()\" [matRippleDisabled]=\"disabled || disableRipple\"></div>",
|
|
2197
|
+
encapsulation: ViewEncapsulation.None,
|
|
2198
|
+
preserveWhitespaces: false,
|
|
2199
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2200
|
+
viewProviders: [{ provide: MATERIAL_COMPATIBILITY_MODE, useValue: true }],
|
|
2201
|
+
},] },
|
|
2202
|
+
];
|
|
2203
|
+
/**
|
|
2204
|
+
* @nocollapse
|
|
2205
|
+
*/
|
|
2206
|
+
MdOption.ctorParameters = () => [
|
|
2207
|
+
{ type: ElementRef, },
|
|
2208
|
+
{ type: ChangeDetectorRef, },
|
|
2209
|
+
{ type: MdOptgroup, decorators: [{ type: Optional },] },
|
|
2210
|
+
];
|
|
2211
|
+
MdOption.propDecorators = {
|
|
2212
|
+
'value': [{ type: Input },],
|
|
2213
|
+
'disabled': [{ type: Input },],
|
|
2214
|
+
'onSelectionChange': [{ type: Output },],
|
|
2215
|
+
};
|
|
2216
|
+
|
|
2217
|
+
class MdOptionModule {
|
|
2218
|
+
}
|
|
2219
|
+
MdOptionModule.decorators = [
|
|
2220
|
+
{ type: NgModule, args: [{
|
|
2221
|
+
imports: [MdRippleModule, CommonModule, MdPseudoCheckboxModule],
|
|
2222
|
+
exports: [MdOption, MdOptgroup],
|
|
2223
|
+
declarations: [MdOption, MdOptgroup]
|
|
2224
|
+
},] },
|
|
2225
|
+
];
|
|
2226
|
+
/**
|
|
2227
|
+
* @nocollapse
|
|
2228
|
+
*/
|
|
2229
|
+
MdOptionModule.ctorParameters = () => [];
|
|
2230
|
+
|
|
2231
|
+
/**
|
|
2232
|
+
* InjectionToken that can be used to specify the global placeholder options.
|
|
2233
|
+
*/
|
|
2234
|
+
const MD_PLACEHOLDER_GLOBAL_OPTIONS = new InjectionToken('md-placeholder-global-options');
|
|
2235
|
+
|
|
2236
|
+
/**
|
|
2237
|
+
* Custom injector to be used when providing custom
|
|
2238
|
+
* injection tokens to components inside a portal.
|
|
2239
|
+
* \@docs-private
|
|
2240
|
+
*/
|
|
2241
|
+
class PortalInjector {
|
|
2242
|
+
/**
|
|
2243
|
+
* @param {?} _parentInjector
|
|
2244
|
+
* @param {?} _customTokens
|
|
2245
|
+
*/
|
|
2246
|
+
constructor(_parentInjector, _customTokens) {
|
|
2247
|
+
this._parentInjector = _parentInjector;
|
|
2248
|
+
this._customTokens = _customTokens;
|
|
2249
|
+
}
|
|
2250
|
+
/**
|
|
2251
|
+
* @param {?} token
|
|
2252
|
+
* @param {?=} notFoundValue
|
|
2253
|
+
* @return {?}
|
|
2254
|
+
*/
|
|
2255
|
+
get(token, notFoundValue) {
|
|
2256
|
+
const /** @type {?} */ value = this._customTokens.get(token);
|
|
2257
|
+
if (typeof value !== 'undefined') {
|
|
2258
|
+
return value;
|
|
2259
|
+
}
|
|
2260
|
+
return this._parentInjector.get(token, notFoundValue);
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
/**
|
|
2265
|
+
* Applies a CSS transform to an element, including browser-prefixed properties.
|
|
2266
|
+
* @param {?} element
|
|
2267
|
+
* @param {?} transformValue
|
|
2268
|
+
* @return {?}
|
|
2269
|
+
*/
|
|
2270
|
+
function applyCssTransform(element, transformValue) {
|
|
2271
|
+
// It's important to trim the result, because the browser will ignore the set operation
|
|
2272
|
+
// if the string contains only whitespace.
|
|
2273
|
+
let /** @type {?} */ value = transformValue.trim();
|
|
2274
|
+
element.style.transform = value;
|
|
2275
|
+
element.style.webkitTransform = value;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
/**
|
|
2279
|
+
* @deprecated
|
|
2280
|
+
*/
|
|
2281
|
+
class StyleModule {
|
|
2282
|
+
}
|
|
2283
|
+
StyleModule.decorators = [
|
|
2284
|
+
{ type: NgModule, args: [{
|
|
2285
|
+
imports: [A11yModule],
|
|
2286
|
+
exports: [A11yModule],
|
|
2287
|
+
},] },
|
|
2288
|
+
];
|
|
2289
|
+
/**
|
|
2290
|
+
* @nocollapse
|
|
2291
|
+
*/
|
|
2292
|
+
StyleModule.ctorParameters = () => [];
|
|
2293
|
+
|
|
2294
|
+
/**
|
|
2295
|
+
* When constructing a Date, the month is zero-based. This can be confusing, since people are
|
|
2296
|
+
* used to seeing them one-based. So we create these aliases to make writing the tests easier.
|
|
2297
|
+
*/
|
|
2298
|
+
const JAN = 0;
|
|
2299
|
+
const FEB = 1;
|
|
2300
|
+
const MAR = 2;
|
|
2301
|
+
const APR = 3;
|
|
2302
|
+
const MAY = 4;
|
|
2303
|
+
const JUN = 5;
|
|
2304
|
+
const JUL = 6;
|
|
2305
|
+
const AUG = 7;
|
|
2306
|
+
const SEP = 8;
|
|
2307
|
+
const OCT = 9;
|
|
2308
|
+
const NOV = 10;
|
|
2309
|
+
const DEC = 11;
|
|
2310
|
+
|
|
2311
|
+
/**
|
|
2312
|
+
* Generated bundle index. Do not edit.
|
|
2313
|
+
*/
|
|
2314
|
+
|
|
2315
|
+
export { A11yModule, AnimationCurves, AnimationDurations, Directionality, DIRECTIONALITY_PROVIDER, DIR_DOCUMENT, Dir, BidiModule, MdCommonModule, MATERIAL_SANITY_CHECKS, mixinDisabled, mixinColor, mixinDisableRipple, mixinTabIndex, MATERIAL_COMPATIBILITY_MODE, getMdCompatibilityInvalidPrefixError, MAT_ELEMENTS_SELECTOR, MD_ELEMENTS_SELECTOR, MatPrefixRejector, MdPrefixRejector, CompatibilityModule, NoConflictStyleCompatibilityMode, UniqueSelectionDispatcher, UNIQUE_SELECTION_DISPATCHER_PROVIDER_FACTORY, UNIQUE_SELECTION_DISPATCHER_PROVIDER, NativeDateModule, MdNativeDateModule, MAT_DATE_LOCALE, MAT_DATE_LOCALE_PROVIDER, DateAdapter, MD_DATE_FORMATS, NativeDateAdapter, MD_NATIVE_DATE_FORMATS, MD_ERROR_GLOBAL_OPTIONS, defaultErrorStateMatcher, showOnDirtyErrorStateMatcher, GestureConfig, UP_ARROW, DOWN_ARROW, RIGHT_ARROW, LEFT_ARROW, PAGE_UP, PAGE_DOWN, HOME, END, ENTER, SPACE, TAB, ESCAPE, BACKSPACE, DELETE, A, Z, MdLine, MdLineSetter, MdLineModule, MdOptionModule, MdOptionSelectionChange, MdOption, MdOptgroupBase, _MdOptgroupMixinBase, MdOptgroup, OVERLAY_PROVIDERS, OverlayModule, Overlay, OverlayContainer, FullscreenOverlayContainer, OverlayRef, ConnectedOverlayDirective, OverlayOrigin, ViewportRuler$1 as ViewportRuler, GlobalPositionStrategy, ConnectedPositionStrategy, VIEWPORT_RULER_PROVIDER$1 as VIEWPORT_RULER_PROVIDER, OverlayConfig, ConnectionPositionPair, ScrollingVisibility, ConnectedOverlayPositionChange, Scrollable, ScrollDispatcher, ScrollStrategyOptions, RepositionScrollStrategy, CloseScrollStrategy, NoopScrollStrategy, BlockScrollStrategy, MD_PLACEHOLDER_GLOBAL_OPTIONS, PlatformModule, Platform, getSupportedInputTypes, Portal, BasePortalHost, ComponentPortal, TemplatePortal, DomPortalHost, TemplatePortalDirective, PortalHostDirective, PortalModule, PortalInjector, MdRipple, MD_RIPPLE_GLOBAL_OPTIONS, RippleRef, RippleState, RIPPLE_FADE_IN_DURATION, RIPPLE_FADE_OUT_DURATION, MdRippleModule, RxChain, FinallyBrand, CatchBrand, DoBrand, MapBrand, FilterBrand, ShareBrand, FirstBrand, SwitchMapBrand, StartWithBrand, DebounceTimeBrand, AuditTimeBrand, TakeUntilBrand, finallyOperator, catchOperator, doOperator, map, filter, share, first, switchMap, startWith, debounceTime, auditTime, takeUntil, MdPseudoCheckboxModule, MdPseudoCheckbox, StyleModule, CdkMonitorFocus, FocusMonitor, FOCUS_MONITOR_PROVIDER, applyCssTransform, extendObject, MD_DATE_FORMATS as MAT_DATE_FORMATS, MD_RIPPLE_GLOBAL_OPTIONS as MAT_RIPPLE_GLOBAL_OPTIONS, MD_NATIVE_DATE_FORMATS as MAT_NATIVE_DATE_FORMATS, MD_PLACEHOLDER_GLOBAL_OPTIONS as MAT_PLACEHOLDER_GLOBAL_OPTIONS, MD_ERROR_GLOBAL_OPTIONS as MAT_ERROR_GLOBAL_OPTIONS, MdCommonModule as MatCommonModule, MdLine as MatLine, MdLineModule as MatLineModule, MdLineSetter as MatLineSetter, MdOptgroup as MatOptgroup, MdOptgroupBase as MatOptgroupBase, MdOption as MatOption, MdOptionModule as MatOptionModule, MdOptionSelectionChange as MatOptionSelectionChange, MdNativeDateModule as MatNativeDateModule, MdPseudoCheckbox as MatPseudoCheckbox, MdPseudoCheckboxModule as MatPseudoCheckboxModule, MdRipple as MatRipple, MdRippleModule as MatRippleModule, JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC, RippleRenderer as ɵa0 };
|
|
2316
|
+
//# sourceMappingURL=core.js.map
|