ngx-smz-ui 4.10.11 → 4.10.12
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/esm2020/lib/modules/smz-layouts/features/login/login.component.mjs +18 -5
- package/fesm2015/ngx-smz-ui.mjs +15 -3
- package/fesm2015/ngx-smz-ui.mjs.map +1 -1
- package/fesm2020/ngx-smz-ui.mjs +15 -3
- package/fesm2020/ngx-smz-ui.mjs.map +1 -1
- package/lib/modules/smz-layouts/features/login/login.component.d.ts +7 -3
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { Component, HostBinding, Input, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { Component, HostBinding, Input, ChangeDetectionStrategy, ContentChildren } from '@angular/core';
|
|
3
3
|
import { Select } from '@ngxs/store';
|
|
4
4
|
import { LayoutUiSelectors } from '../../../../state/ui/layout/layout.selectors';
|
|
5
5
|
import { SmzLoginBuilder } from '../../../../builders/smz-login/state-builder';
|
|
6
|
+
import { PrimeTemplate } from 'primeng/api';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
import * as i1 from "../../core/globals/smz-layouts.config";
|
|
8
9
|
import * as i2 from "@ngxs/store";
|
|
@@ -30,6 +31,15 @@ export class SmzLoginComponent {
|
|
|
30
31
|
if (isAuthenticated)
|
|
31
32
|
this.store.dispatch(new this.state.actions.logout);
|
|
32
33
|
}
|
|
34
|
+
ngAfterContentInit() {
|
|
35
|
+
this.templates.forEach((item) => {
|
|
36
|
+
switch (item.getType()) {
|
|
37
|
+
case 'extra':
|
|
38
|
+
this.extraTemplate = item.template;
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
33
43
|
login(form) {
|
|
34
44
|
const payload = this.state.callbacks.payload(form.data);
|
|
35
45
|
this.state.callbacks.submit(form.data);
|
|
@@ -37,17 +47,20 @@ export class SmzLoginComponent {
|
|
|
37
47
|
}
|
|
38
48
|
}
|
|
39
49
|
SmzLoginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SmzLoginComponent, deps: [{ token: i1.SmzLayoutsConfig }, { token: i2.Store }, { token: i3.NgxRbkUtilsConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
-
SmzLoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SmzLoginComponent, selector: "smz-ui-login", inputs: { state: "state" }, host: { properties: { "class": "this.colorClass" } }, ngImport: i0, template: "<div [ngClass]=\"state.styleClass.card\" class=\"flex overflow-y-auto flex-col flex-nowrap items-stretch justify-center gap-3 sm:w-full md:w-2/5 lg:w-2/5 xl:w-2/4 2xl:w-2/6 h-full ml-auto mr-auto shadow-6\">\r\n\r\n <img *ngIf=\"state.logo.customPath != null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"state.logo.customPath\" />\r\n <img *ngIf=\"state.logo.customPath == null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"(appLogo$ | async)[state.logo.type]\" />\r\n\r\n <div class=\"w-full grid grid-nogutter flex-col items-stretch justify-center gap-4 p-6\">\r\n <div *ngIf=\"state.message\" class=\"ml-auto mr-auto\">{{ state.message }}</div>\r\n <smz-form-group #formComponent (submit)=\"login($event)\" [config]=\"state.form\"></smz-form-group>\r\n <button pButton class=\"\" [disabled]=\"!formComponent.isValid\" type=\"button\" label=\"ENTRAR\" (click)=\"login(formComponent.getData())\"></button>\r\n <div *ngIf=\"state.extraInfo\" class=\"text-sm ml-auto mr-auto\">{{ state.extraInfo }}</div>\r\n </div>\r\n\r\n</div>", components: [{ type: i4.FormGroupComponent, selector: "smz-form-group", inputs: ["config"], outputs: ["statusChanges", "changed", "submit"] }], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
50
|
+
SmzLoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SmzLoginComponent, selector: "smz-ui-login", inputs: { state: "state" }, host: { properties: { "class": "this.colorClass" } }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: "<div [ngClass]=\"state.styleClass.card\" class=\"flex overflow-y-auto flex-col flex-nowrap items-stretch justify-center gap-3 sm:w-full md:w-2/5 lg:w-2/5 xl:w-2/4 2xl:w-2/6 h-full ml-auto mr-auto shadow-6\">\r\n\r\n <img *ngIf=\"state.logo.customPath != null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"state.logo.customPath\" />\r\n <img *ngIf=\"state.logo.customPath == null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"(appLogo$ | async)[state.logo.type]\" />\r\n\r\n <div class=\"w-full grid grid-nogutter flex-col items-stretch justify-center gap-4 p-6\">\r\n <div *ngIf=\"state.message\" class=\"ml-auto mr-auto\">{{ state.message }}</div>\r\n <smz-form-group #formComponent (submit)=\"login($event)\" [config]=\"state.form\"></smz-form-group>\r\n <button pButton class=\"\" [disabled]=\"!formComponent.isValid\" type=\"button\" label=\"ENTRAR\" (click)=\"login(formComponent.getData())\"></button>\r\n <ng-container *ngTemplateOutlet=\"extraTemplate; context: { $implicit: state }\"></ng-container>\r\n <div *ngIf=\"state.extraInfo\" class=\"text-sm ml-auto mr-auto\">{{ state.extraInfo }}</div>\r\n </div>\r\n\r\n</div>", components: [{ type: i4.FormGroupComponent, selector: "smz-form-group", inputs: ["config"], outputs: ["statusChanges", "changed", "submit"] }], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
41
51
|
__decorate([
|
|
42
52
|
Select(LayoutUiSelectors.appContentLogo)
|
|
43
53
|
], SmzLoginComponent.prototype, "appLogo$", void 0);
|
|
44
54
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SmzLoginComponent, decorators: [{
|
|
45
55
|
type: Component,
|
|
46
|
-
args: [{ selector: 'smz-ui-login', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"state.styleClass.card\" class=\"flex overflow-y-auto flex-col flex-nowrap items-stretch justify-center gap-3 sm:w-full md:w-2/5 lg:w-2/5 xl:w-2/4 2xl:w-2/6 h-full ml-auto mr-auto shadow-6\">\r\n\r\n <img *ngIf=\"state.logo.customPath != null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"state.logo.customPath\" />\r\n <img *ngIf=\"state.logo.customPath == null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"(appLogo$ | async)[state.logo.type]\" />\r\n\r\n <div class=\"w-full grid grid-nogutter flex-col items-stretch justify-center gap-4 p-6\">\r\n <div *ngIf=\"state.message\" class=\"ml-auto mr-auto\">{{ state.message }}</div>\r\n <smz-form-group #formComponent (submit)=\"login($event)\" [config]=\"state.form\"></smz-form-group>\r\n <button pButton class=\"\" [disabled]=\"!formComponent.isValid\" type=\"button\" label=\"ENTRAR\" (click)=\"login(formComponent.getData())\"></button>\r\n <div *ngIf=\"state.extraInfo\" class=\"text-sm ml-auto mr-auto\">{{ state.extraInfo }}</div>\r\n </div>\r\n\r\n</div>" }]
|
|
47
|
-
}], ctorParameters: function () { return [{ type: i1.SmzLayoutsConfig }, { type: i2.Store }, { type: i3.NgxRbkUtilsConfig }]; }, propDecorators: {
|
|
56
|
+
args: [{ selector: 'smz-ui-login', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"state.styleClass.card\" class=\"flex overflow-y-auto flex-col flex-nowrap items-stretch justify-center gap-3 sm:w-full md:w-2/5 lg:w-2/5 xl:w-2/4 2xl:w-2/6 h-full ml-auto mr-auto shadow-6\">\r\n\r\n <img *ngIf=\"state.logo.customPath != null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"state.logo.customPath\" />\r\n <img *ngIf=\"state.logo.customPath == null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"(appLogo$ | async)[state.logo.type]\" />\r\n\r\n <div class=\"w-full grid grid-nogutter flex-col items-stretch justify-center gap-4 p-6\">\r\n <div *ngIf=\"state.message\" class=\"ml-auto mr-auto\">{{ state.message }}</div>\r\n <smz-form-group #formComponent (submit)=\"login($event)\" [config]=\"state.form\"></smz-form-group>\r\n <button pButton class=\"\" [disabled]=\"!formComponent.isValid\" type=\"button\" label=\"ENTRAR\" (click)=\"login(formComponent.getData())\"></button>\r\n <ng-container *ngTemplateOutlet=\"extraTemplate; context: { $implicit: state }\"></ng-container>\r\n <div *ngIf=\"state.extraInfo\" class=\"text-sm ml-auto mr-auto\">{{ state.extraInfo }}</div>\r\n </div>\r\n\r\n</div>" }]
|
|
57
|
+
}], ctorParameters: function () { return [{ type: i1.SmzLayoutsConfig }, { type: i2.Store }, { type: i3.NgxRbkUtilsConfig }]; }, propDecorators: { templates: [{
|
|
58
|
+
type: ContentChildren,
|
|
59
|
+
args: [PrimeTemplate]
|
|
60
|
+
}], appLogo$: [], state: [{
|
|
48
61
|
type: Input
|
|
49
62
|
}], colorClass: [{
|
|
50
63
|
type: HostBinding,
|
|
51
64
|
args: ['class']
|
|
52
65
|
}] } });
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9naW4uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNtei11aS9zcmMvbGliL21vZHVsZXMvc216LWxheW91dHMvZmVhdHVyZXMvbG9naW4vbG9naW4uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNtei11aS9zcmMvbGliL21vZHVsZXMvc216LWxheW91dHMvZmVhdHVyZXMvbG9naW4vbG9naW4uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsV0FBVyxFQUFFLEtBQUssRUFBVSx1QkFBdUIsRUFBZSxlQUFlLEVBQStCLE1BQU0sZUFBZSxDQUFDO0FBQzFKLE9BQU8sRUFBRSxNQUFNLEVBQVMsTUFBTSxhQUFhLENBQUM7QUFFNUMsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sOENBQThDLENBQUM7QUFPakYsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDhDQUE4QyxDQUFDO0FBQy9FLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxhQUFhLENBQUM7Ozs7Ozs7O0FBTzVDLE1BQU0sT0FBTyxpQkFBaUI7SUFPNUIsWUFBNEIsTUFBd0IsRUFBVSxLQUFZLEVBQVMsU0FBNEI7UUFBbkYsV0FBTSxHQUFOLE1BQU0sQ0FBa0I7UUFBVSxVQUFLLEdBQUwsS0FBSyx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cclxuICA8ZGl2IGNsYXNzPVwidy1mdWxsIGdyaWQgZ3JpZC1ub2d1dHRlciBmbGV4LWNvbCBpdGVtcy1zdHJldGNoIGp1c3RpZnktY2VudGVyIGdhcC00IHAtNlwiPlxyXG4gICAgPGRpdiAqbmdJZj1cInN0YXRlLm1lc3NhZ2VcIiBjbGFzcz1cIm1sLWF1dG8gbXItYXV0b1wiPnt7IHN0YXRlLm1lc3NhZ2UgfX08L2Rpdj5cclxuICAgIDxzbXotZm9ybS1ncm91cCAjZm9ybUNvbXBvbmVudCAoc3VibWl0KT1cImxvZ2luKCRldmVudClcIiBbY29uZmlnXT1cInN0YXRlLmZvcm1cIj48L3Ntei1mb3JtLWdyb3VwPlxyXG4gICAgPGJ1dHRvbiBwQnV0dG9uIGNsYXNzPVwiXCIgW2Rpc2FibGVkXT1cIiFmb3JtQ29tcG9uZW50LmlzVmFsaWRcIiB0eXBlPVwiYnV0dG9uXCIgbGFiZWw9XCJFTlRSQVJcIiAoY2xpY2spPVwibG9naW4oZm9ybUNvbXBvbmVudC5nZXREYXRhKCkpXCI+PC9idXR0b24+XHJcbiAgICA8bmctY29udGFpbmVyICpuZ1RlbXBsYXRlT3V0bGV0PVwiZXh0cmFUZW1wbGF0ZTsgY29udGV4dDogeyAkaW1wbGljaXQ6IHN0YXRlIH1cIj48L25nLWNvbnRhaW5lcj5cclxuICAgIDxkaXYgKm5nSWY9XCJzdGF0ZS5leHRyYUluZm9cIiBjbGFzcz1cInRleHQtc20gbWwtYXV0byBtci1hdXRvXCI+e3sgc3RhdGUuZXh0cmFJbmZvIH19PC9kaXY+XHJcbiAgPC9kaXY+XHJcblxyXG48L2Rpdj4iXX0=
|
package/fesm2015/ngx-smz-ui.mjs
CHANGED
|
@@ -18006,6 +18006,15 @@ class SmzLoginComponent {
|
|
|
18006
18006
|
if (isAuthenticated)
|
|
18007
18007
|
this.store.dispatch(new this.state.actions.logout);
|
|
18008
18008
|
}
|
|
18009
|
+
ngAfterContentInit() {
|
|
18010
|
+
this.templates.forEach((item) => {
|
|
18011
|
+
switch (item.getType()) {
|
|
18012
|
+
case 'extra':
|
|
18013
|
+
this.extraTemplate = item.template;
|
|
18014
|
+
break;
|
|
18015
|
+
}
|
|
18016
|
+
});
|
|
18017
|
+
}
|
|
18009
18018
|
login(form) {
|
|
18010
18019
|
const payload = this.state.callbacks.payload(form.data);
|
|
18011
18020
|
this.state.callbacks.submit(form.data);
|
|
@@ -18013,14 +18022,17 @@ class SmzLoginComponent {
|
|
|
18013
18022
|
}
|
|
18014
18023
|
}
|
|
18015
18024
|
SmzLoginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SmzLoginComponent, deps: [{ token: SmzLayoutsConfig }, { token: i1$4.Store }, { token: NgxRbkUtilsConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
18016
|
-
SmzLoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SmzLoginComponent, selector: "smz-ui-login", inputs: { state: "state" }, host: { properties: { "class": "this.colorClass" } }, ngImport: i0, template: "<div [ngClass]=\"state.styleClass.card\" class=\"flex overflow-y-auto flex-col flex-nowrap items-stretch justify-center gap-3 sm:w-full md:w-2/5 lg:w-2/5 xl:w-2/4 2xl:w-2/6 h-full ml-auto mr-auto shadow-6\">\r\n\r\n <img *ngIf=\"state.logo.customPath != null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"state.logo.customPath\" />\r\n <img *ngIf=\"state.logo.customPath == null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"(appLogo$ | async)[state.logo.type]\" />\r\n\r\n <div class=\"w-full grid grid-nogutter flex-col items-stretch justify-center gap-4 p-6\">\r\n <div *ngIf=\"state.message\" class=\"ml-auto mr-auto\">{{ state.message }}</div>\r\n <smz-form-group #formComponent (submit)=\"login($event)\" [config]=\"state.form\"></smz-form-group>\r\n <button pButton class=\"\" [disabled]=\"!formComponent.isValid\" type=\"button\" label=\"ENTRAR\" (click)=\"login(formComponent.getData())\"></button>\r\n <div *ngIf=\"state.extraInfo\" class=\"text-sm ml-auto mr-auto\">{{ state.extraInfo }}</div>\r\n </div>\r\n\r\n</div>", components: [{ type: FormGroupComponent, selector: "smz-form-group", inputs: ["config"], outputs: ["statusChanges", "changed", "submit"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }], pipes: { "async": i1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
18025
|
+
SmzLoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SmzLoginComponent, selector: "smz-ui-login", inputs: { state: "state" }, host: { properties: { "class": "this.colorClass" } }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: "<div [ngClass]=\"state.styleClass.card\" class=\"flex overflow-y-auto flex-col flex-nowrap items-stretch justify-center gap-3 sm:w-full md:w-2/5 lg:w-2/5 xl:w-2/4 2xl:w-2/6 h-full ml-auto mr-auto shadow-6\">\r\n\r\n <img *ngIf=\"state.logo.customPath != null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"state.logo.customPath\" />\r\n <img *ngIf=\"state.logo.customPath == null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"(appLogo$ | async)[state.logo.type]\" />\r\n\r\n <div class=\"w-full grid grid-nogutter flex-col items-stretch justify-center gap-4 p-6\">\r\n <div *ngIf=\"state.message\" class=\"ml-auto mr-auto\">{{ state.message }}</div>\r\n <smz-form-group #formComponent (submit)=\"login($event)\" [config]=\"state.form\"></smz-form-group>\r\n <button pButton class=\"\" [disabled]=\"!formComponent.isValid\" type=\"button\" label=\"ENTRAR\" (click)=\"login(formComponent.getData())\"></button>\r\n <ng-container *ngTemplateOutlet=\"extraTemplate; context: { $implicit: state }\"></ng-container>\r\n <div *ngIf=\"state.extraInfo\" class=\"text-sm ml-auto mr-auto\">{{ state.extraInfo }}</div>\r\n </div>\r\n\r\n</div>", components: [{ type: FormGroupComponent, selector: "smz-form-group", inputs: ["config"], outputs: ["statusChanges", "changed", "submit"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
18017
18026
|
__decorate([
|
|
18018
18027
|
Select(LayoutUiSelectors.appContentLogo)
|
|
18019
18028
|
], SmzLoginComponent.prototype, "appLogo$", void 0);
|
|
18020
18029
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SmzLoginComponent, decorators: [{
|
|
18021
18030
|
type: Component,
|
|
18022
|
-
args: [{ selector: 'smz-ui-login', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"state.styleClass.card\" class=\"flex overflow-y-auto flex-col flex-nowrap items-stretch justify-center gap-3 sm:w-full md:w-2/5 lg:w-2/5 xl:w-2/4 2xl:w-2/6 h-full ml-auto mr-auto shadow-6\">\r\n\r\n <img *ngIf=\"state.logo.customPath != null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"state.logo.customPath\" />\r\n <img *ngIf=\"state.logo.customPath == null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"(appLogo$ | async)[state.logo.type]\" />\r\n\r\n <div class=\"w-full grid grid-nogutter flex-col items-stretch justify-center gap-4 p-6\">\r\n <div *ngIf=\"state.message\" class=\"ml-auto mr-auto\">{{ state.message }}</div>\r\n <smz-form-group #formComponent (submit)=\"login($event)\" [config]=\"state.form\"></smz-form-group>\r\n <button pButton class=\"\" [disabled]=\"!formComponent.isValid\" type=\"button\" label=\"ENTRAR\" (click)=\"login(formComponent.getData())\"></button>\r\n <div *ngIf=\"state.extraInfo\" class=\"text-sm ml-auto mr-auto\">{{ state.extraInfo }}</div>\r\n </div>\r\n\r\n</div>" }]
|
|
18023
|
-
}], ctorParameters: function () { return [{ type: SmzLayoutsConfig }, { type: i1$4.Store }, { type: NgxRbkUtilsConfig }]; }, propDecorators: {
|
|
18031
|
+
args: [{ selector: 'smz-ui-login', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"state.styleClass.card\" class=\"flex overflow-y-auto flex-col flex-nowrap items-stretch justify-center gap-3 sm:w-full md:w-2/5 lg:w-2/5 xl:w-2/4 2xl:w-2/6 h-full ml-auto mr-auto shadow-6\">\r\n\r\n <img *ngIf=\"state.logo.customPath != null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"state.logo.customPath\" />\r\n <img *ngIf=\"state.logo.customPath == null\" [ngClass]=\"state.logo.styleClass\" class=\"object-fill ml-auto mr-auto\" [src]=\"(appLogo$ | async)[state.logo.type]\" />\r\n\r\n <div class=\"w-full grid grid-nogutter flex-col items-stretch justify-center gap-4 p-6\">\r\n <div *ngIf=\"state.message\" class=\"ml-auto mr-auto\">{{ state.message }}</div>\r\n <smz-form-group #formComponent (submit)=\"login($event)\" [config]=\"state.form\"></smz-form-group>\r\n <button pButton class=\"\" [disabled]=\"!formComponent.isValid\" type=\"button\" label=\"ENTRAR\" (click)=\"login(formComponent.getData())\"></button>\r\n <ng-container *ngTemplateOutlet=\"extraTemplate; context: { $implicit: state }\"></ng-container>\r\n <div *ngIf=\"state.extraInfo\" class=\"text-sm ml-auto mr-auto\">{{ state.extraInfo }}</div>\r\n </div>\r\n\r\n</div>" }]
|
|
18032
|
+
}], ctorParameters: function () { return [{ type: SmzLayoutsConfig }, { type: i1$4.Store }, { type: NgxRbkUtilsConfig }]; }, propDecorators: { templates: [{
|
|
18033
|
+
type: ContentChildren,
|
|
18034
|
+
args: [PrimeTemplate]
|
|
18035
|
+
}], appLogo$: [], state: [{
|
|
18024
18036
|
type: Input
|
|
18025
18037
|
}], colorClass: [{
|
|
18026
18038
|
type: HostBinding,
|