@ethlete/cdk 3.20.1 → 3.21.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/CHANGELOG.md +7 -0
- package/esm2022/lib/components/picture/picture-data.directive.mjs +1 -1
- package/esm2022/lib/components/picture/picture.component.mjs +6 -8
- package/esm2022/lib/components/picture/picture.component.types.mjs +1 -1
- package/esm2022/lib/components/picture/pipes/index.mjs +2 -0
- package/esm2022/lib/components/picture/pipes/normalize-source/index.mjs +2 -0
- package/esm2022/lib/components/picture/pipes/normalize-source/normalize-source.pipe.mjs +18 -0
- package/esm2022/lib/components/picture/pipes/normalize-source/normalize-source.util.mjs +11 -0
- package/fesm2022/ethlete-cdk.mjs +30 -8
- package/fesm2022/ethlete-cdk.mjs.map +1 -1
- package/lib/components/picture/picture-data.directive.d.ts +1 -1
- package/lib/components/picture/picture.component.d.ts +1 -1
- package/lib/components/picture/picture.component.types.d.ts +1 -1
- package/lib/components/picture/pipes/index.d.ts +1 -0
- package/lib/components/picture/pipes/normalize-source/index.d.ts +1 -0
- package/lib/components/picture/pipes/normalize-source/normalize-source.pipe.d.ts +7 -0
- package/lib/components/picture/pipes/normalize-source/normalize-source.util.d.ts +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @ethlete/cdk
|
|
2
2
|
|
|
3
|
+
## 3.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1034](https://github.com/ethlete-io/ethdk/pull/1034) [`1d69f6c1`](https://github.com/ethlete-io/ethdk/commit/1d69f6c129eb4457a5089083813fc3ff6e65bd41) Thanks [@Marc-BrauneDigital](https://github.com/Marc-BrauneDigital)! - Sources and default source now accept string as well as PictureSource
|
|
8
|
+
Add normalizeSourcePipe
|
|
9
|
+
|
|
3
10
|
## 3.20.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -46,4 +46,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
46
46
|
}], sizes: [{
|
|
47
47
|
type: Input
|
|
48
48
|
}] } });
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGljdHVyZS1kYXRhLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY2RrL3NyYy9saWIvY29tcG9uZW50cy9waWN0dXJlL3BpY3R1cmUtZGF0YS5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBT25FLE1BQU0sT0FBTyxvQkFBb0I7SUFIakM7UUFLRSxnQkFBVyxHQUFHLEtBQUssQ0FBQztRQUdwQixhQUFRLEdBQWdCLElBQUksQ0FBQztRQUc3QixnQkFBVyxHQUFnQixJQUFJLENBQUM7UUFHaEMsb0JBQWUsR0FBZ0IsSUFBSSxDQUFDO1FBR3BDLGlCQUFZLEdBQWdCLElBQUksQ0FBQztRQUdqQyxlQUFVLEdBQWtDLElBQUksQ0FBQztRQUdqRCxRQUFHLEdBQWtCLElBQUksQ0FBQztRQUcxQixlQUFVLEdBQWtCLElBQUksQ0FBQztRQUdqQyxVQUFLLEdBQWtCLElBQUksQ0FBQztRQUc1QixXQUFNLEdBQWtCLElBQUksQ0FBQztRQUc3QixVQUFLLEdBQWtCLElBQUksQ0FBQztLQUM3Qjs4R0FqQ1ksb0JBQW9CO2tHQUFwQixvQkFBb0IsNEVBQ1gsZ0JBQWdCOzsyRkFEekIsb0JBQW9CO2tCQUhoQyxTQUFTO21CQUFDO29CQUNULFVBQVUs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ICBwaWN0dXJlQ2xhc3M6IE5nQ2xhc3NUeXBlID0gbnVsbDtcblxuICBASW5wdXQoKVxuICBkZWZhdWx0U3JjOiBQaWN0dXJlU291cmNlIHwgc3RyaW5nIHwgbnVsbCA9IG51bGw7XG5cbiAgQElucHV0KClcbiAgYWx0OiBzdHJpbmcgfCBudWxsID0gbnVsbDtcblxuICBASW5wdXQoKVxuICBmaWdjYXB0aW9uOiBzdHJpbmcgfCBudWxsID0gbnVsbDtcblxuICBASW5wdXQoKVxuICB3aWR0aDogbnVtYmVyIHwgbnVsbCA9IG51bGw7XG5cbiAgQElucHV0KClcbiAgaGVpZ2h0OiBudW1iZXIgfCBudWxsID0gbnVsbDtcblxuICBASW5wdXQoKVxuICBzaXplczogc3RyaW5nIHwgbnVsbCA9IG51bGw7XG59XG4iXX0=
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { NgClass, NgForOf, NgIf } from '@angular/common';
|
|
2
|
-
import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, inject
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, inject } from '@angular/core';
|
|
3
3
|
import { LetDirective } from '@ethlete/core';
|
|
4
4
|
import { PictureDataDirective } from './picture-data.directive';
|
|
5
5
|
import { IMAGE_CONFIG_TOKEN } from './picture.utils';
|
|
6
|
+
import { NormalizeSourcePipe } from './pipes';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
import * as i1 from "./picture-data.directive";
|
|
8
9
|
export class PictureComponent {
|
|
@@ -13,9 +14,6 @@ export class PictureComponent {
|
|
|
13
14
|
this.trackBySrc = (_, item) => item.srcset;
|
|
14
15
|
}
|
|
15
16
|
combineWithConfig(src) {
|
|
16
|
-
if (isDevMode() && src.type === '') {
|
|
17
|
-
console.warn(`The type attribute is missing for the following source`, src.srcset, this);
|
|
18
|
-
}
|
|
19
17
|
if (!this.config?.baseUrl || src.srcset.startsWith('http')) {
|
|
20
18
|
return src;
|
|
21
19
|
}
|
|
@@ -26,11 +24,11 @@ export class PictureComponent {
|
|
|
26
24
|
};
|
|
27
25
|
}
|
|
28
26
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: PictureComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.5", type: PictureComponent, isStandalone: true, selector: "et-picture", inputs: { sources: "sources" }, host: { classAttribute: "et-picture" }, hostDirectives: [{ directive: i1.PictureDataDirective, inputs: ["imgClass", "imgClass", "hasPriority", "hasPriority", "figureClass", "figureClass", "pictureClass", "pictureClass", "figcaptionClass", "figcaptionClass", "defaultSrc", "defaultSrc", "alt", "alt", "figcaption", "figcaption", "width", "width", "height", "height", "sizes", "sizes"] }], ngImport: i0, template: "<figure [ngClass]=\"pictureData.figureClass\" class=\"et-picture-figure\">\n <picture [ngClass]=\"pictureData.pictureClass\" class=\"et-picture-picture\">\n <ng-container *ngFor=\"let source of sources; trackBy: trackBySrc\">\n <source\n *etLet=\"combineWithConfig(source) as s\"\n [type]=\"s.type\"\n [attr.srcset]=\"s.srcset\"\n [attr.sizes]=\"pictureData.sizes\"\n />\n </ng-container>\n\n <ng-container *ngIf=\"pictureData.defaultSrc as source\">\n <img\n *etLet=\"combineWithConfig(source) as s\"\n [attr.loading]=\"pictureData.hasPriority ? 'eager' : 'lazy'\"\n [attr.fetchpriority]=\"pictureData.hasPriority ? 'high' : 'auto'\"\n [ngClass]=\"pictureData.imgClass\"\n [attr.srcset]=\"s.srcset\"\n [attr.type]=\"s.type\"\n [attr.alt]=\"pictureData.alt\"\n [attr.width]=\"pictureData.width\"\n [attr.height]=\"pictureData.height\"\n [attr.sizes]=\"pictureData.sizes\"\n class=\"et-picture-img\"\n />\n </ng-container>\n </picture>\n\n <figcaption *ngIf=\"pictureData.figcaption\" [ngClass]=\"pictureData.figcaptionClass\" class=\"et-picture-figcaption\">\n {{ pictureData.figcaption }}\n </figcaption>\n</figure>\n", dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: LetDirective, selector: "[etLet]", inputs: ["etLet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.5", type: PictureComponent, isStandalone: true, selector: "et-picture", inputs: { sources: "sources" }, host: { classAttribute: "et-picture" }, hostDirectives: [{ directive: i1.PictureDataDirective, inputs: ["imgClass", "imgClass", "hasPriority", "hasPriority", "figureClass", "figureClass", "pictureClass", "pictureClass", "figcaptionClass", "figcaptionClass", "defaultSrc", "defaultSrc", "alt", "alt", "figcaption", "figcaption", "width", "width", "height", "height", "sizes", "sizes"] }], ngImport: i0, template: "<figure [ngClass]=\"pictureData.figureClass\" class=\"et-picture-figure\">\n <picture [ngClass]=\"pictureData.pictureClass\" class=\"et-picture-picture\">\n <ng-container *ngFor=\"let source of sources; trackBy: trackBySrc\">\n <source\n *etLet=\"combineWithConfig(source | normalizeSource) as s\"\n [type]=\"s.type\"\n [attr.srcset]=\"s.srcset\"\n [attr.sizes]=\"pictureData.sizes\"\n />\n </ng-container>\n\n <ng-container *ngIf=\"pictureData.defaultSrc as source\">\n <img\n *etLet=\"combineWithConfig(source | normalizeSource) as s\"\n [attr.loading]=\"pictureData.hasPriority ? 'eager' : 'lazy'\"\n [attr.fetchpriority]=\"pictureData.hasPriority ? 'high' : 'auto'\"\n [ngClass]=\"pictureData.imgClass\"\n [attr.srcset]=\"s.srcset\"\n [attr.type]=\"s.type\"\n [attr.alt]=\"pictureData.alt\"\n [attr.width]=\"pictureData.width\"\n [attr.height]=\"pictureData.height\"\n [attr.sizes]=\"pictureData.sizes\"\n class=\"et-picture-img\"\n />\n </ng-container>\n </picture>\n\n <figcaption *ngIf=\"pictureData.figcaption\" [ngClass]=\"pictureData.figcaptionClass\" class=\"et-picture-figcaption\">\n {{ pictureData.figcaption }}\n </figcaption>\n</figure>\n", dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: LetDirective, selector: "[etLet]", inputs: ["etLet"] }, { kind: "pipe", type: NormalizeSourcePipe, name: "normalizeSource" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
30
28
|
}
|
|
31
29
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: PictureComponent, decorators: [{
|
|
32
30
|
type: Component,
|
|
33
|
-
args: [{ selector: 'et-picture', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgForOf, NgClass, NgIf, LetDirective], host: {
|
|
31
|
+
args: [{ selector: 'et-picture', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgForOf, NgClass, NgIf, LetDirective, NormalizeSourcePipe], host: {
|
|
34
32
|
class: 'et-picture',
|
|
35
33
|
}, hostDirectives: [
|
|
36
34
|
{
|
|
@@ -49,8 +47,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
49
47
|
'sizes',
|
|
50
48
|
],
|
|
51
49
|
},
|
|
52
|
-
], template: "<figure [ngClass]=\"pictureData.figureClass\" class=\"et-picture-figure\">\n <picture [ngClass]=\"pictureData.pictureClass\" class=\"et-picture-picture\">\n <ng-container *ngFor=\"let source of sources; trackBy: trackBySrc\">\n <source\n *etLet=\"combineWithConfig(source) as s\"\n [type]=\"s.type\"\n [attr.srcset]=\"s.srcset\"\n [attr.sizes]=\"pictureData.sizes\"\n />\n </ng-container>\n\n <ng-container *ngIf=\"pictureData.defaultSrc as source\">\n <img\n *etLet=\"combineWithConfig(source) as s\"\n [attr.loading]=\"pictureData.hasPriority ? 'eager' : 'lazy'\"\n [attr.fetchpriority]=\"pictureData.hasPriority ? 'high' : 'auto'\"\n [ngClass]=\"pictureData.imgClass\"\n [attr.srcset]=\"s.srcset\"\n [attr.type]=\"s.type\"\n [attr.alt]=\"pictureData.alt\"\n [attr.width]=\"pictureData.width\"\n [attr.height]=\"pictureData.height\"\n [attr.sizes]=\"pictureData.sizes\"\n class=\"et-picture-img\"\n />\n </ng-container>\n </picture>\n\n <figcaption *ngIf=\"pictureData.figcaption\" [ngClass]=\"pictureData.figcaptionClass\" class=\"et-picture-figcaption\">\n {{ pictureData.figcaption }}\n </figcaption>\n</figure>\n" }]
|
|
50
|
+
], template: "<figure [ngClass]=\"pictureData.figureClass\" class=\"et-picture-figure\">\n <picture [ngClass]=\"pictureData.pictureClass\" class=\"et-picture-picture\">\n <ng-container *ngFor=\"let source of sources; trackBy: trackBySrc\">\n <source\n *etLet=\"combineWithConfig(source | normalizeSource) as s\"\n [type]=\"s.type\"\n [attr.srcset]=\"s.srcset\"\n [attr.sizes]=\"pictureData.sizes\"\n />\n </ng-container>\n\n <ng-container *ngIf=\"pictureData.defaultSrc as source\">\n <img\n *etLet=\"combineWithConfig(source | normalizeSource) as s\"\n [attr.loading]=\"pictureData.hasPriority ? 'eager' : 'lazy'\"\n [attr.fetchpriority]=\"pictureData.hasPriority ? 'high' : 'auto'\"\n [ngClass]=\"pictureData.imgClass\"\n [attr.srcset]=\"s.srcset\"\n [attr.type]=\"s.type\"\n [attr.alt]=\"pictureData.alt\"\n [attr.width]=\"pictureData.width\"\n [attr.height]=\"pictureData.height\"\n [attr.sizes]=\"pictureData.sizes\"\n class=\"et-picture-img\"\n />\n </ng-container>\n </picture>\n\n <figcaption *ngIf=\"pictureData.figcaption\" [ngClass]=\"pictureData.figcaptionClass\" class=\"et-picture-figcaption\">\n {{ pictureData.figcaption }}\n </figcaption>\n</figure>\n" }]
|
|
53
51
|
}], propDecorators: { sources: [{
|
|
54
52
|
type: Input
|
|
55
53
|
}] } });
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
54
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGljdHVyZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2Nkay9zcmMvbGliL2NvbXBvbmVudHMvcGljdHVyZS9waWN0dXJlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY2RrL3NyYy9saWIvY29tcG9uZW50cy9waWN0dXJlL3BpY3R1cmUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDekQsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQW1CLGlCQUFpQixFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN0SCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzdDLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRWhFLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ3JELE9BQU8sRUFBRSxtQkFBbUIsRU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S53aWR0aFwiXG4gICAgICAgIFthdHRyLmhlaWdodF09XCJwaWN0dXJlRGF0YS5oZWlnaHRcIlxuICAgICAgICBbYXR0ci5zaXplc109XCJwaWN0dXJlRGF0YS5zaXplc1wiXG4gICAgICAgIGNsYXNzPVwiZXQtcGljdHVyZS1pbWdcIlxuICAgICAgLz5cbiAgICA8L25nLWNvbnRhaW5lcj5cbiAgPC9waWN0dXJlPlxuXG4gIDxmaWdjYXB0aW9uICpuZ0lmPVwicGljdHVyZURhdGEuZmlnY2FwdGlvblwiIFtuZ0NsYXNzXT1cInBpY3R1cmVEYXRhLmZpZ2NhcHRpb25DbGFzc1wiIGNsYXNzPVwiZXQtcGljdHVyZS1maWdjYXB0aW9uXCI+XG4gICAge3sgcGljdHVyZURhdGEuZmlnY2FwdGlvbiB9fVxuICA8L2ZpZ2NhcHRpb24+XG48L2ZpZ3VyZT5cbiJdfQ==
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGljdHVyZS5jb21wb25lbnQudHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2Nkay9zcmMvbGliL2NvbXBvbmVudHMvcGljdHVyZS9waWN0dXJlLmNvbXBvbmVudC50eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBQaWN0dXJlU291cmNlIHtcbiAgLyoqXG4gICAqIFRoZSBtaW1lIHR5cGUgb2YgdGhlIGltYWdlLlxuICAgKiBAZXhhbXBsZSBgaW1hZ2UvanBlZ2BcbiAgICovXG4gIHR5cGU6IHN0cmluZyB8IG51bGw7XG5cbiAgLyoqXG4gICAqIFRoZSBzb3VyY2Ugc2V0IG9mIHRoZSBpbWFnZS4gQ2FuIGJlIGVpdGhlciBhIHNpbmdsZSBVUkwgb3IgYSBjb21tYS1zZXBhcmF0ZWQgbGlzdCBvZiBVUkxzLlxuICAgKiBAZXhhbXBsZSBgaHR0cHM6Ly9leGFtcGxlLmNvbS9pbWFnZS5qcGdgXG4gICAqIEBleGFtcGxlIGBodHRwczovL2V4YW1wbGUuY29tL2ltYWdlLmpwZywgaHR0cHM6Ly9leGFtcGxlLmNvbS9pbWFnZUAyeC5qcGdgXG4gICAqL1xuICBzcmNzZXQ6IHN0cmluZztcbn1cblxuZXhwb3J0IGludGVyZmFjZSBQaWN0dXJlQ29uZmlnIHtcbiAgYmFzZVVybD86IHN0cmluZztcbn1cbiJdfQ==
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './normalize-source';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2Nkay9zcmMvbGliL2NvbXBvbmVudHMvcGljdHVyZS9waXBlcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG9CQUFvQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9ub3JtYWxpemUtc291cmNlJztcbiJdfQ==
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './normalize-source.pipe';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2Nkay9zcmMvbGliL2NvbXBvbmVudHMvcGljdHVyZS9waXBlcy9ub3JtYWxpemUtc291cmNlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMseUJBQXlCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL25vcm1hbGl6ZS1zb3VyY2UucGlwZSc7XG4iXX0=
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import { normalizeSource } from './normalize-source.util';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class NormalizeSourcePipe {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.transform = normalizeSource;
|
|
7
|
+
}
|
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: NormalizeSourcePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
9
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.5", ngImport: i0, type: NormalizeSourcePipe, isStandalone: true, name: "normalizeSource" }); }
|
|
10
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: NormalizeSourcePipe, decorators: [{
|
|
12
|
+
type: Pipe,
|
|
13
|
+
args: [{
|
|
14
|
+
name: 'normalizeSource',
|
|
15
|
+
standalone: true,
|
|
16
|
+
}]
|
|
17
|
+
}] });
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9ybWFsaXplLXNvdXJjZS5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jZGsvc3JjL2xpYi9jb21wb25lbnRzL3BpY3R1cmUvcGlwZXMvbm9ybWFsaXplLXNvdXJjZS9ub3JtYWxpemUtc291cmNlLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLHlCQUF5QixDQUFDOztBQU0xRCxNQUFNLE9BQU8sbUJBQW1CO0lBSmhDO1FBS0UsY0FBUyxHQUFHLGVBQWUsQ0FBQztLQUM3Qjs4R0FGWSxtQkFBbUI7NEdBQW5CLG1CQUFtQjs7MkZBQW5CLG1CQUFtQjtrQkFKL0IsSUFBSTttQkFBQztvQkFDSixJQUFJLEVBQUUsaUJBQWlCO29CQUN2QixVQUFVLEVBQUUsSUFBSTtpQkFDakIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBub3JtYWxpemVTb3VyY2UgfSBmcm9tICcuL25vcm1hbGl6ZS1zb3VyY2UudXRpbCc7XG5cbkBQaXBlKHtcbiAgbmFtZTogJ25vcm1hbGl6ZVNvdXJjZScsXG4gIHN0YW5kYWxvbmU6IHRydWUsXG59KVxuZXhwb3J0IGNsYXNzIE5vcm1hbGl6ZVNvdXJjZVBpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcbiAgdHJhbnNmb3JtID0gbm9ybWFsaXplU291cmNlO1xufVxuIl19
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { inferMimeType } from '@ethlete/core';
|
|
2
|
+
export const normalizeSource = (source) => {
|
|
3
|
+
if (typeof source === 'string') {
|
|
4
|
+
return { type: inferMimeType(source), srcset: source };
|
|
5
|
+
}
|
|
6
|
+
else {
|
|
7
|
+
const mimeType = source.type && source.type !== '' ? source.type : inferMimeType(source.srcset);
|
|
8
|
+
return { type: mimeType, srcset: source.srcset };
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJm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JtYWxpemVTb3VyY2UgPSAoc291cmNlOiBzdHJpbmcgfCBQaWN0dXJlU291cmNlKSA9PiB7XG4gIGlmICh0eXBlb2Ygc291cmNlID09PSAnc3RyaW5nJykge1xuICAgIHJldHVybiB7IHR5cGU6IGluZmVyTWltZVR5cGUoc291cmNlKSwgc3Jjc2V0OiBzb3VyY2UgfSBhcyBQaWN0dXJlU291cmNlO1xuICB9IGVsc2Uge1xuICAgIGNvbnN0IG1pbWVUeXBlID0gc291cmNlLnR5cGUgJiYgc291cmNlLnR5cGUgIT09ICcnID8gc291cmNlLnR5cGUgOiBpbmZlck1pbWVUeXBlKHNvdXJjZS5zcmNzZXQpO1xuICAgIHJldHVybiB7IHR5cGU6IG1pbWVUeXBlLCBzcmNzZXQ6IHNvdXJjZS5zcmNzZXQgfSBhcyBQaWN0dXJlU291cmNlO1xuICB9XG59O1xuIl19
|
package/fesm2022/ethlete-cdk.mjs
CHANGED
|
@@ -2,9 +2,9 @@ import * as i1 from '@angular/cdk/portal';
|
|
|
2
2
|
import { CdkPortal, PortalModule, ComponentPortal, TemplatePortal, CdkPortalOutlet } from '@angular/cdk/portal';
|
|
3
3
|
import { AsyncPipe, NgIf, NgClass, NgTemplateOutlet, NgForOf, NgFor, NgComponentOutlet, DOCUMENT, JsonPipe, formatDate } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Directive, InjectionToken, booleanAttribute, Input, ContentChild, ContentChildren, inject, ElementRef, Injector, HostBinding, computed, signal, Optional, Inject, Injectable, SkipSelf, HostListener, ViewContainerRef, EventEmitter, NgZone, isDevMode, Output, NgModule, ChangeDetectorRef, ViewChild, runInInjectionContext, TemplateRef, forwardRef, LOCALE_ID, numberAttribute, ViewChildren, Renderer2, Attribute } from '@angular/core';
|
|
5
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Directive, InjectionToken, booleanAttribute, Input, ContentChild, ContentChildren, inject, ElementRef, Injector, HostBinding, computed, signal, Optional, Inject, Injectable, SkipSelf, HostListener, ViewContainerRef, EventEmitter, NgZone, isDevMode, Output, NgModule, ChangeDetectorRef, ViewChild, runInInjectionContext, TemplateRef, forwardRef, LOCALE_ID, numberAttribute, ViewChildren, Pipe, Renderer2, Attribute } from '@angular/core';
|
|
6
6
|
import * as i1$2 from '@ethlete/core';
|
|
7
|
-
import { LetDirective, createDestroy, ScrollObserverFirstElementDirective, ScrollObserverLastElementDirective, Memo, signalHostAttributes, signalHostClasses, AnimatedIfDirective, AnimatedLifecycleDirective, SmartBlockScrollStrategy, RouterStateService, ANIMATED_LIFECYCLE_TOKEN, nextFrame, elementCanScroll, equal, ViewportService, AnimatedOverlayDirective, ClickObserverService, FocusVisibleService, cloneFormGroup, getFormGroupValue, ObserveVisibilityDirective, signalVisibilityChangeClasses, IS_EMAIL, MUST_MATCH, IS_ARRAY_NOT_EMPTY, AT_LEAST_ONE_REQUIRED, switchQueryListChanges, signalAttributes, ResizeObserverService, createFlipAnimation, RuntimeError, SelectionModel, ActiveSelectionModel, KeyPressManager, signalClasses, scrollToElement, isEmptyArray, isObjectArray, isPrimitiveArray, ClickOutsideDirective, ObserveContentDirective, clamp, DELAYABLE_TOKEN, ObserveResizeDirective, getElementVisibleStates, IS_ACTIVE_ELEMENT, IS_ELEMENT, CursorDragScrollDirective, ObserveScrollStateDirective, IsElementDirective, IsActiveElementDirective, ScrollObserverIgnoreTargetDirective, TypedQueryList } from '@ethlete/core';
|
|
7
|
+
import { LetDirective, createDestroy, ScrollObserverFirstElementDirective, ScrollObserverLastElementDirective, Memo, signalHostAttributes, signalHostClasses, AnimatedIfDirective, AnimatedLifecycleDirective, SmartBlockScrollStrategy, RouterStateService, ANIMATED_LIFECYCLE_TOKEN, nextFrame, elementCanScroll, equal, ViewportService, AnimatedOverlayDirective, ClickObserverService, FocusVisibleService, cloneFormGroup, getFormGroupValue, ObserveVisibilityDirective, signalVisibilityChangeClasses, IS_EMAIL, MUST_MATCH, IS_ARRAY_NOT_EMPTY, AT_LEAST_ONE_REQUIRED, switchQueryListChanges, signalAttributes, ResizeObserverService, createFlipAnimation, RuntimeError, SelectionModel, ActiveSelectionModel, KeyPressManager, signalClasses, scrollToElement, isEmptyArray, isObjectArray, isPrimitiveArray, ClickOutsideDirective, ObserveContentDirective, clamp, DELAYABLE_TOKEN, ObserveResizeDirective, inferMimeType, getElementVisibleStates, IS_ACTIVE_ELEMENT, IS_ELEMENT, CursorDragScrollDirective, ObserveScrollStateDirective, IsElementDirective, IsActiveElementDirective, ScrollObserverIgnoreTargetDirective, TypedQueryList } from '@ethlete/core';
|
|
8
8
|
import { BehaviorSubject, startWith, map, switchMap, combineLatest, pairwise, tap, takeUntil, skip, of, Subject, filter, take, merge, skipUntil, defer, fromEvent, partition, debounceTime as debounceTime$1, Observable, distinctUntilChanged as distinctUntilChanged$1, withLatestFrom, skipWhile, catchError, throwError, firstValueFrom, timer, Subscription } from 'rxjs';
|
|
9
9
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
10
10
|
import { __decorate, __metadata } from 'tslib';
|
|
@@ -11457,6 +11457,31 @@ const provideImageConfig = (config = {}) => {
|
|
|
11457
11457
|
};
|
|
11458
11458
|
};
|
|
11459
11459
|
|
|
11460
|
+
const normalizeSource = (source) => {
|
|
11461
|
+
if (typeof source === 'string') {
|
|
11462
|
+
return { type: inferMimeType(source), srcset: source };
|
|
11463
|
+
}
|
|
11464
|
+
else {
|
|
11465
|
+
const mimeType = source.type && source.type !== '' ? source.type : inferMimeType(source.srcset);
|
|
11466
|
+
return { type: mimeType, srcset: source.srcset };
|
|
11467
|
+
}
|
|
11468
|
+
};
|
|
11469
|
+
|
|
11470
|
+
class NormalizeSourcePipe {
|
|
11471
|
+
constructor() {
|
|
11472
|
+
this.transform = normalizeSource;
|
|
11473
|
+
}
|
|
11474
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: NormalizeSourcePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
11475
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.5", ngImport: i0, type: NormalizeSourcePipe, isStandalone: true, name: "normalizeSource" }); }
|
|
11476
|
+
}
|
|
11477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: NormalizeSourcePipe, decorators: [{
|
|
11478
|
+
type: Pipe,
|
|
11479
|
+
args: [{
|
|
11480
|
+
name: 'normalizeSource',
|
|
11481
|
+
standalone: true,
|
|
11482
|
+
}]
|
|
11483
|
+
}] });
|
|
11484
|
+
|
|
11460
11485
|
class PictureComponent {
|
|
11461
11486
|
constructor() {
|
|
11462
11487
|
this.pictureData = inject(PictureDataDirective);
|
|
@@ -11465,9 +11490,6 @@ class PictureComponent {
|
|
|
11465
11490
|
this.trackBySrc = (_, item) => item.srcset;
|
|
11466
11491
|
}
|
|
11467
11492
|
combineWithConfig(src) {
|
|
11468
|
-
if (isDevMode() && src.type === '') {
|
|
11469
|
-
console.warn(`The type attribute is missing for the following source`, src.srcset, this);
|
|
11470
|
-
}
|
|
11471
11493
|
if (!this.config?.baseUrl || src.srcset.startsWith('http')) {
|
|
11472
11494
|
return src;
|
|
11473
11495
|
}
|
|
@@ -11478,11 +11500,11 @@ class PictureComponent {
|
|
|
11478
11500
|
};
|
|
11479
11501
|
}
|
|
11480
11502
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: PictureComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11481
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.5", type: PictureComponent, isStandalone: true, selector: "et-picture", inputs: { sources: "sources" }, host: { classAttribute: "et-picture" }, hostDirectives: [{ directive: PictureDataDirective, inputs: ["imgClass", "imgClass", "hasPriority", "hasPriority", "figureClass", "figureClass", "pictureClass", "pictureClass", "figcaptionClass", "figcaptionClass", "defaultSrc", "defaultSrc", "alt", "alt", "figcaption", "figcaption", "width", "width", "height", "height", "sizes", "sizes"] }], ngImport: i0, template: "<figure [ngClass]=\"pictureData.figureClass\" class=\"et-picture-figure\">\n <picture [ngClass]=\"pictureData.pictureClass\" class=\"et-picture-picture\">\n <ng-container *ngFor=\"let source of sources; trackBy: trackBySrc\">\n <source\n *etLet=\"combineWithConfig(source) as s\"\n [type]=\"s.type\"\n [attr.srcset]=\"s.srcset\"\n [attr.sizes]=\"pictureData.sizes\"\n />\n </ng-container>\n\n <ng-container *ngIf=\"pictureData.defaultSrc as source\">\n <img\n *etLet=\"combineWithConfig(source) as s\"\n [attr.loading]=\"pictureData.hasPriority ? 'eager' : 'lazy'\"\n [attr.fetchpriority]=\"pictureData.hasPriority ? 'high' : 'auto'\"\n [ngClass]=\"pictureData.imgClass\"\n [attr.srcset]=\"s.srcset\"\n [attr.type]=\"s.type\"\n [attr.alt]=\"pictureData.alt\"\n [attr.width]=\"pictureData.width\"\n [attr.height]=\"pictureData.height\"\n [attr.sizes]=\"pictureData.sizes\"\n class=\"et-picture-img\"\n />\n </ng-container>\n </picture>\n\n <figcaption *ngIf=\"pictureData.figcaption\" [ngClass]=\"pictureData.figcaptionClass\" class=\"et-picture-figcaption\">\n {{ pictureData.figcaption }}\n </figcaption>\n</figure>\n", dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: LetDirective, selector: "[etLet]", inputs: ["etLet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
11503
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.5", type: PictureComponent, isStandalone: true, selector: "et-picture", inputs: { sources: "sources" }, host: { classAttribute: "et-picture" }, hostDirectives: [{ directive: PictureDataDirective, inputs: ["imgClass", "imgClass", "hasPriority", "hasPriority", "figureClass", "figureClass", "pictureClass", "pictureClass", "figcaptionClass", "figcaptionClass", "defaultSrc", "defaultSrc", "alt", "alt", "figcaption", "figcaption", "width", "width", "height", "height", "sizes", "sizes"] }], ngImport: i0, template: "<figure [ngClass]=\"pictureData.figureClass\" class=\"et-picture-figure\">\n <picture [ngClass]=\"pictureData.pictureClass\" class=\"et-picture-picture\">\n <ng-container *ngFor=\"let source of sources; trackBy: trackBySrc\">\n <source\n *etLet=\"combineWithConfig(source | normalizeSource) as s\"\n [type]=\"s.type\"\n [attr.srcset]=\"s.srcset\"\n [attr.sizes]=\"pictureData.sizes\"\n />\n </ng-container>\n\n <ng-container *ngIf=\"pictureData.defaultSrc as source\">\n <img\n *etLet=\"combineWithConfig(source | normalizeSource) as s\"\n [attr.loading]=\"pictureData.hasPriority ? 'eager' : 'lazy'\"\n [attr.fetchpriority]=\"pictureData.hasPriority ? 'high' : 'auto'\"\n [ngClass]=\"pictureData.imgClass\"\n [attr.srcset]=\"s.srcset\"\n [attr.type]=\"s.type\"\n [attr.alt]=\"pictureData.alt\"\n [attr.width]=\"pictureData.width\"\n [attr.height]=\"pictureData.height\"\n [attr.sizes]=\"pictureData.sizes\"\n class=\"et-picture-img\"\n />\n </ng-container>\n </picture>\n\n <figcaption *ngIf=\"pictureData.figcaption\" [ngClass]=\"pictureData.figcaptionClass\" class=\"et-picture-figcaption\">\n {{ pictureData.figcaption }}\n </figcaption>\n</figure>\n", dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: LetDirective, selector: "[etLet]", inputs: ["etLet"] }, { kind: "pipe", type: NormalizeSourcePipe, name: "normalizeSource" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
11482
11504
|
}
|
|
11483
11505
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: PictureComponent, decorators: [{
|
|
11484
11506
|
type: Component,
|
|
11485
|
-
args: [{ selector: 'et-picture', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgForOf, NgClass, NgIf, LetDirective], host: {
|
|
11507
|
+
args: [{ selector: 'et-picture', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgForOf, NgClass, NgIf, LetDirective, NormalizeSourcePipe], host: {
|
|
11486
11508
|
class: 'et-picture',
|
|
11487
11509
|
}, hostDirectives: [
|
|
11488
11510
|
{
|
|
@@ -11501,7 +11523,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
11501
11523
|
'sizes',
|
|
11502
11524
|
],
|
|
11503
11525
|
},
|
|
11504
|
-
], template: "<figure [ngClass]=\"pictureData.figureClass\" class=\"et-picture-figure\">\n <picture [ngClass]=\"pictureData.pictureClass\" class=\"et-picture-picture\">\n <ng-container *ngFor=\"let source of sources; trackBy: trackBySrc\">\n <source\n *etLet=\"combineWithConfig(source) as s\"\n [type]=\"s.type\"\n [attr.srcset]=\"s.srcset\"\n [attr.sizes]=\"pictureData.sizes\"\n />\n </ng-container>\n\n <ng-container *ngIf=\"pictureData.defaultSrc as source\">\n <img\n *etLet=\"combineWithConfig(source) as s\"\n [attr.loading]=\"pictureData.hasPriority ? 'eager' : 'lazy'\"\n [attr.fetchpriority]=\"pictureData.hasPriority ? 'high' : 'auto'\"\n [ngClass]=\"pictureData.imgClass\"\n [attr.srcset]=\"s.srcset\"\n [attr.type]=\"s.type\"\n [attr.alt]=\"pictureData.alt\"\n [attr.width]=\"pictureData.width\"\n [attr.height]=\"pictureData.height\"\n [attr.sizes]=\"pictureData.sizes\"\n class=\"et-picture-img\"\n />\n </ng-container>\n </picture>\n\n <figcaption *ngIf=\"pictureData.figcaption\" [ngClass]=\"pictureData.figcaptionClass\" class=\"et-picture-figcaption\">\n {{ pictureData.figcaption }}\n </figcaption>\n</figure>\n" }]
|
|
11526
|
+
], template: "<figure [ngClass]=\"pictureData.figureClass\" class=\"et-picture-figure\">\n <picture [ngClass]=\"pictureData.pictureClass\" class=\"et-picture-picture\">\n <ng-container *ngFor=\"let source of sources; trackBy: trackBySrc\">\n <source\n *etLet=\"combineWithConfig(source | normalizeSource) as s\"\n [type]=\"s.type\"\n [attr.srcset]=\"s.srcset\"\n [attr.sizes]=\"pictureData.sizes\"\n />\n </ng-container>\n\n <ng-container *ngIf=\"pictureData.defaultSrc as source\">\n <img\n *etLet=\"combineWithConfig(source | normalizeSource) as s\"\n [attr.loading]=\"pictureData.hasPriority ? 'eager' : 'lazy'\"\n [attr.fetchpriority]=\"pictureData.hasPriority ? 'high' : 'auto'\"\n [ngClass]=\"pictureData.imgClass\"\n [attr.srcset]=\"s.srcset\"\n [attr.type]=\"s.type\"\n [attr.alt]=\"pictureData.alt\"\n [attr.width]=\"pictureData.width\"\n [attr.height]=\"pictureData.height\"\n [attr.sizes]=\"pictureData.sizes\"\n class=\"et-picture-img\"\n />\n </ng-container>\n </picture>\n\n <figcaption *ngIf=\"pictureData.figcaption\" [ngClass]=\"pictureData.figcaptionClass\" class=\"et-picture-figcaption\">\n {{ pictureData.figcaption }}\n </figcaption>\n</figure>\n" }]
|
|
11505
11527
|
}], propDecorators: { sources: [{
|
|
11506
11528
|
type: Input
|
|
11507
11529
|
}] } });
|