@veloceapps/sdk 7.0.2-76 → 7.0.2-78
Sign up to get free protection for your applications and to get access to all the features.
- package/core/modules/configuration/services/configuration.service.d.ts +2 -0
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +5 -2
- package/fesm2015/veloceapps-sdk-core.mjs +4 -1
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +4 -1
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/package.json +1 -1
@@ -738,6 +738,8 @@ class ConfigurationService {
|
|
738
738
|
this.lineItem = new BehaviorSubject(undefined);
|
739
739
|
this.charges = new BehaviorSubject({});
|
740
740
|
this.pricePlans = new BehaviorSubject({});
|
741
|
+
this.isLoadingSubj$ = new BehaviorSubject(false);
|
742
|
+
this.isLoading$ = this.isLoadingSubj$.asObservable();
|
741
743
|
this.hasUnsavedChanges = false;
|
742
744
|
}
|
743
745
|
reset() {
|
@@ -821,6 +823,7 @@ class ConfigurationService {
|
|
821
823
|
const uiDefinitionProperties = this.getUIDefinitionProperties();
|
822
824
|
const mainPricingEnabled = runtimeContext.properties?.PricingEnabled;
|
823
825
|
const pricingEnabled = mainPricingEnabled ? mainPricingEnabled === 'true' : uiDefinitionProperties.pricingEnabled;
|
826
|
+
this.isLoadingSubj$.next(true);
|
824
827
|
return this.configurationApiService.configureLineItem({ configurationRequest, runtimeModel, pricingEnabled }).pipe(tap(({ lineItem, context, charges, pricePlans, deletedLineItems }) => {
|
825
828
|
this.contextService.update(context ?? {});
|
826
829
|
this.charges.next(charges ?? {});
|
@@ -832,7 +835,7 @@ class ConfigurationService {
|
|
832
835
|
this.showInactiveProductsConfirmation();
|
833
836
|
}
|
834
837
|
this.configurableRamp = lineItem;
|
835
|
-
}), map(({ lineItem }) => lineItem), catchError(error => throwError(() => new Error(error.error?.message || error.message || JSON.stringify(error)))));
|
838
|
+
}), map(({ lineItem }) => lineItem), catchError(error => throwError(() => new Error(error.error?.message || error.message || JSON.stringify(error)))), finalize(() => this.isLoadingSubj$.next(false)));
|
836
839
|
}
|
837
840
|
configureExternal$(props) {
|
838
841
|
return this.runtimeService
|