@recursyve/nice-ui-kit.v2 14.0.0-beta.96 → 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/base-form/base-form.component.mjs +14 -3
- 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 +69 -8
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs +69 -8
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/lib/components/base-form/base-form.component.d.ts +1 -0
- 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 +2 -2
|
@@ -3211,6 +3211,13 @@ 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
|
+
}
|
|
3214
3221
|
ngOnInit() {
|
|
3215
3222
|
this.formGroup.valueChanges.pipe(takeUntil(this.unsubscribeAll$)).subscribe(() => {
|
|
3216
3223
|
this.onValueChange(this.formGroup.getRawValue());
|
|
@@ -3271,7 +3278,7 @@ class NiceBaseFormComponent {
|
|
|
3271
3278
|
}
|
|
3272
3279
|
}
|
|
3273
3280
|
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 });
|
|
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 });
|
|
3281
|
+
NiceBaseFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: NiceBaseFormComponent, selector: "ng-component", inputs: { loading: "loading" }, outputs: { submit: "submit" }, host: { listeners: { "keyup": "onChange($event)" } }, viewQueries: [{ propertyName: "stepper", first: true, predicate: CdkStepper, descendants: true }], ngImport: i0, template: ``, isInline: true });
|
|
3275
3282
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceBaseFormComponent, decorators: [{
|
|
3276
3283
|
type: Component,
|
|
3277
3284
|
args: [{
|
|
@@ -3284,6 +3291,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
3284
3291
|
type: Input
|
|
3285
3292
|
}], submit: [{
|
|
3286
3293
|
type: Output
|
|
3294
|
+
}], onChange: [{
|
|
3295
|
+
type: HostListener,
|
|
3296
|
+
args: ["keyup", ["$event"]]
|
|
3287
3297
|
}] } });
|
|
3288
3298
|
|
|
3289
3299
|
class NiceFormSubmitDirective {
|
|
@@ -8302,7 +8312,8 @@ class NiceSweetAlertService {
|
|
|
8302
8312
|
this.translateService = translateService;
|
|
8303
8313
|
this.modal = this.options?.customModal ?? NiceSweetAlertComponent;
|
|
8304
8314
|
}
|
|
8305
|
-
success(
|
|
8315
|
+
success(...args) {
|
|
8316
|
+
const [titleKey, messageKey, buttonsKey, params] = this.transformArgs(args);
|
|
8306
8317
|
return this.getTranslations(titleKey, messageKey, buttonsKey, params).pipe(switchMap(([title, message, buttons]) => {
|
|
8307
8318
|
return this.matDialog
|
|
8308
8319
|
.open(this.modal, {
|
|
@@ -8317,7 +8328,8 @@ class NiceSweetAlertService {
|
|
|
8317
8328
|
.afterClosed();
|
|
8318
8329
|
}));
|
|
8319
8330
|
}
|
|
8320
|
-
warning(
|
|
8331
|
+
warning(...args) {
|
|
8332
|
+
const [titleKey, messageKey, buttonsKey, params] = this.transformArgs(args);
|
|
8321
8333
|
return this.getTranslations(titleKey, messageKey, buttonsKey, params).pipe(switchMap(([title, message, buttons]) => {
|
|
8322
8334
|
return this.matDialog
|
|
8323
8335
|
.open(this.modal, {
|
|
@@ -8332,7 +8344,8 @@ class NiceSweetAlertService {
|
|
|
8332
8344
|
.afterClosed();
|
|
8333
8345
|
}));
|
|
8334
8346
|
}
|
|
8335
|
-
info(
|
|
8347
|
+
info(...args) {
|
|
8348
|
+
const [titleKey, messageKey, buttonsKey, params] = this.transformArgs(args);
|
|
8336
8349
|
return this.getTranslations(titleKey, messageKey, buttonsKey, params).pipe(switchMap(([title, message, buttons]) => {
|
|
8337
8350
|
return this.matDialog
|
|
8338
8351
|
.open(this.modal, {
|
|
@@ -8352,6 +8365,20 @@ class NiceSweetAlertService {
|
|
|
8352
8365
|
return [result[title], result[message], buttons.map(button => result[button])];
|
|
8353
8366
|
}));
|
|
8354
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
|
+
}
|
|
8355
8382
|
}
|
|
8356
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 });
|
|
8357
8384
|
NiceSweetAlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertService });
|
|
@@ -8364,6 +8391,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
8364
8391
|
args: [NICE_ALERT_OPTIONS]
|
|
8365
8392
|
}] }, { type: i1$c.MatDialog }, { type: i1.TranslateService }]; } });
|
|
8366
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
|
+
|
|
8367
8427
|
class NiceSweetAlertModule {
|
|
8368
8428
|
static forRoot(options) {
|
|
8369
8429
|
return {
|
|
@@ -8378,14 +8438,15 @@ class NiceSweetAlertModule {
|
|
|
8378
8438
|
}
|
|
8379
8439
|
}
|
|
8380
8440
|
NiceSweetAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8381
|
-
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] });
|
|
8382
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] });
|
|
8383
8443
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceSweetAlertModule, decorators: [{
|
|
8384
8444
|
type: NgModule,
|
|
8385
8445
|
args: [{
|
|
8386
8446
|
imports: [CommonModule, TranslateModule, MatDialogModule, MatButtonModule, NiceLottieModule],
|
|
8387
|
-
declarations: [NiceSweetAlertComponent],
|
|
8388
|
-
providers: [NiceSweetAlertService]
|
|
8447
|
+
declarations: [NiceSweetAlertComponent, NiceSweetAlertDirective],
|
|
8448
|
+
providers: [NiceSweetAlertService],
|
|
8449
|
+
exports: [NiceSweetAlertDirective]
|
|
8389
8450
|
}]
|
|
8390
8451
|
}] });
|
|
8391
8452
|
|
|
@@ -9868,5 +9929,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
|
|
|
9868
9929
|
* Generated bundle index. Do not edit.
|
|
9869
9930
|
*/
|
|
9870
9931
|
|
|
9871
|
-
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 };
|
|
9872
9933
|
//# sourceMappingURL=recursyve-nice-ui-kit.v2.mjs.map
|