@recursyve/nice-ui-kit.v2 14.0.0-beta.97 → 14.0.0-beta.98
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/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 +58 -7
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs +58 -7
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -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
|
@@ -8312,7 +8312,8 @@ class NiceSweetAlertService {
|
|
|
8312
8312
|
this.translateService = translateService;
|
|
8313
8313
|
this.modal = this.options?.customModal ?? NiceSweetAlertComponent;
|
|
8314
8314
|
}
|
|
8315
|
-
success(
|
|
8315
|
+
success(...args) {
|
|
8316
|
+
const [titleKey, messageKey, buttonsKey, params] = this.transformArgs(args);
|
|
8316
8317
|
return this.getTranslations(titleKey, messageKey, buttonsKey, params).pipe(switchMap(([title, message, buttons]) => {
|
|
8317
8318
|
return this.matDialog
|
|
8318
8319
|
.open(this.modal, {
|
|
@@ -8327,7 +8328,8 @@ class NiceSweetAlertService {
|
|
|
8327
8328
|
.afterClosed();
|
|
8328
8329
|
}));
|
|
8329
8330
|
}
|
|
8330
|
-
warning(
|
|
8331
|
+
warning(...args) {
|
|
8332
|
+
const [titleKey, messageKey, buttonsKey, params] = this.transformArgs(args);
|
|
8331
8333
|
return this.getTranslations(titleKey, messageKey, buttonsKey, params).pipe(switchMap(([title, message, buttons]) => {
|
|
8332
8334
|
return this.matDialog
|
|
8333
8335
|
.open(this.modal, {
|
|
@@ -8342,7 +8344,8 @@ class NiceSweetAlertService {
|
|
|
8342
8344
|
.afterClosed();
|
|
8343
8345
|
}));
|
|
8344
8346
|
}
|
|
8345
|
-
info(
|
|
8347
|
+
info(...args) {
|
|
8348
|
+
const [titleKey, messageKey, buttonsKey, params] = this.transformArgs(args);
|
|
8346
8349
|
return this.getTranslations(titleKey, messageKey, buttonsKey, params).pipe(switchMap(([title, message, buttons]) => {
|
|
8347
8350
|
return this.matDialog
|
|
8348
8351
|
.open(this.modal, {
|
|
@@ -8362,6 +8365,20 @@ class NiceSweetAlertService {
|
|
|
8362
8365
|
return [result[title], result[message], buttons.map(button => result[button])];
|
|
8363
8366
|
}));
|
|
8364
8367
|
}
|
|
8368
|
+
transformArgs(args) {
|
|
8369
|
+
const [paramsOrTitle] = args;
|
|
8370
|
+
if (typeof paramsOrTitle === "string") {
|
|
8371
|
+
return args;
|
|
8372
|
+
}
|
|
8373
|
+
const params = paramsOrTitle;
|
|
8374
|
+
const path = params.translationPath ? `${params.translationPath}.` : "";
|
|
8375
|
+
return [
|
|
8376
|
+
`${path}${params.titleKey}`,
|
|
8377
|
+
params.messageKey ? `${path}${params.messageKey}` : "",
|
|
8378
|
+
params.buttonsKey.map(buttonKey => `${path}${buttonKey}`),
|
|
8379
|
+
params.params
|
|
8380
|
+
];
|
|
8381
|
+
}
|
|
8365
8382
|
}
|
|
8366
8383
|
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
8384
|
NiceSweetAlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertService });
|
|
@@ -8374,6 +8391,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
8374
8391
|
args: [NICE_ALERT_OPTIONS]
|
|
8375
8392
|
}] }, { type: i1$c.MatDialog }, { type: i1.TranslateService }]; } });
|
|
8376
8393
|
|
|
8394
|
+
class NiceSweetAlertDirective {
|
|
8395
|
+
constructor(service) {
|
|
8396
|
+
this.service = service;
|
|
8397
|
+
this.sweetAlertAfterClosed = new EventEmitter();
|
|
8398
|
+
}
|
|
8399
|
+
onClick() {
|
|
8400
|
+
if (this.sweetAlertType === "success") {
|
|
8401
|
+
this.service.success(this.sweetAlertOptions).subscribe(x => this.sweetAlertAfterClosed.emit(x));
|
|
8402
|
+
}
|
|
8403
|
+
if (this.sweetAlertType === "warning") {
|
|
8404
|
+
this.service.warning(this.sweetAlertOptions).subscribe(x => this.sweetAlertAfterClosed.emit(x));
|
|
8405
|
+
}
|
|
8406
|
+
if (this.sweetAlertType === "info") {
|
|
8407
|
+
this.service.info(this.sweetAlertOptions).subscribe(x => this.sweetAlertAfterClosed.emit(x));
|
|
8408
|
+
}
|
|
8409
|
+
}
|
|
8410
|
+
}
|
|
8411
|
+
NiceSweetAlertDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertDirective, deps: [{ token: NiceSweetAlertService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
8412
|
+
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 });
|
|
8413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertDirective, decorators: [{
|
|
8414
|
+
type: Directive,
|
|
8415
|
+
args: [{ selector: "[niceSweetAlert]" }]
|
|
8416
|
+
}], ctorParameters: function () { return [{ type: NiceSweetAlertService }]; }, propDecorators: { sweetAlertType: [{
|
|
8417
|
+
type: Input
|
|
8418
|
+
}], sweetAlertOptions: [{
|
|
8419
|
+
type: Input
|
|
8420
|
+
}], sweetAlertAfterClosed: [{
|
|
8421
|
+
type: Output
|
|
8422
|
+
}], onClick: [{
|
|
8423
|
+
type: HostListener,
|
|
8424
|
+
args: ["click"]
|
|
8425
|
+
}] } });
|
|
8426
|
+
|
|
8377
8427
|
class NiceSweetAlertModule {
|
|
8378
8428
|
static forRoot(options) {
|
|
8379
8429
|
return {
|
|
@@ -8388,14 +8438,15 @@ class NiceSweetAlertModule {
|
|
|
8388
8438
|
}
|
|
8389
8439
|
}
|
|
8390
8440
|
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] });
|
|
8441
|
+
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
8442
|
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
8443
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertModule, decorators: [{
|
|
8394
8444
|
type: NgModule,
|
|
8395
8445
|
args: [{
|
|
8396
8446
|
imports: [CommonModule, TranslateModule, MatDialogModule, MatButtonModule, NiceLottieModule],
|
|
8397
|
-
declarations: [NiceSweetAlertComponent],
|
|
8398
|
-
providers: [NiceSweetAlertService]
|
|
8447
|
+
declarations: [NiceSweetAlertComponent, NiceSweetAlertDirective],
|
|
8448
|
+
providers: [NiceSweetAlertService],
|
|
8449
|
+
exports: [NiceSweetAlertDirective]
|
|
8399
8450
|
}]
|
|
8400
8451
|
}] });
|
|
8401
8452
|
|
|
@@ -9878,5 +9929,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
9878
9929
|
* Generated bundle index. Do not edit.
|
|
9879
9930
|
*/
|
|
9880
9931
|
|
|
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 };
|
|
9932
|
+
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
9933
|
//# sourceMappingURL=recursyve-nice-ui-kit.v2.mjs.map
|