@veloceapps/sdk 11.0.0-0 → 11.0.0-10
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/cms.actions.d.ts +0 -52
- package/cms/vendor-map.d.ts +11 -25
- package/core/modules/configuration/services/configuration-state.service.d.ts +0 -4
- package/core/modules/configuration/services/configuration.service.d.ts +5 -1
- package/core/modules/configuration/services/runtime-context.service.d.ts +1 -1
- package/core/modules/configuration/types/configuration-runtime.types.d.ts +2 -0
- package/core/types/flow-customization.types.d.ts +0 -12
- package/esm2020/cms/cms.actions.mjs +1 -52
- package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +3 -3
- package/esm2020/cms/vendor-map.mjs +5 -11
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +4 -2
- package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +2 -3
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +29 -10
- package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +5 -3
- package/esm2020/core/modules/configuration/types/configuration-runtime.types.mjs +1 -1
- package/esm2020/core/services/flow-info.service.mjs +1 -3
- package/esm2020/core/types/flow-customization.types.mjs +1 -1
- package/esm2020/src/flow.component.mjs +4 -5
- package/esm2020/src/flow.module.mjs +5 -10
- package/esm2020/src/pages/product/product.component.mjs +9 -2
- package/esm2020/src/services/flow-dialog.service.mjs +1 -30
- package/fesm2015/veloceapps-sdk-cms.mjs +16 -72
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +32 -16
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +66 -250
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +8 -74
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +34 -16
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +65 -249
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/flow.module.d.ts +2 -3
- package/src/services/flow-dialog.service.d.ts +0 -4
- package/esm2020/src/components/doc-gen/doc-gen.component.mjs +0 -129
- package/esm2020/src/components/doc-gen/doc-gen.module.mjs +0 -19
- package/esm2020/src/services/doc-gen.service.mjs +0 -34
- package/src/components/doc-gen/doc-gen.component.d.ts +0 -26
- package/src/components/doc-gen/doc-gen.module.d.ts +0 -9
- package/src/services/doc-gen.service.d.ts +0 -13
@@ -230,8 +230,6 @@ class FlowInfoService {
|
|
230
230
|
return UITemplateType.SHOPPING_CART;
|
231
231
|
case 'catalog':
|
232
232
|
return UITemplateType.CATALOG;
|
233
|
-
case 'docGen':
|
234
|
-
return UITemplateType.DOCGEN;
|
235
233
|
case 'guidedSelling':
|
236
234
|
return UITemplateType.GUIDED_SELLING;
|
237
235
|
case 'flowHeader':
|
@@ -1424,7 +1422,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1424
1422
|
}], ctorParameters: function () { return [{ type: i1.ConfigurationSettingsApiService }]; } });
|
1425
1423
|
|
1426
1424
|
class ConfigurationService {
|
1427
|
-
constructor(quoteDraftService, runtimeService, contextService, configurationApiService, messageService, dialogService, runtimeSettings) {
|
1425
|
+
constructor(quoteDraftService, runtimeService, contextService, configurationApiService, messageService, dialogService, runtimeSettings, flowInfoService) {
|
1428
1426
|
this.quoteDraftService = quoteDraftService;
|
1429
1427
|
this.runtimeService = runtimeService;
|
1430
1428
|
this.contextService = contextService;
|
@@ -1432,6 +1430,7 @@ class ConfigurationService {
|
|
1432
1430
|
this.messageService = messageService;
|
1433
1431
|
this.dialogService = dialogService;
|
1434
1432
|
this.runtimeSettings = runtimeSettings;
|
1433
|
+
this.flowInfoService = flowInfoService;
|
1435
1434
|
this.mode = ConfigurationMode.SEARCH;
|
1436
1435
|
this.configurationState = new BehaviorSubject(null);
|
1437
1436
|
this.previousConfigurationState = new BehaviorSubject(null);
|
@@ -1544,8 +1543,12 @@ class ConfigurationService {
|
|
1544
1543
|
const customPriceApi = this.runtimeSettings.getConfigurationSettings()['CUSTOM_PRICE_API'];
|
1545
1544
|
this.isLoadingSubj$.next(true);
|
1546
1545
|
const configure$ = pricingEnabled && customPriceApi
|
1547
|
-
? this.configurationApiService.customConfigurePrice({
|
1548
|
-
|
1546
|
+
? this.configurationApiService.customConfigurePrice({
|
1547
|
+
url: customPriceApi,
|
1548
|
+
configurationRequest: this.extendConfigurationRequest(configurationRequest),
|
1549
|
+
runtimeModel,
|
1550
|
+
})
|
1551
|
+
: this.extendedConfigureLineItem$({
|
1549
1552
|
configurationRequest,
|
1550
1553
|
runtimeModel,
|
1551
1554
|
pricingEnabled,
|
@@ -1580,11 +1583,9 @@ class ConfigurationService {
|
|
1580
1583
|
}), finalize$1(() => this.reset()));
|
1581
1584
|
}
|
1582
1585
|
configureGuidedSelling$(data) {
|
1583
|
-
return this.
|
1584
|
-
.configureLineItem({
|
1586
|
+
return this.extendedConfigureLineItem$({
|
1585
1587
|
configurationRequest: getGuidedSellingConfigurationRequest(data, this.contextService.resolve()),
|
1586
|
-
})
|
1587
|
-
.pipe(catchError$1(error => {
|
1588
|
+
}).pipe(catchError$1(error => {
|
1588
1589
|
if (error instanceof HttpErrorResponse) {
|
1589
1590
|
this.messageService.add({ severity: ToastType.error, summary: error.error.message || error.error });
|
1590
1591
|
}
|
@@ -1661,12 +1662,24 @@ class ConfigurationService {
|
|
1661
1662
|
}
|
1662
1663
|
});
|
1663
1664
|
}
|
1665
|
+
extendedConfigureLineItem$({ configurationRequest, runtimeModel, pricingEnabled, }) {
|
1666
|
+
return this.configurationApiService.configureLineItem({
|
1667
|
+
configurationRequest: this.extendConfigurationRequest(configurationRequest),
|
1668
|
+
runtimeModel,
|
1669
|
+
pricingEnabled,
|
1670
|
+
});
|
1671
|
+
}
|
1672
|
+
extendConfigurationRequest(configurationRequest) {
|
1673
|
+
var _a;
|
1674
|
+
const procedureName = (_a = this.flowInfoService.flow) === null || _a === void 0 ? void 0 : _a.properties.procedureName;
|
1675
|
+
return Object.assign(Object.assign({}, configurationRequest), (procedureName ? { procedureName } : {}));
|
1676
|
+
}
|
1664
1677
|
}
|
1665
|
-
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 });
|
1678
|
+
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 });
|
1666
1679
|
ConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService });
|
1667
1680
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService, decorators: [{
|
1668
1681
|
type: Injectable
|
1669
|
-
}], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: ConfigurationRuntimeService }, { type: ContextService }, { type: i1.ConfigurationApiService }, { type: i5.MessageService }, { type: i6$1.DialogService }, { type: RuntimeSettingsService }]; } });
|
1682
|
+
}], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: ConfigurationRuntimeService }, { type: ContextService }, { type: i1.ConfigurationApiService }, { type: i5.MessageService }, { type: i6$1.DialogService }, { type: RuntimeSettingsService }, { type: FlowInfoService }]; } });
|
1670
1683
|
|
1671
1684
|
class FlowConfigurationService {
|
1672
1685
|
constructor(proceduresApiService, contextService, quoteDraftService, updateService, configurationService, flowInfoService) {
|
@@ -1938,8 +1951,10 @@ class RuntimeContextService {
|
|
1938
1951
|
constructor(configurationApiService) {
|
1939
1952
|
this.configurationApiService = configurationApiService;
|
1940
1953
|
}
|
1941
|
-
getRuntimeContext(productId, offeringId) {
|
1942
|
-
return this.configurationApiService
|
1954
|
+
getRuntimeContext(productId, offeringId, defaultUIDefinitionId, requiredUIDefinitionId) {
|
1955
|
+
return this.configurationApiService
|
1956
|
+
.getRuntimeDataByProductId(productId, offeringId, defaultUIDefinitionId, requiredUIDefinitionId)
|
1957
|
+
.pipe(map(runtimeData => {
|
1943
1958
|
var _a;
|
1944
1959
|
const uiDefinitionContainer = this.getUIDefinitionContainer(runtimeData);
|
1945
1960
|
const runtimeModel = RuntimeModel.create(runtimeData.types, runtimeData.products);
|
@@ -2010,7 +2025,9 @@ class ConfigurationRuntimeService {
|
|
2010
2025
|
init(props) {
|
2011
2026
|
this.initializationProps = props;
|
2012
2027
|
const context = this.contextService.resolve();
|
2013
|
-
return this.runtimeContextService
|
2028
|
+
return this.runtimeContextService
|
2029
|
+
.getRuntimeContext(props.productId, props.offeringId, props.defaultUIDefinitionId, props.requiredUIDefinitionId)
|
2030
|
+
.pipe(tap(runtimeContext => {
|
2014
2031
|
var _a, _b, _c, _d;
|
2015
2032
|
this.uiDefinitionProperties = (_b = (_a = runtimeContext.uiDefinitionContainer) === null || _a === void 0 ? void 0 : _a.source.properties) !== null && _b !== void 0 ? _b : {};
|
2016
2033
|
const { PriceListId } = (_c = context.properties) !== null && _c !== void 0 ? _c : {};
|
@@ -2179,9 +2196,8 @@ class ConfigurationStateService {
|
|
2179
2196
|
}
|
2180
2197
|
}), takeUntil(this.canceledConfiguration$));
|
2181
2198
|
}
|
2182
|
-
saveConfiguration(
|
2199
|
+
saveConfiguration(flow) {
|
2183
2200
|
var _a, _b, _c, _d;
|
2184
|
-
const flow = typeof first === 'boolean' ? first : second;
|
2185
2201
|
if (this.isStatefulConfiguration) {
|
2186
2202
|
return this.flowStateApiService
|
2187
2203
|
.saveConfiguration((_a = this.flowStateService.stateId) !== null && _a !== void 0 ? _a : '', (_b = this.stateId) !== null && _b !== void 0 ? _b : '')
|