@veloceapps/sdk 8.0.0-112 → 8.0.0-114
Sign up to get free protection for your applications and to get access to all the features.
- package/cms/vendor-map.d.ts +4 -0
- package/core/services/flow-state.service.d.ts +8 -2
- package/esm2020/cms/vendor-map.mjs +5 -1
- package/esm2020/core/services/flow-state.service.mjs +24 -14
- package/esm2020/src/services/flow-dialog.service.mjs +16 -5
- package/fesm2015/veloceapps-sdk-cms.mjs +4 -1
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +23 -12
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +14 -4
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +4 -0
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +22 -12
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +14 -4
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/services/flow-dialog.service.d.ts +4 -2
@@ -16,7 +16,7 @@ import * as i1 from 'primeng/dynamicdialog';
|
|
16
16
|
import { BehaviorSubject, Subject, filter, first, tap, takeUntil, catchError, of, map, switchMap, shareReplay, startWith, distinctUntilChanged, from, take, combineLatest, forkJoin, throwError } from 'rxjs';
|
17
17
|
import * as i1$2 from '@angular/router';
|
18
18
|
import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
|
19
|
-
import { SalesforceIdUtils, ConfigurationContextMode, UUID } from '@veloceapps/core';
|
19
|
+
import { SalesforceIdUtils, mapShoppingCartSettings, getMaxRenewalTermsValue, ConfigurationContextMode, UUID } from '@veloceapps/core';
|
20
20
|
import { HttpErrorResponse, HttpParams } from '@angular/common/http';
|
21
21
|
import * as i5$1 from '@angular/forms';
|
22
22
|
import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
@@ -593,9 +593,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
593
593
|
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.IntegrationState }]; } });
|
594
594
|
|
595
595
|
class FlowDialogService {
|
596
|
-
constructor(dialogService, contextService) {
|
596
|
+
constructor(dialogService, contextService, runtimeSettings) {
|
597
597
|
this.dialogService = dialogService;
|
598
598
|
this.contextService = contextService;
|
599
|
+
this.runtimeSettings = runtimeSettings;
|
599
600
|
}
|
600
601
|
show(config) {
|
601
602
|
return this.dialogService.open(FlowDialogComponent, {
|
@@ -704,16 +705,25 @@ class FlowDialogService {
|
|
704
705
|
secondaryButton: 'Cancel',
|
705
706
|
});
|
706
707
|
}
|
708
|
+
showTermsLimitReachedDialog() {
|
709
|
+
const shoppingCartSettings = mapShoppingCartSettings(this.runtimeSettings.getShoppingCartSettings() || []);
|
710
|
+
const maxRenewalTerms = getMaxRenewalTermsValue(shoppingCartSettings);
|
711
|
+
return this.show({
|
712
|
+
title: 'Terms Limit Reached',
|
713
|
+
description: `You have reached the term quantity limit: ${maxRenewalTerms}. You can increase the limit in the Shopping Cart Settings.`,
|
714
|
+
primaryButton: 'Ok',
|
715
|
+
});
|
716
|
+
}
|
707
717
|
showDialog(dialog) {
|
708
718
|
const dialogFunction = this[dialog].bind(this);
|
709
719
|
return dialogFunction(dialog);
|
710
720
|
}
|
711
721
|
}
|
712
|
-
FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i2.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
722
|
+
FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i2.ContextService }, { token: i2.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
713
723
|
FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService });
|
714
724
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, decorators: [{
|
715
725
|
type: Injectable
|
716
|
-
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i2.ContextService }]; } });
|
726
|
+
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
|
717
727
|
|
718
728
|
class FlowService {
|
719
729
|
constructor(integrationState, flowRouterService, quoteDraftService, configurationService, flowConfigurationService, flowDialogService) {
|