@angular/material 20.0.0-next.0 → 20.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete/index.d.ts +92 -126
- package/autocomplete/testing/index.d.ts +6 -11
- package/badge/index.d.ts +8 -112
- package/badge/testing/index.d.ts +7 -8
- package/badge.d-49a8a74b.d.ts +98 -0
- package/bottom-sheet/index.d.ts +88 -103
- package/bottom-sheet/testing/index.d.ts +4 -6
- package/button/index.d.ts +10 -245
- package/button/testing/index.d.ts +6 -10
- package/button-toggle/index.d.ts +12 -285
- package/button-toggle/testing/index.d.ts +38 -37
- package/button-toggle.d-edc8acff.d.ts +257 -0
- package/card/index.d.ts +80 -117
- package/card/testing/index.d.ts +11 -15
- package/checkbox/index.d.ts +43 -104
- package/checkbox/testing/index.d.ts +6 -10
- package/chips/index.d.ts +599 -693
- package/chips/testing/index.d.ts +78 -93
- package/common-module.d-0e6515ae.d.ts +43 -0
- package/core/index.d.ts +50 -979
- package/core/testing/index.d.ts +3 -65
- package/date-adapter.d-c6835d41.d.ts +267 -0
- package/date-range-input-harness.d-549a9f7e.d.ts +278 -0
- package/datepicker/index.d.ts +1332 -1482
- package/datepicker/testing/index.d.ts +5 -287
- package/dialog/index.d.ts +59 -453
- package/dialog/testing/index.d.ts +22 -26
- package/dialog.d-57867441.d.ts +335 -0
- package/divider/index.d.ts +6 -11
- package/divider/testing/index.d.ts +2 -16
- package/divider-harness.d-d34fede4.d.ts +14 -0
- package/error-options.d-448d9046.d.ts +17 -0
- package/expansion/index.d.ts +139 -190
- package/expansion/testing/index.d.ts +25 -31
- package/fesm2022/autocomplete/testing.mjs +2 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +53 -32
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +14 -17
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +13 -15
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +22 -15
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +14 -395
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs +49 -51
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +32 -73
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +51 -46
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/common-module-2d64df09.mjs +42 -0
- package/fesm2022/common-module-2d64df09.mjs.map +1 -0
- package/fesm2022/core/testing.mjs +3 -76
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +38 -1598
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/date-formats-b618acb8.mjs +190 -0
- package/fesm2022/date-formats-b618acb8.mjs.map +1 -0
- package/fesm2022/date-range-input-harness-ee47cdb0.mjs +467 -0
- package/fesm2022/date-range-input-harness-ee47cdb0.mjs.map +1 -0
- package/fesm2022/datepicker/testing.mjs +5 -465
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +159 -128
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +12 -1
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +14 -895
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs +2 -17
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider-harness-3394f29a.mjs +18 -0
- package/fesm2022/divider-harness-3394f29a.mjs.map +1 -0
- package/fesm2022/divider.mjs +10 -12
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/error-options-4a00765e.mjs +29 -0
- package/fesm2022/error-options-4a00765e.mjs.map +1 -0
- package/fesm2022/error-state-8f4ce1af.mjs +37 -0
- package/fesm2022/error-state-8f4ce1af.mjs.map +1 -0
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +30 -32
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs +2 -10
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs +7 -6
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/form-field-6d755764.mjs +1076 -0
- package/fesm2022/form-field-6d755764.mjs.map +1 -0
- package/fesm2022/form-field-control-harness-af6fd278.mjs +11 -0
- package/fesm2022/form-field-control-harness-af6fd278.mjs.map +1 -0
- package/fesm2022/form-field.mjs +14 -1110
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +30 -173
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +12 -12
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon-button-47f1b5d9.mjs +248 -0
- package/fesm2022/icon-button-47f1b5d9.mjs.map +1 -0
- package/fesm2022/icon-module-3f77a24d.mjs +395 -0
- package/fesm2022/icon-module-3f77a24d.mjs.map +1 -0
- package/fesm2022/icon-registry-13a3b98e.mjs +639 -0
- package/fesm2022/icon-registry-13a3b98e.mjs.map +1 -0
- package/fesm2022/icon.mjs +11 -1016
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/index-1763d3a6.mjs +22 -0
- package/fesm2022/index-1763d3a6.mjs.map +1 -0
- package/fesm2022/index-4bc1d6d3.mjs +20 -0
- package/fesm2022/index-4bc1d6d3.mjs.map +1 -0
- package/fesm2022/input/testing.mjs +5 -113
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input-harness-ed59decc.mjs +115 -0
- package/fesm2022/input-harness-ed59decc.mjs.map +1 -0
- package/fesm2022/input-value-accessor-8a79a24e.mjs +12 -0
- package/fesm2022/input-value-accessor-8a79a24e.mjs.map +1 -0
- package/fesm2022/input.mjs +21 -23
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/internal-form-field-434c4039.mjs +27 -0
- package/fesm2022/internal-form-field-434c4039.mjs.map +1 -0
- package/fesm2022/line-d6afe347.mjs +59 -0
- package/fesm2022/line-d6afe347.mjs.map +1 -0
- package/fesm2022/list/testing.mjs +2 -2
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +59 -56
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +37 -25
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/module-3bf2775f.mjs +1293 -0
- package/fesm2022/module-3bf2775f.mjs.map +1 -0
- package/fesm2022/module-47e3be58.mjs +970 -0
- package/fesm2022/module-47e3be58.mjs.map +1 -0
- package/fesm2022/module-a5f9ab72.mjs +875 -0
- package/fesm2022/module-a5f9ab72.mjs.map +1 -0
- package/fesm2022/module-d757bba0.mjs +38 -0
- package/fesm2022/module-d757bba0.mjs.map +1 -0
- package/fesm2022/module-df9f7af3.mjs +152 -0
- package/fesm2022/module-df9f7af3.mjs.map +1 -0
- package/fesm2022/optgroup-harness-5e66b138.mjs +36 -0
- package/fesm2022/optgroup-harness-5e66b138.mjs.map +1 -0
- package/fesm2022/option-07c3c660.mjs +348 -0
- package/fesm2022/option-07c3c660.mjs.map +1 -0
- package/fesm2022/option-harness-3b7c1106.mjs +46 -0
- package/fesm2022/option-harness-3b7c1106.mjs.map +1 -0
- package/fesm2022/paginator/testing.mjs +4 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +51 -21
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs +0 -4
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +15 -13
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs +0 -4
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +15 -13
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-af5a4ea4.mjs +52 -0
- package/fesm2022/pseudo-checkbox-af5a4ea4.mjs.map +1 -0
- package/fesm2022/pseudo-checkbox-module-216fae38.mjs +20 -0
- package/fesm2022/pseudo-checkbox-module-216fae38.mjs.map +1 -0
- package/fesm2022/public-api-c5ab57f5.mjs +147 -0
- package/fesm2022/public-api-c5ab57f5.mjs.map +1 -0
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +23 -15
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/ripple-9939d1f5.mjs +639 -0
- package/fesm2022/ripple-9939d1f5.mjs.map +1 -0
- package/fesm2022/ripple-loader-f2078c66.mjs +165 -0
- package/fesm2022/ripple-loader-f2078c66.mjs.map +1 -0
- package/fesm2022/select/testing.mjs +5 -121
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select-harness-8c55824d.mjs +123 -0
- package/fesm2022/select-harness-8c55824d.mjs.map +1 -0
- package/fesm2022/select.mjs +30 -1311
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +31 -31
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +27 -75
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +22 -21
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +37 -29
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +26 -20
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +52 -39
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/structural-styles-d5ada3b3.mjs +18 -0
- package/fesm2022/structural-styles-d5ada3b3.mjs.map +1 -0
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs +58 -60
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +54 -58
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +31 -24
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +13 -15
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +15 -960
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +28 -30
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/index.d.ts +16 -508
- package/form-field/testing/control/index.d.ts +2 -10
- package/form-field/testing/index.d.ts +19 -24
- package/form-field-control-harness.d-2d91f25a.d.ts +10 -0
- package/form-field-control.d-eb86711c.d.ts +62 -0
- package/form-field.d-2edbc094.d.ts +367 -0
- package/grid-list/index.d.ts +128 -152
- package/grid-list/testing/index.d.ts +39 -44
- package/icon/index.d.ts +9 -470
- package/icon/testing/index.d.ts +41 -44
- package/icon-module.d-aa3bbba0.d.ts +167 -0
- package/icon-registry.d-1dffe9de.d.ts +286 -0
- package/index.d-0536b706.d.ts +11 -0
- package/index.d-37e31cd3.d.ts +13 -0
- package/index.d.ts +2 -3
- package/input/index.d.ts +33 -62
- package/input/testing/index.d.ts +13 -71
- package/input-harness.d-4eecd1d3.d.ts +60 -0
- package/line.d-570a2537.d.ts +25 -0
- package/list/index.d.ts +155 -244
- package/list/testing/index.d.ts +158 -180
- package/list-option-types.d-8739f903.d.ts +15 -0
- package/menu/index.d.ts +183 -231
- package/menu/testing/index.d.ts +17 -23
- package/module.d-18a67f56.d.ts +206 -0
- package/module.d-74a721b9.d.ts +326 -0
- package/module.d-ba05faa6.d.ts +448 -0
- package/module.d-c17c834e.d.ts +18 -0
- package/optgroup-harness.d-7f741f69.d.ts +31 -0
- package/option-harness.d-3d33fc9a.d.ts +34 -0
- package/option-parent.d-559ad5c5.d.ts +19 -0
- package/option.d-6f493d78.d.ts +146 -0
- package/package.json +2 -2
- package/paginator/index.d.ts +31 -216
- package/paginator/testing/index.d.ts +14 -15
- package/paginator.d-40b1766e.d.ts +199 -0
- package/palette.d-ec4a617c.d.ts +4 -0
- package/progress-bar/index.d.ts +40 -59
- package/progress-bar/testing/index.d.ts +7 -10
- package/progress-spinner/index.d.ts +8 -110
- package/progress-spinner/testing/index.d.ts +10 -11
- package/progress-spinner.d-1fc040c5.d.ts +96 -0
- package/pseudo-checkbox-module.d-3abc0461.d.ts +44 -0
- package/radio/index.d.ts +151 -170
- package/radio/testing/index.d.ts +61 -67
- package/ripple-loader.d-8aac2988.d.ts +48 -0
- package/ripple.d-2fb57d04.d.ts +255 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/theme-color/index_bundled.js +2 -2
- package/schematics/ng-generate/theme-color/schema.json +10 -0
- package/schematics/ng-update/index_bundled.js +31 -31
- package/select/index.d.ts +25 -505
- package/select/testing/index.d.ts +5 -67
- package/select-harness.d-7441a7ac.d.ts +63 -0
- package/sidenav/index.d.ts +49 -92
- package/sidenav/testing/index.d.ts +58 -63
- package/slide-toggle/index.d.ts +39 -110
- package/slide-toggle/testing/index.d.ts +17 -21
- package/slider/index.d.ts +281 -328
- package/slider/testing/index.d.ts +42 -47
- package/snack-bar/index.d.ts +152 -185
- package/snack-bar/testing/index.d.ts +7 -9
- package/sort/index.d.ts +61 -169
- package/sort/testing/index.d.ts +22 -25
- package/sort-direction.d-f4ce4649.d.ts +3 -0
- package/sort.d-c2b79a45.d.ts +87 -0
- package/stepper/index.d.ts +115 -167
- package/stepper/testing/index.d.ts +43 -52
- package/table/index.d.ts +97 -156
- package/table/testing/index.d.ts +64 -78
- package/tabs/index.d.ts +309 -383
- package/tabs/testing/index.d.ts +67 -76
- package/timepicker/index.d.ts +127 -160
- package/timepicker/testing/index.d.ts +20 -26
- package/toolbar/index.d.ts +15 -26
- package/toolbar/testing/index.d.ts +13 -16
- package/tooltip/index.d.ts +11 -355
- package/tooltip/testing/index.d.ts +7 -10
- package/tree/index.d.ts +117 -163
- package/tree/testing/index.d.ts +52 -58
package/icon/index.d.ts
CHANGED
|
@@ -1,470 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { OnDestroy } from '@angular/core';
|
|
11
|
-
import { OnInit } from '@angular/core';
|
|
12
|
-
import { Optional } from '@angular/core';
|
|
13
|
-
import { SafeHtml } from '@angular/platform-browser';
|
|
14
|
-
import { SafeResourceUrl } from '@angular/platform-browser';
|
|
15
|
-
import { ThemePalette } from '@angular/material/core';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Returns an exception to be thrown when a HTML string couldn't be sanitized.
|
|
19
|
-
* @param literal HTML that was attempted to be sanitized.
|
|
20
|
-
* @docs-private
|
|
21
|
-
*/
|
|
22
|
-
export declare function getMatIconFailedToSanitizeLiteralError(literal: SafeHtml): Error;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Returns an exception to be thrown when a URL couldn't be sanitized.
|
|
26
|
-
* @param url URL that was attempted to be sanitized.
|
|
27
|
-
* @docs-private
|
|
28
|
-
*/
|
|
29
|
-
export declare function getMatIconFailedToSanitizeUrlError(url: SafeResourceUrl): Error;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Returns an exception to be thrown in the case when attempting to
|
|
33
|
-
* load an icon with a name that cannot be found.
|
|
34
|
-
* @docs-private
|
|
35
|
-
*/
|
|
36
|
-
export declare function getMatIconNameNotFoundError(iconName: string): Error;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Returns an exception to be thrown when the consumer attempts to use
|
|
40
|
-
* `<mat-icon>` without including @angular/common/http.
|
|
41
|
-
* @docs-private
|
|
42
|
-
*/
|
|
43
|
-
export declare function getMatIconNoHttpProviderError(): Error;
|
|
44
|
-
|
|
45
|
-
declare namespace i2 {
|
|
46
|
-
export {
|
|
47
|
-
MAT_ICON_LOCATION_FACTORY,
|
|
48
|
-
MatIconDefaultOptions,
|
|
49
|
-
MAT_ICON_DEFAULT_OPTIONS,
|
|
50
|
-
MAT_ICON_LOCATION,
|
|
51
|
-
MatIconLocation,
|
|
52
|
-
MatIcon
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/** @docs-private */
|
|
57
|
-
export declare const ICON_REGISTRY_PROVIDER: {
|
|
58
|
-
provide: typeof MatIconRegistry;
|
|
59
|
-
deps: (Optional[] | typeof DomSanitizer | typeof ErrorHandler)[];
|
|
60
|
-
useFactory: typeof ICON_REGISTRY_PROVIDER_FACTORY;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
/** @docs-private */
|
|
64
|
-
export declare function ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry: MatIconRegistry, httpClient: HttpClient, sanitizer: DomSanitizer, errorHandler: ErrorHandler, document?: any): MatIconRegistry;
|
|
65
|
-
|
|
66
|
-
/** Options that can be used to configure how an icon or the icons in an icon set are presented. */
|
|
67
|
-
export declare interface IconOptions {
|
|
68
|
-
/** View box to set on the icon. */
|
|
69
|
-
viewBox?: string;
|
|
70
|
-
/** Whether or not to fetch the icon or icon set using HTTP credentials. */
|
|
71
|
-
withCredentials?: boolean;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Function that will be invoked by the icon registry when trying to resolve the
|
|
76
|
-
* URL from which to fetch an icon. The returned URL will be used to make a request for the icon.
|
|
77
|
-
*/
|
|
78
|
-
export declare type IconResolver = (name: string, namespace: string) => SafeResourceUrl | SafeResourceUrlWithIconOptions | null;
|
|
79
|
-
|
|
80
|
-
/** Injection token to be used to override the default options for `mat-icon`. */
|
|
81
|
-
export declare const MAT_ICON_DEFAULT_OPTIONS: InjectionToken<MatIconDefaultOptions>;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Injection token used to provide the current location to `MatIcon`.
|
|
85
|
-
* Used to handle server-side rendering and to stub out during unit tests.
|
|
86
|
-
* @docs-private
|
|
87
|
-
*/
|
|
88
|
-
export declare const MAT_ICON_LOCATION: InjectionToken<MatIconLocation>;
|
|
89
|
-
|
|
90
|
-
/** @docs-private */
|
|
91
|
-
export declare function MAT_ICON_LOCATION_FACTORY(): MatIconLocation;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Component to display an icon. It can be used in the following ways:
|
|
95
|
-
*
|
|
96
|
-
* - Specify the svgIcon input to load an SVG icon from a URL previously registered with the
|
|
97
|
-
* addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of
|
|
98
|
-
* MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format
|
|
99
|
-
* "[namespace]:[name]", if not the value will be the name of an icon in the default namespace.
|
|
100
|
-
* Examples:
|
|
101
|
-
* `<mat-icon svgIcon="left-arrow"></mat-icon>
|
|
102
|
-
* <mat-icon svgIcon="animals:cat"></mat-icon>`
|
|
103
|
-
*
|
|
104
|
-
* - Use a font ligature as an icon by putting the ligature text in the `fontIcon` attribute or the
|
|
105
|
-
* content of the `<mat-icon>` component. If you register a custom font class, don't forget to also
|
|
106
|
-
* include the special class `mat-ligature-font`. It is recommended to use the attribute alternative
|
|
107
|
-
* to prevent the ligature text to be selectable and to appear in search engine results.
|
|
108
|
-
* By default, the Material icons font is used as described at
|
|
109
|
-
* http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an
|
|
110
|
-
* alternate font by setting the fontSet input to either the CSS class to apply to use the
|
|
111
|
-
* desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.
|
|
112
|
-
* Examples:
|
|
113
|
-
* `<mat-icon fontIcon="home"></mat-icon>
|
|
114
|
-
* <mat-icon>home</mat-icon>
|
|
115
|
-
* <mat-icon fontSet="myfont" fontIcon="sun"></mat-icon>
|
|
116
|
-
* <mat-icon fontSet="myfont">sun</mat-icon>`
|
|
117
|
-
*
|
|
118
|
-
* - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the
|
|
119
|
-
* font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a
|
|
120
|
-
* CSS class which causes the glyph to be displayed via a :before selector, as in
|
|
121
|
-
* https://fontawesome-v4.github.io/examples/
|
|
122
|
-
* Example:
|
|
123
|
-
* `<mat-icon fontSet="fa" fontIcon="alarm"></mat-icon>`
|
|
124
|
-
*/
|
|
125
|
-
export declare class MatIcon implements OnInit, AfterViewChecked, OnDestroy {
|
|
126
|
-
readonly _elementRef: ElementRef<HTMLElement>;
|
|
127
|
-
private _iconRegistry;
|
|
128
|
-
private _location;
|
|
129
|
-
private readonly _errorHandler;
|
|
130
|
-
private _defaultColor;
|
|
131
|
-
/**
|
|
132
|
-
* Theme color of the icon. This API is supported in M2 themes only, it
|
|
133
|
-
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/icon/styling.
|
|
134
|
-
*
|
|
135
|
-
* For information on applying color variants in M3, see
|
|
136
|
-
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
|
|
137
|
-
*/
|
|
138
|
-
get color(): string | null | undefined;
|
|
139
|
-
set color(value: string | null | undefined);
|
|
140
|
-
private _color;
|
|
141
|
-
/**
|
|
142
|
-
* Whether the icon should be inlined, automatically sizing the icon to match the font size of
|
|
143
|
-
* the element the icon is contained in.
|
|
144
|
-
*/
|
|
145
|
-
inline: boolean;
|
|
146
|
-
/** Name of the icon in the SVG icon set. */
|
|
147
|
-
get svgIcon(): string;
|
|
148
|
-
set svgIcon(value: string);
|
|
149
|
-
private _svgIcon;
|
|
150
|
-
/** Font set that the icon is a part of. */
|
|
151
|
-
get fontSet(): string;
|
|
152
|
-
set fontSet(value: string);
|
|
153
|
-
private _fontSet;
|
|
154
|
-
/** Name of an icon within a font set. */
|
|
155
|
-
get fontIcon(): string;
|
|
156
|
-
set fontIcon(value: string);
|
|
157
|
-
private _fontIcon;
|
|
158
|
-
private _previousFontSetClass;
|
|
159
|
-
private _previousFontIconClass;
|
|
160
|
-
_svgName: string | null;
|
|
161
|
-
_svgNamespace: string | null;
|
|
162
|
-
/** Keeps track of the current page path. */
|
|
163
|
-
private _previousPath?;
|
|
164
|
-
/** Keeps track of the elements and attributes that we've prefixed with the current path. */
|
|
165
|
-
private _elementsWithExternalReferences?;
|
|
166
|
-
/** Subscription to the current in-progress SVG icon request. */
|
|
167
|
-
private _currentIconFetch;
|
|
168
|
-
constructor(...args: unknown[]);
|
|
169
|
-
/**
|
|
170
|
-
* Splits an svgIcon binding value into its icon set and icon name components.
|
|
171
|
-
* Returns a 2-element array of [(icon set), (icon name)].
|
|
172
|
-
* The separator for the two fields is ':'. If there is no separator, an empty
|
|
173
|
-
* string is returned for the icon set and the entire value is returned for
|
|
174
|
-
* the icon name. If the argument is falsy, returns an array of two empty strings.
|
|
175
|
-
* Throws an error if the name contains two or more ':' separators.
|
|
176
|
-
* Examples:
|
|
177
|
-
* `'social:cake' -> ['social', 'cake']
|
|
178
|
-
* 'penguin' -> ['', 'penguin']
|
|
179
|
-
* null -> ['', '']
|
|
180
|
-
* 'a:b:c' -> (throws Error)`
|
|
181
|
-
*/
|
|
182
|
-
private _splitIconName;
|
|
183
|
-
ngOnInit(): void;
|
|
184
|
-
ngAfterViewChecked(): void;
|
|
185
|
-
ngOnDestroy(): void;
|
|
186
|
-
_usingFontIcon(): boolean;
|
|
187
|
-
private _setSvgElement;
|
|
188
|
-
private _clearSvgElement;
|
|
189
|
-
private _updateFontIconClasses;
|
|
190
|
-
/**
|
|
191
|
-
* Cleans up a value to be used as a fontIcon or fontSet.
|
|
192
|
-
* Since the value ends up being assigned as a CSS class, we
|
|
193
|
-
* have to trim the value and omit space-separated values.
|
|
194
|
-
*/
|
|
195
|
-
private _cleanupFontValue;
|
|
196
|
-
/**
|
|
197
|
-
* Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`
|
|
198
|
-
* reference. This is required because WebKit browsers require references to be prefixed with
|
|
199
|
-
* the current path, if the page has a `base` tag.
|
|
200
|
-
*/
|
|
201
|
-
private _prependPathToReferences;
|
|
202
|
-
/**
|
|
203
|
-
* Caches the children of an SVG element that have `url()`
|
|
204
|
-
* references that we need to prefix with the current path.
|
|
205
|
-
*/
|
|
206
|
-
private _cacheChildrenWithExternalReferences;
|
|
207
|
-
/** Sets a new SVG icon with a particular name. */
|
|
208
|
-
private _updateSvgIcon;
|
|
209
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatIcon, never>;
|
|
210
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatIcon, "mat-icon", ["matIcon"], { "color": { "alias": "color"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; "svgIcon": { "alias": "svgIcon"; "required": false; }; "fontSet": { "alias": "fontSet"; "required": false; }; "fontIcon": { "alias": "fontIcon"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
211
|
-
static ngAcceptInputType_inline: unknown;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/** Default options for `mat-icon`. */
|
|
215
|
-
export declare interface MatIconDefaultOptions {
|
|
216
|
-
/**
|
|
217
|
-
* Theme color of the icon. This API is supported in M2 themes only, it
|
|
218
|
-
* has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/icon/styling.
|
|
219
|
-
*
|
|
220
|
-
* For information on applying color variants in M3, see
|
|
221
|
-
* https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
|
|
222
|
-
*/
|
|
223
|
-
color?: ThemePalette;
|
|
224
|
-
/** Font set that the icon is a part of. */
|
|
225
|
-
fontSet?: string;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Stubbed out location for `MatIcon`.
|
|
230
|
-
* @docs-private
|
|
231
|
-
*/
|
|
232
|
-
export declare interface MatIconLocation {
|
|
233
|
-
getPathname: () => string;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export declare class MatIconModule {
|
|
237
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatIconModule, never>;
|
|
238
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatIconModule, never, [typeof i1.MatCommonModule, typeof i2.MatIcon], [typeof i2.MatIcon, typeof i1.MatCommonModule]>;
|
|
239
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<MatIconModule>;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Service to register and display icons used by the `<mat-icon>` component.
|
|
244
|
-
* - Registers icon URLs by namespace and name.
|
|
245
|
-
* - Registers icon set URLs by namespace.
|
|
246
|
-
* - Registers aliases for CSS classes, for use with icon fonts.
|
|
247
|
-
* - Loads icons from URLs and extracts individual icons from icon sets.
|
|
248
|
-
*/
|
|
249
|
-
export declare class MatIconRegistry implements OnDestroy {
|
|
250
|
-
private _httpClient;
|
|
251
|
-
private _sanitizer;
|
|
252
|
-
private readonly _errorHandler;
|
|
253
|
-
private _document;
|
|
254
|
-
/**
|
|
255
|
-
* URLs and cached SVG elements for individual icons. Keys are of the format "[namespace]:[icon]".
|
|
256
|
-
*/
|
|
257
|
-
private _svgIconConfigs;
|
|
258
|
-
/**
|
|
259
|
-
* SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.
|
|
260
|
-
* Multiple icon sets can be registered under the same namespace.
|
|
261
|
-
*/
|
|
262
|
-
private _iconSetConfigs;
|
|
263
|
-
/** Cache for icons loaded by direct URLs. */
|
|
264
|
-
private _cachedIconsByUrl;
|
|
265
|
-
/** In-progress icon fetches. Used to coalesce multiple requests to the same URL. */
|
|
266
|
-
private _inProgressUrlFetches;
|
|
267
|
-
/** Map from font identifiers to their CSS class names. Used for icon fonts. */
|
|
268
|
-
private _fontCssClassesByAlias;
|
|
269
|
-
/** Registered icon resolver functions. */
|
|
270
|
-
private _resolvers;
|
|
271
|
-
/**
|
|
272
|
-
* The CSS classes to apply when an `<mat-icon>` component has no icon name, url, or font
|
|
273
|
-
* specified. The default 'material-icons' value assumes that the material icon font has been
|
|
274
|
-
* loaded as described at https://google.github.io/material-design-icons/#icon-font-for-the-web
|
|
275
|
-
*/
|
|
276
|
-
private _defaultFontSetClass;
|
|
277
|
-
constructor(_httpClient: HttpClient, _sanitizer: DomSanitizer, document: any, _errorHandler: ErrorHandler);
|
|
278
|
-
/**
|
|
279
|
-
* Registers an icon by URL in the default namespace.
|
|
280
|
-
* @param iconName Name under which the icon should be registered.
|
|
281
|
-
* @param url
|
|
282
|
-
*/
|
|
283
|
-
addSvgIcon(iconName: string, url: SafeResourceUrl, options?: IconOptions): this;
|
|
284
|
-
/**
|
|
285
|
-
* Registers an icon using an HTML string in the default namespace.
|
|
286
|
-
* @param iconName Name under which the icon should be registered.
|
|
287
|
-
* @param literal SVG source of the icon.
|
|
288
|
-
*/
|
|
289
|
-
addSvgIconLiteral(iconName: string, literal: SafeHtml, options?: IconOptions): this;
|
|
290
|
-
/**
|
|
291
|
-
* Registers an icon by URL in the specified namespace.
|
|
292
|
-
* @param namespace Namespace in which the icon should be registered.
|
|
293
|
-
* @param iconName Name under which the icon should be registered.
|
|
294
|
-
* @param url
|
|
295
|
-
*/
|
|
296
|
-
addSvgIconInNamespace(namespace: string, iconName: string, url: SafeResourceUrl, options?: IconOptions): this;
|
|
297
|
-
/**
|
|
298
|
-
* Registers an icon resolver function with the registry. The function will be invoked with the
|
|
299
|
-
* name and namespace of an icon when the registry tries to resolve the URL from which to fetch
|
|
300
|
-
* the icon. The resolver is expected to return a `SafeResourceUrl` that points to the icon,
|
|
301
|
-
* an object with the icon URL and icon options, or `null` if the icon is not supported. Resolvers
|
|
302
|
-
* will be invoked in the order in which they have been registered.
|
|
303
|
-
* @param resolver Resolver function to be registered.
|
|
304
|
-
*/
|
|
305
|
-
addSvgIconResolver(resolver: IconResolver): this;
|
|
306
|
-
/**
|
|
307
|
-
* Registers an icon using an HTML string in the specified namespace.
|
|
308
|
-
* @param namespace Namespace in which the icon should be registered.
|
|
309
|
-
* @param iconName Name under which the icon should be registered.
|
|
310
|
-
* @param literal SVG source of the icon.
|
|
311
|
-
*/
|
|
312
|
-
addSvgIconLiteralInNamespace(namespace: string, iconName: string, literal: SafeHtml, options?: IconOptions): this;
|
|
313
|
-
/**
|
|
314
|
-
* Registers an icon set by URL in the default namespace.
|
|
315
|
-
* @param url
|
|
316
|
-
*/
|
|
317
|
-
addSvgIconSet(url: SafeResourceUrl, options?: IconOptions): this;
|
|
318
|
-
/**
|
|
319
|
-
* Registers an icon set using an HTML string in the default namespace.
|
|
320
|
-
* @param literal SVG source of the icon set.
|
|
321
|
-
*/
|
|
322
|
-
addSvgIconSetLiteral(literal: SafeHtml, options?: IconOptions): this;
|
|
323
|
-
/**
|
|
324
|
-
* Registers an icon set by URL in the specified namespace.
|
|
325
|
-
* @param namespace Namespace in which to register the icon set.
|
|
326
|
-
* @param url
|
|
327
|
-
*/
|
|
328
|
-
addSvgIconSetInNamespace(namespace: string, url: SafeResourceUrl, options?: IconOptions): this;
|
|
329
|
-
/**
|
|
330
|
-
* Registers an icon set using an HTML string in the specified namespace.
|
|
331
|
-
* @param namespace Namespace in which to register the icon set.
|
|
332
|
-
* @param literal SVG source of the icon set.
|
|
333
|
-
*/
|
|
334
|
-
addSvgIconSetLiteralInNamespace(namespace: string, literal: SafeHtml, options?: IconOptions): this;
|
|
335
|
-
/**
|
|
336
|
-
* Defines an alias for CSS class names to be used for icon fonts. Creating an matIcon
|
|
337
|
-
* component with the alias as the fontSet input will cause the class name to be applied
|
|
338
|
-
* to the `<mat-icon>` element.
|
|
339
|
-
*
|
|
340
|
-
* If the registered font is a ligature font, then don't forget to also include the special
|
|
341
|
-
* class `mat-ligature-font` to allow the usage via attribute. So register like this:
|
|
342
|
-
*
|
|
343
|
-
* ```ts
|
|
344
|
-
* iconRegistry.registerFontClassAlias('f1', 'font1 mat-ligature-font');
|
|
345
|
-
* ```
|
|
346
|
-
*
|
|
347
|
-
* And use like this:
|
|
348
|
-
*
|
|
349
|
-
* ```html
|
|
350
|
-
* <mat-icon fontSet="f1" fontIcon="home"></mat-icon>
|
|
351
|
-
* ```
|
|
352
|
-
*
|
|
353
|
-
* @param alias Alias for the font.
|
|
354
|
-
* @param classNames Class names override to be used instead of the alias.
|
|
355
|
-
*/
|
|
356
|
-
registerFontClassAlias(alias: string, classNames?: string): this;
|
|
357
|
-
/**
|
|
358
|
-
* Returns the CSS class name associated with the alias by a previous call to
|
|
359
|
-
* registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.
|
|
360
|
-
*/
|
|
361
|
-
classNameForFontAlias(alias: string): string;
|
|
362
|
-
/**
|
|
363
|
-
* Sets the CSS classes to be used for icon fonts when an `<mat-icon>` component does not
|
|
364
|
-
* have a fontSet input value, and is not loading an icon by name or URL.
|
|
365
|
-
*/
|
|
366
|
-
setDefaultFontSetClass(...classNames: string[]): this;
|
|
367
|
-
/**
|
|
368
|
-
* Returns the CSS classes to be used for icon fonts when an `<mat-icon>` component does not
|
|
369
|
-
* have a fontSet input value, and is not loading an icon by name or URL.
|
|
370
|
-
*/
|
|
371
|
-
getDefaultFontSetClass(): string[];
|
|
372
|
-
/**
|
|
373
|
-
* Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.
|
|
374
|
-
* The response from the URL may be cached so this will not always cause an HTTP request, but
|
|
375
|
-
* the produced element will always be a new copy of the originally fetched icon. (That is,
|
|
376
|
-
* it will not contain any modifications made to elements previously returned).
|
|
377
|
-
*
|
|
378
|
-
* @param safeUrl URL from which to fetch the SVG icon.
|
|
379
|
-
*/
|
|
380
|
-
getSvgIconFromUrl(safeUrl: SafeResourceUrl): Observable<SVGElement>;
|
|
381
|
-
/**
|
|
382
|
-
* Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name
|
|
383
|
-
* and namespace. The icon must have been previously registered with addIcon or addIconSet;
|
|
384
|
-
* if not, the Observable will throw an error.
|
|
385
|
-
*
|
|
386
|
-
* @param name Name of the icon to be retrieved.
|
|
387
|
-
* @param namespace Namespace in which to look for the icon.
|
|
388
|
-
*/
|
|
389
|
-
getNamedSvgIcon(name: string, namespace?: string): Observable<SVGElement>;
|
|
390
|
-
ngOnDestroy(): void;
|
|
391
|
-
/**
|
|
392
|
-
* Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.
|
|
393
|
-
*/
|
|
394
|
-
private _getSvgFromConfig;
|
|
395
|
-
/**
|
|
396
|
-
* Attempts to find an icon with the specified name in any of the SVG icon sets.
|
|
397
|
-
* First searches the available cached icons for a nested element with a matching name, and
|
|
398
|
-
* if found copies the element to a new `<svg>` element. If not found, fetches all icon sets
|
|
399
|
-
* that have not been cached, and searches again after all fetches are completed.
|
|
400
|
-
* The returned Observable produces the SVG element if possible, and throws
|
|
401
|
-
* an error if no icon with the specified name can be found.
|
|
402
|
-
*/
|
|
403
|
-
private _getSvgFromIconSetConfigs;
|
|
404
|
-
/**
|
|
405
|
-
* Searches the cached SVG elements for the given icon sets for a nested icon element whose "id"
|
|
406
|
-
* tag matches the specified name. If found, copies the nested element to a new SVG element and
|
|
407
|
-
* returns it. Returns null if no matching element is found.
|
|
408
|
-
*/
|
|
409
|
-
private _extractIconWithNameFromAnySet;
|
|
410
|
-
/**
|
|
411
|
-
* Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element
|
|
412
|
-
* from it.
|
|
413
|
-
*/
|
|
414
|
-
private _loadSvgIconFromConfig;
|
|
415
|
-
/**
|
|
416
|
-
* Loads the content of the icon set URL specified in the
|
|
417
|
-
* SvgIconConfig and attaches it to the config.
|
|
418
|
-
*/
|
|
419
|
-
private _loadSvgIconSetFromConfig;
|
|
420
|
-
/**
|
|
421
|
-
* Searches the cached element of the given SvgIconConfig for a nested icon element whose "id"
|
|
422
|
-
* tag matches the specified name. If found, copies the nested element to a new SVG element and
|
|
423
|
-
* returns it. Returns null if no matching element is found.
|
|
424
|
-
*/
|
|
425
|
-
private _extractSvgIconFromSet;
|
|
426
|
-
/**
|
|
427
|
-
* Creates a DOM element from the given SVG string.
|
|
428
|
-
*/
|
|
429
|
-
private _svgElementFromString;
|
|
430
|
-
/**
|
|
431
|
-
* Converts an element into an SVG node by cloning all of its children.
|
|
432
|
-
*/
|
|
433
|
-
private _toSvgElement;
|
|
434
|
-
/**
|
|
435
|
-
* Sets the default attributes for an SVG element to be used as an icon.
|
|
436
|
-
*/
|
|
437
|
-
private _setSvgAttributes;
|
|
438
|
-
/**
|
|
439
|
-
* Returns an Observable which produces the string contents of the given icon. Results may be
|
|
440
|
-
* cached, so future calls with the same URL may not cause another HTTP request.
|
|
441
|
-
*/
|
|
442
|
-
private _fetchIcon;
|
|
443
|
-
/**
|
|
444
|
-
* Registers an icon config by name in the specified namespace.
|
|
445
|
-
* @param namespace Namespace in which to register the icon config.
|
|
446
|
-
* @param iconName Name under which to register the config.
|
|
447
|
-
* @param config Config to be registered.
|
|
448
|
-
*/
|
|
449
|
-
private _addSvgIconConfig;
|
|
450
|
-
/**
|
|
451
|
-
* Registers an icon set config in the specified namespace.
|
|
452
|
-
* @param namespace Namespace in which to register the icon config.
|
|
453
|
-
* @param config Config to be registered.
|
|
454
|
-
*/
|
|
455
|
-
private _addSvgIconSetConfig;
|
|
456
|
-
/** Parses a config's text into an SVG element. */
|
|
457
|
-
private _svgElementFromConfig;
|
|
458
|
-
/** Tries to create an icon config through the registered resolver functions. */
|
|
459
|
-
private _getIconConfigFromResolvers;
|
|
460
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatIconRegistry, [{ optional: true; }, null, { optional: true; }, null]>;
|
|
461
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<MatIconRegistry>;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
/** Object that specifies a URL from which to fetch an icon and the options to use for it. */
|
|
465
|
-
export declare interface SafeResourceUrlWithIconOptions {
|
|
466
|
-
url: SafeResourceUrl;
|
|
467
|
-
options: IconOptions;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
export { }
|
|
1
|
+
export { b as MAT_ICON_DEFAULT_OPTIONS, c as MAT_ICON_LOCATION, e as MAT_ICON_LOCATION_FACTORY, f as MatIcon, a as MatIconDefaultOptions, d as MatIconLocation, M as MatIconModule } from '../icon-module.d-aa3bbba0.js';
|
|
2
|
+
export { f as ICON_REGISTRY_PROVIDER, e as ICON_REGISTRY_PROVIDER_FACTORY, I as IconOptions, d as IconResolver, M as MatIconRegistry, S as SafeResourceUrlWithIconOptions, c as getMatIconFailedToSanitizeLiteralError, b as getMatIconFailedToSanitizeUrlError, g as getMatIconNameNotFoundError, a as getMatIconNoHttpProviderError } from '../icon-registry.d-1dffe9de.js';
|
|
3
|
+
import '@angular/core';
|
|
4
|
+
import '../common-module.d-0e6515ae.js';
|
|
5
|
+
import '@angular/cdk/bidi';
|
|
6
|
+
import '../palette.d-ec4a617c.js';
|
|
7
|
+
import '@angular/common/http';
|
|
8
|
+
import '@angular/platform-browser';
|
|
9
|
+
import 'rxjs';
|
package/icon/testing/index.d.ts
CHANGED
|
@@ -1,39 +1,18 @@
|
|
|
1
|
-
import { BaseHarnessFilters } from '@angular/cdk/testing';
|
|
2
|
-
import { ComponentHarness } from '@angular/cdk/testing';
|
|
3
|
-
import { HarnessPredicate } from '@angular/cdk/testing';
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
4
2
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { MatIconRegistry } from '@angular/material/icon';
|
|
6
|
-
import { Observable } from 'rxjs';
|
|
7
3
|
import { OnDestroy } from '@angular/core';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { M as MatIconRegistry } from '../../icon-registry.d-1dffe9de.js';
|
|
6
|
+
import '@angular/common/http';
|
|
7
|
+
import '@angular/platform-browser';
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare class FakeMatIconRegistry implements PublicApi<MatIconRegistry>, OnDestroy {
|
|
14
|
-
addSvgIcon(): this;
|
|
15
|
-
addSvgIconLiteral(): this;
|
|
16
|
-
addSvgIconInNamespace(): this;
|
|
17
|
-
addSvgIconLiteralInNamespace(): this;
|
|
18
|
-
addSvgIconSet(): this;
|
|
19
|
-
addSvgIconSetLiteral(): this;
|
|
20
|
-
addSvgIconSetInNamespace(): this;
|
|
21
|
-
addSvgIconSetLiteralInNamespace(): this;
|
|
22
|
-
registerFontClassAlias(): this;
|
|
23
|
-
classNameForFontAlias(alias: string): string;
|
|
24
|
-
getDefaultFontSetClass(): string[];
|
|
25
|
-
getSvgIconFromUrl(): Observable<SVGElement>;
|
|
26
|
-
getNamedSvgIcon(): Observable<SVGElement>;
|
|
27
|
-
setDefaultFontSetClass(): this;
|
|
28
|
-
addSvgIconResolver(): this;
|
|
29
|
-
ngOnDestroy(): void;
|
|
30
|
-
private _generateEmptySvg;
|
|
31
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FakeMatIconRegistry, never>;
|
|
32
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FakeMatIconRegistry>;
|
|
9
|
+
/** Possible types of icons. */
|
|
10
|
+
declare enum IconType {
|
|
11
|
+
SVG = 0,
|
|
12
|
+
FONT = 1
|
|
33
13
|
}
|
|
34
|
-
|
|
35
14
|
/** A set of criteria that can be used to filter a list of `MatIconHarness` instances. */
|
|
36
|
-
|
|
15
|
+
interface IconHarnessFilters extends BaseHarnessFilters {
|
|
37
16
|
/** Filters based on the typef of the icon. */
|
|
38
17
|
type?: IconType;
|
|
39
18
|
/** Filters based on the name of the icon. */
|
|
@@ -42,14 +21,8 @@ export declare interface IconHarnessFilters extends BaseHarnessFilters {
|
|
|
42
21
|
namespace?: string | null | RegExp;
|
|
43
22
|
}
|
|
44
23
|
|
|
45
|
-
/** Possible types of icons. */
|
|
46
|
-
export declare enum IconType {
|
|
47
|
-
SVG = 0,
|
|
48
|
-
FONT = 1
|
|
49
|
-
}
|
|
50
|
-
|
|
51
24
|
/** Harness for interacting with a standard mat-icon in tests. */
|
|
52
|
-
|
|
25
|
+
declare class MatIconHarness extends ComponentHarness {
|
|
53
26
|
/** The selector for the host element of a `MatIcon` instance. */
|
|
54
27
|
static hostSelector: string;
|
|
55
28
|
/**
|
|
@@ -69,15 +42,39 @@ export declare class MatIconHarness extends ComponentHarness {
|
|
|
69
42
|
isInline(): Promise<boolean>;
|
|
70
43
|
}
|
|
71
44
|
|
|
45
|
+
type PublicApi<T> = {
|
|
46
|
+
[K in keyof T]: T[K] extends (...x: any[]) => T ? (...x: any[]) => PublicApi<T> : T[K];
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* A null icon registry that must be imported to allow disabling of custom
|
|
50
|
+
* icons.
|
|
51
|
+
*/
|
|
52
|
+
declare class FakeMatIconRegistry implements PublicApi<MatIconRegistry>, OnDestroy {
|
|
53
|
+
addSvgIcon(): this;
|
|
54
|
+
addSvgIconLiteral(): this;
|
|
55
|
+
addSvgIconInNamespace(): this;
|
|
56
|
+
addSvgIconLiteralInNamespace(): this;
|
|
57
|
+
addSvgIconSet(): this;
|
|
58
|
+
addSvgIconSetLiteral(): this;
|
|
59
|
+
addSvgIconSetInNamespace(): this;
|
|
60
|
+
addSvgIconSetLiteralInNamespace(): this;
|
|
61
|
+
registerFontClassAlias(): this;
|
|
62
|
+
classNameForFontAlias(alias: string): string;
|
|
63
|
+
getDefaultFontSetClass(): string[];
|
|
64
|
+
getSvgIconFromUrl(): Observable<SVGElement>;
|
|
65
|
+
getNamedSvgIcon(): Observable<SVGElement>;
|
|
66
|
+
setDefaultFontSetClass(): this;
|
|
67
|
+
addSvgIconResolver(): this;
|
|
68
|
+
ngOnDestroy(): void;
|
|
69
|
+
private _generateEmptySvg;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FakeMatIconRegistry, never>;
|
|
71
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FakeMatIconRegistry>;
|
|
72
|
+
}
|
|
72
73
|
/** Import this module in tests to install the null icon registry. */
|
|
73
|
-
|
|
74
|
+
declare class MatIconTestingModule {
|
|
74
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatIconTestingModule, never>;
|
|
75
76
|
static ɵmod: i0.ɵɵNgModuleDeclaration<MatIconTestingModule, never, never, never>;
|
|
76
77
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatIconTestingModule>;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
[K in keyof T]: T[K] extends (...x: any[]) => T ? (...x: any[]) => PublicApi<T> : T[K];
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export { }
|
|
80
|
+
export { FakeMatIconRegistry, type IconHarnessFilters, IconType, MatIconHarness, MatIconTestingModule };
|