@recursyve/nice-ui-kit.v2 14.0.0-beta.97 → 14.0.0-beta.99
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/components/base-form/base-form.component.mjs +3 -14
- package/esm2020/lib/components/sweet-alert/public-api.mjs +2 -1
- package/esm2020/lib/components/sweet-alert/sweet-alert.directive.mjs +37 -0
- package/esm2020/lib/components/sweet-alert/sweet-alert.module.mjs +6 -4
- package/esm2020/lib/components/sweet-alert/sweet-alert.service.mjs +21 -4
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs +59 -18
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs +59 -18
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/lib/components/base-form/base-form.component.d.ts +0 -1
- package/lib/components/sweet-alert/public-api.d.ts +1 -0
- package/lib/components/sweet-alert/sweet-alert.directive.d.ts +13 -0
- package/lib/components/sweet-alert/sweet-alert.module.d.ts +7 -6
- package/lib/components/sweet-alert/sweet-alert.service.d.ts +11 -0
- package/package.json +1 -1
|
@@ -3211,13 +3211,6 @@ class NiceBaseFormComponent {
|
|
|
3211
3211
|
this.unsubscribeAll$ = new Subject();
|
|
3212
3212
|
this.propagate = () => { };
|
|
3213
3213
|
}
|
|
3214
|
-
onChange(event) {
|
|
3215
|
-
if (event) {
|
|
3216
|
-
if (event.code === KeyboardCodes.Enter) {
|
|
3217
|
-
this.clickSubmit();
|
|
3218
|
-
}
|
|
3219
|
-
}
|
|
3220
|
-
}
|
|
3221
3214
|
ngOnInit() {
|
|
3222
3215
|
this.formGroup.valueChanges.pipe(takeUntil(this.unsubscribeAll$)).subscribe(() => {
|
|
3223
3216
|
this.onValueChange(this.formGroup.getRawValue());
|
|
@@ -3278,7 +3271,7 @@ class NiceBaseFormComponent {
|
|
|
3278
3271
|
}
|
|
3279
3272
|
}
|
|
3280
3273
|
NiceBaseFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseFormComponent, deps: [{ token: i1$4.GeneratedFormGroup }], target: i0.ɵɵFactoryTarget.Component });
|
|
3281
|
-
NiceBaseFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceBaseFormComponent, selector: "ng-component", inputs: { loading: "loading" }, outputs: { submit: "submit" },
|
|
3274
|
+
NiceBaseFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceBaseFormComponent, selector: "ng-component", inputs: { loading: "loading" }, outputs: { submit: "submit" }, viewQueries: [{ propertyName: "stepper", first: true, predicate: CdkStepper, descendants: true }], ngImport: i0, template: ``, isInline: true });
|
|
3282
3275
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseFormComponent, decorators: [{
|
|
3283
3276
|
type: Component,
|
|
3284
3277
|
args: [{
|
|
@@ -3291,9 +3284,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
3291
3284
|
type: Input
|
|
3292
3285
|
}], submit: [{
|
|
3293
3286
|
type: Output
|
|
3294
|
-
}], onChange: [{
|
|
3295
|
-
type: HostListener,
|
|
3296
|
-
args: ["keyup", ["$event"]]
|
|
3297
3287
|
}] } });
|
|
3298
3288
|
|
|
3299
3289
|
class NiceFormSubmitDirective {
|
|
@@ -8312,7 +8302,8 @@ class NiceSweetAlertService {
|
|
|
8312
8302
|
this.translateService = translateService;
|
|
8313
8303
|
this.modal = this.options?.customModal ?? NiceSweetAlertComponent;
|
|
8314
8304
|
}
|
|
8315
|
-
success(
|
|
8305
|
+
success(...args) {
|
|
8306
|
+
const [titleKey, messageKey, buttonsKey, params] = this.transformArgs(args);
|
|
8316
8307
|
return this.getTranslations(titleKey, messageKey, buttonsKey, params).pipe(switchMap(([title, message, buttons]) => {
|
|
8317
8308
|
return this.matDialog
|
|
8318
8309
|
.open(this.modal, {
|
|
@@ -8327,7 +8318,8 @@ class NiceSweetAlertService {
|
|
|
8327
8318
|
.afterClosed();
|
|
8328
8319
|
}));
|
|
8329
8320
|
}
|
|
8330
|
-
warning(
|
|
8321
|
+
warning(...args) {
|
|
8322
|
+
const [titleKey, messageKey, buttonsKey, params] = this.transformArgs(args);
|
|
8331
8323
|
return this.getTranslations(titleKey, messageKey, buttonsKey, params).pipe(switchMap(([title, message, buttons]) => {
|
|
8332
8324
|
return this.matDialog
|
|
8333
8325
|
.open(this.modal, {
|
|
@@ -8342,7 +8334,8 @@ class NiceSweetAlertService {
|
|
|
8342
8334
|
.afterClosed();
|
|
8343
8335
|
}));
|
|
8344
8336
|
}
|
|
8345
|
-
info(
|
|
8337
|
+
info(...args) {
|
|
8338
|
+
const [titleKey, messageKey, buttonsKey, params] = this.transformArgs(args);
|
|
8346
8339
|
return this.getTranslations(titleKey, messageKey, buttonsKey, params).pipe(switchMap(([title, message, buttons]) => {
|
|
8347
8340
|
return this.matDialog
|
|
8348
8341
|
.open(this.modal, {
|
|
@@ -8362,6 +8355,20 @@ class NiceSweetAlertService {
|
|
|
8362
8355
|
return [result[title], result[message], buttons.map(button => result[button])];
|
|
8363
8356
|
}));
|
|
8364
8357
|
}
|
|
8358
|
+
transformArgs(args) {
|
|
8359
|
+
const [paramsOrTitle] = args;
|
|
8360
|
+
if (typeof paramsOrTitle === "string") {
|
|
8361
|
+
return args;
|
|
8362
|
+
}
|
|
8363
|
+
const params = paramsOrTitle;
|
|
8364
|
+
const path = params.translationPath ? `${params.translationPath}.` : "";
|
|
8365
|
+
return [
|
|
8366
|
+
`${path}${params.titleKey}`,
|
|
8367
|
+
params.messageKey ? `${path}${params.messageKey}` : "",
|
|
8368
|
+
params.buttonsKey.map(buttonKey => `${path}${buttonKey}`),
|
|
8369
|
+
params.params
|
|
8370
|
+
];
|
|
8371
|
+
}
|
|
8365
8372
|
}
|
|
8366
8373
|
NiceSweetAlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertService, deps: [{ token: NICE_ALERT_OPTIONS, optional: true }, { token: i1$c.MatDialog }, { token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8367
8374
|
NiceSweetAlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertService });
|
|
@@ -8374,6 +8381,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
8374
8381
|
args: [NICE_ALERT_OPTIONS]
|
|
8375
8382
|
}] }, { type: i1$c.MatDialog }, { type: i1.TranslateService }]; } });
|
|
8376
8383
|
|
|
8384
|
+
class NiceSweetAlertDirective {
|
|
8385
|
+
constructor(service) {
|
|
8386
|
+
this.service = service;
|
|
8387
|
+
this.sweetAlertAfterClosed = new EventEmitter();
|
|
8388
|
+
}
|
|
8389
|
+
onClick() {
|
|
8390
|
+
if (this.sweetAlertType === "success") {
|
|
8391
|
+
this.service.success(this.sweetAlertOptions).subscribe(x => this.sweetAlertAfterClosed.emit(x));
|
|
8392
|
+
}
|
|
8393
|
+
if (this.sweetAlertType === "warning") {
|
|
8394
|
+
this.service.warning(this.sweetAlertOptions).subscribe(x => this.sweetAlertAfterClosed.emit(x));
|
|
8395
|
+
}
|
|
8396
|
+
if (this.sweetAlertType === "info") {
|
|
8397
|
+
this.service.info(this.sweetAlertOptions).subscribe(x => this.sweetAlertAfterClosed.emit(x));
|
|
8398
|
+
}
|
|
8399
|
+
}
|
|
8400
|
+
}
|
|
8401
|
+
NiceSweetAlertDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertDirective, deps: [{ token: NiceSweetAlertService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
8402
|
+
NiceSweetAlertDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: NiceSweetAlertDirective, selector: "[niceSweetAlert]", inputs: { sweetAlertType: "sweetAlertType", sweetAlertOptions: "sweetAlertOptions" }, outputs: { sweetAlertAfterClosed: "sweetAlertAfterClosed" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
8403
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertDirective, decorators: [{
|
|
8404
|
+
type: Directive,
|
|
8405
|
+
args: [{ selector: "[niceSweetAlert]" }]
|
|
8406
|
+
}], ctorParameters: function () { return [{ type: NiceSweetAlertService }]; }, propDecorators: { sweetAlertType: [{
|
|
8407
|
+
type: Input
|
|
8408
|
+
}], sweetAlertOptions: [{
|
|
8409
|
+
type: Input
|
|
8410
|
+
}], sweetAlertAfterClosed: [{
|
|
8411
|
+
type: Output
|
|
8412
|
+
}], onClick: [{
|
|
8413
|
+
type: HostListener,
|
|
8414
|
+
args: ["click"]
|
|
8415
|
+
}] } });
|
|
8416
|
+
|
|
8377
8417
|
class NiceSweetAlertModule {
|
|
8378
8418
|
static forRoot(options) {
|
|
8379
8419
|
return {
|
|
@@ -8388,14 +8428,15 @@ class NiceSweetAlertModule {
|
|
|
8388
8428
|
}
|
|
8389
8429
|
}
|
|
8390
8430
|
NiceSweetAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8391
|
-
NiceSweetAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertModule, declarations: [NiceSweetAlertComponent], imports: [CommonModule, TranslateModule, MatDialogModule, MatButtonModule, NiceLottieModule] });
|
|
8431
|
+
NiceSweetAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertModule, declarations: [NiceSweetAlertComponent, NiceSweetAlertDirective], imports: [CommonModule, TranslateModule, MatDialogModule, MatButtonModule, NiceLottieModule], exports: [NiceSweetAlertDirective] });
|
|
8392
8432
|
NiceSweetAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertModule, providers: [NiceSweetAlertService], imports: [CommonModule, TranslateModule, MatDialogModule, MatButtonModule, NiceLottieModule] });
|
|
8393
8433
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertModule, decorators: [{
|
|
8394
8434
|
type: NgModule,
|
|
8395
8435
|
args: [{
|
|
8396
8436
|
imports: [CommonModule, TranslateModule, MatDialogModule, MatButtonModule, NiceLottieModule],
|
|
8397
|
-
declarations: [NiceSweetAlertComponent],
|
|
8398
|
-
providers: [NiceSweetAlertService]
|
|
8437
|
+
declarations: [NiceSweetAlertComponent, NiceSweetAlertDirective],
|
|
8438
|
+
providers: [NiceSweetAlertService],
|
|
8439
|
+
exports: [NiceSweetAlertDirective]
|
|
8399
8440
|
}]
|
|
8400
8441
|
}] });
|
|
8401
8442
|
|
|
@@ -9878,5 +9919,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
9878
9919
|
* Generated bundle index. Do not edit.
|
|
9879
9920
|
*/
|
|
9880
9921
|
|
|
9881
|
-
export { ArrayUtils, BooleanPipe, CapitalizeFirstLetterPipe, CarouselComponent, CaseUtils, CeilPipe, ChipListItemLabelDirective, ColorsUtils, DateUtils, DefaultExportBottomSheetService, EntriesPipe, ExportBottomSheetComponent, ExportBottomSheetService, FileUtils, FindByKeyPipe, FirstLetterPipe, FloorPipe, FontAwesomeUtils, FormDataUtils, HttpStatusCodes, ImgCropperConfig, ImgCropperError, ImgResolution, JoinPipe, KeyboardCodes, LinkPipe, LocalizedBooleanPipe, LocalizedCurrencyPipe, LocalizedDateOnlyPipe, LocalizedDatePipe, MinutesToTimePipe, ModalMode, NiceAlertComponent, NiceAlertModule, NiceAlertService, NiceApiException, NiceAssetsCarouselComponent, NiceAssetsCarouselModule, NiceAsyncTypeaheadComponent, NiceAsyncTypeaheadModule, NiceAsyncTypeaheadProvider, NiceAutofocusDirective, NiceAutofocusDirectiveModule, NiceAutogrowDirective, NiceAutogrowModule, NiceBaseForm, NiceBaseFormComponent, NiceBaseFormModule, NiceCardComponent, NiceCardModule, NiceCarouselModule, NiceChipAsyncTypeaheadDirective, NiceChipListDirective, NiceChipListDirectiveModule, NiceChipListItemsComponent, NiceClickStopPropagationDirective, NiceConfigModule, NiceConfigService, NiceControlStatusDirective, NiceCropperAreaComponent, NiceDrawerComponent, NiceDrawerModule, NiceDrawerService, NiceDropzoneDirective, NiceDropzoneModule, NiceExportBottomSheetModule, NiceFormErrorComponent, NiceFormErrorModule, NiceFormSubmitDirective, NiceHorizontalNavigationBasicItemComponent, NiceHorizontalNavigationBranchItemComponent, NiceHorizontalNavigationComponent, NiceHorizontalNavigationDividerItemComponent, NiceHorizontalNavigationSpacerItemComponent, NiceHorizontalStepperComponent, NiceHorizontalStepperModule, NiceHttpExceptionFactory, NiceImageCropperComponent, NiceImageCropperModule, NiceImageErrorPlaceholderDirective, NiceImageErrorPlaceholderDirectiveModule, NiceLayoutComponent, NiceLayoutModule, NiceLoadingDirective, NiceLoadingSpinnerComponent, NiceLoadingSpinnerModule, NiceLottieComponent, NiceLottieModule, NiceMaterialModule, NiceMaterialStyleDirective, NiceMediaWatcherModule, NiceMediaWatcherService, NiceModalOnClickDirective, NiceModalOpenerDirective, NiceModule, NiceNavigationComponent, NiceNavigationModule, NiceNavigationService, NicePipesModule, NicePreventCloseWindowDirective, NiceRoundedStyleDirective, NiceScrollResetDirective, NiceScrollResetModule, NiceScrollbarDirective, NiceScrollbarModule, NiceSearchBarComponent, NiceSearchBarModule, NiceSplashScreenModule, NiceSplashScreenService, NiceStepComponent, NiceStopPropagationModule, NiceSweetAlertComponent, NiceSweetAlertModule, NiceSweetAlertService, NiceToastComponent, NiceToastModule, NiceToastService, NiceToggleButtonGroupModule, NiceTransformResponseInterceptor, NiceTypeaheadComponent, NiceTypeaheadModule, NiceTypeaheadNewValue, NiceUtilsModule, NiceUtilsService, NiceVerticalNavigationAsideItemComponent, NiceVerticalNavigationBasicItemComponent, NiceVerticalNavigationCollapsableItemComponent, NiceVerticalNavigationComponent, NiceVerticalNavigationDividerItemComponent, NiceVerticalNavigationGroupItemComponent, NiceVerticalNavigationSpacerItemComponent, NiceWindowDirectiveModule, NumberToOrdinalIndicatorPipe, NumberUtils, ObjectUtils, OptionsScrollDirective, PadPipe, PhonePipe, PictureModalComponent, PictureModalService, PostalCodePipe, PromiseUtils, QueryParamsUtils, RangePipe, RegexUtils, RoundPipe, SanitizeBypassPipe, SecondsToTimePipe, TRANSFORM_TYPE, ToggleButtonComponent, ToggleButtonGroupComponent, TypeUtils, UrlUtils, _normalizeDegrees, isNotNullOrUndefined, isNullOrUndefined, mergeDeep, mixinNiceApi, niceAnimations, round };
|
|
9922
|
+
export { ArrayUtils, BooleanPipe, CapitalizeFirstLetterPipe, CarouselComponent, CaseUtils, CeilPipe, ChipListItemLabelDirective, ColorsUtils, DateUtils, DefaultExportBottomSheetService, EntriesPipe, ExportBottomSheetComponent, ExportBottomSheetService, FileUtils, FindByKeyPipe, FirstLetterPipe, FloorPipe, FontAwesomeUtils, FormDataUtils, HttpStatusCodes, ImgCropperConfig, ImgCropperError, ImgResolution, JoinPipe, KeyboardCodes, LinkPipe, LocalizedBooleanPipe, LocalizedCurrencyPipe, LocalizedDateOnlyPipe, LocalizedDatePipe, MinutesToTimePipe, ModalMode, NiceAlertComponent, NiceAlertModule, NiceAlertService, NiceApiException, NiceAssetsCarouselComponent, NiceAssetsCarouselModule, NiceAsyncTypeaheadComponent, NiceAsyncTypeaheadModule, NiceAsyncTypeaheadProvider, NiceAutofocusDirective, NiceAutofocusDirectiveModule, NiceAutogrowDirective, NiceAutogrowModule, NiceBaseForm, NiceBaseFormComponent, NiceBaseFormModule, NiceCardComponent, NiceCardModule, NiceCarouselModule, NiceChipAsyncTypeaheadDirective, NiceChipListDirective, NiceChipListDirectiveModule, NiceChipListItemsComponent, NiceClickStopPropagationDirective, NiceConfigModule, NiceConfigService, NiceControlStatusDirective, NiceCropperAreaComponent, NiceDrawerComponent, NiceDrawerModule, NiceDrawerService, NiceDropzoneDirective, NiceDropzoneModule, NiceExportBottomSheetModule, NiceFormErrorComponent, NiceFormErrorModule, NiceFormSubmitDirective, NiceHorizontalNavigationBasicItemComponent, NiceHorizontalNavigationBranchItemComponent, NiceHorizontalNavigationComponent, NiceHorizontalNavigationDividerItemComponent, NiceHorizontalNavigationSpacerItemComponent, NiceHorizontalStepperComponent, NiceHorizontalStepperModule, NiceHttpExceptionFactory, NiceImageCropperComponent, NiceImageCropperModule, NiceImageErrorPlaceholderDirective, NiceImageErrorPlaceholderDirectiveModule, NiceLayoutComponent, NiceLayoutModule, NiceLoadingDirective, NiceLoadingSpinnerComponent, NiceLoadingSpinnerModule, NiceLottieComponent, NiceLottieModule, NiceMaterialModule, NiceMaterialStyleDirective, NiceMediaWatcherModule, NiceMediaWatcherService, NiceModalOnClickDirective, NiceModalOpenerDirective, NiceModule, NiceNavigationComponent, NiceNavigationModule, NiceNavigationService, NicePipesModule, NicePreventCloseWindowDirective, NiceRoundedStyleDirective, NiceScrollResetDirective, NiceScrollResetModule, NiceScrollbarDirective, NiceScrollbarModule, NiceSearchBarComponent, NiceSearchBarModule, NiceSplashScreenModule, NiceSplashScreenService, NiceStepComponent, NiceStopPropagationModule, NiceSweetAlertComponent, NiceSweetAlertDirective, NiceSweetAlertModule, NiceSweetAlertService, NiceToastComponent, NiceToastModule, NiceToastService, NiceToggleButtonGroupModule, NiceTransformResponseInterceptor, NiceTypeaheadComponent, NiceTypeaheadModule, NiceTypeaheadNewValue, NiceUtilsModule, NiceUtilsService, NiceVerticalNavigationAsideItemComponent, NiceVerticalNavigationBasicItemComponent, NiceVerticalNavigationCollapsableItemComponent, NiceVerticalNavigationComponent, NiceVerticalNavigationDividerItemComponent, NiceVerticalNavigationGroupItemComponent, NiceVerticalNavigationSpacerItemComponent, NiceWindowDirectiveModule, NumberToOrdinalIndicatorPipe, NumberUtils, ObjectUtils, OptionsScrollDirective, PadPipe, PhonePipe, PictureModalComponent, PictureModalService, PostalCodePipe, PromiseUtils, QueryParamsUtils, RangePipe, RegexUtils, RoundPipe, SanitizeBypassPipe, SecondsToTimePipe, TRANSFORM_TYPE, ToggleButtonComponent, ToggleButtonGroupComponent, TypeUtils, UrlUtils, _normalizeDegrees, isNotNullOrUndefined, isNullOrUndefined, mergeDeep, mixinNiceApi, niceAnimations, round };
|
|
9882
9923
|
//# sourceMappingURL=recursyve-nice-ui-kit.v2.mjs.map
|