@coolon/angular-ui-powerups 16.1.0-aplpha.27 → 16.1.0-aplpha.28
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/esm2022/lib/components/commands/command-face/command-face.component.mjs +7 -7
- package/fesm2022/coolon-angular-ui-powerups.mjs +6 -6
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/commands/command-face/command-face.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ export class CommandFaceComponent extends DisposableComponent {
|
|
|
22
22
|
// tslint:disable-next-line:no-input-rename
|
|
23
23
|
get _rawFaces() { return this.#_rawFaces_accessor_storage; }
|
|
24
24
|
set _rawFaces(value) { this.#_rawFaces_accessor_storage = value; }
|
|
25
|
-
|
|
25
|
+
hasTextAndLeadingIcon$;
|
|
26
26
|
set face(face) {
|
|
27
27
|
this.faces$.value = [face];
|
|
28
28
|
}
|
|
@@ -42,7 +42,7 @@ export class CommandFaceComponent extends DisposableComponent {
|
|
|
42
42
|
const activeFace = this.faceAdapters.first();
|
|
43
43
|
this.activeIcon = activeFace.pluck("icon");
|
|
44
44
|
this.activeColor = activeFace.pluck("color");
|
|
45
|
-
this.
|
|
45
|
+
this.hasTextAndLeadingIcon$ = valueOf.all(this.activeIcon.isNotNil(), activeFace.pluckString('text').isNotBlank(), activeFace.pluck("iconPosition").doesNotEqual(CommandFace.Position.END)).areTruthy();
|
|
46
46
|
}
|
|
47
47
|
shouldIncludeIcon(face) {
|
|
48
48
|
return (!this.ignoreIcon && face.icon) || this.includeMissingIconInLayout;
|
|
@@ -57,10 +57,10 @@ export class CommandFaceComponent extends DisposableComponent {
|
|
|
57
57
|
return this.activeColor.value;
|
|
58
58
|
}
|
|
59
59
|
get hasTextAndIcon() {
|
|
60
|
-
return this.
|
|
60
|
+
return this.hasTextAndLeadingIcon$.value;
|
|
61
61
|
}
|
|
62
62
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: CommandFaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
63
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: CommandFaceComponent, selector: "aup-command-face", inputs: { _rawFaces: ["faces", "_rawFaces"], face: "face", ignoreIcon: "ignoreIcon", ignoreText: "ignoreText", includeMissingIconInLayout: "includeMissingIconInLayout" }, host: { properties: { "class.hide-icon": "this.requiresMissingIconInLayout", "attr.color": "this.color", "class.has-text-and-icon": "this.hasTextAndIcon" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"face-container\" *ngFor=\"let face of faceAdapters.value\">\n <aup-icon *ngIf=\"hasIconStart(face)\" [icon]=\"face.icon\"></aup-icon>\n <span *ngIf=\"face.text\">{{face.text}}</span>\n <aup-icon *ngIf=\"hasIconEnd(face)\" [icon]=\"face.icon\"></aup-icon>\n</div>\n", styles: ["aup-command-face{--icon-gap: var(--aup-command-face-icon-gap);display:inline-grid}aup-command-face>.face-container{grid-column:1;grid-row:1;display:inline-flex;flex-direction:row;align-items:center}aup-command-face>.face-container>span{white-space:nowrap}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}aup-command-face.start{justify-items:self-start}aup-command-face.end{justify-items:self-end}aup-command-face.has-text-and-icon{margin-top:4px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IconComponent, selector: "aup-icon", inputs: ["icon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
63
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: CommandFaceComponent, selector: "aup-command-face", inputs: { _rawFaces: ["faces", "_rawFaces"], face: "face", ignoreIcon: "ignoreIcon", ignoreText: "ignoreText", includeMissingIconInLayout: "includeMissingIconInLayout" }, host: { properties: { "class.hide-icon": "this.requiresMissingIconInLayout", "attr.color": "this.color", "class.has-text-and-leading-icon": "this.hasTextAndIcon" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"face-container\" *ngFor=\"let face of faceAdapters.value\">\n <aup-icon *ngIf=\"hasIconStart(face)\" [icon]=\"face.icon\"></aup-icon>\n <span *ngIf=\"face.text\">{{face.text}}</span>\n <aup-icon *ngIf=\"hasIconEnd(face)\" [icon]=\"face.icon\"></aup-icon>\n</div>\n", styles: ["aup-command-face{--icon-gap: var(--aup-command-face-icon-gap);display:inline-grid}aup-command-face>.face-container{grid-column:1;grid-row:1;display:inline-flex;flex-direction:row;align-items:center}aup-command-face>.face-container>span{white-space:nowrap}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}aup-command-face.start{justify-items:self-start}aup-command-face.end{justify-items:self-end}aup-command-face.has-text-and-leading-icon{margin-top:4px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IconComponent, selector: "aup-icon", inputs: ["icon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
64
64
|
}
|
|
65
65
|
__decorate([
|
|
66
66
|
StoreInListModel("faces$"),
|
|
@@ -68,7 +68,7 @@ __decorate([
|
|
|
68
68
|
], CommandFaceComponent.prototype, "_rawFaces", null);
|
|
69
69
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: CommandFaceComponent, decorators: [{
|
|
70
70
|
type: Component,
|
|
71
|
-
args: [{ selector: 'aup-command-face', encapsulation: ViewEncapsulation.None, template: "<div class=\"face-container\" *ngFor=\"let face of faceAdapters.value\">\n <aup-icon *ngIf=\"hasIconStart(face)\" [icon]=\"face.icon\"></aup-icon>\n <span *ngIf=\"face.text\">{{face.text}}</span>\n <aup-icon *ngIf=\"hasIconEnd(face)\" [icon]=\"face.icon\"></aup-icon>\n</div>\n", styles: ["aup-command-face{--icon-gap: var(--aup-command-face-icon-gap);display:inline-grid}aup-command-face>.face-container{grid-column:1;grid-row:1;display:inline-flex;flex-direction:row;align-items:center}aup-command-face>.face-container>span{white-space:nowrap}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}aup-command-face.start{justify-items:self-start}aup-command-face.end{justify-items:self-end}aup-command-face.has-text-and-icon{margin-top:4px}\n"] }]
|
|
71
|
+
args: [{ selector: 'aup-command-face', encapsulation: ViewEncapsulation.None, template: "<div class=\"face-container\" *ngFor=\"let face of faceAdapters.value\">\n <aup-icon *ngIf=\"hasIconStart(face)\" [icon]=\"face.icon\"></aup-icon>\n <span *ngIf=\"face.text\">{{face.text}}</span>\n <aup-icon *ngIf=\"hasIconEnd(face)\" [icon]=\"face.icon\"></aup-icon>\n</div>\n", styles: ["aup-command-face{--icon-gap: var(--aup-command-face-icon-gap);display:inline-grid}aup-command-face>.face-container{grid-column:1;grid-row:1;display:inline-flex;flex-direction:row;align-items:center}aup-command-face>.face-container>span{white-space:nowrap}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}aup-command-face.start{justify-items:self-start}aup-command-face.end{justify-items:self-end}aup-command-face.has-text-and-leading-icon{margin-top:4px}\n"] }]
|
|
72
72
|
}], ctorParameters: function () { return []; }, propDecorators: { _rawFaces: [{
|
|
73
73
|
type: Input,
|
|
74
74
|
args: ['faces']
|
|
@@ -88,6 +88,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
88
88
|
args: ['attr.color']
|
|
89
89
|
}], hasTextAndIcon: [{
|
|
90
90
|
type: HostBinding,
|
|
91
|
-
args: ['class.has-text-and-icon']
|
|
91
|
+
args: ['class.has-text-and-leading-icon']
|
|
92
92
|
}] } });
|
|
93
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
93
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZC1mYWNlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvYW5ndWxhci11aS1wb3dlcnVwcy9zcmMvbGliL2NvbXBvbmVudHMvY29tbWFuZHMvY29tbWFuZC1mYWNlL2NvbW1hbmQtZmFjZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItdWktcG93ZXJ1cHMvc3JjL2xpYi9jb21wb25lbnRzL2NvbW1hbmRzL2NvbW1hbmQtZmFjZS9jb21tYW5kLWZhY2UuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsV0FBVyxFQUFFLEtBQUssRUFBRSxpQkFBaUIsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUMvRSxPQUFPLEVBRUwsR0FBRyxFQUVILGdCQUFnQixFQUNoQixnQkFBZ0IsRUFFakIsTUFBTSxnQkFBZ0IsQ0FBQztBQUN4QixPQUFPLEVBQUMsbUJBQW1CLEVBQUMsTUFBTSw0QkFBNEIsQ0FBQztBQUMvRCxPQU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B7XG4gICAgcmV0dXJuIHRoaXMuc2hvdWxkSW5jbHVkZUljb24oZmFjZSkgJiYgZmFjZS5pY29uUG9zaXRpb24gPT09IENvbW1hbmRGYWNlLlBvc2l0aW9uLkVORDtcbiAgfVxuXG4gIEBIb3N0QmluZGluZygnYXR0ci5jb2xvcicpXG4gIGdldCBjb2xvcigpOiBzdHJpbmcge1xuICAgIHJldHVybiB0aGlzLmFjdGl2ZUNvbG9yLnZhbHVlO1xuICB9XG5cbiAgQEhvc3RCaW5kaW5nKCdjbGFzcy5oYXMtdGV4dC1hbmQtbGVhZGluZy1pY29uJylcbiAgZ2V0IGhhc1RleHRBbmRJY29uKCkge1xuICAgIHJldHVybiB0aGlzLmhhc1RleHRBbmRMZWFkaW5nSWNvbiQudmFsdWVcbiAgfVxufVxuIiwiPGRpdiBjbGFzcz1cImZhY2UtY29udGFpbmVyXCIgKm5nRm9yPVwibGV0IGZhY2Ugb2YgZmFjZUFkYXB0ZXJzLnZhbHVlXCI+XG4gIDxhdXAtaWNvbiAqbmdJZj1cImhhc0ljb25TdGFydChmYWNlKVwiIFtpY29uXT1cImZhY2UuaWNvblwiPjwvYXVwLWljb24+XG4gIDxzcGFuICpuZ0lmPVwiZmFjZS50ZXh0XCI+e3tmYWNlLnRleHR9fTwvc3Bhbj5cbiAgPGF1cC1pY29uICpuZ0lmPVwiaGFzSWNvbkVuZChmYWNlKVwiIFtpY29uXT1cImZhY2UuaWNvblwiPjwvYXVwLWljb24+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -882,7 +882,7 @@ class CommandFaceComponent extends DisposableComponent {
|
|
|
882
882
|
// tslint:disable-next-line:no-input-rename
|
|
883
883
|
get _rawFaces() { return this.#_rawFaces_accessor_storage; }
|
|
884
884
|
set _rawFaces(value) { this.#_rawFaces_accessor_storage = value; }
|
|
885
|
-
|
|
885
|
+
hasTextAndLeadingIcon$;
|
|
886
886
|
set face(face) {
|
|
887
887
|
this.faces$.value = [face];
|
|
888
888
|
}
|
|
@@ -902,7 +902,7 @@ class CommandFaceComponent extends DisposableComponent {
|
|
|
902
902
|
const activeFace = this.faceAdapters.first();
|
|
903
903
|
this.activeIcon = activeFace.pluck("icon");
|
|
904
904
|
this.activeColor = activeFace.pluck("color");
|
|
905
|
-
this.
|
|
905
|
+
this.hasTextAndLeadingIcon$ = valueOf.all(this.activeIcon.isNotNil(), activeFace.pluckString('text').isNotBlank(), activeFace.pluck("iconPosition").doesNotEqual(CommandFace.Position.END)).areTruthy();
|
|
906
906
|
}
|
|
907
907
|
shouldIncludeIcon(face) {
|
|
908
908
|
return (!this.ignoreIcon && face.icon) || this.includeMissingIconInLayout;
|
|
@@ -917,10 +917,10 @@ class CommandFaceComponent extends DisposableComponent {
|
|
|
917
917
|
return this.activeColor.value;
|
|
918
918
|
}
|
|
919
919
|
get hasTextAndIcon() {
|
|
920
|
-
return this.
|
|
920
|
+
return this.hasTextAndLeadingIcon$.value;
|
|
921
921
|
}
|
|
922
922
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: CommandFaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
923
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: CommandFaceComponent, selector: "aup-command-face", inputs: { _rawFaces: ["faces", "_rawFaces"], face: "face", ignoreIcon: "ignoreIcon", ignoreText: "ignoreText", includeMissingIconInLayout: "includeMissingIconInLayout" }, host: { properties: { "class.hide-icon": "this.requiresMissingIconInLayout", "attr.color": "this.color", "class.has-text-and-icon": "this.hasTextAndIcon" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"face-container\" *ngFor=\"let face of faceAdapters.value\">\n <aup-icon *ngIf=\"hasIconStart(face)\" [icon]=\"face.icon\"></aup-icon>\n <span *ngIf=\"face.text\">{{face.text}}</span>\n <aup-icon *ngIf=\"hasIconEnd(face)\" [icon]=\"face.icon\"></aup-icon>\n</div>\n", styles: ["aup-command-face{--icon-gap: var(--aup-command-face-icon-gap);display:inline-grid}aup-command-face>.face-container{grid-column:1;grid-row:1;display:inline-flex;flex-direction:row;align-items:center}aup-command-face>.face-container>span{white-space:nowrap}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}aup-command-face.start{justify-items:self-start}aup-command-face.end{justify-items:self-end}aup-command-face.has-text-and-icon{margin-top:4px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
923
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: CommandFaceComponent, selector: "aup-command-face", inputs: { _rawFaces: ["faces", "_rawFaces"], face: "face", ignoreIcon: "ignoreIcon", ignoreText: "ignoreText", includeMissingIconInLayout: "includeMissingIconInLayout" }, host: { properties: { "class.hide-icon": "this.requiresMissingIconInLayout", "attr.color": "this.color", "class.has-text-and-leading-icon": "this.hasTextAndIcon" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"face-container\" *ngFor=\"let face of faceAdapters.value\">\n <aup-icon *ngIf=\"hasIconStart(face)\" [icon]=\"face.icon\"></aup-icon>\n <span *ngIf=\"face.text\">{{face.text}}</span>\n <aup-icon *ngIf=\"hasIconEnd(face)\" [icon]=\"face.icon\"></aup-icon>\n</div>\n", styles: ["aup-command-face{--icon-gap: var(--aup-command-face-icon-gap);display:inline-grid}aup-command-face>.face-container{grid-column:1;grid-row:1;display:inline-flex;flex-direction:row;align-items:center}aup-command-face>.face-container>span{white-space:nowrap}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}aup-command-face.start{justify-items:self-start}aup-command-face.end{justify-items:self-end}aup-command-face.has-text-and-leading-icon{margin-top:4px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
924
924
|
}
|
|
925
925
|
__decorate([
|
|
926
926
|
StoreInListModel("faces$"),
|
|
@@ -928,7 +928,7 @@ __decorate([
|
|
|
928
928
|
], CommandFaceComponent.prototype, "_rawFaces", null);
|
|
929
929
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: CommandFaceComponent, decorators: [{
|
|
930
930
|
type: Component,
|
|
931
|
-
args: [{ selector: 'aup-command-face', encapsulation: ViewEncapsulation.None, template: "<div class=\"face-container\" *ngFor=\"let face of faceAdapters.value\">\n <aup-icon *ngIf=\"hasIconStart(face)\" [icon]=\"face.icon\"></aup-icon>\n <span *ngIf=\"face.text\">{{face.text}}</span>\n <aup-icon *ngIf=\"hasIconEnd(face)\" [icon]=\"face.icon\"></aup-icon>\n</div>\n", styles: ["aup-command-face{--icon-gap: var(--aup-command-face-icon-gap);display:inline-grid}aup-command-face>.face-container{grid-column:1;grid-row:1;display:inline-flex;flex-direction:row;align-items:center}aup-command-face>.face-container>span{white-space:nowrap}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}aup-command-face.start{justify-items:self-start}aup-command-face.end{justify-items:self-end}aup-command-face.has-text-and-icon{margin-top:4px}\n"] }]
|
|
931
|
+
args: [{ selector: 'aup-command-face', encapsulation: ViewEncapsulation.None, template: "<div class=\"face-container\" *ngFor=\"let face of faceAdapters.value\">\n <aup-icon *ngIf=\"hasIconStart(face)\" [icon]=\"face.icon\"></aup-icon>\n <span *ngIf=\"face.text\">{{face.text}}</span>\n <aup-icon *ngIf=\"hasIconEnd(face)\" [icon]=\"face.icon\"></aup-icon>\n</div>\n", styles: ["aup-command-face{--icon-gap: var(--aup-command-face-icon-gap);display:inline-grid}aup-command-face>.face-container{grid-column:1;grid-row:1;display:inline-flex;flex-direction:row;align-items:center}aup-command-face>.face-container>span{white-space:nowrap}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}aup-command-face.start{justify-items:self-start}aup-command-face.end{justify-items:self-end}aup-command-face.has-text-and-leading-icon{margin-top:4px}\n"] }]
|
|
932
932
|
}], ctorParameters: function () { return []; }, propDecorators: { _rawFaces: [{
|
|
933
933
|
type: Input,
|
|
934
934
|
args: ['faces']
|
|
@@ -948,7 +948,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
948
948
|
args: ['attr.color']
|
|
949
949
|
}], hasTextAndIcon: [{
|
|
950
950
|
type: HostBinding,
|
|
951
|
-
args: ['class.has-text-and-icon']
|
|
951
|
+
args: ['class.has-text-and-leading-icon']
|
|
952
952
|
}] } });
|
|
953
953
|
|
|
954
954
|
/**
|