@veloceapps/sdk 7.0.2-41 → 7.0.2-42
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';
|
|
@@ -1010,7 +1010,7 @@ class RuntimeContextService {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
getRuntimeContext(productId, offeringId) {
|
|
1012
1012
|
return this.configurationApiService.getRuntimeDataByProductId(productId, offeringId).pipe(map(runtimeData => {
|
|
1013
|
-
const uiDefinition = this.getUIDefinition(runtimeData
|
|
1013
|
+
const uiDefinition = this.getUIDefinition(runtimeData);
|
|
1014
1014
|
const runtimeModel = RuntimeModel.create(runtimeData.types, runtimeData.products);
|
|
1015
1015
|
const { productName, properties } = Array.from(runtimeModel.components.values()).find(c => c.productId === productId) ?? {};
|
|
1016
1016
|
return {
|
|
@@ -1027,9 +1027,12 @@ class RuntimeContextService {
|
|
|
1027
1027
|
};
|
|
1028
1028
|
}));
|
|
1029
1029
|
}
|
|
1030
|
-
getUIDefinition(
|
|
1030
|
+
getUIDefinition(runtimeData) {
|
|
1031
1031
|
const { uiDefinitionId } = this.contextService.resolve();
|
|
1032
|
-
const findByFn = (uiDef) =>
|
|
1032
|
+
const findByFn = (uiDef) => uiDefinitionId ? uiDefinitionId === uiDef.id : uiDef.primary;
|
|
1033
|
+
const uiDefinitions = runtimeData.uiDefinitions
|
|
1034
|
+
.map(({ source }) => source)
|
|
1035
|
+
.filter((uiDefinition) => isLegacyUIDefinition(uiDefinition));
|
|
1033
1036
|
const uiDefinition = uiDefinitions.find(findByFn) || (uiDefinitions.length === 1 && { ...uiDefinitions[0] });
|
|
1034
1037
|
if (!uiDefinition) {
|
|
1035
1038
|
const errMsg = `Unable to find ${uiDefinitionId ? uiDefinitionId : 'Default'} UI`;
|