@veloceapps/sdk 11.0.0-121 → 11.0.0-123
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/core/services/flow-info.service.d.ts +5 -5
- package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +8 -8
- package/esm2020/core/services/flow-info.service.mjs +14 -14
- package/esm2020/src/guards/product-unload.guard.mjs +4 -2
- package/esm2020/src/pages/product/product.component.mjs +34 -10
- package/esm2020/src/services/flow-router.service.mjs +10 -10
- package/fesm2015/veloceapps-sdk-core.mjs +20 -20
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +40 -15
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +20 -20
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +39 -15
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/pages/product/product.component.d.ts +11 -3
- package/src/services/flow-router.service.d.ts +3 -3
@@ -146,6 +146,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
146
146
|
}], ctorParameters: function () { return [{ type: i1.ConfigurationSettingsApiService }]; } });
|
147
147
|
|
148
148
|
class FlowInfoService {
|
149
|
+
constructor(runtimeSettingsService, templatesAdminApiService, customizationService) {
|
150
|
+
this.runtimeSettingsService = runtimeSettingsService;
|
151
|
+
this.templatesAdminApiService = templatesAdminApiService;
|
152
|
+
this.customizationService = customizationService;
|
153
|
+
this.defaultTemplates = {
|
154
|
+
flowEngine: 'Flow Engine',
|
155
|
+
};
|
156
|
+
this.flowSubj$ = new BehaviorSubject(null);
|
157
|
+
this.templatesSubj$ = new BehaviorSubject({});
|
158
|
+
this.contextSubj$ = new BehaviorSubject(null);
|
159
|
+
this.flow$ = this.flowSubj$.asObservable();
|
160
|
+
this.templates$ = this.templatesSubj$.asObservable();
|
161
|
+
}
|
149
162
|
get flow() {
|
150
163
|
if (!this.flowSubj$.value) {
|
151
164
|
throw new Error(`Flow not initialized yet`);
|
@@ -173,19 +186,6 @@ class FlowInfoService {
|
|
173
186
|
get isStateful() {
|
174
187
|
return !!this.flow?.properties.stateful;
|
175
188
|
}
|
176
|
-
constructor(runtimeSettingsService, templatesAdminApiService, customizationService) {
|
177
|
-
this.runtimeSettingsService = runtimeSettingsService;
|
178
|
-
this.templatesAdminApiService = templatesAdminApiService;
|
179
|
-
this.customizationService = customizationService;
|
180
|
-
this.defaultTemplates = {
|
181
|
-
flowEngine: 'Flow Engine',
|
182
|
-
};
|
183
|
-
this.flowSubj$ = new BehaviorSubject(null);
|
184
|
-
this.templatesSubj$ = new BehaviorSubject({});
|
185
|
-
this.contextSubj$ = new BehaviorSubject(null);
|
186
|
-
this.flow$ = this.flowSubj$.asObservable();
|
187
|
-
this.templates$ = this.templatesSubj$.asObservable();
|
188
|
-
}
|
189
189
|
reset() {
|
190
190
|
this.flowSubj$.next(null);
|
191
191
|
this.templatesSubj$.next({});
|
@@ -1454,13 +1454,6 @@ class ConfigurationStateService {
|
|
1454
1454
|
return of({ id: '' });
|
1455
1455
|
}
|
1456
1456
|
const { standalone } = this.flowInfoService.flow.properties;
|
1457
|
-
if (standalone) {
|
1458
|
-
const request = {
|
1459
|
-
transactionContext: state,
|
1460
|
-
flowId: this.flowInfoService.flow.id,
|
1461
|
-
};
|
1462
|
-
return this.salesTransactionApiService.save(request).pipe(switchMap(r => this.flowStateService.executeRequest$({}, true).pipe(map(() => r))), map(id => ({ id })));
|
1463
|
-
}
|
1464
1457
|
const transactionContext = this.salesTransactionService.state;
|
1465
1458
|
const configurationRoot = this.configurationService.root;
|
1466
1459
|
if (!transactionContext || !configurationRoot) {
|
@@ -1482,6 +1475,13 @@ class ConfigurationStateService {
|
|
1482
1475
|
salesTransactionItems,
|
1483
1476
|
},
|
1484
1477
|
};
|
1478
|
+
if (standalone) {
|
1479
|
+
const request = {
|
1480
|
+
transactionContext: newState,
|
1481
|
+
flowId: this.flowInfoService.flow.id,
|
1482
|
+
};
|
1483
|
+
return this.salesTransactionApiService.save(request).pipe(switchMap(r => this.flowStateService.executeRequest$({}, true).pipe(map(() => r))), map(id => ({ id })));
|
1484
|
+
}
|
1485
1485
|
return this.flowConfigurationService.calculate$(newState).pipe(switchMap(() => this.flowStateService.executeRequest$({}, true)), map(() => ({ id: '' })));
|
1486
1486
|
}
|
1487
1487
|
cancelConfiguration() {
|