@angular/material 22.2.0-next.5 → 22.2.0-rc.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/fesm2022/_error-options-chunk.mjs +6 -6
- package/fesm2022/_form-field-chunk.mjs +30 -30
- package/fesm2022/_icon-button-chunk.mjs +6 -6
- package/fesm2022/_icon-registry-chunk.mjs +14 -15
- package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
- package/fesm2022/_internal-form-field-chunk.mjs +3 -3
- package/fesm2022/_line-chunk.mjs +7 -7
- package/fesm2022/_option-chunk.mjs +6 -6
- package/fesm2022/_option-module-chunk.mjs +4 -4
- package/fesm2022/_pseudo-checkbox-chunk.mjs +3 -3
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs +4 -4
- package/fesm2022/_ripple-chunk.mjs +6 -6
- package/fesm2022/_ripple-loader-chunk.mjs +3 -3
- package/fesm2022/_ripple-module-chunk.mjs +4 -4
- package/fesm2022/_structural-styles-chunk.mjs +3 -3
- package/fesm2022/_tooltip-chunk.mjs +6 -6
- package/fesm2022/autocomplete.mjs +13 -13
- package/fesm2022/badge.mjs +10 -10
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/button-toggle.mjs +10 -10
- package/fesm2022/button.mjs +13 -13
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/checkbox.mjs +7 -7
- package/fesm2022/chips.mjs +46 -46
- package/fesm2022/core.mjs +12 -12
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +82 -82
- package/fesm2022/dialog.mjs +25 -25
- package/fesm2022/divider.mjs +7 -7
- package/fesm2022/expansion.mjs +25 -25
- package/fesm2022/form-field.mjs +4 -4
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/icon-testing.mjs +7 -7
- package/fesm2022/icon.mjs +7 -7
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/list.mjs +49 -49
- package/fesm2022/menu.mjs +22 -22
- package/fesm2022/paginator.mjs +10 -10
- package/fesm2022/progress-bar.mjs +7 -7
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/radio.mjs +10 -10
- package/fesm2022/select.mjs +10 -10
- package/fesm2022/sidenav.mjs +22 -22
- package/fesm2022/slide-toggle.mjs +7 -7
- package/fesm2022/slider.mjs +16 -16
- package/fesm2022/snack-bar.mjs +22 -22
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/stepper.mjs +31 -31
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/tabs.mjs +43 -43
- package/fesm2022/timepicker.mjs +13 -13
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/tooltip.mjs +4 -4
- package/fesm2022/tree.mjs +25 -25
- package/package.json +2 -2
- package/schematics/ng-add/fonts/material-fonts.js +1 -1
- package/schematics/ng-add/fonts/material-fonts.js.map +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/types/_dialog-chunk.d.ts +1 -1
- package/types/_error-options-chunk.d.ts +2 -2
- package/types/_icon-module-chunk.d.ts +8 -6
- package/types/_icon-registry-chunk.d.ts +1 -1
- package/types/_paginator-chunk.d.ts +1 -1
- package/types/_ripple-loader-chunk.d.ts +1 -1
- package/types/bottom-sheet.d.ts +1 -1
- package/types/core.d.ts +1 -1
- package/types/datepicker.d.ts +5 -5
- package/types/icon-testing.d.ts +1 -1
- package/types/snack-bar.d.ts +1 -1
- package/types/sort.d.ts +1 -1
- package/types/stepper.d.ts +1 -1
|
@@ -15,7 +15,7 @@ class ShowOnDirtyErrorStateMatcher {
|
|
|
15
15
|
}
|
|
16
16
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
17
17
|
minVersion: "12.0.0",
|
|
18
|
-
version: "22.2.0-next.
|
|
18
|
+
version: "22.2.0-next.7",
|
|
19
19
|
ngImport: i0,
|
|
20
20
|
type: ShowOnDirtyErrorStateMatcher,
|
|
21
21
|
deps: [],
|
|
@@ -23,7 +23,7 @@ class ShowOnDirtyErrorStateMatcher {
|
|
|
23
23
|
});
|
|
24
24
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
25
25
|
minVersion: "22.0.0",
|
|
26
|
-
version: "22.2.0-next.
|
|
26
|
+
version: "22.2.0-next.7",
|
|
27
27
|
ngImport: i0,
|
|
28
28
|
type: ShowOnDirtyErrorStateMatcher,
|
|
29
29
|
autoProvided: false
|
|
@@ -31,7 +31,7 @@ class ShowOnDirtyErrorStateMatcher {
|
|
|
31
31
|
}
|
|
32
32
|
i0.ɵɵngDeclareClassMetadata({
|
|
33
33
|
minVersion: "12.0.0",
|
|
34
|
-
version: "22.2.0-next.
|
|
34
|
+
version: "22.2.0-next.7",
|
|
35
35
|
ngImport: i0,
|
|
36
36
|
type: ShowOnDirtyErrorStateMatcher,
|
|
37
37
|
decorators: [{
|
|
@@ -55,7 +55,7 @@ class ErrorStateMatcher {
|
|
|
55
55
|
}
|
|
56
56
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
57
57
|
minVersion: "12.0.0",
|
|
58
|
-
version: "22.2.0-next.
|
|
58
|
+
version: "22.2.0-next.7",
|
|
59
59
|
ngImport: i0,
|
|
60
60
|
type: ErrorStateMatcher,
|
|
61
61
|
deps: [],
|
|
@@ -63,14 +63,14 @@ class ErrorStateMatcher {
|
|
|
63
63
|
});
|
|
64
64
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
65
65
|
minVersion: "22.0.0",
|
|
66
|
-
version: "22.2.0-next.
|
|
66
|
+
version: "22.2.0-next.7",
|
|
67
67
|
ngImport: i0,
|
|
68
68
|
type: ErrorStateMatcher
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
i0.ɵɵngDeclareClassMetadata({
|
|
72
72
|
minVersion: "12.0.0",
|
|
73
|
-
version: "22.2.0-next.
|
|
73
|
+
version: "22.2.0-next.7",
|
|
74
74
|
ngImport: i0,
|
|
75
75
|
type: ErrorStateMatcher,
|
|
76
76
|
decorators: [{
|
|
@@ -13,7 +13,7 @@ import { _animationsDisabled } from './_animation-chunk.mjs';
|
|
|
13
13
|
class MatLabel {
|
|
14
14
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
15
15
|
minVersion: "12.0.0",
|
|
16
|
-
version: "22.2.0-next.
|
|
16
|
+
version: "22.2.0-next.7",
|
|
17
17
|
ngImport: i0,
|
|
18
18
|
type: MatLabel,
|
|
19
19
|
deps: [],
|
|
@@ -21,7 +21,7 @@ class MatLabel {
|
|
|
21
21
|
});
|
|
22
22
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
23
23
|
minVersion: "14.0.0",
|
|
24
|
-
version: "22.2.0-next.
|
|
24
|
+
version: "22.2.0-next.7",
|
|
25
25
|
type: MatLabel,
|
|
26
26
|
isStandalone: true,
|
|
27
27
|
selector: "mat-label",
|
|
@@ -30,7 +30,7 @@ class MatLabel {
|
|
|
30
30
|
}
|
|
31
31
|
i0.ɵɵngDeclareClassMetadata({
|
|
32
32
|
minVersion: "12.0.0",
|
|
33
|
-
version: "22.2.0-next.
|
|
33
|
+
version: "22.2.0-next.7",
|
|
34
34
|
ngImport: i0,
|
|
35
35
|
type: MatLabel,
|
|
36
36
|
decorators: [{
|
|
@@ -46,7 +46,7 @@ class MatError {
|
|
|
46
46
|
id = inject(_IdGenerator).getId('mat-mdc-error-');
|
|
47
47
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
48
48
|
minVersion: "12.0.0",
|
|
49
|
-
version: "22.2.0-next.
|
|
49
|
+
version: "22.2.0-next.7",
|
|
50
50
|
ngImport: i0,
|
|
51
51
|
type: MatError,
|
|
52
52
|
deps: [],
|
|
@@ -54,7 +54,7 @@ class MatError {
|
|
|
54
54
|
});
|
|
55
55
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
56
56
|
minVersion: "14.0.0",
|
|
57
|
-
version: "22.2.0-next.
|
|
57
|
+
version: "22.2.0-next.7",
|
|
58
58
|
type: MatError,
|
|
59
59
|
isStandalone: true,
|
|
60
60
|
selector: "mat-error, [matError]",
|
|
@@ -76,7 +76,7 @@ class MatError {
|
|
|
76
76
|
}
|
|
77
77
|
i0.ɵɵngDeclareClassMetadata({
|
|
78
78
|
minVersion: "12.0.0",
|
|
79
|
-
version: "22.2.0-next.
|
|
79
|
+
version: "22.2.0-next.7",
|
|
80
80
|
ngImport: i0,
|
|
81
81
|
type: MatError,
|
|
82
82
|
decorators: [{
|
|
@@ -105,7 +105,7 @@ class MatHint {
|
|
|
105
105
|
id = inject(_IdGenerator).getId('mat-mdc-hint-');
|
|
106
106
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
107
107
|
minVersion: "12.0.0",
|
|
108
|
-
version: "22.2.0-next.
|
|
108
|
+
version: "22.2.0-next.7",
|
|
109
109
|
ngImport: i0,
|
|
110
110
|
type: MatHint,
|
|
111
111
|
deps: [],
|
|
@@ -113,7 +113,7 @@ class MatHint {
|
|
|
113
113
|
});
|
|
114
114
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
115
115
|
minVersion: "14.0.0",
|
|
116
|
-
version: "22.2.0-next.
|
|
116
|
+
version: "22.2.0-next.7",
|
|
117
117
|
type: MatHint,
|
|
118
118
|
isStandalone: true,
|
|
119
119
|
selector: "mat-hint",
|
|
@@ -134,7 +134,7 @@ class MatHint {
|
|
|
134
134
|
}
|
|
135
135
|
i0.ɵɵngDeclareClassMetadata({
|
|
136
136
|
minVersion: "12.0.0",
|
|
137
|
-
version: "22.2.0-next.
|
|
137
|
+
version: "22.2.0-next.7",
|
|
138
138
|
ngImport: i0,
|
|
139
139
|
type: MatHint,
|
|
140
140
|
decorators: [{
|
|
@@ -167,7 +167,7 @@ class MatPrefix {
|
|
|
167
167
|
_isText = false;
|
|
168
168
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
169
169
|
minVersion: "12.0.0",
|
|
170
|
-
version: "22.2.0-next.
|
|
170
|
+
version: "22.2.0-next.7",
|
|
171
171
|
ngImport: i0,
|
|
172
172
|
type: MatPrefix,
|
|
173
173
|
deps: [],
|
|
@@ -175,7 +175,7 @@ class MatPrefix {
|
|
|
175
175
|
});
|
|
176
176
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
177
177
|
minVersion: "14.0.0",
|
|
178
|
-
version: "22.2.0-next.
|
|
178
|
+
version: "22.2.0-next.7",
|
|
179
179
|
type: MatPrefix,
|
|
180
180
|
isStandalone: true,
|
|
181
181
|
selector: "[matPrefix], [matIconPrefix], [matTextPrefix]",
|
|
@@ -191,7 +191,7 @@ class MatPrefix {
|
|
|
191
191
|
}
|
|
192
192
|
i0.ɵɵngDeclareClassMetadata({
|
|
193
193
|
minVersion: "12.0.0",
|
|
194
|
-
version: "22.2.0-next.
|
|
194
|
+
version: "22.2.0-next.7",
|
|
195
195
|
ngImport: i0,
|
|
196
196
|
type: MatPrefix,
|
|
197
197
|
decorators: [{
|
|
@@ -220,7 +220,7 @@ class MatSuffix {
|
|
|
220
220
|
_isText = false;
|
|
221
221
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
222
222
|
minVersion: "12.0.0",
|
|
223
|
-
version: "22.2.0-next.
|
|
223
|
+
version: "22.2.0-next.7",
|
|
224
224
|
ngImport: i0,
|
|
225
225
|
type: MatSuffix,
|
|
226
226
|
deps: [],
|
|
@@ -228,7 +228,7 @@ class MatSuffix {
|
|
|
228
228
|
});
|
|
229
229
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
230
230
|
minVersion: "14.0.0",
|
|
231
|
-
version: "22.2.0-next.
|
|
231
|
+
version: "22.2.0-next.7",
|
|
232
232
|
type: MatSuffix,
|
|
233
233
|
isStandalone: true,
|
|
234
234
|
selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
|
|
@@ -244,7 +244,7 @@ class MatSuffix {
|
|
|
244
244
|
}
|
|
245
245
|
i0.ɵɵngDeclareClassMetadata({
|
|
246
246
|
minVersion: "12.0.0",
|
|
247
|
-
version: "22.2.0-next.
|
|
247
|
+
version: "22.2.0-next.7",
|
|
248
248
|
ngImport: i0,
|
|
249
249
|
type: MatSuffix,
|
|
250
250
|
decorators: [{
|
|
@@ -316,7 +316,7 @@ class MatFormFieldFloatingLabel {
|
|
|
316
316
|
}
|
|
317
317
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
318
318
|
minVersion: "12.0.0",
|
|
319
|
-
version: "22.2.0-next.
|
|
319
|
+
version: "22.2.0-next.7",
|
|
320
320
|
ngImport: i0,
|
|
321
321
|
type: MatFormFieldFloatingLabel,
|
|
322
322
|
deps: [],
|
|
@@ -324,7 +324,7 @@ class MatFormFieldFloatingLabel {
|
|
|
324
324
|
});
|
|
325
325
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
326
326
|
minVersion: "14.0.0",
|
|
327
|
-
version: "22.2.0-next.
|
|
327
|
+
version: "22.2.0-next.7",
|
|
328
328
|
type: MatFormFieldFloatingLabel,
|
|
329
329
|
isStandalone: true,
|
|
330
330
|
selector: "label[matFormFieldFloatingLabel]",
|
|
@@ -343,7 +343,7 @@ class MatFormFieldFloatingLabel {
|
|
|
343
343
|
}
|
|
344
344
|
i0.ɵɵngDeclareClassMetadata({
|
|
345
345
|
minVersion: "12.0.0",
|
|
346
|
-
version: "22.2.0-next.
|
|
346
|
+
version: "22.2.0-next.7",
|
|
347
347
|
ngImport: i0,
|
|
348
348
|
type: MatFormFieldFloatingLabel,
|
|
349
349
|
decorators: [{
|
|
@@ -411,7 +411,7 @@ class MatFormFieldLineRipple {
|
|
|
411
411
|
}
|
|
412
412
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
413
413
|
minVersion: "12.0.0",
|
|
414
|
-
version: "22.2.0-next.
|
|
414
|
+
version: "22.2.0-next.7",
|
|
415
415
|
ngImport: i0,
|
|
416
416
|
type: MatFormFieldLineRipple,
|
|
417
417
|
deps: [],
|
|
@@ -419,7 +419,7 @@ class MatFormFieldLineRipple {
|
|
|
419
419
|
});
|
|
420
420
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
421
421
|
minVersion: "14.0.0",
|
|
422
|
-
version: "22.2.0-next.
|
|
422
|
+
version: "22.2.0-next.7",
|
|
423
423
|
type: MatFormFieldLineRipple,
|
|
424
424
|
isStandalone: true,
|
|
425
425
|
selector: "div[matFormFieldLineRipple]",
|
|
@@ -431,7 +431,7 @@ class MatFormFieldLineRipple {
|
|
|
431
431
|
}
|
|
432
432
|
i0.ɵɵngDeclareClassMetadata({
|
|
433
433
|
minVersion: "12.0.0",
|
|
434
|
-
version: "22.2.0-next.
|
|
434
|
+
version: "22.2.0-next.7",
|
|
435
435
|
ngImport: i0,
|
|
436
436
|
type: MatFormFieldLineRipple,
|
|
437
437
|
decorators: [{
|
|
@@ -481,7 +481,7 @@ class MatFormFieldNotchedOutline {
|
|
|
481
481
|
}
|
|
482
482
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
483
483
|
minVersion: "12.0.0",
|
|
484
|
-
version: "22.2.0-next.
|
|
484
|
+
version: "22.2.0-next.7",
|
|
485
485
|
ngImport: i0,
|
|
486
486
|
type: MatFormFieldNotchedOutline,
|
|
487
487
|
deps: [],
|
|
@@ -489,7 +489,7 @@ class MatFormFieldNotchedOutline {
|
|
|
489
489
|
});
|
|
490
490
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
491
491
|
minVersion: "14.0.0",
|
|
492
|
-
version: "22.2.0-next.
|
|
492
|
+
version: "22.2.0-next.7",
|
|
493
493
|
type: MatFormFieldNotchedOutline,
|
|
494
494
|
isStandalone: true,
|
|
495
495
|
selector: "div[matFormFieldNotchedOutline]",
|
|
@@ -515,7 +515,7 @@ class MatFormFieldNotchedOutline {
|
|
|
515
515
|
}
|
|
516
516
|
i0.ɵɵngDeclareClassMetadata({
|
|
517
517
|
minVersion: "12.0.0",
|
|
518
|
-
version: "22.2.0-next.
|
|
518
|
+
version: "22.2.0-next.7",
|
|
519
519
|
ngImport: i0,
|
|
520
520
|
type: MatFormFieldNotchedOutline,
|
|
521
521
|
decorators: [{
|
|
@@ -561,7 +561,7 @@ class MatFormFieldControl {
|
|
|
561
561
|
describedByIds;
|
|
562
562
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
563
563
|
minVersion: "12.0.0",
|
|
564
|
-
version: "22.2.0-next.
|
|
564
|
+
version: "22.2.0-next.7",
|
|
565
565
|
ngImport: i0,
|
|
566
566
|
type: MatFormFieldControl,
|
|
567
567
|
deps: [],
|
|
@@ -569,7 +569,7 @@ class MatFormFieldControl {
|
|
|
569
569
|
});
|
|
570
570
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
571
571
|
minVersion: "14.0.0",
|
|
572
|
-
version: "22.2.0-next.
|
|
572
|
+
version: "22.2.0-next.7",
|
|
573
573
|
type: MatFormFieldControl,
|
|
574
574
|
isStandalone: true,
|
|
575
575
|
ngImport: i0
|
|
@@ -577,7 +577,7 @@ class MatFormFieldControl {
|
|
|
577
577
|
}
|
|
578
578
|
i0.ɵɵngDeclareClassMetadata({
|
|
579
579
|
minVersion: "12.0.0",
|
|
580
|
-
version: "22.2.0-next.
|
|
580
|
+
version: "22.2.0-next.7",
|
|
581
581
|
ngImport: i0,
|
|
582
582
|
type: MatFormFieldControl,
|
|
583
583
|
decorators: [{
|
|
@@ -1006,7 +1006,7 @@ class MatFormField {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1008
1008
|
minVersion: "12.0.0",
|
|
1009
|
-
version: "22.2.0-next.
|
|
1009
|
+
version: "22.2.0-next.7",
|
|
1010
1010
|
ngImport: i0,
|
|
1011
1011
|
type: MatFormField,
|
|
1012
1012
|
deps: [],
|
|
@@ -1014,7 +1014,7 @@ class MatFormField {
|
|
|
1014
1014
|
});
|
|
1015
1015
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1016
1016
|
minVersion: "17.0.0",
|
|
1017
|
-
version: "22.2.0-next.
|
|
1017
|
+
version: "22.2.0-next.7",
|
|
1018
1018
|
type: MatFormField,
|
|
1019
1019
|
isStandalone: true,
|
|
1020
1020
|
selector: "mat-form-field",
|
|
@@ -1184,7 +1184,7 @@ class MatFormField {
|
|
|
1184
1184
|
}
|
|
1185
1185
|
i0.ɵɵngDeclareClassMetadata({
|
|
1186
1186
|
minVersion: "12.0.0",
|
|
1187
|
-
version: "22.2.0-next.
|
|
1187
|
+
version: "22.2.0-next.7",
|
|
1188
1188
|
ngImport: i0,
|
|
1189
1189
|
type: MatFormField,
|
|
1190
1190
|
decorators: [{
|
|
@@ -111,7 +111,7 @@ class MatButtonBase {
|
|
|
111
111
|
}
|
|
112
112
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
113
113
|
minVersion: "12.0.0",
|
|
114
|
-
version: "22.2.0-next.
|
|
114
|
+
version: "22.2.0-next.7",
|
|
115
115
|
ngImport: i0,
|
|
116
116
|
type: MatButtonBase,
|
|
117
117
|
deps: [],
|
|
@@ -119,7 +119,7 @@ class MatButtonBase {
|
|
|
119
119
|
});
|
|
120
120
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
121
121
|
minVersion: "17.1.0",
|
|
122
|
-
version: "22.2.0-next.
|
|
122
|
+
version: "22.2.0-next.7",
|
|
123
123
|
type: MatButtonBase,
|
|
124
124
|
isStandalone: true,
|
|
125
125
|
inputs: {
|
|
@@ -199,7 +199,7 @@ class MatButtonBase {
|
|
|
199
199
|
}
|
|
200
200
|
i0.ɵɵngDeclareClassMetadata({
|
|
201
201
|
minVersion: "12.0.0",
|
|
202
|
-
version: "22.2.0-next.
|
|
202
|
+
version: "22.2.0-next.7",
|
|
203
203
|
ngImport: i0,
|
|
204
204
|
type: MatButtonBase,
|
|
205
205
|
decorators: [{
|
|
@@ -282,7 +282,7 @@ class MatIconButton extends MatButtonBase {
|
|
|
282
282
|
}
|
|
283
283
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
284
284
|
minVersion: "12.0.0",
|
|
285
|
-
version: "22.2.0-next.
|
|
285
|
+
version: "22.2.0-next.7",
|
|
286
286
|
ngImport: i0,
|
|
287
287
|
type: MatIconButton,
|
|
288
288
|
deps: [],
|
|
@@ -290,7 +290,7 @@ class MatIconButton extends MatButtonBase {
|
|
|
290
290
|
});
|
|
291
291
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
292
292
|
minVersion: "17.0.0",
|
|
293
|
-
version: "22.2.0-next.
|
|
293
|
+
version: "22.2.0-next.7",
|
|
294
294
|
type: MatIconButton,
|
|
295
295
|
isStandalone: true,
|
|
296
296
|
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
@@ -307,7 +307,7 @@ class MatIconButton extends MatButtonBase {
|
|
|
307
307
|
}
|
|
308
308
|
i0.ɵɵngDeclareClassMetadata({
|
|
309
309
|
minVersion: "12.0.0",
|
|
310
|
-
version: "22.2.0-next.
|
|
310
|
+
version: "22.2.0-next.7",
|
|
311
311
|
ngImport: i0,
|
|
312
312
|
type: MatIconButton,
|
|
313
313
|
decorators: [{
|
|
@@ -301,7 +301,7 @@ class MatIconRegistry {
|
|
|
301
301
|
}
|
|
302
302
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
303
303
|
minVersion: "12.0.0",
|
|
304
|
-
version: "22.2.0-next.
|
|
304
|
+
version: "22.2.0-next.7",
|
|
305
305
|
ngImport: i0,
|
|
306
306
|
type: MatIconRegistry,
|
|
307
307
|
deps: [{
|
|
@@ -319,7 +319,7 @@ class MatIconRegistry {
|
|
|
319
319
|
});
|
|
320
320
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
321
321
|
minVersion: "12.0.0",
|
|
322
|
-
version: "22.2.0-next.
|
|
322
|
+
version: "22.2.0-next.7",
|
|
323
323
|
ngImport: i0,
|
|
324
324
|
type: MatIconRegistry,
|
|
325
325
|
providedIn: 'root'
|
|
@@ -327,7 +327,7 @@ class MatIconRegistry {
|
|
|
327
327
|
}
|
|
328
328
|
i0.ɵɵngDeclareClassMetadata({
|
|
329
329
|
minVersion: "12.0.0",
|
|
330
|
-
version: "22.2.0-next.
|
|
330
|
+
version: "22.2.0-next.7",
|
|
331
331
|
ngImport: i0,
|
|
332
332
|
type: MatIconRegistry,
|
|
333
333
|
decorators: [{
|
|
@@ -365,25 +365,24 @@ function isSafeUrlWithOptions(value) {
|
|
|
365
365
|
return !!(value.url && value.options);
|
|
366
366
|
}
|
|
367
367
|
function inferDefaultFontSetClass(document) {
|
|
368
|
-
let
|
|
368
|
+
let materialSymbolsVariation = null;
|
|
369
369
|
let hasLegacyMaterialIcons = false;
|
|
370
370
|
if (document.fonts && typeof document.fonts.forEach === 'function') {
|
|
371
|
-
document.fonts.forEach(
|
|
372
|
-
family
|
|
373
|
-
|
|
374
|
-
if (family.includes('Material Icons')) {
|
|
371
|
+
document.fonts.forEach(font => {
|
|
372
|
+
const family = font.family.replace(/['"]/g, '').trim().toLowerCase();
|
|
373
|
+
if (family === 'material icons' || family.startsWith('material icons ')) {
|
|
375
374
|
hasLegacyMaterialIcons = true;
|
|
376
375
|
}
|
|
377
|
-
if (family.
|
|
378
|
-
|
|
379
|
-
} else if (family.
|
|
380
|
-
|
|
381
|
-
} else if (family.
|
|
382
|
-
|
|
376
|
+
if (family.startsWith('material symbols rounded')) {
|
|
377
|
+
materialSymbolsVariation = 'rounded';
|
|
378
|
+
} else if (family.startsWith('material symbols sharp')) {
|
|
379
|
+
materialSymbolsVariation = 'sharp';
|
|
380
|
+
} else if (family.startsWith('material symbols')) {
|
|
381
|
+
materialSymbolsVariation = 'outlined';
|
|
383
382
|
}
|
|
384
383
|
});
|
|
385
384
|
}
|
|
386
|
-
return [
|
|
385
|
+
return [materialSymbolsVariation && !hasLegacyMaterialIcons ? `material-symbols-${materialSymbolsVariation}` : 'material-icons', 'mat-ligature-font'];
|
|
387
386
|
}
|
|
388
387
|
|
|
389
388
|
export { MatIconRegistry, getMatIconFailedToSanitizeLiteralError, getMatIconFailedToSanitizeUrlError, getMatIconNameNotFoundError, getMatIconNoHttpProviderError };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_icon-registry-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/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.dev/license\n */\n\nimport {TrustedHTML, trustedHTMLFromString} from '@angular/cdk/private';\nimport {HttpClient, HttpErrorResponse} from '@angular/common/http';\nimport {\n ErrorHandler,\n Inject,\n Injectable,\n OnDestroy,\n Optional,\n SecurityContext,\n DOCUMENT,\n} from '@angular/core';\nimport {DomSanitizer, SafeHtml, SafeResourceUrl} 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 * 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 * Returns an exception to be thrown when the consumer attempts to use\n * `<mat-icon>` without including @angular/common/http.\n * @docs-private\n */\nexport function getMatIconNoHttpProviderError(): Error {\n return Error(\n 'Could not find HttpClient for use with Angular Material icons. ' +\n 'Please add provideHttpClient() to your providers.',\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(\n `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/**\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(\n `The literal provided to MatIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`,\n );\n}\n\n/** Options that can be used to configure how an icon or the icons in an icon set are presented. */\nexport interface IconOptions {\n /** View box to set on the icon. */\n viewBox?: string;\n\n /** Whether or not to fetch the icon or icon set using HTTP credentials. */\n withCredentials?: boolean;\n}\n\n/**\n * Function that will be invoked by the icon registry when trying to resolve the\n * URL from which to fetch an icon. The returned URL will be used to make a request for the icon.\n */\nexport type IconResolver = (\n name: string,\n namespace: string,\n) => SafeResourceUrl | SafeResourceUrlWithIconOptions | null;\n\n/** Object that specifies a URL from which to fetch an icon and the options to use for it. */\nexport interface SafeResourceUrlWithIconOptions {\n url: SafeResourceUrl;\n options: IconOptions;\n}\n\n/**\n * Configuration for an icon, including the URL and possibly the cached SVG element.\n * @docs-private\n */\nclass SvgIconConfig {\n svgElement: SVGElement | null = null;\n\n constructor(\n public url: SafeResourceUrl,\n public svgText: TrustedHTML | null,\n public options?: IconOptions,\n ) {}\n}\n\n/** Icon configuration whose content has already been loaded. */\ntype LoadedSvgIconConfig = SvgIconConfig & {svgText: TrustedHTML};\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<TrustedHTML>>();\n\n /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n private _fontCssClassesByAlias = new Map<string, string>();\n\n /** Registered icon resolver functions. */\n private _resolvers: IconResolver[] = [];\n\n /**\n * The CSS classes to apply when an `<mat-icon>` component has no icon name, url, or font\n * specified. The default 'material-icons' value assumes that the material icon font has been\n * loaded as described at https://google.github.io/material-design-icons/#icon-font-for-the-web\n */\n private _defaultFontSetClass: string[] | undefined;\n\n constructor(\n @Optional() private _httpClient: HttpClient,\n private _sanitizer: DomSanitizer,\n @Optional() @Inject(DOCUMENT) document: any,\n private readonly _errorHandler: ErrorHandler,\n ) {\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, options?: IconOptions): this {\n return this.addSvgIconInNamespace('', iconName, url, options);\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, options?: IconOptions): this {\n return this.addSvgIconLiteralInNamespace('', iconName, literal, options);\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(\n namespace: string,\n iconName: string,\n url: SafeResourceUrl,\n options?: IconOptions,\n ): this {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, null, options));\n }\n\n /**\n * Registers an icon resolver function with the registry. The function will be invoked with the\n * name and namespace of an icon when the registry tries to resolve the URL from which to fetch\n * the icon. The resolver is expected to return a `SafeResourceUrl` that points to the icon,\n * an object with the icon URL and icon options, or `null` if the icon is not supported. Resolvers\n * will be invoked in the order in which they have been registered.\n * @param resolver Resolver function to be registered.\n */\n addSvgIconResolver(resolver: IconResolver): this {\n this._resolvers.push(resolver);\n return this;\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(\n namespace: string,\n iconName: string,\n literal: SafeHtml,\n options?: IconOptions,\n ): this {\n const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n // TODO: add an ngDevMode check\n if (!cleanLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n // Security: The literal is passed in as SafeHtml, and is thus trusted.\n const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n return this._addSvgIconConfig(\n namespace,\n iconName,\n new SvgIconConfig('', trustedLiteral, options),\n );\n }\n\n /**\n * Registers an icon set by URL in the default namespace.\n * @param url\n */\n addSvgIconSet(url: SafeResourceUrl, options?: IconOptions): this {\n return this.addSvgIconSetInNamespace('', url, options);\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, options?: IconOptions): this {\n return this.addSvgIconSetLiteralInNamespace('', literal, options);\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, options?: IconOptions): this {\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url, null, options));\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(\n namespace: string,\n literal: SafeHtml,\n options?: IconOptions,\n ): this {\n const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!cleanLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n // Security: The literal is passed in as SafeHtml, and is thus trusted.\n const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig('', trustedLiteral, options));\n }\n\n /**\n * Defines an alias for CSS class names 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 * If the registered font is a ligature font, then don't forget to also include the special\n * class `mat-ligature-font` to allow the usage via attribute. So register like this:\n *\n * ```ts\n * iconRegistry.registerFontClassAlias('f1', 'font1 mat-ligature-font');\n * ```\n *\n * And use like this:\n *\n * ```html\n * <mat-icon fontSet=\"f1\" fontIcon=\"home\"></mat-icon>\n * ```\n *\n * @param alias Alias for the font.\n * @param classNames Class names override to be used instead of the alias.\n */\n registerFontClassAlias(alias: string, classNames: string = alias): this {\n this._fontCssClassesByAlias.set(alias, classNames);\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 classes 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 setDefaultFontSetClass(...classNames: string[]): this {\n this._defaultFontSetClass = classNames;\n return this;\n }\n\n /**\n * Returns the CSS classes 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 this._defaultFontSetClass ??= inferDefaultFontSetClass(this._document);\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, null)).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 const key = iconKey(namespace, name);\n let config = this._svgIconConfigs.get(key);\n\n // Return (copy of) cached icon if possible.\n if (config) {\n return this._getSvgFromConfig(config);\n }\n\n // Otherwise try to resolve the config from one of the resolver functions.\n config = this._getIconConfigFromResolvers(namespace, name);\n\n if (config) {\n this._svgIconConfigs.set(key, 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._resolvers = [];\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.svgText) {\n // We already have the SVG element for this icon, return a copy.\n return observableOf(cloneSvg(this._svgElementFromConfig(config as LoadedSvgIconConfig)));\n } else {\n // Fetch the icon from the config's URL, cache it, and return a copy.\n return this._loadSvgIconFromConfig(config).pipe(map(svg => cloneSvg(svg)));\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(\n name: string,\n 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<TrustedHTML | null>[] = iconSetConfigs\n .filter(iconSetConfig => !iconSetConfig.svgText)\n .map(iconSetConfig => {\n return this._loadSvgIconSetFromConfig(iconSetConfig).pipe(\n catchError((err: HttpErrorResponse) => {\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 const errorMessage = `Loading icon set URL: ${url} failed: ${err.message}`;\n this._errorHandler.handleError(new Error(errorMessage));\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(\n map(() => {\n const foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n // TODO: add an ngDevMode check\n if (!foundIcon) {\n throw getMatIconNameNotFoundError(name);\n }\n\n return foundIcon;\n }),\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(\n iconName: string,\n 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\n // Parsing the icon set's text into an SVG element can be expensive. We can avoid some of\n // the parsing by doing a quick check using `indexOf` to see if there's any chance for the\n // icon to be in the set. This won't be 100% accurate, but it should help us avoid at least\n // some of the parsing.\n if (config.svgText && config.svgText.toString().indexOf(iconName) > -1) {\n const svg = this._svgElementFromConfig(config as LoadedSvgIconConfig);\n const foundIcon = this._extractSvgIconFromSet(svg, iconName, config.options);\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._fetchIcon(config).pipe(\n tap(svgText => (config.svgText = svgText)),\n map(() => this._svgElementFromConfig(config as LoadedSvgIconConfig)),\n );\n }\n\n /**\n * Loads the content of the icon set URL specified in the\n * SvgIconConfig and attaches it to the config.\n */\n private _loadSvgIconSetFromConfig(config: SvgIconConfig): Observable<TrustedHTML | null> {\n if (config.svgText) {\n return observableOf(null);\n }\n\n return this._fetchIcon(config).pipe(tap(svgText => (config.svgText = svgText)));\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(\n iconSet: SVGElement,\n iconName: string,\n options?: IconOptions,\n ): SVGElement | null {\n // Use the `id=\"iconName\"` syntax in order to escape special\n // characters in the ID (versus using the #iconName syntax).\n const iconSource = iconSet.querySelector(`[id=\"${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, options);\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), options);\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(trustedHTMLFromString('<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, options);\n }\n\n /**\n * Creates a DOM element from the given SVG string.\n */\n private _svgElementFromString(str: TrustedHTML): SVGElement {\n const div = this._document.createElement('DIV');\n div.innerHTML = str as unknown as string;\n const svg = div.querySelector('svg') as SVGElement;\n\n // TODO: add an ngDevMode check\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 const svg = this._svgElementFromString(trustedHTMLFromString('<svg></svg>'));\n const attributes = element.attributes;\n\n // Copy over all the attributes from the `symbol` to the new SVG, except the id.\n for (let i = 0; i < attributes.length; i++) {\n const {name, value} = attributes[i];\n\n if (name !== 'id') {\n svg.setAttribute(name, value);\n }\n }\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, options?: IconOptions): 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\n if (options && options.viewBox) {\n svg.setAttribute('viewBox', options.viewBox);\n }\n\n return svg;\n }\n\n /**\n * Returns an Observable which produces the string contents of the given icon. Results may be\n * cached, so future calls with the same URL may not cause another HTTP request.\n */\n private _fetchIcon(iconConfig: SvgIconConfig): Observable<TrustedHTML> {\n const {url: safeUrl, options} = iconConfig;\n const withCredentials = options?.withCredentials ?? false;\n\n if (!this._httpClient) {\n throw getMatIconNoHttpProviderError();\n }\n\n // TODO: add an ngDevMode check\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 // TODO: add an ngDevMode check\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 const req = this._httpClient.get(url, {responseType: 'text', withCredentials}).pipe(\n map(svg => {\n // Security: This SVG is fetched from a SafeResourceUrl, and is thus\n // trusted HTML.\n return trustedHTMLFromString(svg);\n }),\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 /** Parses a config's text into an SVG element. */\n private _svgElementFromConfig(config: LoadedSvgIconConfig): SVGElement {\n if (!config.svgElement) {\n const svg = this._svgElementFromString(config.svgText);\n this._setSvgAttributes(svg, config.options);\n config.svgElement = svg;\n }\n\n return config.svgElement;\n }\n\n /** Tries to create an icon config through the registered resolver functions. */\n private _getIconConfigFromResolvers(namespace: string, name: string): SvgIconConfig | undefined {\n for (let i = 0; i < this._resolvers.length; i++) {\n const result = this._resolvers[i](name, namespace);\n\n if (result) {\n return isSafeUrlWithOptions(result)\n ? new SvgIconConfig(result.url, null, result.options)\n : new SvgIconConfig(result, null);\n }\n }\n\n return undefined;\n }\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\nfunction isSafeUrlWithOptions(value: any): value is SafeResourceUrlWithIconOptions {\n return !!(value.url && value.options);\n}\n\n/** Infers which font classes to apply by default based on the fonts that have been loaded. */\nfunction inferDefaultFontSetClass(document: Document): string[] {\n let materialSymbolsVariantion: 'outlined' | 'rounded' | 'sharp' | null = null;\n let hasLegacyMaterialIcons = false;\n\n // Note that this approach only detects the fonts that are link tags at the time of calling\n // so we may miss some fonts that are loaded later. That should be a minority and the logic\n // below still falls back to the old behavior if that happens.\n if (document.fonts && typeof document.fonts.forEach === 'function') {\n document.fonts.forEach(({family}) => {\n if (family.includes('Material Icons')) {\n hasLegacyMaterialIcons = true;\n }\n\n if (family.includes('Material Symbols Rounded')) {\n materialSymbolsVariantion = 'rounded';\n } else if (family.includes('Material Symbols Sharp')) {\n materialSymbolsVariantion = 'sharp';\n } else if (family.includes('Material Symbols')) {\n // This should mostly catch `Material Symbols Outlined`,\n // but we keep it a bit broader just in case.\n materialSymbolsVariantion = 'outlined';\n }\n });\n }\n\n return [\n // Ideally we would add both `material-symbols-*` and `material-icons` if we detect both fonts,\n // however this ends up being very breaking internally, because some apps were loading both\n // without setting the correct class. We play it safe here so we can at least handle the class\n // automatically for new apps.\n materialSymbolsVariantion && !hasLegacyMaterialIcons\n ? `material-symbols-${materialSymbolsVariantion}`\n : 'material-icons',\n 'mat-ligature-font',\n ];\n}\n"],"names":["observableOf","observableThrow"],"mappings":";;;;;;;;AA4BM,SAAU,2BAA2B,CAAC,QAAgB,EAAA;AAC1D,EAAA,OAAO,KAAK,CAAC,CAAA,mCAAA,EAAsC,QAAQ,GAAG,CAAC;AACjE;SAOgB,6BAA6B,GAAA;AAC3C,EAAA,OAAO,KAAK,CACV,iEAAiE,GAC/D,mDAAmD,CACtD;AACH;AAOM,SAAU,kCAAkC,CAAC,GAAoB,EAAA;AACrE,EAAA,OAAO,KAAK,CACV,CAAA,sEAAA,CAAwE,GACtE,CAAA,+CAAA,EAAkD,GAAG,IAAI,CAC5D;AACH;AAOM,SAAU,sCAAsC,CAAC,OAAiB,EAAA;AACtE,EAAA,OAAO,KAAK,CACV,CAAA,wEAAA,CAA0E,GACxE,CAAA,+CAAA,EAAkD,OAAO,IAAI,CAChE;AACH;AA8BA,MAAM,aAAa,CAAA;EAIR,GAAA;EACA,OAAA;EACA,OAAA;AALT,EAAA,UAAU,GAAsB,IAAI;AAEpC,EAAA,WAAA,CACS,GAAoB,EACpB,OAA2B,EAC3B,OAAqB,EAAA;IAFrB,IAAA,CAAA,GAAG,GAAH,GAAG;IACH,IAAA,CAAA,OAAO,GAAP,OAAO;IACP,IAAA,CAAA,OAAO,GAAP,OAAO;AACb,EAAA;AACJ;MAaY,eAAe,CAAA;EAkCJ,WAAA;EACZ,UAAA;EAES,aAAA;EApCX,SAAS;AAKT,EAAA,eAAe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ACtC,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC;AACvC;AAGA,SAAS,wBAAwB,CAAC,QAAkB,EAAA;EAClD,IAAI,yBAAyB,GAA4C,IAAI;EAC7E,IAAI,sBAAsB,GAAG,KAAK;AAKlC,EAAA,IAAI,QAAQ,CAAC,KAAK,IAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,OAAO,KAAK,UAAU,EAAE;AAClE,IAAA,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAAC,MAAA;AAAM,KAAC,KAAI;AAClC,MAAA,IAAI,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;AACrC,QAAA,sBAAsB,GAAG,IAAI;AAC/B,MAAA;AAEA,MAAA,IAAI,MAAM,CAAC,QAAQ,CAAC,0BAA0B,CAAC,EAAE;AAC/C,QAAA,yBAAyB,GAAG,SAAS;MACvC,CAAA,MAAO,IAAI,MAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EAAE;AACpD,QAAA,yBAAyB,GAAG,OAAO;MACrC,CAAA,MAAO,IAAI,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE;AAG9C,QAAA,yBAAyB,GAAG,UAAU;AACxC,MAAA;AACF,IAAA,CAAC,CAAC;AACJ,EAAA;AAEA,EAAA,OAAO,CAKL,yBAAyB,IAAI,CAAC,sBAAA,GAC1B,CAAA,iBAAA,EAAoB,yBAAyB,CAAA,CAAA,GAC7C,gBAAgB,EACpB,mBAAmB,CACpB;AACH;;"}
|
|
1
|
+
{"version":3,"file":"_icon-registry-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/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.dev/license\n */\n\nimport {TrustedHTML, trustedHTMLFromString} from '@angular/cdk/private';\nimport {HttpClient, HttpErrorResponse} from '@angular/common/http';\nimport {\n ErrorHandler,\n Inject,\n Injectable,\n OnDestroy,\n Optional,\n SecurityContext,\n DOCUMENT,\n} from '@angular/core';\nimport {DomSanitizer, SafeHtml, SafeResourceUrl} 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 * 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 * Returns an exception to be thrown when the consumer attempts to use\n * `<mat-icon>` without including @angular/common/http.\n * @docs-private\n */\nexport function getMatIconNoHttpProviderError(): Error {\n return Error(\n 'Could not find HttpClient for use with Angular Material icons. ' +\n 'Please add provideHttpClient() to your providers.',\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(\n `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/**\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(\n `The literal provided to MatIconRegistry was not trusted as safe HTML by ` +\n `Angular's DomSanitizer. Attempted literal was \"${literal}\".`,\n );\n}\n\n/** Options that can be used to configure how an icon or the icons in an icon set are presented. */\nexport interface IconOptions {\n /** View box to set on the icon. */\n viewBox?: string;\n\n /** Whether or not to fetch the icon or icon set using HTTP credentials. */\n withCredentials?: boolean;\n}\n\n/**\n * Function that will be invoked by the icon registry when trying to resolve the\n * URL from which to fetch an icon. The returned URL will be used to make a request for the icon.\n */\nexport type IconResolver = (\n name: string,\n namespace: string,\n) => SafeResourceUrl | SafeResourceUrlWithIconOptions | null;\n\n/** Object that specifies a URL from which to fetch an icon and the options to use for it. */\nexport interface SafeResourceUrlWithIconOptions {\n url: SafeResourceUrl;\n options: IconOptions;\n}\n\n/**\n * Configuration for an icon, including the URL and possibly the cached SVG element.\n * @docs-private\n */\nclass SvgIconConfig {\n svgElement: SVGElement | null = null;\n\n constructor(\n public url: SafeResourceUrl,\n public svgText: TrustedHTML | null,\n public options?: IconOptions,\n ) {}\n}\n\n/** Icon configuration whose content has already been loaded. */\ntype LoadedSvgIconConfig = SvgIconConfig & {svgText: TrustedHTML};\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<TrustedHTML>>();\n\n /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n private _fontCssClassesByAlias = new Map<string, string>();\n\n /** Registered icon resolver functions. */\n private _resolvers: IconResolver[] = [];\n\n /**\n * The CSS classes to apply when an `<mat-icon>` component has no icon name, url, or font\n * specified. The default 'material-icons' value assumes that the material icon font has been\n * loaded as described at https://google.github.io/material-design-icons/#icon-font-for-the-web\n */\n private _defaultFontSetClass: string[] | undefined;\n\n constructor(\n @Optional() private _httpClient: HttpClient,\n private _sanitizer: DomSanitizer,\n @Optional() @Inject(DOCUMENT) document: any,\n private readonly _errorHandler: ErrorHandler,\n ) {\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, options?: IconOptions): this {\n return this.addSvgIconInNamespace('', iconName, url, options);\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, options?: IconOptions): this {\n return this.addSvgIconLiteralInNamespace('', iconName, literal, options);\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(\n namespace: string,\n iconName: string,\n url: SafeResourceUrl,\n options?: IconOptions,\n ): this {\n return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, null, options));\n }\n\n /**\n * Registers an icon resolver function with the registry. The function will be invoked with the\n * name and namespace of an icon when the registry tries to resolve the URL from which to fetch\n * the icon. The resolver is expected to return a `SafeResourceUrl` that points to the icon,\n * an object with the icon URL and icon options, or `null` if the icon is not supported. Resolvers\n * will be invoked in the order in which they have been registered.\n * @param resolver Resolver function to be registered.\n */\n addSvgIconResolver(resolver: IconResolver): this {\n this._resolvers.push(resolver);\n return this;\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(\n namespace: string,\n iconName: string,\n literal: SafeHtml,\n options?: IconOptions,\n ): this {\n const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n // TODO: add an ngDevMode check\n if (!cleanLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n // Security: The literal is passed in as SafeHtml, and is thus trusted.\n const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n return this._addSvgIconConfig(\n namespace,\n iconName,\n new SvgIconConfig('', trustedLiteral, options),\n );\n }\n\n /**\n * Registers an icon set by URL in the default namespace.\n * @param url\n */\n addSvgIconSet(url: SafeResourceUrl, options?: IconOptions): this {\n return this.addSvgIconSetInNamespace('', url, options);\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, options?: IconOptions): this {\n return this.addSvgIconSetLiteralInNamespace('', literal, options);\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, options?: IconOptions): this {\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url, null, options));\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(\n namespace: string,\n literal: SafeHtml,\n options?: IconOptions,\n ): this {\n const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n\n if (!cleanLiteral) {\n throw getMatIconFailedToSanitizeLiteralError(literal);\n }\n\n // Security: The literal is passed in as SafeHtml, and is thus trusted.\n const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n return this._addSvgIconSetConfig(namespace, new SvgIconConfig('', trustedLiteral, options));\n }\n\n /**\n * Defines an alias for CSS class names 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 * If the registered font is a ligature font, then don't forget to also include the special\n * class `mat-ligature-font` to allow the usage via attribute. So register like this:\n *\n * ```ts\n * iconRegistry.registerFontClassAlias('f1', 'font1 mat-ligature-font');\n * ```\n *\n * And use like this:\n *\n * ```html\n * <mat-icon fontSet=\"f1\" fontIcon=\"home\"></mat-icon>\n * ```\n *\n * @param alias Alias for the font.\n * @param classNames Class names override to be used instead of the alias.\n */\n registerFontClassAlias(alias: string, classNames: string = alias): this {\n this._fontCssClassesByAlias.set(alias, classNames);\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 classes 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 setDefaultFontSetClass(...classNames: string[]): this {\n this._defaultFontSetClass = classNames;\n return this;\n }\n\n /**\n * Returns the CSS classes 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 this._defaultFontSetClass ??= inferDefaultFontSetClass(this._document);\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, null)).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 const key = iconKey(namespace, name);\n let config = this._svgIconConfigs.get(key);\n\n // Return (copy of) cached icon if possible.\n if (config) {\n return this._getSvgFromConfig(config);\n }\n\n // Otherwise try to resolve the config from one of the resolver functions.\n config = this._getIconConfigFromResolvers(namespace, name);\n\n if (config) {\n this._svgIconConfigs.set(key, 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._resolvers = [];\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.svgText) {\n // We already have the SVG element for this icon, return a copy.\n return observableOf(cloneSvg(this._svgElementFromConfig(config as LoadedSvgIconConfig)));\n } else {\n // Fetch the icon from the config's URL, cache it, and return a copy.\n return this._loadSvgIconFromConfig(config).pipe(map(svg => cloneSvg(svg)));\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(\n name: string,\n 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<TrustedHTML | null>[] = iconSetConfigs\n .filter(iconSetConfig => !iconSetConfig.svgText)\n .map(iconSetConfig => {\n return this._loadSvgIconSetFromConfig(iconSetConfig).pipe(\n catchError((err: HttpErrorResponse) => {\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 const errorMessage = `Loading icon set URL: ${url} failed: ${err.message}`;\n this._errorHandler.handleError(new Error(errorMessage));\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(\n map(() => {\n const foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n\n // TODO: add an ngDevMode check\n if (!foundIcon) {\n throw getMatIconNameNotFoundError(name);\n }\n\n return foundIcon;\n }),\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(\n iconName: string,\n 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\n // Parsing the icon set's text into an SVG element can be expensive. We can avoid some of\n // the parsing by doing a quick check using `indexOf` to see if there's any chance for the\n // icon to be in the set. This won't be 100% accurate, but it should help us avoid at least\n // some of the parsing.\n if (config.svgText && config.svgText.toString().indexOf(iconName) > -1) {\n const svg = this._svgElementFromConfig(config as LoadedSvgIconConfig);\n const foundIcon = this._extractSvgIconFromSet(svg, iconName, config.options);\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._fetchIcon(config).pipe(\n tap(svgText => (config.svgText = svgText)),\n map(() => this._svgElementFromConfig(config as LoadedSvgIconConfig)),\n );\n }\n\n /**\n * Loads the content of the icon set URL specified in the\n * SvgIconConfig and attaches it to the config.\n */\n private _loadSvgIconSetFromConfig(config: SvgIconConfig): Observable<TrustedHTML | null> {\n if (config.svgText) {\n return observableOf(null);\n }\n\n return this._fetchIcon(config).pipe(tap(svgText => (config.svgText = svgText)));\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(\n iconSet: SVGElement,\n iconName: string,\n options?: IconOptions,\n ): SVGElement | null {\n // Use the `id=\"iconName\"` syntax in order to escape special\n // characters in the ID (versus using the #iconName syntax).\n const iconSource = iconSet.querySelector(`[id=\"${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, options);\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), options);\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(trustedHTMLFromString('<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, options);\n }\n\n /**\n * Creates a DOM element from the given SVG string.\n */\n private _svgElementFromString(str: TrustedHTML): SVGElement {\n const div = this._document.createElement('DIV');\n div.innerHTML = str as unknown as string;\n const svg = div.querySelector('svg') as SVGElement;\n\n // TODO: add an ngDevMode check\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 const svg = this._svgElementFromString(trustedHTMLFromString('<svg></svg>'));\n const attributes = element.attributes;\n\n // Copy over all the attributes from the `symbol` to the new SVG, except the id.\n for (let i = 0; i < attributes.length; i++) {\n const {name, value} = attributes[i];\n\n if (name !== 'id') {\n svg.setAttribute(name, value);\n }\n }\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, options?: IconOptions): 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\n if (options && options.viewBox) {\n svg.setAttribute('viewBox', options.viewBox);\n }\n\n return svg;\n }\n\n /**\n * Returns an Observable which produces the string contents of the given icon. Results may be\n * cached, so future calls with the same URL may not cause another HTTP request.\n */\n private _fetchIcon(iconConfig: SvgIconConfig): Observable<TrustedHTML> {\n const {url: safeUrl, options} = iconConfig;\n const withCredentials = options?.withCredentials ?? false;\n\n if (!this._httpClient) {\n throw getMatIconNoHttpProviderError();\n }\n\n // TODO: add an ngDevMode check\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 // TODO: add an ngDevMode check\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 const req = this._httpClient.get(url, {responseType: 'text', withCredentials}).pipe(\n map(svg => {\n // Security: This SVG is fetched from a SafeResourceUrl, and is thus\n // trusted HTML.\n return trustedHTMLFromString(svg);\n }),\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 /** Parses a config's text into an SVG element. */\n private _svgElementFromConfig(config: LoadedSvgIconConfig): SVGElement {\n if (!config.svgElement) {\n const svg = this._svgElementFromString(config.svgText);\n this._setSvgAttributes(svg, config.options);\n config.svgElement = svg;\n }\n\n return config.svgElement;\n }\n\n /** Tries to create an icon config through the registered resolver functions. */\n private _getIconConfigFromResolvers(namespace: string, name: string): SvgIconConfig | undefined {\n for (let i = 0; i < this._resolvers.length; i++) {\n const result = this._resolvers[i](name, namespace);\n\n if (result) {\n return isSafeUrlWithOptions(result)\n ? new SvgIconConfig(result.url, null, result.options)\n : new SvgIconConfig(result, null);\n }\n }\n\n return undefined;\n }\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\nfunction isSafeUrlWithOptions(value: any): value is SafeResourceUrlWithIconOptions {\n return !!(value.url && value.options);\n}\n\n/** Infers which font classes to apply by default based on the fonts that have been loaded. */\nfunction inferDefaultFontSetClass(document: Document): string[] {\n let materialSymbolsVariation: 'outlined' | 'rounded' | 'sharp' | null = null;\n let hasLegacyMaterialIcons = false;\n\n // Note that this approach only detects the fonts that are link tags at the time of calling\n // so we may miss some fonts that are loaded later. That should be a minority and the logic\n // below still falls back to the old behavior if that happens.\n if (document.fonts && typeof document.fonts.forEach === 'function') {\n document.fonts.forEach(font => {\n const family = font.family.replace(/['\"]/g, '').trim().toLowerCase();\n\n if (family === 'material icons' || family.startsWith('material icons ')) {\n hasLegacyMaterialIcons = true;\n }\n\n if (family.startsWith('material symbols rounded')) {\n materialSymbolsVariation = 'rounded';\n } else if (family.startsWith('material symbols sharp')) {\n materialSymbolsVariation = 'sharp';\n } else if (family.startsWith('material symbols')) {\n // This should mostly catch `Material Symbols Outlined`,\n // but we keep it a bit broader just in case.\n materialSymbolsVariation = 'outlined';\n }\n });\n }\n\n return [\n // Ideally we would add both `material-symbols-*` and `material-icons` if we detect both fonts,\n // however this ends up being very breaking internally, because some apps were loading both\n // without setting the correct class. We play it safe here so we can at least handle the class\n // automatically for new apps.\n materialSymbolsVariation && !hasLegacyMaterialIcons\n ? `material-symbols-${materialSymbolsVariation}`\n : 'material-icons',\n 'mat-ligature-font',\n ];\n}\n"],"names":["observableOf","observableThrow"],"mappings":";;;;;;;;AA4BM,SAAU,2BAA2B,CAAC,QAAgB,EAAA;AAC1D,EAAA,OAAO,KAAK,CAAC,CAAA,mCAAA,EAAsC,QAAQ,GAAG,CAAC;AACjE;SAOgB,6BAA6B,GAAA;AAC3C,EAAA,OAAO,KAAK,CACV,iEAAiE,GAC/D,mDAAmD,CACtD;AACH;AAOM,SAAU,kCAAkC,CAAC,GAAoB,EAAA;AACrE,EAAA,OAAO,KAAK,CACV,CAAA,sEAAA,CAAwE,GACtE,CAAA,+CAAA,EAAkD,GAAG,IAAI,CAC5D;AACH;AAOM,SAAU,sCAAsC,CAAC,OAAiB,EAAA;AACtE,EAAA,OAAO,KAAK,CACV,CAAA,wEAAA,CAA0E,GACxE,CAAA,+CAAA,EAAkD,OAAO,IAAI,CAChE;AACH;AA8BA,MAAM,aAAa,CAAA;EAIR,GAAA;EACA,OAAA;EACA,OAAA;AALT,EAAA,UAAU,GAAsB,IAAI;AAEpC,EAAA,WAAA,CACS,GAAoB,EACpB,OAA2B,EAC3B,OAAqB,EAAA;IAFrB,IAAA,CAAA,GAAG,GAAH,GAAG;IACH,IAAA,CAAA,OAAO,GAAP,OAAO;IACP,IAAA,CAAA,OAAO,GAAP,OAAO;AACb,EAAA;AACJ;MAaY,eAAe,CAAA;EAkCJ,WAAA;EACZ,UAAA;EAES,aAAA;EApCX,SAAS;AAKT,EAAA,eAAe,GAAG,IAAI,GAAG,EAAyB;AAMlD,EAAA,eAAe,GAAG,IAAI,GAAG,EAA2B;AAGpD,EAAA,iBAAiB,GAAG,IAAI,GAAG,EAAsB;AAGjD,EAAA,qBAAqB,GAAG,IAAI,GAAG,EAAmC;AAGlE,EAAA,sBAAsB,GAAG,IAAI,GAAG,EAAkB;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