@angular/material 7.0.4 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/_theming.scss +61 -44
- package/autocomplete/typings/index.d.ts +1 -1
- package/autocomplete/typings/index.metadata.json +1 -1
- package/badge/typings/index.metadata.json +1 -1
- package/bottom-sheet/typings/bottom-sheet-config.d.ts +5 -0
- package/bottom-sheet/typings/bottom-sheet-container.d.ts +1 -1
- package/bottom-sheet/typings/index.metadata.json +1 -1
- package/bundles/material-autocomplete.umd.js +126 -32
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-autocomplete.umd.min.js +1 -1
- package/bundles/material-autocomplete.umd.min.js.map +1 -1
- package/bundles/material-badge.umd.js +38 -5
- package/bundles/material-badge.umd.js.map +1 -1
- package/bundles/material-badge.umd.min.js +1 -1
- package/bundles/material-badge.umd.min.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.js +68 -21
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.min.js +1 -1
- package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
- package/bundles/material-button-toggle.umd.js +36 -13
- package/bundles/material-button-toggle.umd.js.map +1 -1
- package/bundles/material-button-toggle.umd.min.js +1 -1
- package/bundles/material-button-toggle.umd.min.js.map +1 -1
- package/bundles/material-button.umd.js +21 -14
- package/bundles/material-button.umd.js.map +1 -1
- package/bundles/material-button.umd.min.js +1 -1
- package/bundles/material-button.umd.min.js.map +1 -1
- package/bundles/material-card.umd.js +3 -3
- package/bundles/material-card.umd.js.map +1 -1
- package/bundles/material-card.umd.min.js +1 -1
- package/bundles/material-card.umd.min.js.map +1 -1
- package/bundles/material-checkbox.umd.js +56 -15
- package/bundles/material-checkbox.umd.js.map +1 -1
- package/bundles/material-checkbox.umd.min.js +1 -1
- package/bundles/material-checkbox.umd.min.js.map +1 -1
- package/bundles/material-chips.umd.js +124 -34
- package/bundles/material-chips.umd.js.map +1 -1
- package/bundles/material-chips.umd.min.js +1 -1
- package/bundles/material-chips.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +189 -126
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +1 -1
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +231 -53
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +2 -2
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-dialog.umd.js +138 -40
- package/bundles/material-dialog.umd.js.map +1 -1
- package/bundles/material-dialog.umd.min.js +1 -1
- package/bundles/material-dialog.umd.min.js.map +1 -1
- package/bundles/material-divider.umd.js +2 -2
- package/bundles/material-divider.umd.js.map +1 -1
- package/bundles/material-divider.umd.min.js.map +1 -1
- package/bundles/material-expansion.umd.js +53 -27
- package/bundles/material-expansion.umd.js.map +1 -1
- package/bundles/material-expansion.umd.min.js +1 -1
- package/bundles/material-expansion.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +121 -32
- package/bundles/material-form-field.umd.js.map +1 -1
- package/bundles/material-form-field.umd.min.js +1 -1
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-grid-list.umd.js +66 -15
- package/bundles/material-grid-list.umd.js.map +1 -1
- package/bundles/material-grid-list.umd.min.js +1 -1
- package/bundles/material-grid-list.umd.min.js.map +1 -1
- package/bundles/material-icon.umd.js +277 -78
- package/bundles/material-icon.umd.js.map +1 -1
- package/bundles/material-icon.umd.min.js +1 -1
- package/bundles/material-icon.umd.min.js.map +1 -1
- package/bundles/material-input.umd.js +50 -22
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-input.umd.min.js +1 -1
- package/bundles/material-input.umd.min.js.map +1 -1
- package/bundles/material-list.umd.js +69 -21
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +2 -6
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +171 -66
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +1 -1
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-paginator.umd.js +52 -10
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-paginator.umd.min.js +1 -1
- package/bundles/material-paginator.umd.min.js.map +1 -1
- package/bundles/material-progress-bar.umd.js +31 -12
- package/bundles/material-progress-bar.umd.js.map +1 -1
- package/bundles/material-progress-bar.umd.min.js +1 -1
- package/bundles/material-progress-bar.umd.min.js.map +1 -1
- package/bundles/material-progress-spinner.umd.js +29 -13
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.min.js.map +1 -1
- package/bundles/material-radio.umd.js +38 -40
- package/bundles/material-radio.umd.js.map +1 -1
- package/bundles/material-radio.umd.min.js +1 -1
- package/bundles/material-radio.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +189 -51
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +1 -1
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-sidenav.umd.js +104 -25
- package/bundles/material-sidenav.umd.js.map +1 -1
- package/bundles/material-sidenav.umd.min.js +1 -1
- package/bundles/material-sidenav.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle.umd.js +30 -14
- package/bundles/material-slide-toggle.umd.js.map +1 -1
- package/bundles/material-slide-toggle.umd.min.js +1 -1
- package/bundles/material-slide-toggle.umd.min.js.map +1 -1
- package/bundles/material-slider.umd.js +91 -21
- package/bundles/material-slider.umd.js.map +1 -1
- package/bundles/material-slider.umd.min.js +1 -1
- package/bundles/material-slider.umd.min.js.map +1 -1
- package/bundles/material-snack-bar.umd.js +71 -19
- package/bundles/material-snack-bar.umd.js.map +1 -1
- package/bundles/material-snack-bar.umd.min.js +1 -1
- package/bundles/material-snack-bar.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +46 -24
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +1 -1
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-stepper.umd.js +37 -35
- package/bundles/material-stepper.umd.js.map +1 -1
- package/bundles/material-stepper.umd.min.js +1 -1
- package/bundles/material-stepper.umd.min.js.map +1 -1
- package/bundles/material-table.umd.js +29 -9
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +170 -68
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +2 -2
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-toolbar.umd.js +14 -4
- package/bundles/material-toolbar.umd.js.map +1 -1
- package/bundles/material-toolbar.umd.min.js +1 -1
- package/bundles/material-toolbar.umd.min.js.map +1 -1
- package/bundles/material-tooltip.umd.js +53 -26
- package/bundles/material-tooltip.umd.js.map +1 -1
- package/bundles/material-tooltip.umd.min.js +1 -1
- package/bundles/material-tooltip.umd.min.js.map +1 -1
- package/bundles/material-tree.umd.js +25 -16
- package/bundles/material-tree.umd.js.map +1 -1
- package/bundles/material-tree.umd.min.js +1 -1
- package/bundles/material-tree.umd.min.js.map +1 -1
- package/bundles/material.umd.js +2853 -1010
- package/bundles/material.umd.js.map +1 -1
- package/bundles/material.umd.min.js +19 -21
- package/bundles/material.umd.min.js.map +1 -1
- package/button/typings/button.d.ts +0 -5
- package/button/typings/index.metadata.json +1 -1
- package/button-toggle/typings/index.metadata.json +1 -1
- package/card/typings/index.metadata.json +1 -1
- package/checkbox/typings/index.metadata.json +1 -1
- package/chips/typings/chip-list.d.ts +1 -1
- package/chips/typings/chip.d.ts +2 -2
- package/chips/typings/index.metadata.json +1 -1
- package/core/typings/index.metadata.json +1 -1
- package/core/typings/{testing/month-constants.d.ts → month-constants.d.ts} +2 -0
- package/core/typings/public-api.d.ts +1 -1
- package/datepicker/typings/calendar-body.d.ts +21 -5
- package/datepicker/typings/calendar.d.ts +4 -1
- package/datepicker/typings/datepicker.d.ts +3 -0
- package/datepicker/typings/index.metadata.json +1 -1
- package/datepicker/typings/month-view.d.ts +4 -2
- package/dialog/typings/index.metadata.json +1 -1
- package/esm2015/autocomplete.js +60 -29
- package/esm2015/autocomplete.js.map +1 -1
- package/esm2015/badge.js +29 -6
- package/esm2015/badge.js.map +1 -1
- package/esm2015/bottom-sheet.js +45 -22
- package/esm2015/bottom-sheet.js.map +1 -1
- package/esm2015/button-toggle.js +20 -11
- package/esm2015/button-toggle.js.map +1 -1
- package/esm2015/button.js +20 -15
- package/esm2015/button.js.map +1 -1
- package/esm2015/card.js +5 -5
- package/esm2015/card.js.map +1 -1
- package/esm2015/checkbox.js +30 -12
- package/esm2015/checkbox.js.map +1 -1
- package/esm2015/chips.js +64 -28
- package/esm2015/chips.js.map +1 -1
- package/esm2015/core.js +148 -129
- package/esm2015/core.js.map +1 -1
- package/esm2015/datepicker.js +124 -41
- package/esm2015/datepicker.js.map +1 -1
- package/esm2015/dialog.js +77 -40
- package/esm2015/dialog.js.map +1 -1
- package/esm2015/divider.js +4 -4
- package/esm2015/divider.js.map +1 -1
- package/esm2015/expansion.js +58 -31
- package/esm2015/expansion.js.map +1 -1
- package/esm2015/form-field.js +94 -34
- package/esm2015/form-field.js.map +1 -1
- package/esm2015/grid-list.js +45 -17
- package/esm2015/grid-list.js.map +1 -1
- package/esm2015/icon.js +136 -67
- package/esm2015/icon.js.map +1 -1
- package/esm2015/input.js +44 -23
- package/esm2015/input.js.map +1 -1
- package/esm2015/list.js +47 -22
- package/esm2015/list.js.map +1 -1
- package/esm2015/material.js +13 -12
- package/esm2015/material.js.map +1 -1
- package/esm2015/menu.js +109 -63
- package/esm2015/menu.js.map +1 -1
- package/esm2015/paginator.js +35 -12
- package/esm2015/paginator.js.map +1 -1
- package/esm2015/progress-bar.js +26 -13
- package/esm2015/progress-bar.js.map +1 -1
- package/esm2015/progress-spinner.js +24 -14
- package/esm2015/progress-spinner.js.map +1 -1
- package/esm2015/radio.js +22 -21
- package/esm2015/radio.js.map +1 -1
- package/esm2015/select.js +116 -53
- package/esm2015/select.js.map +1 -1
- package/esm2015/sidenav.js +75 -28
- package/esm2015/sidenav.js.map +1 -1
- package/esm2015/slide-toggle.js +23 -15
- package/esm2015/slide-toggle.js.map +1 -1
- package/esm2015/slider.js +54 -24
- package/esm2015/slider.js.map +1 -1
- package/esm2015/snack-bar.js +41 -21
- package/esm2015/snack-bar.js.map +1 -1
- package/esm2015/sort.js +47 -24
- package/esm2015/sort.js.map +1 -1
- package/esm2015/stepper.js +35 -32
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +31 -11
- package/esm2015/table.js.map +1 -1
- package/esm2015/tabs.js +113 -53
- package/esm2015/tabs.js.map +1 -1
- package/esm2015/toolbar.js +9 -5
- package/esm2015/toolbar.js.map +1 -1
- package/esm2015/tooltip.js +43 -28
- package/esm2015/tooltip.js.map +1 -1
- package/esm2015/tree.js +22 -17
- package/esm2015/tree.js.map +1 -1
- package/esm5/autocomplete.es5.js +128 -34
- package/esm5/autocomplete.es5.js.map +1 -1
- package/esm5/badge.es5.js +40 -7
- package/esm5/badge.es5.js.map +1 -1
- package/esm5/bottom-sheet.es5.js +70 -23
- package/esm5/bottom-sheet.es5.js.map +1 -1
- package/esm5/button-toggle.es5.js +38 -15
- package/esm5/button-toggle.es5.js.map +1 -1
- package/esm5/button.es5.js +23 -16
- package/esm5/button.es5.js.map +1 -1
- package/esm5/card.es5.js +5 -5
- package/esm5/card.es5.js.map +1 -1
- package/esm5/checkbox.es5.js +58 -17
- package/esm5/checkbox.es5.js.map +1 -1
- package/esm5/chips.es5.js +127 -37
- package/esm5/chips.es5.js.map +1 -1
- package/esm5/core.es5.js +192 -129
- package/esm5/core.es5.js.map +1 -1
- package/esm5/datepicker.es5.js +233 -55
- package/esm5/datepicker.es5.js.map +1 -1
- package/esm5/dialog.es5.js +140 -42
- package/esm5/dialog.es5.js.map +1 -1
- package/esm5/divider.es5.js +4 -4
- package/esm5/divider.es5.js.map +1 -1
- package/esm5/expansion.es5.js +56 -31
- package/esm5/expansion.es5.js.map +1 -1
- package/esm5/form-field.es5.js +125 -36
- package/esm5/form-field.es5.js.map +1 -1
- package/esm5/grid-list.es5.js +68 -17
- package/esm5/grid-list.es5.js.map +1 -1
- package/esm5/icon.es5.js +279 -80
- package/esm5/icon.es5.js.map +1 -1
- package/esm5/input.es5.js +52 -24
- package/esm5/input.es5.js.map +1 -1
- package/esm5/list.es5.js +72 -24
- package/esm5/list.es5.js.map +1 -1
- package/esm5/material.es5.js +13 -12
- package/esm5/material.es5.js.map +1 -1
- package/esm5/menu.es5.js +170 -65
- package/esm5/menu.es5.js.map +1 -1
- package/esm5/paginator.es5.js +55 -13
- package/esm5/paginator.es5.js.map +1 -1
- package/esm5/progress-bar.es5.js +33 -14
- package/esm5/progress-bar.es5.js.map +1 -1
- package/esm5/progress-spinner.es5.js +31 -15
- package/esm5/progress-spinner.es5.js.map +1 -1
- package/esm5/radio.es5.js +42 -42
- package/esm5/radio.es5.js.map +1 -1
- package/esm5/select.es5.js +193 -55
- package/esm5/select.es5.js.map +1 -1
- package/esm5/sidenav.es5.js +107 -28
- package/esm5/sidenav.es5.js.map +1 -1
- package/esm5/slide-toggle.es5.js +32 -16
- package/esm5/slide-toggle.es5.js.map +1 -1
- package/esm5/slider.es5.js +94 -24
- package/esm5/slider.es5.js.map +1 -1
- package/esm5/snack-bar.es5.js +73 -21
- package/esm5/snack-bar.es5.js.map +1 -1
- package/esm5/sort.es5.js +53 -26
- package/esm5/sort.es5.js.map +1 -1
- package/esm5/stepper.es5.js +40 -38
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +31 -11
- package/esm5/table.es5.js.map +1 -1
- package/esm5/tabs.es5.js +162 -61
- package/esm5/tabs.es5.js.map +1 -1
- package/esm5/toolbar.es5.js +16 -6
- package/esm5/toolbar.es5.js.map +1 -1
- package/esm5/tooltip.es5.js +55 -28
- package/esm5/tooltip.es5.js.map +1 -1
- package/esm5/tree.es5.js +27 -18
- package/esm5/tree.es5.js.map +1 -1
- package/expansion/typings/expansion-panel-header.d.ts +2 -2
- package/expansion/typings/expansion-panel.d.ts +19 -2
- package/expansion/typings/index.metadata.json +1 -1
- package/form-field/typings/form-field.d.ts +15 -4
- package/form-field/typings/index.metadata.json +1 -1
- package/grid-list/typings/index.d.ts +1 -1
- package/grid-list/typings/index.metadata.json +1 -1
- package/icon/typings/index.metadata.json +1 -1
- package/list/typings/index.metadata.json +1 -1
- package/material.d.ts +1 -1
- package/material.metadata.json +3 -3
- package/menu/typings/index.d.ts +4 -4
- package/menu/typings/index.metadata.json +1 -1
- package/menu/typings/menu-directive.d.ts +1 -0
- package/menu/typings/menu-item.d.ts +2 -0
- package/package.json +5 -5
- package/paginator/typings/index.metadata.json +1 -1
- package/paginator/typings/paginator.d.ts +7 -3
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-bar/typings/index.metadata.json +1 -1
- package/radio/typings/index.metadata.json +1 -1
- package/radio/typings/radio.d.ts +2 -6
- package/schematics/ng-add/theming/{custom-theme.d.ts → create-custom-theme.d.ts} +0 -0
- package/schematics/ng-add/theming/{custom-theme.js → create-custom-theme.js} +1 -1
- package/schematics/ng-add/theming/create-custom-theme.js.map +1 -0
- package/schematics/ng-add/theming/theming.js +35 -19
- package/schematics/ng-add/theming/theming.js.map +1 -1
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-generate/nav/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts +2 -2
- package/select/typings/index.metadata.json +1 -1
- package/select/typings/select.d.ts +12 -2
- package/sidenav/typings/drawer.d.ts +9 -2
- package/sidenav/typings/index.metadata.json +1 -1
- package/slide-toggle/typings/index.metadata.json +1 -1
- package/slider/typings/index.metadata.json +1 -1
- package/snack-bar/typings/index.metadata.json +1 -1
- package/sort/typings/index.metadata.json +1 -1
- package/stepper/typings/index.metadata.json +1 -1
- package/stepper/typings/step-header.d.ts +3 -5
- package/tabs/typings/index.d.ts +5 -5
- package/tabs/typings/index.metadata.json +1 -1
- package/tabs/typings/tab-body.d.ts +2 -0
- package/tabs/typings/tab-group.d.ts +11 -2
- package/tabs/typings/tab-header.d.ts +9 -3
- package/toolbar/typings/index.metadata.json +1 -1
- package/tooltip/typings/index.metadata.json +1 -1
- package/tree/typings/data-source/flat-data-source.d.ts +2 -2
- package/tree/typings/index.metadata.json +1 -1
- package/typings/autocomplete/index.d.ts +1 -1
- package/typings/autocomplete/index.metadata.json +1 -1
- package/typings/badge/index.metadata.json +1 -1
- package/typings/bottom-sheet/bottom-sheet-config.d.ts +5 -0
- package/typings/bottom-sheet/bottom-sheet-container.d.ts +1 -1
- package/typings/bottom-sheet/index.metadata.json +1 -1
- package/typings/button/button.d.ts +0 -5
- package/typings/button/index.metadata.json +1 -1
- package/typings/button-toggle/index.metadata.json +1 -1
- package/typings/card/index.metadata.json +1 -1
- package/typings/checkbox/index.metadata.json +1 -1
- package/typings/chips/chip-list.d.ts +1 -1
- package/typings/chips/chip.d.ts +2 -2
- package/typings/chips/index.metadata.json +1 -1
- package/typings/core/index.metadata.json +1 -1
- package/typings/core/{testing/month-constants.d.ts → month-constants.d.ts} +2 -0
- package/typings/core/public-api.d.ts +1 -1
- package/typings/datepicker/calendar-body.d.ts +21 -5
- package/typings/datepicker/calendar.d.ts +4 -1
- package/typings/datepicker/datepicker.d.ts +3 -0
- package/typings/datepicker/index.metadata.json +1 -1
- package/typings/datepicker/month-view.d.ts +4 -2
- package/typings/dialog/index.metadata.json +1 -1
- package/typings/esm5/autocomplete/index.d.ts +1 -1
- package/typings/esm5/autocomplete/index.metadata.json +1 -1
- package/typings/esm5/badge/index.metadata.json +1 -1
- package/typings/esm5/bottom-sheet/bottom-sheet-config.d.ts +5 -0
- package/typings/esm5/bottom-sheet/bottom-sheet-container.d.ts +1 -1
- package/typings/esm5/bottom-sheet/index.metadata.json +1 -1
- package/typings/esm5/button/button.d.ts +0 -5
- package/typings/esm5/button/index.metadata.json +1 -1
- package/typings/esm5/button-toggle/index.metadata.json +1 -1
- package/typings/esm5/card/index.metadata.json +1 -1
- package/typings/esm5/checkbox/index.metadata.json +1 -1
- package/typings/esm5/chips/chip-list.d.ts +1 -1
- package/typings/esm5/chips/chip.d.ts +2 -2
- package/typings/esm5/chips/index.metadata.json +1 -1
- package/typings/esm5/core/index.metadata.json +1 -1
- package/typings/esm5/core/{testing/month-constants.d.ts → month-constants.d.ts} +2 -0
- package/typings/esm5/core/public-api.d.ts +1 -1
- package/typings/esm5/datepicker/calendar-body.d.ts +21 -5
- package/typings/esm5/datepicker/calendar.d.ts +4 -1
- package/typings/esm5/datepicker/datepicker.d.ts +3 -0
- package/typings/esm5/datepicker/index.metadata.json +1 -1
- package/typings/esm5/datepicker/month-view.d.ts +4 -2
- package/typings/esm5/dialog/index.metadata.json +1 -1
- package/typings/esm5/expansion/expansion-panel-header.d.ts +2 -2
- package/typings/esm5/expansion/expansion-panel.d.ts +19 -2
- package/typings/esm5/expansion/index.metadata.json +1 -1
- package/typings/esm5/form-field/form-field.d.ts +15 -4
- package/typings/esm5/form-field/index.metadata.json +1 -1
- package/typings/esm5/grid-list/index.d.ts +1 -1
- package/typings/esm5/grid-list/index.metadata.json +1 -1
- package/typings/esm5/icon/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/list/index.metadata.json +1 -1
- package/typings/esm5/menu/index.d.ts +4 -4
- package/typings/esm5/menu/index.metadata.json +1 -1
- package/typings/esm5/menu/menu-directive.d.ts +1 -0
- package/typings/esm5/menu/menu-item.d.ts +2 -0
- package/typings/esm5/paginator/index.metadata.json +1 -1
- package/typings/esm5/paginator/paginator.d.ts +7 -3
- package/typings/esm5/progress-bar/index.metadata.json +1 -1
- package/typings/esm5/radio/index.metadata.json +1 -1
- package/typings/esm5/radio/radio.d.ts +2 -6
- package/typings/esm5/select/index.metadata.json +1 -1
- package/typings/esm5/select/select.d.ts +12 -2
- package/typings/esm5/sidenav/drawer.d.ts +9 -2
- package/typings/esm5/sidenav/index.metadata.json +1 -1
- package/typings/esm5/slide-toggle/index.metadata.json +1 -1
- package/typings/esm5/slider/index.metadata.json +1 -1
- package/typings/esm5/snack-bar/index.metadata.json +1 -1
- package/typings/esm5/sort/index.metadata.json +1 -1
- package/typings/esm5/stepper/index.metadata.json +1 -1
- package/typings/esm5/stepper/step-header.d.ts +3 -5
- package/typings/esm5/tabs/index.d.ts +5 -5
- package/typings/esm5/tabs/index.metadata.json +1 -1
- package/typings/esm5/tabs/tab-body.d.ts +2 -0
- package/typings/esm5/tabs/tab-group.d.ts +11 -2
- package/typings/esm5/tabs/tab-header.d.ts +9 -3
- package/typings/esm5/toolbar/index.metadata.json +1 -1
- package/typings/esm5/tooltip/index.metadata.json +1 -1
- package/typings/esm5/tree/data-source/flat-data-source.d.ts +2 -2
- package/typings/esm5/tree/index.metadata.json +1 -1
- package/typings/expansion/expansion-panel-header.d.ts +2 -2
- package/typings/expansion/expansion-panel.d.ts +19 -2
- package/typings/expansion/index.metadata.json +1 -1
- package/typings/form-field/form-field.d.ts +15 -4
- package/typings/form-field/index.metadata.json +1 -1
- package/typings/grid-list/index.d.ts +1 -1
- package/typings/grid-list/index.metadata.json +1 -1
- package/typings/icon/index.metadata.json +1 -1
- package/typings/index.metadata.json +1 -1
- package/typings/list/index.metadata.json +1 -1
- package/typings/menu/index.d.ts +4 -4
- package/typings/menu/index.metadata.json +1 -1
- package/typings/menu/menu-directive.d.ts +1 -0
- package/typings/menu/menu-item.d.ts +2 -0
- package/typings/paginator/index.metadata.json +1 -1
- package/typings/paginator/paginator.d.ts +7 -3
- package/typings/progress-bar/index.metadata.json +1 -1
- package/typings/radio/index.metadata.json +1 -1
- package/typings/radio/radio.d.ts +2 -6
- package/typings/schematics/ng-add/theming/{custom-theme.d.ts → create-custom-theme.d.ts} +0 -0
- package/typings/select/index.metadata.json +1 -1
- package/typings/select/select.d.ts +12 -2
- package/typings/sidenav/drawer.d.ts +9 -2
- package/typings/sidenav/index.metadata.json +1 -1
- package/typings/slide-toggle/index.metadata.json +1 -1
- package/typings/slider/index.metadata.json +1 -1
- package/typings/snack-bar/index.metadata.json +1 -1
- package/typings/sort/index.metadata.json +1 -1
- package/typings/stepper/index.metadata.json +1 -1
- package/typings/stepper/step-header.d.ts +3 -5
- package/typings/tabs/index.d.ts +5 -5
- package/typings/tabs/index.metadata.json +1 -1
- package/typings/tabs/tab-body.d.ts +2 -0
- package/typings/tabs/tab-group.d.ts +11 -2
- package/typings/tabs/tab-header.d.ts +9 -3
- package/typings/toolbar/index.metadata.json +1 -1
- package/typings/tooltip/index.metadata.json +1 -1
- package/typings/tree/data-source/flat-data-source.d.ts +2 -2
- package/typings/tree/index.metadata.json +1 -1
- package/schematics/ng-add/theming/custom-theme.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paginator.es5.js","sources":["../../../src/lib/paginator/paginator-module.ts","../../../src/lib/paginator/paginator.ts","../../../src/lib/paginator/paginator-intl.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatSelectModule} from '@angular/material/select';\nimport {MatTooltipModule} from '@angular/material/tooltip';\nimport {MatPaginator} from './paginator';\nimport {MAT_PAGINATOR_INTL_PROVIDER} from './paginator-intl';\n\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n MatSelectModule,\n MatTooltipModule,\n ],\n exports: [MatPaginator],\n declarations: [MatPaginator],\n providers: [MAT_PAGINATOR_INTL_PROVIDER],\n})\nexport class MatPaginatorModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {MatPaginatorIntl} from './paginator-intl';\nimport {\n HasInitialized,\n HasInitializedCtor,\n mixinInitialized,\n ThemePalette,\n} from '@angular/material/core';\n\n/** The default page size if there is no page size and there are no provided page size options. */\nconst DEFAULT_PAGE_SIZE = 50;\n\n/**\n * Change event object that is emitted when the user selects a\n * different page size or navigates to another page.\n */\nexport class PageEvent {\n /** The current page index. */\n pageIndex: number;\n\n /**\n * Index of the page that was selected previously.\n * @breaking-change 8.0.0 To be made into a required property.\n */\n previousPageIndex?: number;\n\n /** The current page size */\n pageSize: number;\n\n /** The current total number of items being paged */\n length: number;\n}\n\n// Boilerplate for applying mixins to MatPaginator.\n/** @docs-private */\nexport class MatPaginatorBase {}\nexport const _MatPaginatorBase: HasInitializedCtor & typeof MatPaginatorBase =\n mixinInitialized(MatPaginatorBase);\n\n/**\n * Component to provide navigation between paged information. Displays the size of the current\n * page, user-selectable options to change that size, what items are being shown, and\n * navigational button to go to the previous or next page.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-paginator',\n exportAs: 'matPaginator',\n templateUrl: 'paginator.html',\n styleUrls: ['paginator.css'],\n host: {\n 'class': 'mat-paginator',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatPaginator extends _MatPaginatorBase implements OnInit, OnDestroy, HasInitialized {\n private _initialized: boolean;\n private _intlChanges: Subscription;\n\n /** Theme color to be used for the underlying form controls. */\n @Input() color: ThemePalette;\n\n /** The zero-based page index of the displayed list of items. Defaulted to 0. */\n @Input()\n get pageIndex(): number { return this._pageIndex; }\n set pageIndex(value: number) {\n this._pageIndex = Math.max(coerceNumberProperty(value), 0);\n this._changeDetectorRef.markForCheck();\n }\n _pageIndex: number = 0;\n\n /** The length of the total number of items that are being paginated. Defaulted to 0. */\n @Input()\n get length(): number { return this._length; }\n set length(value: number) {\n this._length = coerceNumberProperty(value);\n this._changeDetectorRef.markForCheck();\n }\n _length: number = 0;\n\n /** Number of items to display on a page. By default set to 50. */\n @Input()\n get pageSize(): number { return this._pageSize; }\n set pageSize(value: number) {\n this._pageSize = Math.max(coerceNumberProperty(value), 0);\n this._updateDisplayedPageSizeOptions();\n }\n private _pageSize: number;\n\n /** The set of provided page size options to display to the user. */\n @Input()\n get pageSizeOptions(): number[] { return this._pageSizeOptions; }\n set pageSizeOptions(value: number[]) {\n this._pageSizeOptions = (value || []).map(p => coerceNumberProperty(p));\n this._updateDisplayedPageSizeOptions();\n }\n private _pageSizeOptions: number[] = [];\n\n /** Whether to hide the page size selection UI from the user. */\n @Input()\n get hidePageSize(): boolean { return this._hidePageSize; }\n set hidePageSize(value: boolean) {\n this._hidePageSize = coerceBooleanProperty(value);\n }\n private _hidePageSize = false;\n\n\n /** Whether to show the first/last buttons UI to the user. */\n @Input()\n get showFirstLastButtons(): boolean { return this._showFirstLastButtons; }\n set showFirstLastButtons(value: boolean) {\n this._showFirstLastButtons = coerceBooleanProperty(value);\n }\n private _showFirstLastButtons = false;\n\n /** Event emitted when the paginator changes the page size or page index. */\n @Output() readonly page: EventEmitter<PageEvent> = new EventEmitter<PageEvent>();\n\n /** Displayed set of page size options. Will be sorted and include current page size. */\n _displayedPageSizeOptions: number[];\n\n constructor(public _intl: MatPaginatorIntl,\n private _changeDetectorRef: ChangeDetectorRef) {\n super();\n this._intlChanges = _intl.changes.subscribe(() => this._changeDetectorRef.markForCheck());\n }\n\n ngOnInit() {\n this._initialized = true;\n this._updateDisplayedPageSizeOptions();\n this._markInitialized();\n }\n\n ngOnDestroy() {\n this._intlChanges.unsubscribe();\n }\n\n /** Advances to the next page if it exists. */\n nextPage(): void {\n if (!this.hasNextPage()) { return; }\n\n const previousPageIndex = this.pageIndex;\n this.pageIndex++;\n this._emitPageEvent(previousPageIndex);\n }\n\n /** Move back to the previous page if it exists. */\n previousPage(): void {\n if (!this.hasPreviousPage()) { return; }\n\n const previousPageIndex = this.pageIndex;\n this.pageIndex--;\n this._emitPageEvent(previousPageIndex);\n }\n\n /** Move to the first page if not already there. */\n firstPage(): void {\n // hasPreviousPage being false implies at the start\n if (!this.hasPreviousPage()) { return; }\n\n const previousPageIndex = this.pageIndex;\n this.pageIndex = 0;\n this._emitPageEvent(previousPageIndex);\n }\n\n /** Move to the last page if not already there. */\n lastPage(): void {\n // hasNextPage being false implies at the end\n if (!this.hasNextPage()) { return; }\n\n const previousPageIndex = this.pageIndex;\n this.pageIndex = this.getNumberOfPages() - 1;\n this._emitPageEvent(previousPageIndex);\n }\n\n /** Whether there is a previous page. */\n hasPreviousPage(): boolean {\n return this.pageIndex >= 1 && this.pageSize != 0;\n }\n\n /** Whether there is a next page. */\n hasNextPage(): boolean {\n const maxPageIndex = this.getNumberOfPages() - 1;\n return this.pageIndex < maxPageIndex && this.pageSize != 0;\n }\n\n /** Calculate the number of pages */\n getNumberOfPages(): number {\n if (!this.pageSize) {\n return 0;\n }\n\n return Math.ceil(this.length / this.pageSize);\n }\n\n\n /**\n * Changes the page size so that the first item displayed on the page will still be\n * displayed using the new page size.\n *\n * For example, if the page size is 10 and on the second page (items indexed 10-19) then\n * switching so that the page size is 5 will set the third page as the current page so\n * that the 10th item will still be displayed.\n */\n _changePageSize(pageSize: number) {\n // Current page needs to be updated to reflect the new page size. Navigate to the page\n // containing the previous page's first item.\n const startIndex = this.pageIndex * this.pageSize;\n const previousPageIndex = this.pageIndex;\n\n this.pageIndex = Math.floor(startIndex / pageSize) || 0;\n this.pageSize = pageSize;\n this._emitPageEvent(previousPageIndex);\n }\n\n /**\n * Updates the list of page size options to display to the user. Includes making sure that\n * the page size is an option and that the list is sorted.\n */\n private _updateDisplayedPageSizeOptions() {\n if (!this._initialized) { return; }\n\n // If no page size is provided, use the first page size option or the default page size.\n if (!this.pageSize) {\n this._pageSize = this.pageSizeOptions.length != 0 ?\n this.pageSizeOptions[0] :\n DEFAULT_PAGE_SIZE;\n }\n\n this._displayedPageSizeOptions = this.pageSizeOptions.slice();\n\n if (this._displayedPageSizeOptions.indexOf(this.pageSize) === -1) {\n this._displayedPageSizeOptions.push(this.pageSize);\n }\n\n // Sort the numbers using a number-specific sort function.\n this._displayedPageSizeOptions.sort((a, b) => a - b);\n this._changeDetectorRef.markForCheck();\n }\n\n /** Emits an event notifying that a change of the paginator's properties has been triggered. */\n private _emitPageEvent(previousPageIndex: number) {\n this.page.emit({\n previousPageIndex,\n pageIndex: this.pageIndex,\n pageSize: this.pageSize,\n length: this.length\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, Optional, SkipSelf} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n\n/**\n * To modify the labels and text displayed, create a new instance of MatPaginatorIntl and\n * include it in a custom provider\n */\n@Injectable({providedIn: 'root'})\nexport class MatPaginatorIntl {\n /**\n * Stream to emit from when labels are changed. Use this to notify components when the labels have\n * changed after initialization.\n */\n readonly changes: Subject<void> = new Subject<void>();\n\n /** A label for the page size selector. */\n itemsPerPageLabel: string = 'Items per page:';\n\n /** A label for the button that increments the current page. */\n nextPageLabel: string = 'Next page';\n\n /** A label for the button that decrements the current page. */\n previousPageLabel: string = 'Previous page';\n\n /** A label for the button that moves to the first page. */\n firstPageLabel: string = 'First page';\n\n /** A label for the button that moves to the last page. */\n lastPageLabel: string = 'Last page';\n\n /** A label for the range of items within the current page and the length of the whole list. */\n getRangeLabel = (page: number, pageSize: number, length: number) => {\n if (length == 0 || pageSize == 0) { return `0 of ${length}`; }\n\n length = Math.max(length, 0);\n\n const startIndex = page * pageSize;\n\n // If the start index exceeds the list length, do not try and fix the end index to the end.\n const endIndex = startIndex < length ?\n Math.min(startIndex + pageSize, length) :\n startIndex + pageSize;\n\n return `${startIndex + 1} - ${endIndex} of ${length}`;\n }\n}\n\n/** @docs-private */\nexport function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl: MatPaginatorIntl) {\n return parentIntl || new MatPaginatorIntl();\n}\n\n/** @docs-private */\nexport const MAT_PAGINATOR_INTL_PROVIDER = {\n // If there is already an MatPaginatorIntl available, use that. Otherwise, provide a new one.\n provide: MatPaginatorIntl,\n deps: [[new Optional(), new SkipSelf(), MatPaginatorIntl]],\n useFactory: MAT_PAGINATOR_INTL_PROVIDER_FACTORY\n};\n"],"names":["tslib_1.__extends"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QEsBE,IAAF,CAAA,OAAA,GAAoC,IAAI,OAAO,EAAQ,CAAC;;;;QAGtD,IAAF,CAAA,iBAAA,GAA8B,iBAAiB,CAAC;;;;QAG9C,IAAF,CAAA,aAAA,GAA0B,WAAW,CAAC;;;;QAGpC,IAAF,CAAA,iBAAA,GAA8B,eAAe,CAAC;;;;QAG5C,IAAF,CAAA,cAAA,GAA2B,YAAY,CAAC;;;;QAGtC,IAAF,CAAA,aAAA,GAA0B,WAAW,CAAC;;;;QAGpC,IAAF,CAAA,aAAA,GAAkB,UAAC,IAAY,EAAE,QAAgB,EAAE,MAAc,EAAjE;YACI,IAAI,MAAM,IAAI,CAAC,IAAI,QAAQ,IAAI,CAAC,EAAE;gBAAE,OAAO,OAA/C,GAAuD,MAAQ,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AZ;oBACE,MAAF,EAAU,CAAV,m0BAAA,CAAA;oBACE,IAAF,EAAA;wBACA,OAAa,EAAb,eAA8B;qBAC9B;oBACA,eAAA,EAAA,uBAAA,CAAA,MAAA;oBACA,aAAA,EAAA,iBAAA,CAAA,IAAA;iBACA,EAAA,EAAA;KACA,CAAA;;;;;KArDA,CAAA,EAAA,CAAA;IAVA,YAAE,CAAF,cAAA,GAAA;;;QAsEA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;QAGA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;QASA,eAAA,EAAG,CAAH,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;QASA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;QASA,oBAAA,EAAA,CAAA,EAAA,IAAA,EAAQ,KAAR,EAAA,CAAA;QASA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAG,CAAH;KASA,CAAA;IAQA,OAAA,YAAG,CAAH;;;;;;;;;;;QDxHA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,eAAe;wBACf,gBAAgB;qBACjB;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,YAAY,CAAC;oBAC5B,SAAS,EAAE,CAAC,2BAA2B,CAAC;iBACzC,EAAD,EAAA;;IA3BA,OAAA,kBAAA,CAAA;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"paginator.es5.js","sources":["../../../src/lib/paginator/paginator-module.ts","../../../src/lib/paginator/paginator.ts","../../../src/lib/paginator/paginator-intl.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatSelectModule} from '@angular/material/select';\nimport {MatTooltipModule} from '@angular/material/tooltip';\nimport {MatPaginator} from './paginator';\nimport {MAT_PAGINATOR_INTL_PROVIDER} from './paginator-intl';\n\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n MatSelectModule,\n MatTooltipModule,\n ],\n exports: [MatPaginator],\n declarations: [MatPaginator],\n providers: [MAT_PAGINATOR_INTL_PROVIDER],\n})\nexport class MatPaginatorModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {MatPaginatorIntl} from './paginator-intl';\nimport {\n HasInitialized,\n HasInitializedCtor,\n mixinInitialized,\n ThemePalette,\n mixinDisabled,\n CanDisableCtor,\n CanDisable,\n} from '@angular/material/core';\n\n/** The default page size if there is no page size and there are no provided page size options. */\nconst DEFAULT_PAGE_SIZE = 50;\n\n/**\n * Change event object that is emitted when the user selects a\n * different page size or navigates to another page.\n */\nexport class PageEvent {\n /** The current page index. */\n pageIndex: number;\n\n /**\n * Index of the page that was selected previously.\n * @breaking-change 8.0.0 To be made into a required property.\n */\n previousPageIndex?: number;\n\n /** The current page size */\n pageSize: number;\n\n /** The current total number of items being paged */\n length: number;\n}\n\n// Boilerplate for applying mixins to MatPaginator.\n/** @docs-private */\nexport class MatPaginatorBase {}\nexport const _MatPaginatorBase: CanDisableCtor & HasInitializedCtor & typeof MatPaginatorBase =\n mixinDisabled(mixinInitialized(MatPaginatorBase));\n\n/**\n * Component to provide navigation between paged information. Displays the size of the current\n * page, user-selectable options to change that size, what items are being shown, and\n * navigational button to go to the previous or next page.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-paginator',\n exportAs: 'matPaginator',\n templateUrl: 'paginator.html',\n styleUrls: ['paginator.css'],\n inputs: ['disabled'],\n host: {\n 'class': 'mat-paginator',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatPaginator extends _MatPaginatorBase implements OnInit, OnDestroy, CanDisable,\n HasInitialized {\n private _initialized: boolean;\n private _intlChanges: Subscription;\n\n /** Theme color to be used for the underlying form controls. */\n @Input() color: ThemePalette;\n\n /** The zero-based page index of the displayed list of items. Defaulted to 0. */\n @Input()\n get pageIndex(): number { return this._pageIndex; }\n set pageIndex(value: number) {\n this._pageIndex = Math.max(coerceNumberProperty(value), 0);\n this._changeDetectorRef.markForCheck();\n }\n _pageIndex: number = 0;\n\n /** The length of the total number of items that are being paginated. Defaulted to 0. */\n @Input()\n get length(): number { return this._length; }\n set length(value: number) {\n this._length = coerceNumberProperty(value);\n this._changeDetectorRef.markForCheck();\n }\n _length: number = 0;\n\n /** Number of items to display on a page. By default set to 50. */\n @Input()\n get pageSize(): number { return this._pageSize; }\n set pageSize(value: number) {\n this._pageSize = Math.max(coerceNumberProperty(value), 0);\n this._updateDisplayedPageSizeOptions();\n }\n private _pageSize: number;\n\n /** The set of provided page size options to display to the user. */\n @Input()\n get pageSizeOptions(): number[] { return this._pageSizeOptions; }\n set pageSizeOptions(value: number[]) {\n this._pageSizeOptions = (value || []).map(p => coerceNumberProperty(p));\n this._updateDisplayedPageSizeOptions();\n }\n private _pageSizeOptions: number[] = [];\n\n /** Whether to hide the page size selection UI from the user. */\n @Input()\n get hidePageSize(): boolean { return this._hidePageSize; }\n set hidePageSize(value: boolean) {\n this._hidePageSize = coerceBooleanProperty(value);\n }\n private _hidePageSize = false;\n\n\n /** Whether to show the first/last buttons UI to the user. */\n @Input()\n get showFirstLastButtons(): boolean { return this._showFirstLastButtons; }\n set showFirstLastButtons(value: boolean) {\n this._showFirstLastButtons = coerceBooleanProperty(value);\n }\n private _showFirstLastButtons = false;\n\n /** Event emitted when the paginator changes the page size or page index. */\n @Output() readonly page: EventEmitter<PageEvent> = new EventEmitter<PageEvent>();\n\n /** Displayed set of page size options. Will be sorted and include current page size. */\n _displayedPageSizeOptions: number[];\n\n constructor(public _intl: MatPaginatorIntl,\n private _changeDetectorRef: ChangeDetectorRef) {\n super();\n this._intlChanges = _intl.changes.subscribe(() => this._changeDetectorRef.markForCheck());\n }\n\n ngOnInit() {\n this._initialized = true;\n this._updateDisplayedPageSizeOptions();\n this._markInitialized();\n }\n\n ngOnDestroy() {\n this._intlChanges.unsubscribe();\n }\n\n /** Advances to the next page if it exists. */\n nextPage(): void {\n if (!this.hasNextPage()) { return; }\n\n const previousPageIndex = this.pageIndex;\n this.pageIndex++;\n this._emitPageEvent(previousPageIndex);\n }\n\n /** Move back to the previous page if it exists. */\n previousPage(): void {\n if (!this.hasPreviousPage()) { return; }\n\n const previousPageIndex = this.pageIndex;\n this.pageIndex--;\n this._emitPageEvent(previousPageIndex);\n }\n\n /** Move to the first page if not already there. */\n firstPage(): void {\n // hasPreviousPage being false implies at the start\n if (!this.hasPreviousPage()) { return; }\n\n const previousPageIndex = this.pageIndex;\n this.pageIndex = 0;\n this._emitPageEvent(previousPageIndex);\n }\n\n /** Move to the last page if not already there. */\n lastPage(): void {\n // hasNextPage being false implies at the end\n if (!this.hasNextPage()) { return; }\n\n const previousPageIndex = this.pageIndex;\n this.pageIndex = this.getNumberOfPages() - 1;\n this._emitPageEvent(previousPageIndex);\n }\n\n /** Whether there is a previous page. */\n hasPreviousPage(): boolean {\n return this.pageIndex >= 1 && this.pageSize != 0;\n }\n\n /** Whether there is a next page. */\n hasNextPage(): boolean {\n const maxPageIndex = this.getNumberOfPages() - 1;\n return this.pageIndex < maxPageIndex && this.pageSize != 0;\n }\n\n /** Calculate the number of pages */\n getNumberOfPages(): number {\n if (!this.pageSize) {\n return 0;\n }\n\n return Math.ceil(this.length / this.pageSize);\n }\n\n\n /**\n * Changes the page size so that the first item displayed on the page will still be\n * displayed using the new page size.\n *\n * For example, if the page size is 10 and on the second page (items indexed 10-19) then\n * switching so that the page size is 5 will set the third page as the current page so\n * that the 10th item will still be displayed.\n */\n _changePageSize(pageSize: number) {\n // Current page needs to be updated to reflect the new page size. Navigate to the page\n // containing the previous page's first item.\n const startIndex = this.pageIndex * this.pageSize;\n const previousPageIndex = this.pageIndex;\n\n this.pageIndex = Math.floor(startIndex / pageSize) || 0;\n this.pageSize = pageSize;\n this._emitPageEvent(previousPageIndex);\n }\n\n /** Checks whether the buttons for going forwards should be disabled. */\n _nextButtonsDisabled() {\n return this.disabled || !this.hasNextPage();\n }\n\n /** Checks whether the buttons for going backwards should be disabled. */\n _previousButtonsDisabled() {\n return this.disabled || !this.hasPreviousPage();\n }\n\n /**\n * Updates the list of page size options to display to the user. Includes making sure that\n * the page size is an option and that the list is sorted.\n */\n private _updateDisplayedPageSizeOptions() {\n if (!this._initialized) { return; }\n\n // If no page size is provided, use the first page size option or the default page size.\n if (!this.pageSize) {\n this._pageSize = this.pageSizeOptions.length != 0 ?\n this.pageSizeOptions[0] :\n DEFAULT_PAGE_SIZE;\n }\n\n this._displayedPageSizeOptions = this.pageSizeOptions.slice();\n\n if (this._displayedPageSizeOptions.indexOf(this.pageSize) === -1) {\n this._displayedPageSizeOptions.push(this.pageSize);\n }\n\n // Sort the numbers using a number-specific sort function.\n this._displayedPageSizeOptions.sort((a, b) => a - b);\n this._changeDetectorRef.markForCheck();\n }\n\n /** Emits an event notifying that a change of the paginator's properties has been triggered. */\n private _emitPageEvent(previousPageIndex: number) {\n this.page.emit({\n previousPageIndex,\n pageIndex: this.pageIndex,\n pageSize: this.pageSize,\n length: this.length\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable, Optional, SkipSelf} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n\n/**\n * To modify the labels and text displayed, create a new instance of MatPaginatorIntl and\n * include it in a custom provider\n */\n@Injectable({providedIn: 'root'})\nexport class MatPaginatorIntl {\n /**\n * Stream to emit from when labels are changed. Use this to notify components when the labels have\n * changed after initialization.\n */\n readonly changes: Subject<void> = new Subject<void>();\n\n /** A label for the page size selector. */\n itemsPerPageLabel: string = 'Items per page:';\n\n /** A label for the button that increments the current page. */\n nextPageLabel: string = 'Next page';\n\n /** A label for the button that decrements the current page. */\n previousPageLabel: string = 'Previous page';\n\n /** A label for the button that moves to the first page. */\n firstPageLabel: string = 'First page';\n\n /** A label for the button that moves to the last page. */\n lastPageLabel: string = 'Last page';\n\n /** A label for the range of items within the current page and the length of the whole list. */\n getRangeLabel = (page: number, pageSize: number, length: number) => {\n if (length == 0 || pageSize == 0) { return `0 of ${length}`; }\n\n length = Math.max(length, 0);\n\n const startIndex = page * pageSize;\n\n // If the start index exceeds the list length, do not try and fix the end index to the end.\n const endIndex = startIndex < length ?\n Math.min(startIndex + pageSize, length) :\n startIndex + pageSize;\n\n return `${startIndex + 1} - ${endIndex} of ${length}`;\n }\n}\n\n/** @docs-private */\nexport function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl: MatPaginatorIntl) {\n return parentIntl || new MatPaginatorIntl();\n}\n\n/** @docs-private */\nexport const MAT_PAGINATOR_INTL_PROVIDER = {\n // If there is already an MatPaginatorIntl available, use that. Otherwise, provide a new one.\n provide: MatPaginatorIntl,\n deps: [[new Optional(), new SkipSelf(), MatPaginatorIntl]],\n useFactory: MAT_PAGINATOR_INTL_PROVIDER_FACTORY\n};\n"],"names":["tslib_1.__extends"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AEgBA,AAAA,IAAA,gBAAA,kBAAA,YAAA;IAAA,SAAA,gBAAA,GAAA;;;;;QAMW,IAAX,CAAA,OAAkB,GAAkB,IAAI,OAAO,EAAQ,CAAC;;;;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,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;QASA,eAAA,EAAG,CAAH,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;QASA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;QASA,oBAAA,EAAA,CAAA,EAAA,IAAA,EAAQ,KAAR,EAAA,CAAA;QASA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAG,CAAH;KASA,CAAA;IAQA,OAAA,YAAG,CAAH;;;;;;;AD7HA,IAAA,kBAAA,kBAAA,YAAA;IAAA,SAAA,kBAAA,GAAA;KAWkC;;QAXlC,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,eAAe;wBACf,gBAAgB;qBACjB;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,YAAY,CAAC;oBAC5B,SAAS,EAAE,CAAC,2BAA2B,CAAC;iBACzC,EAAD,EAAA;;IACiC,OAAjC,kBAAkC,CAAlC;CAAkC,EAAlC,CAAA;;;;;;;;;;;;;;"}
|
package/esm5/progress-bar.es5.js
CHANGED
|
@@ -15,12 +15,19 @@ import { DOCUMENT, CommonModule } from '@angular/common';
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @fileoverview added by tsickle
|
|
18
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
18
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
19
19
|
*/
|
|
20
|
+
// TODO(josephperrott): Benchpress tests.
|
|
21
|
+
// TODO(josephperrott): Add ARIA attributes for progress bar "for".
|
|
22
|
+
// Boilerplate for applying mixins to MatProgressBar.
|
|
20
23
|
/**
|
|
21
24
|
* \@docs-private
|
|
22
25
|
*/
|
|
23
|
-
var
|
|
26
|
+
var
|
|
27
|
+
// TODO(josephperrott): Benchpress tests.
|
|
28
|
+
// TODO(josephperrott): Add ARIA attributes for progress bar "for".
|
|
29
|
+
// Boilerplate for applying mixins to MatProgressBar.
|
|
30
|
+
/**
|
|
24
31
|
* \@docs-private
|
|
25
32
|
*/
|
|
26
33
|
MatProgressBarBase = /** @class */ (function () {
|
|
@@ -31,11 +38,12 @@ MatProgressBarBase = /** @class */ (function () {
|
|
|
31
38
|
}());
|
|
32
39
|
/** @type {?} */
|
|
33
40
|
var _MatProgressBarMixinBase = mixinColor(MatProgressBarBase, 'primary');
|
|
34
|
-
/**
|
|
41
|
+
/**
|
|
35
42
|
* Injection token used to provide the current location to `MatProgressBar`.
|
|
36
43
|
* Used to handle server-side rendering and to stub out during unit tests.
|
|
37
44
|
* \@docs-private
|
|
38
|
-
|
|
45
|
+
* @type {?}
|
|
46
|
+
*/
|
|
39
47
|
var MAT_PROGRESS_BAR_LOCATION = new InjectionToken('mat-progress-bar-location', { providedIn: 'root', factory: MAT_PROGRESS_BAR_LOCATION_FACTORY });
|
|
40
48
|
/**
|
|
41
49
|
* \@docs-private
|
|
@@ -52,19 +60,21 @@ function MAT_PROGRESS_BAR_LOCATION_FACTORY() {
|
|
|
52
60
|
getPathname: function () { return _location ? (_location.pathname + _location.search) : ''; }
|
|
53
61
|
};
|
|
54
62
|
}
|
|
55
|
-
/**
|
|
63
|
+
/**
|
|
56
64
|
* Counter used to generate unique IDs for progress bars.
|
|
57
|
-
|
|
65
|
+
* @type {?}
|
|
66
|
+
*/
|
|
58
67
|
var progressbarId = 0;
|
|
59
68
|
/**
|
|
60
69
|
* `<mat-progress-bar>` component.
|
|
61
70
|
*/
|
|
62
71
|
var MatProgressBar = /** @class */ (function (_super) {
|
|
63
72
|
__extends(MatProgressBar, _super);
|
|
64
|
-
function MatProgressBar(_elementRef, _ngZone, _animationMode,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
function MatProgressBar(_elementRef, _ngZone, _animationMode,
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated `location` parameter to be made required.
|
|
76
|
+
* @breaking-change 8.0.0
|
|
77
|
+
*/
|
|
68
78
|
location) {
|
|
69
79
|
var _this = _super.call(this, _elementRef) || this;
|
|
70
80
|
_this._elementRef = _elementRef;
|
|
@@ -98,6 +108,12 @@ var MatProgressBar = /** @class */ (function (_super) {
|
|
|
98
108
|
* ID of the progress bar.
|
|
99
109
|
*/
|
|
100
110
|
_this.progressbarId = "mat-progress-bar-" + progressbarId++;
|
|
111
|
+
// We need to prefix the SVG reference with the current path, otherwise they won't work
|
|
112
|
+
// in Safari if the page has a `<base>` tag. Note that we need quotes inside the `url()`,
|
|
113
|
+
// because named route URLs can contain parentheses (see #12338). Also we don't use since
|
|
114
|
+
// we can't tell the difference between whether
|
|
115
|
+
// the consumer is using the hash location strategy or not, because `Location` normalizes
|
|
116
|
+
// both `/#/foo/bar` and `/foo/bar` to the same thing.
|
|
101
117
|
/** @type {?} */
|
|
102
118
|
var path = location ? location.getPathname().split('#')[0] : '';
|
|
103
119
|
_this._rectangleFillValue = "url('" + path + "#" + _this.progressbarId + "')";
|
|
@@ -205,12 +221,15 @@ var MatProgressBar = /** @class */ (function (_super) {
|
|
|
205
221
|
function () {
|
|
206
222
|
this._animationEndSubscription.unsubscribe();
|
|
207
223
|
};
|
|
224
|
+
/** Emit an animationEnd event if in determinate or buffer mode. */
|
|
208
225
|
/**
|
|
209
226
|
* Emit an animationEnd event if in determinate or buffer mode.
|
|
227
|
+
* @private
|
|
210
228
|
* @return {?}
|
|
211
229
|
*/
|
|
212
230
|
MatProgressBar.prototype.emitAnimationEnd = /**
|
|
213
231
|
* Emit an animationEnd event if in determinate or buffer mode.
|
|
232
|
+
* @private
|
|
214
233
|
* @return {?}
|
|
215
234
|
*/
|
|
216
235
|
function () {
|
|
@@ -232,7 +251,7 @@ var MatProgressBar = /** @class */ (function (_super) {
|
|
|
232
251
|
},
|
|
233
252
|
inputs: ['color'],
|
|
234
253
|
template: "<svg width=\"100%\" height=\"4\" focusable=\"false\" class=\"mat-progress-bar-background mat-progress-bar-element\"><defs><pattern [id]=\"progressbarId\" x=\"4\" y=\"0\" width=\"8\" height=\"4\" patternUnits=\"userSpaceOnUse\"><circle cx=\"2\" cy=\"2\" r=\"2\"/></pattern></defs><rect [attr.fill]=\"_rectangleFillValue\" width=\"100%\" height=\"100%\"/></svg><div class=\"mat-progress-bar-buffer mat-progress-bar-element\" [ngStyle]=\"_bufferTransform()\"></div><div class=\"mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element\" [ngStyle]=\"_primaryTransform()\" #primaryValueBar></div><div class=\"mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element\"></div>",
|
|
235
|
-
styles: [".mat-progress-bar{display:block;height:4px;overflow:hidden;position:relative;transition:opacity 250ms linear;width:100%}._mat-animation-noopable.mat-progress-bar{transition:none;animation:none}.mat-progress-bar .mat-progress-bar-element,.mat-progress-bar .mat-progress-bar-fill::after{height:100%;position:absolute;width:100%}.mat-progress-bar .mat-progress-bar-background{width:calc(100% + 10px)}@media
|
|
254
|
+
styles: [".mat-progress-bar{display:block;height:4px;overflow:hidden;position:relative;transition:opacity 250ms linear;width:100%}._mat-animation-noopable.mat-progress-bar{transition:none;animation:none}.mat-progress-bar .mat-progress-bar-element,.mat-progress-bar .mat-progress-bar-fill::after{height:100%;position:absolute;width:100%}.mat-progress-bar .mat-progress-bar-background{width:calc(100% + 10px)}@media (-ms-high-contrast:active){.mat-progress-bar .mat-progress-bar-background{display:none}}.mat-progress-bar .mat-progress-bar-buffer{transform-origin:top left;transition:transform 250ms ease}@media (-ms-high-contrast:active){.mat-progress-bar .mat-progress-bar-buffer{border-top:solid 5px;opacity:.5}}.mat-progress-bar .mat-progress-bar-secondary{display:none}.mat-progress-bar .mat-progress-bar-fill{animation:none;transform-origin:top left;transition:transform 250ms ease}@media (-ms-high-contrast:active){.mat-progress-bar .mat-progress-bar-fill{border-top:solid 4px}}.mat-progress-bar .mat-progress-bar-fill::after{animation:none;content:'';display:inline-block;left:0}.mat-progress-bar[dir=rtl],[dir=rtl] .mat-progress-bar{transform:rotateY(180deg)}.mat-progress-bar[mode=query]{transform:rotateZ(180deg)}.mat-progress-bar[mode=query][dir=rtl],[dir=rtl] .mat-progress-bar[mode=query]{transform:rotateZ(180deg) rotateY(180deg)}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-fill,.mat-progress-bar[mode=query] .mat-progress-bar-fill{transition:none}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary,.mat-progress-bar[mode=query] .mat-progress-bar-primary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-translate 2s infinite linear;left:-145.166611%}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-primary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-scale 2s infinite linear}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary,.mat-progress-bar[mode=query] .mat-progress-bar-secondary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-translate 2s infinite linear;left:-54.888891%;display:block}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-secondary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-scale 2s infinite linear}.mat-progress-bar[mode=buffer] .mat-progress-bar-background{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-background-scroll 250ms infinite linear;display:block}.mat-progress-bar._mat-animation-noopable .mat-progress-bar-background,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-buffer,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-fill,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-primary,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-secondary,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-secondary.mat-progress-bar-fill::after{animation:none;transition:none}@keyframes mat-progress-bar-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(.5,0,.70173,.49582);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(.30244,.38135,.55,.95635);transform:translateX(83.67142%)}100%{transform:translateX(200.61106%)}}@keyframes mat-progress-bar-primary-indeterminate-scale{0%{transform:scaleX(.08)}36.65%{animation-timing-function:cubic-bezier(.33473,.12482,.78584,1);transform:scaleX(.08)}69.15%{animation-timing-function:cubic-bezier(.06,.11,.6,1);transform:scaleX(.66148)}100%{transform:scaleX(.08)}}@keyframes mat-progress-bar-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(.15,0,.51506,.40969);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(.31033,.28406,.8,.73371);transform:translateX(37.65191%)}48.35%{animation-timing-function:cubic-bezier(.4,.62704,.6,.90203);transform:translateX(84.38617%)}100%{transform:translateX(160.27778%)}}@keyframes mat-progress-bar-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(.15,0,.51506,.40969);transform:scaleX(.08)}19.15%{animation-timing-function:cubic-bezier(.31033,.28406,.8,.73371);transform:scaleX(.4571)}44.15%{animation-timing-function:cubic-bezier(.4,.62704,.6,.90203);transform:scaleX(.72796)}100%{transform:scaleX(.08)}}@keyframes mat-progress-bar-background-scroll{to{transform:translateX(-8px)}}"],
|
|
236
255
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
237
256
|
encapsulation: ViewEncapsulation.None,
|
|
238
257
|
},] },
|
|
@@ -268,7 +287,7 @@ function clamp(v, min, max) {
|
|
|
268
287
|
|
|
269
288
|
/**
|
|
270
289
|
* @fileoverview added by tsickle
|
|
271
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
290
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
272
291
|
*/
|
|
273
292
|
var MatProgressBarModule = /** @class */ (function () {
|
|
274
293
|
function MatProgressBarModule() {
|
|
@@ -285,12 +304,12 @@ var MatProgressBarModule = /** @class */ (function () {
|
|
|
285
304
|
|
|
286
305
|
/**
|
|
287
306
|
* @fileoverview added by tsickle
|
|
288
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
307
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
289
308
|
*/
|
|
290
309
|
|
|
291
310
|
/**
|
|
292
311
|
* @fileoverview added by tsickle
|
|
293
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
312
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
294
313
|
*/
|
|
295
314
|
|
|
296
315
|
export { MatProgressBarModule, MAT_PROGRESS_BAR_LOCATION_FACTORY, MatProgressBarBase, _MatProgressBarMixinBase, MAT_PROGRESS_BAR_LOCATION, MatProgressBar };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.es5.js","sources":["../../../src/lib/progress-bar/progress-bar-module.ts","../../../src/lib/progress-bar/progress-bar.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatProgressBar} from './progress-bar';\n\n\n@NgModule({\n imports: [CommonModule, MatCommonModule],\n exports: [MatProgressBar, MatCommonModule],\n declarations: [MatProgressBar],\n})\nexport class MatProgressBarModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n Component,\n ChangeDetectionStrategy,\n ElementRef,\n Inject,\n Input,\n Output,\n EventEmitter,\n Optional,\n NgZone,\n ViewEncapsulation,\n AfterViewInit,\n ViewChild,\n OnDestroy,\n InjectionToken,\n inject,\n} from '@angular/core';\nimport {fromEvent, Subscription} from 'rxjs';\nimport {filter} from 'rxjs/operators';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\nimport {DOCUMENT} from '@angular/common';\n\n// TODO(josephperrott): Benchpress tests.\n// TODO(josephperrott): Add ARIA attributes for progress bar \"for\".\n\n// Boilerplate for applying mixins to MatProgressBar.\n/** @docs-private */\nexport class MatProgressBarBase {\n constructor(public _elementRef: ElementRef) { }\n}\n\n/** Last animation end data. */\nexport interface ProgressAnimationEnd {\n value: number;\n}\n\nexport const _MatProgressBarMixinBase: CanColorCtor & typeof MatProgressBarBase =\n mixinColor(MatProgressBarBase, 'primary');\n\n/**\n * Injection token used to provide the current location to `MatProgressBar`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_PROGRESS_BAR_LOCATION = new InjectionToken<MatProgressBarLocation>(\n 'mat-progress-bar-location',\n {providedIn: 'root', factory: MAT_PROGRESS_BAR_LOCATION_FACTORY}\n);\n\n/**\n * Stubbed out location for `MatProgressBar`.\n * @docs-private\n */\nexport interface MatProgressBarLocation {\n getPathname: () => string;\n}\n\n/** @docs-private */\nexport function MAT_PROGRESS_BAR_LOCATION_FACTORY(): MatProgressBarLocation {\n const _document = inject(DOCUMENT);\n const _location = _document ? _document.location : null;\n\n return {\n // Note that this needs to be a function, rather than a property, because Angular\n // will only resolve it once, but we want the current path on each call.\n getPathname: () => _location ? (_location.pathname + _location.search) : ''\n };\n}\n\n\n/** Counter used to generate unique IDs for progress bars. */\nlet progressbarId = 0;\n\n/**\n * `<mat-progress-bar>` component.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-progress-bar',\n exportAs: 'matProgressBar',\n host: {\n 'role': 'progressbar',\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n '[attr.aria-valuenow]': 'value',\n '[attr.mode]': 'mode',\n 'class': 'mat-progress-bar',\n '[class._mat-animation-noopable]': `_isNoopAnimation`,\n },\n inputs: ['color'],\n templateUrl: 'progress-bar.html',\n styleUrls: ['progress-bar.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatProgressBar extends _MatProgressBarMixinBase implements CanColor,\n AfterViewInit, OnDestroy {\n constructor(public _elementRef: ElementRef, private _ngZone: NgZone,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n /**\n * @deprecated `location` parameter to be made required.\n * @breaking-change 8.0.0\n */\n @Optional() @Inject(MAT_PROGRESS_BAR_LOCATION) location?: MatProgressBarLocation) {\n super(_elementRef);\n\n // We need to prefix the SVG reference with the current path, otherwise they won't work\n // in Safari if the page has a `<base>` tag. Note that we need quotes inside the `url()`,\n\n // because named route URLs can contain parentheses (see #12338). Also we don't use since\n // we can't tell the difference between whether\n // the consumer is using the hash location strategy or not, because `Location` normalizes\n // both `/#/foo/bar` and `/foo/bar` to the same thing.\n const path = location ? location.getPathname().split('#')[0] : '';\n this._rectangleFillValue = `url('${path}#${this.progressbarId}')`;\n this._isNoopAnimation = _animationMode === 'NoopAnimations';\n }\n\n /** Flag that indicates whether NoopAnimations mode is set to true. */\n _isNoopAnimation = false;\n\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\n @Input()\n get value(): number { return this._value; }\n set value(v: number) {\n this._value = clamp(v || 0);\n\n // When noop animation is set to true, trigger animationEnd directly.\n if (this._isNoopAnimation) {\n this.emitAnimationEnd();\n }\n }\n private _value: number = 0;\n\n /** Buffer value of the progress bar. Defaults to zero. */\n @Input()\n get bufferValue(): number { return this._bufferValue; }\n set bufferValue(v: number) { this._bufferValue = clamp(v || 0); }\n private _bufferValue: number = 0;\n\n @ViewChild('primaryValueBar') _primaryValueBar: ElementRef;\n\n /**\n * Event emitted when animation of the primary progress bar completes. This event will not\n * be emitted when animations are disabled, nor will it be emitted for modes with continuous\n * animations (indeterminate and query).\n */\n @Output() animationEnd = new EventEmitter<ProgressAnimationEnd>();\n\n /** Reference to animation end subscription to be unsubscribed on destroy. */\n private _animationEndSubscription: Subscription = Subscription.EMPTY;\n\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n @Input() mode: 'determinate' | 'indeterminate' | 'buffer' | 'query' = 'determinate';\n\n /** ID of the progress bar. */\n progressbarId = `mat-progress-bar-${progressbarId++}`;\n\n /** Attribute to be used for the `fill` attribute on the internal `rect` element. */\n _rectangleFillValue: string;\n\n /** Gets the current transform value for the progress bar's primary indicator. */\n _primaryTransform() {\n const scale = this.value / 100;\n return {transform: `scaleX(${scale})`};\n }\n\n /**\n * Gets the current transform value for the progress bar's buffer indicator. Only used if the\n * progress mode is set to buffer, otherwise returns an undefined, causing no transformation.\n */\n _bufferTransform() {\n if (this.mode === 'buffer') {\n const scale = this.bufferValue / 100;\n return {transform: `scaleX(${scale})`};\n }\n }\n\n ngAfterViewInit() {\n if (!this._isNoopAnimation) {\n // Run outside angular so change detection didn't get triggered on every transition end\n // instead only on the animation that we care about (primary value bar's transitionend)\n this._ngZone.runOutsideAngular((() => {\n this._animationEndSubscription =\n fromEvent<TransitionEvent>(this._primaryValueBar.nativeElement, 'transitionend')\n .pipe(filter(((e: TransitionEvent) =>\n e.target === this._primaryValueBar.nativeElement)))\n .subscribe(_ => this._ngZone.run(() => this.emitAnimationEnd()));\n }));\n }\n }\n\n ngOnDestroy() {\n this._animationEndSubscription.unsubscribe();\n }\n\n /** Emit an animationEnd event if in determinate or buffer mode. */\n private emitAnimationEnd(): void {\n if (this.mode === 'determinate' || this.mode === 'buffer') {\n this.animationEnd.next({value: this.value});\n }\n }\n}\n\n/** Clamps a value to be between two numbers, by default 0 and 100. */\nfunction clamp(v: number, min = 0, max = 100) {\n return Math.max(min, Math.min(max, v));\n}\n"],"names":["tslib_1.__extends"],"mappings":";;;;;;;;;;;;;;;;;;;;;;ACmCA,AAAA,IAAA;;;AAAA,kBAAA,kBAAA,YAAA;IACE,SAAF,kBAAA,CAAqB,WAAuB,EAA5C;QAAqB,IAArB,CAAA,WAAgC,GAAX,WAAW,CAAY;KAAK;IApCjD,OAAA,kBAAA,CAAA;CAqCA,EAAA,CAAC,CAAA;;AAOD,AAAA,IAAa,wBAAwB,GACjC,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;;;;;;AAO9C,AAAA,IAAa,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B,EAC3B,EAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,iCAAiC,EAAC,CACjE,CAAC;;;;;AAWF,AAAA,SAAgB,iCAAiC,GAAjD;;IACE,IAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;;IACnC,IAAM,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;IAExD,OAAO;;;QAGL,WAAW,EAAE,YAAjB,EAAuB,OAAA,SAAS,IAAI,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,MAAM,IAAI,EAAE,CAA/E,EAA+E;KAC5E,CAAC;CACH;;;;AAID,IAAI,aAAa,GAAG,CAAC,CAAC;;;;;IAwBcA,SAApC,CAAA,cAAA,EAAA,MAAA,CAAA,CAA4D;IAE1D,SAAF,cAAA,CAAqB,WAAuB,EAAU,OAAe,EACL,cAAuB;;;;IAK1B,QAAiC,EAA9F;QANE,IAAF,KAAA,GAOI,MAPJ,CAAA,IAAA,CAAA,IAAA,EAOU,WAAW,CAAC,IAPtB,IAAA,CAmBG;QAnBkB,KAArB,CAAA,WAAgC,G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MAAA,EAAA,IAAA,EAAA,CAAA,yBAAA,EAAA,EAAA,CAAA,EAAA;KA0FA,CAAA,EAAA,CAAA;IAKA,cAAA,CAAA,cAAA,GAAA;;;QAmBA,gBAAG,EAAH,CAAA,EAAQ,IAAR,EAAA,SAAA,EAAA,IAAA,EAAA,CAAA,iBAAA,EAAA,EAAA,CAAA;QAaA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA;QAKA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;KAOA,CAAA;IAYA,OAAA,cAAA,CAAA;;AAvKA;;;;;;;;;IA2NA,IAAA,GAAA,KAAwB,KAAS,CAAjC,EAAA,EAA4C,GAA5C,GAAA,GAAA,CAAA,EAAA;IAA0B,OAA1B,IAAA,CAAA,GAAA,CAAA,GAAA,EAAA,IAAA,CAAA,GAAiC,CAAjC,GAAA,EAAA,CAAA,CAAA,CAAA,CAAA;CAAA;;;;;;;;;;QD7MA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC;oBACxC,OAAO,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC;oBAC1C,YAAY,EAAE,CAAC,cAAc,CAAC;iBAC/B,EAAD,EAAA;;IAlBA,OAAA,oBAAA,CAAA;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"progress-bar.es5.js","sources":["../../../src/lib/progress-bar/progress-bar-module.ts","../../../src/lib/progress-bar/progress-bar.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatProgressBar} from './progress-bar';\n\n\n@NgModule({\n imports: [CommonModule, MatCommonModule],\n exports: [MatProgressBar, MatCommonModule],\n declarations: [MatProgressBar],\n})\nexport class MatProgressBarModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n Component,\n ChangeDetectionStrategy,\n ElementRef,\n Inject,\n Input,\n Output,\n EventEmitter,\n Optional,\n NgZone,\n ViewEncapsulation,\n AfterViewInit,\n ViewChild,\n OnDestroy,\n InjectionToken,\n inject,\n} from '@angular/core';\nimport {fromEvent, Subscription} from 'rxjs';\nimport {filter} from 'rxjs/operators';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\nimport {DOCUMENT} from '@angular/common';\n\n// TODO(josephperrott): Benchpress tests.\n// TODO(josephperrott): Add ARIA attributes for progress bar \"for\".\n\n// Boilerplate for applying mixins to MatProgressBar.\n/** @docs-private */\nexport class MatProgressBarBase {\n constructor(public _elementRef: ElementRef) { }\n}\n\n/** Last animation end data. */\nexport interface ProgressAnimationEnd {\n value: number;\n}\n\nexport const _MatProgressBarMixinBase: CanColorCtor & typeof MatProgressBarBase =\n mixinColor(MatProgressBarBase, 'primary');\n\n/**\n * Injection token used to provide the current location to `MatProgressBar`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_PROGRESS_BAR_LOCATION = new InjectionToken<MatProgressBarLocation>(\n 'mat-progress-bar-location',\n {providedIn: 'root', factory: MAT_PROGRESS_BAR_LOCATION_FACTORY}\n);\n\n/**\n * Stubbed out location for `MatProgressBar`.\n * @docs-private\n */\nexport interface MatProgressBarLocation {\n getPathname: () => string;\n}\n\n/** @docs-private */\nexport function MAT_PROGRESS_BAR_LOCATION_FACTORY(): MatProgressBarLocation {\n const _document = inject(DOCUMENT);\n const _location = _document ? _document.location : null;\n\n return {\n // Note that this needs to be a function, rather than a property, because Angular\n // will only resolve it once, but we want the current path on each call.\n getPathname: () => _location ? (_location.pathname + _location.search) : ''\n };\n}\n\n\n/** Counter used to generate unique IDs for progress bars. */\nlet progressbarId = 0;\n\n/**\n * `<mat-progress-bar>` component.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-progress-bar',\n exportAs: 'matProgressBar',\n host: {\n 'role': 'progressbar',\n 'aria-valuemin': '0',\n 'aria-valuemax': '100',\n '[attr.aria-valuenow]': 'value',\n '[attr.mode]': 'mode',\n 'class': 'mat-progress-bar',\n '[class._mat-animation-noopable]': `_isNoopAnimation`,\n },\n inputs: ['color'],\n templateUrl: 'progress-bar.html',\n styleUrls: ['progress-bar.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatProgressBar extends _MatProgressBarMixinBase implements CanColor,\n AfterViewInit, OnDestroy {\n constructor(public _elementRef: ElementRef, private _ngZone: NgZone,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n /**\n * @deprecated `location` parameter to be made required.\n * @breaking-change 8.0.0\n */\n @Optional() @Inject(MAT_PROGRESS_BAR_LOCATION) location?: MatProgressBarLocation) {\n super(_elementRef);\n\n // We need to prefix the SVG reference with the current path, otherwise they won't work\n // in Safari if the page has a `<base>` tag. Note that we need quotes inside the `url()`,\n\n // because named route URLs can contain parentheses (see #12338). Also we don't use since\n // we can't tell the difference between whether\n // the consumer is using the hash location strategy or not, because `Location` normalizes\n // both `/#/foo/bar` and `/foo/bar` to the same thing.\n const path = location ? location.getPathname().split('#')[0] : '';\n this._rectangleFillValue = `url('${path}#${this.progressbarId}')`;\n this._isNoopAnimation = _animationMode === 'NoopAnimations';\n }\n\n /** Flag that indicates whether NoopAnimations mode is set to true. */\n _isNoopAnimation = false;\n\n /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\n @Input()\n get value(): number { return this._value; }\n set value(v: number) {\n this._value = clamp(v || 0);\n\n // When noop animation is set to true, trigger animationEnd directly.\n if (this._isNoopAnimation) {\n this.emitAnimationEnd();\n }\n }\n private _value: number = 0;\n\n /** Buffer value of the progress bar. Defaults to zero. */\n @Input()\n get bufferValue(): number { return this._bufferValue; }\n set bufferValue(v: number) { this._bufferValue = clamp(v || 0); }\n private _bufferValue: number = 0;\n\n @ViewChild('primaryValueBar') _primaryValueBar: ElementRef;\n\n /**\n * Event emitted when animation of the primary progress bar completes. This event will not\n * be emitted when animations are disabled, nor will it be emitted for modes with continuous\n * animations (indeterminate and query).\n */\n @Output() animationEnd = new EventEmitter<ProgressAnimationEnd>();\n\n /** Reference to animation end subscription to be unsubscribed on destroy. */\n private _animationEndSubscription: Subscription = Subscription.EMPTY;\n\n /**\n * Mode of the progress bar.\n *\n * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n * 'determinate'.\n * Mirrored to mode attribute.\n */\n @Input() mode: 'determinate' | 'indeterminate' | 'buffer' | 'query' = 'determinate';\n\n /** ID of the progress bar. */\n progressbarId = `mat-progress-bar-${progressbarId++}`;\n\n /** Attribute to be used for the `fill` attribute on the internal `rect` element. */\n _rectangleFillValue: string;\n\n /** Gets the current transform value for the progress bar's primary indicator. */\n _primaryTransform() {\n const scale = this.value / 100;\n return {transform: `scaleX(${scale})`};\n }\n\n /**\n * Gets the current transform value for the progress bar's buffer indicator. Only used if the\n * progress mode is set to buffer, otherwise returns an undefined, causing no transformation.\n */\n _bufferTransform() {\n if (this.mode === 'buffer') {\n const scale = this.bufferValue / 100;\n return {transform: `scaleX(${scale})`};\n }\n }\n\n ngAfterViewInit() {\n if (!this._isNoopAnimation) {\n // Run outside angular so change detection didn't get triggered on every transition end\n // instead only on the animation that we care about (primary value bar's transitionend)\n this._ngZone.runOutsideAngular((() => {\n this._animationEndSubscription =\n fromEvent<TransitionEvent>(this._primaryValueBar.nativeElement, 'transitionend')\n .pipe(filter(((e: TransitionEvent) =>\n e.target === this._primaryValueBar.nativeElement)))\n .subscribe(_ => this._ngZone.run(() => this.emitAnimationEnd()));\n }));\n }\n }\n\n ngOnDestroy() {\n this._animationEndSubscription.unsubscribe();\n }\n\n /** Emit an animationEnd event if in determinate or buffer mode. */\n private emitAnimationEnd(): void {\n if (this.mode === 'determinate' || this.mode === 'buffer') {\n this.animationEnd.next({value: this.value});\n }\n }\n}\n\n/** Clamps a value to be between two numbers, by default 0 and 100. */\nfunction clamp(v: number, min = 0, max = 100) {\n return Math.max(min, Math.min(max, v));\n}\n"],"names":["tslib_1.__extends"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;ACmCA,AAAA,IAAA;;;;;;;;IACE,SAAF,kBAAA,CAAqB,WAAuB,EAA5C;QAAqB,IAArB,CAAA,WAAgC,GAAX,WAAW,CAAY;KAAK;IACjD,OAAA,kBAAC,CAAD;CAAC,EAAD,CAAA,CAAC;;AAOD,AAAA,IAAa,wBAAwB,GACjC,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAD7C;;;;;;;AAQA,AAAA,IAAa,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B,EAC3B,EAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,iCAAiC,EAAC,CACjE,CAHD;;;;;AAcA,AAAA,SAAgB,iCAAiC,GAAjD;;IACA,IAAQ,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAApC;;IACA,IAAQ,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAzD;IAEE,OAAO;;;QAGL,WAAW,EAAE,YAAjB,EAAuB,OAAA,SAAS,IAAI,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,MAAM,IAAI,EAAE,CAA/E,EAA+E;KAC5E,CAAC;CACH;;;;;AAID,IAAI,aAAa,GAAG,CAAC,CAArB;;;;AAKA,AAAA,IAAA,cAAA,kBAAA,UAAA,MAAA,EAAA;IAmBoCA,SAApC,CAAA,cAAA,EAAA,MAAA,CAAA,CAA4D;IAE1D,SAAF,cAAA,CAAqB,WAAuB,EAAU,OAAe,EACL,cAAuB;;;;;IAK1B,QAAiC,EAA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ickle
|
|
18
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
18
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
19
19
|
*/
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
21
|
* Base reference size of the spinner.
|
|
22
22
|
* \@docs-private
|
|
23
|
-
|
|
23
|
+
* @type {?}
|
|
24
|
+
*/
|
|
24
25
|
var BASE_SIZE = 100;
|
|
25
|
-
/**
|
|
26
|
+
/**
|
|
26
27
|
* Base reference stroke width of the spinner.
|
|
27
28
|
* \@docs-private
|
|
28
|
-
|
|
29
|
+
* @type {?}
|
|
30
|
+
*/
|
|
29
31
|
var BASE_STROKE_WIDTH = 10;
|
|
32
|
+
// Boilerplate for applying mixins to MatProgressSpinner.
|
|
30
33
|
/**
|
|
31
34
|
* \@docs-private
|
|
32
35
|
*/
|
|
33
|
-
var
|
|
36
|
+
var
|
|
37
|
+
// Boilerplate for applying mixins to MatProgressSpinner.
|
|
38
|
+
/**
|
|
34
39
|
* \@docs-private
|
|
35
40
|
*/
|
|
36
41
|
MatProgressSpinnerBase = /** @class */ (function () {
|
|
@@ -41,9 +46,10 @@ MatProgressSpinnerBase = /** @class */ (function () {
|
|
|
41
46
|
}());
|
|
42
47
|
/** @type {?} */
|
|
43
48
|
var _MatProgressSpinnerMixinBase = mixinColor(MatProgressSpinnerBase, 'primary');
|
|
44
|
-
/**
|
|
49
|
+
/**
|
|
45
50
|
* Injection token to be used to override the default options for `mat-progress-spinner`.
|
|
46
|
-
|
|
51
|
+
* @type {?}
|
|
52
|
+
*/
|
|
47
53
|
var MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS = new InjectionToken('mat-progress-spinner-default-options', {
|
|
48
54
|
providedIn: 'root',
|
|
49
55
|
factory: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,
|
|
@@ -55,6 +61,10 @@ var MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS = new InjectionToken('mat-progress-spin
|
|
|
55
61
|
function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY() {
|
|
56
62
|
return { diameter: BASE_SIZE };
|
|
57
63
|
}
|
|
64
|
+
// .0001 percentage difference is necessary in order to avoid unwanted animation frames
|
|
65
|
+
// for example because the animation duration is 4 seconds, .1% accounts to 4ms
|
|
66
|
+
// which are enough to see the flicker described in
|
|
67
|
+
// https://github.com/angular/material2/issues/8984
|
|
58
68
|
/** @type {?} */
|
|
59
69
|
var INDETERMINATE_ANIMATION_TEMPLATE = "\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n";
|
|
60
70
|
/**
|
|
@@ -62,9 +72,7 @@ var INDETERMINATE_ANIMATION_TEMPLATE = "\n @keyframes mat-progress-spinner-strok
|
|
|
62
72
|
*/
|
|
63
73
|
var MatProgressSpinner = /** @class */ (function (_super) {
|
|
64
74
|
__extends(MatProgressSpinner, _super);
|
|
65
|
-
function MatProgressSpinner(_elementRef, platform, _document,
|
|
66
|
-
// @breaking-change 8.0.0 animationMode and defaults parameters to be made required.
|
|
67
|
-
animationMode, defaults) {
|
|
75
|
+
function MatProgressSpinner(_elementRef, platform, _document, animationMode, defaults) {
|
|
68
76
|
var _this = _super.call(this, _elementRef) || this;
|
|
69
77
|
_this._elementRef = _elementRef;
|
|
70
78
|
_this._document = _document;
|
|
@@ -90,6 +98,8 @@ var MatProgressSpinner = /** @class */ (function (_super) {
|
|
|
90
98
|
_this.strokeWidth = defaults.strokeWidth;
|
|
91
99
|
}
|
|
92
100
|
}
|
|
101
|
+
// On IE and Edge, we can't animate the `stroke-dashoffset`
|
|
102
|
+
// reliably so we fall back to a non-spec animation.
|
|
93
103
|
/** @type {?} */
|
|
94
104
|
var animationClass = "mat-progress-spinner-indeterminate" + (_this._fallbackAnimation ? '-fallback' : '') + "-animation";
|
|
95
105
|
_elementRef.nativeElement.classList.add(animationClass);
|
|
@@ -222,12 +232,15 @@ var MatProgressSpinner = /** @class */ (function (_super) {
|
|
|
222
232
|
enumerable: true,
|
|
223
233
|
configurable: true
|
|
224
234
|
});
|
|
235
|
+
/** Dynamically generates a style tag containing the correct animation for this diameter. */
|
|
225
236
|
/**
|
|
226
237
|
* Dynamically generates a style tag containing the correct animation for this diameter.
|
|
238
|
+
* @private
|
|
227
239
|
* @return {?}
|
|
228
240
|
*/
|
|
229
241
|
MatProgressSpinner.prototype._attachStyleNode = /**
|
|
230
242
|
* Dynamically generates a style tag containing the correct animation for this diameter.
|
|
243
|
+
* @private
|
|
231
244
|
* @return {?}
|
|
232
245
|
*/
|
|
233
246
|
function () {
|
|
@@ -239,16 +252,19 @@ var MatProgressSpinner = /** @class */ (function (_super) {
|
|
|
239
252
|
MatProgressSpinner.styleTag = styleTag;
|
|
240
253
|
}
|
|
241
254
|
if (styleTag && styleTag.sheet) {
|
|
242
|
-
(/** @type {?} */ (styleTag.sheet)).insertRule(this._getAnimationText(), 0);
|
|
255
|
+
((/** @type {?} */ (styleTag.sheet))).insertRule(this._getAnimationText(), 0);
|
|
243
256
|
}
|
|
244
257
|
MatProgressSpinner.diameters.add(this.diameter);
|
|
245
258
|
};
|
|
259
|
+
/** Generates animation styles adjusted for the spinner's diameter. */
|
|
246
260
|
/**
|
|
247
261
|
* Generates animation styles adjusted for the spinner's diameter.
|
|
262
|
+
* @private
|
|
248
263
|
* @return {?}
|
|
249
264
|
*/
|
|
250
265
|
MatProgressSpinner.prototype._getAnimationText = /**
|
|
251
266
|
* Generates animation styles adjusted for the spinner's diameter.
|
|
267
|
+
* @private
|
|
252
268
|
* @return {?}
|
|
253
269
|
*/
|
|
254
270
|
function () {
|
|
@@ -349,7 +365,7 @@ var MatSpinner = /** @class */ (function (_super) {
|
|
|
349
365
|
|
|
350
366
|
/**
|
|
351
367
|
* @fileoverview added by tsickle
|
|
352
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
368
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
353
369
|
*/
|
|
354
370
|
var MatProgressSpinnerModule = /** @class */ (function () {
|
|
355
371
|
function MatProgressSpinnerModule() {
|
|
@@ -373,12 +389,12 @@ var MatProgressSpinnerModule = /** @class */ (function () {
|
|
|
373
389
|
|
|
374
390
|
/**
|
|
375
391
|
* @fileoverview added by tsickle
|
|
376
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
392
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
377
393
|
*/
|
|
378
394
|
|
|
379
395
|
/**
|
|
380
396
|
* @fileoverview added by tsickle
|
|
381
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
397
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
382
398
|
*/
|
|
383
399
|
|
|
384
400
|
export { MatProgressSpinnerModule, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY, MatProgressSpinnerBase, _MatProgressSpinnerMixinBase, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS, MatProgressSpinner, MatSpinner };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-spinner.es5.js","sources":["../../../src/lib/progress-spinner/progress-spinner-module.ts","../../../src/lib/progress-spinner/progress-spinner.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatProgressSpinner, MatSpinner} from './progress-spinner';\n\n\n@NgModule({\n imports: [MatCommonModule, CommonModule],\n exports: [\n MatProgressSpinner,\n MatSpinner,\n MatCommonModule\n ],\n declarations: [\n MatProgressSpinner,\n MatSpinner\n ],\n})\nclass MatProgressSpinnerModule {}\n\nexport {MatProgressSpinnerModule};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {Platform} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n Optional,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\n/** Possible mode for a progress spinner. */\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\n\n/**\n * Base reference size of the spinner.\n * @docs-private\n */\nconst BASE_SIZE = 100;\n\n/**\n * Base reference stroke width of the spinner.\n * @docs-private\n */\nconst BASE_STROKE_WIDTH = 10;\n\n// Boilerplate for applying mixins to MatProgressSpinner.\n/** @docs-private */\nexport class MatProgressSpinnerBase {\n constructor(public _elementRef: ElementRef) {}\n}\nexport const _MatProgressSpinnerMixinBase: CanColorCtor & typeof MatProgressSpinnerBase =\n mixinColor(MatProgressSpinnerBase, 'primary');\n\n/** Default `mat-progress-spinner` options that can be overridden. */\nexport interface MatProgressSpinnerDefaultOptions {\n /** Diameter of the spinner. */\n diameter?: number;\n /** Width of the spinner's stroke. */\n strokeWidth?: number;\n /**\n * Whether the animations should be force to be enabled, ignoring if the current environment is\n * using NoopAnimationsModule.\n */\n _forceAnimations?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-spinner`. */\nexport const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS =\n new InjectionToken<MatProgressSpinnerDefaultOptions>('mat-progress-spinner-default-options', {\n providedIn: 'root',\n factory: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,\n });\n\n/** @docs-private */\nexport function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY(): MatProgressSpinnerDefaultOptions {\n return {diameter: BASE_SIZE};\n}\n\n// .0001 percentage difference is necessary in order to avoid unwanted animation frames\n// for example because the animation duration is 4 seconds, .1% accounts to 4ms\n// which are enough to see the flicker described in\n// https://github.com/angular/material2/issues/8984\nconst INDETERMINATE_ANIMATION_TEMPLATE = `\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n`;\n\n/**\n * `<mat-progress-spinner>` component.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-progress-spinner',\n exportAs: 'matProgressSpinner',\n host: {\n 'role': 'progressbar',\n 'class': 'mat-progress-spinner',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n '[attr.aria-valuemin]': 'mode === \"determinate\" ? 0 : null',\n '[attr.aria-valuemax]': 'mode === \"determinate\" ? 100 : null',\n '[attr.aria-valuenow]': 'value',\n '[attr.mode]': 'mode',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatProgressSpinner extends _MatProgressSpinnerMixinBase implements CanColor {\n\n private _value = 0;\n private _strokeWidth: number;\n private _fallbackAnimation = false;\n\n /** Tracks diameters of existing instances to de-dupe generated styles (default d = 100) */\n private static diameters = new Set<number>([BASE_SIZE]);\n\n /**\n * Used for storing all of the generated keyframe animations.\n * @dynamic\n */\n private static styleTag: HTMLStyleElement|null = null;\n\n /** Whether the _mat-animation-noopable class should be applied, disabling animations. */\n _noopAnimations: boolean = this.animationMode === 'NoopAnimations' && (\n !!this.defaults && !this.defaults._forceAnimations);\n\n /** The diameter of the progress spinner (will set width and height of svg). */\n @Input()\n get diameter(): number { return this._diameter; }\n set diameter(size: number) {\n this._diameter = coerceNumberProperty(size);\n\n if (!this._fallbackAnimation && !MatProgressSpinner.diameters.has(this._diameter)) {\n this._attachStyleNode();\n }\n }\n private _diameter = BASE_SIZE;\n\n /** Stroke width of the progress spinner. */\n @Input()\n get strokeWidth(): number {\n return this._strokeWidth || this.diameter / 10;\n }\n set strokeWidth(value: number) {\n this._strokeWidth = coerceNumberProperty(value);\n }\n\n /** Mode of the progress circle */\n @Input() mode: ProgressSpinnerMode = 'determinate';\n\n /** Value of the progress circle. */\n @Input()\n get value(): number {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(newValue: number) {\n this._value = Math.max(0, Math.min(100, coerceNumberProperty(newValue)));\n }\n\n constructor(public _elementRef: ElementRef,\n platform: Platform,\n @Optional() @Inject(DOCUMENT) private _document: any,\n // @breaking-change 8.0.0 animationMode and defaults parameters to be made required.\n @Optional() @Inject(ANIMATION_MODULE_TYPE) private animationMode?: string,\n @Inject(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS)\n private defaults?: MatProgressSpinnerDefaultOptions) {\n\n super(_elementRef);\n this._fallbackAnimation = platform.EDGE || platform.TRIDENT;\n\n if (defaults) {\n if (defaults.diameter) {\n this.diameter = defaults.diameter;\n }\n\n if (defaults.strokeWidth) {\n this.strokeWidth = defaults.strokeWidth;\n }\n }\n\n // On IE and Edge, we can't animate the `stroke-dashoffset`\n // reliably so we fall back to a non-spec animation.\n const animationClass =\n `mat-progress-spinner-indeterminate${this._fallbackAnimation ? '-fallback' : ''}-animation`;\n\n _elementRef.nativeElement.classList.add(animationClass);\n }\n\n /** The radius of the spinner, adjusted for stroke width. */\n get _circleRadius() {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n\n /** The view box of the spinner's svg element. */\n get _viewBox() {\n const viewBox = this._circleRadius * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n\n /** The stroke circumference of the svg circle. */\n get _strokeCircumference(): number {\n return 2 * Math.PI * this._circleRadius;\n }\n\n /** The dash offset of the svg circle. */\n get _strokeDashOffset() {\n if (this.mode === 'determinate') {\n return this._strokeCircumference * (100 - this._value) / 100;\n }\n\n // In fallback mode set the circle to 80% and rotate it with CSS.\n if (this._fallbackAnimation && this.mode === 'indeterminate') {\n return this._strokeCircumference * 0.2;\n }\n\n return null;\n }\n\n /** Stroke width of the circle in percent. */\n get _circleStrokeWidth() {\n return this.strokeWidth / this.diameter * 100;\n }\n\n /** Dynamically generates a style tag containing the correct animation for this diameter. */\n private _attachStyleNode(): void {\n let styleTag = MatProgressSpinner.styleTag;\n\n if (!styleTag) {\n styleTag = this._document.createElement('style');\n this._document.head.appendChild(styleTag);\n MatProgressSpinner.styleTag = styleTag;\n }\n\n if (styleTag && styleTag.sheet) {\n (styleTag.sheet as CSSStyleSheet).insertRule(this._getAnimationText(), 0);\n }\n\n MatProgressSpinner.diameters.add(this.diameter);\n }\n\n /** Generates animation styles adjusted for the spinner's diameter. */\n private _getAnimationText(): string {\n return INDETERMINATE_ANIMATION_TEMPLATE\n // Animation should begin at 5% and end at 80%\n .replace(/START_VALUE/g, `${0.95 * this._strokeCircumference}`)\n .replace(/END_VALUE/g, `${0.2 * this._strokeCircumference}`)\n .replace(/DIAMETER/g, `${this.diameter}`);\n }\n}\n\n\n/**\n * `<mat-spinner>` component.\n *\n * This is a component definition to be used as a convenience reference to create an\n * indeterminate `<mat-progress-spinner>` instance.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-spinner',\n host: {\n 'role': 'progressbar',\n 'mode': 'indeterminate',\n 'class': 'mat-spinner mat-progress-spinner',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatSpinner extends MatProgressSpinner {\n constructor(elementRef: ElementRef, platform: Platform,\n @Optional() @Inject(DOCUMENT) document: any,\n // @breaking-change 8.0.0 animationMode and defaults parameters to be made required.\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string,\n @Inject(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS)\n defaults?: MatProgressSpinnerDefaultOptions) {\n super(elementRef, platform, document, animationMode, defaults);\n this.mode = 'indeterminate';\n }\n}\n"],"names":["tslib_1.__extends"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;ACgCA,IAAM,SAAS,GAAG,GAAG,CAAC;;;;;AAMtB,IAAM,iBAAiB,GAAG,EAAE,CAAC;;;;AAI7B,AAAA,IAAA;;;AAAA,sBAAA,kBAAA,YAAA;IACE,SAAF,sBAAA,CAAqB,WAAuB,EAA5C;QAAqB,IAArB,CAAA,WAAgC,GAAX,WAAW,CAAY;KAAI;IA3ChD,OAAA,sBAAA,CAAA;CA4CA,EAAA,CAAC,CAAA;;AACD,AAAA,IAAa,4BAA4B,GACrC,UAAU,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC;;;;AAgBlD,AAAA,IAAa,oCAAoC,GAC7C,IAAI,cAAc,CAAmC,sCAAsC,EAAE;IAC3F,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,4CAA4C;CACtD,CAAC,CAAC;;;;;AAGP,AAAA,SAAgB,4CAA4C,GAA5D;IACE,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,CAAC;CAC9B;;AAMD,IAAM,gCAAgC,GAAG,26CAsBxC,CAAC;;;;;IA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AAA;wBACM,iCAAN,EAAA,iBAAA;wBACI,kBAAJ,EAAA,UAAA;wBACI,mBAAJ,EAAA,UAAA;qBACA;oBACA,MAAA,EAAA,CAAA,OAAA,CAAA;oBACA,QAAA,EAAA,mvBAAA;oBACA,MAAA,EAAA,CAAA,ikGAAA,CAAA;oBACA,eAAA,EAAA,uBAAA,CAAA,MAAA;oBACE,aAAF,EAAA,iBAAA,CAAA,IAAA;iBACA,EAAA,EAAA;KACA,CAAA;;IAEA,UAAA,CAAA,cAAA,GAAA,YAAA,EAAA,OAAmC;QACnC,EAAA,IAAA,EAAA,UAAA,EAAA;;;;QArRA,EAAA,IAAA,EAAE,SAAF,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,CAAA,oCAAA,EAAA,EAAA,CAAA,EAAA;KALA,CAAA,EAAA,CAAA;IA6RA,OAAA,UAAA,CAAA;CAEA,CAAA,kBAAA,CAAA,CAAA;;;;;;ADjSA;;;;QAMA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;oBACR,OAAO,EAAE,CAAC,eAAe,EAAE,YAAY,CAAC;oBACxC,OAAO,EAAE;wBACP,kBAAkB;wBAClB,UAAU;wBACV,eAAe;qBAChB;oBACD,YAAY,EAAE;wBACZ,kBAAkB;wBAClB,UAAU;qBACX;iBACF,EAAD,EAAA;;IAxBA,OAAA,wBAAA,CAAA;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"progress-spinner.es5.js","sources":["../../../src/lib/progress-spinner/progress-spinner-module.ts","../../../src/lib/progress-spinner/progress-spinner.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatProgressSpinner, MatSpinner} from './progress-spinner';\n\n\n@NgModule({\n imports: [MatCommonModule, CommonModule],\n exports: [\n MatProgressSpinner,\n MatSpinner,\n MatCommonModule\n ],\n declarations: [\n MatProgressSpinner,\n MatSpinner\n ],\n})\nclass MatProgressSpinnerModule {}\n\nexport {MatProgressSpinnerModule};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {Platform} from '@angular/cdk/platform';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n Optional,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\n/** Possible mode for a progress spinner. */\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\n\n/**\n * Base reference size of the spinner.\n * @docs-private\n */\nconst BASE_SIZE = 100;\n\n/**\n * Base reference stroke width of the spinner.\n * @docs-private\n */\nconst BASE_STROKE_WIDTH = 10;\n\n// Boilerplate for applying mixins to MatProgressSpinner.\n/** @docs-private */\nexport class MatProgressSpinnerBase {\n constructor(public _elementRef: ElementRef) {}\n}\nexport const _MatProgressSpinnerMixinBase: CanColorCtor & typeof MatProgressSpinnerBase =\n mixinColor(MatProgressSpinnerBase, 'primary');\n\n/** Default `mat-progress-spinner` options that can be overridden. */\nexport interface MatProgressSpinnerDefaultOptions {\n /** Diameter of the spinner. */\n diameter?: number;\n /** Width of the spinner's stroke. */\n strokeWidth?: number;\n /**\n * Whether the animations should be force to be enabled, ignoring if the current environment is\n * using NoopAnimationsModule.\n */\n _forceAnimations?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-spinner`. */\nexport const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS =\n new InjectionToken<MatProgressSpinnerDefaultOptions>('mat-progress-spinner-default-options', {\n providedIn: 'root',\n factory: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,\n });\n\n/** @docs-private */\nexport function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY(): MatProgressSpinnerDefaultOptions {\n return {diameter: BASE_SIZE};\n}\n\n// .0001 percentage difference is necessary in order to avoid unwanted animation frames\n// for example because the animation duration is 4 seconds, .1% accounts to 4ms\n// which are enough to see the flicker described in\n// https://github.com/angular/material2/issues/8984\nconst INDETERMINATE_ANIMATION_TEMPLATE = `\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n`;\n\n/**\n * `<mat-progress-spinner>` component.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-progress-spinner',\n exportAs: 'matProgressSpinner',\n host: {\n 'role': 'progressbar',\n 'class': 'mat-progress-spinner',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n '[attr.aria-valuemin]': 'mode === \"determinate\" ? 0 : null',\n '[attr.aria-valuemax]': 'mode === \"determinate\" ? 100 : null',\n '[attr.aria-valuenow]': 'value',\n '[attr.mode]': 'mode',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatProgressSpinner extends _MatProgressSpinnerMixinBase implements CanColor {\n\n private _value = 0;\n private _strokeWidth: number;\n private _fallbackAnimation = false;\n\n /** Tracks diameters of existing instances to de-dupe generated styles (default d = 100) */\n private static diameters = new Set<number>([BASE_SIZE]);\n\n /**\n * Used for storing all of the generated keyframe animations.\n * @dynamic\n */\n private static styleTag: HTMLStyleElement|null = null;\n\n /** Whether the _mat-animation-noopable class should be applied, disabling animations. */\n _noopAnimations: boolean = this.animationMode === 'NoopAnimations' && (\n !!this.defaults && !this.defaults._forceAnimations);\n\n /** The diameter of the progress spinner (will set width and height of svg). */\n @Input()\n get diameter(): number { return this._diameter; }\n set diameter(size: number) {\n this._diameter = coerceNumberProperty(size);\n\n if (!this._fallbackAnimation && !MatProgressSpinner.diameters.has(this._diameter)) {\n this._attachStyleNode();\n }\n }\n private _diameter = BASE_SIZE;\n\n /** Stroke width of the progress spinner. */\n @Input()\n get strokeWidth(): number {\n return this._strokeWidth || this.diameter / 10;\n }\n set strokeWidth(value: number) {\n this._strokeWidth = coerceNumberProperty(value);\n }\n\n /** Mode of the progress circle */\n @Input() mode: ProgressSpinnerMode = 'determinate';\n\n /** Value of the progress circle. */\n @Input()\n get value(): number {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(newValue: number) {\n this._value = Math.max(0, Math.min(100, coerceNumberProperty(newValue)));\n }\n\n constructor(public _elementRef: ElementRef,\n platform: Platform,\n @Optional() @Inject(DOCUMENT) private _document: any,\n // @breaking-change 8.0.0 animationMode and defaults parameters to be made required.\n @Optional() @Inject(ANIMATION_MODULE_TYPE) private animationMode?: string,\n @Inject(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS)\n private defaults?: MatProgressSpinnerDefaultOptions) {\n\n super(_elementRef);\n this._fallbackAnimation = platform.EDGE || platform.TRIDENT;\n\n if (defaults) {\n if (defaults.diameter) {\n this.diameter = defaults.diameter;\n }\n\n if (defaults.strokeWidth) {\n this.strokeWidth = defaults.strokeWidth;\n }\n }\n\n // On IE and Edge, we can't animate the `stroke-dashoffset`\n // reliably so we fall back to a non-spec animation.\n const animationClass =\n `mat-progress-spinner-indeterminate${this._fallbackAnimation ? '-fallback' : ''}-animation`;\n\n _elementRef.nativeElement.classList.add(animationClass);\n }\n\n /** The radius of the spinner, adjusted for stroke width. */\n get _circleRadius() {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n\n /** The view box of the spinner's svg element. */\n get _viewBox() {\n const viewBox = this._circleRadius * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n\n /** The stroke circumference of the svg circle. */\n get _strokeCircumference(): number {\n return 2 * Math.PI * this._circleRadius;\n }\n\n /** The dash offset of the svg circle. */\n get _strokeDashOffset() {\n if (this.mode === 'determinate') {\n return this._strokeCircumference * (100 - this._value) / 100;\n }\n\n // In fallback mode set the circle to 80% and rotate it with CSS.\n if (this._fallbackAnimation && this.mode === 'indeterminate') {\n return this._strokeCircumference * 0.2;\n }\n\n return null;\n }\n\n /** Stroke width of the circle in percent. */\n get _circleStrokeWidth() {\n return this.strokeWidth / this.diameter * 100;\n }\n\n /** Dynamically generates a style tag containing the correct animation for this diameter. */\n private _attachStyleNode(): void {\n let styleTag = MatProgressSpinner.styleTag;\n\n if (!styleTag) {\n styleTag = this._document.createElement('style');\n this._document.head.appendChild(styleTag);\n MatProgressSpinner.styleTag = styleTag;\n }\n\n if (styleTag && styleTag.sheet) {\n (styleTag.sheet as CSSStyleSheet).insertRule(this._getAnimationText(), 0);\n }\n\n MatProgressSpinner.diameters.add(this.diameter);\n }\n\n /** Generates animation styles adjusted for the spinner's diameter. */\n private _getAnimationText(): string {\n return INDETERMINATE_ANIMATION_TEMPLATE\n // Animation should begin at 5% and end at 80%\n .replace(/START_VALUE/g, `${0.95 * this._strokeCircumference}`)\n .replace(/END_VALUE/g, `${0.2 * this._strokeCircumference}`)\n .replace(/DIAMETER/g, `${this.diameter}`);\n }\n}\n\n\n/**\n * `<mat-spinner>` component.\n *\n * This is a component definition to be used as a convenience reference to create an\n * indeterminate `<mat-progress-spinner>` instance.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-spinner',\n host: {\n 'role': 'progressbar',\n 'mode': 'indeterminate',\n 'class': 'mat-spinner mat-progress-spinner',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatSpinner extends MatProgressSpinner {\n constructor(elementRef: ElementRef, platform: Platform,\n @Optional() @Inject(DOCUMENT) document: any,\n // @breaking-change 8.0.0 animationMode and defaults parameters to be made required.\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string,\n @Inject(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS)\n defaults?: MatProgressSpinnerDefaultOptions) {\n super(elementRef, platform, document, animationMode, defaults);\n this.mode = 'indeterminate';\n }\n}\n"],"names":["tslib_1.__extends"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;ACgCA,IAAM,SAAS,GAAG,GAAG,CAArB;;;;;;AAMA,IAAM,iBAAiB,GA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