@veloceapps/sdk 7.0.2-41 → 7.0.2-43
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.default.d.ts +2 -2
- package/cms/components/preview/preview.component.d.ts +2 -1
- package/cms/injection-tokens.d.ts +1 -1
- package/cms/modules/migrations/services/migrations.service.d.ts +1 -1
- package/cms/modules/migrations/types/migrations.types.d.ts +1 -1
- package/cms/modules/runtime/services/compilation.service.d.ts +1 -1
- package/cms/modules/runtime/services/runtime.service.d.ts +1 -1
- package/cms/utils/element.utils.d.ts +1 -1
- package/cms/utils/elements-resolver.d.ts +1 -1
- package/cms/vendor-map.d.ts +1 -1
- package/core/modules/configuration/helpers.d.ts +2 -2
- package/core/modules/configuration/services/configuration-runtime.service.d.ts +2 -2
- package/core/types/runtime.types.d.ts +1 -2
- package/core/types/ui-definition.types.d.ts +0 -46
- package/core/utils/ui-definition.utils.d.ts +1 -1
- package/esm2020/cms/cms.default.mjs +1 -1
- package/esm2020/cms/components/preview/preview.component.mjs +1 -1
- package/esm2020/cms/injection-tokens.mjs +1 -1
- package/esm2020/cms/modules/migrations/services/migrations.service.mjs +1 -1
- package/esm2020/cms/modules/migrations/types/migrations.types.mjs +1 -1
- package/esm2020/cms/modules/runtime/services/compilation.service.mjs +1 -1
- package/esm2020/cms/modules/runtime/services/runtime.service.mjs +1 -1
- package/esm2020/cms/utils/element.utils.mjs +1 -1
- package/esm2020/cms/utils/elements-resolver.mjs +1 -1
- package/esm2020/core/modules/configuration/helpers.mjs +1 -1
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +2 -2
- package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +6 -12
- package/esm2020/core/types/runtime.types.mjs +1 -1
- package/esm2020/core/types/ui-definition.types.mjs +1 -1
- package/esm2020/core/utils/ui-definition.utils.mjs +1 -1
- package/esm2020/runtime/components/ui-runtime-preview/runtime-preview.component.mjs +2 -2
- package/esm2020/runtime/services/runtime-context.service.mjs +8 -5
- package/esm2020/runtime/services/runtime.service.mjs +1 -1
- package/esm2020/runtime/types/runtime.types.mjs +1 -1
- package/esm2020/src/components/doc-gen/doc-gen.component.mjs +2 -2
- package/esm2020/src/pages/assets/assets.component.mjs +2 -2
- package/esm2020/src/pages/catalog/catalog.component.mjs +3 -3
- package/esm2020/src/pages/product/product.component.mjs +2 -2
- package/esm2020/src/pages/remote/remote.component.mjs +1 -1
- package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +3 -3
- package/esm2020/src/types/flow-customization.types.mjs +1 -1
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +5 -11
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-runtime.mjs +7 -4
- package/fesm2015/veloceapps-sdk-runtime.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +5 -11
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-runtime.mjs +7 -4
- package/fesm2020/veloceapps-sdk-runtime.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/runtime/components/ui-runtime-preview/runtime-preview.component.d.ts +3 -3
- package/runtime/services/runtime.service.d.ts +2 -2
- package/runtime/types/runtime.types.d.ts +2 -2
- package/src/components/doc-gen/doc-gen.component.d.ts +2 -1
- package/src/pages/assets/assets.component.d.ts +2 -1
- package/src/pages/catalog/catalog.component.d.ts +2 -1
- package/src/pages/product/product.component.d.ts +2 -1
- package/src/pages/remote/remote.component.d.ts +2 -1
- package/src/pages/shopping-cart/shopping-cart.component.d.ts +2 -1
- package/src/types/flow-customization.types.d.ts +1 -2
|
@@ -3,7 +3,7 @@ import { Injectable, ViewContainerRef, Component, Input, ViewChild, Inject, Even
|
|
|
3
3
|
import * as i4 from '@angular/forms';
|
|
4
4
|
import { FormGroup, FormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import * as i7 from '@veloceapps/core';
|
|
6
|
-
import { EntityUtil, UUID, SectionPathUtil, TypeValidators, ConfigurationMode, RuntimeModel, OrderByPipe, PricingUtils, PagedEntity, CoreModule, SalesforceIdUtils, SearchFilterPipe, ConfigurationContextMode } from '@veloceapps/core';
|
|
6
|
+
import { EntityUtil, UUID, SectionPathUtil, TypeValidators, ConfigurationMode, RuntimeModel, isLegacyUIDefinition, OrderByPipe, PricingUtils, PagedEntity, CoreModule, SalesforceIdUtils, SearchFilterPipe, ConfigurationContextMode } from '@veloceapps/core';
|
|
7
7
|
import * as i2 from '@veloceapps/sdk/core';
|
|
8
8
|
import { RuntimeMode, RuntimeStep, SdkCoreModule } from '@veloceapps/sdk/core';
|
|
9
9
|
import * as rxjs from 'rxjs';
|
|
@@ -998,7 +998,7 @@ class RuntimeContextService {
|
|
|
998
998
|
getRuntimeContext(productId, offeringId) {
|
|
999
999
|
return this.configurationApiService.getRuntimeDataByProductId(productId, offeringId).pipe(map(runtimeData => {
|
|
1000
1000
|
var _a;
|
|
1001
|
-
const uiDefinition = this.getUIDefinition(runtimeData
|
|
1001
|
+
const uiDefinition = this.getUIDefinition(runtimeData);
|
|
1002
1002
|
const runtimeModel = RuntimeModel.create(runtimeData.types, runtimeData.products);
|
|
1003
1003
|
const { productName, properties } = (_a = Array.from(runtimeModel.components.values()).find(c => c.productId === productId)) !== null && _a !== void 0 ? _a : {};
|
|
1004
1004
|
return {
|
|
@@ -1015,9 +1015,12 @@ class RuntimeContextService {
|
|
|
1015
1015
|
};
|
|
1016
1016
|
}));
|
|
1017
1017
|
}
|
|
1018
|
-
getUIDefinition(
|
|
1018
|
+
getUIDefinition(runtimeData) {
|
|
1019
1019
|
const { uiDefinitionId } = this.contextService.resolve();
|
|
1020
|
-
const findByFn = (uiDef) =>
|
|
1020
|
+
const findByFn = (uiDef) => uiDefinitionId ? uiDefinitionId === uiDef.id : uiDef.primary;
|
|
1021
|
+
const uiDefinitions = runtimeData.uiDefinitions
|
|
1022
|
+
.map(({ source }) => source)
|
|
1023
|
+
.filter((uiDefinition) => isLegacyUIDefinition(uiDefinition));
|
|
1021
1024
|
const uiDefinition = uiDefinitions.find(findByFn) || (uiDefinitions.length === 1 && Object.assign({}, uiDefinitions[0]));
|
|
1022
1025
|
if (!uiDefinition) {
|
|
1023
1026
|
const errMsg = `Unable to find ${uiDefinitionId ? uiDefinitionId : 'Default'} UI`;
|