@recursyve/nice-ui-kit.v2 13.1.0-beta.91 → 13.2.0-beta.94
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/api/nice.api.mjs +2 -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 +23 -15
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs +22 -14
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/lib/api/nice.api.d.ts +1 -0
- package/lib/components/form-error/control-status.directive.d.ts +2 -3
- package/package.json +1 -1
- package/styles/tailwind.scss +77 -74
- package/tailwind/plugins/theming.js +1 -1
- package/src/lib/nice.tailwind.scss +0 -94
|
@@ -666,6 +666,7 @@ function mixinNiceApi(base) {
|
|
|
666
666
|
}
|
|
667
667
|
return {
|
|
668
668
|
...values,
|
|
669
|
+
responseType: values.responseType ?? "json",
|
|
669
670
|
context
|
|
670
671
|
};
|
|
671
672
|
}
|
|
@@ -4339,10 +4340,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
|
|
|
4339
4340
|
}] } });
|
|
4340
4341
|
|
|
4341
4342
|
class NiceControlStatusDirective {
|
|
4342
|
-
constructor(el, vcr,
|
|
4343
|
+
constructor(el, vcr, formField, translateService) {
|
|
4343
4344
|
this.el = el;
|
|
4344
4345
|
this.vcr = vcr;
|
|
4345
|
-
this.resolver = resolver;
|
|
4346
4346
|
this.formField = formField;
|
|
4347
4347
|
this.translateService = translateService;
|
|
4348
4348
|
}
|
|
@@ -4359,7 +4359,7 @@ class NiceControlStatusDirective {
|
|
|
4359
4359
|
if (this.control.errors.hasOwnProperty(error)) {
|
|
4360
4360
|
if (this.control.errors[error]) {
|
|
4361
4361
|
let lastErrorKey = error;
|
|
4362
|
-
|
|
4362
|
+
let param;
|
|
4363
4363
|
if (error === "pattern") {
|
|
4364
4364
|
lastErrorKey = this.control.errors[error].requiredPattern;
|
|
4365
4365
|
}
|
|
@@ -4367,15 +4367,24 @@ class NiceControlStatusDirective {
|
|
|
4367
4367
|
lastErrorKey = this.control.errors[error].requiredMask;
|
|
4368
4368
|
}
|
|
4369
4369
|
if (error === "minlength" || error === "maxlength") {
|
|
4370
|
-
param
|
|
4370
|
+
param = {
|
|
4371
|
+
value: this.control.errors[error].requiredLength
|
|
4372
|
+
};
|
|
4371
4373
|
}
|
|
4372
4374
|
if (error === "min") {
|
|
4373
|
-
param
|
|
4374
|
-
|
|
4375
|
+
param = {
|
|
4376
|
+
min: this.control.errors[error].min,
|
|
4377
|
+
actual: this.control.errors[error].actual
|
|
4378
|
+
};
|
|
4375
4379
|
}
|
|
4376
4380
|
if (error === "max") {
|
|
4377
|
-
param
|
|
4378
|
-
|
|
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];
|
|
4379
4388
|
}
|
|
4380
4389
|
this.setError(this.translateService.instant(`errors.${lastErrorKey}`, param));
|
|
4381
4390
|
break;
|
|
@@ -4389,8 +4398,7 @@ class NiceControlStatusDirective {
|
|
|
4389
4398
|
}
|
|
4390
4399
|
setError(text) {
|
|
4391
4400
|
if (!this.ref) {
|
|
4392
|
-
|
|
4393
|
-
this.ref = this.vcr.createComponent(factory);
|
|
4401
|
+
this.ref = this.vcr.createComponent(NiceFormErrorComponent);
|
|
4394
4402
|
this.el.nativeElement
|
|
4395
4403
|
.getElementsByClassName("mat-form-field-wrapper")
|
|
4396
4404
|
.item(0)
|
|
@@ -4401,12 +4409,12 @@ class NiceControlStatusDirective {
|
|
|
4401
4409
|
this.ref.instance.error = text;
|
|
4402
4410
|
}
|
|
4403
4411
|
}
|
|
4404
|
-
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 });
|
|
4405
4413
|
NiceControlStatusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: NiceControlStatusDirective, selector: "[niceControlStatus]", ngImport: i0 });
|
|
4406
4414
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceControlStatusDirective, decorators: [{
|
|
4407
4415
|
type: Directive,
|
|
4408
4416
|
args: [{ selector: "[niceControlStatus]" }]
|
|
4409
|
-
}], 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 }]; } });
|
|
4410
4418
|
|
|
4411
4419
|
class NiceFormErrorModule {
|
|
4412
4420
|
}
|
|
@@ -8280,10 +8288,10 @@ class NiceSweetAlertComponent {
|
|
|
8280
8288
|
}
|
|
8281
8289
|
}
|
|
8282
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 });
|
|
8283
|
-
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 });
|
|
8284
8292
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: NiceSweetAlertComponent, decorators: [{
|
|
8285
8293
|
type: Component,
|
|
8286
|
-
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"] }]
|
|
8287
8295
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
8288
8296
|
type: Inject,
|
|
8289
8297
|
args: [MAT_DIALOG_DATA]
|