@veloceapps/sdk 8.0.0-166 → 8.0.0-168
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/core/utils/line-item.utils.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 +18 -14
- 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 +15 -14
- 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
@@ -358,7 +358,7 @@ const upsertAttributes = (originalAttributes, attributesToUpsert) => {
|
|
358
358
|
const [origAttr] = getAttributes(acc, [name]);
|
359
359
|
return [
|
360
360
|
...acc.filter(attr => attr.name !== name),
|
361
|
-
Object.assign(Object.assign({}, (origAttr !== null && origAttr !== void 0 ? origAttr : { name })), { cfgStatus: origAttr ? 'Changed' : 'User', value }),
|
361
|
+
Object.assign(Object.assign({}, (origAttr !== null && origAttr !== void 0 ? origAttr : { name, type: '' })), { cfgStatus: origAttr ? 'Changed' : 'User', value }),
|
362
362
|
];
|
363
363
|
}, originalAttributes);
|
364
364
|
};
|
@@ -888,7 +888,8 @@ class FlowStateService {
|
|
888
888
|
}
|
889
889
|
subscribe$(scope, selectorName, inputData, options) {
|
890
890
|
const requestId = this.generateRequestId(scope, selectorName, inputData);
|
891
|
-
|
891
|
+
let subscription = this.subscriptions[requestId];
|
892
|
+
if (!subscription) {
|
892
893
|
const request = this.execToRequest(scope, {
|
893
894
|
selectors: {
|
894
895
|
[requestId]: {
|
@@ -897,16 +898,18 @@ class FlowStateService {
|
|
897
898
|
},
|
898
899
|
},
|
899
900
|
});
|
900
|
-
|
901
|
+
subscription = {
|
901
902
|
request,
|
902
903
|
data$: new BehaviorSubject(this.NOT_INITIALIZED),
|
903
904
|
};
|
905
|
+
this.subscriptions[requestId] = subscription;
|
904
906
|
if (!(options === null || options === void 0 ? void 0 : options.cold)) {
|
905
907
|
this.executeRequest$(request).subscribe();
|
906
908
|
}
|
907
909
|
}
|
908
|
-
return
|
909
|
-
|
910
|
+
return subscription.data$.pipe(filter$1(data => data != this.NOT_INITIALIZED), map$1(data => data), finalize(() => {
|
911
|
+
var _a;
|
912
|
+
if (!((_a = this.subscriptions[requestId]) === null || _a === void 0 ? void 0 : _a.data$.observed)) {
|
910
913
|
delete this.subscriptions[requestId];
|
911
914
|
}
|
912
915
|
}));
|
@@ -1193,7 +1196,8 @@ class FlowStateService {
|
|
1193
1196
|
return this.executeProcessorScript(request, configurationProcessor, executable.inputData);
|
1194
1197
|
}
|
1195
1198
|
executeProcessorScript(request, configurationProcessor, inputData) {
|
1196
|
-
|
1199
|
+
var _a;
|
1200
|
+
const scope = this.getScopeByOwnerId((_a = configurationProcessor.ownerId) !== null && _a !== void 0 ? _a : '');
|
1197
1201
|
let functionToExecute = this.executedFunctions[scope + configurationProcessor.apiName];
|
1198
1202
|
if (!functionToExecute) {
|
1199
1203
|
const script = `${configurationProcessor.script}\nreturn transform;`;
|
@@ -1921,7 +1925,7 @@ class ProductImagesService {
|
|
1921
1925
|
this.imagesMap$.next(Object.assign(Object.assign({}, this.imagesMap$.value), { [productId]: '' }));
|
1922
1926
|
this.fetchProductImage(productId);
|
1923
1927
|
}
|
1924
|
-
return this.imagesMap$.pipe(map$1(imagesMap => imagesMap[productId]), distinctUntilChanged());
|
1928
|
+
return this.imagesMap$.pipe(map$1(imagesMap => { var _a; return (_a = imagesMap[productId]) !== null && _a !== void 0 ? _a : null; }), distinctUntilChanged());
|
1925
1929
|
}
|
1926
1930
|
fetchProductImage(productId) {
|
1927
1931
|
this.productApiService
|
@@ -2145,7 +2149,8 @@ class ConfigurationStateService {
|
|
2145
2149
|
}
|
2146
2150
|
subscribe$(selectorName, inputData = {}, options) {
|
2147
2151
|
const requestId = UUID.UUID();
|
2148
|
-
|
2152
|
+
let subscription = this.subscriptions[requestId];
|
2153
|
+
if (!subscription) {
|
2149
2154
|
const request = {
|
2150
2155
|
selectors: {
|
2151
2156
|
[requestId]: {
|
@@ -2155,19 +2160,18 @@ class ConfigurationStateService {
|
|
2155
2160
|
},
|
2156
2161
|
},
|
2157
2162
|
};
|
2158
|
-
|
2163
|
+
subscription = {
|
2159
2164
|
request,
|
2160
2165
|
data$: new BehaviorSubject(this.NOT_INITIALIZED),
|
2161
2166
|
};
|
2167
|
+
this.subscriptions[requestId] = subscription;
|
2162
2168
|
if (!(options === null || options === void 0 ? void 0 : options.cold)) {
|
2163
2169
|
this.execute$(request).subscribe();
|
2164
2170
|
}
|
2165
2171
|
}
|
2166
|
-
return
|
2167
|
-
|
2168
|
-
|
2169
|
-
}
|
2170
|
-
if (!this.subscriptions[requestId].data$.observed) {
|
2172
|
+
return subscription.data$.pipe(filter$1(data => data != this.NOT_INITIALIZED), map$1(data => data), finalize(() => {
|
2173
|
+
var _a;
|
2174
|
+
if (!((_a = this.subscriptions[requestId]) === null || _a === void 0 ? void 0 : _a.data$.observed)) {
|
2171
2175
|
delete this.subscriptions[requestId];
|
2172
2176
|
}
|
2173
2177
|
}), takeUntil(this.canceledConfiguration$));
|