@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
@@ -1362,6 +1362,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1362
1362
|
type: Injectable
|
1363
1363
|
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i3$1.FlowInfoService }]; } });
|
1364
1364
|
|
1365
|
+
const resolvePCMModel = () => {
|
1366
|
+
const flowInfoService = inject(FlowInfoService);
|
1367
|
+
const configurationRuntimeService = inject(ConfigurationRuntimeService);
|
1368
|
+
const { productId } = flowInfoService.context;
|
1369
|
+
if (!productId) {
|
1370
|
+
throw new Error(`Unable to start configuration for 'productId == null'`);
|
1371
|
+
}
|
1372
|
+
return configurationRuntimeService.init$({ productId });
|
1373
|
+
};
|
1374
|
+
|
1365
1375
|
class SalesTransactionResolver {
|
1366
1376
|
constructor(router, routerService, flowInfoService, flowStateService, salesTransactionService) {
|
1367
1377
|
this.router = router;
|
@@ -1417,8 +1427,8 @@ class SalesTransactionResolver {
|
|
1417
1427
|
}
|
1418
1428
|
else {
|
1419
1429
|
const isAccountMode = this.flowInfoService.context.mode === 'ACCOUNT';
|
1420
|
-
const {
|
1421
|
-
if (isAccountMode
|
1430
|
+
const { hasProducts } = this.salesTransactionService;
|
1431
|
+
if (isAccountMode) {
|
1422
1432
|
navigateTo = '/assets';
|
1423
1433
|
}
|
1424
1434
|
else if (hasProducts) {
|
@@ -1494,7 +1504,7 @@ const rootRoute = {
|
|
1494
1504
|
path: 'product',
|
1495
1505
|
component: ProductComponent,
|
1496
1506
|
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
1497
|
-
resolve: { salesTransaction: SalesTransactionResolver, uiDef: resolveUIDefinition },
|
1507
|
+
resolve: { salesTransaction: SalesTransactionResolver, uiDef: resolveUIDefinition, pcm: resolvePCMModel },
|
1498
1508
|
canDeactivate: [ProductUnloadGuard],
|
1499
1509
|
data: { showHeader: true },
|
1500
1510
|
},
|