@veloceapps/sdk 11.0.0-8 → 11.0.0-9

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.
@@ -1321,7 +1321,7 @@ function extractMetadata(uiDefinition) {
1321
1321
  }
1322
1322
 
1323
1323
  class ConfigurationService {
1324
- constructor(quoteDraftService, runtimeService, contextService, configurationApiService, messageService, dialogService, runtimeSettings) {
1324
+ constructor(quoteDraftService, runtimeService, contextService, configurationApiService, messageService, dialogService, runtimeSettings, flowInfoService) {
1325
1325
  this.quoteDraftService = quoteDraftService;
1326
1326
  this.runtimeService = runtimeService;
1327
1327
  this.contextService = contextService;
@@ -1329,6 +1329,7 @@ class ConfigurationService {
1329
1329
  this.messageService = messageService;
1330
1330
  this.dialogService = dialogService;
1331
1331
  this.runtimeSettings = runtimeSettings;
1332
+ this.flowInfoService = flowInfoService;
1332
1333
  this.mode = ConfigurationMode.SEARCH;
1333
1334
  this.configurationState = new BehaviorSubject(null);
1334
1335
  this.previousConfigurationState = new BehaviorSubject(null);
@@ -1436,8 +1437,12 @@ class ConfigurationService {
1436
1437
  const customPriceApi = this.runtimeSettings.getConfigurationSettings()['CUSTOM_PRICE_API'];
1437
1438
  this.isLoadingSubj$.next(true);
1438
1439
  const configure$ = pricingEnabled && customPriceApi
1439
- ? this.configurationApiService.customConfigurePrice({ url: customPriceApi, configurationRequest, runtimeModel })
1440
- : this.configurationApiService.configureLineItem({
1440
+ ? this.configurationApiService.customConfigurePrice({
1441
+ url: customPriceApi,
1442
+ configurationRequest: this.extendConfigurationRequest(configurationRequest),
1443
+ runtimeModel,
1444
+ })
1445
+ : this.extendedConfigureLineItem$({
1441
1446
  configurationRequest,
1442
1447
  runtimeModel,
1443
1448
  pricingEnabled,
@@ -1471,11 +1476,9 @@ class ConfigurationService {
1471
1476
  }), finalize$1(() => this.reset()));
1472
1477
  }
1473
1478
  configureGuidedSelling$(data) {
1474
- return this.configurationApiService
1475
- .configureLineItem({
1479
+ return this.extendedConfigureLineItem$({
1476
1480
  configurationRequest: getGuidedSellingConfigurationRequest(data, this.contextService.resolve()),
1477
- })
1478
- .pipe(catchError$1(error => {
1481
+ }).pipe(catchError$1(error => {
1479
1482
  if (error instanceof HttpErrorResponse) {
1480
1483
  this.messageService.add({ severity: ToastType.error, summary: error.error.message || error.error });
1481
1484
  }
@@ -1551,12 +1554,26 @@ class ConfigurationService {
1551
1554
  }
1552
1555
  });
1553
1556
  }
1557
+ extendedConfigureLineItem$({ configurationRequest, runtimeModel, pricingEnabled, }) {
1558
+ return this.configurationApiService.configureLineItem({
1559
+ configurationRequest: this.extendConfigurationRequest(configurationRequest),
1560
+ runtimeModel,
1561
+ pricingEnabled,
1562
+ });
1563
+ }
1564
+ extendConfigurationRequest(configurationRequest) {
1565
+ const procedureName = this.flowInfoService.flow?.properties.procedureName;
1566
+ return {
1567
+ ...configurationRequest,
1568
+ ...(procedureName ? { procedureName } : {}),
1569
+ };
1570
+ }
1554
1571
  }
1555
- ConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService, deps: [{ token: QuoteDraftService }, { token: ConfigurationRuntimeService }, { token: ContextService }, { token: i1.ConfigurationApiService }, { token: i5.MessageService }, { token: i6$1.DialogService }, { token: RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
1572
+ ConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService, deps: [{ token: QuoteDraftService }, { token: ConfigurationRuntimeService }, { token: ContextService }, { token: i1.ConfigurationApiService }, { token: i5.MessageService }, { token: i6$1.DialogService }, { token: RuntimeSettingsService }, { token: FlowInfoService }], target: i0.ɵɵFactoryTarget.Injectable });
1556
1573
  ConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService });
1557
1574
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService, decorators: [{
1558
1575
  type: Injectable
1559
- }], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: ConfigurationRuntimeService }, { type: ContextService }, { type: i1.ConfigurationApiService }, { type: i5.MessageService }, { type: i6$1.DialogService }, { type: RuntimeSettingsService }]; } });
1576
+ }], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: ConfigurationRuntimeService }, { type: ContextService }, { type: i1.ConfigurationApiService }, { type: i5.MessageService }, { type: i6$1.DialogService }, { type: RuntimeSettingsService }, { type: FlowInfoService }]; } });
1560
1577
 
1561
1578
  class FlowUpdateService {
1562
1579
  update(rootLineItems, updates, charges) {