@angular/material 7.1.1 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/_theming.scss +32 -13
- 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 +18 -12
- 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 +6 -0
- 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 +12 -6
- 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 +10 -2
- 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 +8 -4
- 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 +1 -1
- 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 +1 -1
- 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 +20 -28
- 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 +6 -6
- 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 +9 -6
- 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 +41 -1
- 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-expansion.umd.js +21 -5
- 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 +68 -13
- 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 +6 -4
- 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 +12 -0
- 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 +8 -4
- 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 +98 -11
- 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 +35 -20
- 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-progress-bar.umd.js +2 -2
- 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 +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 +16 -37
- 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 +13 -3
- 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 +24 -5
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +1 -1
- 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 +26 -6
- 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 +20 -7
- 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 +214 -51
- 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 +1 -1
- 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 +13 -1
- 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 +9 -7
- 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 +715 -241
- package/bundles/material.umd.js.map +1 -1
- package/bundles/material.umd.min.js +19 -19
- 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 +5 -5
- package/chips/typings/index.metadata.json +1 -1
- package/core/typings/index.metadata.json +1 -1
- package/core/typings/ripple/ripple.d.ts +2 -2
- package/datepicker/typings/calendar.d.ts +2 -2
- package/datepicker/typings/index.metadata.json +1 -1
- package/dialog/typings/dialog-ref.d.ts +4 -0
- package/dialog/typings/index.metadata.json +1 -1
- package/esm2015/autocomplete.js +18 -12
- package/esm2015/autocomplete.js.map +1 -1
- package/esm2015/badge.js +6 -0
- package/esm2015/badge.js.map +1 -1
- package/esm2015/bottom-sheet.js +11 -5
- package/esm2015/bottom-sheet.js.map +1 -1
- package/esm2015/button-toggle.js +8 -1
- package/esm2015/button-toggle.js.map +1 -1
- package/esm2015/button.js +8 -4
- package/esm2015/button.js.map +1 -1
- package/esm2015/card.js +1 -1
- package/esm2015/card.js.map +1 -1
- package/esm2015/checkbox.js +1 -1
- package/esm2015/checkbox.js.map +1 -1
- package/esm2015/chips.js +19 -27
- package/esm2015/chips.js.map +1 -1
- package/esm2015/core.js +5 -5
- package/esm2015/core.js.map +1 -1
- package/esm2015/datepicker.js +7 -4
- package/esm2015/datepicker.js.map +1 -1
- package/esm2015/dialog.js +25 -1
- package/esm2015/dialog.js.map +1 -1
- package/esm2015/expansion.js +23 -6
- package/esm2015/expansion.js.map +1 -1
- package/esm2015/form-field.js +61 -13
- package/esm2015/form-field.js.map +1 -1
- package/esm2015/grid-list.js +5 -3
- package/esm2015/grid-list.js.map +1 -1
- package/esm2015/icon.js +9 -0
- package/esm2015/icon.js.map +1 -1
- package/esm2015/input.js +8 -4
- package/esm2015/input.js.map +1 -1
- package/esm2015/list.js +79 -8
- package/esm2015/list.js.map +1 -1
- package/esm2015/material.js +7 -7
- package/esm2015/material.js.map +1 -1
- package/esm2015/menu.js +26 -15
- package/esm2015/menu.js.map +1 -1
- package/esm2015/progress-bar.js +1 -1
- package/esm2015/progress-bar.js.map +1 -1
- package/esm2015/radio.js +6 -15
- package/esm2015/radio.js.map +1 -1
- package/esm2015/select.js +15 -4
- package/esm2015/select.js.map +1 -1
- package/esm2015/sidenav.js +26 -6
- package/esm2015/sidenav.js.map +1 -1
- package/esm2015/slide-toggle.js +1 -1
- package/esm2015/slide-toggle.js.map +1 -1
- package/esm2015/slider.js +4 -4
- package/esm2015/slider.js.map +1 -1
- package/esm2015/snack-bar.js +1 -1
- package/esm2015/snack-bar.js.map +1 -1
- package/esm2015/sort.js +1 -1
- package/esm2015/sort.js.map +1 -1
- package/esm2015/stepper.js +23 -7
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +21 -8
- package/esm2015/table.js.map +1 -1
- package/esm2015/tabs.js +162 -43
- package/esm2015/tabs.js.map +1 -1
- package/esm2015/toolbar.js +1 -1
- package/esm2015/toolbar.js.map +1 -1
- package/esm2015/tooltip.js +10 -1
- package/esm2015/tooltip.js.map +1 -1
- package/esm2015/tree.js +9 -7
- package/esm2015/tree.js.map +1 -1
- package/esm5/autocomplete.es5.js +18 -12
- package/esm5/autocomplete.es5.js.map +1 -1
- package/esm5/badge.es5.js +6 -0
- package/esm5/badge.es5.js.map +1 -1
- package/esm5/bottom-sheet.es5.js +11 -5
- package/esm5/bottom-sheet.es5.js.map +1 -1
- package/esm5/button-toggle.es5.js +9 -1
- package/esm5/button-toggle.es5.js.map +1 -1
- package/esm5/button.es5.js +8 -4
- package/esm5/button.es5.js.map +1 -1
- package/esm5/card.es5.js +1 -1
- package/esm5/card.es5.js.map +1 -1
- package/esm5/checkbox.es5.js +1 -1
- package/esm5/checkbox.es5.js.map +1 -1
- package/esm5/chips.es5.js +21 -29
- package/esm5/chips.es5.js.map +1 -1
- package/esm5/core.es5.js +6 -6
- package/esm5/core.es5.js.map +1 -1
- package/esm5/datepicker.es5.js +9 -6
- package/esm5/datepicker.es5.js.map +1 -1
- package/esm5/dialog.es5.js +41 -1
- package/esm5/dialog.es5.js.map +1 -1
- package/esm5/expansion.es5.js +21 -6
- package/esm5/expansion.es5.js.map +1 -1
- package/esm5/form-field.es5.js +69 -14
- package/esm5/form-field.es5.js.map +1 -1
- package/esm5/grid-list.es5.js +5 -3
- package/esm5/grid-list.es5.js.map +1 -1
- package/esm5/icon.es5.js +12 -0
- package/esm5/icon.es5.js.map +1 -1
- package/esm5/input.es5.js +8 -4
- package/esm5/input.es5.js.map +1 -1
- package/esm5/list.es5.js +97 -9
- package/esm5/list.es5.js.map +1 -1
- package/esm5/material.es5.js +7 -7
- package/esm5/material.es5.js.map +1 -1
- package/esm5/menu.es5.js +30 -15
- package/esm5/menu.es5.js.map +1 -1
- package/esm5/progress-bar.es5.js +1 -1
- package/esm5/progress-bar.es5.js.map +1 -1
- package/esm5/radio.es5.js +18 -37
- package/esm5/radio.es5.js.map +1 -1
- package/esm5/select.es5.js +14 -4
- package/esm5/select.es5.js.map +1 -1
- package/esm5/sidenav.es5.js +25 -6
- package/esm5/sidenav.es5.js.map +1 -1
- package/esm5/slide-toggle.es5.js +1 -1
- package/esm5/slide-toggle.es5.js.map +1 -1
- package/esm5/slider.es5.js +3 -3
- package/esm5/slider.es5.js.map +1 -1
- package/esm5/snack-bar.es5.js +1 -1
- package/esm5/snack-bar.es5.js.map +1 -1
- package/esm5/sort.es5.js +1 -1
- package/esm5/sort.es5.js.map +1 -1
- package/esm5/stepper.es5.js +27 -7
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +21 -8
- package/esm5/table.es5.js.map +1 -1
- package/esm5/tabs.es5.js +207 -44
- package/esm5/tabs.es5.js.map +1 -1
- package/esm5/toolbar.es5.js +1 -1
- package/esm5/toolbar.es5.js.map +1 -1
- package/esm5/tooltip.es5.js +13 -1
- package/esm5/tooltip.es5.js.map +1 -1
- package/esm5/tree.es5.js +9 -7
- 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/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-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/theming.js +10 -9
- 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 +1 -0
- 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 +33 -6
- package/tabs/typings/tab-nav-bar/tab-nav-bar.d.ts +6 -6
- package/toolbar/typings/index.metadata.json +1 -1
- package/tooltip/typings/index.metadata.json +1 -1
- package/tooltip/typings/tooltip.d.ts +3 -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 +1 -1
- package/typings/chips/chip.d.ts +5 -5
- package/typings/chips/index.metadata.json +1 -1
- package/typings/core/index.metadata.json +1 -1
- package/typings/core/ripple/ripple.d.ts +2 -2
- package/typings/datepicker/calendar.d.ts +2 -2
- package/typings/datepicker/index.metadata.json +1 -1
- package/typings/dialog/dialog-ref.d.ts +4 -0
- 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 +1 -1
- package/typings/esm5/chips/chip.d.ts +5 -5
- package/typings/esm5/chips/index.metadata.json +1 -1
- package/typings/esm5/core/index.metadata.json +1 -1
- package/typings/esm5/core/ripple/ripple.d.ts +2 -2
- package/typings/esm5/datepicker/calendar.d.ts +2 -2
- package/typings/esm5/datepicker/index.metadata.json +1 -1
- package/typings/esm5/dialog/dialog-ref.d.ts +4 -0
- 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-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/stepper/step-header.d.ts +1 -0
- 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 +33 -6
- package/typings/esm5/tabs/tab-nav-bar/tab-nav-bar.d.ts +6 -6
- 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 +3 -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-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/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 +1 -0
- 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 +33 -6
- package/typings/tabs/tab-nav-bar/tab-nav-bar.d.ts +6 -6
- package/typings/toolbar/index.metadata.json +1 -1
- package/typings/tooltip/index.metadata.json +1 -1
- package/typings/tooltip/tooltip.d.ts +3 -1
- package/typings/tree/data-source/flat-data-source.d.ts +2 -2
- package/typings/tree/index.metadata.json +1 -1
package/esm2015/grid-list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-list.js","sources":["../../../src/lib/grid-list/grid-list-module.ts","../../../src/lib/grid-list/grid-list.ts","../../../src/lib/grid-list/tile-styler.ts","../../../src/lib/grid-list/tile-coordinator.ts","../../../src/lib/grid-list/grid-tile.ts","../../../src/lib/grid-list/grid-list-base.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 {MatLineModule, MatCommonModule} from '@angular/material/core';\nimport {\n MatGridTile, MatGridTileText, MatGridTileFooterCssMatStyler,\n MatGridTileHeaderCssMatStyler, MatGridAvatarCssMatStyler\n} from './grid-tile';\nimport {MatGridList} from './grid-list';\n\n\n@NgModule({\n imports: [MatLineModule, MatCommonModule],\n exports: [\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatLineModule,\n MatCommonModule,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler\n ],\n declarations: [\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler\n ],\n})\nexport class MatGridListModule {}\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 {\n Component,\n ViewEncapsulation,\n AfterContentChecked,\n OnInit,\n Input,\n ContentChildren,\n QueryList,\n ElementRef,\n Optional,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\nimport {TileStyler, FitTileStyler, RatioTileStyler, FixedTileStyler} from './tile-styler';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n\n// TODO(kara): Conditional (responsive) column count / row size.\n// TODO(kara): Re-layout on window resize / media change (debounced).\n// TODO(kara): gridTileHeader and gridTileFooter.\n\nconst MAT_FIT_MODE = 'fit';\n\n@Component({\n moduleId: module.id,\n selector: 'mat-grid-list',\n exportAs: 'matGridList',\n templateUrl: 'grid-list.html',\n styleUrls: ['grid-list.css'],\n host: {\n 'class': 'mat-grid-list',\n },\n providers: [{\n provide: MAT_GRID_LIST,\n useExisting: MatGridList\n }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridList implements MatGridListBase, OnInit, AfterContentChecked {\n /** Number of columns being rendered. */\n private _cols: number;\n\n /** Used for determiningthe position of each tile in the grid. */\n private _tileCoordinator: TileCoordinator;\n\n /**\n * Row height value passed in by user. This can be one of three types:\n * - Number value (ex: \"100px\"): sets a fixed row height to that value\n * - Ratio value (ex: \"4:3\"): sets the row height based on width:height ratio\n * - \"Fit\" mode (ex: \"fit\"): sets the row height to total height divided by number of rows\n */\n private _rowHeight: string;\n\n /** The amount of space between tiles. This will be something like '5px' or '2em'. */\n private _gutter: string = '1px';\n\n /** Sets position and size styles for a tile */\n private _tileStyler: TileStyler;\n\n /** Query list of tiles that are being rendered. */\n @ContentChildren(MatGridTile, {descendants: true}) _tiles: QueryList<MatGridTile>;\n\n constructor(private _element: ElementRef<HTMLElement>,\n @Optional() private _dir: Directionality) {}\n\n /** Amount of columns in the grid list. */\n @Input()\n get cols(): number { return this._cols; }\n set cols(value: number) {\n this._cols = Math.max(1, Math.round(coerceNumberProperty(value)));\n }\n\n /** Size of the grid list's gutter in pixels. */\n @Input()\n get gutterSize(): string { return this._gutter; }\n set gutterSize(value: string) { this._gutter = `${value == null ? '' : value}`; }\n\n /** Set internal representation of row height from the user-provided value. */\n @Input()\n get rowHeight(): string | number { return this._rowHeight; }\n set rowHeight(value: string | number) {\n const newValue = `${value == null ? '' : value}`;\n\n if (newValue !== this._rowHeight) {\n this._rowHeight = newValue;\n this._setTileStyler(this._rowHeight);\n }\n }\n\n ngOnInit() {\n this._checkCols();\n this._checkRowHeight();\n }\n\n /**\n * The layout calculation is fairly cheap if nothing changes, so there's little cost\n * to run it frequently.\n */\n ngAfterContentChecked() {\n this._layoutTiles();\n }\n\n /** Throw a friendly error if cols property is missing */\n private _checkCols() {\n if (!this.cols) {\n throw Error(`mat-grid-list: must pass in number of columns. ` +\n `Example: <mat-grid-list cols=\"3\">`);\n }\n }\n\n /** Default to equal width:height if rowHeight property is missing */\n private _checkRowHeight(): void {\n if (!this._rowHeight) {\n this._setTileStyler('1:1');\n }\n }\n\n /** Creates correct Tile Styler subtype based on rowHeight passed in by user */\n private _setTileStyler(rowHeight: string): void {\n if (this._tileStyler) {\n this._tileStyler.reset(this);\n }\n\n if (rowHeight === MAT_FIT_MODE) {\n this._tileStyler = new FitTileStyler();\n } else if (rowHeight && rowHeight.indexOf(':') > -1) {\n this._tileStyler = new RatioTileStyler(rowHeight);\n } else {\n this._tileStyler = new FixedTileStyler(rowHeight);\n }\n }\n\n /** Computes and applies the size and position for all children grid tiles. */\n private _layoutTiles(): void {\n if (!this._tileCoordinator) {\n this._tileCoordinator = new TileCoordinator();\n }\n\n\n const tracker = this._tileCoordinator;\n const tiles = this._tiles.filter(tile => !tile._gridList || tile._gridList === this);\n const direction = this._dir ? this._dir.value : 'ltr';\n\n this._tileCoordinator.update(this.cols, tiles);\n this._tileStyler.init(this.gutterSize, tracker, this.cols, direction);\n\n tiles.forEach((tile, index) => {\n const pos = tracker.positions[index];\n this._tileStyler.setStyle(tile, pos.row, pos.col);\n });\n\n this._setListStyle(this._tileStyler.getComputedHeight());\n }\n\n /** Sets style on the main grid-list element, given the style name and value. */\n _setListStyle(style: [string, string | null] | null): void {\n if (style) {\n (this._element.nativeElement.style as any)[style[0]] = style[1];\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 {MatGridList} from './grid-list';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\n\n/**\n * RegExp that can be used to check whether a value will\n * be allowed inside a CSS `calc()` expression.\n */\nconst cssCalcAllowedValue = /^-?\\d+((\\.\\d+)?[A-Za-z%$]?)+$/;\n\n/**\n * Sets the style properties for an individual tile, given the position calculated by the\n * Tile Coordinator.\n * @docs-private\n */\nexport abstract class TileStyler {\n _gutterSize: string;\n _rows: number = 0;\n _rowspan: number = 0;\n _cols: number;\n _direction: string;\n\n /**\n * Adds grid-list layout info once it is available. Cannot be processed in the constructor\n * because these properties haven't been calculated by that point.\n *\n * @param gutterSize Size of the grid's gutter.\n * @param tracker Instance of the TileCoordinator.\n * @param cols Amount of columns in the grid.\n * @param direction Layout direction of the grid.\n */\n init(gutterSize: string, tracker: TileCoordinator, cols: number, direction: string): void {\n this._gutterSize = normalizeUnits(gutterSize);\n this._rows = tracker.rowCount;\n this._rowspan = tracker.rowspan;\n this._cols = cols;\n this._direction = direction;\n }\n\n /**\n * Computes the amount of space a single 1x1 tile would take up (width or height).\n * Used as a basis for other calculations.\n * @param sizePercent Percent of the total grid-list space that one 1x1 tile would take up.\n * @param gutterFraction Fraction of the gutter size taken up by one 1x1 tile.\n * @return The size of a 1x1 tile as an expression that can be evaluated via CSS calc().\n */\n getBaseTileSize(sizePercent: number, gutterFraction: number): string {\n // Take the base size percent (as would be if evenly dividing the size between cells),\n // and then subtracting the size of one gutter. However, since there are no gutters on the\n // edges, each tile only uses a fraction (gutterShare = numGutters / numCells) of the gutter\n // size. (Imagine having one gutter per tile, and then breaking up the extra gutter on the\n // edge evenly among the cells).\n return `(${sizePercent}% - (${this._gutterSize} * ${gutterFraction}))`;\n }\n\n\n /**\n * Gets The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.\n * @param offset Number of tiles that have already been rendered in the row/column.\n * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @return Position of the tile as a CSS calc() expression.\n */\n getTilePosition(baseSize: string, offset: number): string {\n // The position comes the size of a 1x1 tile plus gutter for each previous tile in the\n // row/column (offset).\n return offset === 0 ? '0' : calc(`(${baseSize} + ${this._gutterSize}) * ${offset}`);\n }\n\n\n /**\n * Gets the actual size of a tile, e.g., width or height, taking rowspan or colspan into account.\n * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @param span The tile's rowspan or colspan.\n * @return Size of the tile as a CSS calc() expression.\n */\n getTileSize(baseSize: string, span: number): string {\n return `(${baseSize} * ${span}) + (${span - 1} * ${this._gutterSize})`;\n }\n\n\n /**\n * Sets the style properties to be applied to a tile for the given row and column index.\n * @param tile Tile to which to apply the styling.\n * @param rowIndex Index of the tile's row.\n * @param colIndex Index of the tile's column.\n */\n setStyle(tile: MatGridTile, rowIndex: number, colIndex: number): void {\n // Percent of the available horizontal space that one column takes up.\n let percentWidthPerTile = 100 / this._cols;\n\n // Fraction of the vertical gutter size that each column takes up.\n // For example, if there are 5 columns, each column uses 4/5 = 0.8 times the gutter width.\n let gutterWidthFractionPerTile = (this._cols - 1) / this._cols;\n\n this.setColStyles(tile, colIndex, percentWidthPerTile, gutterWidthFractionPerTile);\n this.setRowStyles(tile, rowIndex, percentWidthPerTile, gutterWidthFractionPerTile);\n }\n\n /** Sets the horizontal placement of the tile in the list. */\n setColStyles(tile: MatGridTile, colIndex: number, percentWidth: number,\n gutterWidth: number) {\n // Base horizontal size of a column.\n let baseTileWidth = this.getBaseTileSize(percentWidth, gutterWidth);\n\n // The width and horizontal position of each tile is always calculated the same way, but the\n // height and vertical position depends on the rowMode.\n let side = this._direction === 'rtl' ? 'right' : 'left';\n tile._setStyle(side, this.getTilePosition(baseTileWidth, colIndex));\n tile._setStyle('width', calc(this.getTileSize(baseTileWidth, tile.colspan)));\n }\n\n /**\n * Calculates the total size taken up by gutters across one axis of a list.\n */\n getGutterSpan(): string {\n return `${this._gutterSize} * (${this._rowspan} - 1)`;\n }\n\n /**\n * Calculates the total size taken up by tiles across one axis of a list.\n * @param tileHeight Height of the tile.\n */\n getTileSpan(tileHeight: string): string {\n return `${this._rowspan} * ${this.getTileSize(tileHeight, 1)}`;\n }\n\n /**\n * Sets the vertical placement of the tile in the list.\n * This method will be implemented by each type of TileStyler.\n * @docs-private\n */\n abstract setRowStyles(tile: MatGridTile, rowIndex: number, percentWidth: number,\n gutterWidth: number): void;\n\n /**\n * Calculates the computed height and returns the correct style property to set.\n * This method can be implemented by each type of TileStyler.\n * @docs-private\n */\n getComputedHeight(): [string, string] | null { return null; }\n\n /**\n * Called when the tile styler is swapped out with a different one. To be used for cleanup.\n * @param list Grid list that the styler was attached to.\n * @docs-private\n */\n abstract reset(list: MatGridList): void;\n}\n\n\n/**\n * This type of styler is instantiated when the user passes in a fixed row height.\n * Example `<mat-grid-list cols=\"3\" rowHeight=\"100px\">`\n * @docs-private\n */\nexport class FixedTileStyler extends TileStyler {\n\n constructor(public fixedRowHeight: string) { super(); }\n\n init(gutterSize: string, tracker: TileCoordinator, cols: number, direction: string) {\n super.init(gutterSize, tracker, cols, direction);\n this.fixedRowHeight = normalizeUnits(this.fixedRowHeight);\n\n if (!cssCalcAllowedValue.test(this.fixedRowHeight)) {\n throw Error(`Invalid value \"${this.fixedRowHeight}\" set as rowHeight.`);\n }\n }\n\n setRowStyles(tile: MatGridTile, rowIndex: number): void {\n tile._setStyle('top', this.getTilePosition(this.fixedRowHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(this.fixedRowHeight, tile.rowspan)));\n }\n\n getComputedHeight(): [string, string] {\n return [\n 'height', calc(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)\n ];\n }\n\n reset(list: MatGridList) {\n list._setListStyle(['height', null]);\n\n if (list._tiles) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n }\n}\n\n\n/**\n * This type of styler is instantiated when the user passes in a width:height ratio\n * for the row height. Example `<mat-grid-list cols=\"3\" rowHeight=\"3:1\">`\n * @docs-private\n */\nexport class RatioTileStyler extends TileStyler {\n\n /** Ratio width:height given by user to determine row height. */\n rowHeightRatio: number;\n baseTileHeight: string;\n\n constructor(value: string) {\n super();\n this._parseRatio(value);\n }\n\n setRowStyles(tile: MatGridTile, rowIndex: number, percentWidth: number,\n gutterWidth: number): void {\n let percentHeightPerTile = percentWidth / this.rowHeightRatio;\n this.baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterWidth);\n\n // Use padding-top and margin-top to maintain the given aspect ratio, as\n // a percentage-based value for these properties is applied versus the *width* of the\n // containing block. See http://www.w3.org/TR/CSS2/box.html#margin-properties\n tile._setStyle('marginTop', this.getTilePosition(this.baseTileHeight, rowIndex));\n tile._setStyle('paddingTop', calc(this.getTileSize(this.baseTileHeight, tile.rowspan)));\n }\n\n getComputedHeight(): [string, string] {\n return [\n 'paddingBottom', calc(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`)\n ];\n }\n\n reset(list: MatGridList) {\n list._setListStyle(['paddingBottom', null]);\n\n list._tiles.forEach(tile => {\n tile._setStyle('marginTop', null);\n tile._setStyle('paddingTop', null);\n });\n }\n\n private _parseRatio(value: string): void {\n const ratioParts = value.split(':');\n\n if (ratioParts.length !== 2) {\n throw Error(`mat-grid-list: invalid ratio given for row-height: \"${value}\"`);\n }\n\n this.rowHeightRatio = parseFloat(ratioParts[0]) / parseFloat(ratioParts[1]);\n }\n}\n\n/**\n * This type of styler is instantiated when the user selects a \"fit\" row height mode.\n * In other words, the row height will reflect the total height of the container divided\n * by the number of rows. Example `<mat-grid-list cols=\"3\" rowHeight=\"fit\">`\n *\n * @docs-private\n */\nexport class FitTileStyler extends TileStyler {\n setRowStyles(tile: MatGridTile, rowIndex: number): void {\n // Percent of the available vertical space that one row takes up.\n let percentHeightPerTile = 100 / this._rowspan;\n\n // Fraction of the horizontal gutter size that each column takes up.\n let gutterHeightPerTile = (this._rows - 1) / this._rows;\n\n // Base vertical size of a column.\n let baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterHeightPerTile);\n\n tile._setStyle('top', this.getTilePosition(baseTileHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(baseTileHeight, tile.rowspan)));\n }\n\n reset(list: MatGridList) {\n if (list._tiles) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n }\n}\n\n\n/** Wraps a CSS string in a calc function */\nfunction calc(exp: string): string { return `calc(${exp})`; }\n\n\n/** Appends pixels to a CSS string if no units are given. */\nfunction normalizeUnits(value: string): string {\n return (value.match(/px|em|rem/)) ? value : value + 'px';\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 {MatGridTile} from './grid-tile';\n\n/**\n * Class for determining, from a list of tiles, the (row, col) position of each of those tiles\n * in the grid. This is necessary (rather than just rendering the tiles in normal document flow)\n * because the tiles can have a rowspan.\n *\n * The positioning algorithm greedily places each tile as soon as it encounters a gap in the grid\n * large enough to accommodate it so that the tiles still render in the same order in which they\n * are given.\n *\n * The basis of the algorithm is the use of an array to track the already placed tiles. Each\n * element of the array corresponds to a column, and the value indicates how many cells in that\n * column are already occupied; zero indicates an empty cell. Moving \"down\" to the next row\n * decrements each value in the tracking array (indicating that the column is one cell closer to\n * being free).\n *\n * @docs-private\n */\nexport class TileCoordinator {\n /** Tracking array (see class description). */\n tracker: number[];\n\n /** Index at which the search for the next gap will start. */\n columnIndex: number = 0;\n\n /** The current row index. */\n rowIndex: number = 0;\n\n /** Gets the total number of rows occupied by tiles */\n get rowCount(): number { return this.rowIndex + 1; }\n\n /**\n * Gets the total span of rows occupied by tiles.\n * Ex: A list with 1 row that contains a tile with rowspan 2 will have a total rowspan of 2.\n */\n get rowspan() {\n const lastRowMax = Math.max(...this.tracker);\n // if any of the tiles has a rowspan that pushes it beyond the total row count,\n // add the difference to the rowcount\n return lastRowMax > 1 ? this.rowCount + lastRowMax - 1 : this.rowCount;\n }\n\n /** The computed (row, col) position of each tile (the output). */\n positions: TilePosition[];\n\n /**\n * Updates the tile positions.\n * @param numColumns Amount of columns in the grid.\n */\n update(numColumns: number, tiles: MatGridTile[]) {\n this.columnIndex = 0;\n this.rowIndex = 0;\n\n this.tracker = new Array(numColumns);\n this.tracker.fill(0, 0, this.tracker.length);\n this.positions = tiles.map(tile => this._trackTile(tile));\n }\n\n /** Calculates the row and col position of a tile. */\n private _trackTile(tile: MatGridTile): TilePosition {\n // Find a gap large enough for this tile.\n const gapStartIndex = this._findMatchingGap(tile.colspan);\n\n // Place tile in the resulting gap.\n this._markTilePosition(gapStartIndex, tile);\n\n // The next time we look for a gap, the search will start at columnIndex, which should be\n // immediately after the tile that has just been placed.\n this.columnIndex = gapStartIndex + tile.colspan;\n\n return new TilePosition(this.rowIndex, gapStartIndex);\n }\n\n /** Finds the next available space large enough to fit the tile. */\n private _findMatchingGap(tileCols: number): number {\n if (tileCols > this.tracker.length) {\n throw Error(`mat-grid-list: tile with colspan ${tileCols} is wider than ` +\n `grid with cols=\"${this.tracker.length}\".`);\n }\n\n // Start index is inclusive, end index is exclusive.\n let gapStartIndex = -1;\n let gapEndIndex = -1;\n\n // Look for a gap large enough to fit the given tile. Empty spaces are marked with a zero.\n do {\n // If we've reached the end of the row, go to the next row.\n if (this.columnIndex + tileCols > this.tracker.length) {\n this._nextRow();\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n continue;\n }\n\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n\n // If there are no more empty spaces in this row at all, move on to the next row.\n if (gapStartIndex == -1) {\n this._nextRow();\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n continue;\n }\n\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n\n // If a gap large enough isn't found, we want to start looking immediately after the current\n // gap on the next iteration.\n this.columnIndex = gapStartIndex + 1;\n\n // Continue iterating until we find a gap wide enough for this tile. Since gapEndIndex is\n // exclusive, gapEndIndex is 0 means we didn't find a gap and should continue.\n } while ((gapEndIndex - gapStartIndex < tileCols) || (gapEndIndex == 0));\n\n // If we still didn't manage to find a gap, ensure that the index is\n // at least zero so the tile doesn't get pulled out of the grid.\n return Math.max(gapStartIndex, 0);\n }\n\n /** Move \"down\" to the next row. */\n private _nextRow(): void {\n this.columnIndex = 0;\n this.rowIndex++;\n\n // Decrement all spaces by one to reflect moving down one row.\n for (let i = 0; i < this.tracker.length; i++) {\n this.tracker[i] = Math.max(0, this.tracker[i] - 1);\n }\n }\n\n /**\n * Finds the end index (exclusive) of a gap given the index from which to start looking.\n * The gap ends when a non-zero value is found.\n */\n private _findGapEndIndex(gapStartIndex: number): number {\n for (let i = gapStartIndex + 1; i < this.tracker.length; i++) {\n if (this.tracker[i] != 0) {\n return i;\n }\n }\n\n // The gap ends with the end of the row.\n return this.tracker.length;\n }\n\n /** Update the tile tracker to account for the given tile in the given space. */\n private _markTilePosition(start: number, tile: MatGridTile): void {\n for (let i = 0; i < tile.colspan; i++) {\n this.tracker[start + i] = tile.rowspan;\n }\n }\n}\n\n/**\n * Simple data structure for tile position (row, col).\n * @docs-private\n */\nexport class TilePosition {\n constructor(public row: number, public col: number) {}\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 {\n Component,\n ViewEncapsulation,\n ElementRef,\n Input,\n Optional,\n ContentChildren,\n QueryList,\n AfterContentInit,\n Directive,\n ChangeDetectionStrategy,\n Inject,\n} from '@angular/core';\nimport {MatLine, setLines} from '@angular/material/core';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n@Component({\n moduleId: module.id,\n selector: 'mat-grid-tile',\n exportAs: 'matGridTile',\n host: {\n 'class': 'mat-grid-tile',\n },\n templateUrl: 'grid-tile.html',\n styleUrls: ['grid-list.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatGridTile {\n _rowspan: number = 1;\n _colspan: number = 1;\n\n constructor(\n private _element: ElementRef<HTMLElement>,\n @Optional() @Inject(MAT_GRID_LIST) public _gridList?: MatGridListBase) {}\n\n /** Amount of rows that the grid tile takes up. */\n @Input()\n get rowspan(): number { return this._rowspan; }\n set rowspan(value: number) { this._rowspan = Math.round(coerceNumberProperty(value)); }\n\n /** Amount of columns that the grid tile takes up. */\n @Input()\n get colspan(): number { return this._colspan; }\n set colspan(value: number) { this._colspan = Math.round(coerceNumberProperty(value)); }\n\n /**\n * Sets the style of the grid-tile element. Needs to be set manually to avoid\n * \"Changed after checked\" errors that would occur with HostBinding.\n */\n _setStyle(property: string, value: any): void {\n (this._element.nativeElement.style as any)[property] = value;\n }\n}\n\n@Component({\n moduleId: module.id,\n selector: 'mat-grid-tile-header, mat-grid-tile-footer',\n templateUrl: 'grid-tile-text.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridTileText implements AfterContentInit {\n @ContentChildren(MatLine) _lines: QueryList<MatLine>;\n\n constructor(private _element: ElementRef<HTMLElement>) {}\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-grid-avatar], [matGridAvatar]',\n host: {'class': 'mat-grid-avatar'}\n})\nexport class MatGridAvatarCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: 'mat-grid-tile-header',\n host: {'class': 'mat-grid-tile-header'}\n})\nexport class MatGridTileHeaderCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: 'mat-grid-tile-footer',\n host: {'class': 'mat-grid-tile-footer'}\n})\nexport class MatGridTileFooterCssMatStyler {}\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 {InjectionToken} from '@angular/core';\n\n/**\n * Injection token used to provide a grid list to a tile and to avoid circular imports.\n * @docs-private\n */\nexport const MAT_GRID_LIST = new InjectionToken<MatGridListBase>('MAT_GRID_LIST');\n\n/**\n * Base interface for a `MatGridList`.\n * @docs-private\n */\nexport interface MatGridListBase {\n cols: number;\n gutterSize: string;\n rowHeight: number | string;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AKcA,AAAA,MAAa,aAAa,GAAG,IAAI,cAAc,CAAkB,eAAe,CAAC;;;;;;ADuBjF,MAAa,WAAW,CAAxB;;;;;IAIE,WAAF,CACY,QAAiC,EACC,SAA2B,EAFzE;QACY,IAAZ,CAAA,QAAoB,GAAR,QAAQ,CAAyB;QACC,IAA9C,CAAA,SAAuD,GAAT,SAAS,CAAkB;QALvE,IAAF,CAAA,QAAU,GAAW,CAAC,CAAC;QACrB,IAAF,CAAA,QAAU,GAAW,CAAC,CAAC;KAIsD;;;;;IAG3E,IACI,OAAO,GADb,EAC0B,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE;;;;;IAC/C,IAAI,OAAO,CAAC,KAAa,EAA3B,EAA+B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,oBA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,CAAC,KAAK,IAAS,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;SACjE;KACF;;;IAzIH,EAAA,IAAA,EAAC,SAAS,EAAV,IAAA,EAAA,CAAW,CAAX,QAAA,EAAA,eAAA;gBACE,QAAQ,EAAE,aAAZ;gBACE,QAAQ,EAAE,sCAAZ;gBACE,MAAF,EAAU,CAAV,8uCAAA,CAAA;gBACE,IAAF,EAAA;oBACA,OAAa,EAAb,eAA8B;iBAC9B;gBACA,SAAA,EAAW,CAAX;wBACA,OAAA,EAAA,aAAA;wBACA,WAAA,EAAA,WAAA;qBACA,CAAA;gBACA,eAAA,EAAA,uBAAA,CAAA,MAAA;gBACA,aAAA,EAAA,iBAAA,CAAA,IAAA;aACA,EAAA,EAAA;CACA,CAAA;;;;;CAhCA,CAAA;AAOA,WAAA,CAAQ,cAAc,GAAtB;;;IAiDA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;IAMA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAQ,KAAR,EAAA,CAAA;CAOA,CAAA;;;;;;AD/CA,MAAa,iBAAiB,CAA9B;;;IArBA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,aAAa,EAAE,eAAe,CAAC;gBACzC,OAAO,EAAE;oBACP,WAAW;oBACX,WAAW;oBACX,eAAe;oBACf,aAAa;oBACb,eAAe;oBACf,6BAA6B;oBAC7B,6BAA6B;oBAC7B,yBAAyB;iBAC1B;gBACD,YAAY,EAAE;oBACZ,WAAW;oBACX,WAAW;oBACX,eAAe;oBACf,6BAA6B;oBAC7B,6BAA6B;oBAC7B,yBAAyB;iBAC1B;aACF,EAAD,EAAA;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"grid-list.js","sources":["../../../src/lib/grid-list/grid-list-module.ts","../../../src/lib/grid-list/grid-list.ts","../../../src/lib/grid-list/tile-styler.ts","../../../src/lib/grid-list/tile-coordinator.ts","../../../src/lib/grid-list/grid-tile.ts","../../../src/lib/grid-list/grid-list-base.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 {MatLineModule, MatCommonModule} from '@angular/material/core';\nimport {\n MatGridTile, MatGridTileText, MatGridTileFooterCssMatStyler,\n MatGridTileHeaderCssMatStyler, MatGridAvatarCssMatStyler\n} from './grid-tile';\nimport {MatGridList} from './grid-list';\n\n\n@NgModule({\n imports: [MatLineModule, MatCommonModule],\n exports: [\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatLineModule,\n MatCommonModule,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler\n ],\n declarations: [\n MatGridList,\n MatGridTile,\n MatGridTileText,\n MatGridTileHeaderCssMatStyler,\n MatGridTileFooterCssMatStyler,\n MatGridAvatarCssMatStyler\n ],\n})\nexport class MatGridListModule {}\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 {\n Component,\n ViewEncapsulation,\n AfterContentChecked,\n OnInit,\n Input,\n ContentChildren,\n QueryList,\n ElementRef,\n Optional,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\nimport {TileStyler, FitTileStyler, RatioTileStyler, FixedTileStyler} from './tile-styler';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n\n// TODO(kara): Conditional (responsive) column count / row size.\n// TODO(kara): Re-layout on window resize / media change (debounced).\n// TODO(kara): gridTileHeader and gridTileFooter.\n\nconst MAT_FIT_MODE = 'fit';\n\n@Component({\n moduleId: module.id,\n selector: 'mat-grid-list',\n exportAs: 'matGridList',\n templateUrl: 'grid-list.html',\n styleUrls: ['grid-list.css'],\n host: {\n 'class': 'mat-grid-list',\n },\n providers: [{\n provide: MAT_GRID_LIST,\n useExisting: MatGridList\n }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridList implements MatGridListBase, OnInit, AfterContentChecked {\n /** Number of columns being rendered. */\n private _cols: number;\n\n /** Used for determiningthe position of each tile in the grid. */\n private _tileCoordinator: TileCoordinator;\n\n /**\n * Row height value passed in by user. This can be one of three types:\n * - Number value (ex: \"100px\"): sets a fixed row height to that value\n * - Ratio value (ex: \"4:3\"): sets the row height based on width:height ratio\n * - \"Fit\" mode (ex: \"fit\"): sets the row height to total height divided by number of rows\n */\n private _rowHeight: string;\n\n /** The amount of space between tiles. This will be something like '5px' or '2em'. */\n private _gutter: string = '1px';\n\n /** Sets position and size styles for a tile */\n private _tileStyler: TileStyler;\n\n /** Query list of tiles that are being rendered. */\n @ContentChildren(MatGridTile, {descendants: true}) _tiles: QueryList<MatGridTile>;\n\n constructor(private _element: ElementRef<HTMLElement>,\n @Optional() private _dir: Directionality) {}\n\n /** Amount of columns in the grid list. */\n @Input()\n get cols(): number { return this._cols; }\n set cols(value: number) {\n this._cols = Math.max(1, Math.round(coerceNumberProperty(value)));\n }\n\n /** Size of the grid list's gutter in pixels. */\n @Input()\n get gutterSize(): string { return this._gutter; }\n set gutterSize(value: string) { this._gutter = `${value == null ? '' : value}`; }\n\n /** Set internal representation of row height from the user-provided value. */\n @Input()\n get rowHeight(): string | number { return this._rowHeight; }\n set rowHeight(value: string | number) {\n const newValue = `${value == null ? '' : value}`;\n\n if (newValue !== this._rowHeight) {\n this._rowHeight = newValue;\n this._setTileStyler(this._rowHeight);\n }\n }\n\n ngOnInit() {\n this._checkCols();\n this._checkRowHeight();\n }\n\n /**\n * The layout calculation is fairly cheap if nothing changes, so there's little cost\n * to run it frequently.\n */\n ngAfterContentChecked() {\n this._layoutTiles();\n }\n\n /** Throw a friendly error if cols property is missing */\n private _checkCols() {\n if (!this.cols) {\n throw Error(`mat-grid-list: must pass in number of columns. ` +\n `Example: <mat-grid-list cols=\"3\">`);\n }\n }\n\n /** Default to equal width:height if rowHeight property is missing */\n private _checkRowHeight(): void {\n if (!this._rowHeight) {\n this._setTileStyler('1:1');\n }\n }\n\n /** Creates correct Tile Styler subtype based on rowHeight passed in by user */\n private _setTileStyler(rowHeight: string): void {\n if (this._tileStyler) {\n this._tileStyler.reset(this);\n }\n\n if (rowHeight === MAT_FIT_MODE) {\n this._tileStyler = new FitTileStyler();\n } else if (rowHeight && rowHeight.indexOf(':') > -1) {\n this._tileStyler = new RatioTileStyler(rowHeight);\n } else {\n this._tileStyler = new FixedTileStyler(rowHeight);\n }\n }\n\n /** Computes and applies the size and position for all children grid tiles. */\n private _layoutTiles(): void {\n if (!this._tileCoordinator) {\n this._tileCoordinator = new TileCoordinator();\n }\n\n\n const tracker = this._tileCoordinator;\n const tiles = this._tiles.filter(tile => !tile._gridList || tile._gridList === this);\n const direction = this._dir ? this._dir.value : 'ltr';\n\n this._tileCoordinator.update(this.cols, tiles);\n this._tileStyler.init(this.gutterSize, tracker, this.cols, direction);\n\n tiles.forEach((tile, index) => {\n const pos = tracker.positions[index];\n this._tileStyler.setStyle(tile, pos.row, pos.col);\n });\n\n this._setListStyle(this._tileStyler.getComputedHeight());\n }\n\n /** Sets style on the main grid-list element, given the style name and value. */\n _setListStyle(style: [string, string | null] | null): void {\n if (style) {\n (this._element.nativeElement.style as any)[style[0]] = style[1];\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 {MatGridList} from './grid-list';\nimport {MatGridTile} from './grid-tile';\nimport {TileCoordinator} from './tile-coordinator';\n\n/**\n * RegExp that can be used to check whether a value will\n * be allowed inside a CSS `calc()` expression.\n */\nconst cssCalcAllowedValue = /^-?\\d+((\\.\\d+)?[A-Za-z%$]?)+$/;\n\n/**\n * Sets the style properties for an individual tile, given the position calculated by the\n * Tile Coordinator.\n * @docs-private\n */\nexport abstract class TileStyler {\n _gutterSize: string;\n _rows: number = 0;\n _rowspan: number = 0;\n _cols: number;\n _direction: string;\n\n /**\n * Adds grid-list layout info once it is available. Cannot be processed in the constructor\n * because these properties haven't been calculated by that point.\n *\n * @param gutterSize Size of the grid's gutter.\n * @param tracker Instance of the TileCoordinator.\n * @param cols Amount of columns in the grid.\n * @param direction Layout direction of the grid.\n */\n init(gutterSize: string, tracker: TileCoordinator, cols: number, direction: string): void {\n this._gutterSize = normalizeUnits(gutterSize);\n this._rows = tracker.rowCount;\n this._rowspan = tracker.rowspan;\n this._cols = cols;\n this._direction = direction;\n }\n\n /**\n * Computes the amount of space a single 1x1 tile would take up (width or height).\n * Used as a basis for other calculations.\n * @param sizePercent Percent of the total grid-list space that one 1x1 tile would take up.\n * @param gutterFraction Fraction of the gutter size taken up by one 1x1 tile.\n * @return The size of a 1x1 tile as an expression that can be evaluated via CSS calc().\n */\n getBaseTileSize(sizePercent: number, gutterFraction: number): string {\n // Take the base size percent (as would be if evenly dividing the size between cells),\n // and then subtracting the size of one gutter. However, since there are no gutters on the\n // edges, each tile only uses a fraction (gutterShare = numGutters / numCells) of the gutter\n // size. (Imagine having one gutter per tile, and then breaking up the extra gutter on the\n // edge evenly among the cells).\n return `(${sizePercent}% - (${this._gutterSize} * ${gutterFraction}))`;\n }\n\n\n /**\n * Gets The horizontal or vertical position of a tile, e.g., the 'top' or 'left' property value.\n * @param offset Number of tiles that have already been rendered in the row/column.\n * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @return Position of the tile as a CSS calc() expression.\n */\n getTilePosition(baseSize: string, offset: number): string {\n // The position comes the size of a 1x1 tile plus gutter for each previous tile in the\n // row/column (offset).\n return offset === 0 ? '0' : calc(`(${baseSize} + ${this._gutterSize}) * ${offset}`);\n }\n\n\n /**\n * Gets the actual size of a tile, e.g., width or height, taking rowspan or colspan into account.\n * @param baseSize Base size of a 1x1 tile (as computed in getBaseTileSize).\n * @param span The tile's rowspan or colspan.\n * @return Size of the tile as a CSS calc() expression.\n */\n getTileSize(baseSize: string, span: number): string {\n return `(${baseSize} * ${span}) + (${span - 1} * ${this._gutterSize})`;\n }\n\n\n /**\n * Sets the style properties to be applied to a tile for the given row and column index.\n * @param tile Tile to which to apply the styling.\n * @param rowIndex Index of the tile's row.\n * @param colIndex Index of the tile's column.\n */\n setStyle(tile: MatGridTile, rowIndex: number, colIndex: number): void {\n // Percent of the available horizontal space that one column takes up.\n let percentWidthPerTile = 100 / this._cols;\n\n // Fraction of the vertical gutter size that each column takes up.\n // For example, if there are 5 columns, each column uses 4/5 = 0.8 times the gutter width.\n let gutterWidthFractionPerTile = (this._cols - 1) / this._cols;\n\n this.setColStyles(tile, colIndex, percentWidthPerTile, gutterWidthFractionPerTile);\n this.setRowStyles(tile, rowIndex, percentWidthPerTile, gutterWidthFractionPerTile);\n }\n\n /** Sets the horizontal placement of the tile in the list. */\n setColStyles(tile: MatGridTile, colIndex: number, percentWidth: number,\n gutterWidth: number) {\n // Base horizontal size of a column.\n let baseTileWidth = this.getBaseTileSize(percentWidth, gutterWidth);\n\n // The width and horizontal position of each tile is always calculated the same way, but the\n // height and vertical position depends on the rowMode.\n let side = this._direction === 'rtl' ? 'right' : 'left';\n tile._setStyle(side, this.getTilePosition(baseTileWidth, colIndex));\n tile._setStyle('width', calc(this.getTileSize(baseTileWidth, tile.colspan)));\n }\n\n /**\n * Calculates the total size taken up by gutters across one axis of a list.\n */\n getGutterSpan(): string {\n return `${this._gutterSize} * (${this._rowspan} - 1)`;\n }\n\n /**\n * Calculates the total size taken up by tiles across one axis of a list.\n * @param tileHeight Height of the tile.\n */\n getTileSpan(tileHeight: string): string {\n return `${this._rowspan} * ${this.getTileSize(tileHeight, 1)}`;\n }\n\n /**\n * Sets the vertical placement of the tile in the list.\n * This method will be implemented by each type of TileStyler.\n * @docs-private\n */\n abstract setRowStyles(tile: MatGridTile, rowIndex: number, percentWidth: number,\n gutterWidth: number): void;\n\n /**\n * Calculates the computed height and returns the correct style property to set.\n * This method can be implemented by each type of TileStyler.\n * @docs-private\n */\n getComputedHeight(): [string, string] | null { return null; }\n\n /**\n * Called when the tile styler is swapped out with a different one. To be used for cleanup.\n * @param list Grid list that the styler was attached to.\n * @docs-private\n */\n abstract reset(list: MatGridList): void;\n}\n\n\n/**\n * This type of styler is instantiated when the user passes in a fixed row height.\n * Example `<mat-grid-list cols=\"3\" rowHeight=\"100px\">`\n * @docs-private\n */\nexport class FixedTileStyler extends TileStyler {\n\n constructor(public fixedRowHeight: string) { super(); }\n\n init(gutterSize: string, tracker: TileCoordinator, cols: number, direction: string) {\n super.init(gutterSize, tracker, cols, direction);\n this.fixedRowHeight = normalizeUnits(this.fixedRowHeight);\n\n if (!cssCalcAllowedValue.test(this.fixedRowHeight)) {\n throw Error(`Invalid value \"${this.fixedRowHeight}\" set as rowHeight.`);\n }\n }\n\n setRowStyles(tile: MatGridTile, rowIndex: number): void {\n tile._setStyle('top', this.getTilePosition(this.fixedRowHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(this.fixedRowHeight, tile.rowspan)));\n }\n\n getComputedHeight(): [string, string] {\n return [\n 'height', calc(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)\n ];\n }\n\n reset(list: MatGridList) {\n list._setListStyle(['height', null]);\n\n if (list._tiles) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n }\n}\n\n\n/**\n * This type of styler is instantiated when the user passes in a width:height ratio\n * for the row height. Example `<mat-grid-list cols=\"3\" rowHeight=\"3:1\">`\n * @docs-private\n */\nexport class RatioTileStyler extends TileStyler {\n\n /** Ratio width:height given by user to determine row height. */\n rowHeightRatio: number;\n baseTileHeight: string;\n\n constructor(value: string) {\n super();\n this._parseRatio(value);\n }\n\n setRowStyles(tile: MatGridTile, rowIndex: number, percentWidth: number,\n gutterWidth: number): void {\n let percentHeightPerTile = percentWidth / this.rowHeightRatio;\n this.baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterWidth);\n\n // Use padding-top and margin-top to maintain the given aspect ratio, as\n // a percentage-based value for these properties is applied versus the *width* of the\n // containing block. See http://www.w3.org/TR/CSS2/box.html#margin-properties\n tile._setStyle('marginTop', this.getTilePosition(this.baseTileHeight, rowIndex));\n tile._setStyle('paddingTop', calc(this.getTileSize(this.baseTileHeight, tile.rowspan)));\n }\n\n getComputedHeight(): [string, string] {\n return [\n 'paddingBottom', calc(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`)\n ];\n }\n\n reset(list: MatGridList) {\n list._setListStyle(['paddingBottom', null]);\n\n list._tiles.forEach(tile => {\n tile._setStyle('marginTop', null);\n tile._setStyle('paddingTop', null);\n });\n }\n\n private _parseRatio(value: string): void {\n const ratioParts = value.split(':');\n\n if (ratioParts.length !== 2) {\n throw Error(`mat-grid-list: invalid ratio given for row-height: \"${value}\"`);\n }\n\n this.rowHeightRatio = parseFloat(ratioParts[0]) / parseFloat(ratioParts[1]);\n }\n}\n\n/**\n * This type of styler is instantiated when the user selects a \"fit\" row height mode.\n * In other words, the row height will reflect the total height of the container divided\n * by the number of rows. Example `<mat-grid-list cols=\"3\" rowHeight=\"fit\">`\n *\n * @docs-private\n */\nexport class FitTileStyler extends TileStyler {\n setRowStyles(tile: MatGridTile, rowIndex: number): void {\n // Percent of the available vertical space that one row takes up.\n let percentHeightPerTile = 100 / this._rowspan;\n\n // Fraction of the horizontal gutter size that each column takes up.\n let gutterHeightPerTile = (this._rows - 1) / this._rows;\n\n // Base vertical size of a column.\n let baseTileHeight = this.getBaseTileSize(percentHeightPerTile, gutterHeightPerTile);\n\n tile._setStyle('top', this.getTilePosition(baseTileHeight, rowIndex));\n tile._setStyle('height', calc(this.getTileSize(baseTileHeight, tile.rowspan)));\n }\n\n reset(list: MatGridList) {\n if (list._tiles) {\n list._tiles.forEach(tile => {\n tile._setStyle('top', null);\n tile._setStyle('height', null);\n });\n }\n }\n}\n\n\n/** Wraps a CSS string in a calc function */\nfunction calc(exp: string): string {\n return `calc(${exp})`;\n}\n\n\n/** Appends pixels to a CSS string if no units are given. */\nfunction normalizeUnits(value: string): string {\n return value.match(/([A-Za-z%]+)$/) ? value : `${value}px`;\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 {MatGridTile} from './grid-tile';\n\n/**\n * Class for determining, from a list of tiles, the (row, col) position of each of those tiles\n * in the grid. This is necessary (rather than just rendering the tiles in normal document flow)\n * because the tiles can have a rowspan.\n *\n * The positioning algorithm greedily places each tile as soon as it encounters a gap in the grid\n * large enough to accommodate it so that the tiles still render in the same order in which they\n * are given.\n *\n * The basis of the algorithm is the use of an array to track the already placed tiles. Each\n * element of the array corresponds to a column, and the value indicates how many cells in that\n * column are already occupied; zero indicates an empty cell. Moving \"down\" to the next row\n * decrements each value in the tracking array (indicating that the column is one cell closer to\n * being free).\n *\n * @docs-private\n */\nexport class TileCoordinator {\n /** Tracking array (see class description). */\n tracker: number[];\n\n /** Index at which the search for the next gap will start. */\n columnIndex: number = 0;\n\n /** The current row index. */\n rowIndex: number = 0;\n\n /** Gets the total number of rows occupied by tiles */\n get rowCount(): number { return this.rowIndex + 1; }\n\n /**\n * Gets the total span of rows occupied by tiles.\n * Ex: A list with 1 row that contains a tile with rowspan 2 will have a total rowspan of 2.\n */\n get rowspan() {\n const lastRowMax = Math.max(...this.tracker);\n // if any of the tiles has a rowspan that pushes it beyond the total row count,\n // add the difference to the rowcount\n return lastRowMax > 1 ? this.rowCount + lastRowMax - 1 : this.rowCount;\n }\n\n /** The computed (row, col) position of each tile (the output). */\n positions: TilePosition[];\n\n /**\n * Updates the tile positions.\n * @param numColumns Amount of columns in the grid.\n */\n update(numColumns: number, tiles: MatGridTile[]) {\n this.columnIndex = 0;\n this.rowIndex = 0;\n\n this.tracker = new Array(numColumns);\n this.tracker.fill(0, 0, this.tracker.length);\n this.positions = tiles.map(tile => this._trackTile(tile));\n }\n\n /** Calculates the row and col position of a tile. */\n private _trackTile(tile: MatGridTile): TilePosition {\n // Find a gap large enough for this tile.\n const gapStartIndex = this._findMatchingGap(tile.colspan);\n\n // Place tile in the resulting gap.\n this._markTilePosition(gapStartIndex, tile);\n\n // The next time we look for a gap, the search will start at columnIndex, which should be\n // immediately after the tile that has just been placed.\n this.columnIndex = gapStartIndex + tile.colspan;\n\n return new TilePosition(this.rowIndex, gapStartIndex);\n }\n\n /** Finds the next available space large enough to fit the tile. */\n private _findMatchingGap(tileCols: number): number {\n if (tileCols > this.tracker.length) {\n throw Error(`mat-grid-list: tile with colspan ${tileCols} is wider than ` +\n `grid with cols=\"${this.tracker.length}\".`);\n }\n\n // Start index is inclusive, end index is exclusive.\n let gapStartIndex = -1;\n let gapEndIndex = -1;\n\n // Look for a gap large enough to fit the given tile. Empty spaces are marked with a zero.\n do {\n // If we've reached the end of the row, go to the next row.\n if (this.columnIndex + tileCols > this.tracker.length) {\n this._nextRow();\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n continue;\n }\n\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n\n // If there are no more empty spaces in this row at all, move on to the next row.\n if (gapStartIndex == -1) {\n this._nextRow();\n gapStartIndex = this.tracker.indexOf(0, this.columnIndex);\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n continue;\n }\n\n gapEndIndex = this._findGapEndIndex(gapStartIndex);\n\n // If a gap large enough isn't found, we want to start looking immediately after the current\n // gap on the next iteration.\n this.columnIndex = gapStartIndex + 1;\n\n // Continue iterating until we find a gap wide enough for this tile. Since gapEndIndex is\n // exclusive, gapEndIndex is 0 means we didn't find a gap and should continue.\n } while ((gapEndIndex - gapStartIndex < tileCols) || (gapEndIndex == 0));\n\n // If we still didn't manage to find a gap, ensure that the index is\n // at least zero so the tile doesn't get pulled out of the grid.\n return Math.max(gapStartIndex, 0);\n }\n\n /** Move \"down\" to the next row. */\n private _nextRow(): void {\n this.columnIndex = 0;\n this.rowIndex++;\n\n // Decrement all spaces by one to reflect moving down one row.\n for (let i = 0; i < this.tracker.length; i++) {\n this.tracker[i] = Math.max(0, this.tracker[i] - 1);\n }\n }\n\n /**\n * Finds the end index (exclusive) of a gap given the index from which to start looking.\n * The gap ends when a non-zero value is found.\n */\n private _findGapEndIndex(gapStartIndex: number): number {\n for (let i = gapStartIndex + 1; i < this.tracker.length; i++) {\n if (this.tracker[i] != 0) {\n return i;\n }\n }\n\n // The gap ends with the end of the row.\n return this.tracker.length;\n }\n\n /** Update the tile tracker to account for the given tile in the given space. */\n private _markTilePosition(start: number, tile: MatGridTile): void {\n for (let i = 0; i < tile.colspan; i++) {\n this.tracker[start + i] = tile.rowspan;\n }\n }\n}\n\n/**\n * Simple data structure for tile position (row, col).\n * @docs-private\n */\nexport class TilePosition {\n constructor(public row: number, public col: number) {}\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 {\n Component,\n ViewEncapsulation,\n ElementRef,\n Input,\n Optional,\n ContentChildren,\n QueryList,\n AfterContentInit,\n Directive,\n ChangeDetectionStrategy,\n Inject,\n} from '@angular/core';\nimport {MatLine, setLines} from '@angular/material/core';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {MAT_GRID_LIST, MatGridListBase} from './grid-list-base';\n\n@Component({\n moduleId: module.id,\n selector: 'mat-grid-tile',\n exportAs: 'matGridTile',\n host: {\n 'class': 'mat-grid-tile',\n },\n templateUrl: 'grid-tile.html',\n styleUrls: ['grid-list.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatGridTile {\n _rowspan: number = 1;\n _colspan: number = 1;\n\n constructor(\n private _element: ElementRef<HTMLElement>,\n @Optional() @Inject(MAT_GRID_LIST) public _gridList?: MatGridListBase) {}\n\n /** Amount of rows that the grid tile takes up. */\n @Input()\n get rowspan(): number { return this._rowspan; }\n set rowspan(value: number) { this._rowspan = Math.round(coerceNumberProperty(value)); }\n\n /** Amount of columns that the grid tile takes up. */\n @Input()\n get colspan(): number { return this._colspan; }\n set colspan(value: number) { this._colspan = Math.round(coerceNumberProperty(value)); }\n\n /**\n * Sets the style of the grid-tile element. Needs to be set manually to avoid\n * \"Changed after checked\" errors that would occur with HostBinding.\n */\n _setStyle(property: string, value: any): void {\n (this._element.nativeElement.style as any)[property] = value;\n }\n}\n\n@Component({\n moduleId: module.id,\n selector: 'mat-grid-tile-header, mat-grid-tile-footer',\n templateUrl: 'grid-tile-text.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatGridTileText implements AfterContentInit {\n @ContentChildren(MatLine) _lines: QueryList<MatLine>;\n\n constructor(private _element: ElementRef<HTMLElement>) {}\n\n ngAfterContentInit() {\n setLines(this._lines, this._element);\n }\n}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: '[mat-grid-avatar], [matGridAvatar]',\n host: {'class': 'mat-grid-avatar'}\n})\nexport class MatGridAvatarCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: 'mat-grid-tile-header',\n host: {'class': 'mat-grid-tile-header'}\n})\nexport class MatGridTileHeaderCssMatStyler {}\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\n@Directive({\n selector: 'mat-grid-tile-footer',\n host: {'class': 'mat-grid-tile-footer'}\n})\nexport class MatGridTileFooterCssMatStyler {}\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 {InjectionToken} from '@angular/core';\n\n/**\n * Injection token used to provide a grid list to a tile and to avoid circular imports.\n * @docs-private\n */\nexport const MAT_GRID_LIST = new InjectionToken<MatGridListBase>('MAT_GRID_LIST');\n\n/**\n * Base interface for a `MatGridList`.\n * @docs-private\n */\nexport interface MatGridListBase {\n cols: number;\n gutterSize: string;\n rowHeight: number | string;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AKcA,AAAA,MAAa,aAAa,GAAG,IAAI,cAAc,CAAkB,eAAe,CAAC;;;;;;ADuBjF,MAAa,WAAW,CAAxB;;;;;IAIE,WAAF,CACY,QAAiC,EACC,SAA2B,EAFzE;QACY,IAAZ,CAAA,QAAoB,GAAR,QAAQ,CAAyB;QACC,IAA9C,CAAA,SAAuD,GAAT,SAAS,CAAkB;QALvE,IAAF,CAAA,QAAU,GAAW,CAAC,CAAC;QACrB,IAAF,CAAA,QAAU,GAAW,CAAC,CAAC;KAIsD;;;;;IAG3E,IACI,OAAO,GADb,EAC0B,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE;;;;;IAC/C,IAAI,OAAO,CAAC,KAAa,EAA3B,EAA+B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;;;;;IAGvF,IACI,OAAO,GADb,EAC0B,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE;;;;;IAC/C,IAAI,OAAO,CAAC,KAAa,EAA3B,EAA+B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;;;;;;;;IAMvF,SAAS,CAAC,QAAgB,EAAE,KAAU,EAAxC;QACI,oBAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,IAA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AA,aAAA;wBACA,WAAA,EAAA,WAAA;qBACA,CAAA;gBACA,eAAA,EAAA,uBAAA,CAAA,MAAA;gBACA,aAAA,EAAA,iBAAA,CAAA,IAAA;aACA,EAAA,EAAA;CACA,CAAA;;;;;CAhCA,CAAA;AAOA,WAAA,CAAQ,cAAc,GAAtB;;;IAiDA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;IAMA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAQ,KAAR,EAAA,CAAA;CAOA,CAAA;;;;;;AD/CA,MAAa,iBAAiB,CAA9B;;;IArBA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,aAAa,EAAE,eAAe,CAAC;gBACzC,OAAO,EAAE;oBACP,WAAW;oBACX,WAAW;oBACX,eAAe;oBACf,aAAa;oBACb,eAAe;oBACf,6BAA6B;oBAC7B,6BAA6B;oBAC7B,yBAAyB;iBAC1B;gBACD,YAAY,EAAE;oBACZ,WAAW;oBACX,WAAW;oBACX,eAAe;oBACf,6BAA6B;oBAC7B,6BAA6B;oBAC7B,yBAAyB;iBAC1B;aACF,EAAD,EAAA;;;;;;;;;;;;;;;"}
|
package/esm2015/icon.js
CHANGED
|
@@ -318,6 +318,14 @@ class MatIconRegistry {
|
|
|
318
318
|
}
|
|
319
319
|
return throwError(getMatIconNameNotFoundError(key));
|
|
320
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* @return {?}
|
|
323
|
+
*/
|
|
324
|
+
ngOnDestroy() {
|
|
325
|
+
this._svgIconConfigs.clear();
|
|
326
|
+
this._iconSetConfigs.clear();
|
|
327
|
+
this._cachedIconsByUrl.clear();
|
|
328
|
+
}
|
|
321
329
|
/**
|
|
322
330
|
* Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.
|
|
323
331
|
* @private
|
|
@@ -1069,6 +1077,7 @@ MatIcon.decorators = [
|
|
|
1069
1077
|
'role': 'img',
|
|
1070
1078
|
'class': 'mat-icon',
|
|
1071
1079
|
'[class.mat-icon-inline]': 'inline',
|
|
1080
|
+
'[class.mat-icon-no-color]': 'color !== "primary" && color !== "accent" && color !== "warn"',
|
|
1072
1081
|
},
|
|
1073
1082
|
encapsulation: ViewEncapsulation.None,
|
|
1074
1083
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
package/esm2015/icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sources":["../../../src/lib/icon/icon-module.ts","../../../src/lib/icon/icon.ts","../../../src/lib/icon/icon-registry.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 {MatCommonModule} from '@angular/material/core';\nimport {MatIcon} from './icon';\n\n\n@NgModule({\n imports: [MatCommonModule],\n exports: [MatIcon, MatCommonModule],\n declarations: [MatIcon],\n})\nexport class MatIconModule {}\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 {take} from 'rxjs/operators';\nimport {\n Attribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewEncapsulation,\n Optional,\n InjectionToken,\n inject,\n Inject,\n OnDestroy,\n AfterViewChecked,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {MatIconRegistry} from './icon-registry';\n\n\n// Boilerplate for applying mixins to MatIcon.\n/** @docs-private */\nexport class MatIconBase {\n constructor(public _elementRef: ElementRef) {}\n}\nexport const _MatIconMixinBase: CanColorCtor & typeof MatIconBase =\n mixinColor(MatIconBase);\n\n/**\n * Injection token used to provide the current location to `MatIcon`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_ICON_LOCATION = new InjectionToken<MatIconLocation>('mat-icon-location', {\n providedIn: 'root',\n factory: MAT_ICON_LOCATION_FACTORY\n});\n\n/**\n * Stubbed out location for `MatIcon`.\n * @docs-private\n */\nexport interface MatIconLocation {\n getPathname: () => string;\n}\n\n/** @docs-private */\nexport function MAT_ICON_LOCATION_FACTORY(): MatIconLocation {\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/** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */\nconst funcIriAttributes = [\n 'clip-path',\n 'color-profile',\n 'src',\n 'cursor',\n 'fill',\n 'filter',\n 'marker',\n 'marker-start',\n 'marker-mid',\n 'marker-end',\n 'mask',\n 'stroke'\n];\n\n/** Selector that can be used to find all elements that are using a `FuncIRI`. */\nconst funcIriAttributeSelector = funcIriAttributes.map(attr => `[${attr}]`).join(', ');\n\n/** Regex that can be used to extract the id out of a FuncIRI. */\nconst funcIriPattern = /^url\\(['\"]?#(.*?)['\"]?\\)$/;\n\n/**\n * Component to display an icon. It can be used in the following ways:\n *\n * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the\n * addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of\n * MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format\n * \"[namespace]:[name]\", if not the value will be the name of an icon in the default namespace.\n * Examples:\n * `<mat-icon svgIcon=\"left-arrow\"></mat-icon>\n * <mat-icon svgIcon=\"animals:cat\"></mat-icon>`\n *\n * - Use a font ligature as an icon by putting the ligature text in the content of the `<mat-icon>`\n * component. By default the Material icons font is used as described at\n * http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an\n * alternate font by setting the fontSet input to either the CSS class to apply to use the\n * desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.\n * Examples:\n * `<mat-icon>home</mat-icon>\n * <mat-icon fontSet=\"myfont\">sun</mat-icon>`\n *\n * - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the\n * font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a\n * CSS class which causes the glyph to be displayed via a :before selector, as in\n * https://fortawesome.github.io/Font-Awesome/examples/\n * Example:\n * `<mat-icon fontSet=\"fa\" fontIcon=\"alarm\"></mat-icon>`\n */\n@Component({\n moduleId: module.id,\n template: '<ng-content></ng-content>',\n selector: 'mat-icon',\n exportAs: 'matIcon',\n styleUrls: ['icon.css'],\n inputs: ['color'],\n host: {\n 'role': 'img',\n 'class': 'mat-icon',\n '[class.mat-icon-inline]': 'inline',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatIcon extends _MatIconMixinBase implements OnChanges, OnInit, AfterViewChecked,\n CanColor, OnDestroy {\n\n /**\n * Whether the icon should be inlined, automatically sizing the icon to match the font size of\n * the element the icon is contained in.\n */\n @Input()\n get inline(): boolean {\n return this._inline;\n }\n set inline(inline: boolean) {\n this._inline = coerceBooleanProperty(inline);\n }\n private _inline: boolean = false;\n\n /** Name of the icon in the SVG icon set. */\n @Input() svgIcon: string;\n\n /** Font set that the icon is a part of. */\n @Input()\n get fontSet(): string { return this._fontSet; }\n set fontSet(value: string) {\n this._fontSet = this._cleanupFontValue(value);\n }\n private _fontSet: string;\n\n /** Name of an icon within a font set. */\n @Input()\n get fontIcon(): string { return this._fontIcon; }\n set fontIcon(value: string) {\n this._fontIcon = this._cleanupFontValue(value);\n }\n private _fontIcon: string;\n\n private _previousFontSetClass: string;\n private _previousFontIconClass: string;\n\n /** Keeps track of the current page path. */\n private _previousPath?: string;\n\n /** Keeps track of the elements and attributes that we've prefixed with the current path. */\n private _elementsWithExternalReferences?: Map<Element, {name: string, value: string}[]>;\n\n constructor(\n elementRef: ElementRef<HTMLElement>,\n private _iconRegistry: MatIconRegistry,\n @Attribute('aria-hidden') ariaHidden: string,\n /**\n * @deprecated `location` parameter to be made required.\n * @breaking-change 8.0.0\n */\n @Optional() @Inject(MAT_ICON_LOCATION) private _location?: MatIconLocation) {\n super(elementRef);\n\n // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is\n // the right thing to do for the majority of icon use-cases.\n if (!ariaHidden) {\n elementRef.nativeElement.setAttribute('aria-hidden', 'true');\n }\n }\n\n /**\n * Splits an svgIcon binding value into its icon set and icon name components.\n * Returns a 2-element array of [(icon set), (icon name)].\n * The separator for the two fields is ':'. If there is no separator, an empty\n * string is returned for the icon set and the entire value is returned for\n * the icon name. If the argument is falsy, returns an array of two empty strings.\n * Throws an error if the name contains two or more ':' separators.\n * Examples:\n * `'social:cake' -> ['social', 'cake']\n * 'penguin' -> ['', 'penguin']\n * null -> ['', '']\n * 'a:b:c' -> (throws Error)`\n */\n private _splitIconName(iconName: string): [string, string] {\n if (!iconName) {\n return ['', ''];\n }\n const parts = iconName.split(':');\n switch (parts.length) {\n case 1: return ['', parts[0]]; // Use default namespace.\n case 2: return <[string, string]>parts;\n default: throw Error(`Invalid icon name: \"${iconName}\"`);\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Only update the inline SVG icon if the inputs changed, to avoid unnecessary DOM operations.\n if (changes.svgIcon) {\n if (this.svgIcon) {\n const [namespace, iconName] = this._splitIconName(this.svgIcon);\n\n this._iconRegistry.getNamedSvgIcon(iconName, namespace).pipe(take(1)).subscribe(\n svg => this._setSvgElement(svg),\n (err: Error) => console.log(`Error retrieving icon: ${err.message}`)\n );\n } else {\n this._clearSvgElement();\n }\n }\n\n if (this._usingFontIcon()) {\n this._updateFontIconClasses();\n }\n }\n\n ngOnInit() {\n // Update font classes because ngOnChanges won't be called if none of the inputs are present,\n // e.g. <mat-icon>arrow</mat-icon> In this case we need to add a CSS class for the default font.\n if (this._usingFontIcon()) {\n this._updateFontIconClasses();\n }\n }\n\n ngAfterViewChecked() {\n const cachedElements = this._elementsWithExternalReferences;\n\n if (cachedElements && this._location && cachedElements.size) {\n const newPath = this._location.getPathname();\n\n // We need to check whether the URL has changed on each change detection since\n // the browser doesn't have an API that will let us react on link clicks and\n // we can't depend on the Angular router. The references need to be updated,\n // because while most browsers don't care whether the URL is correct after\n // the first render, Safari will break if the user navigates to a different\n // page and the SVG isn't re-rendered.\n if (newPath !== this._previousPath) {\n this._previousPath = newPath;\n this._prependPathToReferences(newPath);\n }\n }\n }\n\n ngOnDestroy() {\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n }\n\n private _usingFontIcon(): boolean {\n return !this.svgIcon;\n }\n\n private _setSvgElement(svg: SVGElement) {\n this._clearSvgElement();\n\n // Workaround for IE11 and Edge ignoring `style` tags inside dynamically-created SVGs.\n // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/\n // Do this before inserting the element into the DOM, in order to avoid a style recalculation.\n const styleTags = svg.querySelectorAll('style') as NodeListOf<HTMLStyleElement>;\n\n for (let i = 0; i < styleTags.length; i++) {\n styleTags[i].textContent += ' ';\n }\n\n // Note: we do this fix here, rather than the icon registry, because the\n // references have to point to the URL at the time that the icon was created.\n if (this._location) {\n const path = this._location.getPathname();\n this._previousPath = path;\n this._cacheChildrenWithExternalReferences(svg);\n this._prependPathToReferences(path);\n }\n\n this._elementRef.nativeElement.appendChild(svg);\n }\n\n private _clearSvgElement() {\n const layoutElement: HTMLElement = this._elementRef.nativeElement;\n let childCount = layoutElement.childNodes.length;\n\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n\n // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that\n // we can't use innerHTML, because IE will throw if the element has a data binding.\n while (childCount--) {\n const child = layoutElement.childNodes[childCount];\n\n // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid\n // of any loose text nodes, as well as any SVG elements in order to remove any old icons.\n if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {\n layoutElement.removeChild(child);\n }\n }\n }\n\n private _updateFontIconClasses() {\n if (!this._usingFontIcon()) {\n return;\n }\n\n const elem: HTMLElement = this._elementRef.nativeElement;\n const fontSetClass = this.fontSet ?\n this._iconRegistry.classNameForFontAlias(this.fontSet) :\n this._iconRegistry.getDefaultFontSetClass();\n\n if (fontSetClass != this._previousFontSetClass) {\n if (this._previousFontSetClass) {\n elem.classList.remove(this._previousFontSetClass);\n }\n if (fontSetClass) {\n elem.classList.add(fontSetClass);\n }\n this._previousFontSetClass = fontSetClass;\n }\n\n if (this.fontIcon != this._previousFontIconClass) {\n if (this._previousFontIconClass) {\n elem.classList.remove(this._previousFontIconClass);\n }\n if (this.fontIcon) {\n elem.classList.add(this.fontIcon);\n }\n this._previousFontIconClass = this.fontIcon;\n }\n }\n\n /**\n * Cleans up a value to be used as a fontIcon or fontSet.\n * Since the value ends up being assigned as a CSS class, we\n * have to trim the value and omit space-separated values.\n */\n private _cleanupFontValue(value: string) {\n return typeof value === 'string' ? value.trim().split(' ')[0] : value;\n }\n\n /**\n * Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`\n * reference. This is required because WebKit browsers require references to be prefixed with\n * the current path, if the page has a `base` tag.\n */\n private _prependPathToReferences(path: string) {\n const elements = this._elementsWithExternalReferences;\n\n if (elements) {\n elements.forEach((attrs, element) => {\n attrs.forEach(attr => {\n element.setAttribute(attr.name, `url('${path}#${attr.value}')`);\n });\n });\n }\n }\n\n /**\n * Caches the children of an SVG element that have `url()`\n * references that we need to prefix with the current path.\n */\n private _cacheChildrenWithExternalReferences(element: SVGElement) {\n const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);\n const elements = this._elementsWithExternalReferences =\n this._elementsWithExternalReferences || new Map();\n\n for (let i = 0; i < elementsWithFuncIri.length; i++) {\n funcIriAttributes.forEach(attr => {\n const elementWithReference = elementsWithFuncIri[i];\n const value = elementWithReference.getAttribute(attr);\n const match = value ? value.match(funcIriPattern) : null;\n\n if (match) {\n let attributes = elements.get(elementWithReference);\n\n if (!attributes) {\n attributes = [];\n elements.set(elementWithReference, attributes);\n }\n\n attributes!.push({name: attr, value: match[1]});\n }\n });\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 {DOCUMENT} from '@angular/common';\nimport {HttpClient, HttpErrorResponse} from '@angular/common/http';\nimport {\n Inject,\n Injectable,\n InjectionToken,\n Optional,\n SecurityContext,\n SkipSelf,\n} from '@angular/core';\nimport {DomSanitizer, SafeResourceUrl, SafeHtml} from '@angular/platform-browser';\nimport {forkJoin, Observable, of as observableOf, throwError as observableThrow} from 'rxjs';\nimport {catchError, finalize, map, share, tap} from 'rxjs/operators';\n\n\n/**\n * Returns an exception to be thrown in the case when attempting to\n * load an icon with a name that cannot be found.\n * @docs-private\n */\nexport function getMatIconNameNotFoundError(iconName: string): Error {\n return Error(`Unable to find icon with the name \"${iconName}\"`);\n}\n\n\n/**\n * Returns an exception to be thrown when the consumer attempts to use\n * `<mat-icon>` without including @angular/http.\n * @docs-private\n */\nexport function getMatIconNoHttpProviderError(): Error {\n return Error('Could not find HttpClient provider for use with Angular Material icons. ' +\n 'Please include the HttpClientModule from @angular/common/http in your ' +\n 'app imports.');\n}\n\n\n/**\n * Returns an exception to be thrown when a URL couldn't be sanitized.\n * @param url URL that was attempted to be sanitized.\n * @docs-private\n */\nexport function getMatIconFailedToSanitizeUrlError(url: SafeResourceUrl): Error {\n return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL ` +\n `via Angular's DomSanitizer. Attempted URL was \"${url}\".`);\n}\n\n/**\n * Returns an exception to be thrown when a HTML string couldn't be sanitized.\n * @param literal HTML that was attempted to be sanitized.\n * @docs-private\n */\nexport function getMatIconFailedToSanitizeLiteralError(literal: SafeHtml): Error {\n return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`);\n}\n\n\n/**\n * Configuration for an icon, including the URL and possibly the cached SVG element.\n * @docs-private\n */\nclass SvgIconConfig {\n url: SafeResourceUrl | null;\n svgElement: SVGElement | null;\n\n constructor(url: SafeResourceUrl);\n constructor(svgElement: SVGElement);\n constructor(data: SafeResourceUrl | SVGElement) {\n // Note that we can't use `instanceof SVGElement` here,\n // because it'll break during server-side rendering.\n if (!!(data as any).nodeName) {\n this.svgElement = data as SVGElement;\n } else {\n this.url = data as SafeResourceUrl;\n }\n }\n}\n\n/**\n * Service to register and display icons used by the `<mat-icon>` component.\n * - Registers icon URLs by namespace and name.\n * - Registers icon set URLs by namespace.\n * - Registers aliases for CSS classes, for use with icon fonts.\n * - Loads icons from URLs and extracts individual icons from icon sets.\n */\n@Injectable({providedIn: 'root'})\nexport class MatIconRegistry {\n private _document: Document;\n\n /**\n * URLs and cached SVG elements for individual icons. Keys are of the format \"[namespace]:[icon]\".\n */\n private _svgIconConfigs = new Map<string, SvgIconConfig>();\n\n /**\n * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.\n * Multiple icon sets can be registered under the same namespace.\n */\n private _iconSetConfigs = new Map<string, SvgIconConfig[]>();\n\n /** Cache for icons loaded by direct URLs. */\n private _cachedIconsByUrl = new Map<string, SVGElement>();\n\n /** In-progress icon fetches. Used to coalesce multiple requests to the same URL. */\n private _inProgressUrlFetches = new Map<string, Observable<string>>();\n\n /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n private _fontCssClassesByAlias = new Map<string, string>();\n\n /**\n * The CSS class to apply when an `<mat-icon>` component has no icon name, url, or font specified.\n * The default 'material-icons' value assumes that the material icon font has been loaded as\n * described at http://google.github.io/material-design-icons/#icon-font-for-the-web\n */\n private _defaultFontSetClass = 'material-icons';\n\n constructor(\n @Optional() private _httpClient: HttpClient,\n private _sanitizer: DomSanitizer,\n @Optional() @Inject(DOCUMENT) document: any) {\n this._document = document;\n }\n\n /**\n * Registers an icon by URL in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIcon(iconName: string, url: SafeResourceUrl): this {\n return this.addSvgIconInNamespace('', iconName, url);\n }\n\n /**\n * Registers an icon using an HTML string in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteral(iconName: string, literal: SafeHtml): this {\n return this.addSvgIconLiteralInNamespace('', iconName, literal);\n }\n\n /**\n * Registers an icon by URL in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIconInNamespace(namespace: string, iconName: string, url: SafeResourceUrl): this {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url));\n }\n\n /**\n * Registers an icon using an HTML string in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteralInNamespace(namespace: string, iconName: string, literal: SafeHtml): this {\n const sanitizedLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!sanitizedLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n const svgElement = this._createSvgElementForSingleIcon(sanitizedLiteral);\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement));\n }\n\n /**\n * Registers an icon set by URL in the default namespace.\n * @param url\n */\n addSvgIconSet(url: SafeResourceUrl): this {\n return this.addSvgIconSetInNamespace('', url);\n }\n\n /**\n * Registers an icon set using an HTML string in the default namespace.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteral(literal: SafeHtml): this {\n return this.addSvgIconSetLiteralInNamespace('', literal);\n }\n\n /**\n * Registers an icon set by URL in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param url\n */\n addSvgIconSetInNamespace(namespace: string, url: SafeResourceUrl): this {\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url));\n }\n\n /**\n * Registers an icon set using an HTML string in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteralInNamespace(namespace: string, literal: SafeHtml): this {\n const sanitizedLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!sanitizedLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n const svgElement = this._svgElementFromString(sanitizedLiteral);\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(svgElement));\n }\n\n /**\n * Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon\n * component with the alias as the fontSet input will cause the class name to be applied\n * to the `<mat-icon>` element.\n *\n * @param alias Alias for the font.\n * @param className Class name override to be used instead of the alias.\n */\n registerFontClassAlias(alias: string, className: string = alias): this {\n this._fontCssClassesByAlias.set(alias, className);\n return this;\n }\n\n /**\n * Returns the CSS class name associated with the alias by a previous call to\n * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.\n */\n classNameForFontAlias(alias: string): string {\n return this._fontCssClassesByAlias.get(alias) || alias;\n }\n\n /**\n * Sets the CSS class name to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n *\n * @param className\n */\n setDefaultFontSetClass(className: string): this {\n this._defaultFontSetClass = className;\n return this;\n }\n\n /**\n * Returns the CSS class name to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n */\n getDefaultFontSetClass(): string {\n return this._defaultFontSetClass;\n }\n\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.\n * The response from the URL may be cached so this will not always cause an HTTP request, but\n * the produced element will always be a new copy of the originally fetched icon. (That is,\n * it will not contain any modifications made to elements previously returned).\n *\n * @param safeUrl URL from which to fetch the SVG icon.\n */\n getSvgIconFromUrl(safeUrl: SafeResourceUrl): Observable<SVGElement> {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n\n const cachedIcon = this._cachedIconsByUrl.get(url);\n\n if (cachedIcon) {\n return observableOf(cloneSvg(cachedIcon));\n }\n\n return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl)).pipe(\n tap(svg => this._cachedIconsByUrl.set(url!, svg)),\n map(svg => cloneSvg(svg)),\n );\n }\n\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name\n * and namespace. The icon must have been previously registered with addIcon or addIconSet;\n * if not, the Observable will throw an error.\n *\n * @param name Name of the icon to be retrieved.\n * @param namespace Namespace in which to look for the icon.\n */\n getNamedSvgIcon(name: string, namespace: string = ''): Observable<SVGElement> {\n // Return (copy of) cached icon if possible.\n const key = iconKey(namespace, name);\n const config = this._svgIconConfigs.get(key);\n\n if (config) {\n return this._getSvgFromConfig(config);\n }\n\n // See if we have any icon sets registered for the namespace.\n const iconSetConfigs = this._iconSetConfigs.get(namespace);\n\n if (iconSetConfigs) {\n return this._getSvgFromIconSetConfigs(name, iconSetConfigs);\n }\n\n return observableThrow(getMatIconNameNotFoundError(key));\n }\n\n /**\n * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.\n */\n private _getSvgFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n if (config.svgElement) {\n // We already have the SVG element for this icon, return a copy.\n return observableOf(cloneSvg(config.svgElement));\n } else {\n // Fetch the icon from the config's URL, cache it, and return a copy.\n return this._loadSvgIconFromConfig(config).pipe(\n tap(svg => config.svgElement = svg),\n map(svg => cloneSvg(svg)),\n );\n }\n }\n\n /**\n * Attempts to find an icon with the specified name in any of the SVG icon sets.\n * First searches the available cached icons for a nested element with a matching name, and\n * if found copies the element to a new `<svg>` element. If not found, fetches all icon sets\n * that have not been cached, and searches again after all fetches are completed.\n * The returned Observable produces the SVG element if possible, and throws\n * an error if no icon with the specified name can be found.\n */\n private _getSvgFromIconSetConfigs(name: string, iconSetConfigs: SvgIconConfig[]):\n Observable<SVGElement> {\n // For all the icon set SVG elements we've fetched, see if any contain an icon with the\n // requested name.\n const namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n if (namedIcon) {\n // We could cache namedIcon in _svgIconConfigs, but since we have to make a copy every\n // time anyway, there's probably not much advantage compared to just always extracting\n // it from the icon set.\n return observableOf(namedIcon);\n }\n\n // Not found in any cached icon sets. If there are icon sets with URLs that we haven't\n // fetched, fetch them now and look for iconName in the results.\n const iconSetFetchRequests: Observable<SVGElement | null>[] = iconSetConfigs\n .filter(iconSetConfig => !iconSetConfig.svgElement)\n .map(iconSetConfig => {\n return this._loadSvgIconSetFromConfig(iconSetConfig).pipe(\n catchError((err: HttpErrorResponse): Observable<SVGElement | null> => {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);\n\n // Swallow errors fetching individual URLs so the\n // combined Observable won't necessarily fail.\n console.error(`Loading icon set URL: ${url} failed: ${err.message}`);\n return observableOf(null);\n })\n );\n });\n\n // Fetch all the icon set URLs. When the requests complete, every IconSet should have a\n // cached SVG element (unless the request failed), and we can check again for the icon.\n return forkJoin(iconSetFetchRequests).pipe(map(() => {\n const foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n if (!foundIcon) {\n throw getMatIconNameNotFoundError(name);\n }\n\n return foundIcon;\n }));\n }\n\n /**\n * Searches the cached SVG elements for the given icon sets for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n private _extractIconWithNameFromAnySet(iconName: string, iconSetConfigs: SvgIconConfig[]):\n SVGElement | null {\n // Iterate backwards, so icon sets added later have precedence.\n for (let i = iconSetConfigs.length - 1; i >= 0; i--) {\n const config = iconSetConfigs[i];\n if (config.svgElement) {\n const foundIcon = this._extractSvgIconFromSet(config.svgElement, iconName);\n if (foundIcon) {\n return foundIcon;\n }\n }\n }\n return null;\n }\n\n /**\n * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n */\n private _loadSvgIconFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n return this._fetchUrl(config.url)\n .pipe(map(svgText => this._createSvgElementForSingleIcon(svgText)));\n }\n\n /**\n * Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n */\n private _loadSvgIconSetFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n // If the SVG for this icon set has already been parsed, do nothing.\n if (config.svgElement) {\n return observableOf(config.svgElement);\n }\n\n return this._fetchUrl(config.url).pipe(map(svgText => {\n // It is possible that the icon set was parsed and cached by an earlier request, so parsing\n // only needs to occur if the cache is yet unset.\n if (!config.svgElement) {\n config.svgElement = this._svgElementFromString(svgText);\n }\n\n return config.svgElement;\n }));\n }\n\n /**\n * Creates a DOM element from the given SVG string, and adds default attributes.\n */\n private _createSvgElementForSingleIcon(responseText: string): SVGElement {\n const svg = this._svgElementFromString(responseText);\n this._setSvgAttributes(svg);\n return svg;\n }\n\n /**\n * Searches the cached element of the given SvgIconConfig for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n private _extractSvgIconFromSet(iconSet: SVGElement, iconName: string): SVGElement | null {\n const iconSource = iconSet.querySelector('#' + iconName);\n\n if (!iconSource) {\n return null;\n }\n\n // Clone the element and remove the ID to prevent multiple elements from being added\n // to the page with the same ID.\n const iconElement = iconSource.cloneNode(true) as Element;\n iconElement.removeAttribute('id');\n\n // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as\n // the content of a new <svg> node.\n if (iconElement.nodeName.toLowerCase() === 'svg') {\n return this._setSvgAttributes(iconElement as SVGElement);\n }\n\n // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note\n // that the same could be achieved by referring to it via <use href=\"#id\">, however the <use>\n // tag is problematic on Firefox, because it needs to include the current page path.\n if (iconElement.nodeName.toLowerCase() === 'symbol') {\n return this._setSvgAttributes(this._toSvgElement(iconElement));\n }\n\n // createElement('SVG') doesn't work as expected; the DOM ends up with\n // the correct nodes, but the SVG content doesn't render. Instead we\n // have to create an empty SVG node using innerHTML and append its content.\n // Elements created using DOMParser.parseFromString have the same problem.\n // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display\n const svg = this._svgElementFromString('<svg></svg>');\n // Clone the node so we don't remove it from the parent icon set element.\n svg.appendChild(iconElement);\n\n return this._setSvgAttributes(svg);\n }\n\n /**\n * Creates a DOM element from the given SVG string.\n */\n private _svgElementFromString(str: string): SVGElement {\n const div = this._document.createElement('DIV');\n div.innerHTML = str;\n const svg = div.querySelector('svg') as SVGElement;\n\n if (!svg) {\n throw Error('<svg> tag not found');\n }\n\n return svg;\n }\n\n /**\n * Converts an element into an SVG node by cloning all of its children.\n */\n private _toSvgElement(element: Element): SVGElement {\n let svg = this._svgElementFromString('<svg></svg>');\n\n for (let i = 0; i < element.childNodes.length; i++) {\n if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {\n svg.appendChild(element.childNodes[i].cloneNode(true));\n }\n }\n\n return svg;\n }\n\n /**\n * Sets the default attributes for an SVG element to be used as an icon.\n */\n private _setSvgAttributes(svg: SVGElement): SVGElement {\n svg.setAttribute('fit', '');\n svg.setAttribute('height', '100%');\n svg.setAttribute('width', '100%');\n svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.\n return svg;\n }\n\n /**\n * Returns an Observable which produces the string contents of the given URL. Results may be\n * cached, so future calls with the same URL may not cause another HTTP request.\n */\n private _fetchUrl(safeUrl: SafeResourceUrl | null): Observable<string> {\n if (!this._httpClient) {\n throw getMatIconNoHttpProviderError();\n }\n\n if (safeUrl == null) {\n throw Error(`Cannot fetch icon from URL \"${safeUrl}\".`);\n }\n\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n\n // Store in-progress fetches to avoid sending a duplicate request for a URL when there is\n // already a request in progress for that URL. It's necessary to call share() on the\n // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.\n const inProgressFetch = this._inProgressUrlFetches.get(url);\n\n if (inProgressFetch) {\n return inProgressFetch;\n }\n\n // TODO(jelbourn): for some reason, the `finalize` operator \"loses\" the generic type on the\n // Observable. Figure out why and fix it.\n const req = this._httpClient.get(url, {responseType: 'text'}).pipe(\n finalize(() => this._inProgressUrlFetches.delete(url)),\n share(),\n );\n\n this._inProgressUrlFetches.set(url, req);\n return req;\n }\n\n /**\n * Registers an icon config by name in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param iconName Name under which to register the config.\n * @param config Config to be registered.\n */\n private _addSvgIconConfig(namespace: string, iconName: string, config: SvgIconConfig): this {\n this._svgIconConfigs.set(iconKey(namespace, iconName), config);\n return this;\n }\n\n /**\n * Registers an icon set config in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param config Config to be registered.\n */\n private _addSvgIconSetConfig(namespace: string, config: SvgIconConfig): this {\n const configNamespace = this._iconSetConfigs.get(namespace);\n\n if (configNamespace) {\n configNamespace.push(config);\n } else {\n this._iconSetConfigs.set(namespace, [config]);\n }\n\n return this;\n }\n}\n\n/** @docs-private */\nexport function ICON_REGISTRY_PROVIDER_FACTORY(\n parentRegistry: MatIconRegistry,\n httpClient: HttpClient,\n sanitizer: DomSanitizer,\n document?: any) {\n return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document);\n}\n\n/** @docs-private */\nexport const ICON_REGISTRY_PROVIDER = {\n // If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.\n provide: MatIconRegistry,\n deps: [\n [new Optional(), new SkipSelf(), MatIconRegistry],\n [new Optional(), HttpClient],\n DomSanitizer,\n [new Optional(), DOCUMENT as InjectionToken<any>],\n ],\n useFactory: ICON_REGISTRY_PROVIDER_FACTORY,\n};\n\n/** Clones an SVGElement while preserving type information. */\nfunction cloneSvg(svg: SVGElement): SVGElement {\n return svg.cloneNode(true) as SVGElement;\n}\n\n/** Returns the cache key to use for an icon namespace and name. */\nfunction iconKey(namespace: string, name: string) {\n return namespace + ':' + name;\n}\n"],"names":["observableOf","observableThrow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AE4BA,AAAA,SAAgB,2BAA2B,CAAC,QAAgB,EAA5D;IACE,OAAO,KAAK,CAAC,CAAf,mCAAA,EAAqD,QAAQ,CAA7D,CAAA,CAAgE,CAAC,CAAC;CACjE;;;;;;;AAQD,AAAA,SAAgB,6BAA6B,GAA7C;IACE,OAAO,KAAK,CAAC,0EAA0E;QAC1E,wEAAwE;QACxE,cAAc,CAAC,CAAC;CAC9B;;;;;;;AAQD,AAAA,SAAgB,kCAAkC,CAAC,GAAoB,EAAvE;IACE,OAAO,KAAK,CAAC,CAAf,sEAAA,CAAuF;QACxE,CAAf,+CAAA,EAAiE,GAAG,CAApE,EAAA,CAAwE,CAAC,CAAC;CACzE;;;;;;;AAOD,AAAA,SAAgB,sCAAsC,CAAC,OAAiB,EAAxE;IACE,OAAO,KAAK,CAAC,CAAf,wEAAA,CAAyF;QAC1E,CAAf,+CAAA,EAAiE,OAAO,CAAxE,EAAA,CAA4E,CAAC,CAAC;CAC7E;;;;;AAOD,MAAM,aAAa,CAAnB;;;;IAME,WAAF,CAAc,IAAkC,EAAhD;;;QAGI,IAAI,CAAC,CAAC,oBAAC,IAAI,IAAS,QAAQ,EAAE;YAC5B,IAAI,CAAC,UAAU,sBAAG,IAAI,EAAc,CAAC;SACtC;aAAM;YACL,IAAI,CAAC,GAAG,sBAAG,IAAI,EAAmB,CAAC;SACpC;KACF;CACF;;;;;;;;AAUD,AAAA,MAAa,eAAe,CAA5B;;;;;;IA8BE,WAAF,CACwB,WAAuB,EACnC,UAAwB,EACF,QAAa,EAH/C;QACwB,IAAxB,CAAA,WAAmC,GAAX,WAAW,CAAY;QACnC,IAAZ,CAAA,UAAsB,GAAV,UAAU,CAAc;;;;QA1B1B,IAAV,CAAA,eA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CAyJA,CAAA;AAKA,OAAA,CAAA,cAAA,GAAA;;;IA7CA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;IAUA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;CAGA,CAAA;;;;;;ADzIA,MAAa,aAAa,CAA1B;;;IALA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,eAAe,CAAC;gBAC1B,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;gBACnC,YAAY,EAAE,CAAC,OAAO,CAAC;aACxB,EAAD,EAAA;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"icon.js","sources":["../../../src/lib/icon/icon-module.ts","../../../src/lib/icon/icon.ts","../../../src/lib/icon/icon-registry.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 {MatCommonModule} from '@angular/material/core';\nimport {MatIcon} from './icon';\n\n\n@NgModule({\n imports: [MatCommonModule],\n exports: [MatIcon, MatCommonModule],\n declarations: [MatIcon],\n})\nexport class MatIconModule {}\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 {take} from 'rxjs/operators';\nimport {\n Attribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n ViewEncapsulation,\n Optional,\n InjectionToken,\n inject,\n Inject,\n OnDestroy,\n AfterViewChecked,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {CanColor, CanColorCtor, mixinColor} from '@angular/material/core';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {MatIconRegistry} from './icon-registry';\n\n\n// Boilerplate for applying mixins to MatIcon.\n/** @docs-private */\nexport class MatIconBase {\n constructor(public _elementRef: ElementRef) {}\n}\nexport const _MatIconMixinBase: CanColorCtor & typeof MatIconBase =\n mixinColor(MatIconBase);\n\n/**\n * Injection token used to provide the current location to `MatIcon`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nexport const MAT_ICON_LOCATION = new InjectionToken<MatIconLocation>('mat-icon-location', {\n providedIn: 'root',\n factory: MAT_ICON_LOCATION_FACTORY\n});\n\n/**\n * Stubbed out location for `MatIcon`.\n * @docs-private\n */\nexport interface MatIconLocation {\n getPathname: () => string;\n}\n\n/** @docs-private */\nexport function MAT_ICON_LOCATION_FACTORY(): MatIconLocation {\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/** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */\nconst funcIriAttributes = [\n 'clip-path',\n 'color-profile',\n 'src',\n 'cursor',\n 'fill',\n 'filter',\n 'marker',\n 'marker-start',\n 'marker-mid',\n 'marker-end',\n 'mask',\n 'stroke'\n];\n\n/** Selector that can be used to find all elements that are using a `FuncIRI`. */\nconst funcIriAttributeSelector = funcIriAttributes.map(attr => `[${attr}]`).join(', ');\n\n/** Regex that can be used to extract the id out of a FuncIRI. */\nconst funcIriPattern = /^url\\(['\"]?#(.*?)['\"]?\\)$/;\n\n/**\n * Component to display an icon. It can be used in the following ways:\n *\n * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the\n * addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of\n * MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format\n * \"[namespace]:[name]\", if not the value will be the name of an icon in the default namespace.\n * Examples:\n * `<mat-icon svgIcon=\"left-arrow\"></mat-icon>\n * <mat-icon svgIcon=\"animals:cat\"></mat-icon>`\n *\n * - Use a font ligature as an icon by putting the ligature text in the content of the `<mat-icon>`\n * component. By default the Material icons font is used as described at\n * http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an\n * alternate font by setting the fontSet input to either the CSS class to apply to use the\n * desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.\n * Examples:\n * `<mat-icon>home</mat-icon>\n * <mat-icon fontSet=\"myfont\">sun</mat-icon>`\n *\n * - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the\n * font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a\n * CSS class which causes the glyph to be displayed via a :before selector, as in\n * https://fortawesome.github.io/Font-Awesome/examples/\n * Example:\n * `<mat-icon fontSet=\"fa\" fontIcon=\"alarm\"></mat-icon>`\n */\n@Component({\n moduleId: module.id,\n template: '<ng-content></ng-content>',\n selector: 'mat-icon',\n exportAs: 'matIcon',\n styleUrls: ['icon.css'],\n inputs: ['color'],\n host: {\n 'role': 'img',\n 'class': 'mat-icon',\n '[class.mat-icon-inline]': 'inline',\n '[class.mat-icon-no-color]': 'color !== \"primary\" && color !== \"accent\" && color !== \"warn\"',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatIcon extends _MatIconMixinBase implements OnChanges, OnInit, AfterViewChecked,\n CanColor, OnDestroy {\n\n /**\n * Whether the icon should be inlined, automatically sizing the icon to match the font size of\n * the element the icon is contained in.\n */\n @Input()\n get inline(): boolean {\n return this._inline;\n }\n set inline(inline: boolean) {\n this._inline = coerceBooleanProperty(inline);\n }\n private _inline: boolean = false;\n\n /** Name of the icon in the SVG icon set. */\n @Input() svgIcon: string;\n\n /** Font set that the icon is a part of. */\n @Input()\n get fontSet(): string { return this._fontSet; }\n set fontSet(value: string) {\n this._fontSet = this._cleanupFontValue(value);\n }\n private _fontSet: string;\n\n /** Name of an icon within a font set. */\n @Input()\n get fontIcon(): string { return this._fontIcon; }\n set fontIcon(value: string) {\n this._fontIcon = this._cleanupFontValue(value);\n }\n private _fontIcon: string;\n\n private _previousFontSetClass: string;\n private _previousFontIconClass: string;\n\n /** Keeps track of the current page path. */\n private _previousPath?: string;\n\n /** Keeps track of the elements and attributes that we've prefixed with the current path. */\n private _elementsWithExternalReferences?: Map<Element, {name: string, value: string}[]>;\n\n constructor(\n elementRef: ElementRef<HTMLElement>,\n private _iconRegistry: MatIconRegistry,\n @Attribute('aria-hidden') ariaHidden: string,\n /**\n * @deprecated `location` parameter to be made required.\n * @breaking-change 8.0.0\n */\n @Optional() @Inject(MAT_ICON_LOCATION) private _location?: MatIconLocation) {\n super(elementRef);\n\n // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is\n // the right thing to do for the majority of icon use-cases.\n if (!ariaHidden) {\n elementRef.nativeElement.setAttribute('aria-hidden', 'true');\n }\n }\n\n /**\n * Splits an svgIcon binding value into its icon set and icon name components.\n * Returns a 2-element array of [(icon set), (icon name)].\n * The separator for the two fields is ':'. If there is no separator, an empty\n * string is returned for the icon set and the entire value is returned for\n * the icon name. If the argument is falsy, returns an array of two empty strings.\n * Throws an error if the name contains two or more ':' separators.\n * Examples:\n * `'social:cake' -> ['social', 'cake']\n * 'penguin' -> ['', 'penguin']\n * null -> ['', '']\n * 'a:b:c' -> (throws Error)`\n */\n private _splitIconName(iconName: string): [string, string] {\n if (!iconName) {\n return ['', ''];\n }\n const parts = iconName.split(':');\n switch (parts.length) {\n case 1: return ['', parts[0]]; // Use default namespace.\n case 2: return <[string, string]>parts;\n default: throw Error(`Invalid icon name: \"${iconName}\"`);\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Only update the inline SVG icon if the inputs changed, to avoid unnecessary DOM operations.\n if (changes.svgIcon) {\n if (this.svgIcon) {\n const [namespace, iconName] = this._splitIconName(this.svgIcon);\n\n this._iconRegistry.getNamedSvgIcon(iconName, namespace).pipe(take(1)).subscribe(\n svg => this._setSvgElement(svg),\n (err: Error) => console.log(`Error retrieving icon: ${err.message}`)\n );\n } else {\n this._clearSvgElement();\n }\n }\n\n if (this._usingFontIcon()) {\n this._updateFontIconClasses();\n }\n }\n\n ngOnInit() {\n // Update font classes because ngOnChanges won't be called if none of the inputs are present,\n // e.g. <mat-icon>arrow</mat-icon> In this case we need to add a CSS class for the default font.\n if (this._usingFontIcon()) {\n this._updateFontIconClasses();\n }\n }\n\n ngAfterViewChecked() {\n const cachedElements = this._elementsWithExternalReferences;\n\n if (cachedElements && this._location && cachedElements.size) {\n const newPath = this._location.getPathname();\n\n // We need to check whether the URL has changed on each change detection since\n // the browser doesn't have an API that will let us react on link clicks and\n // we can't depend on the Angular router. The references need to be updated,\n // because while most browsers don't care whether the URL is correct after\n // the first render, Safari will break if the user navigates to a different\n // page and the SVG isn't re-rendered.\n if (newPath !== this._previousPath) {\n this._previousPath = newPath;\n this._prependPathToReferences(newPath);\n }\n }\n }\n\n ngOnDestroy() {\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n }\n\n private _usingFontIcon(): boolean {\n return !this.svgIcon;\n }\n\n private _setSvgElement(svg: SVGElement) {\n this._clearSvgElement();\n\n // Workaround for IE11 and Edge ignoring `style` tags inside dynamically-created SVGs.\n // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10898469/\n // Do this before inserting the element into the DOM, in order to avoid a style recalculation.\n const styleTags = svg.querySelectorAll('style') as NodeListOf<HTMLStyleElement>;\n\n for (let i = 0; i < styleTags.length; i++) {\n styleTags[i].textContent += ' ';\n }\n\n // Note: we do this fix here, rather than the icon registry, because the\n // references have to point to the URL at the time that the icon was created.\n if (this._location) {\n const path = this._location.getPathname();\n this._previousPath = path;\n this._cacheChildrenWithExternalReferences(svg);\n this._prependPathToReferences(path);\n }\n\n this._elementRef.nativeElement.appendChild(svg);\n }\n\n private _clearSvgElement() {\n const layoutElement: HTMLElement = this._elementRef.nativeElement;\n let childCount = layoutElement.childNodes.length;\n\n if (this._elementsWithExternalReferences) {\n this._elementsWithExternalReferences.clear();\n }\n\n // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that\n // we can't use innerHTML, because IE will throw if the element has a data binding.\n while (childCount--) {\n const child = layoutElement.childNodes[childCount];\n\n // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid\n // of any loose text nodes, as well as any SVG elements in order to remove any old icons.\n if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {\n layoutElement.removeChild(child);\n }\n }\n }\n\n private _updateFontIconClasses() {\n if (!this._usingFontIcon()) {\n return;\n }\n\n const elem: HTMLElement = this._elementRef.nativeElement;\n const fontSetClass = this.fontSet ?\n this._iconRegistry.classNameForFontAlias(this.fontSet) :\n this._iconRegistry.getDefaultFontSetClass();\n\n if (fontSetClass != this._previousFontSetClass) {\n if (this._previousFontSetClass) {\n elem.classList.remove(this._previousFontSetClass);\n }\n if (fontSetClass) {\n elem.classList.add(fontSetClass);\n }\n this._previousFontSetClass = fontSetClass;\n }\n\n if (this.fontIcon != this._previousFontIconClass) {\n if (this._previousFontIconClass) {\n elem.classList.remove(this._previousFontIconClass);\n }\n if (this.fontIcon) {\n elem.classList.add(this.fontIcon);\n }\n this._previousFontIconClass = this.fontIcon;\n }\n }\n\n /**\n * Cleans up a value to be used as a fontIcon or fontSet.\n * Since the value ends up being assigned as a CSS class, we\n * have to trim the value and omit space-separated values.\n */\n private _cleanupFontValue(value: string) {\n return typeof value === 'string' ? value.trim().split(' ')[0] : value;\n }\n\n /**\n * Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`\n * reference. This is required because WebKit browsers require references to be prefixed with\n * the current path, if the page has a `base` tag.\n */\n private _prependPathToReferences(path: string) {\n const elements = this._elementsWithExternalReferences;\n\n if (elements) {\n elements.forEach((attrs, element) => {\n attrs.forEach(attr => {\n element.setAttribute(attr.name, `url('${path}#${attr.value}')`);\n });\n });\n }\n }\n\n /**\n * Caches the children of an SVG element that have `url()`\n * references that we need to prefix with the current path.\n */\n private _cacheChildrenWithExternalReferences(element: SVGElement) {\n const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);\n const elements = this._elementsWithExternalReferences =\n this._elementsWithExternalReferences || new Map();\n\n for (let i = 0; i < elementsWithFuncIri.length; i++) {\n funcIriAttributes.forEach(attr => {\n const elementWithReference = elementsWithFuncIri[i];\n const value = elementWithReference.getAttribute(attr);\n const match = value ? value.match(funcIriPattern) : null;\n\n if (match) {\n let attributes = elements.get(elementWithReference);\n\n if (!attributes) {\n attributes = [];\n elements.set(elementWithReference, attributes);\n }\n\n attributes!.push({name: attr, value: match[1]});\n }\n });\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 {DOCUMENT} from '@angular/common';\nimport {HttpClient, HttpErrorResponse} from '@angular/common/http';\nimport {\n Inject,\n Injectable,\n InjectionToken,\n Optional,\n SecurityContext,\n SkipSelf,\n OnDestroy,\n} from '@angular/core';\nimport {DomSanitizer, SafeResourceUrl, SafeHtml} from '@angular/platform-browser';\nimport {forkJoin, Observable, of as observableOf, throwError as observableThrow} from 'rxjs';\nimport {catchError, finalize, map, share, tap} from 'rxjs/operators';\n\n\n/**\n * Returns an exception to be thrown in the case when attempting to\n * load an icon with a name that cannot be found.\n * @docs-private\n */\nexport function getMatIconNameNotFoundError(iconName: string): Error {\n return Error(`Unable to find icon with the name \"${iconName}\"`);\n}\n\n\n/**\n * Returns an exception to be thrown when the consumer attempts to use\n * `<mat-icon>` without including @angular/http.\n * @docs-private\n */\nexport function getMatIconNoHttpProviderError(): Error {\n return Error('Could not find HttpClient provider for use with Angular Material icons. ' +\n 'Please include the HttpClientModule from @angular/common/http in your ' +\n 'app imports.');\n}\n\n\n/**\n * Returns an exception to be thrown when a URL couldn't be sanitized.\n * @param url URL that was attempted to be sanitized.\n * @docs-private\n */\nexport function getMatIconFailedToSanitizeUrlError(url: SafeResourceUrl): Error {\n return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL ` +\n `via Angular's DomSanitizer. Attempted URL was \"${url}\".`);\n}\n\n/**\n * Returns an exception to be thrown when a HTML string couldn't be sanitized.\n * @param literal HTML that was attempted to be sanitized.\n * @docs-private\n */\nexport function getMatIconFailedToSanitizeLiteralError(literal: SafeHtml): Error {\n return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`);\n}\n\n\n/**\n * Configuration for an icon, including the URL and possibly the cached SVG element.\n * @docs-private\n */\nclass SvgIconConfig {\n url: SafeResourceUrl | null;\n svgElement: SVGElement | null;\n\n constructor(url: SafeResourceUrl);\n constructor(svgElement: SVGElement);\n constructor(data: SafeResourceUrl | SVGElement) {\n // Note that we can't use `instanceof SVGElement` here,\n // because it'll break during server-side rendering.\n if (!!(data as any).nodeName) {\n this.svgElement = data as SVGElement;\n } else {\n this.url = data as SafeResourceUrl;\n }\n }\n}\n\n/**\n * Service to register and display icons used by the `<mat-icon>` component.\n * - Registers icon URLs by namespace and name.\n * - Registers icon set URLs by namespace.\n * - Registers aliases for CSS classes, for use with icon fonts.\n * - Loads icons from URLs and extracts individual icons from icon sets.\n */\n@Injectable({providedIn: 'root'})\nexport class MatIconRegistry implements OnDestroy {\n private _document: Document;\n\n /**\n * URLs and cached SVG elements for individual icons. Keys are of the format \"[namespace]:[icon]\".\n */\n private _svgIconConfigs = new Map<string, SvgIconConfig>();\n\n /**\n * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.\n * Multiple icon sets can be registered under the same namespace.\n */\n private _iconSetConfigs = new Map<string, SvgIconConfig[]>();\n\n /** Cache for icons loaded by direct URLs. */\n private _cachedIconsByUrl = new Map<string, SVGElement>();\n\n /** In-progress icon fetches. Used to coalesce multiple requests to the same URL. */\n private _inProgressUrlFetches = new Map<string, Observable<string>>();\n\n /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n private _fontCssClassesByAlias = new Map<string, string>();\n\n /**\n * The CSS class to apply when an `<mat-icon>` component has no icon name, url, or font specified.\n * The default 'material-icons' value assumes that the material icon font has been loaded as\n * described at http://google.github.io/material-design-icons/#icon-font-for-the-web\n */\n private _defaultFontSetClass = 'material-icons';\n\n constructor(\n @Optional() private _httpClient: HttpClient,\n private _sanitizer: DomSanitizer,\n @Optional() @Inject(DOCUMENT) document: any) {\n this._document = document;\n }\n\n /**\n * Registers an icon by URL in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIcon(iconName: string, url: SafeResourceUrl): this {\n return this.addSvgIconInNamespace('', iconName, url);\n }\n\n /**\n * Registers an icon using an HTML string in the default namespace.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteral(iconName: string, literal: SafeHtml): this {\n return this.addSvgIconLiteralInNamespace('', iconName, literal);\n }\n\n /**\n * Registers an icon by URL in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param url\n */\n addSvgIconInNamespace(namespace: string, iconName: string, url: SafeResourceUrl): this {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url));\n }\n\n /**\n * Registers an icon using an HTML string in the specified namespace.\n * @param namespace Namespace in which the icon should be registered.\n * @param iconName Name under which the icon should be registered.\n * @param literal SVG source of the icon.\n */\n addSvgIconLiteralInNamespace(namespace: string, iconName: string, literal: SafeHtml): this {\n const sanitizedLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!sanitizedLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n const svgElement = this._createSvgElementForSingleIcon(sanitizedLiteral);\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(svgElement));\n }\n\n /**\n * Registers an icon set by URL in the default namespace.\n * @param url\n */\n addSvgIconSet(url: SafeResourceUrl): this {\n return this.addSvgIconSetInNamespace('', url);\n }\n\n /**\n * Registers an icon set using an HTML string in the default namespace.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteral(literal: SafeHtml): this {\n return this.addSvgIconSetLiteralInNamespace('', literal);\n }\n\n /**\n * Registers an icon set by URL in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param url\n */\n addSvgIconSetInNamespace(namespace: string, url: SafeResourceUrl): this {\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url));\n }\n\n /**\n * Registers an icon set using an HTML string in the specified namespace.\n * @param namespace Namespace in which to register the icon set.\n * @param literal SVG source of the icon set.\n */\n addSvgIconSetLiteralInNamespace(namespace: string, literal: SafeHtml): this {\n const sanitizedLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!sanitizedLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n const svgElement = this._svgElementFromString(sanitizedLiteral);\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(svgElement));\n }\n\n /**\n * Defines an alias for a CSS class name to be used for icon fonts. Creating an matIcon\n * component with the alias as the fontSet input will cause the class name to be applied\n * to the `<mat-icon>` element.\n *\n * @param alias Alias for the font.\n * @param className Class name override to be used instead of the alias.\n */\n registerFontClassAlias(alias: string, className: string = alias): this {\n this._fontCssClassesByAlias.set(alias, className);\n return this;\n }\n\n /**\n * Returns the CSS class name associated with the alias by a previous call to\n * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.\n */\n classNameForFontAlias(alias: string): string {\n return this._fontCssClassesByAlias.get(alias) || alias;\n }\n\n /**\n * Sets the CSS class name to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n *\n * @param className\n */\n setDefaultFontSetClass(className: string): this {\n this._defaultFontSetClass = className;\n return this;\n }\n\n /**\n * Returns the CSS class name to be used for icon fonts when an `<mat-icon>` component does not\n * have a fontSet input value, and is not loading an icon by name or URL.\n */\n getDefaultFontSetClass(): string {\n return this._defaultFontSetClass;\n }\n\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.\n * The response from the URL may be cached so this will not always cause an HTTP request, but\n * the produced element will always be a new copy of the originally fetched icon. (That is,\n * it will not contain any modifications made to elements previously returned).\n *\n * @param safeUrl URL from which to fetch the SVG icon.\n */\n getSvgIconFromUrl(safeUrl: SafeResourceUrl): Observable<SVGElement> {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n\n const cachedIcon = this._cachedIconsByUrl.get(url);\n\n if (cachedIcon) {\n return observableOf(cloneSvg(cachedIcon));\n }\n\n return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl)).pipe(\n tap(svg => this._cachedIconsByUrl.set(url!, svg)),\n map(svg => cloneSvg(svg)),\n );\n }\n\n /**\n * Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name\n * and namespace. The icon must have been previously registered with addIcon or addIconSet;\n * if not, the Observable will throw an error.\n *\n * @param name Name of the icon to be retrieved.\n * @param namespace Namespace in which to look for the icon.\n */\n getNamedSvgIcon(name: string, namespace: string = ''): Observable<SVGElement> {\n // Return (copy of) cached icon if possible.\n const key = iconKey(namespace, name);\n const config = this._svgIconConfigs.get(key);\n\n if (config) {\n return this._getSvgFromConfig(config);\n }\n\n // See if we have any icon sets registered for the namespace.\n const iconSetConfigs = this._iconSetConfigs.get(namespace);\n\n if (iconSetConfigs) {\n return this._getSvgFromIconSetConfigs(name, iconSetConfigs);\n }\n\n return observableThrow(getMatIconNameNotFoundError(key));\n }\n\n ngOnDestroy() {\n this._svgIconConfigs.clear();\n this._iconSetConfigs.clear();\n this._cachedIconsByUrl.clear();\n }\n\n /**\n * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.\n */\n private _getSvgFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n if (config.svgElement) {\n // We already have the SVG element for this icon, return a copy.\n return observableOf(cloneSvg(config.svgElement));\n } else {\n // Fetch the icon from the config's URL, cache it, and return a copy.\n return this._loadSvgIconFromConfig(config).pipe(\n tap(svg => config.svgElement = svg),\n map(svg => cloneSvg(svg)),\n );\n }\n }\n\n /**\n * Attempts to find an icon with the specified name in any of the SVG icon sets.\n * First searches the available cached icons for a nested element with a matching name, and\n * if found copies the element to a new `<svg>` element. If not found, fetches all icon sets\n * that have not been cached, and searches again after all fetches are completed.\n * The returned Observable produces the SVG element if possible, and throws\n * an error if no icon with the specified name can be found.\n */\n private _getSvgFromIconSetConfigs(name: string, iconSetConfigs: SvgIconConfig[]):\n Observable<SVGElement> {\n // For all the icon set SVG elements we've fetched, see if any contain an icon with the\n // requested name.\n const namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n if (namedIcon) {\n // We could cache namedIcon in _svgIconConfigs, but since we have to make a copy every\n // time anyway, there's probably not much advantage compared to just always extracting\n // it from the icon set.\n return observableOf(namedIcon);\n }\n\n // Not found in any cached icon sets. If there are icon sets with URLs that we haven't\n // fetched, fetch them now and look for iconName in the results.\n const iconSetFetchRequests: Observable<SVGElement | null>[] = iconSetConfigs\n .filter(iconSetConfig => !iconSetConfig.svgElement)\n .map(iconSetConfig => {\n return this._loadSvgIconSetFromConfig(iconSetConfig).pipe(\n catchError((err: HttpErrorResponse): Observable<SVGElement | null> => {\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);\n\n // Swallow errors fetching individual URLs so the\n // combined Observable won't necessarily fail.\n console.error(`Loading icon set URL: ${url} failed: ${err.message}`);\n return observableOf(null);\n })\n );\n });\n\n // Fetch all the icon set URLs. When the requests complete, every IconSet should have a\n // cached SVG element (unless the request failed), and we can check again for the icon.\n return forkJoin(iconSetFetchRequests).pipe(map(() => {\n const foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n if (!foundIcon) {\n throw getMatIconNameNotFoundError(name);\n }\n\n return foundIcon;\n }));\n }\n\n /**\n * Searches the cached SVG elements for the given icon sets for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n private _extractIconWithNameFromAnySet(iconName: string, iconSetConfigs: SvgIconConfig[]):\n SVGElement | null {\n // Iterate backwards, so icon sets added later have precedence.\n for (let i = iconSetConfigs.length - 1; i >= 0; i--) {\n const config = iconSetConfigs[i];\n if (config.svgElement) {\n const foundIcon = this._extractSvgIconFromSet(config.svgElement, iconName);\n if (foundIcon) {\n return foundIcon;\n }\n }\n }\n return null;\n }\n\n /**\n * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n */\n private _loadSvgIconFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n return this._fetchUrl(config.url)\n .pipe(map(svgText => this._createSvgElementForSingleIcon(svgText)));\n }\n\n /**\n * Loads the content of the icon set URL specified in the SvgIconConfig and creates an SVG element\n * from it.\n */\n private _loadSvgIconSetFromConfig(config: SvgIconConfig): Observable<SVGElement> {\n // If the SVG for this icon set has already been parsed, do nothing.\n if (config.svgElement) {\n return observableOf(config.svgElement);\n }\n\n return this._fetchUrl(config.url).pipe(map(svgText => {\n // It is possible that the icon set was parsed and cached by an earlier request, so parsing\n // only needs to occur if the cache is yet unset.\n if (!config.svgElement) {\n config.svgElement = this._svgElementFromString(svgText);\n }\n\n return config.svgElement;\n }));\n }\n\n /**\n * Creates a DOM element from the given SVG string, and adds default attributes.\n */\n private _createSvgElementForSingleIcon(responseText: string): SVGElement {\n const svg = this._svgElementFromString(responseText);\n this._setSvgAttributes(svg);\n return svg;\n }\n\n /**\n * Searches the cached element of the given SvgIconConfig for a nested icon element whose \"id\"\n * tag matches the specified name. If found, copies the nested element to a new SVG element and\n * returns it. Returns null if no matching element is found.\n */\n private _extractSvgIconFromSet(iconSet: SVGElement, iconName: string): SVGElement | null {\n const iconSource = iconSet.querySelector('#' + iconName);\n\n if (!iconSource) {\n return null;\n }\n\n // Clone the element and remove the ID to prevent multiple elements from being added\n // to the page with the same ID.\n const iconElement = iconSource.cloneNode(true) as Element;\n iconElement.removeAttribute('id');\n\n // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as\n // the content of a new <svg> node.\n if (iconElement.nodeName.toLowerCase() === 'svg') {\n return this._setSvgAttributes(iconElement as SVGElement);\n }\n\n // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note\n // that the same could be achieved by referring to it via <use href=\"#id\">, however the <use>\n // tag is problematic on Firefox, because it needs to include the current page path.\n if (iconElement.nodeName.toLowerCase() === 'symbol') {\n return this._setSvgAttributes(this._toSvgElement(iconElement));\n }\n\n // createElement('SVG') doesn't work as expected; the DOM ends up with\n // the correct nodes, but the SVG content doesn't render. Instead we\n // have to create an empty SVG node using innerHTML and append its content.\n // Elements created using DOMParser.parseFromString have the same problem.\n // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display\n const svg = this._svgElementFromString('<svg></svg>');\n // Clone the node so we don't remove it from the parent icon set element.\n svg.appendChild(iconElement);\n\n return this._setSvgAttributes(svg);\n }\n\n /**\n * Creates a DOM element from the given SVG string.\n */\n private _svgElementFromString(str: string): SVGElement {\n const div = this._document.createElement('DIV');\n div.innerHTML = str;\n const svg = div.querySelector('svg') as SVGElement;\n\n if (!svg) {\n throw Error('<svg> tag not found');\n }\n\n return svg;\n }\n\n /**\n * Converts an element into an SVG node by cloning all of its children.\n */\n private _toSvgElement(element: Element): SVGElement {\n let svg = this._svgElementFromString('<svg></svg>');\n\n for (let i = 0; i < element.childNodes.length; i++) {\n if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {\n svg.appendChild(element.childNodes[i].cloneNode(true));\n }\n }\n\n return svg;\n }\n\n /**\n * Sets the default attributes for an SVG element to be used as an icon.\n */\n private _setSvgAttributes(svg: SVGElement): SVGElement {\n svg.setAttribute('fit', '');\n svg.setAttribute('height', '100%');\n svg.setAttribute('width', '100%');\n svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.\n return svg;\n }\n\n /**\n * Returns an Observable which produces the string contents of the given URL. Results may be\n * cached, so future calls with the same URL may not cause another HTTP request.\n */\n private _fetchUrl(safeUrl: SafeResourceUrl | null): Observable<string> {\n if (!this._httpClient) {\n throw getMatIconNoHttpProviderError();\n }\n\n if (safeUrl == null) {\n throw Error(`Cannot fetch icon from URL \"${safeUrl}\".`);\n }\n\n const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n\n if (!url) {\n throw getMatIconFailedToSanitizeUrlError(safeUrl);\n }\n\n // Store in-progress fetches to avoid sending a duplicate request for a URL when there is\n // already a request in progress for that URL. It's necessary to call share() on the\n // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.\n const inProgressFetch = this._inProgressUrlFetches.get(url);\n\n if (inProgressFetch) {\n return inProgressFetch;\n }\n\n // TODO(jelbourn): for some reason, the `finalize` operator \"loses\" the generic type on the\n // Observable. Figure out why and fix it.\n const req = this._httpClient.get(url, {responseType: 'text'}).pipe(\n finalize(() => this._inProgressUrlFetches.delete(url)),\n share(),\n );\n\n this._inProgressUrlFetches.set(url, req);\n return req;\n }\n\n /**\n * Registers an icon config by name in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param iconName Name under which to register the config.\n * @param config Config to be registered.\n */\n private _addSvgIconConfig(namespace: string, iconName: string, config: SvgIconConfig): this {\n this._svgIconConfigs.set(iconKey(namespace, iconName), config);\n return this;\n }\n\n /**\n * Registers an icon set config in the specified namespace.\n * @param namespace Namespace in which to register the icon config.\n * @param config Config to be registered.\n */\n private _addSvgIconSetConfig(namespace: string, config: SvgIconConfig): this {\n const configNamespace = this._iconSetConfigs.get(namespace);\n\n if (configNamespace) {\n configNamespace.push(config);\n } else {\n this._iconSetConfigs.set(namespace, [config]);\n }\n\n return this;\n }\n}\n\n/** @docs-private */\nexport function ICON_REGISTRY_PROVIDER_FACTORY(\n parentRegistry: MatIconRegistry,\n httpClient: HttpClient,\n sanitizer: DomSanitizer,\n document?: any) {\n return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document);\n}\n\n/** @docs-private */\nexport const ICON_REGISTRY_PROVIDER = {\n // If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.\n provide: MatIconRegistry,\n deps: [\n [new Optional(), new SkipSelf(), MatIconRegistry],\n [new Optional(), HttpClient],\n DomSanitizer,\n [new Optional(), DOCUMENT as InjectionToken<any>],\n ],\n useFactory: ICON_REGISTRY_PROVIDER_FACTORY,\n};\n\n/** Clones an SVGElement while preserving type information. */\nfunction cloneSvg(svg: SVGElement): SVGElement {\n return svg.cloneNode(true) as SVGElement;\n}\n\n/** Returns the cache key to use for an icon namespace and name. */\nfunction iconKey(namespace: string, name: string) {\n return namespace + ':' + name;\n}\n"],"names":["observableOf","observableThrow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AE6BA,AAAA,SAAgB,2BAA2B,CAAC,QAAgB,EAA5D;IACE,OAAO,KAAK,CAAC,CAAf,mCAAA,EAAqD,QAAQ,CAA7D,CAAA,CAAgE,CAAC,CAAC;CACjE;;;;;;;AAQD,AAAA,SAAgB,6BAA6B,GAA7C;IACE,OAAO,KAAK,CAAC,0EAA0E;QAC1E,wEAAwE;QACxE,cAAc,CAAC,CAAC;CAC9B;;;;;;;AAQD,AAAA,SAAgB,kCAAkC,CAAC,GAAoB,EAAvE;IACE,OAAO,KAAK,CAAC,CAAf,sEAAA,CAAuF;QACxE,CAAf,+CAAA,EAAiE,GAAG,CAApE,EAAA,CAAwE,CAAC,CAAC;CACzE;;;;;;;AAOD,AAAA,SAAgB,sCAAsC,CAAC,OAAiB,EAAxE;IACE,OAAO,KAAK,CAAC,CAAf,wEAAA,CAAyF;QAC1E,CAAf,+CAAA,EAAiE,OAAO,CAAxE,EAAA,CAA4E,CAAC,CAAC;CAC7E;;;;;AAOD,MAAM,aAAa,CAAnB;;;;IAME,WAAF,CAAc,IAAkC,EAAhD;;;QAGI,IAAI,CAAC,CAAC,oBAAC,IAAI,IAAS,QAAQ,EAAE;YAC5B,IAAI,CAAC,UAAU,sB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AA;oBACA,MAAA,EAAA,KAAmB;oBACb,OAAN,EAAA,UAAA;oBACI,yBAAJ,EAAA,QAAA;oBACI,2BAAJ,EAAA,+DAAA;iBACA;gBACA,aAAA,EAAA,iBAAA,CAAiC,IAAjC;gBACA,eAAA,EAAA,uBAAA,CAAA,MAAA;aACA,EAAA,EAAA;CACA,CAAA;;;;;IAzHA,EAAA,IAAA,EAAE,MAAF,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,SAAA,EAAA,IAAA,EAAA,CAAA,aAAA,EAAA,EAAA,CAAA,EAAA;IAgBA,EAAA,IAAA,EAAQ,SAAR,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,CAAA,iBAAA,EAAA,EAAA,CAAA,EAAA;CA0JA,CAAA;AAKA,OAAA,CAAA,cAAA,GAAA;;;IA7CA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;IAUA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA;CAGA,CAAA;;;;;;AD1IA,MAAa,aAAa,CAA1B;;;IALA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,eAAe,CAAC;gBAC1B,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;gBACnC,YAAY,EAAE,CAAC,OAAO,CAAC;aACxB,EAAD,EAAA;;;;;;;;;;;;;;;"}
|
package/esm2015/input.js
CHANGED
|
@@ -381,14 +381,16 @@ class MatInput extends _MatInputMixinBase {
|
|
|
381
381
|
* Focuses the input.
|
|
382
382
|
* @return {?}
|
|
383
383
|
*/
|
|
384
|
-
focus() {
|
|
384
|
+
focus() {
|
|
385
|
+
this._elementRef.nativeElement.focus();
|
|
386
|
+
}
|
|
385
387
|
/**
|
|
386
388
|
* Callback for the cases where the focused state of the input changes.
|
|
387
389
|
* @param {?} isFocused
|
|
388
390
|
* @return {?}
|
|
389
391
|
*/
|
|
390
392
|
_focusChanged(isFocused) {
|
|
391
|
-
if (isFocused !== this.focused && !this.readonly) {
|
|
393
|
+
if (isFocused !== this.focused && (!this.readonly || !isFocused)) {
|
|
392
394
|
this.focused = isFocused;
|
|
393
395
|
this.stateChanges.next();
|
|
394
396
|
}
|
|
@@ -478,8 +480,10 @@ class MatInput extends _MatInputMixinBase {
|
|
|
478
480
|
const selectElement = (/** @type {?} */ (this._elementRef.nativeElement));
|
|
479
481
|
/** @type {?} */
|
|
480
482
|
const firstOption = selectElement.options[0];
|
|
481
|
-
|
|
482
|
-
|
|
483
|
+
// On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be
|
|
484
|
+
// -1 if the `value` is set to something, that isn't in the list of options, at a later point.
|
|
485
|
+
return this.focused || selectElement.multiple || !this.empty ||
|
|
486
|
+
!!(selectElement.selectedIndex > -1 && firstOption && firstOption.label);
|
|
483
487
|
}
|
|
484
488
|
else {
|
|
485
489
|
return this.focused || !this.empty;
|