@veloceapps/sdk 8.0.0-165 → 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
@@ -944,7 +944,8 @@ class FlowStateService {
|
|
944
944
|
}
|
945
945
|
subscribe$(scope, selectorName, inputData, options) {
|
946
946
|
const requestId = this.generateRequestId(scope, selectorName, inputData);
|
947
|
-
|
947
|
+
let subscription = this.subscriptions[requestId];
|
948
|
+
if (!subscription) {
|
948
949
|
const request = this.execToRequest(scope, {
|
949
950
|
selectors: {
|
950
951
|
[requestId]: {
|
@@ -953,16 +954,17 @@ class FlowStateService {
|
|
953
954
|
},
|
954
955
|
},
|
955
956
|
});
|
956
|
-
|
957
|
+
subscription = {
|
957
958
|
request,
|
958
959
|
data$: new BehaviorSubject(this.NOT_INITIALIZED),
|
959
960
|
};
|
961
|
+
this.subscriptions[requestId] = subscription;
|
960
962
|
if (!options?.cold) {
|
961
963
|
this.executeRequest$(request).subscribe();
|
962
964
|
}
|
963
965
|
}
|
964
|
-
return
|
965
|
-
if (!this.subscriptions[requestId]
|
966
|
+
return subscription.data$.pipe(filter$1(data => data != this.NOT_INITIALIZED), map$1(data => data), finalize(() => {
|
967
|
+
if (!this.subscriptions[requestId]?.data$.observed) {
|
966
968
|
delete this.subscriptions[requestId];
|
967
969
|
}
|
968
970
|
}));
|
@@ -1234,7 +1236,7 @@ class FlowStateService {
|
|
1234
1236
|
return this.executeProcessorScript(request, configurationProcessor, executable.inputData);
|
1235
1237
|
}
|
1236
1238
|
executeProcessorScript(request, configurationProcessor, inputData) {
|
1237
|
-
const scope =
|
1239
|
+
const scope = this.getScopeByOwnerId(configurationProcessor.ownerId ?? '');
|
1238
1240
|
let functionToExecute = this.executedFunctions[scope + configurationProcessor.apiName];
|
1239
1241
|
if (!functionToExecute) {
|
1240
1242
|
const script = `${configurationProcessor.script}\nreturn transform;`;
|
@@ -1949,7 +1951,7 @@ class ProductImagesService {
|
|
1949
1951
|
this.imagesMap$.next({ ...this.imagesMap$.value, [productId]: '' });
|
1950
1952
|
this.fetchProductImage(productId);
|
1951
1953
|
}
|
1952
|
-
return this.imagesMap$.pipe(map$1(imagesMap => imagesMap[productId]), distinctUntilChanged());
|
1954
|
+
return this.imagesMap$.pipe(map$1(imagesMap => imagesMap[productId] ?? null), distinctUntilChanged());
|
1953
1955
|
}
|
1954
1956
|
fetchProductImage(productId) {
|
1955
1957
|
this.productApiService
|
@@ -2182,7 +2184,8 @@ class ConfigurationStateService {
|
|
2182
2184
|
}
|
2183
2185
|
subscribe$(selectorName, inputData = {}, options) {
|
2184
2186
|
const requestId = UUID.UUID();
|
2185
|
-
|
2187
|
+
let subscription = this.subscriptions[requestId];
|
2188
|
+
if (!subscription) {
|
2186
2189
|
const request = {
|
2187
2190
|
selectors: {
|
2188
2191
|
[requestId]: {
|
@@ -2192,19 +2195,17 @@ class ConfigurationStateService {
|
|
2192
2195
|
},
|
2193
2196
|
},
|
2194
2197
|
};
|
2195
|
-
|
2198
|
+
subscription = {
|
2196
2199
|
request,
|
2197
2200
|
data$: new BehaviorSubject(this.NOT_INITIALIZED),
|
2198
2201
|
};
|
2202
|
+
this.subscriptions[requestId] = subscription;
|
2199
2203
|
if (!options?.cold) {
|
2200
2204
|
this.execute$(request).subscribe();
|
2201
2205
|
}
|
2202
2206
|
}
|
2203
|
-
return
|
2204
|
-
if (!this.subscriptions[requestId]) {
|
2205
|
-
return;
|
2206
|
-
}
|
2207
|
-
if (!this.subscriptions[requestId].data$.observed) {
|
2207
|
+
return subscription.data$.pipe(filter$1(data => data != this.NOT_INITIALIZED), map$1(data => data), finalize(() => {
|
2208
|
+
if (!this.subscriptions[requestId]?.data$.observed) {
|
2208
2209
|
delete this.subscriptions[requestId];
|
2209
2210
|
}
|
2210
2211
|
}), takeUntil(this.canceledConfiguration$));
|