@mckit/auth 18.0.1 → 18.0.3
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.
|
@@ -5,24 +5,61 @@ import { IconFieldModule } from 'primeng/iconfield';
|
|
|
5
5
|
import { InputIconModule } from 'primeng/inputicon';
|
|
6
6
|
import { InputTextModule } from 'primeng/inputtext';
|
|
7
7
|
import { PasswordModule } from 'primeng/password';
|
|
8
|
+
import { FormGroup, FormsModule, ReactiveFormsModule, FormControl, Validators } from '@angular/forms';
|
|
9
|
+
import { MessagesModule } from 'primeng/messages';
|
|
10
|
+
import { MessageService } from 'primeng/api';
|
|
8
11
|
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "primeng/
|
|
10
|
-
import * as i2 from "
|
|
11
|
-
import * as i3 from "primeng/
|
|
12
|
-
import * as i4 from "primeng/
|
|
13
|
-
import * as i5 from "primeng/
|
|
14
|
-
import * as i6 from "primeng/
|
|
15
|
-
import * as i7 from "primeng/
|
|
12
|
+
import * as i1 from "primeng/api";
|
|
13
|
+
import * as i2 from "@angular/forms";
|
|
14
|
+
import * as i3 from "primeng/button";
|
|
15
|
+
import * as i4 from "primeng/card";
|
|
16
|
+
import * as i5 from "primeng/iconfield";
|
|
17
|
+
import * as i6 from "primeng/inputicon";
|
|
18
|
+
import * as i7 from "primeng/inputtext";
|
|
19
|
+
import * as i8 from "primeng/password";
|
|
20
|
+
import * as i9 from "primeng/messages";
|
|
16
21
|
export class MCAuthBasicComponent {
|
|
22
|
+
messageService;
|
|
17
23
|
config;
|
|
18
24
|
submit = new EventEmitter();
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
group = new FormGroup({
|
|
26
|
+
email: new FormControl('', [Validators.required, Validators.email]),
|
|
27
|
+
password: new FormControl('', Validators.required)
|
|
28
|
+
});
|
|
29
|
+
isSending = false;
|
|
30
|
+
constructor(messageService) {
|
|
31
|
+
this.messageService = messageService;
|
|
32
|
+
}
|
|
33
|
+
onClickSubmit() {
|
|
34
|
+
this.clearMessages();
|
|
35
|
+
let obj = new MCAuthModel();
|
|
36
|
+
obj.email = this.group.get('email')?.value;
|
|
37
|
+
obj.password = this.group.get('password')?.value;
|
|
38
|
+
this.showLoading();
|
|
39
|
+
this.submit.emit(obj);
|
|
40
|
+
}
|
|
41
|
+
showSuccessMessage(message) {
|
|
42
|
+
this.messageService.add({ severity: 'success', summary: message });
|
|
43
|
+
}
|
|
44
|
+
showErrorMessage(message) {
|
|
45
|
+
this.messageService.add({ severity: 'error', summary: message });
|
|
46
|
+
}
|
|
47
|
+
clearMessages() {
|
|
48
|
+
this.messageService.clear();
|
|
49
|
+
}
|
|
50
|
+
showLoading() {
|
|
51
|
+
this.isSending = true;
|
|
52
|
+
}
|
|
53
|
+
hideLoading() {
|
|
54
|
+
this.isSending = false;
|
|
55
|
+
}
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: MCAuthBasicComponent, deps: [{ token: i1.MessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: MCAuthBasicComponent, isStandalone: true, selector: "mc-auth-basic", inputs: { config: "config" }, outputs: { submit: "submit" }, providers: [MessageService], ngImport: i0, template: "<div class=\"mc-auth-basic-container\">\n <p-card [header]=\"config.title ?? 'Log in'\" [subheader]=\"config.subtitle ?? 'Please enter your details'\" [style]=\"{ width: '500px', 'max-width': '500px' }\">\n\n <div class=\"\" [formGroup]=\"group\">\n <p-iconField iconPosition=\"left\">\n <p-inputIcon styleClass=\"pi pi-envelope\" />\n <input type=\"text\" pInputText [placeholder]=\"config.emailPlaceholder ?? 'Email'\" formControlName=\"email\" />\n </p-iconField>\n\n <br/><br/>\n\n <p-iconField iconPosition=\"left\">\n <p-inputIcon styleClass=\"pi pi-lock\" />\n <input type=\"password\" pPassword [placeholder]=\"config.passwordPlaceholder ?? 'Password'\" [feedback]=\"false\" toggleMask=\"true\" formControlName=\"password\" />\n </p-iconField>\n\n <p-messages />\n </div>\n\n <ng-template pTemplate=\"footer\">\n <div class=\"flex gap-3 mt-1\">\n <p-button [label]=\"config.submitButton ?? 'Log in'\" [style]=\"{ width: '100%' }\" (click)=\"onClickSubmit()\" [disabled]=\"group.invalid || isSending\" />\n </div>\n </ng-template>\n </p-card>\n</div>\n", styles: [".mc-auth-basic-container{display:flex;justify-content:center;min-height:100%;align-items:center}p-iconField input{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: CardModule }, { kind: "component", type: i4.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "ngmodule", type: IconFieldModule }, { kind: "component", type: i5.IconField, selector: "p-iconField", inputs: ["iconPosition"] }, { kind: "ngmodule", type: InputIconModule }, { kind: "component", type: i6.InputIcon, selector: "p-inputIcon", inputs: ["styleClass"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: PasswordModule }, { kind: "directive", type: i8.PasswordDirective, selector: "[pPassword]", inputs: ["promptLabel", "weakLabel", "mediumLabel", "strongLabel", "feedback", "showPassword", "variant"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i9.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }] });
|
|
21
58
|
}
|
|
22
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: MCAuthBasicComponent, decorators: [{
|
|
23
60
|
type: Component,
|
|
24
|
-
args: [{ selector: 'mc-auth-basic', standalone: true, imports: [ButtonModule, CardModule, IconFieldModule, InputIconModule, InputTextModule, PasswordModule], template: "<div class=\"mc-auth-basic-container\">\n <p-card [header]=\"config.title ?? 'Log in'\" [subheader]=\"config.subtitle ?? 'Please enter your details'\" [style]=\"{ width: '500px', 'max-width': '500px' }\">\n <p-iconField iconPosition=\"left\">\n
|
|
25
|
-
}], propDecorators: { config: [{
|
|
61
|
+
args: [{ selector: 'mc-auth-basic', standalone: true, imports: [FormsModule, ReactiveFormsModule, ButtonModule, CardModule, IconFieldModule, InputIconModule, InputTextModule, PasswordModule, MessagesModule], providers: [MessageService], template: "<div class=\"mc-auth-basic-container\">\n <p-card [header]=\"config.title ?? 'Log in'\" [subheader]=\"config.subtitle ?? 'Please enter your details'\" [style]=\"{ width: '500px', 'max-width': '500px' }\">\n\n <div class=\"\" [formGroup]=\"group\">\n <p-iconField iconPosition=\"left\">\n <p-inputIcon styleClass=\"pi pi-envelope\" />\n <input type=\"text\" pInputText [placeholder]=\"config.emailPlaceholder ?? 'Email'\" formControlName=\"email\" />\n </p-iconField>\n\n <br/><br/>\n\n <p-iconField iconPosition=\"left\">\n <p-inputIcon styleClass=\"pi pi-lock\" />\n <input type=\"password\" pPassword [placeholder]=\"config.passwordPlaceholder ?? 'Password'\" [feedback]=\"false\" toggleMask=\"true\" formControlName=\"password\" />\n </p-iconField>\n\n <p-messages />\n </div>\n\n <ng-template pTemplate=\"footer\">\n <div class=\"flex gap-3 mt-1\">\n <p-button [label]=\"config.submitButton ?? 'Log in'\" [style]=\"{ width: '100%' }\" (click)=\"onClickSubmit()\" [disabled]=\"group.invalid || isSending\" />\n </div>\n </ng-template>\n </p-card>\n</div>\n", styles: [".mc-auth-basic-container{display:flex;justify-content:center;min-height:100%;align-items:center}p-iconField input{width:100%}\n"] }]
|
|
62
|
+
}], ctorParameters: () => [{ type: i1.MessageService }], propDecorators: { config: [{
|
|
26
63
|
type: Input
|
|
27
64
|
}], submit: [{
|
|
28
65
|
type: Output
|
|
@@ -34,4 +71,8 @@ export class MCAuthBasicConfig {
|
|
|
34
71
|
passwordPlaceholder;
|
|
35
72
|
submitButton;
|
|
36
73
|
}
|
|
37
|
-
|
|
74
|
+
export class MCAuthModel {
|
|
75
|
+
email;
|
|
76
|
+
password;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC1iYXNpYy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9tY2tpdC9hdXRoL3NyYy9saWIvcGFnZXMvYXV0aC1iYXNpYy9hdXRoLWJhc2ljLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL21ja2l0L2F1dGgvc3JjL2xpYi9wYWdlcy9hdXRoLWJhc2ljL2F1dGgt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3VibWl0KClcIiBbZGlzYWJsZWRdPVwiZ3JvdXAuaW52YWxpZCB8fCBpc1NlbmRpbmdcIiAvPlxuICAgICAgPC9kaXY+XG4gICAgPC9uZy10ZW1wbGF0ZT5cbiAgPC9wLWNhcmQ+XG48L2Rpdj5cbiJdfQ==
|
package/fesm2022/mckit-auth.mjs
CHANGED
|
@@ -1,29 +1,66 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter, Component, Input, Output } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i4 from 'primeng/card';
|
|
4
4
|
import { CardModule } from 'primeng/card';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i3 from 'primeng/button';
|
|
6
6
|
import { ButtonModule } from 'primeng/button';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i5 from 'primeng/iconfield';
|
|
8
8
|
import { IconFieldModule } from 'primeng/iconfield';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i6 from 'primeng/inputicon';
|
|
10
10
|
import { InputIconModule } from 'primeng/inputicon';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i7 from 'primeng/inputtext';
|
|
12
12
|
import { InputTextModule } from 'primeng/inputtext';
|
|
13
|
-
import * as
|
|
13
|
+
import * as i8 from 'primeng/password';
|
|
14
14
|
import { PasswordModule } from 'primeng/password';
|
|
15
|
-
import * as i2 from '
|
|
15
|
+
import * as i2 from '@angular/forms';
|
|
16
|
+
import { FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
17
|
+
import * as i9 from 'primeng/messages';
|
|
18
|
+
import { MessagesModule } from 'primeng/messages';
|
|
19
|
+
import * as i1 from 'primeng/api';
|
|
20
|
+
import { MessageService } from 'primeng/api';
|
|
16
21
|
|
|
17
22
|
class MCAuthBasicComponent {
|
|
23
|
+
messageService;
|
|
18
24
|
config;
|
|
19
25
|
submit = new EventEmitter();
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
group = new FormGroup({
|
|
27
|
+
email: new FormControl('', [Validators.required, Validators.email]),
|
|
28
|
+
password: new FormControl('', Validators.required)
|
|
29
|
+
});
|
|
30
|
+
isSending = false;
|
|
31
|
+
constructor(messageService) {
|
|
32
|
+
this.messageService = messageService;
|
|
33
|
+
}
|
|
34
|
+
onClickSubmit() {
|
|
35
|
+
this.clearMessages();
|
|
36
|
+
let obj = new MCAuthModel();
|
|
37
|
+
obj.email = this.group.get('email')?.value;
|
|
38
|
+
obj.password = this.group.get('password')?.value;
|
|
39
|
+
this.showLoading();
|
|
40
|
+
this.submit.emit(obj);
|
|
41
|
+
}
|
|
42
|
+
showSuccessMessage(message) {
|
|
43
|
+
this.messageService.add({ severity: 'success', summary: message });
|
|
44
|
+
}
|
|
45
|
+
showErrorMessage(message) {
|
|
46
|
+
this.messageService.add({ severity: 'error', summary: message });
|
|
47
|
+
}
|
|
48
|
+
clearMessages() {
|
|
49
|
+
this.messageService.clear();
|
|
50
|
+
}
|
|
51
|
+
showLoading() {
|
|
52
|
+
this.isSending = true;
|
|
53
|
+
}
|
|
54
|
+
hideLoading() {
|
|
55
|
+
this.isSending = false;
|
|
56
|
+
}
|
|
57
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: MCAuthBasicComponent, deps: [{ token: i1.MessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
58
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: MCAuthBasicComponent, isStandalone: true, selector: "mc-auth-basic", inputs: { config: "config" }, outputs: { submit: "submit" }, providers: [MessageService], ngImport: i0, template: "<div class=\"mc-auth-basic-container\">\n <p-card [header]=\"config.title ?? 'Log in'\" [subheader]=\"config.subtitle ?? 'Please enter your details'\" [style]=\"{ width: '500px', 'max-width': '500px' }\">\n\n <div class=\"\" [formGroup]=\"group\">\n <p-iconField iconPosition=\"left\">\n <p-inputIcon styleClass=\"pi pi-envelope\" />\n <input type=\"text\" pInputText [placeholder]=\"config.emailPlaceholder ?? 'Email'\" formControlName=\"email\" />\n </p-iconField>\n\n <br/><br/>\n\n <p-iconField iconPosition=\"left\">\n <p-inputIcon styleClass=\"pi pi-lock\" />\n <input type=\"password\" pPassword [placeholder]=\"config.passwordPlaceholder ?? 'Password'\" [feedback]=\"false\" toggleMask=\"true\" formControlName=\"password\" />\n </p-iconField>\n\n <p-messages />\n </div>\n\n <ng-template pTemplate=\"footer\">\n <div class=\"flex gap-3 mt-1\">\n <p-button [label]=\"config.submitButton ?? 'Log in'\" [style]=\"{ width: '100%' }\" (click)=\"onClickSubmit()\" [disabled]=\"group.invalid || isSending\" />\n </div>\n </ng-template>\n </p-card>\n</div>\n", styles: [".mc-auth-basic-container{display:flex;justify-content:center;min-height:100%;align-items:center}p-iconField input{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "style", "styleClass", "badgeClass", "ariaLabel", "autofocus"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: CardModule }, { kind: "component", type: i4.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "ngmodule", type: IconFieldModule }, { kind: "component", type: i5.IconField, selector: "p-iconField", inputs: ["iconPosition"] }, { kind: "ngmodule", type: InputIconModule }, { kind: "component", type: i6.InputIcon, selector: "p-inputIcon", inputs: ["styleClass"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "ngmodule", type: PasswordModule }, { kind: "directive", type: i8.PasswordDirective, selector: "[pPassword]", inputs: ["promptLabel", "weakLabel", "mediumLabel", "strongLabel", "feedback", "showPassword", "variant"] }, { kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i9.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange", "onClose"] }] });
|
|
22
59
|
}
|
|
23
60
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: MCAuthBasicComponent, decorators: [{
|
|
24
61
|
type: Component,
|
|
25
|
-
args: [{ selector: 'mc-auth-basic', standalone: true, imports: [ButtonModule, CardModule, IconFieldModule, InputIconModule, InputTextModule, PasswordModule], template: "<div class=\"mc-auth-basic-container\">\n <p-card [header]=\"config.title ?? 'Log in'\" [subheader]=\"config.subtitle ?? 'Please enter your details'\" [style]=\"{ width: '500px', 'max-width': '500px' }\">\n <p-iconField iconPosition=\"left\">\n
|
|
26
|
-
}], propDecorators: { config: [{
|
|
62
|
+
args: [{ selector: 'mc-auth-basic', standalone: true, imports: [FormsModule, ReactiveFormsModule, ButtonModule, CardModule, IconFieldModule, InputIconModule, InputTextModule, PasswordModule, MessagesModule], providers: [MessageService], template: "<div class=\"mc-auth-basic-container\">\n <p-card [header]=\"config.title ?? 'Log in'\" [subheader]=\"config.subtitle ?? 'Please enter your details'\" [style]=\"{ width: '500px', 'max-width': '500px' }\">\n\n <div class=\"\" [formGroup]=\"group\">\n <p-iconField iconPosition=\"left\">\n <p-inputIcon styleClass=\"pi pi-envelope\" />\n <input type=\"text\" pInputText [placeholder]=\"config.emailPlaceholder ?? 'Email'\" formControlName=\"email\" />\n </p-iconField>\n\n <br/><br/>\n\n <p-iconField iconPosition=\"left\">\n <p-inputIcon styleClass=\"pi pi-lock\" />\n <input type=\"password\" pPassword [placeholder]=\"config.passwordPlaceholder ?? 'Password'\" [feedback]=\"false\" toggleMask=\"true\" formControlName=\"password\" />\n </p-iconField>\n\n <p-messages />\n </div>\n\n <ng-template pTemplate=\"footer\">\n <div class=\"flex gap-3 mt-1\">\n <p-button [label]=\"config.submitButton ?? 'Log in'\" [style]=\"{ width: '100%' }\" (click)=\"onClickSubmit()\" [disabled]=\"group.invalid || isSending\" />\n </div>\n </ng-template>\n </p-card>\n</div>\n", styles: [".mc-auth-basic-container{display:flex;justify-content:center;min-height:100%;align-items:center}p-iconField input{width:100%}\n"] }]
|
|
63
|
+
}], ctorParameters: () => [{ type: i1.MessageService }], propDecorators: { config: [{
|
|
27
64
|
type: Input
|
|
28
65
|
}], submit: [{
|
|
29
66
|
type: Output
|
|
@@ -35,6 +72,10 @@ class MCAuthBasicConfig {
|
|
|
35
72
|
passwordPlaceholder;
|
|
36
73
|
submitButton;
|
|
37
74
|
}
|
|
75
|
+
class MCAuthModel {
|
|
76
|
+
email;
|
|
77
|
+
password;
|
|
78
|
+
}
|
|
38
79
|
|
|
39
80
|
/*
|
|
40
81
|
* Public API Surface of auth
|
|
@@ -47,5 +88,5 @@ class MCAuthBasicConfig {
|
|
|
47
88
|
* Generated bundle index. Do not edit.
|
|
48
89
|
*/
|
|
49
90
|
|
|
50
|
-
export { MCAuthBasicComponent, MCAuthBasicConfig };
|
|
91
|
+
export { MCAuthBasicComponent, MCAuthBasicConfig, MCAuthModel };
|
|
51
92
|
//# sourceMappingURL=mckit-auth.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mckit-auth.mjs","sources":["../../../../projects/mckit/auth/src/lib/pages/auth-basic/auth-basic.component.ts","../../../../projects/mckit/auth/src/lib/pages/auth-basic/auth-basic.component.html","../../../../projects/mckit/auth/src/public-api.ts","../../../../projects/mckit/auth/src/mckit-auth.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { CardModule } from 'primeng/card';\nimport { ButtonModule } from 'primeng/button';\nimport { IconFieldModule } from 'primeng/iconfield';\nimport { InputIconModule } from 'primeng/inputicon';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { PasswordModule } from 'primeng/password';\n\n\n\n@Component({\n selector: 'mc-auth-basic',\n standalone: true,\n imports: [ButtonModule, CardModule, IconFieldModule, InputIconModule, InputTextModule, PasswordModule],\n templateUrl: './auth-basic.component.html',\n styleUrl: './auth-basic.component.scss'\n})\nexport class MCAuthBasicComponent {\n @Input() config!: MCAuthBasicConfig;\n @Output() submit = new EventEmitter<{ email: string, password: string }
|
|
1
|
+
{"version":3,"file":"mckit-auth.mjs","sources":["../../../../projects/mckit/auth/src/lib/pages/auth-basic/auth-basic.component.ts","../../../../projects/mckit/auth/src/lib/pages/auth-basic/auth-basic.component.html","../../../../projects/mckit/auth/src/public-api.ts","../../../../projects/mckit/auth/src/mckit-auth.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { CardModule } from 'primeng/card';\nimport { ButtonModule } from 'primeng/button';\nimport { IconFieldModule } from 'primeng/iconfield';\nimport { InputIconModule } from 'primeng/inputicon';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { PasswordModule } from 'primeng/password';\nimport { FormGroup, FormsModule, ReactiveFormsModule, FormControl, Validators } from '@angular/forms';\nimport { MessagesModule } from 'primeng/messages';\nimport { MessageService } from 'primeng/api';\n\n\n\n@Component({\n selector: 'mc-auth-basic',\n standalone: true,\n imports: [FormsModule, ReactiveFormsModule, ButtonModule, CardModule, IconFieldModule, InputIconModule, InputTextModule, PasswordModule, MessagesModule],\n providers: [MessageService],\n templateUrl: './auth-basic.component.html',\n styleUrl: './auth-basic.component.scss'\n})\nexport class MCAuthBasicComponent {\n @Input() config!: MCAuthBasicConfig;\n @Output() submit = new EventEmitter<MCAuthModel>();\n\n group = new FormGroup({\n email: new FormControl<string>('', [Validators.required, Validators.email]),\n password: new FormControl<string>('', Validators.required)\n });\n\n isSending = false;\n\n constructor(\n private messageService: MessageService\n ) {}\n\n onClickSubmit() {\n this.clearMessages();\n\n let obj = new MCAuthModel();\n obj.email = this.group.get('email')?.value;\n obj.password = this.group.get('password')?.value;\n\n this.showLoading();\n this.submit.emit(obj);\n }\n\n showSuccessMessage(message: string) {\n this.messageService.add({ severity: 'success', summary: message});\n }\n\n showErrorMessage(message: string) {\n this.messageService.add({ severity: 'error', summary: message});\n }\n\n clearMessages() {\n this.messageService.clear();\n }\n\n showLoading() {\n this.isSending = true;\n }\n\n hideLoading() {\n this.isSending = false;\n }\n}\n\nexport class MCAuthBasicConfig {\n title?: string;\n subtitle?: string;\n\n emailPlaceholder?: string;\n passwordPlaceholder?: string;\n\n submitButton?: string;\n}\n\nexport class MCAuthModel {\n email?: string|null;\n password?: string|null;\n}\n","<div class=\"mc-auth-basic-container\">\n <p-card [header]=\"config.title ?? 'Log in'\" [subheader]=\"config.subtitle ?? 'Please enter your details'\" [style]=\"{ width: '500px', 'max-width': '500px' }\">\n\n <div class=\"\" [formGroup]=\"group\">\n <p-iconField iconPosition=\"left\">\n <p-inputIcon styleClass=\"pi pi-envelope\" />\n <input type=\"text\" pInputText [placeholder]=\"config.emailPlaceholder ?? 'Email'\" formControlName=\"email\" />\n </p-iconField>\n\n <br/><br/>\n\n <p-iconField iconPosition=\"left\">\n <p-inputIcon styleClass=\"pi pi-lock\" />\n <input type=\"password\" pPassword [placeholder]=\"config.passwordPlaceholder ?? 'Password'\" [feedback]=\"false\" toggleMask=\"true\" formControlName=\"password\" />\n </p-iconField>\n\n <p-messages />\n </div>\n\n <ng-template pTemplate=\"footer\">\n <div class=\"flex gap-3 mt-1\">\n <p-button [label]=\"config.submitButton ?? 'Log in'\" [style]=\"{ width: '100%' }\" (click)=\"onClickSubmit()\" [disabled]=\"group.invalid || isSending\" />\n </div>\n </ng-template>\n </p-card>\n</div>\n","/*\n * Public API Surface of auth\n */\n\n/**\n * Pages\n */\nexport * from './lib/pages/auth-basic/auth-basic.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;MAqBa,oBAAoB,CAAA;AAYrB,IAAA,cAAA,CAAA;AAXD,IAAA,MAAM,CAAqB;AAC1B,IAAA,MAAM,GAAG,IAAI,YAAY,EAAe,CAAC;IAEnD,KAAK,GAAG,IAAI,SAAS,CAAC;AACpB,QAAA,KAAK,EAAE,IAAI,WAAW,CAAS,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;QAC3E,QAAQ,EAAE,IAAI,WAAW,CAAS,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC;AAC3D,KAAA,CAAC,CAAC;IAEH,SAAS,GAAG,KAAK,CAAC;AAElB,IAAA,WAAA,CACU,cAA8B,EAAA;QAA9B,IAAc,CAAA,cAAA,GAAd,cAAc,CAAgB;KACpC;IAEJ,aAAa,GAAA;QACX,IAAI,CAAC,aAAa,EAAE,CAAC;AAErB,QAAA,IAAI,GAAG,GAAG,IAAI,WAAW,EAAE,CAAC;AAC5B,QAAA,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;AAC3C,QAAA,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,KAAK,CAA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AA,EAAA,uBAAA,EAAA,uBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAK5I,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,SAAS;+BACE,eAAe,EAAA,UAAA,EACb,IAAI,EAAA,OAAA,EACP,CAAC,WAAW,EAAE,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,CAAC,EAAA,SAAA,EAC7I,CAAC,cAAc,CAAC,EAAA,QAAA,EAAA,8nCAAA,EAAA,MAAA,EAAA,CAAA,iIAAA,CAAA,EAAA,CAAA;mFAKlB,MAAM,EAAA,CAAA;sBAAd,KAAK;gBACI,MAAM,EAAA,CAAA;sBAAf,MAAM;;MA6CI,iBAAiB,CAAA;AAC5B,IAAA,KAAK,CAAU;AACf,IAAA,QAAQ,CAAU;AAElB,IAAA,gBAAgB,CAAU;AAC1B,IAAA,mBAAmB,CAAU;AAE7B,IAAA,YAAY,CAAU;AACvB,CAAA;MAEY,WAAW,CAAA;AACtB,IAAA,KAAK,CAAe;AACpB,IAAA,QAAQ,CAAe;AACxB;;AEjFD;;AAEG;AAEH;;AAEG;;ACNH;;AAEG;;;;"}
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { FormGroup, FormControl } from '@angular/forms';
|
|
3
|
+
import { MessageService } from 'primeng/api';
|
|
2
4
|
import * as i0 from "@angular/core";
|
|
3
5
|
export declare class MCAuthBasicComponent {
|
|
6
|
+
private messageService;
|
|
4
7
|
config: MCAuthBasicConfig;
|
|
5
|
-
submit: EventEmitter<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
submit: EventEmitter<MCAuthModel>;
|
|
9
|
+
group: FormGroup<{
|
|
10
|
+
email: FormControl<string | null>;
|
|
11
|
+
password: FormControl<string | null>;
|
|
8
12
|
}>;
|
|
13
|
+
isSending: boolean;
|
|
14
|
+
constructor(messageService: MessageService);
|
|
15
|
+
onClickSubmit(): void;
|
|
16
|
+
showSuccessMessage(message: string): void;
|
|
17
|
+
showErrorMessage(message: string): void;
|
|
18
|
+
clearMessages(): void;
|
|
19
|
+
showLoading(): void;
|
|
20
|
+
hideLoading(): void;
|
|
9
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<MCAuthBasicComponent, never>;
|
|
10
22
|
static ɵcmp: i0.ɵɵComponentDeclaration<MCAuthBasicComponent, "mc-auth-basic", never, { "config": { "alias": "config"; "required": false; }; }, { "submit": "submit"; }, never, never, true, never>;
|
|
11
23
|
}
|
|
@@ -16,3 +28,7 @@ export declare class MCAuthBasicConfig {
|
|
|
16
28
|
passwordPlaceholder?: string;
|
|
17
29
|
submitButton?: string;
|
|
18
30
|
}
|
|
31
|
+
export declare class MCAuthModel {
|
|
32
|
+
email?: string | null;
|
|
33
|
+
password?: string | null;
|
|
34
|
+
}
|