@veloceapps/sdk 8.0.0-66 → 8.0.0-68
Sign up to get free protection for your applications and to get access to all the features.
- package/core/modules/configuration/services/configuration.service.d.ts +3 -1
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +16 -5
- package/fesm2015/veloceapps-sdk-core.mjs +109 -100
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +108 -99
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/package.json +1 -1
@@ -6,6 +6,7 @@ import { DialogService } from 'primeng/dynamicdialog';
|
|
6
6
|
import { Observable } from 'rxjs';
|
7
7
|
import { ContextService } from '../../../services/context.service';
|
8
8
|
import { QuoteDraftService } from '../../../services/quote-draft.service';
|
9
|
+
import { RuntimeSettingsService } from '../../../services/runtime-settings.service';
|
9
10
|
import { RuntimeContext } from '../../../types';
|
10
11
|
import { ExternalConfigurationProps, GuidedSellingSubmitData } from '../types/configuration.types';
|
11
12
|
import { ConfigurationRuntimeService } from './configuration-runtime.service';
|
@@ -17,6 +18,7 @@ export declare class ConfigurationService {
|
|
17
18
|
private configurationApiService;
|
18
19
|
private messageService;
|
19
20
|
private dialogService;
|
21
|
+
private runtimeSettings;
|
20
22
|
private mode;
|
21
23
|
private configurableRamp;
|
22
24
|
private lineItem;
|
@@ -26,7 +28,7 @@ export declare class ConfigurationService {
|
|
26
28
|
private isLoadingSubj$;
|
27
29
|
isLoading$: Observable<boolean>;
|
28
30
|
hasUnsavedChanges: boolean;
|
29
|
-
constructor(quoteDraftService: QuoteDraftService, runtimeService: ConfigurationRuntimeService, contextService: ContextService, configurationApiService: ConfigurationApiService, messageService: MessageService, dialogService: DialogService);
|
31
|
+
constructor(quoteDraftService: QuoteDraftService, runtimeService: ConfigurationRuntimeService, contextService: ContextService, configurationApiService: ConfigurationApiService, messageService: MessageService, dialogService: DialogService, runtimeSettings: RuntimeSettingsService);
|
30
32
|
reset(): void;
|
31
33
|
patch$(lineItem: LineItem, options?: PatchLineItemOptions): Observable<LineItem>;
|
32
34
|
patch(lineItem: LineItem, options?: PatchLineItemOptions): void;
|
@@ -10,6 +10,7 @@ import { BehaviorSubject, shareReplay, throwError } from 'rxjs';
|
|
10
10
|
import { catchError, finalize, first, map, switchMap, tap } from 'rxjs/operators';
|
11
11
|
import { ContextService } from '../../../services/context.service';
|
12
12
|
import { QuoteDraftService } from '../../../services/quote-draft.service';
|
13
|
+
import { RuntimeSettingsService } from '../../../services/runtime-settings.service';
|
13
14
|
import { RuntimeStep } from '../../../types';
|
14
15
|
import { LineItemWorker } from '../../../utils/line-item.worker';
|
15
16
|
import { getDefaultLineItem, getGuidedSellingConfigurationRequest } from '../helpers';
|
@@ -21,14 +22,16 @@ import * as i3 from "../../../services/context.service";
|
|
21
22
|
import * as i4 from "@veloceapps/api";
|
22
23
|
import * as i5 from "primeng/api";
|
23
24
|
import * as i6 from "primeng/dynamicdialog";
|
25
|
+
import * as i7 from "../../../services/runtime-settings.service";
|
24
26
|
export class ConfigurationService {
|
25
|
-
constructor(quoteDraftService, runtimeService, contextService, configurationApiService, messageService, dialogService) {
|
27
|
+
constructor(quoteDraftService, runtimeService, contextService, configurationApiService, messageService, dialogService, runtimeSettings) {
|
26
28
|
this.quoteDraftService = quoteDraftService;
|
27
29
|
this.runtimeService = runtimeService;
|
28
30
|
this.contextService = contextService;
|
29
31
|
this.configurationApiService = configurationApiService;
|
30
32
|
this.messageService = messageService;
|
31
33
|
this.dialogService = dialogService;
|
34
|
+
this.runtimeSettings = runtimeSettings;
|
32
35
|
this.mode = ConfigurationMode.SEARCH;
|
33
36
|
this.lineItem = new BehaviorSubject(undefined);
|
34
37
|
this.charges = new BehaviorSubject({});
|
@@ -125,8 +128,16 @@ export class ConfigurationService {
|
|
125
128
|
const uiDefinitionProperties = this.getUIDefinitionProperties();
|
126
129
|
const mainPricingEnabled = runtimeContext.properties?.PricingEnabled;
|
127
130
|
const pricingEnabled = mainPricingEnabled ? mainPricingEnabled === 'true' : uiDefinitionProperties.pricingEnabled;
|
131
|
+
const customPriceApi = this.runtimeSettings.getConfigurationSettings()['CUSTOM_PRICE_API'];
|
128
132
|
this.isLoadingSubj$.next(true);
|
129
|
-
|
133
|
+
const configure$ = pricingEnabled && customPriceApi
|
134
|
+
? this.configurationApiService.customConfigurePrice({ url: customPriceApi, configurationRequest, runtimeModel })
|
135
|
+
: this.configurationApiService.configureLineItem({
|
136
|
+
configurationRequest,
|
137
|
+
runtimeModel,
|
138
|
+
pricingEnabled,
|
139
|
+
});
|
140
|
+
return configure$.pipe(tap(({ lineItem, context, charges, pricePlans, deletedLineItems, procedureContext }) => {
|
130
141
|
this.contextService.update(context ?? {});
|
131
142
|
this.charges.next(charges ?? {});
|
132
143
|
this.pricePlans.next(pricePlans ?? {});
|
@@ -223,9 +234,9 @@ export class ConfigurationService {
|
|
223
234
|
return this.quoteDraftService.quoteDraft?.initialState.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);
|
224
235
|
}
|
225
236
|
}
|
226
|
-
ConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService, deps: [{ token: i1.QuoteDraftService }, { token: i2.ConfigurationRuntimeService }, { token: i3.ContextService }, { token: i4.ConfigurationApiService }, { token: i5.MessageService }, { token: i6.DialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
237
|
+
ConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService, deps: [{ token: i1.QuoteDraftService }, { token: i2.ConfigurationRuntimeService }, { token: i3.ContextService }, { token: i4.ConfigurationApiService }, { token: i5.MessageService }, { token: i6.DialogService }, { token: i7.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
227
238
|
ConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService });
|
228
239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService, decorators: [{
|
229
240
|
type: Injectable
|
230
|
-
}], ctorParameters: function () { return [{ type: i1.QuoteDraftService }, { type: i2.ConfigurationRuntimeService }, { type: i3.ContextService }, { type: i4.ConfigurationApiService }, { type: i5.MessageService }, { type: i6.DialogService }]; } });
|
231
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbi5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zZGsvY29yZS9tb2R1bGVzL2NvbmZpZ3VyYXRpb24vc2VydmljZXMvY29uZmlndXJhdGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3pELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDMUQsT0FBTyxFQUFFLHFCQUFxQixFQUFzQixTQUFTLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUM5RixPQUFPLEVBSUwsaUJBQWlCLEVBRWpCLDRCQUE0QixFQVE1Qix5QkFBeUIsR0FDMUIsTUFBTSxrQkFBa0IsQ0FBQztBQUMxQixPQUFPLEVBQWMsU0FBUyxFQUFFLE1BQU0sUUFBUSxDQUFDO0FBQy9DLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDN0MsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ3RELE9BQU8sRUFBRSxlQUFlLEVBQWMsV0FBVyxFQUFFLFVBQVUsRUFBRSxNQU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ZS5zdWJzY3JpYmUocmVzdWx0ID0+IHtcbiAgICAgICAgaWYgKCFyZXN1bHQpIHtcbiAgICAgICAgICBjb25zdCBjb250ZXh0ID0gdGhpcy5jb250ZXh0U2VydmljZS5yZXNvbHZlKCk7XG4gICAgICAgICAgd2luZG93WydWRUxPX0JBQ0tfRk4nXS5hcHBseShudWxsLCBbY29udGV4dC5oZWFkZXJJZF0pO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgfVxuXG4gIHByaXZhdGUgZ2V0QXNzZXQoKTogTGluZUl0ZW0gfCB1bmRlZmluZWQge1xuICAgIGNvbnN0IGxpbmVJdGVtID0gdGhpcy5jb25maWd1cmFibGVSYW1wO1xuICAgIGlmICghbGluZUl0ZW0pIHtcbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICByZXR1cm4gdGhpcy5xdW90ZURyYWZ0U2VydmljZS5xdW90ZURyYWZ0Py5pbml0aWFsU3RhdGUuZmluZChcbiAgICAgIGEgPT4gYS5pZCA9PT0gbGluZUl0ZW0ub3Blbk9yZGVyTGluZUl0ZW1JZCB8fCBhLmlkID09PSBsaW5lSXRlbS5hc3NldElkLFxuICAgICk7XG4gIH1cbn1cbiJdfQ==
|
241
|
+
}], ctorParameters: function () { return [{ type: i1.QuoteDraftService }, { type: i2.ConfigurationRuntimeService }, { type: i3.ContextService }, { type: i4.ConfigurationApiService }, { type: i5.MessageService }, { type: i6.DialogService }, { type: i7.RuntimeSettingsService }]; } });
|
242
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbi5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zZGsvY29yZS9tb2R1bGVzL2NvbmZpZ3VyYXRpb24vc2VydmljZXMvY29uZmlndXJhdGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcG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ZURyYWZ0U2VydmljZS5xdW90ZURyYWZ0Py5pbml0aWFsU3RhdGUuZmluZChcbiAgICAgIGEgPT4gYS5pZCA9PT0gbGluZUl0ZW0ub3Blbk9yZGVyTGluZUl0ZW1JZCB8fCBhLmlkID09PSBsaW5lSXRlbS5hc3NldElkLFxuICAgICk7XG4gIH1cbn1cbiJdfQ==
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
2
|
import { InjectionToken, Injectable, NgModule, inject, Directive, Input, LOCALE_ID, Pipe } from '@angular/core';
|
3
|
-
import { UUID, ConfigurationContextMode, ConfigurationContext, ChargeGroupUtils,
|
4
|
-
import { BehaviorSubject, zip, noop, combineLatest,
|
3
|
+
import { UUID, ConfigurationContextMode, ConfigurationContext, ChargeGroupUtils, 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, getUIDefinitionProperties, RuntimeModel, isLegacyUIDefinition, SalesforceIdUtils, EntityUtil, formatNumber } from '@veloceapps/core';
|
4
|
+
import { BehaviorSubject, zip, noop, combineLatest, map as map$2, tap as tap$1, throwError, shareReplay as shareReplay$1, of, switchMap as switchMap$1, catchError as catchError$1, Subject, take as take$1, distinctUntilChanged } from 'rxjs';
|
5
5
|
import { filter, tap, map, switchMap, skip, take, shareReplay, catchError, finalize, first } from 'rxjs/operators';
|
6
6
|
import * as i1 from '@veloceapps/api';
|
7
7
|
import { PriceApiService, ContextApiService, ProductModelApiService, ConfigurationApiService } from '@veloceapps/api';
|
@@ -726,14 +726,109 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
726
726
|
type: Injectable
|
727
727
|
}] });
|
728
728
|
|
729
|
+
class RuntimeSettingsService {
|
730
|
+
constructor(configurationSettingsApiService) {
|
731
|
+
this.configurationSettingsApiService = configurationSettingsApiService;
|
732
|
+
this.configurationSettings$ = new BehaviorSubject({});
|
733
|
+
this.currencySettings$ = new BehaviorSubject({
|
734
|
+
iso: DEFAULT_CURRENCY_ISO_CODE,
|
735
|
+
symbol: DEFAULT_CURRENCY_SYMBOL,
|
736
|
+
});
|
737
|
+
this.getCurrencySymbol = (locale, currency) => {
|
738
|
+
return (0)
|
739
|
+
.toLocaleString(locale, { style: 'currency', currency, minimumFractionDigits: 0, maximumFractionDigits: 0 })
|
740
|
+
.replace(/\d/g, '')
|
741
|
+
.trim();
|
742
|
+
};
|
743
|
+
}
|
744
|
+
create() {
|
745
|
+
return this.configurationSettingsApiService.fetchSettings().pipe(map$2(settings => this.parseConfigurationSettings(settings)), tap$1(configurationSettings => {
|
746
|
+
this.configurationSettings$.next(configurationSettings);
|
747
|
+
this.formattingSettings = this.getFormattingSettings();
|
748
|
+
}), map$2(() => undefined));
|
749
|
+
}
|
750
|
+
initCurrency(iso) {
|
751
|
+
if (iso) {
|
752
|
+
const symbol = this.getCurrencySymbol('en-US', iso);
|
753
|
+
this.currencySettings$.next({ iso, symbol });
|
754
|
+
}
|
755
|
+
}
|
756
|
+
getFormattingSettings() {
|
757
|
+
var _a, _b;
|
758
|
+
if (this.formattingSettings) {
|
759
|
+
return this.formattingSettings;
|
760
|
+
}
|
761
|
+
const shoppingCartSettings = (_a = this.getConfigurationSettings()['shopping-cart']) === null || _a === void 0 ? void 0 : _a.reduce((acc, setting) => {
|
762
|
+
return Object.assign(Object.assign({}, acc), { [setting.id]: setting.properties });
|
763
|
+
}, {});
|
764
|
+
const currencySettings = this.getCurrencySettings();
|
765
|
+
const dateFormat = (validateDateFormat((_b = shoppingCartSettings === null || shoppingCartSettings === void 0 ? void 0 : shoppingCartSettings.DATE_FORMAT) !== null && _b !== void 0 ? _b : '') && (shoppingCartSettings === null || shoppingCartSettings === void 0 ? void 0 : shoppingCartSettings.DATE_FORMAT)) ||
|
766
|
+
DEFAULT_DATE_FORMAT;
|
767
|
+
const decimalSeparator = shoppingCartSettings === null || shoppingCartSettings === void 0 ? void 0 : shoppingCartSettings.DECIMAL_SEPARATOR;
|
768
|
+
const thousandsSeparator = shoppingCartSettings === null || shoppingCartSettings === void 0 ? void 0 : shoppingCartSettings.THOUSANDS_SEPARATOR;
|
769
|
+
// the number of decimal places can be 0
|
770
|
+
const priceScale = shoppingCartSettings === null || shoppingCartSettings === void 0 ? void 0 : shoppingCartSettings.PRICE_SCALE;
|
771
|
+
const decimalsCount = priceScale !== null && priceScale !== '' && !isNaN(Number(priceScale)) && Number(priceScale) >= 0
|
772
|
+
? Number(priceScale)
|
773
|
+
: DEFAULT_DECIMALS_COUNT;
|
774
|
+
const actionCodeSettings = shoppingCartSettings === null || shoppingCartSettings === void 0 ? void 0 : shoppingCartSettings.STATUS_LABEL;
|
775
|
+
return {
|
776
|
+
currencySymbol: currencySettings.symbol,
|
777
|
+
dateFormats: getSupportedDateFormats(dateFormat),
|
778
|
+
decimalsCount,
|
779
|
+
decimalSeparator: decimalSeparator !== undefined && ['.', ','].includes(decimalSeparator)
|
780
|
+
? decimalSeparator
|
781
|
+
: DEFAULT_DECIMAL_SEPARATOR,
|
782
|
+
// thousands separator can be a blank value, so it can also be null
|
783
|
+
thousandsSeparator: thousandsSeparator !== undefined && ['.', ',', '', null].includes(thousandsSeparator)
|
784
|
+
? thousandsSeparator || ''
|
785
|
+
: DEFAULT_THOUSANDS_SEPARATOR,
|
786
|
+
actionCodeLabels: (actionCodeSettings === null || actionCodeSettings === void 0 ? void 0 : actionCodeSettings.length)
|
787
|
+
? actionCodeSettings.reduce((result, setting) => (Object.assign(Object.assign({}, result), { [setting.status_label]: setting.custom_label })), {})
|
788
|
+
: DEFAULT_ACTION_CODE_LABELS,
|
789
|
+
};
|
790
|
+
}
|
791
|
+
getConfigurationSettings() {
|
792
|
+
return this.configurationSettings$.value;
|
793
|
+
}
|
794
|
+
getCurrencySettings() {
|
795
|
+
return this.currencySettings$.value;
|
796
|
+
}
|
797
|
+
parseConfigurationSettings(settings) {
|
798
|
+
return settings.reduce((acc, setting) => {
|
799
|
+
switch (setting.key) {
|
800
|
+
case 'shopping-cart':
|
801
|
+
acc['shopping-cart'] = parseJsonSafely(setting.value, []);
|
802
|
+
break;
|
803
|
+
case 'navigation':
|
804
|
+
acc.navigation = parseJsonSafely(setting.value, {});
|
805
|
+
break;
|
806
|
+
case 'flows':
|
807
|
+
acc.flows = parseJsonSafely(setting.value, []);
|
808
|
+
break;
|
809
|
+
default:
|
810
|
+
acc[setting.key] = setting.value;
|
811
|
+
}
|
812
|
+
return acc;
|
813
|
+
}, {});
|
814
|
+
}
|
815
|
+
}
|
816
|
+
RuntimeSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, deps: [{ token: i1.ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
817
|
+
RuntimeSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, providedIn: 'root' });
|
818
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, decorators: [{
|
819
|
+
type: Injectable,
|
820
|
+
args: [{ providedIn: 'root' }]
|
821
|
+
}], ctorParameters: function () { return [{ type: i1.ConfigurationSettingsApiService }]; } });
|
822
|
+
|
729
823
|
class ConfigurationService {
|
730
|
-
constructor(quoteDraftService, runtimeService, contextService, configurationApiService, messageService, dialogService) {
|
824
|
+
constructor(quoteDraftService, runtimeService, contextService, configurationApiService, messageService, dialogService, runtimeSettings) {
|
731
825
|
this.quoteDraftService = quoteDraftService;
|
732
826
|
this.runtimeService = runtimeService;
|
733
827
|
this.contextService = contextService;
|
734
828
|
this.configurationApiService = configurationApiService;
|
735
829
|
this.messageService = messageService;
|
736
830
|
this.dialogService = dialogService;
|
831
|
+
this.runtimeSettings = runtimeSettings;
|
737
832
|
this.mode = ConfigurationMode.SEARCH;
|
738
833
|
this.lineItem = new BehaviorSubject(undefined);
|
739
834
|
this.charges = new BehaviorSubject({});
|
@@ -831,8 +926,16 @@ class ConfigurationService {
|
|
831
926
|
const uiDefinitionProperties = this.getUIDefinitionProperties();
|
832
927
|
const mainPricingEnabled = (_a = runtimeContext.properties) === null || _a === void 0 ? void 0 : _a.PricingEnabled;
|
833
928
|
const pricingEnabled = mainPricingEnabled ? mainPricingEnabled === 'true' : uiDefinitionProperties.pricingEnabled;
|
929
|
+
const customPriceApi = this.runtimeSettings.getConfigurationSettings()['CUSTOM_PRICE_API'];
|
834
930
|
this.isLoadingSubj$.next(true);
|
835
|
-
|
931
|
+
const configure$ = pricingEnabled && customPriceApi
|
932
|
+
? this.configurationApiService.customConfigurePrice({ url: customPriceApi, configurationRequest, runtimeModel })
|
933
|
+
: this.configurationApiService.configureLineItem({
|
934
|
+
configurationRequest,
|
935
|
+
runtimeModel,
|
936
|
+
pricingEnabled,
|
937
|
+
});
|
938
|
+
return configure$.pipe(tap(({ lineItem, context, charges, pricePlans, deletedLineItems, procedureContext }) => {
|
836
939
|
this.contextService.update(context !== null && context !== void 0 ? context : {});
|
837
940
|
this.charges.next(charges !== null && charges !== void 0 ? charges : {});
|
838
941
|
this.pricePlans.next(pricePlans !== null && pricePlans !== void 0 ? pricePlans : {});
|
@@ -929,11 +1032,11 @@ class ConfigurationService {
|
|
929
1032
|
return (_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.initialState.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);
|
930
1033
|
}
|
931
1034
|
}
|
932
|
-
ConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService, deps: [{ token: QuoteDraftService }, { token: ConfigurationRuntimeService }, { token: ContextService }, { token: i1.ConfigurationApiService }, { token: i5.MessageService }, { token: i6.DialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1035
|
+
ConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService, deps: [{ token: QuoteDraftService }, { token: ConfigurationRuntimeService }, { token: ContextService }, { token: i1.ConfigurationApiService }, { token: i5.MessageService }, { token: i6.DialogService }, { token: RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
933
1036
|
ConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService });
|
934
1037
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService, decorators: [{
|
935
1038
|
type: Injectable
|
936
|
-
}], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: ConfigurationRuntimeService }, { type: ContextService }, { type: i1.ConfigurationApiService }, { type: i5.MessageService }, { type: i6.DialogService }]; } });
|
1039
|
+
}], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: ConfigurationRuntimeService }, { type: ContextService }, { type: i1.ConfigurationApiService }, { type: i5.MessageService }, { type: i6.DialogService }, { type: RuntimeSettingsService }]; } });
|
937
1040
|
|
938
1041
|
class FlowConfigurationService {
|
939
1042
|
constructor(proceduresApiService, contextService, quoteDraftService, updateService, configurationService) {
|
@@ -1176,100 +1279,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1176
1279
|
args: [{ providedIn: 'root' }]
|
1177
1280
|
}], ctorParameters: function () { return [{ type: i1.ProductApiService }]; } });
|
1178
1281
|
|
1179
|
-
class RuntimeSettingsService {
|
1180
|
-
constructor(configurationSettingsApiService) {
|
1181
|
-
this.configurationSettingsApiService = configurationSettingsApiService;
|
1182
|
-
this.configurationSettings$ = new BehaviorSubject({});
|
1183
|
-
this.currencySettings$ = new BehaviorSubject({
|
1184
|
-
iso: DEFAULT_CURRENCY_ISO_CODE,
|
1185
|
-
symbol: DEFAULT_CURRENCY_SYMBOL,
|
1186
|
-
});
|
1187
|
-
this.getCurrencySymbol = (locale, currency) => {
|
1188
|
-
return (0)
|
1189
|
-
.toLocaleString(locale, { style: 'currency', currency, minimumFractionDigits: 0, maximumFractionDigits: 0 })
|
1190
|
-
.replace(/\d/g, '')
|
1191
|
-
.trim();
|
1192
|
-
};
|
1193
|
-
}
|
1194
|
-
create() {
|
1195
|
-
return this.configurationSettingsApiService.fetchSettings().pipe(map$2(settings => this.parseConfigurationSettings(settings)), tap$1(configurationSettings => {
|
1196
|
-
this.configurationSettings$.next(configurationSettings);
|
1197
|
-
this.formattingSettings = this.getFormattingSettings();
|
1198
|
-
}), map$2(() => undefined));
|
1199
|
-
}
|
1200
|
-
initCurrency(iso) {
|
1201
|
-
if (iso) {
|
1202
|
-
const symbol = this.getCurrencySymbol('en-US', iso);
|
1203
|
-
this.currencySettings$.next({ iso, symbol });
|
1204
|
-
}
|
1205
|
-
}
|
1206
|
-
getFormattingSettings() {
|
1207
|
-
var _a, _b;
|
1208
|
-
if (this.formattingSettings) {
|
1209
|
-
return this.formattingSettings;
|
1210
|
-
}
|
1211
|
-
const shoppingCartSettings = (_a = this.getConfigurationSettings()['shopping-cart']) === null || _a === void 0 ? void 0 : _a.reduce((acc, setting) => {
|
1212
|
-
return Object.assign(Object.assign({}, acc), { [setting.id]: setting.properties });
|
1213
|
-
}, {});
|
1214
|
-
const currencySettings = this.getCurrencySettings();
|
1215
|
-
const dateFormat = (validateDateFormat((_b = shoppingCartSettings === null || shoppingCartSettings === void 0 ? void 0 : shoppingCartSettings.DATE_FORMAT) !== null && _b !== void 0 ? _b : '') && (shoppingCartSettings === null || shoppingCartSettings === void 0 ? void 0 : shoppingCartSettings.DATE_FORMAT)) ||
|
1216
|
-
DEFAULT_DATE_FORMAT;
|
1217
|
-
const decimalSeparator = shoppingCartSettings === null || shoppingCartSettings === void 0 ? void 0 : shoppingCartSettings.DECIMAL_SEPARATOR;
|
1218
|
-
const thousandsSeparator = shoppingCartSettings === null || shoppingCartSettings === void 0 ? void 0 : shoppingCartSettings.THOUSANDS_SEPARATOR;
|
1219
|
-
// the number of decimal places can be 0
|
1220
|
-
const priceScale = shoppingCartSettings === null || shoppingCartSettings === void 0 ? void 0 : shoppingCartSettings.PRICE_SCALE;
|
1221
|
-
const decimalsCount = priceScale !== null && priceScale !== '' && !isNaN(Number(priceScale)) && Number(priceScale) >= 0
|
1222
|
-
? Number(priceScale)
|
1223
|
-
: DEFAULT_DECIMALS_COUNT;
|
1224
|
-
const actionCodeSettings = shoppingCartSettings === null || shoppingCartSettings === void 0 ? void 0 : shoppingCartSettings.STATUS_LABEL;
|
1225
|
-
return {
|
1226
|
-
currencySymbol: currencySettings.symbol,
|
1227
|
-
dateFormats: getSupportedDateFormats(dateFormat),
|
1228
|
-
decimalsCount,
|
1229
|
-
decimalSeparator: decimalSeparator !== undefined && ['.', ','].includes(decimalSeparator)
|
1230
|
-
? decimalSeparator
|
1231
|
-
: DEFAULT_DECIMAL_SEPARATOR,
|
1232
|
-
// thousands separator can be a blank value, so it can also be null
|
1233
|
-
thousandsSeparator: thousandsSeparator !== undefined && ['.', ',', '', null].includes(thousandsSeparator)
|
1234
|
-
? thousandsSeparator || ''
|
1235
|
-
: DEFAULT_THOUSANDS_SEPARATOR,
|
1236
|
-
actionCodeLabels: (actionCodeSettings === null || actionCodeSettings === void 0 ? void 0 : actionCodeSettings.length)
|
1237
|
-
? actionCodeSettings.reduce((result, setting) => (Object.assign(Object.assign({}, result), { [setting.status_label]: setting.custom_label })), {})
|
1238
|
-
: DEFAULT_ACTION_CODE_LABELS,
|
1239
|
-
};
|
1240
|
-
}
|
1241
|
-
getConfigurationSettings() {
|
1242
|
-
return this.configurationSettings$.value;
|
1243
|
-
}
|
1244
|
-
getCurrencySettings() {
|
1245
|
-
return this.currencySettings$.value;
|
1246
|
-
}
|
1247
|
-
parseConfigurationSettings(settings) {
|
1248
|
-
return settings.reduce((acc, setting) => {
|
1249
|
-
switch (setting.key) {
|
1250
|
-
case 'shopping-cart':
|
1251
|
-
acc['shopping-cart'] = parseJsonSafely(setting.value, []);
|
1252
|
-
break;
|
1253
|
-
case 'navigation':
|
1254
|
-
acc.navigation = parseJsonSafely(setting.value, {});
|
1255
|
-
break;
|
1256
|
-
case 'flows':
|
1257
|
-
acc.flows = parseJsonSafely(setting.value, []);
|
1258
|
-
break;
|
1259
|
-
default:
|
1260
|
-
acc[setting.key] = setting.value;
|
1261
|
-
}
|
1262
|
-
return acc;
|
1263
|
-
}, {});
|
1264
|
-
}
|
1265
|
-
}
|
1266
|
-
RuntimeSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, deps: [{ token: i1.ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1267
|
-
RuntimeSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, providedIn: 'root' });
|
1268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, decorators: [{
|
1269
|
-
type: Injectable,
|
1270
|
-
args: [{ providedIn: 'root' }]
|
1271
|
-
}], ctorParameters: function () { return [{ type: i1.ConfigurationSettingsApiService }]; } });
|
1272
|
-
|
1273
1282
|
class RuntimeContextService {
|
1274
1283
|
constructor(configurationApiService) {
|
1275
1284
|
this.configurationApiService = configurationApiService;
|