@veloceapps/sdk 8.0.0-132 → 8.0.0-134
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/components/preview/preview.component.d.ts +2 -2
- package/cms/vendor-map.d.ts +2 -2
- package/core/modules/configuration/configuration.module.d.ts +2 -1
- package/core/modules/configuration/index.d.ts +1 -1
- package/core/modules/configuration/services/configuration-state.service.d.ts +48 -0
- package/core/modules/configuration/services/configuration.service.d.ts +2 -1
- package/core/modules/flow-configuration/flow-configuration.module.d.ts +2 -1
- package/core/services/flow-info.service.d.ts +1 -0
- package/core/services/flow-state-configuration.service.d.ts +5 -6
- package/esm2020/cms/components/preview/preview.component.mjs +4 -4
- package/esm2020/cms/vendor-map.mjs +3 -3
- package/esm2020/core/core.module.mjs +16 -2
- package/esm2020/core/modules/configuration/configuration.module.mjs +7 -23
- package/esm2020/core/modules/configuration/helpers.mjs +1 -1
- package/esm2020/core/modules/configuration/index.mjs +2 -2
- package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +267 -0
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +21 -15
- package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +6 -6
- package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +3 -4
- package/esm2020/core/services/context.service.mjs +3 -4
- package/esm2020/core/services/flow-info.service.mjs +6 -4
- package/esm2020/core/services/flow-state-configuration.service.mjs +27 -26
- package/esm2020/core/services/flow-state.service.mjs +15 -7
- package/esm2020/core/services/integration.state.mjs +3 -4
- package/esm2020/core/services/metric-calculation/metric-calculation.service.mjs +3 -4
- package/esm2020/core/services/product-images.service.mjs +3 -4
- package/esm2020/core/services/quote-draft.service.mjs +3 -4
- package/esm2020/core/services/runtime-settings.service.mjs +4 -5
- package/esm2020/src/guards/context.guard.mjs +1 -2
- package/esm2020/src/pages/product/product.component.mjs +21 -8
- package/esm2020/src/pages/remote/remote.component.mjs +4 -4
- package/esm2020/src/services/flow-router.service.mjs +30 -13
- package/esm2020/src/services/flow.service.mjs +48 -27
- package/fesm2015/veloceapps-sdk-cms.mjs +4 -4
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +292 -152
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +94 -45
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +4 -4
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +281 -151
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +93 -44
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/pages/product/product.component.d.ts +6 -4
- package/src/pages/remote/remote.component.d.ts +2 -2
- package/src/services/flow-router.service.d.ts +4 -2
- package/src/services/flow.service.d.ts +7 -3
- package/core/modules/configuration/services/configuration.state.d.ts +0 -30
- package/esm2020/core/modules/configuration/services/configuration.state.mjs +0 -142
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Injectable, InjectionToken, Optional, Inject, NgModule, inject, Directive, Input, LOCALE_ID, Pipe } from '@angular/core';
|
|
3
3
|
import { UUID, ConfigurationContextMode, ConfigurationContext, UITemplateType, isDefined, ConfigurationProcessorTypes, EntityUtil, DEFAULT_CURRENCY_ISO_CODE, DEFAULT_CURRENCY_SYMBOL, validateDateFormat, DEFAULT_DATE_FORMAT, DEFAULT_DECIMALS_COUNT, getSupportedDateFormats, DEFAULT_DECIMAL_SEPARATOR, DEFAULT_THOUSANDS_SEPARATOR, DEFAULT_ACTION_CODE_LABELS, parseJsonSafely, ConfigurationMode, ConfigurationTranslatorUtils, ChargeGroupUtils, RuntimeModel, isNotLegacyUIDefinition, SalesforceIdUtils, DEFAULT_TIME_FORMAT, formatNumber } from '@veloceapps/core';
|
|
4
4
|
import * as i1 from '@veloceapps/api';
|
|
5
|
-
import {
|
|
5
|
+
import { ApiModule } from '@veloceapps/api';
|
|
6
6
|
import { BehaviorSubject, switchMap, map as map$1, tap as tap$1, noop, catchError, throwError, of, forkJoin, Subject, filter as filter$1, zip, combineLatest, shareReplay as shareReplay$1, finalize, takeUntil, take as take$1, distinctUntilChanged } from 'rxjs';
|
|
7
7
|
import { map, filter, tap, switchMap as switchMap$1, skip, take, shareReplay, catchError as catchError$1, finalize as finalize$1, first } from 'rxjs/operators';
|
|
8
8
|
import { merge, isEmpty, flatten, sortBy, map as map$2, omit, isEqual, cloneDeep, assign, uniqBy, transform, uniq } from 'lodash';
|
|
@@ -165,10 +165,9 @@ class ContextService {
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
ContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextService, deps: [{ token: i1.ContextApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
168
|
-
ContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextService
|
|
168
|
+
ContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextService });
|
|
169
169
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextService, decorators: [{
|
|
170
|
-
type: Injectable
|
|
171
|
-
args: [{ providedIn: 'root' }]
|
|
170
|
+
type: Injectable
|
|
172
171
|
}], ctorParameters: function () { return [{ type: i1.ContextApiService }]; } });
|
|
173
172
|
|
|
174
173
|
const FLOW_CUSTOMIZATION = new InjectionToken('FLOW_CUSTOMIZATION');
|
|
@@ -200,6 +199,9 @@ class FlowInfoService {
|
|
|
200
199
|
set flow(value) {
|
|
201
200
|
this.flowSubj$.next(value);
|
|
202
201
|
}
|
|
202
|
+
get isLegacy() {
|
|
203
|
+
return !!this.flow && this.flow?.properties.stateful == null;
|
|
204
|
+
}
|
|
203
205
|
constructor(flowsApiService, templatesApiService, customizationService) {
|
|
204
206
|
this.flowsApiService = flowsApiService;
|
|
205
207
|
this.templatesApiService = templatesApiService;
|
|
@@ -268,10 +270,9 @@ class FlowInfoService {
|
|
|
268
270
|
}
|
|
269
271
|
}
|
|
270
272
|
FlowInfoService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowInfoService, deps: [{ token: i1.FlowsApiService }, { token: i1.UITemplatesApiService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
271
|
-
FlowInfoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowInfoService
|
|
273
|
+
FlowInfoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowInfoService });
|
|
272
274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowInfoService, decorators: [{
|
|
273
|
-
type: Injectable
|
|
274
|
-
args: [{ providedIn: 'root' }]
|
|
275
|
+
type: Injectable
|
|
275
276
|
}], ctorParameters: function () { return [{ type: i1.FlowsApiService }, { type: i1.UITemplatesApiService }, { type: undefined, decorators: [{
|
|
276
277
|
type: Optional
|
|
277
278
|
}, {
|
|
@@ -541,10 +542,9 @@ class IntegrationState {
|
|
|
541
542
|
}
|
|
542
543
|
}
|
|
543
544
|
IntegrationState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IntegrationState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
544
|
-
IntegrationState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IntegrationState
|
|
545
|
+
IntegrationState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IntegrationState });
|
|
545
546
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IntegrationState, decorators: [{
|
|
546
|
-
type: Injectable
|
|
547
|
-
args: [{ providedIn: 'root' }]
|
|
547
|
+
type: Injectable
|
|
548
548
|
}] });
|
|
549
549
|
|
|
550
550
|
class QuoteDraftService {
|
|
@@ -785,10 +785,9 @@ class QuoteDraftService {
|
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
787
|
QuoteDraftService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService, deps: [{ token: ContextService }, { token: i1.QuoteApiService }, { token: i1.PriceApiService }, { token: IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
788
|
-
QuoteDraftService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService
|
|
788
|
+
QuoteDraftService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService });
|
|
789
789
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService, decorators: [{
|
|
790
|
-
type: Injectable
|
|
791
|
-
args: [{ providedIn: 'root' }]
|
|
790
|
+
type: Injectable
|
|
792
791
|
}], ctorParameters: function () { return [{ type: ContextService }, { type: i1.QuoteApiService }, { type: i1.PriceApiService }, { type: IntegrationState }]; } });
|
|
793
792
|
|
|
794
793
|
class FlowStateService {
|
|
@@ -1059,8 +1058,7 @@ class FlowStateService {
|
|
|
1059
1058
|
}
|
|
1060
1059
|
initStateless$() {
|
|
1061
1060
|
const { headerId } = this.contextService.resolve();
|
|
1062
|
-
|
|
1063
|
-
return stateInit$.pipe(tap$1(() => this.quoteDraftService.finalizeInit()), map$1(noop));
|
|
1061
|
+
return this.quoteDraftService.init(headerId, this.flowInfoService.params ?? {}).pipe(switchMap(() => this.executeRequest$(this.getDefaultExecutionRequestDTO())), switchMap(() => this.calculate$()), tap$1(() => this.quoteDraftService.finalizeInit()), map$1(noop));
|
|
1064
1062
|
}
|
|
1065
1063
|
calculate$() {
|
|
1066
1064
|
const flowState = this.quoteDraftService.quoteDraft;
|
|
@@ -1198,18 +1196,27 @@ class FlowStateService {
|
|
|
1198
1196
|
}
|
|
1199
1197
|
const ownerId = this.getOwnerIdByScope(UITemplateType.FLOW_ENGINE);
|
|
1200
1198
|
request.actions?.push({
|
|
1201
|
-
apiName: '
|
|
1199
|
+
apiName: 'UPDATE_PRICE_LIST',
|
|
1202
1200
|
ownerId,
|
|
1203
1201
|
inputData: {},
|
|
1204
1202
|
});
|
|
1203
|
+
request.actions?.push({
|
|
1204
|
+
apiName: 'UPDATE_ASSET_IDS',
|
|
1205
|
+
ownerId,
|
|
1206
|
+
inputData: {},
|
|
1207
|
+
});
|
|
1208
|
+
request.actions?.push({
|
|
1209
|
+
apiName: 'UPDATE_CONTEXT_PROPERTIES',
|
|
1210
|
+
ownerId,
|
|
1211
|
+
inputData: this.contextService.resolve().properties,
|
|
1212
|
+
});
|
|
1205
1213
|
return request;
|
|
1206
1214
|
}
|
|
1207
1215
|
}
|
|
1208
1216
|
FlowStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateService, deps: [{ token: ContextService }, { token: QuoteDraftService }, { token: FlowInfoService }, { token: FlowConfigurationService }, { token: i1.ConfigurationProcessorsApiService }, { token: i1.FlowStateApiService }, { token: i1.QuoteApiService }, { token: i6.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1209
|
-
FlowStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateService
|
|
1217
|
+
FlowStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateService });
|
|
1210
1218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateService, decorators: [{
|
|
1211
|
-
type: Injectable
|
|
1212
|
-
args: [{ providedIn: 'root' }]
|
|
1219
|
+
type: Injectable
|
|
1213
1220
|
}], ctorParameters: function () { return [{ type: ContextService }, { type: QuoteDraftService }, { type: FlowInfoService }, { type: FlowConfigurationService }, { type: i1.ConfigurationProcessorsApiService }, { type: i1.FlowStateApiService }, { type: i1.QuoteApiService }, { type: i6.ToastService }, { type: undefined, decorators: [{
|
|
1214
1221
|
type: Optional
|
|
1215
1222
|
}, {
|
|
@@ -1314,10 +1321,9 @@ class RuntimeSettingsService {
|
|
|
1314
1321
|
}
|
|
1315
1322
|
}
|
|
1316
1323
|
RuntimeSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, deps: [{ token: i1.ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1317
|
-
RuntimeSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService
|
|
1324
|
+
RuntimeSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService });
|
|
1318
1325
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, decorators: [{
|
|
1319
|
-
type: Injectable
|
|
1320
|
-
args: [{ providedIn: 'root' }]
|
|
1326
|
+
type: Injectable
|
|
1321
1327
|
}], ctorParameters: function () { return [{ type: i1.ConfigurationSettingsApiService }]; } });
|
|
1322
1328
|
|
|
1323
1329
|
class ConfigurationService {
|
|
@@ -1468,10 +1474,26 @@ class ConfigurationService {
|
|
|
1468
1474
|
throw error;
|
|
1469
1475
|
}));
|
|
1470
1476
|
}
|
|
1471
|
-
generateRequest() {
|
|
1477
|
+
generateRequest(lightMode = true) {
|
|
1478
|
+
const lineItem = this.generateLineItem();
|
|
1479
|
+
let request = {
|
|
1480
|
+
lineItem,
|
|
1481
|
+
mode: this.mode,
|
|
1482
|
+
step: !this.lineItem.value ? RuntimeStep.START : RuntimeStep.UPDATE,
|
|
1483
|
+
attributeDomainMode: 'ALL',
|
|
1484
|
+
context: this.contextService.resolve(),
|
|
1485
|
+
lineItems: this.quoteDraftService.quoteDraft?.currentState || [],
|
|
1486
|
+
asset: this.getAsset(),
|
|
1487
|
+
};
|
|
1488
|
+
if (lightMode) {
|
|
1489
|
+
request = ConfigurationTranslatorUtils.lightenConfigurationRequest(request);
|
|
1490
|
+
}
|
|
1491
|
+
return request;
|
|
1492
|
+
}
|
|
1493
|
+
generateLineItem() {
|
|
1472
1494
|
const runtimeContext = this.getRuntimeContext();
|
|
1473
1495
|
const uiDefinitionProperties = this.getUIDefinitionProperties();
|
|
1474
|
-
let lineItem = this.configurableRamp;
|
|
1496
|
+
let lineItem = cloneDeep(this.configurableRamp);
|
|
1475
1497
|
if (!lineItem) {
|
|
1476
1498
|
const { initializationProps } = this.runtimeService ?? {};
|
|
1477
1499
|
lineItem = getDefaultLineItem(runtimeContext, uiDefinitionProperties, initializationProps?.defaultQty);
|
|
@@ -1481,17 +1503,7 @@ class ConfigurationService {
|
|
|
1481
1503
|
lineItem = new LineItemWorker(lineItem).patchAttribute(attributes).li;
|
|
1482
1504
|
}
|
|
1483
1505
|
}
|
|
1484
|
-
|
|
1485
|
-
lineItem,
|
|
1486
|
-
mode: this.mode,
|
|
1487
|
-
step: !this.lineItem.value ? RuntimeStep.START : RuntimeStep.UPDATE,
|
|
1488
|
-
attributeDomainMode: 'ALL',
|
|
1489
|
-
context: this.contextService.resolve(),
|
|
1490
|
-
lineItems: this.quoteDraftService.quoteDraft?.currentState || [],
|
|
1491
|
-
asset: this.getAsset(),
|
|
1492
|
-
};
|
|
1493
|
-
request = ConfigurationTranslatorUtils.lightenConfigurationRequest(request);
|
|
1494
|
-
return request;
|
|
1506
|
+
return lineItem;
|
|
1495
1507
|
}
|
|
1496
1508
|
getUIDefinitionProperties() {
|
|
1497
1509
|
return {
|
|
@@ -1802,63 +1814,64 @@ class FlowConfigurationService {
|
|
|
1802
1814
|
}
|
|
1803
1815
|
}
|
|
1804
1816
|
FlowConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationService, deps: [{ token: i1.ProceduresApiService }, { token: ContextService }, { token: QuoteDraftService }, { token: FlowUpdateService }, { token: ConfigurationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1805
|
-
FlowConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationService
|
|
1817
|
+
FlowConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationService });
|
|
1806
1818
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationService, decorators: [{
|
|
1807
|
-
type: Injectable
|
|
1808
|
-
args: [{ providedIn: 'root' }]
|
|
1819
|
+
type: Injectable
|
|
1809
1820
|
}], ctorParameters: function () { return [{ type: i1.ProceduresApiService }, { type: ContextService }, { type: QuoteDraftService }, { type: FlowUpdateService }, { type: ConfigurationService }]; } });
|
|
1810
1821
|
|
|
1811
1822
|
class FlowConfigurationModule {
|
|
1812
1823
|
}
|
|
1813
1824
|
FlowConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1814
|
-
FlowConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule });
|
|
1815
|
-
FlowConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, providers: [FlowConfigurationService, FlowUpdateService,
|
|
1825
|
+
FlowConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, imports: [ApiModule] });
|
|
1826
|
+
FlowConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, providers: [FlowConfigurationService, FlowUpdateService], imports: [ApiModule] });
|
|
1816
1827
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, decorators: [{
|
|
1817
1828
|
type: NgModule,
|
|
1818
1829
|
args: [{
|
|
1819
|
-
imports: [],
|
|
1820
|
-
providers: [FlowConfigurationService, FlowUpdateService
|
|
1830
|
+
imports: [ApiModule],
|
|
1831
|
+
providers: [FlowConfigurationService, FlowUpdateService],
|
|
1821
1832
|
}]
|
|
1822
1833
|
}] });
|
|
1823
1834
|
|
|
1824
1835
|
class FlowStateConfigurationService {
|
|
1825
|
-
constructor(
|
|
1826
|
-
this.flowStateService = flowStateService;
|
|
1836
|
+
constructor(flowInfoService, flowConfigurationService, flowStateApiService, flowStateService) {
|
|
1827
1837
|
this.flowInfoService = flowInfoService;
|
|
1828
|
-
this.configurationService = configurationService;
|
|
1829
1838
|
this.flowConfigurationService = flowConfigurationService;
|
|
1830
1839
|
this.flowStateApiService = flowStateApiService;
|
|
1840
|
+
this.flowStateService = flowStateService;
|
|
1831
1841
|
this.configurationStateId$ = new BehaviorSubject(null);
|
|
1832
1842
|
}
|
|
1833
1843
|
get configurationStateId() {
|
|
1834
1844
|
return this.configurationStateId$.value;
|
|
1835
1845
|
}
|
|
1836
1846
|
addToCart$(props) {
|
|
1847
|
+
let request$;
|
|
1837
1848
|
const stateful = this.flowInfoService.flow?.properties.stateful;
|
|
1838
1849
|
if (stateful) {
|
|
1839
1850
|
const stateId = this.flowStateService.stateId;
|
|
1840
1851
|
if (!stateId) {
|
|
1841
|
-
|
|
1852
|
+
request$ = of();
|
|
1853
|
+
}
|
|
1854
|
+
else {
|
|
1855
|
+
const lineItem = generateConfigurationLineItem(props, props.qty);
|
|
1856
|
+
request$ = this.flowStateApiService.newConfiguration(stateId, { lineItem }).pipe(tap$1(r => this.configurationStateId$.next(r.stateId)), switchMap(() => {
|
|
1857
|
+
if (!this.configurationStateId) {
|
|
1858
|
+
return of();
|
|
1859
|
+
}
|
|
1860
|
+
return this.flowStateApiService.saveConfiguration(stateId, this.configurationStateId).pipe(tap$1(() => this.configurationStateId$.next(null)), map$1(noop));
|
|
1861
|
+
}));
|
|
1842
1862
|
}
|
|
1843
|
-
const lineItem = generateConfigurationLineItem(props, props.qty);
|
|
1844
|
-
return this.flowStateApiService.newConfiguration(stateId, { lineItem }).pipe(tap$1(r => this.configurationStateId$.next(r.stateId)), switchMap(() => {
|
|
1845
|
-
if (!this.configurationStateId) {
|
|
1846
|
-
return of();
|
|
1847
|
-
}
|
|
1848
|
-
return this.flowStateApiService.saveConfiguration(stateId, this.configurationStateId).pipe(switchMap(() => this.flowStateService.executeRequest$({}, true)), tap$1(() => this.configurationStateId$.next(null)), map$1(noop));
|
|
1849
|
-
}));
|
|
1850
1863
|
}
|
|
1851
1864
|
else {
|
|
1852
|
-
|
|
1865
|
+
request$ = this.flowConfigurationService.addToCart$(props).pipe(map$1(noop));
|
|
1853
1866
|
}
|
|
1867
|
+
return request$.pipe(switchMap(() => this.flowStateService.executeRequest$({}, true)), map$1(noop));
|
|
1854
1868
|
}
|
|
1855
1869
|
}
|
|
1856
|
-
FlowStateConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateConfigurationService, deps: [{ token:
|
|
1857
|
-
FlowStateConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateConfigurationService
|
|
1870
|
+
FlowStateConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateConfigurationService, deps: [{ token: FlowInfoService }, { token: FlowConfigurationService }, { token: i1.FlowStateApiService }, { token: FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1871
|
+
FlowStateConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateConfigurationService });
|
|
1858
1872
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateConfigurationService, decorators: [{
|
|
1859
|
-
type: Injectable
|
|
1860
|
-
|
|
1861
|
-
}], ctorParameters: function () { return [{ type: FlowStateService }, { type: FlowInfoService }, { type: ConfigurationService }, { type: FlowConfigurationService }, { type: i1.FlowStateApiService }]; } });
|
|
1873
|
+
type: Injectable
|
|
1874
|
+
}], ctorParameters: function () { return [{ type: FlowInfoService }, { type: FlowConfigurationService }, { type: i1.FlowStateApiService }, { type: FlowStateService }]; } });
|
|
1862
1875
|
|
|
1863
1876
|
function calculateMetricByMethod(lineItems, metric, method) {
|
|
1864
1877
|
const items = getLineItemsByMethod(lineItems, method);
|
|
@@ -1970,10 +1983,9 @@ class MetricsCalculationService {
|
|
|
1970
1983
|
}
|
|
1971
1984
|
}
|
|
1972
1985
|
MetricsCalculationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsCalculationService, deps: [{ token: QuoteDraftService }, { token: FlowConfigurationService }, { token: i1.ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1973
|
-
MetricsCalculationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsCalculationService
|
|
1986
|
+
MetricsCalculationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsCalculationService });
|
|
1974
1987
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsCalculationService, decorators: [{
|
|
1975
|
-
type: Injectable
|
|
1976
|
-
args: [{ providedIn: 'root' }]
|
|
1988
|
+
type: Injectable
|
|
1977
1989
|
}], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: FlowConfigurationService }, { type: i1.ConfigurationSettingsApiService }]; } });
|
|
1978
1990
|
|
|
1979
1991
|
class ProductImagesService {
|
|
@@ -1996,10 +2008,9 @@ class ProductImagesService {
|
|
|
1996
2008
|
}
|
|
1997
2009
|
}
|
|
1998
2010
|
ProductImagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService, deps: [{ token: i1.ProductApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1999
|
-
ProductImagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService
|
|
2011
|
+
ProductImagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService });
|
|
2000
2012
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService, decorators: [{
|
|
2001
|
-
type: Injectable
|
|
2002
|
-
args: [{ providedIn: 'root' }]
|
|
2013
|
+
type: Injectable
|
|
2003
2014
|
}], ctorParameters: function () { return [{ type: i1.ProductApiService }]; } });
|
|
2004
2015
|
|
|
2005
2016
|
class RuntimeContextService {
|
|
@@ -2138,58 +2149,185 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2138
2149
|
type: Injectable
|
|
2139
2150
|
}], ctorParameters: function () { return [{ type: i1.ConfigurationApiService }, { type: ContextService }, { type: RuntimeContextService }]; } });
|
|
2140
2151
|
|
|
2141
|
-
class
|
|
2142
|
-
constructor(
|
|
2143
|
-
this.
|
|
2144
|
-
this.runtimeService = runtimeService;
|
|
2152
|
+
class ConfigurationStateService {
|
|
2153
|
+
constructor(configurationRuntimeService, configurationService, quoteDraftService, toastService, flowStateService, flowInfoService, flowConfigurationService, flowStateApiService, quoteApiService) {
|
|
2154
|
+
this.configurationRuntimeService = configurationRuntimeService;
|
|
2145
2155
|
this.configurationService = configurationService;
|
|
2156
|
+
this.quoteDraftService = quoteDraftService;
|
|
2146
2157
|
this.toastService = toastService;
|
|
2147
|
-
this.
|
|
2148
|
-
this.
|
|
2158
|
+
this.flowStateService = flowStateService;
|
|
2159
|
+
this.flowInfoService = flowInfoService;
|
|
2160
|
+
this.flowConfigurationService = flowConfigurationService;
|
|
2161
|
+
this.flowStateApiService = flowStateApiService;
|
|
2162
|
+
this.quoteApiService = quoteApiService;
|
|
2163
|
+
this.NOT_INITIALIZED = Symbol();
|
|
2149
2164
|
this.stateId = null;
|
|
2165
|
+
this.ownerId = '';
|
|
2166
|
+
this.subscriptions = {};
|
|
2167
|
+
this.isInitialized$ = new BehaviorSubject(false);
|
|
2150
2168
|
}
|
|
2151
2169
|
init$() {
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
selectors: selectors?.map(selector => ({ name: selector.apiName, script: selector.script })),
|
|
2161
|
-
});
|
|
2162
|
-
}), tap$1(stateId => (this.stateId = stateId || null)), map$1(() => undefined));
|
|
2170
|
+
let request$;
|
|
2171
|
+
if (this.flowStateService.stateId && this.isStatefulConfiguration) {
|
|
2172
|
+
request$ = this.initStateful$();
|
|
2173
|
+
}
|
|
2174
|
+
else {
|
|
2175
|
+
request$ = this.initStateless$();
|
|
2176
|
+
}
|
|
2177
|
+
return request$.pipe(finalize(() => this.isInitialized$.next(true)));
|
|
2163
2178
|
}
|
|
2164
2179
|
cleanup() {
|
|
2165
2180
|
this.stateId = null;
|
|
2166
2181
|
this.configurationService.reset();
|
|
2167
|
-
this.stateSubj$.next({});
|
|
2168
2182
|
}
|
|
2169
|
-
execute$(req) {
|
|
2183
|
+
execute$(req, forceSubscriptions) {
|
|
2184
|
+
const fullRequest = cloneDeep(req);
|
|
2185
|
+
if (fullRequest.actions?.length || forceSubscriptions) {
|
|
2186
|
+
for (const subscription of Object.values(this.subscriptions)) {
|
|
2187
|
+
fullRequest.selectors = assign(fullRequest.selectors, subscription.request.selectors);
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
let execution$;
|
|
2170
2191
|
if (this.isStatefulConfiguration) {
|
|
2171
|
-
|
|
2192
|
+
execution$ = this.executeStateful$(fullRequest);
|
|
2172
2193
|
}
|
|
2173
2194
|
else {
|
|
2174
|
-
|
|
2195
|
+
execution$ = this.executeStateless$(fullRequest);
|
|
2175
2196
|
}
|
|
2197
|
+
return execution$.pipe(tap$1(result => this.handleSelectorsResponse(result.selectors)));
|
|
2198
|
+
}
|
|
2199
|
+
handleSelectorsResponse(selectors) {
|
|
2200
|
+
Object.entries(selectors).forEach(([requestId, selectorResult]) => {
|
|
2201
|
+
if (!selectorResult.success) {
|
|
2202
|
+
this.toastService.add({ severity: ToastType.error, summary: selectorResult.errorMessage });
|
|
2203
|
+
}
|
|
2204
|
+
const subscription$ = this.subscriptions[requestId]?.data$;
|
|
2205
|
+
if (subscription$) {
|
|
2206
|
+
subscription$.next(selectorResult);
|
|
2207
|
+
}
|
|
2208
|
+
});
|
|
2176
2209
|
}
|
|
2177
|
-
dispatch$(actionName, inputData) {
|
|
2178
|
-
return this.execute$({ actions: [{
|
|
2210
|
+
dispatch$(actionName, inputData = {}) {
|
|
2211
|
+
return this.execute$({ actions: [{ apiName: actionName, inputData, ownerId: this.ownerId }] });
|
|
2179
2212
|
}
|
|
2180
|
-
select$(selectorName, inputData) {
|
|
2213
|
+
select$(selectorName, inputData = {}) {
|
|
2181
2214
|
const requestId = UUID.UUID();
|
|
2182
2215
|
return this.execute$({
|
|
2183
2216
|
selectors: {
|
|
2184
2217
|
[requestId]: {
|
|
2185
|
-
|
|
2218
|
+
apiName: selectorName,
|
|
2186
2219
|
inputData,
|
|
2220
|
+
ownerId: this.ownerId,
|
|
2187
2221
|
},
|
|
2188
2222
|
},
|
|
2189
|
-
}).pipe(map$1(
|
|
2223
|
+
}).pipe(map$1(response => response.selectors[requestId]));
|
|
2224
|
+
}
|
|
2225
|
+
subscribe$(selectorName, inputData = {}, options) {
|
|
2226
|
+
const requestId = UUID.UUID();
|
|
2227
|
+
if (!this.subscriptions[requestId]) {
|
|
2228
|
+
const request = {
|
|
2229
|
+
selectors: {
|
|
2230
|
+
[requestId]: {
|
|
2231
|
+
apiName: selectorName,
|
|
2232
|
+
inputData,
|
|
2233
|
+
ownerId: this.ownerId,
|
|
2234
|
+
},
|
|
2235
|
+
},
|
|
2236
|
+
};
|
|
2237
|
+
this.subscriptions[requestId] = {
|
|
2238
|
+
request,
|
|
2239
|
+
data$: new BehaviorSubject(this.NOT_INITIALIZED),
|
|
2240
|
+
};
|
|
2241
|
+
if (!options?.cold) {
|
|
2242
|
+
this.execute$(request).subscribe();
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
return this.subscriptions[requestId].data$.pipe(filter$1(data => data != this.NOT_INITIALIZED), map$1(data => data), finalize(() => {
|
|
2246
|
+
if (!this.subscriptions[requestId].data$.observed) {
|
|
2247
|
+
delete this.subscriptions[requestId];
|
|
2248
|
+
}
|
|
2249
|
+
}));
|
|
2250
|
+
}
|
|
2251
|
+
saveConfiguration(quoteId, flow) {
|
|
2252
|
+
if (this.isStatefulConfiguration) {
|
|
2253
|
+
return this.flowStateApiService
|
|
2254
|
+
.saveConfiguration(this.flowStateService.stateId ?? '', this.stateId ?? '')
|
|
2255
|
+
.pipe(switchMap(r => this.flowStateService.executeRequest$({}, true).pipe(map$1(() => r))));
|
|
2256
|
+
}
|
|
2257
|
+
else {
|
|
2258
|
+
if (!flow) {
|
|
2259
|
+
if (!quoteId) {
|
|
2260
|
+
return of({ quoteId: '' });
|
|
2261
|
+
}
|
|
2262
|
+
const rootLineItem = this.configurationService.getSnapshot();
|
|
2263
|
+
const currentState = rootLineItem ? [rootLineItem] : [];
|
|
2264
|
+
return this.quoteApiService
|
|
2265
|
+
.getQuoteDraft(quoteId)
|
|
2266
|
+
.pipe(switchMap(quoteDraft => this.quoteApiService.upsertQuote({ ...quoteDraft, currentState })));
|
|
2267
|
+
}
|
|
2268
|
+
else {
|
|
2269
|
+
const quoteDraft = this.quoteDraftService.quoteDraft;
|
|
2270
|
+
const lineItem = this.configurationService.getSnapshot();
|
|
2271
|
+
if (!quoteDraft || !lineItem) {
|
|
2272
|
+
return of({ quoteId: '' });
|
|
2273
|
+
}
|
|
2274
|
+
const isNewLineItem = quoteDraft.currentState.every(li => li.id !== lineItem.id);
|
|
2275
|
+
let updatedState;
|
|
2276
|
+
if (isNewLineItem) {
|
|
2277
|
+
updatedState = [...quoteDraft.currentState, lineItem];
|
|
2278
|
+
}
|
|
2279
|
+
else {
|
|
2280
|
+
updatedState = quoteDraft.currentState.map(li => (li.id === lineItem.id ? lineItem : li));
|
|
2281
|
+
}
|
|
2282
|
+
return this.flowConfigurationService
|
|
2283
|
+
.calculate$({ ...quoteDraft, currentState: updatedState })
|
|
2284
|
+
.pipe(map$1(() => ({ quoteId: '' })));
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
cancelConfiguration() {
|
|
2289
|
+
if (!this.isInitialized$.value) {
|
|
2290
|
+
return of(undefined);
|
|
2291
|
+
}
|
|
2292
|
+
this.isInitialized$.next(false);
|
|
2293
|
+
if (!this.isInitialized$.value || !this.isStatefulConfiguration) {
|
|
2294
|
+
return of(undefined);
|
|
2295
|
+
}
|
|
2296
|
+
return this.flowStateApiService.cancelConfiguration(this.flowStateService.stateId ?? '', this.stateId ?? '');
|
|
2190
2297
|
}
|
|
2191
2298
|
get isStatefulConfiguration() {
|
|
2192
|
-
return this.
|
|
2299
|
+
return this.flowInfoService.flow?.properties.stateful ?? false;
|
|
2300
|
+
}
|
|
2301
|
+
initStateful$() {
|
|
2302
|
+
this.ownerId = this.configurationRuntimeService.runtimeContext?.uiDefinitionContainer?.id ?? '';
|
|
2303
|
+
const lineItemId = this.configurationRuntimeService.runtimeContext?.properties?.lineItemId;
|
|
2304
|
+
if (!this.flowStateService.stateId) {
|
|
2305
|
+
return of(undefined);
|
|
2306
|
+
}
|
|
2307
|
+
const container = this.configurationRuntimeService.runtimeContext?.uiDefinitionContainer;
|
|
2308
|
+
const lineItem = this.configurationService.generateLineItem();
|
|
2309
|
+
let request$;
|
|
2310
|
+
if (!lineItemId) {
|
|
2311
|
+
request$ = this.flowStateApiService.newConfiguration(this.flowStateService.stateId, {
|
|
2312
|
+
lineItem,
|
|
2313
|
+
actionsOverride: container?.actions?.map(processor => ({ ...processor, ownerId: this.ownerId })),
|
|
2314
|
+
selectorsOverride: container?.selectors?.map(processor => ({ ...processor, ownerId: this.ownerId })),
|
|
2315
|
+
});
|
|
2316
|
+
}
|
|
2317
|
+
else {
|
|
2318
|
+
request$ = this.flowStateApiService.startConfiguration(this.flowStateService.stateId, {
|
|
2319
|
+
lineItemId,
|
|
2320
|
+
actionsOverride: container?.actions?.map(processor => ({ ...processor, ownerId: this.ownerId })),
|
|
2321
|
+
selectorsOverride: container?.selectors?.map(processor => ({ ...processor, ownerId: this.ownerId })),
|
|
2322
|
+
});
|
|
2323
|
+
}
|
|
2324
|
+
return request$.pipe(map$1(r => {
|
|
2325
|
+
this.stateId = r.stateId;
|
|
2326
|
+
return undefined;
|
|
2327
|
+
}));
|
|
2328
|
+
}
|
|
2329
|
+
initStateless$() {
|
|
2330
|
+
return this.configurationService.configure().pipe(map$1(() => undefined));
|
|
2193
2331
|
}
|
|
2194
2332
|
executeStateless$(request) {
|
|
2195
2333
|
return of(undefined).pipe(switchMap(() => {
|
|
@@ -2203,52 +2341,46 @@ class ConfigurationState {
|
|
|
2203
2341
|
configurationRequest = this.executeActionScript(configurationRequest, action) ?? configurationRequest;
|
|
2204
2342
|
});
|
|
2205
2343
|
return this.configurationService.configureRequest$(configurationRequest);
|
|
2206
|
-
}),
|
|
2207
|
-
if (!request.selectors) {
|
|
2208
|
-
return;
|
|
2209
|
-
}
|
|
2344
|
+
}), map$1(() => {
|
|
2210
2345
|
// Run selectors and apply them to the state
|
|
2211
|
-
const finalConfigurationRequest = this.configurationService.generateRequest();
|
|
2212
|
-
const selectorsResult = EntityUtil.entries(request.selectors).reduce((
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2346
|
+
const finalConfigurationRequest = this.configurationService.generateRequest(false);
|
|
2347
|
+
const selectorsResult = EntityUtil.entries(request.selectors ?? {}).reduce((result, [key, selector]) => {
|
|
2348
|
+
try {
|
|
2349
|
+
result.selectors[key] = {
|
|
2350
|
+
success: true,
|
|
2351
|
+
result: this.executeSelectorScript(finalConfigurationRequest, selector),
|
|
2352
|
+
};
|
|
2353
|
+
}
|
|
2354
|
+
catch (e) {
|
|
2355
|
+
result.selectors[key] = {
|
|
2356
|
+
success: false,
|
|
2357
|
+
errorMessage: String(e),
|
|
2358
|
+
};
|
|
2359
|
+
}
|
|
2360
|
+
return result;
|
|
2361
|
+
}, { stateId: '', selectors: {} });
|
|
2362
|
+
return selectorsResult;
|
|
2363
|
+
}));
|
|
2221
2364
|
}
|
|
2222
2365
|
executeStateful$(request) {
|
|
2223
|
-
if (!this.stateId) {
|
|
2224
|
-
return of(
|
|
2366
|
+
if (!this.flowStateService.stateId || !this.stateId) {
|
|
2367
|
+
return of();
|
|
2225
2368
|
}
|
|
2226
|
-
return this.
|
|
2369
|
+
return this.flowStateApiService.executeConfiguration(this.flowStateService.stateId, this.stateId, request).pipe(tap$1(response => {
|
|
2227
2370
|
this.stateId = response.stateId;
|
|
2228
|
-
|
|
2229
|
-
EntityUtil.entries(response.selectors).forEach(([key, value]) => {
|
|
2230
|
-
if (!value.success) {
|
|
2231
|
-
if (!this.runtimeService.uiDefinitionProperties.suppressToastMessages) {
|
|
2232
|
-
this.toastService.add({ summary: value.errorMessage, severity: ToastType.error });
|
|
2233
|
-
}
|
|
2234
|
-
return;
|
|
2235
|
-
}
|
|
2236
|
-
updatedState[key] = value.result;
|
|
2237
|
-
});
|
|
2238
|
-
this.stateSubj$.next(updatedState);
|
|
2239
|
-
}), map$1(() => undefined));
|
|
2371
|
+
}));
|
|
2240
2372
|
}
|
|
2241
2373
|
executeActionScript(request, processor) {
|
|
2242
|
-
const { actions } = this.
|
|
2243
|
-
const script = actions?.find(action => action.apiName === processor.
|
|
2374
|
+
const { actions } = this.configurationRuntimeService.runtimeContext?.uiDefinitionContainer ?? {};
|
|
2375
|
+
const script = actions?.find(action => action.apiName === processor.apiName)?.script;
|
|
2244
2376
|
if (!script) {
|
|
2245
|
-
return
|
|
2377
|
+
return request;
|
|
2246
2378
|
}
|
|
2247
2379
|
return this.executeProcessorScript(request, script, processor.inputData);
|
|
2248
2380
|
}
|
|
2249
2381
|
executeSelectorScript(request, processor) {
|
|
2250
|
-
const { selectors } = this.
|
|
2251
|
-
const script = selectors?.find(selector => selector.apiName === processor.
|
|
2382
|
+
const { selectors } = this.configurationRuntimeService.runtimeContext?.uiDefinitionContainer ?? {};
|
|
2383
|
+
const script = selectors?.find(selector => selector.apiName === processor.apiName)?.script;
|
|
2252
2384
|
if (!script) {
|
|
2253
2385
|
return null;
|
|
2254
2386
|
}
|
|
@@ -2261,38 +2393,22 @@ class ConfigurationState {
|
|
|
2261
2393
|
});
|
|
2262
2394
|
}
|
|
2263
2395
|
}
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
|
2396
|
+
ConfigurationStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationStateService, deps: [{ token: ConfigurationRuntimeService }, { token: ConfigurationService }, { token: QuoteDraftService }, { token: i6.ToastService }, { token: FlowStateService }, { token: FlowInfoService }, { token: FlowConfigurationService }, { token: i1.FlowStateApiService }, { token: i1.QuoteApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2397
|
+
ConfigurationStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationStateService });
|
|
2398
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationStateService, decorators: [{
|
|
2267
2399
|
type: Injectable
|
|
2268
|
-
}], ctorParameters: function () { return [{ type:
|
|
2400
|
+
}], ctorParameters: function () { return [{ type: ConfigurationRuntimeService }, { type: ConfigurationService }, { type: QuoteDraftService }, { type: i6.ToastService }, { type: FlowStateService }, { type: FlowInfoService }, { type: FlowConfigurationService }, { type: i1.FlowStateApiService }, { type: i1.QuoteApiService }]; } });
|
|
2269
2401
|
|
|
2270
2402
|
class ConfigurationModule {
|
|
2271
2403
|
}
|
|
2272
2404
|
ConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2273
|
-
ConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, imports: [ConfirmationDialogModule] });
|
|
2274
|
-
ConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, providers: [
|
|
2275
|
-
ContextApiService,
|
|
2276
|
-
ProductModelApiService,
|
|
2277
|
-
ConfigurationApiService,
|
|
2278
|
-
ConfigurationRuntimeService,
|
|
2279
|
-
RuntimeContextService,
|
|
2280
|
-
ConfigurationService,
|
|
2281
|
-
ConfigurationState,
|
|
2282
|
-
], imports: [ConfirmationDialogModule] });
|
|
2405
|
+
ConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, imports: [ConfirmationDialogModule, ApiModule] });
|
|
2406
|
+
ConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, providers: [ConfigurationRuntimeService, RuntimeContextService, ConfigurationService, ConfigurationStateService], imports: [ConfirmationDialogModule, ApiModule] });
|
|
2283
2407
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, decorators: [{
|
|
2284
2408
|
type: NgModule,
|
|
2285
2409
|
args: [{
|
|
2286
|
-
imports: [ConfirmationDialogModule],
|
|
2287
|
-
providers: [
|
|
2288
|
-
ContextApiService,
|
|
2289
|
-
ProductModelApiService,
|
|
2290
|
-
ConfigurationApiService,
|
|
2291
|
-
ConfigurationRuntimeService,
|
|
2292
|
-
RuntimeContextService,
|
|
2293
|
-
ConfigurationService,
|
|
2294
|
-
ConfigurationState,
|
|
2295
|
-
],
|
|
2410
|
+
imports: [ConfirmationDialogModule, ApiModule],
|
|
2411
|
+
providers: [ConfigurationRuntimeService, RuntimeContextService, ConfigurationService, ConfigurationStateService],
|
|
2296
2412
|
}]
|
|
2297
2413
|
}] });
|
|
2298
2414
|
|
|
@@ -2309,8 +2425,15 @@ class SdkCoreModule {
|
|
|
2309
2425
|
SdkCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2310
2426
|
SdkCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, imports: [ConfigurationModule, FlowConfigurationModule] });
|
|
2311
2427
|
SdkCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, providers: [
|
|
2428
|
+
ContextService,
|
|
2429
|
+
FlowInfoService,
|
|
2430
|
+
QuoteDraftService,
|
|
2431
|
+
ProductImagesService,
|
|
2312
2432
|
IntegrationState,
|
|
2313
2433
|
FlowStateService,
|
|
2434
|
+
FlowStateConfigurationService,
|
|
2435
|
+
MetricsCalculationService,
|
|
2436
|
+
RuntimeSettingsService,
|
|
2314
2437
|
{
|
|
2315
2438
|
provide: FORMATTING_SETTINGS_TOKEN,
|
|
2316
2439
|
useExisting: RuntimeSettingsService,
|
|
@@ -2321,8 +2444,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2321
2444
|
args: [{
|
|
2322
2445
|
imports: [ConfigurationModule, FlowConfigurationModule],
|
|
2323
2446
|
providers: [
|
|
2447
|
+
ContextService,
|
|
2448
|
+
FlowInfoService,
|
|
2449
|
+
QuoteDraftService,
|
|
2450
|
+
ProductImagesService,
|
|
2324
2451
|
IntegrationState,
|
|
2325
2452
|
FlowStateService,
|
|
2453
|
+
FlowStateConfigurationService,
|
|
2454
|
+
MetricsCalculationService,
|
|
2455
|
+
RuntimeSettingsService,
|
|
2326
2456
|
{
|
|
2327
2457
|
provide: FORMATTING_SETTINGS_TOKEN,
|
|
2328
2458
|
useExisting: RuntimeSettingsService,
|
|
@@ -2497,5 +2627,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2497
2627
|
* Generated bundle index. Do not edit.
|
|
2498
2628
|
*/
|
|
2499
2629
|
|
|
2500
|
-
export { ActionCodePipe, CalendarDirective, ConfigurationRuntimeService, ConfigurationService,
|
|
2630
|
+
export { ActionCodePipe, CalendarDirective, ConfigurationRuntimeService, ConfigurationService, ConfigurationStateService, ContextService, DEFAULT_FORMATTING_SETTINGS, DatePipe, FLOW_CUSTOMIZATION, FORMATTING_SETTINGS_TOKEN, FlowConfigurationModule, FlowConfigurationService, FlowInfoService, FlowStateConfigurationService, FlowStateService, FlowUpdateService, IntegrationState, LineItemWorker, MetricsCalculationService, NumberPipe, PricePipe, ProductImagesService, QuoteDraftService, RuntimeMode, RuntimeOperation, RuntimeSettingsService, RuntimeStep, SdkCoreModule, SdkDirectivesModule, SdkPipesModule, UI_DEFINITION_VERSION, calculateCardinalityVariables, extractMetadata, filterOutTechnicalAttributes, findLineItem, findLineItemWithComparator, generateConfigurationLineItem, generateLineItem, generateModifiedAssetsMap, getAttributeValue, getAttributes, getDefaultLineItem, getGuidedSellingConfigurationRequest, getOriginParent, getRecommendedPrices, insertLineItem, isLineItemModified, isTechnicalAttribute, lineItem_utils as lineItemUtils, mapAttributes, multiplyLineItems, patchAttributes, recalculateCardinalityVariables, removeLineItem, replaceLineItem, upsertAttributes };
|
|
2501
2631
|
//# sourceMappingURL=veloceapps-sdk-core.mjs.map
|