@veloceapps/sdk 8.0.0-166 → 8.0.0-167
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +3 -3
- package/esm2020/cms/modules/migrations/migrations.mjs +2 -2
- package/esm2020/cms/modules/migrations/services/migrations.service.mjs +6 -2
- package/esm2020/cms/modules/runtime/services/compilation.service.mjs +3 -3
- package/esm2020/cms/plugins/configuration.plugin.mjs +8 -4
- package/esm2020/cms/services/io-provider.service.mjs +10 -9
- package/esm2020/cms/services/templates.service.mjs +10 -9
- package/esm2020/cms/utils/path.utils.mjs +3 -3
- package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +7 -8
- package/esm2020/core/services/flow-state.service.mjs +8 -6
- package/esm2020/core/services/product-images.service.mjs +2 -2
- package/esm2020/src/components/doc-gen/doc-gen.component.mjs +13 -8
- package/esm2020/src/pages/remote/remote.component.mjs +8 -7
- package/esm2020/src/services/flow-dialog.service.mjs +2 -2
- package/fesm2015/veloceapps-sdk-cms.mjs +38 -26
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +17 -13
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +24 -19
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +34 -24
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +14 -13
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +20 -14
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
@@ -143,25 +143,30 @@ class DocGenComponent {
|
|
143
143
|
if (!metaList) {
|
144
144
|
return;
|
145
145
|
}
|
146
|
-
const meta = metaList?.[0] ?? metaList;
|
147
146
|
const headerId = this.contextService.resolve().properties.Id ?? null;
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
147
|
+
const patchedMetaList = metaList.map(component => {
|
148
|
+
if (!component.js) {
|
149
|
+
return component;
|
150
|
+
}
|
151
|
+
const metadata = extractElementMetadata(component.js);
|
152
|
+
const script = extendElementMetadata(component.js, {
|
152
153
|
inputs: {
|
153
154
|
...metadata.inputs,
|
154
155
|
Id: headerId ? `"${headerId}"` : null,
|
155
156
|
},
|
156
157
|
});
|
157
|
-
|
158
|
+
return {
|
159
|
+
...component,
|
160
|
+
js: script,
|
161
|
+
};
|
162
|
+
});
|
158
163
|
const uiDef = {
|
159
164
|
name: '',
|
160
165
|
createdTimestamp: 0,
|
161
166
|
primary: true,
|
162
167
|
type: 'DEFAULT',
|
163
168
|
version: 2,
|
164
|
-
children:
|
169
|
+
children: patchedMetaList.map(child => ({
|
165
170
|
children: [],
|
166
171
|
template: child.html && btoaSafe(child.html),
|
167
172
|
script: child.js && btoaSafe(child.js),
|
@@ -444,7 +449,7 @@ class FlowDialogService {
|
|
444
449
|
}
|
445
450
|
showReadonlyModeDialog() {
|
446
451
|
const ctx = this.contextService.resolve();
|
447
|
-
const objectName = ctx.mode ? ctx.mode[0]
|
452
|
+
const objectName = ctx.mode ? ctx.mode[0]?.toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
|
448
453
|
return this.show({
|
449
454
|
title: 'Error',
|
450
455
|
description: `${objectName} Cannot be Saved`,
|
@@ -1674,7 +1679,7 @@ class RemoteComponent {
|
|
1674
1679
|
let items = [lineItem];
|
1675
1680
|
for (let i = 0; i < items.length; i++) {
|
1676
1681
|
const item = items[i];
|
1677
|
-
const children = options.get(item.id);
|
1682
|
+
const children = item && options.get(item.id);
|
1678
1683
|
if (children) {
|
1679
1684
|
item.lineItems = children;
|
1680
1685
|
items = items.concat(children);
|
@@ -1747,7 +1752,7 @@ class RemoteComponent {
|
|
1747
1752
|
if (rootOption) {
|
1748
1753
|
const featureOptions = optionConfigurations[rootOption.featureName] ?? (optionConfigurations[rootOption.featureName] = []);
|
1749
1754
|
const originOption = !rootOption.hasChildren
|
1750
|
-
? optionConfigurations[rootOption.featureName]
|
1755
|
+
? optionConfigurations[rootOption.featureName]?.find(({ optionId }) => optionId === rootOption.optionId)
|
1751
1756
|
: undefined;
|
1752
1757
|
const option = originOption ?? {};
|
1753
1758
|
option.optionId = option.optionId ?? rootOption.optionId;
|
@@ -1800,8 +1805,9 @@ class RemoteComponent {
|
|
1800
1805
|
}
|
1801
1806
|
}
|
1802
1807
|
for (const option of notBundleOptions) {
|
1803
|
-
|
1804
|
-
|
1808
|
+
const bundleOption = bundleOptionsByOptionId[option.configuredProductId];
|
1809
|
+
if (bundleOption) {
|
1810
|
+
bundleOption.hasChildren = true;
|
1805
1811
|
}
|
1806
1812
|
}
|
1807
1813
|
}
|
@@ -1809,7 +1815,7 @@ class RemoteComponent {
|
|
1809
1815
|
let items = lineItem.lineItems ?? [];
|
1810
1816
|
for (let i = 0; i < items.length; i++) {
|
1811
1817
|
const item = items[i];
|
1812
|
-
if (item
|
1818
|
+
if (item?.lineItems) {
|
1813
1819
|
items = items.concat(item.lineItems.map(li => ({ ...li, parentLineItem: item })));
|
1814
1820
|
}
|
1815
1821
|
}
|
@@ -1875,7 +1881,7 @@ class RemoteComponent {
|
|
1875
1881
|
.forEach(mapping => {
|
1876
1882
|
const attribute = lineItem.attributes.find(a => a.name === mapping.name);
|
1877
1883
|
if (attribute) {
|
1878
|
-
new Set(mapping.properties[propertyName]
|
1884
|
+
new Set(mapping.properties[propertyName]?.split(',')).forEach(k => (result[k] = attribute.value));
|
1879
1885
|
}
|
1880
1886
|
});
|
1881
1887
|
return result;
|