@angular/material 7.1.0 → 7.2.2
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 +50 -19
- package/autocomplete/typings/index.d.ts +0 -1
- package/autocomplete/typings/index.metadata.json +1 -1
- package/autocomplete/typings/public-api.d.ts +1 -0
- package/badge/typings/index.metadata.json +1 -1
- package/bottom-sheet/typings/bottom-sheet-ref.d.ts +2 -0
- package/bottom-sheet/typings/index.metadata.json +1 -1
- package/bundles/material-autocomplete.umd.js +139 -39
- 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 +67 -22
- 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 +45 -14
- 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 +126 -38
- 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 +190 -127
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +1 -2
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +205 -42
- 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 +52 -26
- 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 +123 -34
- 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 +67 -16
- 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 +288 -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 +159 -26
- package/bundles/material-list.umd.js.map +1 -1
- package/bundles/material-list.umd.min.js +2 -2
- package/bundles/material-list.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +176 -70
- 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 +25 -8
- package/bundles/material-paginator.umd.js.map +1 -1
- package/bundles/material-paginator.umd.min.js.map +1 -1
- package/bundles/material-progress-bar.umd.js +32 -13
- 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 +30 -14
- package/bundles/material-progress-spinner.umd.js.map +1 -1
- package/bundles/material-progress-spinner.umd.min.js +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 +186 -49
- 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 +31 -15
- 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 +88 -20
- 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 +69 -20
- 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 +29 -20
- 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 +48 -15
- package/bundles/material-table.umd.js.map +1 -1
- package/bundles/material-table.umd.min.js +1 -1
- package/bundles/material-table.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +162 -61
- 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 +62 -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 +2927 -995
- package/bundles/material.umd.js.map +1 -1
- package/bundles/material.umd.min.js +18 -18
- 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 +2 -2
- 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/core/typings/ripple/ripple.d.ts +1 -1
- package/datepicker/typings/calendar.d.ts +2 -2
- package/datepicker/typings/index.metadata.json +1 -1
- package/dialog/typings/index.metadata.json +1 -1
- package/esm2015/autocomplete.js +73 -36
- 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 +44 -23
- package/esm2015/bottom-sheet.js.map +1 -1
- package/esm2015/button-toggle.js +27 -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 -30
- package/esm2015/chips.js.map +1 -1
- package/esm2015/core.js +147 -128
- package/esm2015/core.js.map +1 -1
- package/esm2015/datepicker.js +103 -37
- 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 +56 -29
- package/esm2015/expansion.js.map +1 -1
- package/esm2015/form-field.js +95 -35
- 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 +144 -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 +118 -24
- package/esm2015/list.js.map +1 -1
- package/esm2015/material.js +13 -12
- package/esm2015/material.js.map +1 -1
- package/esm2015/menu.js +114 -67
- package/esm2015/menu.js.map +1 -1
- package/esm2015/paginator.js +17 -9
- 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 +112 -50
- 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 +51 -23
- package/esm2015/slider.js.map +1 -1
- package/esm2015/snack-bar.js +38 -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 +32 -23
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +51 -18
- package/esm2015/table.js.map +1 -1
- package/esm2015/tabs.js +112 -49
- package/esm2015/tabs.js.map +1 -1
- package/esm2015/toolbar.js +9 -5
- package/esm2015/toolbar.js.map +1 -1
- package/esm2015/tooltip.js +49 -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 +141 -41
- 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 +68 -23
- package/esm5/bottom-sheet.es5.js.map +1 -1
- package/esm5/button-toggle.es5.js +46 -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 +129 -41
- 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 +207 -44
- 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 +54 -29
- package/esm5/expansion.es5.js.map +1 -1
- package/esm5/form-field.es5.js +126 -37
- 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 +290 -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 +161 -27
- 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 +175 -69
- package/esm5/menu.es5.js.map +1 -1
- package/esm5/paginator.es5.js +27 -10
- 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 +189 -52
- 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 +91 -23
- package/esm5/slider.es5.js.map +1 -1
- package/esm5/snack-bar.es5.js +70 -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 +32 -23
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +51 -18
- package/esm5/table.es5.js.map +1 -1
- package/esm5/tabs.es5.js +156 -55
- 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 +64 -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/form-field/typings/prefix.d.ts +1 -1
- package/grid-list/typings/index.d.ts +1 -1
- package/grid-list/typings/index.metadata.json +1 -1
- package/icon/typings/icon-registry.d.ts +3 -2
- package/icon/typings/index.metadata.json +1 -1
- package/list/typings/index.metadata.json +1 -1
- package/list/typings/list.d.ts +16 -5
- package/list/typings/selection-list.d.ts +1 -0
- 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/menu/typings/menu-trigger.d.ts +1 -1
- package/package.json +5 -5
- 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/table/typings/index.metadata.json +1 -1
- package/table/typings/table-data-source.d.ts +2 -0
- package/tabs/typings/index.d.ts +5 -5
- package/tabs/typings/index.metadata.json +1 -1
- package/tabs/typings/tab-group.d.ts +2 -1
- package/tabs/typings/tab-header.d.ts +8 -4
- package/toolbar/typings/index.metadata.json +1 -1
- package/tooltip/typings/index.metadata.json +1 -1
- package/tooltip/typings/tooltip.d.ts +2 -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 +0 -1
- package/typings/autocomplete/index.metadata.json +1 -1
- package/typings/autocomplete/public-api.d.ts +1 -0
- package/typings/badge/index.metadata.json +1 -1
- package/typings/bottom-sheet/bottom-sheet-ref.d.ts +2 -0
- 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 +2 -2
- 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/core/ripple/ripple.d.ts +1 -1
- package/typings/datepicker/calendar.d.ts +2 -2
- package/typings/datepicker/index.metadata.json +1 -1
- package/typings/dialog/index.metadata.json +1 -1
- package/typings/esm5/autocomplete/index.d.ts +0 -1
- package/typings/esm5/autocomplete/index.metadata.json +1 -1
- package/typings/esm5/autocomplete/public-api.d.ts +1 -0
- package/typings/esm5/badge/index.metadata.json +1 -1
- package/typings/esm5/bottom-sheet/bottom-sheet-ref.d.ts +2 -0
- 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 +2 -2
- 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/core/ripple/ripple.d.ts +1 -1
- package/typings/esm5/datepicker/calendar.d.ts +2 -2
- package/typings/esm5/datepicker/index.metadata.json +1 -1
- 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/form-field/prefix.d.ts +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/icon-registry.d.ts +3 -2
- 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/list/list.d.ts +16 -5
- package/typings/esm5/list/selection-list.d.ts +1 -0
- 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/menu/menu-trigger.d.ts +1 -1
- 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/table/index.metadata.json +1 -1
- package/typings/esm5/table/table-data-source.d.ts +2 -0
- package/typings/esm5/tabs/index.d.ts +5 -5
- package/typings/esm5/tabs/index.metadata.json +1 -1
- package/typings/esm5/tabs/tab-group.d.ts +2 -1
- package/typings/esm5/tabs/tab-header.d.ts +8 -4
- package/typings/esm5/toolbar/index.metadata.json +1 -1
- package/typings/esm5/tooltip/index.metadata.json +1 -1
- package/typings/esm5/tooltip/tooltip.d.ts +2 -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/form-field/prefix.d.ts +1 -1
- package/typings/grid-list/index.d.ts +1 -1
- package/typings/grid-list/index.metadata.json +1 -1
- package/typings/icon/icon-registry.d.ts +3 -2
- 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/list/list.d.ts +16 -5
- package/typings/list/selection-list.d.ts +1 -0
- 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/menu/menu-trigger.d.ts +1 -1
- 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/table/index.metadata.json +1 -1
- package/typings/table/table-data-source.d.ts +2 -0
- package/typings/tabs/index.d.ts +5 -5
- package/typings/tabs/index.metadata.json +1 -1
- package/typings/tabs/tab-group.d.ts +2 -1
- package/typings/tabs/tab-header.d.ts +8 -4
- package/typings/toolbar/index.metadata.json +1 -1
- package/typings/tooltip/index.metadata.json +1 -1
- package/typings/tooltip/tooltip.d.ts +2 -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
|
@@ -42,7 +42,7 @@ function __extends(d, b) {
|
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* @fileoverview added by tsickle
|
|
45
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
45
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
46
46
|
*/
|
|
47
47
|
/**
|
|
48
48
|
* Returns an exception to be thrown in the case when attempting to
|
|
@@ -97,11 +97,11 @@ SvgIconConfig = /** @class */ (function () {
|
|
|
97
97
|
function SvgIconConfig(data) {
|
|
98
98
|
// Note that we can't use `instanceof SVGElement` here,
|
|
99
99
|
// because it'll break during server-side rendering.
|
|
100
|
-
if (!!(/** @type {?} */ (data)).nodeName) {
|
|
101
|
-
this.svgElement = /** @type {?} */ (data);
|
|
100
|
+
if (!!((/** @type {?} */ (data))).nodeName) {
|
|
101
|
+
this.svgElement = (/** @type {?} */ (data));
|
|
102
102
|
}
|
|
103
103
|
else {
|
|
104
|
-
this.url = /** @type {?} */ (data);
|
|
104
|
+
this.url = (/** @type {?} */ (data));
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
return SvgIconConfig;
|
|
@@ -153,18 +153,22 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
153
153
|
*/
|
|
154
154
|
/**
|
|
155
155
|
* Registers an icon by URL in the default namespace.
|
|
156
|
+
* @template THIS
|
|
157
|
+
* @this {THIS}
|
|
156
158
|
* @param {?} iconName Name under which the icon should be registered.
|
|
157
159
|
* @param {?} url
|
|
158
|
-
* @return {
|
|
160
|
+
* @return {THIS}
|
|
159
161
|
*/
|
|
160
162
|
MatIconRegistry.prototype.addSvgIcon = /**
|
|
161
163
|
* Registers an icon by URL in the default namespace.
|
|
164
|
+
* @template THIS
|
|
165
|
+
* @this {THIS}
|
|
162
166
|
* @param {?} iconName Name under which the icon should be registered.
|
|
163
167
|
* @param {?} url
|
|
164
|
-
* @return {
|
|
168
|
+
* @return {THIS}
|
|
165
169
|
*/
|
|
166
170
|
function (iconName, url) {
|
|
167
|
-
return this.addSvgIconInNamespace('', iconName, url);
|
|
171
|
+
return (/** @type {?} */ (this)).addSvgIconInNamespace('', iconName, url);
|
|
168
172
|
};
|
|
169
173
|
/**
|
|
170
174
|
* Registers an icon using an HTML string in the default namespace.
|
|
@@ -173,18 +177,22 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
173
177
|
*/
|
|
174
178
|
/**
|
|
175
179
|
* Registers an icon using an HTML string in the default namespace.
|
|
180
|
+
* @template THIS
|
|
181
|
+
* @this {THIS}
|
|
176
182
|
* @param {?} iconName Name under which the icon should be registered.
|
|
177
183
|
* @param {?} literal SVG source of the icon.
|
|
178
|
-
* @return {
|
|
184
|
+
* @return {THIS}
|
|
179
185
|
*/
|
|
180
186
|
MatIconRegistry.prototype.addSvgIconLiteral = /**
|
|
181
187
|
* Registers an icon using an HTML string in the default namespace.
|
|
188
|
+
* @template THIS
|
|
189
|
+
* @this {THIS}
|
|
182
190
|
* @param {?} iconName Name under which the icon should be registered.
|
|
183
191
|
* @param {?} literal SVG source of the icon.
|
|
184
|
-
* @return {
|
|
192
|
+
* @return {THIS}
|
|
185
193
|
*/
|
|
186
194
|
function (iconName, literal) {
|
|
187
|
-
return this.addSvgIconLiteralInNamespace('', iconName, literal);
|
|
195
|
+
return (/** @type {?} */ (this)).addSvgIconLiteralInNamespace('', iconName, literal);
|
|
188
196
|
};
|
|
189
197
|
/**
|
|
190
198
|
* Registers an icon by URL in the specified namespace.
|
|
@@ -194,20 +202,24 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
194
202
|
*/
|
|
195
203
|
/**
|
|
196
204
|
* Registers an icon by URL in the specified namespace.
|
|
205
|
+
* @template THIS
|
|
206
|
+
* @this {THIS}
|
|
197
207
|
* @param {?} namespace Namespace in which the icon should be registered.
|
|
198
208
|
* @param {?} iconName Name under which the icon should be registered.
|
|
199
209
|
* @param {?} url
|
|
200
|
-
* @return {
|
|
210
|
+
* @return {THIS}
|
|
201
211
|
*/
|
|
202
212
|
MatIconRegistry.prototype.addSvgIconInNamespace = /**
|
|
203
213
|
* Registers an icon by URL in the specified namespace.
|
|
214
|
+
* @template THIS
|
|
215
|
+
* @this {THIS}
|
|
204
216
|
* @param {?} namespace Namespace in which the icon should be registered.
|
|
205
217
|
* @param {?} iconName Name under which the icon should be registered.
|
|
206
218
|
* @param {?} url
|
|
207
|
-
* @return {
|
|
219
|
+
* @return {THIS}
|
|
208
220
|
*/
|
|
209
221
|
function (namespace, iconName, url) {
|
|
210
|
-
return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url));
|
|
222
|
+
return (/** @type {?} */ (this))._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url));
|
|
211
223
|
};
|
|
212
224
|
/**
|
|
213
225
|
* Registers an icon using an HTML string in the specified namespace.
|
|
@@ -217,27 +229,31 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
217
229
|
*/
|
|
218
230
|
/**
|
|
219
231
|
* Registers an icon using an HTML string in the specified namespace.
|
|
232
|
+
* @template THIS
|
|
233
|
+
* @this {THIS}
|
|
220
234
|
* @param {?} namespace Namespace in which the icon should be registered.
|
|
221
235
|
* @param {?} iconName Name under which the icon should be registered.
|
|
222
236
|
* @param {?} literal SVG source of the icon.
|
|
223
|
-
* @return {
|
|
237
|
+
* @return {THIS}
|
|
224
238
|
*/
|
|
225
239
|
MatIconRegistry.prototype.addSvgIconLiteralInNamespace = /**
|
|
226
240
|
* Registers an icon using an HTML string in the specified namespace.
|
|
241
|
+
* @template THIS
|
|
242
|
+
* @this {THIS}
|
|
227
243
|
* @param {?} namespace Namespace in which the icon should be registered.
|
|
228
244
|
* @param {?} iconName Name under which the icon should be registered.
|
|
229
245
|
* @param {?} literal SVG source of the icon.
|
|
230
|
-
* @return {
|
|
246
|
+
* @return {THIS}
|
|
231
247
|
*/
|
|
232
248
|
function (namespace, iconName, literal) {
|
|
233
249
|
/** @type {?} */
|
|
234
|
-
var sanitizedLiteral = this._sanitizer.sanitize(core.SecurityContext.HTML, literal);
|
|
250
|
+
var sanitizedLiteral = (/** @type {?} */ (this))._sanitizer.sanitize(core.SecurityContext.HTML, literal);
|
|
235
251
|
if (!sanitizedLiteral) {
|
|
236
252
|
throw getMatIconFailedToSanitizeLiteralError(literal);
|
|
237
253
|
}
|
|
238
254
|
/** @type {?} */
|
|
239
|
-
var svgElement = this._createSvgElementForSingleIcon(sanitizedLiteral);
|
|
240
|
-
return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement));
|
|
255
|
+
var svgElement = (/** @type {?} */ (this))._createSvgElementForSingleIcon(sanitizedLiteral);
|
|
256
|
+
return (/** @type {?} */ (this))._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement));
|
|
241
257
|
};
|
|
242
258
|
/**
|
|
243
259
|
* Registers an icon set by URL in the default namespace.
|
|
@@ -245,16 +261,20 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
245
261
|
*/
|
|
246
262
|
/**
|
|
247
263
|
* Registers an icon set by URL in the default namespace.
|
|
264
|
+
* @template THIS
|
|
265
|
+
* @this {THIS}
|
|
248
266
|
* @param {?} url
|
|
249
|
-
* @return {
|
|
267
|
+
* @return {THIS}
|
|
250
268
|
*/
|
|
251
269
|
MatIconRegistry.prototype.addSvgIconSet = /**
|
|
252
270
|
* Registers an icon set by URL in the default namespace.
|
|
271
|
+
* @template THIS
|
|
272
|
+
* @this {THIS}
|
|
253
273
|
* @param {?} url
|
|
254
|
-
* @return {
|
|
274
|
+
* @return {THIS}
|
|
255
275
|
*/
|
|
256
276
|
function (url) {
|
|
257
|
-
return this.addSvgIconSetInNamespace('', url);
|
|
277
|
+
return (/** @type {?} */ (this)).addSvgIconSetInNamespace('', url);
|
|
258
278
|
};
|
|
259
279
|
/**
|
|
260
280
|
* Registers an icon set using an HTML string in the default namespace.
|
|
@@ -262,16 +282,20 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
262
282
|
*/
|
|
263
283
|
/**
|
|
264
284
|
* Registers an icon set using an HTML string in the default namespace.
|
|
285
|
+
* @template THIS
|
|
286
|
+
* @this {THIS}
|
|
265
287
|
* @param {?} literal SVG source of the icon set.
|
|
266
|
-
* @return {
|
|
288
|
+
* @return {THIS}
|
|
267
289
|
*/
|
|
268
290
|
MatIconRegistry.prototype.addSvgIconSetLiteral = /**
|
|
269
291
|
* Registers an icon set using an HTML string in the default namespace.
|
|
292
|
+
* @template THIS
|
|
293
|
+
* @this {THIS}
|
|
270
294
|
* @param {?} literal SVG source of the icon set.
|
|
271
|
-
* @return {
|
|
295
|
+
* @return {THIS}
|
|
272
296
|
*/
|
|
273
297
|
function (literal) {
|
|
274
|
-
return this.addSvgIconSetLiteralInNamespace('', literal);
|
|
298
|
+
return (/** @type {?} */ (this)).addSvgIconSetLiteralInNamespace('', literal);
|
|
275
299
|
};
|
|
276
300
|
/**
|
|
277
301
|
* Registers an icon set by URL in the specified namespace.
|
|
@@ -280,18 +304,22 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
280
304
|
*/
|
|
281
305
|
/**
|
|
282
306
|
* Registers an icon set by URL in the specified namespace.
|
|
307
|
+
* @template THIS
|
|
308
|
+
* @this {THIS}
|
|
283
309
|
* @param {?} namespace Namespace in which to register the icon set.
|
|
284
310
|
* @param {?} url
|
|
285
|
-
* @return {
|
|
311
|
+
* @return {THIS}
|
|
286
312
|
*/
|
|
287
313
|
MatIconRegistry.prototype.addSvgIconSetInNamespace = /**
|
|
288
314
|
* Registers an icon set by URL in the specified namespace.
|
|
315
|
+
* @template THIS
|
|
316
|
+
* @this {THIS}
|
|
289
317
|
* @param {?} namespace Namespace in which to register the icon set.
|
|
290
318
|
* @param {?} url
|
|
291
|
-
* @return {
|
|
319
|
+
* @return {THIS}
|
|
292
320
|
*/
|
|
293
321
|
function (namespace, url) {
|
|
294
|
-
return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url));
|
|
322
|
+
return (/** @type {?} */ (this))._addSvgIconSetConfig(namespace, new SvgIconConfig(url));
|
|
295
323
|
};
|
|
296
324
|
/**
|
|
297
325
|
* Registers an icon set using an HTML string in the specified namespace.
|
|
@@ -300,25 +328,29 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
300
328
|
*/
|
|
301
329
|
/**
|
|
302
330
|
* Registers an icon set using an HTML string in the specified namespace.
|
|
331
|
+
* @template THIS
|
|
332
|
+
* @this {THIS}
|
|
303
333
|
* @param {?} namespace Namespace in which to register the icon set.
|
|
304
334
|
* @param {?} literal SVG source of the icon set.
|
|
305
|
-
* @return {
|
|
335
|
+
* @return {THIS}
|
|
306
336
|
*/
|
|
307
337
|
MatIconRegistry.prototype.addSvgIconSetLiteralInNamespace = /**
|
|
308
338
|
* Registers an icon set using an HTML string in the specified namespace.
|
|
339
|
+
* @template THIS
|
|
340
|
+
* @this {THIS}
|
|
309
341
|
* @param {?} namespace Namespace in which to register the icon set.
|
|
310
342
|
* @param {?} literal SVG source of the icon set.
|
|
311
|
-
* @return {
|
|
343
|
+
* @return {THIS}
|
|
312
344
|
*/
|
|
313
345
|
function (namespace, literal) {
|
|
314
346
|
/** @type {?} */
|
|
315
|
-
var sanitizedLiteral = this._sanitizer.sanitize(core.SecurityContext.HTML, literal);
|
|
347
|
+
var sanitizedLiteral = (/** @type {?} */ (this))._sanitizer.sanitize(core.SecurityContext.HTML, literal);
|
|
316
348
|
if (!sanitizedLiteral) {
|
|
317
349
|
throw getMatIconFailedToSanitizeLiteralError(literal);
|
|
318
350
|
}
|
|
319
351
|
/** @type {?} */
|
|
320
|
-
var svgElement = this._svgElementFromString(sanitizedLiteral);
|
|
321
|
-
return this._addSvgIconSetConfig(namespace, new SvgIconConfig(svgElement));
|
|
352
|
+
var svgElement = (/** @type {?} */ (this))._svgElementFromString(sanitizedLiteral);
|
|
353
|
+
return (/** @type {?} */ (this))._addSvgIconSetConfig(namespace, new SvgIconConfig(svgElement));
|
|
322
354
|
};
|
|
323
355
|
/**
|
|
324
356
|
* Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon
|
|
@@ -333,23 +365,27 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
333
365
|
* component with the alias as the fontSet input will cause the class name to be applied
|
|
334
366
|
* to the `<mat-icon>` element.
|
|
335
367
|
*
|
|
368
|
+
* @template THIS
|
|
369
|
+
* @this {THIS}
|
|
336
370
|
* @param {?} alias Alias for the font.
|
|
337
371
|
* @param {?=} className Class name override to be used instead of the alias.
|
|
338
|
-
* @return {
|
|
372
|
+
* @return {THIS}
|
|
339
373
|
*/
|
|
340
374
|
MatIconRegistry.prototype.registerFontClassAlias = /**
|
|
341
375
|
* Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon
|
|
342
376
|
* component with the alias as the fontSet input will cause the class name to be applied
|
|
343
377
|
* to the `<mat-icon>` element.
|
|
344
378
|
*
|
|
379
|
+
* @template THIS
|
|
380
|
+
* @this {THIS}
|
|
345
381
|
* @param {?} alias Alias for the font.
|
|
346
382
|
* @param {?=} className Class name override to be used instead of the alias.
|
|
347
|
-
* @return {
|
|
383
|
+
* @return {THIS}
|
|
348
384
|
*/
|
|
349
385
|
function (alias, className) {
|
|
350
386
|
if (className === void 0) { className = alias; }
|
|
351
|
-
this._fontCssClassesByAlias.set(alias, className);
|
|
352
|
-
return this;
|
|
387
|
+
(/** @type {?} */ (this))._fontCssClassesByAlias.set(alias, className);
|
|
388
|
+
return (/** @type {?} */ (this));
|
|
353
389
|
};
|
|
354
390
|
/**
|
|
355
391
|
* Returns the CSS class name associated with the alias by a previous call to
|
|
@@ -380,19 +416,23 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
380
416
|
* Sets the CSS class name to be used for icon fonts when an `<mat-icon>` component does not
|
|
381
417
|
* have a fontSet input value, and is not loading an icon by name or URL.
|
|
382
418
|
*
|
|
419
|
+
* @template THIS
|
|
420
|
+
* @this {THIS}
|
|
383
421
|
* @param {?} className
|
|
384
|
-
* @return {
|
|
422
|
+
* @return {THIS}
|
|
385
423
|
*/
|
|
386
424
|
MatIconRegistry.prototype.setDefaultFontSetClass = /**
|
|
387
425
|
* Sets the CSS class name to be used for icon fonts when an `<mat-icon>` component does not
|
|
388
426
|
* have a fontSet input value, and is not loading an icon by name or URL.
|
|
389
427
|
*
|
|
428
|
+
* @template THIS
|
|
429
|
+
* @this {THIS}
|
|
390
430
|
* @param {?} className
|
|
391
|
-
* @return {
|
|
431
|
+
* @return {THIS}
|
|
392
432
|
*/
|
|
393
433
|
function (className) {
|
|
394
|
-
this._defaultFontSetClass = className;
|
|
395
|
-
return this;
|
|
434
|
+
(/** @type {?} */ (this))._defaultFontSetClass = className;
|
|
435
|
+
return (/** @type {?} */ (this));
|
|
396
436
|
};
|
|
397
437
|
/**
|
|
398
438
|
* Returns the CSS class name to be used for icon fonts when an `<mat-icon>` component does not
|
|
@@ -449,7 +489,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
449
489
|
if (cachedIcon) {
|
|
450
490
|
return rxjs.of(cloneSvg(cachedIcon));
|
|
451
491
|
}
|
|
452
|
-
return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl)).pipe(operators.tap(function (svg) { return _this._cachedIconsByUrl.set(/** @type {?} */ (
|
|
492
|
+
return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl)).pipe(operators.tap(function (svg) { return _this._cachedIconsByUrl.set((/** @type {?} */ (url)), svg); }), operators.map(function (svg) { return cloneSvg(svg); }));
|
|
453
493
|
};
|
|
454
494
|
/**
|
|
455
495
|
* Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name
|
|
@@ -479,6 +519,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
479
519
|
*/
|
|
480
520
|
function (name, namespace) {
|
|
481
521
|
if (namespace === void 0) { namespace = ''; }
|
|
522
|
+
// Return (copy of) cached icon if possible.
|
|
482
523
|
/** @type {?} */
|
|
483
524
|
var key = iconKey(namespace, name);
|
|
484
525
|
/** @type {?} */
|
|
@@ -486,6 +527,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
486
527
|
if (config) {
|
|
487
528
|
return this._getSvgFromConfig(config);
|
|
488
529
|
}
|
|
530
|
+
// See if we have any icon sets registered for the namespace.
|
|
489
531
|
/** @type {?} */
|
|
490
532
|
var iconSetConfigs = this._iconSetConfigs.get(namespace);
|
|
491
533
|
if (iconSetConfigs) {
|
|
@@ -493,13 +535,29 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
493
535
|
}
|
|
494
536
|
return rxjs.throwError(getMatIconNameNotFoundError(key));
|
|
495
537
|
};
|
|
538
|
+
/**
|
|
539
|
+
* @return {?}
|
|
540
|
+
*/
|
|
541
|
+
MatIconRegistry.prototype.ngOnDestroy = /**
|
|
542
|
+
* @return {?}
|
|
543
|
+
*/
|
|
544
|
+
function () {
|
|
545
|
+
this._svgIconConfigs.clear();
|
|
546
|
+
this._iconSetConfigs.clear();
|
|
547
|
+
this._cachedIconsByUrl.clear();
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.
|
|
551
|
+
*/
|
|
496
552
|
/**
|
|
497
553
|
* Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.
|
|
554
|
+
* @private
|
|
498
555
|
* @param {?} config
|
|
499
556
|
* @return {?}
|
|
500
557
|
*/
|
|
501
558
|
MatIconRegistry.prototype._getSvgFromConfig = /**
|
|
502
559
|
* Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.
|
|
560
|
+
* @private
|
|
503
561
|
* @param {?} config
|
|
504
562
|
* @return {?}
|
|
505
563
|
*/
|
|
@@ -520,6 +578,15 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
520
578
|
* that have not been cached, and searches again after all fetches are completed.
|
|
521
579
|
* The returned Observable produces the SVG element if possible, and throws
|
|
522
580
|
* an error if no icon with the specified name can be found.
|
|
581
|
+
*/
|
|
582
|
+
/**
|
|
583
|
+
* Attempts to find an icon with the specified name in any of the SVG icon sets.
|
|
584
|
+
* First searches the available cached icons for a nested element with a matching name, and
|
|
585
|
+
* if found copies the element to a new `<svg>` element. If not found, fetches all icon sets
|
|
586
|
+
* that have not been cached, and searches again after all fetches are completed.
|
|
587
|
+
* The returned Observable produces the SVG element if possible, and throws
|
|
588
|
+
* an error if no icon with the specified name can be found.
|
|
589
|
+
* @private
|
|
523
590
|
* @param {?} name
|
|
524
591
|
* @param {?} iconSetConfigs
|
|
525
592
|
* @return {?}
|
|
@@ -531,12 +598,15 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
531
598
|
* that have not been cached, and searches again after all fetches are completed.
|
|
532
599
|
* The returned Observable produces the SVG element if possible, and throws
|
|
533
600
|
* an error if no icon with the specified name can be found.
|
|
601
|
+
* @private
|
|
534
602
|
* @param {?} name
|
|
535
603
|
* @param {?} iconSetConfigs
|
|
536
604
|
* @return {?}
|
|
537
605
|
*/
|
|
538
606
|
function (name, iconSetConfigs) {
|
|
539
607
|
var _this = this;
|
|
608
|
+
// For all the icon set SVG elements we've fetched, see if any contain an icon with the
|
|
609
|
+
// requested name.
|
|
540
610
|
/** @type {?} */
|
|
541
611
|
var namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);
|
|
542
612
|
if (namedIcon) {
|
|
@@ -545,6 +615,8 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
545
615
|
// it from the icon set.
|
|
546
616
|
return rxjs.of(namedIcon);
|
|
547
617
|
}
|
|
618
|
+
// Not found in any cached icon sets. If there are icon sets with URLs that we haven't
|
|
619
|
+
// fetched, fetch them now and look for iconName in the results.
|
|
548
620
|
/** @type {?} */
|
|
549
621
|
var iconSetFetchRequests = iconSetConfigs
|
|
550
622
|
.filter(function (iconSetConfig) { return !iconSetConfig.svgElement; })
|
|
@@ -573,6 +645,12 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
573
645
|
* Searches the cached SVG elements for the given icon sets for a nested icon element whose "id"
|
|
574
646
|
* tag matches the specified name. If found, copies the nested element to a new SVG element and
|
|
575
647
|
* returns it. Returns null if no matching element is found.
|
|
648
|
+
*/
|
|
649
|
+
/**
|
|
650
|
+
* Searches the cached SVG elements for the given icon sets for a nested icon element whose "id"
|
|
651
|
+
* tag matches the specified name. If found, copies the nested element to a new SVG element and
|
|
652
|
+
* returns it. Returns null if no matching element is found.
|
|
653
|
+
* @private
|
|
576
654
|
* @param {?} iconName
|
|
577
655
|
* @param {?} iconSetConfigs
|
|
578
656
|
* @return {?}
|
|
@@ -581,6 +659,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
581
659
|
* Searches the cached SVG elements for the given icon sets for a nested icon element whose "id"
|
|
582
660
|
* tag matches the specified name. If found, copies the nested element to a new SVG element and
|
|
583
661
|
* returns it. Returns null if no matching element is found.
|
|
662
|
+
* @private
|
|
584
663
|
* @param {?} iconName
|
|
585
664
|
* @param {?} iconSetConfigs
|
|
586
665
|
* @return {?}
|
|
@@ -603,12 +682,18 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
603
682
|
/**
|
|
604
683
|
* Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element
|
|
605
684
|
* from it.
|
|
685
|
+
*/
|
|
686
|
+
/**
|
|
687
|
+
* Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element
|
|
688
|
+
* from it.
|
|
689
|
+
* @private
|
|
606
690
|
* @param {?} config
|
|
607
691
|
* @return {?}
|
|
608
692
|
*/
|
|
609
693
|
MatIconRegistry.prototype._loadSvgIconFromConfig = /**
|
|
610
694
|
* Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element
|
|
611
695
|
* from it.
|
|
696
|
+
* @private
|
|
612
697
|
* @param {?} config
|
|
613
698
|
* @return {?}
|
|
614
699
|
*/
|
|
@@ -620,12 +705,18 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
620
705
|
/**
|
|
621
706
|
* Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element
|
|
622
707
|
* from it.
|
|
708
|
+
*/
|
|
709
|
+
/**
|
|
710
|
+
* Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element
|
|
711
|
+
* from it.
|
|
712
|
+
* @private
|
|
623
713
|
* @param {?} config
|
|
624
714
|
* @return {?}
|
|
625
715
|
*/
|
|
626
716
|
MatIconRegistry.prototype._loadSvgIconSetFromConfig = /**
|
|
627
717
|
* Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element
|
|
628
718
|
* from it.
|
|
719
|
+
* @private
|
|
629
720
|
* @param {?} config
|
|
630
721
|
* @return {?}
|
|
631
722
|
*/
|
|
@@ -646,11 +737,16 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
646
737
|
};
|
|
647
738
|
/**
|
|
648
739
|
* Creates a DOM element from the given SVG string, and adds default attributes.
|
|
740
|
+
*/
|
|
741
|
+
/**
|
|
742
|
+
* Creates a DOM element from the given SVG string, and adds default attributes.
|
|
743
|
+
* @private
|
|
649
744
|
* @param {?} responseText
|
|
650
745
|
* @return {?}
|
|
651
746
|
*/
|
|
652
747
|
MatIconRegistry.prototype._createSvgElementForSingleIcon = /**
|
|
653
748
|
* Creates a DOM element from the given SVG string, and adds default attributes.
|
|
749
|
+
* @private
|
|
654
750
|
* @param {?} responseText
|
|
655
751
|
* @return {?}
|
|
656
752
|
*/
|
|
@@ -664,6 +760,12 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
664
760
|
* Searches the cached element of the given SvgIconConfig for a nested icon element whose "id"
|
|
665
761
|
* tag matches the specified name. If found, copies the nested element to a new SVG element and
|
|
666
762
|
* returns it. Returns null if no matching element is found.
|
|
763
|
+
*/
|
|
764
|
+
/**
|
|
765
|
+
* Searches the cached element of the given SvgIconConfig for a nested icon element whose "id"
|
|
766
|
+
* tag matches the specified name. If found, copies the nested element to a new SVG element and
|
|
767
|
+
* returns it. Returns null if no matching element is found.
|
|
768
|
+
* @private
|
|
667
769
|
* @param {?} iconSet
|
|
668
770
|
* @param {?} iconName
|
|
669
771
|
* @return {?}
|
|
@@ -672,6 +774,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
672
774
|
* Searches the cached element of the given SvgIconConfig for a nested icon element whose "id"
|
|
673
775
|
* tag matches the specified name. If found, copies the nested element to a new SVG element and
|
|
674
776
|
* returns it. Returns null if no matching element is found.
|
|
777
|
+
* @private
|
|
675
778
|
* @param {?} iconSet
|
|
676
779
|
* @param {?} iconName
|
|
677
780
|
* @return {?}
|
|
@@ -682,13 +785,15 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
682
785
|
if (!iconSource) {
|
|
683
786
|
return null;
|
|
684
787
|
}
|
|
788
|
+
// Clone the element and remove the ID to prevent multiple elements from being added
|
|
789
|
+
// to the page with the same ID.
|
|
685
790
|
/** @type {?} */
|
|
686
|
-
var iconElement = /** @type {?} */ (iconSource.cloneNode(true));
|
|
791
|
+
var iconElement = (/** @type {?} */ (iconSource.cloneNode(true)));
|
|
687
792
|
iconElement.removeAttribute('id');
|
|
688
793
|
// If the icon node is itself an <svg> node, clone and return it directly. If not, set it as
|
|
689
794
|
// the content of a new <svg> node.
|
|
690
795
|
if (iconElement.nodeName.toLowerCase() === 'svg') {
|
|
691
|
-
return this._setSvgAttributes(/** @type {?} */ (iconElement));
|
|
796
|
+
return this._setSvgAttributes((/** @type {?} */ (iconElement)));
|
|
692
797
|
}
|
|
693
798
|
// If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note
|
|
694
799
|
// that the same could be achieved by referring to it via <use href="#id">, however the <use>
|
|
@@ -696,6 +801,11 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
696
801
|
if (iconElement.nodeName.toLowerCase() === 'symbol') {
|
|
697
802
|
return this._setSvgAttributes(this._toSvgElement(iconElement));
|
|
698
803
|
}
|
|
804
|
+
// createElement('SVG') doesn't work as expected; the DOM ends up with
|
|
805
|
+
// the correct nodes, but the SVG content doesn't render. Instead we
|
|
806
|
+
// have to create an empty SVG node using innerHTML and append its content.
|
|
807
|
+
// Elements created using DOMParser.parseFromString have the same problem.
|
|
808
|
+
// http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display
|
|
699
809
|
/** @type {?} */
|
|
700
810
|
var svg = this._svgElementFromString('<svg></svg>');
|
|
701
811
|
// Clone the node so we don't remove it from the parent icon set element.
|
|
@@ -704,11 +814,16 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
704
814
|
};
|
|
705
815
|
/**
|
|
706
816
|
* Creates a DOM element from the given SVG string.
|
|
817
|
+
*/
|
|
818
|
+
/**
|
|
819
|
+
* Creates a DOM element from the given SVG string.
|
|
820
|
+
* @private
|
|
707
821
|
* @param {?} str
|
|
708
822
|
* @return {?}
|
|
709
823
|
*/
|
|
710
824
|
MatIconRegistry.prototype._svgElementFromString = /**
|
|
711
825
|
* Creates a DOM element from the given SVG string.
|
|
826
|
+
* @private
|
|
712
827
|
* @param {?} str
|
|
713
828
|
* @return {?}
|
|
714
829
|
*/
|
|
@@ -717,7 +832,7 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
717
832
|
var div = this._document.createElement('DIV');
|
|
718
833
|
div.innerHTML = str;
|
|
719
834
|
/** @type {?} */
|
|
720
|
-
var svg = /** @type {?} */ (div.querySelector('svg'));
|
|
835
|
+
var svg = (/** @type {?} */ (div.querySelector('svg')));
|
|
721
836
|
if (!svg) {
|
|
722
837
|
throw Error('<svg> tag not found');
|
|
723
838
|
}
|
|
@@ -725,11 +840,16 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
725
840
|
};
|
|
726
841
|
/**
|
|
727
842
|
* Converts an element into an SVG node by cloning all of its children.
|
|
843
|
+
*/
|
|
844
|
+
/**
|
|
845
|
+
* Converts an element into an SVG node by cloning all of its children.
|
|
846
|
+
* @private
|
|
728
847
|
* @param {?} element
|
|
729
848
|
* @return {?}
|
|
730
849
|
*/
|
|
731
850
|
MatIconRegistry.prototype._toSvgElement = /**
|
|
732
851
|
* Converts an element into an SVG node by cloning all of its children.
|
|
852
|
+
* @private
|
|
733
853
|
* @param {?} element
|
|
734
854
|
* @return {?}
|
|
735
855
|
*/
|
|
@@ -745,11 +865,16 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
745
865
|
};
|
|
746
866
|
/**
|
|
747
867
|
* Sets the default attributes for an SVG element to be used as an icon.
|
|
868
|
+
*/
|
|
869
|
+
/**
|
|
870
|
+
* Sets the default attributes for an SVG element to be used as an icon.
|
|
871
|
+
* @private
|
|
748
872
|
* @param {?} svg
|
|
749
873
|
* @return {?}
|
|
750
874
|
*/
|
|
751
875
|
MatIconRegistry.prototype._setSvgAttributes = /**
|
|
752
876
|
* Sets the default attributes for an SVG element to be used as an icon.
|
|
877
|
+
* @private
|
|
753
878
|
* @param {?} svg
|
|
754
879
|
* @return {?}
|
|
755
880
|
*/
|
|
@@ -764,12 +889,18 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
764
889
|
/**
|
|
765
890
|
* Returns an Observable which produces the string contents of the given URL. Results may be
|
|
766
891
|
* cached, so future calls with the same URL may not cause another HTTP request.
|
|
892
|
+
*/
|
|
893
|
+
/**
|
|
894
|
+
* Returns an Observable which produces the string contents of the given URL. Results may be
|
|
895
|
+
* cached, so future calls with the same URL may not cause another HTTP request.
|
|
896
|
+
* @private
|
|
767
897
|
* @param {?} safeUrl
|
|
768
898
|
* @return {?}
|
|
769
899
|
*/
|
|
770
900
|
MatIconRegistry.prototype._fetchUrl = /**
|
|
771
901
|
* Returns an Observable which produces the string contents of the given URL. Results may be
|
|
772
902
|
* cached, so future calls with the same URL may not cause another HTTP request.
|
|
903
|
+
* @private
|
|
773
904
|
* @param {?} safeUrl
|
|
774
905
|
* @return {?}
|
|
775
906
|
*/
|
|
@@ -786,11 +917,16 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
786
917
|
if (!url) {
|
|
787
918
|
throw getMatIconFailedToSanitizeUrlError(safeUrl);
|
|
788
919
|
}
|
|
920
|
+
// Store in-progress fetches to avoid sending a duplicate request for a URL when there is
|
|
921
|
+
// already a request in progress for that URL. It's necessary to call share() on the
|
|
922
|
+
// Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.
|
|
789
923
|
/** @type {?} */
|
|
790
924
|
var inProgressFetch = this._inProgressUrlFetches.get(url);
|
|
791
925
|
if (inProgressFetch) {
|
|
792
926
|
return inProgressFetch;
|
|
793
927
|
}
|
|
928
|
+
// TODO(jelbourn): for some reason, the `finalize` operator "loses" the generic type on the
|
|
929
|
+
// Observable. Figure out why and fix it.
|
|
794
930
|
/** @type {?} */
|
|
795
931
|
var req = this._httpClient.get(url, { responseType: 'text' }).pipe(operators.finalize(function () { return _this._inProgressUrlFetches.delete(url); }), operators.share());
|
|
796
932
|
this._inProgressUrlFetches.set(url, req);
|
|
@@ -798,44 +934,67 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
798
934
|
};
|
|
799
935
|
/**
|
|
800
936
|
* Registers an icon config by name in the specified namespace.
|
|
937
|
+
* @param namespace Namespace in which to register the icon config.
|
|
938
|
+
* @param iconName Name under which to register the config.
|
|
939
|
+
* @param config Config to be registered.
|
|
940
|
+
*/
|
|
941
|
+
/**
|
|
942
|
+
* Registers an icon config by name in the specified namespace.
|
|
943
|
+
* @private
|
|
944
|
+
* @template THIS
|
|
945
|
+
* @this {THIS}
|
|
801
946
|
* @param {?} namespace Namespace in which to register the icon config.
|
|
802
947
|
* @param {?} iconName Name under which to register the config.
|
|
803
948
|
* @param {?} config Config to be registered.
|
|
804
|
-
* @return {
|
|
949
|
+
* @return {THIS}
|
|
805
950
|
*/
|
|
806
951
|
MatIconRegistry.prototype._addSvgIconConfig = /**
|
|
807
952
|
* Registers an icon config by name in the specified namespace.
|
|
953
|
+
* @private
|
|
954
|
+
* @template THIS
|
|
955
|
+
* @this {THIS}
|
|
808
956
|
* @param {?} namespace Namespace in which to register the icon config.
|
|
809
957
|
* @param {?} iconName Name under which to register the config.
|
|
810
958
|
* @param {?} config Config to be registered.
|
|
811
|
-
* @return {
|
|
959
|
+
* @return {THIS}
|
|
812
960
|
*/
|
|
813
961
|
function (namespace, iconName, config) {
|
|
814
|
-
this._svgIconConfigs.set(iconKey(namespace, iconName), config);
|
|
815
|
-
return this;
|
|
962
|
+
(/** @type {?} */ (this))._svgIconConfigs.set(iconKey(namespace, iconName), config);
|
|
963
|
+
return (/** @type {?} */ (this));
|
|
816
964
|
};
|
|
817
965
|
/**
|
|
818
966
|
* Registers an icon set config in the specified namespace.
|
|
967
|
+
* @param namespace Namespace in which to register the icon config.
|
|
968
|
+
* @param config Config to be registered.
|
|
969
|
+
*/
|
|
970
|
+
/**
|
|
971
|
+
* Registers an icon set config in the specified namespace.
|
|
972
|
+
* @private
|
|
973
|
+
* @template THIS
|
|
974
|
+
* @this {THIS}
|
|
819
975
|
* @param {?} namespace Namespace in which to register the icon config.
|
|
820
976
|
* @param {?} config Config to be registered.
|
|
821
|
-
* @return {
|
|
977
|
+
* @return {THIS}
|
|
822
978
|
*/
|
|
823
979
|
MatIconRegistry.prototype._addSvgIconSetConfig = /**
|
|
824
980
|
* Registers an icon set config in the specified namespace.
|
|
981
|
+
* @private
|
|
982
|
+
* @template THIS
|
|
983
|
+
* @this {THIS}
|
|
825
984
|
* @param {?} namespace Namespace in which to register the icon config.
|
|
826
985
|
* @param {?} config Config to be registered.
|
|
827
|
-
* @return {
|
|
986
|
+
* @return {THIS}
|
|
828
987
|
*/
|
|
829
988
|
function (namespace, config) {
|
|
830
989
|
/** @type {?} */
|
|
831
|
-
var configNamespace = this._iconSetConfigs.get(namespace);
|
|
990
|
+
var configNamespace = (/** @type {?} */ (this))._iconSetConfigs.get(namespace);
|
|
832
991
|
if (configNamespace) {
|
|
833
992
|
configNamespace.push(config);
|
|
834
993
|
}
|
|
835
994
|
else {
|
|
836
|
-
this._iconSetConfigs.set(namespace, [config]);
|
|
995
|
+
(/** @type {?} */ (this))._iconSetConfigs.set(namespace, [config]);
|
|
837
996
|
}
|
|
838
|
-
return this;
|
|
997
|
+
return (/** @type {?} */ (this));
|
|
839
998
|
};
|
|
840
999
|
MatIconRegistry.decorators = [
|
|
841
1000
|
{ type: core.Injectable, args: [{ providedIn: 'root' },] },
|
|
@@ -860,9 +1019,10 @@ var MatIconRegistry = /** @class */ (function () {
|
|
|
860
1019
|
function ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry, httpClient, sanitizer, document) {
|
|
861
1020
|
return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document);
|
|
862
1021
|
}
|
|
863
|
-
/**
|
|
1022
|
+
/**
|
|
864
1023
|
* \@docs-private
|
|
865
|
-
|
|
1024
|
+
* @type {?}
|
|
1025
|
+
*/
|
|
866
1026
|
var ICON_REGISTRY_PROVIDER = {
|
|
867
1027
|
// If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.
|
|
868
1028
|
provide: MatIconRegistry,
|
|
@@ -870,7 +1030,7 @@ var ICON_REGISTRY_PROVIDER = {
|
|
|
870
1030
|
[new core.Optional(), new core.SkipSelf(), MatIconRegistry],
|
|
871
1031
|
[new core.Optional(), http.HttpClient],
|
|
872
1032
|
platformBrowser.DomSanitizer,
|
|
873
|
-
[new core.Optional(), /** @type {?} */ (common.DOCUMENT)],
|
|
1033
|
+
[new core.Optional(), (/** @type {?} */ (common.DOCUMENT))],
|
|
874
1034
|
],
|
|
875
1035
|
useFactory: ICON_REGISTRY_PROVIDER_FACTORY,
|
|
876
1036
|
};
|
|
@@ -880,7 +1040,7 @@ var ICON_REGISTRY_PROVIDER = {
|
|
|
880
1040
|
* @return {?}
|
|
881
1041
|
*/
|
|
882
1042
|
function cloneSvg(svg) {
|
|
883
|
-
return /** @type {?} */ (svg.cloneNode(true));
|
|
1043
|
+
return (/** @type {?} */ (svg.cloneNode(true)));
|
|
884
1044
|
}
|
|
885
1045
|
/**
|
|
886
1046
|
* Returns the cache key to use for an icon namespace and name.
|
|
@@ -894,12 +1054,15 @@ function iconKey(namespace, name) {
|
|
|
894
1054
|
|
|
895
1055
|
/**
|
|
896
1056
|
* @fileoverview added by tsickle
|
|
897
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1057
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
898
1058
|
*/
|
|
1059
|
+
// Boilerplate for applying mixins to MatIcon.
|
|
899
1060
|
/**
|
|
900
1061
|
* \@docs-private
|
|
901
1062
|
*/
|
|
902
|
-
var
|
|
1063
|
+
var
|
|
1064
|
+
// Boilerplate for applying mixins to MatIcon.
|
|
1065
|
+
/**
|
|
903
1066
|
* \@docs-private
|
|
904
1067
|
*/
|
|
905
1068
|
MatIconBase = /** @class */ (function () {
|
|
@@ -910,11 +1073,12 @@ MatIconBase = /** @class */ (function () {
|
|
|
910
1073
|
}());
|
|
911
1074
|
/** @type {?} */
|
|
912
1075
|
var _MatIconMixinBase = core$1.mixinColor(MatIconBase);
|
|
913
|
-
/**
|
|
1076
|
+
/**
|
|
914
1077
|
* Injection token used to provide the current location to `MatIcon`.
|
|
915
1078
|
* Used to handle server-side rendering and to stub out during unit tests.
|
|
916
1079
|
* \@docs-private
|
|
917
|
-
|
|
1080
|
+
* @type {?}
|
|
1081
|
+
*/
|
|
918
1082
|
var MAT_ICON_LOCATION = new core.InjectionToken('mat-icon-location', {
|
|
919
1083
|
providedIn: 'root',
|
|
920
1084
|
factory: MAT_ICON_LOCATION_FACTORY
|
|
@@ -934,9 +1098,10 @@ function MAT_ICON_LOCATION_FACTORY() {
|
|
|
934
1098
|
getPathname: function () { return _location ? (_location.pathname + _location.search) : ''; }
|
|
935
1099
|
};
|
|
936
1100
|
}
|
|
937
|
-
/**
|
|
1101
|
+
/**
|
|
938
1102
|
* SVG attributes that accept a FuncIRI (e.g. `url(<something>)`).
|
|
939
|
-
|
|
1103
|
+
* @type {?}
|
|
1104
|
+
*/
|
|
940
1105
|
var funcIriAttributes = [
|
|
941
1106
|
'clip-path',
|
|
942
1107
|
'color-profile',
|
|
@@ -952,13 +1117,15 @@ var funcIriAttributes = [
|
|
|
952
1117
|
'stroke'
|
|
953
1118
|
];
|
|
954
1119
|
var ɵ0 = function (attr) { return "[" + attr + "]"; };
|
|
955
|
-
/**
|
|
1120
|
+
/**
|
|
956
1121
|
* Selector that can be used to find all elements that are using a `FuncIRI`.
|
|
957
|
-
|
|
1122
|
+
* @type {?}
|
|
1123
|
+
*/
|
|
958
1124
|
var funcIriAttributeSelector = funcIriAttributes.map(ɵ0).join(', ');
|
|
959
|
-
/**
|
|
1125
|
+
/**
|
|
960
1126
|
* Regex that can be used to extract the id out of a FuncIRI.
|
|
961
|
-
|
|
1127
|
+
* @type {?}
|
|
1128
|
+
*/
|
|
962
1129
|
var funcIriPattern = /^url\(['"]?#(.*?)['"]?\)$/;
|
|
963
1130
|
/**
|
|
964
1131
|
* Component to display an icon. It can be used in the following ways:
|
|
@@ -989,11 +1156,7 @@ var funcIriPattern = /^url\(['"]?#(.*?)['"]?\)$/;
|
|
|
989
1156
|
*/
|
|
990
1157
|
var MatIcon = /** @class */ (function (_super) {
|
|
991
1158
|
__extends(MatIcon, _super);
|
|
992
|
-
function MatIcon(elementRef, _iconRegistry, ariaHidden,
|
|
993
|
-
* @deprecated `location` parameter to be made required.
|
|
994
|
-
* @breaking-change 8.0.0
|
|
995
|
-
*/
|
|
996
|
-
_location) {
|
|
1159
|
+
function MatIcon(elementRef, _iconRegistry, ariaHidden, _location) {
|
|
997
1160
|
var _this = _super.call(this, elementRef) || this;
|
|
998
1161
|
_this._iconRegistry = _iconRegistry;
|
|
999
1162
|
_this._location = _location;
|
|
@@ -1074,6 +1237,20 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1074
1237
|
* 'penguin' -> ['', 'penguin']
|
|
1075
1238
|
* null -> ['', '']
|
|
1076
1239
|
* 'a:b:c' -> (throws Error)`
|
|
1240
|
+
*/
|
|
1241
|
+
/**
|
|
1242
|
+
* Splits an svgIcon binding value into its icon set and icon name components.
|
|
1243
|
+
* Returns a 2-element array of [(icon set), (icon name)].
|
|
1244
|
+
* The separator for the two fields is ':'. If there is no separator, an empty
|
|
1245
|
+
* string is returned for the icon set and the entire value is returned for
|
|
1246
|
+
* the icon name. If the argument is falsy, returns an array of two empty strings.
|
|
1247
|
+
* Throws an error if the name contains two or more ':' separators.
|
|
1248
|
+
* Examples:
|
|
1249
|
+
* `'social:cake' -> ['social', 'cake']
|
|
1250
|
+
* 'penguin' -> ['', 'penguin']
|
|
1251
|
+
* null -> ['', '']
|
|
1252
|
+
* 'a:b:c' -> (throws Error)`
|
|
1253
|
+
* @private
|
|
1077
1254
|
* @param {?} iconName
|
|
1078
1255
|
* @return {?}
|
|
1079
1256
|
*/
|
|
@@ -1089,6 +1266,7 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1089
1266
|
* 'penguin' -> ['', 'penguin']
|
|
1090
1267
|
* null -> ['', '']
|
|
1091
1268
|
* 'a:b:c' -> (throws Error)`
|
|
1269
|
+
* @private
|
|
1092
1270
|
* @param {?} iconName
|
|
1093
1271
|
* @return {?}
|
|
1094
1272
|
*/
|
|
@@ -1100,7 +1278,7 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1100
1278
|
var parts = iconName.split(':');
|
|
1101
1279
|
switch (parts.length) {
|
|
1102
1280
|
case 1: return ['', parts[0]]; // Use default namespace.
|
|
1103
|
-
case 2: return /** @type {?} */ (parts);
|
|
1281
|
+
case 2: return (/** @type {?} */ (parts));
|
|
1104
1282
|
default: throw Error("Invalid icon name: \"" + iconName + "\"");
|
|
1105
1283
|
}
|
|
1106
1284
|
};
|
|
@@ -1115,7 +1293,7 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1115
1293
|
function (changes) {
|
|
1116
1294
|
var _this = this;
|
|
1117
1295
|
// Only update the inline SVG icon if the inputs changed, to avoid unnecessary DOM operations.
|
|
1118
|
-
if (changes
|
|
1296
|
+
if (changes.svgIcon) {
|
|
1119
1297
|
if (this.svgIcon) {
|
|
1120
1298
|
var _a = this._splitIconName(this.svgIcon), namespace = _a[0], iconName = _a[1];
|
|
1121
1299
|
this._iconRegistry.getNamedSvgIcon(iconName, namespace).pipe(operators.take(1)).subscribe(function (svg) { return _this._setSvgElement(svg); }, function (err) { return console.log("Error retrieving icon: " + err.message); });
|
|
@@ -1177,26 +1355,33 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1177
1355
|
}
|
|
1178
1356
|
};
|
|
1179
1357
|
/**
|
|
1358
|
+
* @private
|
|
1180
1359
|
* @return {?}
|
|
1181
1360
|
*/
|
|
1182
1361
|
MatIcon.prototype._usingFontIcon = /**
|
|
1362
|
+
* @private
|
|
1183
1363
|
* @return {?}
|
|
1184
1364
|
*/
|
|
1185
1365
|
function () {
|
|
1186
1366
|
return !this.svgIcon;
|
|
1187
1367
|
};
|
|
1188
1368
|
/**
|
|
1369
|
+
* @private
|
|
1189
1370
|
* @param {?} svg
|
|
1190
1371
|
* @return {?}
|
|
1191
1372
|
*/
|
|
1192
1373
|
MatIcon.prototype._setSvgElement = /**
|
|
1374
|
+
* @private
|
|
1193
1375
|
* @param {?} svg
|
|
1194
1376
|
* @return {?}
|
|
1195
1377
|
*/
|
|
1196
1378
|
function (svg) {
|
|
1197
1379
|
this._clearSvgElement();
|
|
1380
|
+
// Workaround for IE11 and Edge ignoring `style` tags inside dynamically-created SVGs.
|
|
1381
|
+
// See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/
|
|
1382
|
+
// Do this before inserting the element into the DOM, in order to avoid a style recalculation.
|
|
1198
1383
|
/** @type {?} */
|
|
1199
|
-
var styleTags = /** @type {?} */ (svg.querySelectorAll('style'));
|
|
1384
|
+
var styleTags = (/** @type {?} */ (svg.querySelectorAll('style')));
|
|
1200
1385
|
for (var i = 0; i < styleTags.length; i++) {
|
|
1201
1386
|
styleTags[i].textContent += ' ';
|
|
1202
1387
|
}
|
|
@@ -1212,9 +1397,11 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1212
1397
|
this._elementRef.nativeElement.appendChild(svg);
|
|
1213
1398
|
};
|
|
1214
1399
|
/**
|
|
1400
|
+
* @private
|
|
1215
1401
|
* @return {?}
|
|
1216
1402
|
*/
|
|
1217
1403
|
MatIcon.prototype._clearSvgElement = /**
|
|
1404
|
+
* @private
|
|
1218
1405
|
* @return {?}
|
|
1219
1406
|
*/
|
|
1220
1407
|
function () {
|
|
@@ -1238,9 +1425,11 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1238
1425
|
}
|
|
1239
1426
|
};
|
|
1240
1427
|
/**
|
|
1428
|
+
* @private
|
|
1241
1429
|
* @return {?}
|
|
1242
1430
|
*/
|
|
1243
1431
|
MatIcon.prototype._updateFontIconClasses = /**
|
|
1432
|
+
* @private
|
|
1244
1433
|
* @return {?}
|
|
1245
1434
|
*/
|
|
1246
1435
|
function () {
|
|
@@ -1276,6 +1465,12 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1276
1465
|
* Cleans up a value to be used as a fontIcon or fontSet.
|
|
1277
1466
|
* Since the value ends up being assigned as a CSS class, we
|
|
1278
1467
|
* have to trim the value and omit space-separated values.
|
|
1468
|
+
*/
|
|
1469
|
+
/**
|
|
1470
|
+
* Cleans up a value to be used as a fontIcon or fontSet.
|
|
1471
|
+
* Since the value ends up being assigned as a CSS class, we
|
|
1472
|
+
* have to trim the value and omit space-separated values.
|
|
1473
|
+
* @private
|
|
1279
1474
|
* @param {?} value
|
|
1280
1475
|
* @return {?}
|
|
1281
1476
|
*/
|
|
@@ -1283,6 +1478,7 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1283
1478
|
* Cleans up a value to be used as a fontIcon or fontSet.
|
|
1284
1479
|
* Since the value ends up being assigned as a CSS class, we
|
|
1285
1480
|
* have to trim the value and omit space-separated values.
|
|
1481
|
+
* @private
|
|
1286
1482
|
* @param {?} value
|
|
1287
1483
|
* @return {?}
|
|
1288
1484
|
*/
|
|
@@ -1293,6 +1489,12 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1293
1489
|
* Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`
|
|
1294
1490
|
* reference. This is required because WebKit browsers require references to be prefixed with
|
|
1295
1491
|
* the current path, if the page has a `base` tag.
|
|
1492
|
+
*/
|
|
1493
|
+
/**
|
|
1494
|
+
* Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`
|
|
1495
|
+
* reference. This is required because WebKit browsers require references to be prefixed with
|
|
1496
|
+
* the current path, if the page has a `base` tag.
|
|
1497
|
+
* @private
|
|
1296
1498
|
* @param {?} path
|
|
1297
1499
|
* @return {?}
|
|
1298
1500
|
*/
|
|
@@ -1300,6 +1502,7 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1300
1502
|
* Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`
|
|
1301
1503
|
* reference. This is required because WebKit browsers require references to be prefixed with
|
|
1302
1504
|
* the current path, if the page has a `base` tag.
|
|
1505
|
+
* @private
|
|
1303
1506
|
* @param {?} path
|
|
1304
1507
|
* @return {?}
|
|
1305
1508
|
*/
|
|
@@ -1317,12 +1520,18 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1317
1520
|
/**
|
|
1318
1521
|
* Caches the children of an SVG element that have `url()`
|
|
1319
1522
|
* references that we need to prefix with the current path.
|
|
1523
|
+
*/
|
|
1524
|
+
/**
|
|
1525
|
+
* Caches the children of an SVG element that have `url()`
|
|
1526
|
+
* references that we need to prefix with the current path.
|
|
1527
|
+
* @private
|
|
1320
1528
|
* @param {?} element
|
|
1321
1529
|
* @return {?}
|
|
1322
1530
|
*/
|
|
1323
1531
|
MatIcon.prototype._cacheChildrenWithExternalReferences = /**
|
|
1324
1532
|
* Caches the children of an SVG element that have `url()`
|
|
1325
1533
|
* references that we need to prefix with the current path.
|
|
1534
|
+
* @private
|
|
1326
1535
|
* @param {?} element
|
|
1327
1536
|
* @return {?}
|
|
1328
1537
|
*/
|
|
@@ -1346,8 +1555,8 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1346
1555
|
if (!attributes) {
|
|
1347
1556
|
attributes = [];
|
|
1348
1557
|
elements.set(elementWithReference, attributes);
|
|
1349
|
-
}
|
|
1350
|
-
((attributes)).push({ name: attr, value: match[1] });
|
|
1558
|
+
}
|
|
1559
|
+
(/** @type {?} */ (attributes)).push({ name: attr, value: match[1] });
|
|
1351
1560
|
}
|
|
1352
1561
|
});
|
|
1353
1562
|
};
|
|
@@ -1365,6 +1574,7 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1365
1574
|
'role': 'img',
|
|
1366
1575
|
'class': 'mat-icon',
|
|
1367
1576
|
'[class.mat-icon-inline]': 'inline',
|
|
1577
|
+
'[class.mat-icon-no-color]': 'color !== "primary" && color !== "accent" && color !== "warn"',
|
|
1368
1578
|
},
|
|
1369
1579
|
encapsulation: core.ViewEncapsulation.None,
|
|
1370
1580
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
@@ -1388,7 +1598,7 @@ var MatIcon = /** @class */ (function (_super) {
|
|
|
1388
1598
|
|
|
1389
1599
|
/**
|
|
1390
1600
|
* @fileoverview added by tsickle
|
|
1391
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1601
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1392
1602
|
*/
|
|
1393
1603
|
var MatIconModule = /** @class */ (function () {
|
|
1394
1604
|
function MatIconModule() {
|