@veloceapps/sdk 11.0.0-82 → 11.0.0-83
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/cms/vendor-map.d.ts +2 -1
- package/core/modules/configuration/index.d.ts +1 -0
- package/core/modules/configuration/services/configuration.service.d.ts +2 -3
- package/core/modules/configuration/services/guided-selling.service.d.ts +13 -0
- package/esm2020/cms/vendor-map.mjs +3 -2
- package/esm2020/core/modules/configuration/configuration.module.mjs +4 -1
- package/esm2020/core/modules/configuration/index.mjs +2 -1
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +13 -17
- package/esm2020/core/modules/configuration/services/guided-selling.service.mjs +47 -0
- package/fesm2015/veloceapps-sdk-cms.mjs +2 -1
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +57 -17
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +2 -1
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +57 -17
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/package.json +1 -1
@@ -364,6 +364,18 @@ function extractMetadata(uiDefinition) {
|
|
364
364
|
}
|
365
365
|
|
366
366
|
class ConfigurationService {
|
367
|
+
constructor(flowInfoService, messageService, configurationRuntimeService, salesTransactionService, orchestrationsApiService) {
|
368
|
+
this.flowInfoService = flowInfoService;
|
369
|
+
this.messageService = messageService;
|
370
|
+
this.configurationRuntimeService = configurationRuntimeService;
|
371
|
+
this.salesTransactionService = salesTransactionService;
|
372
|
+
this.orchestrationsApiService = orchestrationsApiService;
|
373
|
+
this.hasUnsavedChanges = false;
|
374
|
+
this.configurationStateSubj$ = new BehaviorSubject(null);
|
375
|
+
this.previousConfigurationStateSubj$ = new BehaviorSubject(null);
|
376
|
+
this.isLoadingSubj$ = new BehaviorSubject(false);
|
377
|
+
this.isLoading$ = this.isLoadingSubj$.asObservable();
|
378
|
+
}
|
367
379
|
get state$() {
|
368
380
|
return this.configurationStateSubj$.asObservable().pipe(filter$1(isDefined));
|
369
381
|
}
|
@@ -379,18 +391,6 @@ class ConfigurationService {
|
|
379
391
|
get root() {
|
380
392
|
return this.configurationStateSubj$.getValue()?.salesTransaction.salesTransactionItems[0] ?? null;
|
381
393
|
}
|
382
|
-
constructor(flowInfoService, messageService, configurationRuntimeService, salesTransactionService, orchestrationsApiService) {
|
383
|
-
this.flowInfoService = flowInfoService;
|
384
|
-
this.messageService = messageService;
|
385
|
-
this.configurationRuntimeService = configurationRuntimeService;
|
386
|
-
this.salesTransactionService = salesTransactionService;
|
387
|
-
this.orchestrationsApiService = orchestrationsApiService;
|
388
|
-
this.hasUnsavedChanges = false;
|
389
|
-
this.configurationStateSubj$ = new BehaviorSubject(null);
|
390
|
-
this.previousConfigurationStateSubj$ = new BehaviorSubject(null);
|
391
|
-
this.isLoadingSubj$ = new BehaviorSubject(false);
|
392
|
-
this.isLoading$ = this.isLoadingSubj$.asObservable();
|
393
|
-
}
|
394
394
|
reset() {
|
395
395
|
this.hasUnsavedChanges = false;
|
396
396
|
this.configurationStateSubj$.next(null);
|
@@ -480,10 +480,6 @@ class ConfigurationService {
|
|
480
480
|
// TODO: implement
|
481
481
|
throw new Error('Not implemented');
|
482
482
|
}
|
483
|
-
configureGuidedSelling$(data) {
|
484
|
-
// TODO: implement
|
485
|
-
throw new Error('Not implemented');
|
486
|
-
}
|
487
483
|
getPCMModel() {
|
488
484
|
const pcmModel = this.configurationRuntimeService.pcmModel;
|
489
485
|
if (!pcmModel) {
|
@@ -562,6 +558,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
562
558
|
type: Injectable
|
563
559
|
}], ctorParameters: function () { return [{ type: FlowInfoService }, { type: ConfigurationService }, { type: ConfigurationRuntimeService }, { type: SalesTransactionService }, { type: RuntimeSettingsService }]; } });
|
564
560
|
|
561
|
+
class GuidedSellingService {
|
562
|
+
constructor(orchestrationsApiService) {
|
563
|
+
this.orchestrationsApiService = orchestrationsApiService;
|
564
|
+
}
|
565
|
+
configureGuidedSelling$(data) {
|
566
|
+
return this.orchestrationsApiService.apply$({
|
567
|
+
transactionContext: this.getTransactionContext(data.attributesMap),
|
568
|
+
orchestrationName: data.orchestrationName,
|
569
|
+
});
|
570
|
+
}
|
571
|
+
getTransactionContext(guidedSellingAttributes) {
|
572
|
+
const testTransaction = {
|
573
|
+
id: UUID.UUID(),
|
574
|
+
businessObjectType: 'Quote',
|
575
|
+
salesTransactionItems: [],
|
576
|
+
tagAttributes: {},
|
577
|
+
};
|
578
|
+
return {
|
579
|
+
salesTransaction: testTransaction,
|
580
|
+
transactionId: UUID.UUID(),
|
581
|
+
businessObjectType: 'Quote',
|
582
|
+
childNodes: {
|
583
|
+
GuidedSelling: [
|
584
|
+
{
|
585
|
+
id: UUID.UUID(),
|
586
|
+
tagAttributes: {},
|
587
|
+
childNodes: {},
|
588
|
+
properties: { guidedSellingAttributes },
|
589
|
+
},
|
590
|
+
],
|
591
|
+
},
|
592
|
+
id: UUID.UUID(),
|
593
|
+
tagAttributes: {},
|
594
|
+
};
|
595
|
+
}
|
596
|
+
}
|
597
|
+
GuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingService, deps: [{ token: i1.OrchestrationsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
598
|
+
GuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingService });
|
599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingService, decorators: [{
|
600
|
+
type: Injectable
|
601
|
+
}], ctorParameters: function () { return [{ type: i1.OrchestrationsApiService }]; } });
|
602
|
+
|
565
603
|
class SalesTransactionService {
|
566
604
|
get isInitialized$() {
|
567
605
|
return this.isInitializedSubj$.asObservable();
|
@@ -1569,6 +1607,7 @@ ConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ver
|
|
1569
1607
|
ConfigurationStateService,
|
1570
1608
|
ConfigurationRuntimeService,
|
1571
1609
|
TestModeConfigurationService,
|
1610
|
+
GuidedSellingService,
|
1572
1611
|
], imports: [ConfirmationDialogModule, ApiModule] });
|
1573
1612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, decorators: [{
|
1574
1613
|
type: NgModule,
|
@@ -1579,6 +1618,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1579
1618
|
ConfigurationStateService,
|
1580
1619
|
ConfigurationRuntimeService,
|
1581
1620
|
TestModeConfigurationService,
|
1621
|
+
GuidedSellingService,
|
1582
1622
|
],
|
1583
1623
|
}]
|
1584
1624
|
}] });
|
@@ -1817,5 +1857,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1817
1857
|
* Generated bundle index. Do not edit.
|
1818
1858
|
*/
|
1819
1859
|
|
1820
|
-
export { ActionCodePipe, CalendarDirective, CatalogProductsService, ConfigurationRuntimeService, ConfigurationService, ConfigurationStateService, DEFAULT_FORMATTING_SETTINGS, DatePipe, FLOW_CUSTOMIZATION, FORMATTING_SETTINGS_TOKEN, FlowConfigurationService, FlowInfoService, FlowStateConfigurationService, FlowStateService, IntegrationState, NumberPipe, PricePipe, ProductImagesService, RuntimeSettingsService, SalesTransactionService, SdkCoreModule, SdkDirectivesModule, SdkPipesModule, TestModeConfigurationService, TransactionItemWorker, UI_DEFINITION_VERSION, extractMetadata, filterSuccessfulExecute, findTransactionItem, findTransactionItemWithComparator, generateTransactionItem, insertTransactionItem, removeTransactionItem, replaceTransactionItem };
|
1860
|
+
export { ActionCodePipe, CalendarDirective, CatalogProductsService, ConfigurationRuntimeService, ConfigurationService, ConfigurationStateService, DEFAULT_FORMATTING_SETTINGS, DatePipe, FLOW_CUSTOMIZATION, FORMATTING_SETTINGS_TOKEN, FlowConfigurationService, FlowInfoService, FlowStateConfigurationService, FlowStateService, GuidedSellingService, IntegrationState, NumberPipe, PricePipe, ProductImagesService, RuntimeSettingsService, SalesTransactionService, SdkCoreModule, SdkDirectivesModule, SdkPipesModule, TestModeConfigurationService, TransactionItemWorker, UI_DEFINITION_VERSION, extractMetadata, filterSuccessfulExecute, findTransactionItem, findTransactionItemWithComparator, generateTransactionItem, insertTransactionItem, removeTransactionItem, replaceTransactionItem };
|
1821
1861
|
//# sourceMappingURL=veloceapps-sdk-core.mjs.map
|