zek 14.2.78 → 14.2.79
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/password/password.component.mjs +2 -2
- package/esm2020/lib/modules/validator/field-validator.mjs +20 -0
- package/esm2020/lib/modules/validator/index.mjs +2 -2
- package/esm2020/lib/modules/validator/validator.module.mjs +6 -6
- package/esm2020/lib/utils/index.mjs +2 -1
- package/esm2020/lib/utils/validation-helper.mjs +10 -0
- package/fesm2015/zek.mjs +20 -10
- package/fesm2015/zek.mjs.map +1 -1
- package/fesm2020/zek.mjs +20 -10
- package/fesm2020/zek.mjs.map +1 -1
- package/lib/modules/validator/field-validator.d.ts +7 -0
- package/lib/modules/validator/index.d.ts +1 -1
- package/lib/modules/validator/validator.module.d.ts +2 -2
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/validation-helper.d.ts +4 -0
- package/package.json +1 -1
- package/esm2020/lib/modules/validator/field-validator.component.mjs +0 -20
- package/lib/modules/validator/field-validator.component.d.ts +0 -7
package/fesm2020/zek.mjs
CHANGED
|
@@ -1113,6 +1113,16 @@ class UrlHelper {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
1115
|
|
|
1116
|
+
class ValidationHelper {
|
|
1117
|
+
static isValidEmail(email) {
|
|
1118
|
+
if (!email || typeof email !== 'string') {
|
|
1119
|
+
return false;
|
|
1120
|
+
}
|
|
1121
|
+
return this.emailRegExp.test(email);
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
ValidationHelper.emailRegExp = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-||_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+([a-z]+|\d|-|\.{0,1}|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])?([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/gm;
|
|
1125
|
+
|
|
1116
1126
|
class AuthService {
|
|
1117
1127
|
constructor() {
|
|
1118
1128
|
this._isInitialized = false;
|
|
@@ -4887,16 +4897,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
4887
4897
|
}]
|
|
4888
4898
|
}] });
|
|
4889
4899
|
|
|
4890
|
-
class
|
|
4900
|
+
class ZekFieldValidator {
|
|
4891
4901
|
// @Input() field?: NgModel;
|
|
4892
4902
|
constructor() {
|
|
4893
4903
|
if (this.field)
|
|
4894
4904
|
console.log(this.field.errors);
|
|
4895
4905
|
}
|
|
4896
4906
|
}
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type:
|
|
4907
|
+
ZekFieldValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekFieldValidator, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4908
|
+
ZekFieldValidator.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ZekFieldValidator, selector: "zek-field-validator, [zek-field-validator]", inputs: { field: "field" }, host: { properties: { "class": "\"invalid-tooltip\"" } }, ngImport: i0, template: "<ng-container *ngIf=\"field\">\r\n <ng-container *ngIf=\"field.invalid && (field.dirty || field.touched || field.formDirective?.submitted)\">\r\n <ng-container *ngIf=\"field.errors\">\r\n <ng-container *ngIf=\"field.errors.required\">{{ 'Validation.Required' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.minlength\">{{ 'Validation.MinLengthFormat' | translate:{ value: field.errors.minlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.maxlength\">{{ 'Validation.MaxLengthFormat' | translate:{ value: field.errors.maxlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.email\">{{ 'Validation.Pattern' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.pattern\">{{ 'Validation.Pattern' | translate }}</ng-container><!-- {{ field.errors.pattern.requiredPattern }} -->\r\n <ng-container *ngIf=\"field.errors.server\">{{field.errors.server}}</ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-container>", dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
4909
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekFieldValidator, decorators: [{
|
|
4900
4910
|
type: Component,
|
|
4901
4911
|
args: [{ selector: 'zek-field-validator, [zek-field-validator]', host: { '[class]': '"invalid-tooltip"' }, template: "<ng-container *ngIf=\"field\">\r\n <ng-container *ngIf=\"field.invalid && (field.dirty || field.touched || field.formDirective?.submitted)\">\r\n <ng-container *ngIf=\"field.errors\">\r\n <ng-container *ngIf=\"field.errors.required\">{{ 'Validation.Required' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.minlength\">{{ 'Validation.MinLengthFormat' | translate:{ value: field.errors.minlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.maxlength\">{{ 'Validation.MaxLengthFormat' | translate:{ value: field.errors.maxlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.email\">{{ 'Validation.Pattern' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.pattern\">{{ 'Validation.Pattern' | translate }}</ng-container><!-- {{ field.errors.pattern.requiredPattern }} -->\r\n <ng-container *ngIf=\"field.errors.server\">{{field.errors.server}}</ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-container>" }]
|
|
4902
4912
|
}], ctorParameters: function () { return []; }, propDecorators: { field: [{
|
|
@@ -4926,7 +4936,7 @@ class PasswordComponent {
|
|
|
4926
4936
|
}
|
|
4927
4937
|
}
|
|
4928
4938
|
PasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4929
|
-
PasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: PasswordComponent, selector: "zek-password", inputs: { name: "name", required: "required", minlength: "minlength", maxlength: "maxlength", model: "model" }, outputs: { onChange: "modelChange" }, ngImport: i0, template: "<div class=\"input-group has-validation\">\r\n <input type=\"{{type}}\" class=\"form-control\" name=\"{{name}}\" id=\"{{name}}\" [attr.aria-describedby]=\"name+'-show'\"\r\n [required]=\"required\" [minlength]=\"minlength\" [maxlength]=\"maxlength\"\r\n [ngModel]=\"model\" (ngModelChange)=\"onChange.emit($event)\"\r\n #password=\"ngModel\"\r\n >\r\n <button class=\"btn btn-outline-secondary\" type=\"button\" id=\"{{name}}-show\" (click)=\"showHide()\"><i class=\"fa-solid fa-eye\"></i></button>\r\n <div zek-field-validator [field]=\"password\"></div>\r\n</div>", dependencies: [{ kind: "directive", type: i1$5.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: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$5.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$5.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type:
|
|
4939
|
+
PasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: PasswordComponent, selector: "zek-password", inputs: { name: "name", required: "required", minlength: "minlength", maxlength: "maxlength", model: "model" }, outputs: { onChange: "modelChange" }, ngImport: i0, template: "<div class=\"input-group has-validation\">\r\n <input type=\"{{type}}\" class=\"form-control\" name=\"{{name}}\" id=\"{{name}}\" [attr.aria-describedby]=\"name+'-show'\"\r\n [required]=\"required\" [minlength]=\"minlength\" [maxlength]=\"maxlength\"\r\n [ngModel]=\"model\" (ngModelChange)=\"onChange.emit($event)\"\r\n #password=\"ngModel\"\r\n >\r\n <button class=\"btn btn-outline-secondary\" type=\"button\" id=\"{{name}}-show\" (click)=\"showHide()\"><i class=\"fa-solid fa-eye\"></i></button>\r\n <div zek-field-validator [field]=\"password\"></div>\r\n</div>", dependencies: [{ kind: "directive", type: i1$5.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: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$5.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$5.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ZekFieldValidator, selector: "zek-field-validator, [zek-field-validator]", inputs: ["field"] }] });
|
|
4930
4940
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: PasswordComponent, decorators: [{
|
|
4931
4941
|
type: Component,
|
|
4932
4942
|
args: [{ selector: 'zek-password', template: "<div class=\"input-group has-validation\">\r\n <input type=\"{{type}}\" class=\"form-control\" name=\"{{name}}\" id=\"{{name}}\" [attr.aria-describedby]=\"name+'-show'\"\r\n [required]=\"required\" [minlength]=\"minlength\" [maxlength]=\"maxlength\"\r\n [ngModel]=\"model\" (ngModelChange)=\"onChange.emit($event)\"\r\n #password=\"ngModel\"\r\n >\r\n <button class=\"btn btn-outline-secondary\" type=\"button\" id=\"{{name}}-show\" (click)=\"showHide()\"><i class=\"fa-solid fa-eye\"></i></button>\r\n <div zek-field-validator [field]=\"password\"></div>\r\n</div>" }]
|
|
@@ -4948,8 +4958,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
4948
4958
|
class ValidatorModule {
|
|
4949
4959
|
}
|
|
4950
4960
|
ValidatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4951
|
-
ValidatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ValidatorModule, declarations: [
|
|
4952
|
-
TranslateModule], exports: [
|
|
4961
|
+
ValidatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ValidatorModule, declarations: [ZekFieldValidator], imports: [CommonModule,
|
|
4962
|
+
TranslateModule], exports: [ZekFieldValidator] });
|
|
4953
4963
|
ValidatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ValidatorModule, imports: [CommonModule,
|
|
4954
4964
|
TranslateModule] });
|
|
4955
4965
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ValidatorModule, decorators: [{
|
|
@@ -4960,9 +4970,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
4960
4970
|
TranslateModule,
|
|
4961
4971
|
],
|
|
4962
4972
|
declarations: [
|
|
4963
|
-
|
|
4973
|
+
ZekFieldValidator,
|
|
4964
4974
|
],
|
|
4965
|
-
exports: [
|
|
4975
|
+
exports: [ZekFieldValidator]
|
|
4966
4976
|
}]
|
|
4967
4977
|
}] });
|
|
4968
4978
|
|
|
@@ -6615,5 +6625,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
6615
6625
|
* Generated bundle index. Do not edit.
|
|
6616
6626
|
*/
|
|
6617
6627
|
|
|
6618
|
-
export { API_BASE_URL, AgeModule, AgePipe, Alert, AlertModule, AlertService, AlertType, AppBaseModule, ApproveModalComponent, ArrayHelper, AuthGuardService, AuthService, AutoCompleteDirective, AutoCompleteModule, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, ButtonBrowseComponent, ButtonBrowseModalBaseComponent, ButtonBrowseModalToolbarComponent, ButtonBrowseModule, CallbackModule, CallbackPipe, CardComponent, CardModule, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateAgoModule, DateAgoPipe, DateHelper, DateValueAccessor, DatepickerModule, DeleteModalComponent, DisapproveModalComponent, EditBase, EditBaseComponent, EditComponent, EditFormComponent, EditToolbarComponent, EditToolbarModule,
|
|
6628
|
+
export { API_BASE_URL, AgeModule, AgePipe, Alert, AlertModule, AlertService, AlertType, AppBaseModule, ApproveModalComponent, ArrayHelper, AuthGuardService, AuthService, AutoCompleteDirective, AutoCompleteModule, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, ButtonBrowseComponent, ButtonBrowseModalBaseComponent, ButtonBrowseModalToolbarComponent, ButtonBrowseModule, CallbackModule, CallbackPipe, CardComponent, CardModule, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateAgoModule, DateAgoPipe, DateHelper, DateValueAccessor, DatepickerModule, DeleteModalComponent, DisapproveModalComponent, EditBase, EditBaseComponent, EditComponent, EditFormComponent, EditToolbarComponent, EditToolbarModule, FileBase, FileBytes, FileHelper, FileModule, FileSizePipe, FileString, FileViewerComponent, FileViewerModule, FilterBase, FilterHelper, FilterModalComponent, Gender, GridToolbarBarComponent, GridToolbarComponent, GridToolbarModule, HtmlHelper, HttpErrorHandler, KeyPair, KeyPairChecked, KeyPairEx, KeyPairRequired, LANGUAGE, ListBase, ListBaseComponent, ListToolbarComponent, ListToolbarModule, LoadingComponent, LoadingModule, MathHelper, ModalComponent, ModalModule, Month, ObjectHelper, OverlapHelper, PageTitleComponent, PageTitleModule, PagedList, PagedListBase, Pager, PagerBase, PagerComponent, PagerHelper, PagerModule, PasswordComponent, PasswordModule, PeriodRelation, PrintType, ProgressModule, RECAPTCHA_SITE_KEY, RadioComponent, RadioModule, RandomHelper, RangeValidator, ReCaptchaService, ReadOnlyDirective, ReadOnlyModule, RecaptchaModule, RestoreModalComponent, SafeModule, SafePipe, Select2Component, Select2Module, Select2MultipleComponent, Select2MultipleModule, SortButtonGroupComponent, SortDirective, SortModule, StorageHelper, StringHelper, SubmitModalComponent, SumComponent, TimeHelper, TimeModule, TimePipe, TimerService, Toast, Tree, UrlHelper, ValidEventArgs, ValidationHelper, ValidatorModule, Validators, ValidatorsModule, WebApiClient, WebApiModule, WizardComponent, WizardComponent2, WizardModule, ZekAlert, ZekFieldValidator, ZekProgress, ZekSelectModule, ZekSelectMultiple, ZekToast, ZekValidation, firstBy, handler, nullValidator, rangeValidator };
|
|
6619
6629
|
//# sourceMappingURL=zek.mjs.map
|