@veloceapps/sdk 11.0.0-25 → 11.0.0-27
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/core/modules/configuration/services/configuration-runtime.service.d.ts +9 -1
- package/core/modules/configuration/services/configuration.service.d.ts +2 -2
- package/core/modules/configuration/types/configuration-runtime.types.d.ts +3 -0
- package/core/services/flow-info.service.d.ts +1 -0
- package/core/services/sales-transaction.service.d.ts +0 -1
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +14 -4
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +12 -9
- package/esm2020/core/modules/configuration/types/configuration-runtime.types.mjs +2 -0
- package/esm2020/core/services/flow-info.service.mjs +14 -1
- package/esm2020/core/services/flow-state.service.mjs +2 -7
- package/esm2020/core/services/sales-transaction.service.mjs +1 -4
- package/esm2020/src/flow-routing.module.mjs +3 -2
- package/esm2020/src/resolvers/pcm-model.resolver.mjs +12 -0
- package/esm2020/src/resolvers/sales-transaction.resolver.mjs +3 -3
- package/fesm2015/veloceapps-sdk-core.mjs +37 -23
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +13 -3
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +35 -20
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +13 -3
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/resolvers/pcm-model.resolver.d.ts +3 -0
@@ -1342,6 +1342,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1342
1342
|
type: Injectable
|
1343
1343
|
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i3$1.FlowInfoService }]; } });
|
1344
1344
|
|
1345
|
+
const resolvePCMModel = () => {
|
1346
|
+
const flowInfoService = inject(FlowInfoService);
|
1347
|
+
const configurationRuntimeService = inject(ConfigurationRuntimeService);
|
1348
|
+
const { productId } = flowInfoService.context;
|
1349
|
+
if (!productId) {
|
1350
|
+
throw new Error(`Unable to start configuration for 'productId == null'`);
|
1351
|
+
}
|
1352
|
+
return configurationRuntimeService.init$({ productId });
|
1353
|
+
};
|
1354
|
+
|
1345
1355
|
class SalesTransactionResolver {
|
1346
1356
|
constructor(router, routerService, flowInfoService, flowStateService, salesTransactionService) {
|
1347
1357
|
this.router = router;
|
@@ -1397,8 +1407,8 @@ class SalesTransactionResolver {
|
|
1397
1407
|
}
|
1398
1408
|
else {
|
1399
1409
|
const isAccountMode = this.flowInfoService.context.mode === 'ACCOUNT';
|
1400
|
-
const {
|
1401
|
-
if (isAccountMode
|
1410
|
+
const { hasProducts } = this.salesTransactionService;
|
1411
|
+
if (isAccountMode) {
|
1402
1412
|
navigateTo = '/assets';
|
1403
1413
|
}
|
1404
1414
|
else if (hasProducts) {
|
@@ -1474,7 +1484,7 @@ const rootRoute = {
|
|
1474
1484
|
path: 'product',
|
1475
1485
|
component: ProductComponent,
|
1476
1486
|
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
1477
|
-
resolve: { salesTransaction: SalesTransactionResolver, uiDef: resolveUIDefinition },
|
1487
|
+
resolve: { salesTransaction: SalesTransactionResolver, uiDef: resolveUIDefinition, pcm: resolvePCMModel },
|
1478
1488
|
canDeactivate: [ProductUnloadGuard],
|
1479
1489
|
data: { showHeader: true },
|
1480
1490
|
},
|