@recursyve/nice-ui-kit.v2 13.2.0-beta.92 → 13.2.0-beta.95
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/_index.scss +0 -1
- package/esm2020/lib/components/form-error/control-status.directive.mjs +21 -14
- package/esm2020/lib/components/sweet-alert/sweet-alert.component.mjs +3 -3
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs +21 -14
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs +21 -14
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/lib/components/form-error/control-status.directive.d.ts +2 -3
- package/package.json +1 -1
- package/src/lib/nice.tailwind.scss +0 -97
|
@@ -4340,10 +4340,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
4340
4340
|
}] } });
|
|
4341
4341
|
|
|
4342
4342
|
class NiceControlStatusDirective {
|
|
4343
|
-
constructor(el, vcr,
|
|
4343
|
+
constructor(el, vcr, formField, translateService) {
|
|
4344
4344
|
this.el = el;
|
|
4345
4345
|
this.vcr = vcr;
|
|
4346
|
-
this.resolver = resolver;
|
|
4347
4346
|
this.formField = formField;
|
|
4348
4347
|
this.translateService = translateService;
|
|
4349
4348
|
}
|
|
@@ -4360,7 +4359,7 @@ class NiceControlStatusDirective {
|
|
|
4360
4359
|
if (this.control.errors.hasOwnProperty(error)) {
|
|
4361
4360
|
if (this.control.errors[error]) {
|
|
4362
4361
|
let lastErrorKey = error;
|
|
4363
|
-
|
|
4362
|
+
let param;
|
|
4364
4363
|
if (error === "pattern") {
|
|
4365
4364
|
lastErrorKey = this.control.errors[error].requiredPattern;
|
|
4366
4365
|
}
|
|
@@ -4368,15 +4367,24 @@ class NiceControlStatusDirective {
|
|
|
4368
4367
|
lastErrorKey = this.control.errors[error].requiredMask;
|
|
4369
4368
|
}
|
|
4370
4369
|
if (error === "minlength" || error === "maxlength") {
|
|
4371
|
-
param
|
|
4370
|
+
param = {
|
|
4371
|
+
value: this.control.errors[error].requiredLength
|
|
4372
|
+
};
|
|
4372
4373
|
}
|
|
4373
4374
|
if (error === "min") {
|
|
4374
|
-
param
|
|
4375
|
-
|
|
4375
|
+
param = {
|
|
4376
|
+
min: this.control.errors[error].min,
|
|
4377
|
+
actual: this.control.errors[error].actual
|
|
4378
|
+
};
|
|
4376
4379
|
}
|
|
4377
4380
|
if (error === "max") {
|
|
4378
|
-
param
|
|
4379
|
-
|
|
4381
|
+
param = {
|
|
4382
|
+
min: this.control.errors[error].max,
|
|
4383
|
+
actual: this.control.errors[error].actual
|
|
4384
|
+
};
|
|
4385
|
+
}
|
|
4386
|
+
if (typeof this.control.errors[error] === "object" && !param) {
|
|
4387
|
+
param = this.control.errors[error];
|
|
4380
4388
|
}
|
|
4381
4389
|
this.setError(this.translateService.instant(`errors.${lastErrorKey}`, param));
|
|
4382
4390
|
break;
|
|
@@ -4390,8 +4398,7 @@ class NiceControlStatusDirective {
|
|
|
4390
4398
|
}
|
|
4391
4399
|
setError(text) {
|
|
4392
4400
|
if (!this.ref) {
|
|
4393
|
-
|
|
4394
|
-
this.ref = this.vcr.createComponent(factory);
|
|
4401
|
+
this.ref = this.vcr.createComponent(NiceFormErrorComponent);
|
|
4395
4402
|
this.el.nativeElement
|
|
4396
4403
|
.getElementsByClassName("mat-form-field-wrapper")
|
|
4397
4404
|
.item(0)
|
|
@@ -4402,12 +4409,12 @@ class NiceControlStatusDirective {
|
|
|
4402
4409
|
this.ref.instance.error = text;
|
|
4403
4410
|
}
|
|
4404
4411
|
}
|
|
4405
|
-
NiceControlStatusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceControlStatusDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token:
|
|
4412
|
+
NiceControlStatusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceControlStatusDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i10.MatFormField }, { token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4406
4413
|
NiceControlStatusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: NiceControlStatusDirective, selector: "[niceControlStatus]", ngImport: i0 });
|
|
4407
4414
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceControlStatusDirective, decorators: [{
|
|
4408
4415
|
type: Directive,
|
|
4409
4416
|
args: [{ selector: "[niceControlStatus]" }]
|
|
4410
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type:
|
|
4417
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i10.MatFormField }, { type: i1.TranslateService }]; } });
|
|
4411
4418
|
|
|
4412
4419
|
class NiceFormErrorModule {
|
|
4413
4420
|
}
|
|
@@ -8281,10 +8288,10 @@ class NiceSweetAlertComponent {
|
|
|
8281
8288
|
}
|
|
8282
8289
|
}
|
|
8283
8290
|
NiceSweetAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceSweetAlertComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$b.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8284
|
-
NiceSweetAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceSweetAlertComponent, selector: "nice-alert", ngImport: i0, template: "<mat-dialog-content class=\"mat-typography mb-12 text-center\">\n <nice-lottie\n [options]=\"lottieConfig\"\n [width]=\"250\"\n (animCreated)=\"handleAnimation($event)\"\n ></nice-lottie>\n <h2 class=\"mt-8\">{{ alertConfig?.title }}</h2>\n
|
|
8291
|
+
NiceSweetAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: NiceSweetAlertComponent, selector: "nice-alert", ngImport: i0, template: "<mat-dialog-content class=\"mat-typography mb-12 text-center\">\n <nice-lottie\n [options]=\"lottieConfig\"\n [width]=\"250\"\n (animCreated)=\"handleAnimation($event)\"\n ></nice-lottie>\n <h2 class=\"mt-8\">{{ alertConfig?.title }}</h2>\n <span [innerHTML]=\"alertConfig?.message\"></span>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <ng-container *ngFor=\"let button of alertConfig.buttons; let i = index\">\n <button mat-raised-button class=\"mr-4\" [ngClass]=\"getConfirmButtonClass()\" *ngIf=\"i === 0\" (click)=\"confirm()\">\n {{ button }}\n </button>\n <button mat-button (click)=\"close()\" *ngIf=\"i !== 0\">{{ button }}</button>\n </ng-container>\n</mat-dialog-actions>\n", styles: [".nice-alert-modal{width:500px}\n"], components: [{ type: NiceLottieComponent, selector: "nice-lottie", inputs: ["options", "width", "height"], outputs: ["animCreated"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$b.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$b.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
8285
8292
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceSweetAlertComponent, decorators: [{
|
|
8286
8293
|
type: Component,
|
|
8287
|
-
args: [{ selector: "nice-alert", encapsulation: ViewEncapsulation.None, template: "<mat-dialog-content class=\"mat-typography mb-12 text-center\">\n <nice-lottie\n [options]=\"lottieConfig\"\n [width]=\"250\"\n (animCreated)=\"handleAnimation($event)\"\n ></nice-lottie>\n <h2 class=\"mt-8\">{{ alertConfig?.title }}</h2>\n
|
|
8294
|
+
args: [{ selector: "nice-alert", encapsulation: ViewEncapsulation.None, template: "<mat-dialog-content class=\"mat-typography mb-12 text-center\">\n <nice-lottie\n [options]=\"lottieConfig\"\n [width]=\"250\"\n (animCreated)=\"handleAnimation($event)\"\n ></nice-lottie>\n <h2 class=\"mt-8\">{{ alertConfig?.title }}</h2>\n <span [innerHTML]=\"alertConfig?.message\"></span>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n <ng-container *ngFor=\"let button of alertConfig.buttons; let i = index\">\n <button mat-raised-button class=\"mr-4\" [ngClass]=\"getConfirmButtonClass()\" *ngIf=\"i === 0\" (click)=\"confirm()\">\n {{ button }}\n </button>\n <button mat-button (click)=\"close()\" *ngIf=\"i !== 0\">{{ button }}</button>\n </ng-container>\n</mat-dialog-actions>\n", styles: [".nice-alert-modal{width:500px}\n"] }]
|
|
8288
8295
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
8289
8296
|
type: Inject,
|
|
8290
8297
|
args: [MAT_DIALOG_DATA]
|