ngx-edyta-user 0.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.
- package/README.md +63 -0
- package/fesm2022/ngx-edyta-user.mjs +124 -0
- package/fesm2022/ngx-edyta-user.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/sign-up/sign-up.component.d.ts +59 -0
- package/lib/sign-up/validators/sign-up-validator.d.ts +10 -0
- package/package.json +23 -0
- package/public-api.d.ts +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# NgxEdytaUser
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng generate component component-name
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ng generate --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Building
|
|
20
|
+
|
|
21
|
+
To build the library, run:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ng build ngx-edyta-user
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
+
|
|
29
|
+
### Publishing the Library
|
|
30
|
+
|
|
31
|
+
Once the project is built, you can publish your library by following these steps:
|
|
32
|
+
|
|
33
|
+
1. Navigate to the `dist` directory:
|
|
34
|
+
```bash
|
|
35
|
+
cd dist/ngx-edyta-user
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
+
```bash
|
|
40
|
+
npm publish
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Running unit tests
|
|
44
|
+
|
|
45
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
ng test
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Running end-to-end tests
|
|
52
|
+
|
|
53
|
+
For end-to-end (e2e) testing, run:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
ng e2e
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
60
|
+
|
|
61
|
+
## Additional Resources
|
|
62
|
+
|
|
63
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Input, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from '@angular/forms';
|
|
6
|
+
import { FormsModule } from '@angular/forms';
|
|
7
|
+
|
|
8
|
+
class SignUpValidator {
|
|
9
|
+
validate(firstName, lastName, password, passwordRepeat) {
|
|
10
|
+
return !!firstName && !!lastName && this.validatePassword(password) && this.validatePasswordRepeat(password, passwordRepeat);
|
|
11
|
+
}
|
|
12
|
+
validatePassword(password) {
|
|
13
|
+
const validationResults = [
|
|
14
|
+
this.validateLength(password),
|
|
15
|
+
this.validateUpperCaseLetter(password),
|
|
16
|
+
this.validateLowerCaseLetter(password),
|
|
17
|
+
this.validateDigit(password),
|
|
18
|
+
this.validateSpecial(password)
|
|
19
|
+
];
|
|
20
|
+
return validationResults.every(result => result === true);
|
|
21
|
+
}
|
|
22
|
+
validatePasswordRepeat(password, passwordRepeat) {
|
|
23
|
+
return this.validatePassword(password) && password === passwordRepeat;
|
|
24
|
+
}
|
|
25
|
+
validateLength(password) {
|
|
26
|
+
return password.length >= 12 ? true : false;
|
|
27
|
+
}
|
|
28
|
+
validateUpperCaseLetter(password) {
|
|
29
|
+
return new RegExp('[A-Z]').test(password) || password !== password.toLowerCase() ? true : false;
|
|
30
|
+
}
|
|
31
|
+
validateLowerCaseLetter(password) {
|
|
32
|
+
return new RegExp('[a-z]').test(password) || password !== password.toUpperCase() ? true : false;
|
|
33
|
+
}
|
|
34
|
+
validateDigit(password) {
|
|
35
|
+
return new RegExp('\\d').test(password) ? true : false;
|
|
36
|
+
}
|
|
37
|
+
validateSpecial(password) {
|
|
38
|
+
return new RegExp('[.!?@#\\-_]').test(password) ? true : false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
class SignUpComponent {
|
|
43
|
+
constructor() {
|
|
44
|
+
this.__dependencies = {
|
|
45
|
+
SignUpValidator
|
|
46
|
+
};
|
|
47
|
+
this.firstName = '';
|
|
48
|
+
this.lastName = '';
|
|
49
|
+
this.password = '';
|
|
50
|
+
this.passwordRepeat = '';
|
|
51
|
+
this._login = '';
|
|
52
|
+
this._email = '';
|
|
53
|
+
this._passwordValid = false;
|
|
54
|
+
this._passwordRepeatValid = false;
|
|
55
|
+
this._registrationDisabled = true;
|
|
56
|
+
this._busy = false;
|
|
57
|
+
this._validator = new this.__dependencies.SignUpValidator();
|
|
58
|
+
}
|
|
59
|
+
get login() {
|
|
60
|
+
return this._login;
|
|
61
|
+
}
|
|
62
|
+
get email() {
|
|
63
|
+
return this._email;
|
|
64
|
+
}
|
|
65
|
+
get registrationDisabled() {
|
|
66
|
+
return this._registrationDisabled;
|
|
67
|
+
}
|
|
68
|
+
get passwordValid() {
|
|
69
|
+
return this._passwordValid;
|
|
70
|
+
}
|
|
71
|
+
get passwordRepeatValid() {
|
|
72
|
+
return this._passwordRepeatValid;
|
|
73
|
+
}
|
|
74
|
+
get busy() {
|
|
75
|
+
return this._busy;
|
|
76
|
+
}
|
|
77
|
+
get validator() {
|
|
78
|
+
return this._validator;
|
|
79
|
+
}
|
|
80
|
+
onValueChanged() {
|
|
81
|
+
this._deriveRegistrationEnablement();
|
|
82
|
+
}
|
|
83
|
+
onSave(event) {
|
|
84
|
+
event.preventDefault();
|
|
85
|
+
const form = event.target;
|
|
86
|
+
const formIsValid = form.reportValidity();
|
|
87
|
+
if (formIsValid && this.validator.validate(this.firstName, this.lastName, this.password, this.passwordRepeat)) {
|
|
88
|
+
this.register();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
_deriveRegistrationEnablement() {
|
|
92
|
+
this._registrationDisabled = !this.validator.validate(this.firstName, this.lastName, this.password, this.passwordRepeat);
|
|
93
|
+
this._derivePasswordIndicators();
|
|
94
|
+
}
|
|
95
|
+
_derivePasswordIndicators() {
|
|
96
|
+
// password validation
|
|
97
|
+
this._passwordValid = this.validator.validatePassword(this.password);
|
|
98
|
+
// password repeat validation
|
|
99
|
+
this._passwordRepeatValid = this.validator.validatePasswordRepeat(this.password, this.passwordRepeat);
|
|
100
|
+
}
|
|
101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SignUpComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
102
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: SignUpComponent, isStandalone: true, selector: "ng-component", inputs: { translations: "translations" }, ngImport: i0, template: "<h2>{{ translations.title }}</h2>\n\n<form class=\"uk-form-horizontal uk-margin\" (submit)=\"onSave($event)\" autocomplete=\"on\">\n\n <fieldset class=\"uk-fieldset\">\n\n <legend class=\"uk-legend\">{{ translations.personalInformation }}</legend>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\">{{ translations.email }}</label>\n <div class=\"uk-form-controls\">\n {{ email }}\n </div>\n </div>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\" for=\"form-horizontal-first-name\">{{ translations.firstName.title }}</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" [ngClass]=\"{ 'uk-form-danger': !firstName }\" id=\"form-horizontal-first-name\" type=\"text\" [(ngModel)]=\"firstName\" [placeholder]=\"translations.firstName.placeholder\" [ngModelOptions]=\"{standalone: true}\" required (keyup)=\"onValueChanged()\">\n </div>\n </div>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\" for=\"form-horizontal-last-name\">{{ translations.lastName.title }}</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" [ngClass]=\"{ 'uk-form-danger': !lastName }\" id=\"form-horizontal-last-name\" type=\"text\" [(ngModel)]=\"lastName\" [placeholder]=\"translations.lastName.placeholder\" [ngModelOptions]=\"{standalone: true}\" required (keyup)=\"onValueChanged()\">\n </div>\n </div>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\">{{ translations.login }}</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" id=\"form-horizontal-last-name\" type=\"text\" name=\"username\" [ngModel]=\"login\" [ngModelOptions]=\"{standalone: true}\" autocomplete=\"username\" required disabled>\n </div>\n </div>\n\n </fieldset>\n\n <fieldset class=\"uk-fieldset\">\n\n <legend class=\"uk-legend\">{{ translations.password }} <i class=\"mdi mdi-information\" uk-toggle=\"target: #modal-password-rules\"></i></legend>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\" for=\"form-horizontal-password\">{{ translations.password }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': passwordValid, 'mdi-close uk-text-danger': !passwordValid }\"></i></label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" id=\"form-horizontal-password\" type=\"password\" [(ngModel)]=\"password\" [ngModelOptions]=\"{standalone: true}\" autocomplete=\"new-password\" required (keyup)=\"onValueChanged()\">\n </div>\n </div>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\" for=\"form-horizontal-password-repeat\">{{ translations.passwordRepeat }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': passwordRepeatValid, 'mdi-close uk-text-danger': !passwordRepeatValid }\"></i></label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" id=\"form-horizontal-password-repeat\" type=\"password\" [(ngModel)]=\"passwordRepeat\" [ngModelOptions]=\"{standalone: true}\" autocomplete=\"new-password\" required (keyup)=\"onValueChanged()\">\n </div>\n </div>\n\n {{ translations.passwordRulesDialog.question }}\n <ul class=\"uk-list uk-list-hyphen\">\n <li>{{ translations.passwordRulesDialog.length }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateLength(password), 'mdi-close uk-text-danger': !validator.validateLength(password) }\"></i></li>\n <li>{{ translations.passwordRulesDialog.upperCase }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateUpperCaseLetter(password), 'mdi-close uk-text-danger': !validator.validateUpperCaseLetter(password) }\"></i></li>\n <li>{{ translations.passwordRulesDialog.lowerCase }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateLowerCaseLetter(password), 'mdi-close uk-text-danger': !validator.validateLowerCaseLetter(password) }\"></i></li>\n <li>{{ translations.passwordRulesDialog.number }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateDigit(password), 'mdi-close uk-text-danger': !validator.validateDigit(password) }\"></i></li>\n <li>{{ translations.passwordRulesDialog.special }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateSpecial(password), 'mdi-close uk-text-danger': !validator.validateSpecial(password) }\"></i></li>\n </ul>\n\n </fieldset>\n\n <div class=\"uk-width-1 uk-text-center uk-margin-medium-top\">\n <button type=\"submit\" class=\"uk-button uk-button-primary\" [disabled]=\"registrationDisabled || busy\">\n <span uk-spinner=\"ratio: 1\" *ngIf=\"busy\"></span>\n <span *ngIf=\"!busy\">{{ translations.registerButton }}</span>\n </button>\n </div>\n\n</form>\n\n<!-- Password rules modal -->\n<div id=\"modal-password-rules\" uk-modal>\n <div class=\"uk-modal-dialog uk-modal-body\">\n <h2 class=\"uk-modal-title\">{{ translations.passwordRulesDialog.title }}</h2>\n <p>{{ translations.passwordRulesDialog.introduction }}</p>\n <ul class=\"uk-list uk-list-hyphen\">\n <li>{{ translations.passwordRulesDialog.length }}</li>\n <li>{{ translations.passwordRulesDialog.upperCase }}</li>\n <li>{{ translations.passwordRulesDialog.lowerCase }}</li>\n <li>{{ translations.passwordRulesDialog.number }}</li>\n <li>{{ translations.passwordRulesDialog.special }}</li>\n </ul>\n <p class=\"uk-text-right\">\n <button class=\"uk-button uk-button-default uk-modal-close\" type=\"button\">{{ translations.passwordRulesDialog.understandButton }}</button>\n </p>\n </div>\n</div>\n", styles: [".uk-card{width:400px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] }); }
|
|
103
|
+
}
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SignUpComponent, decorators: [{
|
|
105
|
+
type: Component,
|
|
106
|
+
args: [{ imports: [
|
|
107
|
+
CommonModule,
|
|
108
|
+
FormsModule
|
|
109
|
+
], standalone: true, template: "<h2>{{ translations.title }}</h2>\n\n<form class=\"uk-form-horizontal uk-margin\" (submit)=\"onSave($event)\" autocomplete=\"on\">\n\n <fieldset class=\"uk-fieldset\">\n\n <legend class=\"uk-legend\">{{ translations.personalInformation }}</legend>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\">{{ translations.email }}</label>\n <div class=\"uk-form-controls\">\n {{ email }}\n </div>\n </div>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\" for=\"form-horizontal-first-name\">{{ translations.firstName.title }}</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" [ngClass]=\"{ 'uk-form-danger': !firstName }\" id=\"form-horizontal-first-name\" type=\"text\" [(ngModel)]=\"firstName\" [placeholder]=\"translations.firstName.placeholder\" [ngModelOptions]=\"{standalone: true}\" required (keyup)=\"onValueChanged()\">\n </div>\n </div>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\" for=\"form-horizontal-last-name\">{{ translations.lastName.title }}</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" [ngClass]=\"{ 'uk-form-danger': !lastName }\" id=\"form-horizontal-last-name\" type=\"text\" [(ngModel)]=\"lastName\" [placeholder]=\"translations.lastName.placeholder\" [ngModelOptions]=\"{standalone: true}\" required (keyup)=\"onValueChanged()\">\n </div>\n </div>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\">{{ translations.login }}</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" id=\"form-horizontal-last-name\" type=\"text\" name=\"username\" [ngModel]=\"login\" [ngModelOptions]=\"{standalone: true}\" autocomplete=\"username\" required disabled>\n </div>\n </div>\n\n </fieldset>\n\n <fieldset class=\"uk-fieldset\">\n\n <legend class=\"uk-legend\">{{ translations.password }} <i class=\"mdi mdi-information\" uk-toggle=\"target: #modal-password-rules\"></i></legend>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\" for=\"form-horizontal-password\">{{ translations.password }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': passwordValid, 'mdi-close uk-text-danger': !passwordValid }\"></i></label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" id=\"form-horizontal-password\" type=\"password\" [(ngModel)]=\"password\" [ngModelOptions]=\"{standalone: true}\" autocomplete=\"new-password\" required (keyup)=\"onValueChanged()\">\n </div>\n </div>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\" for=\"form-horizontal-password-repeat\">{{ translations.passwordRepeat }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': passwordRepeatValid, 'mdi-close uk-text-danger': !passwordRepeatValid }\"></i></label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" id=\"form-horizontal-password-repeat\" type=\"password\" [(ngModel)]=\"passwordRepeat\" [ngModelOptions]=\"{standalone: true}\" autocomplete=\"new-password\" required (keyup)=\"onValueChanged()\">\n </div>\n </div>\n\n {{ translations.passwordRulesDialog.question }}\n <ul class=\"uk-list uk-list-hyphen\">\n <li>{{ translations.passwordRulesDialog.length }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateLength(password), 'mdi-close uk-text-danger': !validator.validateLength(password) }\"></i></li>\n <li>{{ translations.passwordRulesDialog.upperCase }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateUpperCaseLetter(password), 'mdi-close uk-text-danger': !validator.validateUpperCaseLetter(password) }\"></i></li>\n <li>{{ translations.passwordRulesDialog.lowerCase }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateLowerCaseLetter(password), 'mdi-close uk-text-danger': !validator.validateLowerCaseLetter(password) }\"></i></li>\n <li>{{ translations.passwordRulesDialog.number }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateDigit(password), 'mdi-close uk-text-danger': !validator.validateDigit(password) }\"></i></li>\n <li>{{ translations.passwordRulesDialog.special }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateSpecial(password), 'mdi-close uk-text-danger': !validator.validateSpecial(password) }\"></i></li>\n </ul>\n\n </fieldset>\n\n <div class=\"uk-width-1 uk-text-center uk-margin-medium-top\">\n <button type=\"submit\" class=\"uk-button uk-button-primary\" [disabled]=\"registrationDisabled || busy\">\n <span uk-spinner=\"ratio: 1\" *ngIf=\"busy\"></span>\n <span *ngIf=\"!busy\">{{ translations.registerButton }}</span>\n </button>\n </div>\n\n</form>\n\n<!-- Password rules modal -->\n<div id=\"modal-password-rules\" uk-modal>\n <div class=\"uk-modal-dialog uk-modal-body\">\n <h2 class=\"uk-modal-title\">{{ translations.passwordRulesDialog.title }}</h2>\n <p>{{ translations.passwordRulesDialog.introduction }}</p>\n <ul class=\"uk-list uk-list-hyphen\">\n <li>{{ translations.passwordRulesDialog.length }}</li>\n <li>{{ translations.passwordRulesDialog.upperCase }}</li>\n <li>{{ translations.passwordRulesDialog.lowerCase }}</li>\n <li>{{ translations.passwordRulesDialog.number }}</li>\n <li>{{ translations.passwordRulesDialog.special }}</li>\n </ul>\n <p class=\"uk-text-right\">\n <button class=\"uk-button uk-button-default uk-modal-close\" type=\"button\">{{ translations.passwordRulesDialog.understandButton }}</button>\n </p>\n </div>\n</div>\n", styles: [".uk-card{width:400px}\n"] }]
|
|
110
|
+
}], ctorParameters: () => [], propDecorators: { translations: [{
|
|
111
|
+
type: Input,
|
|
112
|
+
args: [{ required: true }]
|
|
113
|
+
}] } });
|
|
114
|
+
|
|
115
|
+
/*
|
|
116
|
+
* Public API Surface of ngx-edyta-user
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Generated bundle index. Do not edit.
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
export { SignUpComponent };
|
|
124
|
+
//# sourceMappingURL=ngx-edyta-user.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-edyta-user.mjs","sources":["../../../projects/ngx-edyta-user/src/lib/sign-up/validators/sign-up-validator.ts","../../../projects/ngx-edyta-user/src/lib/sign-up/sign-up.component.ts","../../../projects/ngx-edyta-user/src/lib/sign-up/sign-up.component.html","../../../projects/ngx-edyta-user/src/public-api.ts","../../../projects/ngx-edyta-user/src/ngx-edyta-user.ts"],"sourcesContent":["export class SignUpValidator {\n\n validate(firstName: string, lastName: string, password: string, passwordRepeat: string): boolean {\n return !!firstName && !!lastName && this.validatePassword(password) && this.validatePasswordRepeat(password, passwordRepeat);\n }\n\n validatePassword(password: string): boolean {\n const validationResults = [\n this.validateLength(password),\n this.validateUpperCaseLetter(password),\n this.validateLowerCaseLetter(password),\n this.validateDigit(password),\n this.validateSpecial(password)\n ];\n\n return validationResults.every(result => result === true);\n }\n\n validatePasswordRepeat(password: string, passwordRepeat: string): boolean {\n return this.validatePassword(password) && password === passwordRepeat;\n }\n\n validateLength(password: string) {\n return password.length >= 12 ? true : false;\n }\n\n validateUpperCaseLetter(password: string) {\n return new RegExp('[A-Z]').test(password) || password !== password.toLowerCase() ? true : false;\n }\n\n validateLowerCaseLetter(password: string) {\n return new RegExp('[a-z]').test(password) || password !== password.toUpperCase() ? true : false;\n }\n\n validateDigit(password: string) {\n return new RegExp('\\\\d').test(password) ? true : false;\n }\n\n validateSpecial(password: string) {\n return new RegExp('[.!?@#\\\\-_]').test(password) ? true : false;\n }\n\n}\n","import { Component, Input } from '@angular/core';\nimport { SignUpValidator } from './validators/sign-up-validator';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\n@Component({\n templateUrl: './sign-up.component.html',\n styleUrls: ['./sign-up.component.less'],\n imports: [\n CommonModule,\n FormsModule\n ],\n standalone: true\n})\nexport abstract class SignUpComponent {\n\n private __dependencies = {\n SignUpValidator\n }\n\n public firstName = '';\n public lastName = '';\n public password = '';\n public passwordRepeat = '';\n\n protected _login: string = '';\n protected _email: string = '';\n\n private _passwordValid = false;\n private _passwordRepeatValid = false;\n private _registrationDisabled = true;\n\n private _busy = false;\n\n private _validator: SignUpValidator;\n\n @Input({required: true}) public translations!: {\n title: string,\n personalInformation: string,\n email: string,\n firstName: {\n title: string,\n placeholder: string\n },\n lastName: {\n title: string,\n placeholder: string\n },\n login: string,\n password: string,\n passwordRepeat: string,\n passwordRulesDialog: {\n title: string,\n question: string,\n introduction: string,\n length: string,\n upperCase: string,\n lowerCase: string,\n number: string,\n special: string,\n understandButton: string\n },\n registerButton: string\n };\n\n constructor() {\n this._validator = new this.__dependencies.SignUpValidator();\n }\n\n public get login(): string {\n return this._login;\n }\n\n public get email(): string {\n return this._email;\n }\n\n public get registrationDisabled(): boolean {\n return this._registrationDisabled;\n }\n\n public get passwordValid(): boolean {\n return this._passwordValid;\n }\n\n public get passwordRepeatValid(): boolean {\n return this._passwordRepeatValid;\n }\n\n public get busy(): boolean {\n return this._busy;\n }\n\n public get validator(): SignUpValidator {\n return this._validator;\n }\n\n onValueChanged(): void {\n this._deriveRegistrationEnablement();\n }\n\n onSave(event: Event) {\n event.preventDefault();\n\n const form = event.target as HTMLFormElement;\n const formIsValid = form.reportValidity();\n\n if (formIsValid && this.validator.validate(this.firstName, this.lastName, this.password, this.passwordRepeat)) {\n this.register()\n }\n }\n\n private _deriveRegistrationEnablement(): void {\n this._registrationDisabled = !this.validator.validate(this.firstName, this.lastName, this.password, this.passwordRepeat);\n\n this._derivePasswordIndicators();\n }\n\n private _derivePasswordIndicators(): void {\n // password validation\n this._passwordValid = this.validator.validatePassword(this.password);\n\n // password repeat validation\n this._passwordRepeatValid = this.validator.validatePasswordRepeat(this.password, this.passwordRepeat);\n }\n\n protected abstract register(): void;\n}\n","<h2>{{ translations.title }}</h2>\n\n<form class=\"uk-form-horizontal uk-margin\" (submit)=\"onSave($event)\" autocomplete=\"on\">\n\n <fieldset class=\"uk-fieldset\">\n\n <legend class=\"uk-legend\">{{ translations.personalInformation }}</legend>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\">{{ translations.email }}</label>\n <div class=\"uk-form-controls\">\n {{ email }}\n </div>\n </div>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\" for=\"form-horizontal-first-name\">{{ translations.firstName.title }}</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" [ngClass]=\"{ 'uk-form-danger': !firstName }\" id=\"form-horizontal-first-name\" type=\"text\" [(ngModel)]=\"firstName\" [placeholder]=\"translations.firstName.placeholder\" [ngModelOptions]=\"{standalone: true}\" required (keyup)=\"onValueChanged()\">\n </div>\n </div>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\" for=\"form-horizontal-last-name\">{{ translations.lastName.title }}</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" [ngClass]=\"{ 'uk-form-danger': !lastName }\" id=\"form-horizontal-last-name\" type=\"text\" [(ngModel)]=\"lastName\" [placeholder]=\"translations.lastName.placeholder\" [ngModelOptions]=\"{standalone: true}\" required (keyup)=\"onValueChanged()\">\n </div>\n </div>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\">{{ translations.login }}</label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" id=\"form-horizontal-last-name\" type=\"text\" name=\"username\" [ngModel]=\"login\" [ngModelOptions]=\"{standalone: true}\" autocomplete=\"username\" required disabled>\n </div>\n </div>\n\n </fieldset>\n\n <fieldset class=\"uk-fieldset\">\n\n <legend class=\"uk-legend\">{{ translations.password }} <i class=\"mdi mdi-information\" uk-toggle=\"target: #modal-password-rules\"></i></legend>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\" for=\"form-horizontal-password\">{{ translations.password }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': passwordValid, 'mdi-close uk-text-danger': !passwordValid }\"></i></label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" id=\"form-horizontal-password\" type=\"password\" [(ngModel)]=\"password\" [ngModelOptions]=\"{standalone: true}\" autocomplete=\"new-password\" required (keyup)=\"onValueChanged()\">\n </div>\n </div>\n\n <div class=\"uk-margin\">\n <label class=\"uk-form-label\" for=\"form-horizontal-password-repeat\">{{ translations.passwordRepeat }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': passwordRepeatValid, 'mdi-close uk-text-danger': !passwordRepeatValid }\"></i></label>\n <div class=\"uk-form-controls\">\n <input class=\"uk-input uk-width-1-2@m uk-width-1-3@l\" id=\"form-horizontal-password-repeat\" type=\"password\" [(ngModel)]=\"passwordRepeat\" [ngModelOptions]=\"{standalone: true}\" autocomplete=\"new-password\" required (keyup)=\"onValueChanged()\">\n </div>\n </div>\n\n {{ translations.passwordRulesDialog.question }}\n <ul class=\"uk-list uk-list-hyphen\">\n <li>{{ translations.passwordRulesDialog.length }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateLength(password), 'mdi-close uk-text-danger': !validator.validateLength(password) }\"></i></li>\n <li>{{ translations.passwordRulesDialog.upperCase }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateUpperCaseLetter(password), 'mdi-close uk-text-danger': !validator.validateUpperCaseLetter(password) }\"></i></li>\n <li>{{ translations.passwordRulesDialog.lowerCase }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateLowerCaseLetter(password), 'mdi-close uk-text-danger': !validator.validateLowerCaseLetter(password) }\"></i></li>\n <li>{{ translations.passwordRulesDialog.number }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateDigit(password), 'mdi-close uk-text-danger': !validator.validateDigit(password) }\"></i></li>\n <li>{{ translations.passwordRulesDialog.special }} <i class=\"mdi\" [ngClass]=\"{ 'mdi-check uk-text-success': validator.validateSpecial(password), 'mdi-close uk-text-danger': !validator.validateSpecial(password) }\"></i></li>\n </ul>\n\n </fieldset>\n\n <div class=\"uk-width-1 uk-text-center uk-margin-medium-top\">\n <button type=\"submit\" class=\"uk-button uk-button-primary\" [disabled]=\"registrationDisabled || busy\">\n <span uk-spinner=\"ratio: 1\" *ngIf=\"busy\"></span>\n <span *ngIf=\"!busy\">{{ translations.registerButton }}</span>\n </button>\n </div>\n\n</form>\n\n<!-- Password rules modal -->\n<div id=\"modal-password-rules\" uk-modal>\n <div class=\"uk-modal-dialog uk-modal-body\">\n <h2 class=\"uk-modal-title\">{{ translations.passwordRulesDialog.title }}</h2>\n <p>{{ translations.passwordRulesDialog.introduction }}</p>\n <ul class=\"uk-list uk-list-hyphen\">\n <li>{{ translations.passwordRulesDialog.length }}</li>\n <li>{{ translations.passwordRulesDialog.upperCase }}</li>\n <li>{{ translations.passwordRulesDialog.lowerCase }}</li>\n <li>{{ translations.passwordRulesDialog.number }}</li>\n <li>{{ translations.passwordRulesDialog.special }}</li>\n </ul>\n <p class=\"uk-text-right\">\n <button class=\"uk-button uk-button-default uk-modal-close\" type=\"button\">{{ translations.passwordRulesDialog.understandButton }}</button>\n </p>\n </div>\n</div>\n","/*\n * Public API Surface of ngx-edyta-user\n */\n\nexport * from './lib/sign-up/sign-up.component';\n","/**\n * Generated bundle index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,CAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAIK,eAAe,EAAA,UAAA,EAAA,CAAA;kBATpC,SAAS;AAGG,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA;wBACP,YAAY;wBACZ;AACD,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,QAAA,EAAA,ivLAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,CAAA,EAAA;wDAwBc,YAAY,EAAA,CAAA;sBAA3C,KAAK;uBAAC,EAAC,QAAQ,EAAE,IAAI,EAAC;;;AEpCzB;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { SignUpValidator } from './validators/sign-up-validator';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare abstract class SignUpComponent {
|
|
4
|
+
private __dependencies;
|
|
5
|
+
firstName: string;
|
|
6
|
+
lastName: string;
|
|
7
|
+
password: string;
|
|
8
|
+
passwordRepeat: string;
|
|
9
|
+
protected _login: string;
|
|
10
|
+
protected _email: string;
|
|
11
|
+
private _passwordValid;
|
|
12
|
+
private _passwordRepeatValid;
|
|
13
|
+
private _registrationDisabled;
|
|
14
|
+
private _busy;
|
|
15
|
+
private _validator;
|
|
16
|
+
translations: {
|
|
17
|
+
title: string;
|
|
18
|
+
personalInformation: string;
|
|
19
|
+
email: string;
|
|
20
|
+
firstName: {
|
|
21
|
+
title: string;
|
|
22
|
+
placeholder: string;
|
|
23
|
+
};
|
|
24
|
+
lastName: {
|
|
25
|
+
title: string;
|
|
26
|
+
placeholder: string;
|
|
27
|
+
};
|
|
28
|
+
login: string;
|
|
29
|
+
password: string;
|
|
30
|
+
passwordRepeat: string;
|
|
31
|
+
passwordRulesDialog: {
|
|
32
|
+
title: string;
|
|
33
|
+
question: string;
|
|
34
|
+
introduction: string;
|
|
35
|
+
length: string;
|
|
36
|
+
upperCase: string;
|
|
37
|
+
lowerCase: string;
|
|
38
|
+
number: string;
|
|
39
|
+
special: string;
|
|
40
|
+
understandButton: string;
|
|
41
|
+
};
|
|
42
|
+
registerButton: string;
|
|
43
|
+
};
|
|
44
|
+
constructor();
|
|
45
|
+
get login(): string;
|
|
46
|
+
get email(): string;
|
|
47
|
+
get registrationDisabled(): boolean;
|
|
48
|
+
get passwordValid(): boolean;
|
|
49
|
+
get passwordRepeatValid(): boolean;
|
|
50
|
+
get busy(): boolean;
|
|
51
|
+
get validator(): SignUpValidator;
|
|
52
|
+
onValueChanged(): void;
|
|
53
|
+
onSave(event: Event): void;
|
|
54
|
+
private _deriveRegistrationEnablement;
|
|
55
|
+
private _derivePasswordIndicators;
|
|
56
|
+
protected abstract register(): void;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SignUpComponent, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SignUpComponent, "ng-component", never, { "translations": { "alias": "translations"; "required": true; }; }, {}, never, never, true, never>;
|
|
59
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class SignUpValidator {
|
|
2
|
+
validate(firstName: string, lastName: string, password: string, passwordRepeat: string): boolean;
|
|
3
|
+
validatePassword(password: string): boolean;
|
|
4
|
+
validatePasswordRepeat(password: string, passwordRepeat: string): boolean;
|
|
5
|
+
validateLength(password: string): boolean;
|
|
6
|
+
validateUpperCaseLetter(password: string): boolean;
|
|
7
|
+
validateLowerCaseLetter(password: string): boolean;
|
|
8
|
+
validateDigit(password: string): boolean;
|
|
9
|
+
validateSpecial(password: string): boolean;
|
|
10
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ngx-edyta-user",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^19.2.0",
|
|
6
|
+
"@angular/core": "^19.2.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "fesm2022/ngx-edyta-user.mjs",
|
|
13
|
+
"typings": "index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"default": "./fesm2022/ngx-edyta-user.mjs"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/sign-up/sign-up.component';
|