@veloceapps/sdk 8.0.0-7 → 8.0.0-70

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. package/cms/utils/element.utils.d.ts +1 -0
  2. package/cms/vendor-map.d.ts +2 -1
  3. package/core/modules/configuration/services/configuration-runtime.service.d.ts +1 -1
  4. package/core/modules/configuration/services/configuration.service.d.ts +6 -1
  5. package/core/modules/flow-configuration/types/update.types.d.ts +1 -1
  6. package/core/pipes/action-code.pipe.d.ts +8 -0
  7. package/core/pipes/index.d.ts +1 -0
  8. package/core/pipes/pipes.module.d.ts +2 -1
  9. package/core/services/context.service.d.ts +1 -0
  10. package/core/types/formatting-settings.types.d.ts +2 -0
  11. package/esm2020/cms/components/element-children/element-children.component.mjs +3 -3
  12. package/esm2020/cms/components/element-children/element-children.module.mjs +4 -4
  13. package/esm2020/cms/components/element-drop-handle/element-drop-handle.component.mjs +3 -3
  14. package/esm2020/cms/components/element-drop-handle/element-drop-handle.module.mjs +4 -4
  15. package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +3 -3
  16. package/esm2020/cms/components/element-renderer/element-renderer.module.mjs +4 -4
  17. package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +5 -5
  18. package/esm2020/cms/components/plugin.component.mjs +3 -3
  19. package/esm2020/cms/components/preview/preview.component.mjs +3 -3
  20. package/esm2020/cms/components/preview/preview.module.mjs +4 -4
  21. package/esm2020/cms/directives/custom-template.directive.mjs +7 -7
  22. package/esm2020/cms/launcher.module.mjs +4 -4
  23. package/esm2020/cms/modules/federated/federated-host.directive.mjs +3 -3
  24. package/esm2020/cms/modules/federated/federated.component.mjs +3 -3
  25. package/esm2020/cms/modules/federated/federated.module.mjs +4 -4
  26. package/esm2020/cms/modules/migrations/migrations.module.mjs +4 -4
  27. package/esm2020/cms/modules/migrations/services/migrations.service.mjs +3 -3
  28. package/esm2020/cms/modules/runtime/runtime.module.mjs +4 -4
  29. package/esm2020/cms/modules/runtime/services/compilation.service.mjs +3 -3
  30. package/esm2020/cms/modules/runtime/services/runtime-editor.service.mjs +3 -3
  31. package/esm2020/cms/modules/runtime/services/runtime.service.mjs +3 -3
  32. package/esm2020/cms/plugins/configuration.plugin.mjs +3 -3
  33. package/esm2020/cms/plugins/element-hover.plugin.mjs +3 -3
  34. package/esm2020/cms/plugins/io.plugin.mjs +8 -7
  35. package/esm2020/cms/plugins/page.plugin.mjs +3 -3
  36. package/esm2020/cms/plugins/region.plugin.mjs +3 -3
  37. package/esm2020/cms/plugins/script.plugin.mjs +3 -3
  38. package/esm2020/cms/services/element-context.service.mjs +3 -3
  39. package/esm2020/cms/services/integration.state.mjs +3 -3
  40. package/esm2020/cms/services/io-provider.service.mjs +3 -3
  41. package/esm2020/cms/services/resources.service.mjs +3 -3
  42. package/esm2020/cms/services/templates.service.mjs +3 -3
  43. package/esm2020/cms/utils/element.utils.mjs +10 -3
  44. package/esm2020/cms/utils/elements-resolver.mjs +2 -2
  45. package/esm2020/cms/vendor-map.mjs +3 -2
  46. package/esm2020/core/core.module.mjs +7 -6
  47. package/esm2020/core/directives/directives.module.mjs +4 -4
  48. package/esm2020/core/directives/primeng-calendar.directive.mjs +3 -3
  49. package/esm2020/core/modules/configuration/configuration.module.mjs +4 -4
  50. package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +8 -11
  51. package/esm2020/core/modules/configuration/services/configuration.service.mjs +26 -7
  52. package/esm2020/core/modules/configuration/services/configuration.state.mjs +3 -3
  53. package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +3 -3
  54. package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +4 -4
  55. package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +3 -3
  56. package/esm2020/core/modules/flow-configuration/services/flow-update.service.mjs +7 -14
  57. package/esm2020/core/modules/flow-configuration/types/update.types.mjs +1 -1
  58. package/esm2020/core/pipes/action-code.pipe.mjs +20 -0
  59. package/esm2020/core/pipes/date.pipe.mjs +3 -3
  60. package/esm2020/core/pipes/index.mjs +2 -1
  61. package/esm2020/core/pipes/number.pipe.mjs +3 -3
  62. package/esm2020/core/pipes/pipes.module.mjs +8 -7
  63. package/esm2020/core/pipes/price.pipe.mjs +3 -3
  64. package/esm2020/core/services/context.service.mjs +17 -5
  65. package/esm2020/core/services/metric-calculation/metric-calculation.service.mjs +3 -3
  66. package/esm2020/core/services/product-images.service.mjs +3 -3
  67. package/esm2020/core/services/quote-draft.service.mjs +3 -3
  68. package/esm2020/core/services/runtime-settings.service.mjs +9 -5
  69. package/esm2020/core/types/formatting-settings.types.mjs +1 -1
  70. package/esm2020/runtime/components/component-preview/component-preview.component.mjs +3 -3
  71. package/esm2020/runtime/components/section-renderer/section-renderer.component.mjs +3 -3
  72. package/esm2020/runtime/components/ui-runtime/runtime.component.mjs +3 -3
  73. package/esm2020/runtime/components/ui-runtime-preview/runtime-preview.component.mjs +3 -3
  74. package/esm2020/runtime/execution/components/children-placeholder/children-placeholder.component.mjs +6 -6
  75. package/esm2020/runtime/execution/components/context-provider/context-provider.component.mjs +3 -3
  76. package/esm2020/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.mjs +3 -3
  77. package/esm2020/runtime/execution/components/federated/federated.component.mjs +3 -3
  78. package/esm2020/runtime/execution/components/velo-attribute/velo-attribute.component.mjs +3 -3
  79. package/esm2020/runtime/execution/components/velo-multiselect/velo-multiselect.component.mjs +3 -3
  80. package/esm2020/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.mjs +3 -3
  81. package/esm2020/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.mjs +3 -3
  82. package/esm2020/runtime/execution/components/velo-port-radio/velo-port-radio.component.mjs +3 -3
  83. package/esm2020/runtime/execution/components/velo-type/velo-type.component.mjs +3 -3
  84. package/esm2020/runtime/execution/directives/section-script.directive.mjs +3 -3
  85. package/esm2020/runtime/execution/directives/sf-query.directive.mjs +3 -3
  86. package/esm2020/runtime/execution/directives/velo-attribute.directive.mjs +3 -3
  87. package/esm2020/runtime/execution/directives/velo-port.directive.mjs +18 -18
  88. package/esm2020/runtime/execution/directives/vl-approval.directive.mjs +3 -3
  89. package/esm2020/runtime/execution/directives/vl-document-attachments.directive.mjs +3 -3
  90. package/esm2020/runtime/execution/directives/vl-document-templates.directive.mjs +3 -3
  91. package/esm2020/runtime/execution/directives/vl-quote.directive.mjs +3 -3
  92. package/esm2020/runtime/execution/directives/vl-ramp.directive.mjs +3 -3
  93. package/esm2020/runtime/execution/runtime-execution.module.mjs +4 -4
  94. package/esm2020/runtime/runtime.module.mjs +4 -4
  95. package/esm2020/runtime/services/cart.service.mjs +3 -3
  96. package/esm2020/runtime/services/collapsible-state.service.mjs +3 -3
  97. package/esm2020/runtime/services/configuration.service.mjs +3 -3
  98. package/esm2020/runtime/services/current-state.service.mjs +3 -3
  99. package/esm2020/runtime/services/form-scope.service.mjs +3 -3
  100. package/esm2020/runtime/services/product-model-cache.service.mjs +3 -3
  101. package/esm2020/runtime/services/runtime-context.service.mjs +3 -3
  102. package/esm2020/runtime/services/runtime-form.service.mjs +3 -3
  103. package/esm2020/runtime/services/runtime.service.mjs +3 -3
  104. package/esm2020/runtime/services/section-helper.service.mjs +3 -3
  105. package/esm2020/runtime/services/section-scope.service.mjs +3 -3
  106. package/esm2020/runtime/services/section-store.service.mjs +3 -3
  107. package/esm2020/runtime/services/section.service.mjs +6 -6
  108. package/esm2020/src/components/dialog/dialog.component.mjs +3 -3
  109. package/esm2020/src/components/dialog/dialog.module.mjs +4 -4
  110. package/esm2020/src/components/doc-gen/doc-gen.component.mjs +11 -15
  111. package/esm2020/src/components/doc-gen/doc-gen.module.mjs +4 -4
  112. package/esm2020/src/components/guided-selling/guided-selling.component.mjs +10 -13
  113. package/esm2020/src/components/guided-selling/guided-selling.module.mjs +4 -4
  114. package/esm2020/src/components/header/cart-overlay/cart-preview.component.mjs +3 -3
  115. package/esm2020/src/components/header/cart-overlay/cart-preview.module.mjs +4 -4
  116. package/esm2020/src/components/header/header.component.mjs +4 -4
  117. package/esm2020/src/components/header/header.module.mjs +4 -4
  118. package/esm2020/src/components/header/metrics/metrics.component.mjs +4 -4
  119. package/esm2020/src/components/header/metrics/metrics.module.mjs +4 -4
  120. package/esm2020/src/flow-routing.module.mjs +4 -4
  121. package/esm2020/src/flow.component.mjs +3 -3
  122. package/esm2020/src/flow.module.mjs +4 -4
  123. package/esm2020/src/guards/context.guard.mjs +3 -3
  124. package/esm2020/src/guards/product-unload.guard.mjs +7 -4
  125. package/esm2020/src/guards/root.guard.mjs +3 -3
  126. package/esm2020/src/pages/assets/assets.component.mjs +3 -3
  127. package/esm2020/src/pages/assets/assets.module.mjs +4 -4
  128. package/esm2020/src/pages/catalog/catalog.component.mjs +3 -3
  129. package/esm2020/src/pages/catalog/catalog.module.mjs +4 -4
  130. package/esm2020/src/pages/debug/debug.component.mjs +3 -3
  131. package/esm2020/src/pages/debug/debug.module.mjs +4 -4
  132. package/esm2020/src/pages/empty-account/empty-account.component.mjs +3 -3
  133. package/esm2020/src/pages/empty-account/empty-account.module.mjs +4 -4
  134. package/esm2020/src/pages/legacy-product/legacy-product.component.mjs +3 -3
  135. package/esm2020/src/pages/legacy-product/legacy-product.module.mjs +4 -4
  136. package/esm2020/src/pages/product/product.component.mjs +3 -3
  137. package/esm2020/src/pages/product/product.module.mjs +4 -4
  138. package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +3 -3
  139. package/esm2020/src/pages/record-not-found/record-not-found.module.mjs +4 -4
  140. package/esm2020/src/pages/remote/remote.component.mjs +3 -3
  141. package/esm2020/src/pages/remote/remote.module.mjs +4 -4
  142. package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +3 -3
  143. package/esm2020/src/pages/shopping-cart/shopping-cart.module.mjs +4 -4
  144. package/esm2020/src/resolvers/flow.resolver.mjs +3 -3
  145. package/esm2020/src/resolvers/quote.resolver.mjs +3 -3
  146. package/esm2020/src/services/doc-gen.service.mjs +3 -3
  147. package/esm2020/src/services/flow-dialog.service.mjs +3 -3
  148. package/esm2020/src/services/flow-router.service.mjs +5 -5
  149. package/esm2020/src/services/flow.service.mjs +13 -5
  150. package/esm2020/src/services/guided-selling.service.mjs +3 -3
  151. package/fesm2015/veloceapps-sdk-cms.mjs +123 -114
  152. package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
  153. package/fesm2015/veloceapps-sdk-core.mjs +1006 -965
  154. package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
  155. package/fesm2015/veloceapps-sdk-runtime.mjs +137 -137
  156. package/fesm2015/veloceapps-sdk.mjs +220 -211
  157. package/fesm2015/veloceapps-sdk.mjs.map +1 -1
  158. package/fesm2020/veloceapps-sdk-cms.mjs +123 -114
  159. package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
  160. package/fesm2020/veloceapps-sdk-core.mjs +528 -487
  161. package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
  162. package/fesm2020/veloceapps-sdk-runtime.mjs +137 -137
  163. package/fesm2020/veloceapps-sdk.mjs +219 -211
  164. package/fesm2020/veloceapps-sdk.mjs.map +1 -1
  165. package/package.json +3 -3
  166. package/src/components/doc-gen/doc-gen.component.d.ts +3 -6
  167. package/src/components/guided-selling/guided-selling.component.d.ts +2 -4
  168. package/src/guards/product-unload.guard.d.ts +2 -2
@@ -1,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, InjectionToken, NgModule, inject, Directive, Input, LOCALE_ID, Pipe } from '@angular/core';
3
- import { UUID, ConfigurationContextMode, ConfigurationContext, RuntimeModel, getUIDefinitionProperties, isLegacyUIDefinition, SalesforceIdUtils, ConfigurationMode, ConfigurationTranslatorUtils, EntityUtil, ChargeGroupUtils, DEFAULT_CURRENCY_ISO_CODE, DEFAULT_CURRENCY_SYMBOL, validateDateFormat, DEFAULT_DATE_FORMAT, DEFAULT_DECIMALS_COUNT, getSupportedDateFormats, DEFAULT_DECIMAL_SEPARATOR, DEFAULT_THOUSANDS_SEPARATOR, parseJsonSafely, formatNumber } from '@veloceapps/core';
3
+ import { UUID, ConfigurationContextMode, ConfigurationContext, 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, ChargeGroupUtils, RuntimeModel, isLegacyUIDefinition, SalesforceIdUtils, EntityUtil, formatNumber } from '@veloceapps/core';
4
4
  import * as i1 from '@veloceapps/api';
5
5
  import { PriceApiService, ContextApiService, ProductModelApiService, ConfigurationApiService } from '@veloceapps/api';
6
- import { BehaviorSubject, combineLatest, zip, noop, throwError, shareReplay as shareReplay$1, switchMap as switchMap$1, of, tap as tap$1, map as map$2, catchError as catchError$1, Subject, take as take$1, distinctUntilChanged } from 'rxjs';
7
- import { filter, tap, map, first, switchMap, skip, take, shareReplay, catchError, finalize } from 'rxjs/operators';
6
+ 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';
7
+ import { filter, tap, map, switchMap, skip, take, shareReplay, catchError, finalize, first } from 'rxjs/operators';
8
8
  import { merge, isEqual, flatten, sortBy, map as map$1, transform, omit, cloneDeep, uniq } from 'lodash';
9
9
  import { HttpErrorResponse } from '@angular/common/http';
10
10
  import * as i4 from '@veloceapps/components';
@@ -86,6 +86,18 @@ class ContextService {
86
86
  create(headerId, mode) {
87
87
  return this.contextApiService.getContext(headerId, mode).pipe(tap(context => this.context.next(merge(new ConfigurationContext(headerId, mode), context))), map(() => this.resolve()));
88
88
  }
89
+ initTestMode() {
90
+ return this.create('TestId', ConfigurationContextMode.TEST).pipe(map(context => {
91
+ return this.update({
92
+ properties: {
93
+ ...context.properties,
94
+ RuntimeMode: ConfigurationContextMode.TEST,
95
+ StartDate: new Date().toISOString().substring(0, 10),
96
+ standalone: 'true',
97
+ },
98
+ });
99
+ }));
100
+ }
89
101
  update(partialContext) {
90
102
  const originalContext = this.resolve();
91
103
  const updatedContext = {
@@ -112,172 +124,13 @@ class ContextService {
112
124
  this.context.next(null);
113
125
  }
114
126
  }
115
- ContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextService, deps: [{ token: i1.ContextApiService }], target: i0.ɵɵFactoryTarget.Injectable });
116
- ContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextService, providedIn: 'root' });
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextService, decorators: [{
127
+ ContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextService, deps: [{ token: i1.ContextApiService }], target: i0.ɵɵFactoryTarget.Injectable });
128
+ ContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextService, providedIn: 'root' });
129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextService, decorators: [{
118
130
  type: Injectable,
119
131
  args: [{ providedIn: 'root' }]
120
132
  }], ctorParameters: function () { return [{ type: i1.ContextApiService }]; } });
121
133
 
122
- const FORMATTING_SETTINGS_TOKEN = new InjectionToken('Summary of formatting settings for variant types of data, e.g. numbers, text, dates, etc');
123
-
124
- var RuntimeMode;
125
- (function (RuntimeMode) {
126
- RuntimeMode[RuntimeMode["TEST"] = 0] = "TEST";
127
- RuntimeMode[RuntimeMode["PROD"] = 1] = "PROD";
128
- })(RuntimeMode || (RuntimeMode = {}));
129
- var RuntimeOperation;
130
- (function (RuntimeOperation) {
131
- RuntimeOperation["INIT"] = "INIT";
132
- RuntimeOperation["UPDATE"] = "UPDATE";
133
- })(RuntimeOperation || (RuntimeOperation = {}));
134
- var RuntimeStep;
135
- (function (RuntimeStep) {
136
- RuntimeStep["START"] = "START";
137
- RuntimeStep["UPDATE"] = "UPDATE";
138
- })(RuntimeStep || (RuntimeStep = {}));
139
-
140
- const UI_DEFINITION_VERSION = 3;
141
-
142
- class RuntimeContextService {
143
- constructor(configurationApiService) {
144
- this.configurationApiService = configurationApiService;
145
- }
146
- getRuntimeContext(productId, offeringId) {
147
- return this.configurationApiService.getRuntimeDataByProductId(productId, offeringId).pipe(map(runtimeData => {
148
- const uiDefinitionContainer = this.getUIDefinitionContainer(runtimeData);
149
- const runtimeModel = RuntimeModel.create(runtimeData.types, runtimeData.products);
150
- const { productName, properties } = Array.from(runtimeModel.components.values()).find(c => c.productId === productId) ?? {};
151
- const uiDefinitionProperties = getUIDefinitionProperties(uiDefinitionContainer);
152
- return {
153
- modelId: runtimeData.modelId,
154
- uiDefinitionContainer: uiDefinitionContainer,
155
- runtimeModel: runtimeModel,
156
- runtimeMode: RuntimeMode.PROD,
157
- productId: productId,
158
- productType: properties?.['displayName'] || productName,
159
- offeringId: offeringId,
160
- properties: {
161
- PricingEnabled: uiDefinitionProperties.pricingEnabled ? 'true' : 'false',
162
- PriceListId: uiDefinitionProperties.priceList,
163
- },
164
- };
165
- }));
166
- }
167
- getUIDefinitionContainer(runtimeData) {
168
- const containers = runtimeData.uiDefinitions.filter(container => !isLegacyUIDefinition(container.source));
169
- return containers.find(container => container.source.primary) ?? containers[0];
170
- }
171
- }
172
- RuntimeContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeContextService, deps: [{ token: i1.ConfigurationApiService }], target: i0.ɵɵFactoryTarget.Injectable });
173
- RuntimeContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeContextService });
174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeContextService, decorators: [{
175
- type: Injectable
176
- }], ctorParameters: function () { return [{ type: i1.ConfigurationApiService }]; } });
177
-
178
- class ConfigurationRuntimeService {
179
- constructor(apiService, contextService, runtimeContextService) {
180
- this.apiService = apiService;
181
- this.contextService = contextService;
182
- this.runtimeContextService = runtimeContextService;
183
- this._isInitialized = false;
184
- this.uiDefinitionProperties = {};
185
- }
186
- reset() {
187
- this._isInitialized = false;
188
- this._runtimeContext = undefined;
189
- this.initializationProps = undefined;
190
- this.uiDefinitionProperties = {};
191
- }
192
- initTestMode(uiDefinitionContainer) {
193
- this.uiDefinitionProperties = getUIDefinitionProperties(uiDefinitionContainer);
194
- const uiDefinitionExternals = uiDefinitionContainer.source.externals ?? {};
195
- return combineLatest([
196
- this.apiService.getRuntimeDataByModelId(uiDefinitionContainer.modelId),
197
- this.contextService.create('TestId', ConfigurationContextMode.TEST),
198
- ]).pipe(first(), map(([runtimeData, context]) => {
199
- this.contextService.update({
200
- properties: {
201
- ...this.runtimeContext?.properties,
202
- ...context.properties,
203
- ModelId: uiDefinitionContainer.modelId,
204
- RuntimeMode: ConfigurationContextMode.TEST,
205
- PricingEnabled: this.uiDefinitionProperties.pricingEnabled ? 'true' : 'false',
206
- StartDate: new Date().toISOString().substring(0, 10),
207
- PriceListId: this.uiDefinitionProperties.priceList,
208
- offeringId: this.uiDefinitionProperties.offeringId,
209
- standalone: 'true',
210
- ...uiDefinitionExternals,
211
- },
212
- });
213
- this._runtimeContext = {
214
- modelId: uiDefinitionContainer.modelId,
215
- runtimeModel: RuntimeModel.create(runtimeData.types, runtimeData.products),
216
- runtimeMode: RuntimeMode.TEST,
217
- uiDefinitionContainer,
218
- };
219
- return this._runtimeContext;
220
- }), tap(() => (this._isInitialized = true)));
221
- }
222
- init(props) {
223
- this.initializationProps = props;
224
- const context = this.contextService.resolve();
225
- return this.runtimeContextService.getRuntimeContext(props.productId, props.offeringId).pipe(tap(runtimeContext => {
226
- this.uiDefinitionProperties = getUIDefinitionProperties(runtimeContext.uiDefinitionContainer);
227
- const { PriceListId } = context.properties ?? {};
228
- const mergeContext = {
229
- ...runtimeContext,
230
- properties: {
231
- ...runtimeContext.properties,
232
- ...context.properties,
233
- PricingEnabled: PriceListId ? 'true' : 'false',
234
- },
235
- };
236
- this.id15to18('AccountId', mergeContext.properties);
237
- this._runtimeContext = mergeContext;
238
- if (context.properties && this._runtimeContext.properties?.StartDate) {
239
- this.contextService.update({
240
- properties: {
241
- ...this._runtimeContext.properties,
242
- ...context.properties,
243
- },
244
- });
245
- }
246
- return this._runtimeContext;
247
- }), tap(() => (this._isInitialized = true)));
248
- }
249
- overrideUIDefinition(uiDefinitionContainer) {
250
- if (!this._runtimeContext) {
251
- return;
252
- }
253
- this._runtimeContext.uiDefinitionContainer = uiDefinitionContainer;
254
- this.uiDefinitionProperties = getUIDefinitionProperties(uiDefinitionContainer);
255
- }
256
- id15to18(propertyName, source) {
257
- if (!source) {
258
- return;
259
- }
260
- const value = source[propertyName];
261
- if (typeof value === 'string' && value.length === 15) {
262
- source[propertyName] = SalesforceIdUtils.generateId18FromId15(value);
263
- }
264
- }
265
- get isInitialized() {
266
- return this._isInitialized;
267
- }
268
- get runtimeModel() {
269
- return this.runtimeContext?.runtimeModel;
270
- }
271
- get runtimeContext() {
272
- return this._runtimeContext;
273
- }
274
- }
275
- ConfigurationRuntimeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationRuntimeService, deps: [{ token: i1.ConfigurationApiService }, { token: ContextService }, { token: RuntimeContextService }], target: i0.ɵɵFactoryTarget.Injectable });
276
- ConfigurationRuntimeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationRuntimeService });
277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationRuntimeService, decorators: [{
278
- type: Injectable
279
- }], ctorParameters: function () { return [{ type: i1.ConfigurationApiService }, { type: ContextService }, { type: RuntimeContextService }]; } });
280
-
281
134
  class QuoteDraftService {
282
135
  get isInitialized() {
283
136
  return this.isInitializedSubj$.getValue();
@@ -493,9 +346,9 @@ class QuoteDraftService {
493
346
  }
494
347
  }
495
348
  }
496
- QuoteDraftService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: QuoteDraftService, deps: [{ token: ContextService }, { token: i1.QuoteApiService }, { token: i1.PriceApiService }], target: i0.ɵɵFactoryTarget.Injectable });
497
- QuoteDraftService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: QuoteDraftService, providedIn: 'root' });
498
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: QuoteDraftService, decorators: [{
349
+ 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 }], target: i0.ɵɵFactoryTarget.Injectable });
350
+ QuoteDraftService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService, providedIn: 'root' });
351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService, decorators: [{
499
352
  type: Injectable,
500
353
  args: [{ providedIn: 'root' }]
501
354
  }], ctorParameters: function () { return [{ type: ContextService }, { type: i1.QuoteApiService }, { type: i1.PriceApiService }]; } });
@@ -708,36 +561,151 @@ var lineItem_utils = /*#__PURE__*/Object.freeze({
708
561
  upsertAttributes: upsertAttributes
709
562
  });
710
563
 
711
- class LineItemWorker {
712
- constructor(src) {
713
- this.li = { ...src };
564
+ class RuntimeSettingsService {
565
+ constructor(configurationSettingsApiService) {
566
+ this.configurationSettingsApiService = configurationSettingsApiService;
567
+ this.configurationSettings$ = new BehaviorSubject({});
568
+ this.currencySettings$ = new BehaviorSubject({
569
+ iso: DEFAULT_CURRENCY_ISO_CODE,
570
+ symbol: DEFAULT_CURRENCY_SYMBOL,
571
+ });
572
+ this.getCurrencySymbol = (locale, currency) => {
573
+ return (0)
574
+ .toLocaleString(locale, { style: 'currency', currency, minimumFractionDigits: 0, maximumFractionDigits: 0 })
575
+ .replace(/\d/g, '')
576
+ .trim();
577
+ };
714
578
  }
715
- insert(parentId, toInsert) {
716
- return new LineItemWorker(insertLineItem(this.li, parentId, toInsert));
579
+ create() {
580
+ return this.configurationSettingsApiService.fetchSettings().pipe(map$2(settings => this.parseConfigurationSettings(settings)), tap$1(configurationSettings => {
581
+ this.configurationSettings$.next(configurationSettings);
582
+ this.formattingSettings = this.getFormattingSettings();
583
+ }), map$2(() => undefined));
717
584
  }
718
- remove(id) {
719
- return new LineItemWorker(removeLineItem(this.li, id));
585
+ initCurrency(iso) {
586
+ if (iso) {
587
+ const symbol = this.getCurrencySymbol('en-US', iso);
588
+ this.currencySettings$.next({ iso, symbol });
589
+ }
720
590
  }
721
- replace(toReplace, skipCardinalityCalculation = false) {
722
- return new LineItemWorker(replaceLineItem(this.li, toReplace, skipCardinalityCalculation));
591
+ getFormattingSettings() {
592
+ if (this.formattingSettings) {
593
+ return this.formattingSettings;
594
+ }
595
+ const shoppingCartSettings = this.getConfigurationSettings()['shopping-cart']?.reduce((acc, setting) => {
596
+ return { ...acc, [setting.id]: setting.properties };
597
+ }, {});
598
+ const currencySettings = this.getCurrencySettings();
599
+ const dateFormat = (validateDateFormat(shoppingCartSettings?.DATE_FORMAT ?? '') && shoppingCartSettings?.DATE_FORMAT) ||
600
+ DEFAULT_DATE_FORMAT;
601
+ const decimalSeparator = shoppingCartSettings?.DECIMAL_SEPARATOR;
602
+ const thousandsSeparator = shoppingCartSettings?.THOUSANDS_SEPARATOR;
603
+ // the number of decimal places can be 0
604
+ const priceScale = shoppingCartSettings?.PRICE_SCALE;
605
+ const decimalsCount = priceScale !== null && priceScale !== '' && !isNaN(Number(priceScale)) && Number(priceScale) >= 0
606
+ ? Number(priceScale)
607
+ : DEFAULT_DECIMALS_COUNT;
608
+ const actionCodeSettings = shoppingCartSettings?.STATUS_LABEL;
609
+ return {
610
+ currencySymbol: currencySettings.symbol,
611
+ dateFormats: getSupportedDateFormats(dateFormat),
612
+ decimalsCount,
613
+ decimalSeparator: decimalSeparator !== undefined && ['.', ','].includes(decimalSeparator)
614
+ ? decimalSeparator
615
+ : DEFAULT_DECIMAL_SEPARATOR,
616
+ // thousands separator can be a blank value, so it can also be null
617
+ thousandsSeparator: thousandsSeparator !== undefined && ['.', ',', '', null].includes(thousandsSeparator)
618
+ ? thousandsSeparator || ''
619
+ : DEFAULT_THOUSANDS_SEPARATOR,
620
+ actionCodeLabels: actionCodeSettings?.length
621
+ ? actionCodeSettings.reduce((result, setting) => ({ ...result, [setting.status_label]: setting.custom_label }), {})
622
+ : DEFAULT_ACTION_CODE_LABELS,
623
+ };
723
624
  }
724
- patchAttribute(attrs, id, skipCardinalityCalculation = false) {
725
- return new LineItemWorker(patchAttributes(this.li, id ?? this.li.id, attrs, skipCardinalityCalculation));
625
+ getConfigurationSettings() {
626
+ return this.configurationSettings$.value;
627
+ }
628
+ getCurrencySettings() {
629
+ return this.currencySettings$.value;
630
+ }
631
+ parseConfigurationSettings(settings) {
632
+ return settings.reduce((acc, setting) => {
633
+ switch (setting.key) {
634
+ case 'shopping-cart':
635
+ acc['shopping-cart'] = parseJsonSafely(setting.value, []);
636
+ break;
637
+ case 'navigation':
638
+ acc.navigation = parseJsonSafely(setting.value, {});
639
+ break;
640
+ case 'flows':
641
+ acc.flows = parseJsonSafely(setting.value, []);
642
+ break;
643
+ default:
644
+ acc[setting.key] = setting.value;
645
+ }
646
+ return acc;
647
+ }, {});
726
648
  }
727
649
  }
650
+ RuntimeSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, deps: [{ token: i1.ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
651
+ RuntimeSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, providedIn: 'root' });
652
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, decorators: [{
653
+ type: Injectable,
654
+ args: [{ providedIn: 'root' }]
655
+ }], ctorParameters: function () { return [{ type: i1.ConfigurationSettingsApiService }]; } });
728
656
 
729
- class ConfigurationService {
730
- constructor(quoteDraftService, runtimeService, contextService, configurationApiService, messageService, dialogService) {
731
- this.quoteDraftService = quoteDraftService;
732
- this.runtimeService = runtimeService;
733
- this.contextService = contextService;
734
- this.configurationApiService = configurationApiService;
657
+ const FORMATTING_SETTINGS_TOKEN = new InjectionToken('Summary of formatting settings for variant types of data, e.g. numbers, text, dates, etc');
658
+
659
+ var RuntimeMode;
660
+ (function (RuntimeMode) {
661
+ RuntimeMode[RuntimeMode["TEST"] = 0] = "TEST";
662
+ RuntimeMode[RuntimeMode["PROD"] = 1] = "PROD";
663
+ })(RuntimeMode || (RuntimeMode = {}));
664
+ var RuntimeOperation;
665
+ (function (RuntimeOperation) {
666
+ RuntimeOperation["INIT"] = "INIT";
667
+ RuntimeOperation["UPDATE"] = "UPDATE";
668
+ })(RuntimeOperation || (RuntimeOperation = {}));
669
+ var RuntimeStep;
670
+ (function (RuntimeStep) {
671
+ RuntimeStep["START"] = "START";
672
+ RuntimeStep["UPDATE"] = "UPDATE";
673
+ })(RuntimeStep || (RuntimeStep = {}));
674
+
675
+ const UI_DEFINITION_VERSION = 3;
676
+
677
+ class LineItemWorker {
678
+ constructor(src) {
679
+ this.li = { ...src };
680
+ }
681
+ insert(parentId, toInsert) {
682
+ return new LineItemWorker(insertLineItem(this.li, parentId, toInsert));
683
+ }
684
+ remove(id) {
685
+ return new LineItemWorker(removeLineItem(this.li, id));
686
+ }
687
+ replace(toReplace, skipCardinalityCalculation = false) {
688
+ return new LineItemWorker(replaceLineItem(this.li, toReplace, skipCardinalityCalculation));
689
+ }
690
+ patchAttribute(attrs, id, skipCardinalityCalculation = false) {
691
+ return new LineItemWorker(patchAttributes(this.li, id ?? this.li.id, attrs, skipCardinalityCalculation));
692
+ }
693
+ }
694
+
695
+ class ConfigurationService {
696
+ constructor(quoteDraftService, runtimeService, contextService, configurationApiService, messageService, dialogService, runtimeSettings) {
697
+ this.quoteDraftService = quoteDraftService;
698
+ this.runtimeService = runtimeService;
699
+ this.contextService = contextService;
700
+ this.configurationApiService = configurationApiService;
735
701
  this.messageService = messageService;
736
702
  this.dialogService = dialogService;
703
+ this.runtimeSettings = runtimeSettings;
737
704
  this.mode = ConfigurationMode.SEARCH;
738
705
  this.lineItem = new BehaviorSubject(undefined);
739
706
  this.charges = new BehaviorSubject({});
740
707
  this.pricePlans = new BehaviorSubject({});
708
+ this.procedureContext = new BehaviorSubject({});
741
709
  this.isLoadingSubj$ = new BehaviorSubject(false);
742
710
  this.isLoading$ = this.isLoadingSubj$.asObservable();
743
711
  this.hasUnsavedChanges = false;
@@ -814,6 +782,12 @@ class ConfigurationService {
814
782
  get pricePlansSnapshot() {
815
783
  return this.pricePlans.value;
816
784
  }
785
+ get procedureContext$() {
786
+ return this.procedureContext.asObservable();
787
+ }
788
+ get procedureContextSnapshot() {
789
+ return this.procedureContext.value;
790
+ }
817
791
  configure() {
818
792
  return this.configureRequest$(this.generateRequest());
819
793
  }
@@ -823,11 +797,20 @@ class ConfigurationService {
823
797
  const uiDefinitionProperties = this.getUIDefinitionProperties();
824
798
  const mainPricingEnabled = runtimeContext.properties?.PricingEnabled;
825
799
  const pricingEnabled = mainPricingEnabled ? mainPricingEnabled === 'true' : uiDefinitionProperties.pricingEnabled;
800
+ const customPriceApi = this.runtimeSettings.getConfigurationSettings()['CUSTOM_PRICE_API'];
826
801
  this.isLoadingSubj$.next(true);
827
- return this.configurationApiService.configureLineItem({ configurationRequest, runtimeModel, pricingEnabled }).pipe(tap(({ lineItem, context, charges, pricePlans, deletedLineItems }) => {
802
+ const configure$ = pricingEnabled && customPriceApi
803
+ ? this.configurationApiService.customConfigurePrice({ url: customPriceApi, configurationRequest, runtimeModel })
804
+ : this.configurationApiService.configureLineItem({
805
+ configurationRequest,
806
+ runtimeModel,
807
+ pricingEnabled,
808
+ });
809
+ return configure$.pipe(tap(({ lineItem, context, charges, pricePlans, deletedLineItems, procedureContext }) => {
828
810
  this.contextService.update(context ?? {});
829
811
  this.charges.next(charges ?? {});
830
812
  this.pricePlans.next(pricePlans ?? {});
813
+ this.procedureContext.next(procedureContext ?? {});
831
814
  if (lineItem) {
832
815
  this.lineItem.next(lineItem);
833
816
  }
@@ -920,140 +903,11 @@ class ConfigurationService {
920
903
  return this.quoteDraftService.quoteDraft?.initialState.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);
921
904
  }
922
905
  }
923
- ConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationService, deps: [{ token: QuoteDraftService }, { token: ConfigurationRuntimeService }, { token: ContextService }, { token: i1.ConfigurationApiService }, { token: i5.MessageService }, { token: i6.DialogService }], target: i0.ɵɵFactoryTarget.Injectable });
924
- ConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationService });
925
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationService, decorators: [{
926
- type: Injectable
927
- }], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: ConfigurationRuntimeService }, { type: ContextService }, { type: i1.ConfigurationApiService }, { type: i5.MessageService }, { type: i6.DialogService }]; } });
928
-
929
- class ConfigurationState {
930
- constructor(statefulConfigurationApiService, runtimeService, configurationService, toastService) {
931
- this.statefulConfigurationApiService = statefulConfigurationApiService;
932
- this.runtimeService = runtimeService;
933
- this.configurationService = configurationService;
934
- this.toastService = toastService;
935
- this.stateSubj$ = new BehaviorSubject({});
936
- this.state$ = this.stateSubj$.asObservable();
937
- this.stateId = null;
938
- }
939
- init$() {
940
- return this.configurationService.configure().pipe(switchMap$1(() => {
941
- if (!this.isStatefulConfiguration) {
942
- return of(undefined);
943
- }
944
- const { actions, selectors } = this.runtimeService.runtimeContext?.uiDefinitionContainer ?? {};
945
- return this.statefulConfigurationApiService.init({
946
- request: this.configurationService.generateRequest(),
947
- actions: actions?.map(action => ({ name: action.apiName, script: action.script })),
948
- selectors: selectors?.map(selector => ({ name: selector.apiName, script: selector.script })),
949
- });
950
- }), tap$1(stateId => (this.stateId = stateId || null)), map$2(() => undefined));
951
- }
952
- cleanup() {
953
- this.stateId = null;
954
- this.configurationService.reset();
955
- this.stateSubj$.next({});
956
- }
957
- execute$(req) {
958
- if (this.isStatefulConfiguration) {
959
- return this.executeStateful$(req);
960
- }
961
- else {
962
- return this.executeStateless$(req);
963
- }
964
- }
965
- dispatch$(actionName, inputData) {
966
- return this.execute$({ actions: [{ name: actionName, inputData }] });
967
- }
968
- select$(selectorName, inputData) {
969
- const requestId = UUID.UUID();
970
- return this.execute$({
971
- selectors: {
972
- [requestId]: {
973
- name: selectorName,
974
- inputData,
975
- },
976
- },
977
- }).pipe(map$2(() => this.stateSubj$.value[requestId]), tap$1(() => this.stateSubj$.next(omit(this.stateSubj$.value, requestId))));
978
- }
979
- get isStatefulConfiguration() {
980
- return this.runtimeService.uiDefinitionProperties.statefulConfigurationEnabled ?? false;
981
- }
982
- executeStateless$(request) {
983
- return of(undefined).pipe(switchMap$1(() => {
984
- // Apply actions and execute configuration/price call
985
- // No need to run configuration if no actions in the request
986
- if (!request.actions?.length) {
987
- return of(undefined);
988
- }
989
- let configurationRequest = this.configurationService.generateRequest();
990
- request.actions.forEach(action => {
991
- configurationRequest = this.executeActionScript(configurationRequest, action) ?? configurationRequest;
992
- });
993
- return this.configurationService.configureRequest$(configurationRequest);
994
- }), tap$1(() => {
995
- if (!request.selectors) {
996
- return;
997
- }
998
- // Run selectors and apply them to the state
999
- const finalConfigurationRequest = this.configurationService.generateRequest();
1000
- const selectorsResult = EntityUtil.entries(request.selectors).reduce((trunk, [key, selector]) => {
1001
- trunk[key] = this.executeSelectorScript(finalConfigurationRequest, selector);
1002
- return trunk;
1003
- }, {});
1004
- this.stateSubj$.next({
1005
- ...this.stateSubj$.value,
1006
- ...selectorsResult,
1007
- });
1008
- }), map$2(() => undefined));
1009
- }
1010
- executeStateful$(request) {
1011
- if (!this.stateId) {
1012
- return of(undefined);
1013
- }
1014
- return this.statefulConfigurationApiService.execute(this.stateId, request).pipe(tap$1(response => {
1015
- this.stateId = response.stateId;
1016
- const updatedState = this.stateSubj$.value;
1017
- EntityUtil.entries(response.selectors).forEach(([key, value]) => {
1018
- if (!value.success) {
1019
- if (!this.runtimeService.uiDefinitionProperties.suppressToastMessages) {
1020
- this.toastService.add({ summary: value.errorMessage, severity: ToastType.error });
1021
- }
1022
- return;
1023
- }
1024
- updatedState[key] = value.result;
1025
- });
1026
- this.stateSubj$.next(updatedState);
1027
- }), map$2(() => undefined));
1028
- }
1029
- executeActionScript(request, processor) {
1030
- const { actions } = this.runtimeService.runtimeContext?.uiDefinitionContainer ?? {};
1031
- const script = actions?.find(action => action.apiName === processor.name)?.script;
1032
- if (!script) {
1033
- return null;
1034
- }
1035
- return this.executeProcessorScript(request, script, processor.inputData);
1036
- }
1037
- executeSelectorScript(request, processor) {
1038
- const { selectors } = this.runtimeService.runtimeContext?.uiDefinitionContainer ?? {};
1039
- const script = selectors?.find(selector => selector.apiName === processor.name)?.script;
1040
- if (!script) {
1041
- return null;
1042
- }
1043
- return this.executeProcessorScript(request, script, processor.inputData);
1044
- }
1045
- executeProcessorScript(request, script, inputData) {
1046
- return new Function(`${script}\nreturn transform;`)()({
1047
- request,
1048
- inputData: inputData,
1049
- });
1050
- }
1051
- }
1052
- ConfigurationState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationState, deps: [{ token: i1.StatefulConfigurationApiService }, { token: ConfigurationRuntimeService }, { token: ConfigurationService }, { token: i4.ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
1053
- ConfigurationState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationState });
1054
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationState, decorators: [{
906
+ 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 });
907
+ ConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService });
908
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService, decorators: [{
1055
909
  type: Injectable
1056
- }], ctorParameters: function () { return [{ type: i1.StatefulConfigurationApiService }, { type: ConfigurationRuntimeService }, { type: ConfigurationService }, { type: i4.ToastService }]; } });
910
+ }], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: ConfigurationRuntimeService }, { type: ContextService }, { type: i1.ConfigurationApiService }, { type: i5.MessageService }, { type: i6.DialogService }, { type: RuntimeSettingsService }]; } });
1057
911
 
1058
912
  function extractMetadata(uiDefinition) {
1059
913
  return omit(uiDefinition, [
@@ -1135,6 +989,7 @@ class FlowUpdateService {
1135
989
  }
1136
990
  break;
1137
991
  case 'LIST_PRICE_ADJUSTMENT':
992
+ case 'MARGIN_ADJUSTMENT':
1138
993
  {
1139
994
  const charge = lineItem.chargeItems.find(charge => (charges || {})[charge.chargeId]?.main);
1140
995
  if (charge) {
@@ -1142,19 +997,11 @@ class FlowUpdateService {
1142
997
  }
1143
998
  }
1144
999
  break;
1145
- case 'COST':
1146
- {
1147
- const charge = lineItem.chargeItems.find(charge => (charges || {})[charge.chargeId]?.main);
1148
- if (charge) {
1149
- charge.netCost = update.newValue;
1150
- }
1151
- }
1152
- break;
1153
- case 'MARGIN_PERCENT':
1000
+ case 'COST_ADJUSTMENT':
1154
1001
  {
1155
1002
  const charge = lineItem.chargeItems.find(charge => (charges || {})[charge.chargeId]?.main);
1156
1003
  if (charge) {
1157
- charge.marginPercent = update.newValue;
1004
+ charge.costAdjustment = update.newValue;
1158
1005
  }
1159
1006
  }
1160
1007
  break;
@@ -1196,9 +1043,9 @@ class FlowUpdateService {
1196
1043
  return true;
1197
1044
  }
1198
1045
  }
1199
- FlowUpdateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowUpdateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1200
- FlowUpdateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowUpdateService });
1201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowUpdateService, decorators: [{
1046
+ FlowUpdateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowUpdateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1047
+ FlowUpdateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowUpdateService });
1048
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowUpdateService, decorators: [{
1202
1049
  type: Injectable
1203
1050
  }] });
1204
1051
 
@@ -1331,54 +1178,12 @@ class FlowConfigurationService {
1331
1178
  };
1332
1179
  }
1333
1180
  }
1334
- FlowConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationService, deps: [{ token: i1.ProceduresApiService }, { token: ContextService }, { token: QuoteDraftService }, { token: FlowUpdateService }, { token: ConfigurationService }], target: i0.ɵɵFactoryTarget.Injectable });
1335
- FlowConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationService });
1336
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationService, decorators: [{
1181
+ 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 });
1182
+ FlowConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationService });
1183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationService, decorators: [{
1337
1184
  type: Injectable
1338
1185
  }], ctorParameters: function () { return [{ type: i1.ProceduresApiService }, { type: ContextService }, { type: QuoteDraftService }, { type: FlowUpdateService }, { type: ConfigurationService }]; } });
1339
1186
 
1340
- class FlowConfigurationModule {
1341
- }
1342
- FlowConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1343
- FlowConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationModule });
1344
- FlowConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationModule, providers: [FlowConfigurationService, FlowUpdateService, PriceApiService] });
1345
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationModule, decorators: [{
1346
- type: NgModule,
1347
- args: [{
1348
- imports: [],
1349
- providers: [FlowConfigurationService, FlowUpdateService, PriceApiService],
1350
- }]
1351
- }] });
1352
-
1353
- class ConfigurationModule {
1354
- }
1355
- ConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1356
- ConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationModule, imports: [ConfirmationDialogModule] });
1357
- ConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationModule, providers: [
1358
- ContextApiService,
1359
- ProductModelApiService,
1360
- ConfigurationApiService,
1361
- ConfigurationRuntimeService,
1362
- RuntimeContextService,
1363
- ConfigurationService,
1364
- ConfigurationState,
1365
- ], imports: [ConfirmationDialogModule] });
1366
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationModule, decorators: [{
1367
- type: NgModule,
1368
- args: [{
1369
- imports: [ConfirmationDialogModule],
1370
- providers: [
1371
- ContextApiService,
1372
- ProductModelApiService,
1373
- ConfigurationApiService,
1374
- ConfigurationRuntimeService,
1375
- RuntimeContextService,
1376
- ConfigurationService,
1377
- ConfigurationState,
1378
- ],
1379
- }]
1380
- }] });
1381
-
1382
1187
  function calculateMetricByMethod(lineItems, metric, method) {
1383
1188
  const items = getLineItemsByMethod(lineItems, method);
1384
1189
  return items.reduce((acc, li) => {
@@ -1488,9 +1293,9 @@ class MetricsCalculationService {
1488
1293
  return this.activeMetricRules.find(metricRule => metricRule.metrics.find(metric => metric.totalName === name));
1489
1294
  }
1490
1295
  }
1491
- MetricsCalculationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsCalculationService, deps: [{ token: QuoteDraftService }, { token: FlowConfigurationService }, { token: i1.ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1492
- MetricsCalculationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsCalculationService, providedIn: 'root' });
1493
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsCalculationService, decorators: [{
1296
+ 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 });
1297
+ MetricsCalculationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsCalculationService, providedIn: 'root' });
1298
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsCalculationService, decorators: [{
1494
1299
  type: Injectable,
1495
1300
  args: [{ providedIn: 'root' }]
1496
1301
  }], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: FlowConfigurationService }, { type: i1.ConfigurationSettingsApiService }]; } });
@@ -1514,101 +1319,319 @@ class ProductImagesService {
1514
1319
  .subscribe();
1515
1320
  }
1516
1321
  }
1517
- ProductImagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductImagesService, deps: [{ token: i1.ProductApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1518
- ProductImagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductImagesService, providedIn: 'root' });
1519
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductImagesService, decorators: [{
1322
+ ProductImagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService, deps: [{ token: i1.ProductApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1323
+ ProductImagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService, providedIn: 'root' });
1324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService, decorators: [{
1520
1325
  type: Injectable,
1521
1326
  args: [{ providedIn: 'root' }]
1522
1327
  }], ctorParameters: function () { return [{ type: i1.ProductApiService }]; } });
1523
1328
 
1524
- class RuntimeSettingsService {
1525
- constructor(configurationSettingsApiService) {
1526
- this.configurationSettingsApiService = configurationSettingsApiService;
1527
- this.configurationSettings$ = new BehaviorSubject({});
1528
- this.currencySettings$ = new BehaviorSubject({
1529
- iso: DEFAULT_CURRENCY_ISO_CODE,
1530
- symbol: DEFAULT_CURRENCY_SYMBOL,
1531
- });
1532
- this.getCurrencySymbol = (locale, currency) => {
1533
- return (0)
1534
- .toLocaleString(locale, { style: 'currency', currency, minimumFractionDigits: 0, maximumFractionDigits: 0 })
1535
- .replace(/\d/g, '')
1536
- .trim();
1537
- };
1329
+ class RuntimeContextService {
1330
+ constructor(configurationApiService) {
1331
+ this.configurationApiService = configurationApiService;
1538
1332
  }
1539
- create() {
1540
- return this.configurationSettingsApiService.fetchSettings().pipe(map$2(settings => this.parseConfigurationSettings(settings)), tap$1(configurationSettings => {
1541
- this.configurationSettings$.next(configurationSettings);
1542
- this.formattingSettings = this.getFormattingSettings();
1543
- }), map$2(() => undefined));
1333
+ getRuntimeContext(productId, offeringId) {
1334
+ return this.configurationApiService.getRuntimeDataByProductId(productId, offeringId).pipe(map(runtimeData => {
1335
+ const uiDefinitionContainer = this.getUIDefinitionContainer(runtimeData);
1336
+ const runtimeModel = RuntimeModel.create(runtimeData.types, runtimeData.products);
1337
+ const { productName, properties } = Array.from(runtimeModel.components.values()).find(c => c.productId === productId) ?? {};
1338
+ const uiDefinitionProperties = getUIDefinitionProperties(uiDefinitionContainer);
1339
+ return {
1340
+ modelId: runtimeData.modelId,
1341
+ uiDefinitionContainer: uiDefinitionContainer,
1342
+ runtimeModel: runtimeModel,
1343
+ runtimeMode: RuntimeMode.PROD,
1344
+ productId: productId,
1345
+ productType: properties?.['displayName'] || productName,
1346
+ offeringId: offeringId,
1347
+ properties: {
1348
+ PricingEnabled: uiDefinitionProperties.pricingEnabled ? 'true' : 'false',
1349
+ PriceListId: uiDefinitionProperties.priceList,
1350
+ },
1351
+ };
1352
+ }));
1544
1353
  }
1545
- initCurrency(iso) {
1546
- if (iso) {
1547
- const symbol = this.getCurrencySymbol('en-US', iso);
1548
- this.currencySettings$.next({ iso, symbol });
1354
+ getUIDefinitionContainer(runtimeData) {
1355
+ const containers = runtimeData.uiDefinitions.filter(container => !isLegacyUIDefinition(container.source));
1356
+ return containers.find(container => container.source.primary) ?? containers[0];
1357
+ }
1358
+ }
1359
+ RuntimeContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeContextService, deps: [{ token: i1.ConfigurationApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1360
+ RuntimeContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeContextService });
1361
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeContextService, decorators: [{
1362
+ type: Injectable
1363
+ }], ctorParameters: function () { return [{ type: i1.ConfigurationApiService }]; } });
1364
+
1365
+ class ConfigurationRuntimeService {
1366
+ constructor(apiService, contextService, runtimeContextService) {
1367
+ this.apiService = apiService;
1368
+ this.contextService = contextService;
1369
+ this.runtimeContextService = runtimeContextService;
1370
+ this._isInitialized = false;
1371
+ this.uiDefinitionProperties = {};
1372
+ }
1373
+ reset() {
1374
+ this._isInitialized = false;
1375
+ this._runtimeContext = undefined;
1376
+ this.initializationProps = undefined;
1377
+ this.uiDefinitionProperties = {};
1378
+ }
1379
+ initTestMode(uiDefinitionContainer) {
1380
+ this.uiDefinitionProperties = getUIDefinitionProperties(uiDefinitionContainer);
1381
+ const uiDefinitionExternals = uiDefinitionContainer.source.externals ?? {};
1382
+ return combineLatest([
1383
+ this.apiService.getRuntimeDataByModelId(uiDefinitionContainer.modelId),
1384
+ this.contextService.initTestMode(),
1385
+ ]).pipe(first(), map(([runtimeData, context]) => {
1386
+ this.contextService.update({
1387
+ properties: {
1388
+ ...this.runtimeContext?.properties,
1389
+ ...context.properties,
1390
+ ModelId: uiDefinitionContainer.modelId,
1391
+ PricingEnabled: this.uiDefinitionProperties.pricingEnabled ? 'true' : 'false',
1392
+ PriceListId: this.uiDefinitionProperties.priceList,
1393
+ offeringId: this.uiDefinitionProperties.offeringId,
1394
+ ...uiDefinitionExternals,
1395
+ },
1396
+ });
1397
+ this._runtimeContext = {
1398
+ modelId: uiDefinitionContainer.modelId,
1399
+ runtimeModel: RuntimeModel.create(runtimeData.types, runtimeData.products),
1400
+ runtimeMode: RuntimeMode.TEST,
1401
+ uiDefinitionContainer,
1402
+ };
1403
+ return this._runtimeContext;
1404
+ }), tap(() => (this._isInitialized = true)));
1405
+ }
1406
+ init(props) {
1407
+ this.initializationProps = props;
1408
+ const context = this.contextService.resolve();
1409
+ return this.runtimeContextService.getRuntimeContext(props.productId, props.offeringId).pipe(tap(runtimeContext => {
1410
+ this.uiDefinitionProperties = getUIDefinitionProperties(runtimeContext.uiDefinitionContainer);
1411
+ const { PriceListId } = context.properties ?? {};
1412
+ const mergeContext = {
1413
+ ...runtimeContext,
1414
+ properties: {
1415
+ ...runtimeContext.properties,
1416
+ ...context.properties,
1417
+ PricingEnabled: PriceListId ? 'true' : 'false',
1418
+ },
1419
+ };
1420
+ this.id15to18('AccountId', mergeContext.properties);
1421
+ this._runtimeContext = mergeContext;
1422
+ if (context.properties && this._runtimeContext.properties?.StartDate) {
1423
+ this.contextService.update({
1424
+ properties: {
1425
+ ...this._runtimeContext.properties,
1426
+ ...context.properties,
1427
+ },
1428
+ });
1429
+ }
1430
+ return this._runtimeContext;
1431
+ }), tap(() => (this._isInitialized = true)));
1432
+ }
1433
+ overrideUIDefinition(uiDefinitionContainer) {
1434
+ if (!this._runtimeContext) {
1435
+ return;
1549
1436
  }
1437
+ this._runtimeContext.uiDefinitionContainer = uiDefinitionContainer;
1438
+ this.uiDefinitionProperties = getUIDefinitionProperties(uiDefinitionContainer);
1550
1439
  }
1551
- getFormattingSettings() {
1552
- if (this.formattingSettings) {
1553
- return this.formattingSettings;
1440
+ id15to18(propertyName, source) {
1441
+ if (!source) {
1442
+ return;
1443
+ }
1444
+ const value = source[propertyName];
1445
+ if (typeof value === 'string' && value.length === 15) {
1446
+ source[propertyName] = SalesforceIdUtils.generateId18FromId15(value);
1554
1447
  }
1555
- const shoppingCartSettings = this.getConfigurationSettings()['shopping-cart']?.reduce((acc, setting) => {
1556
- return { ...acc, [setting.id]: setting.properties };
1557
- }, {});
1558
- const currencySettings = this.getCurrencySettings();
1559
- const dateFormat = (validateDateFormat(shoppingCartSettings?.DATE_FORMAT ?? '') && shoppingCartSettings?.DATE_FORMAT) ||
1560
- DEFAULT_DATE_FORMAT;
1561
- const decimalSeparator = shoppingCartSettings?.DECIMAL_SEPARATOR;
1562
- const thousandsSeparator = shoppingCartSettings?.THOUSANDS_SEPARATOR;
1563
- // the number of decimal places can be 0
1564
- const priceScale = shoppingCartSettings?.PRICE_SCALE;
1565
- const decimalsCount = priceScale !== null && priceScale !== '' && !isNaN(Number(priceScale)) && Number(priceScale) >= 0
1566
- ? Number(priceScale)
1567
- : DEFAULT_DECIMALS_COUNT;
1568
- return {
1569
- currencySymbol: currencySettings.symbol,
1570
- dateFormats: getSupportedDateFormats(dateFormat),
1571
- decimalsCount,
1572
- decimalSeparator: decimalSeparator !== undefined && ['.', ','].includes(decimalSeparator)
1573
- ? decimalSeparator
1574
- : DEFAULT_DECIMAL_SEPARATOR,
1575
- // thousands separator can be a blank value, so it can also be null
1576
- thousandsSeparator: thousandsSeparator !== undefined && ['.', ',', '', null].includes(thousandsSeparator)
1577
- ? thousandsSeparator || ''
1578
- : DEFAULT_THOUSANDS_SEPARATOR,
1579
- };
1580
1448
  }
1581
- getConfigurationSettings() {
1582
- return this.configurationSettings$.value;
1449
+ get isInitialized() {
1450
+ return this._isInitialized;
1583
1451
  }
1584
- getCurrencySettings() {
1585
- return this.currencySettings$.value;
1452
+ get runtimeModel() {
1453
+ return this.runtimeContext?.runtimeModel;
1586
1454
  }
1587
- parseConfigurationSettings(settings) {
1588
- return settings.reduce((acc, setting) => {
1589
- switch (setting.key) {
1590
- case 'shopping-cart':
1591
- acc['shopping-cart'] = parseJsonSafely(setting.value, []);
1592
- break;
1593
- case 'navigation':
1594
- acc.navigation = parseJsonSafely(setting.value, {});
1595
- break;
1596
- case 'flows':
1597
- acc.flows = parseJsonSafely(setting.value, []);
1598
- break;
1599
- default:
1600
- acc[setting.key] = setting.value;
1455
+ get runtimeContext() {
1456
+ return this._runtimeContext;
1457
+ }
1458
+ }
1459
+ ConfigurationRuntimeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationRuntimeService, deps: [{ token: i1.ConfigurationApiService }, { token: ContextService }, { token: RuntimeContextService }], target: i0.ɵɵFactoryTarget.Injectable });
1460
+ ConfigurationRuntimeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationRuntimeService });
1461
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationRuntimeService, decorators: [{
1462
+ type: Injectable
1463
+ }], ctorParameters: function () { return [{ type: i1.ConfigurationApiService }, { type: ContextService }, { type: RuntimeContextService }]; } });
1464
+
1465
+ class ConfigurationState {
1466
+ constructor(statefulConfigurationApiService, runtimeService, configurationService, toastService) {
1467
+ this.statefulConfigurationApiService = statefulConfigurationApiService;
1468
+ this.runtimeService = runtimeService;
1469
+ this.configurationService = configurationService;
1470
+ this.toastService = toastService;
1471
+ this.stateSubj$ = new BehaviorSubject({});
1472
+ this.state$ = this.stateSubj$.asObservable();
1473
+ this.stateId = null;
1474
+ }
1475
+ init$() {
1476
+ return this.configurationService.configure().pipe(switchMap$1(() => {
1477
+ if (!this.isStatefulConfiguration) {
1478
+ return of(undefined);
1601
1479
  }
1602
- return acc;
1603
- }, {});
1480
+ const { actions, selectors } = this.runtimeService.runtimeContext?.uiDefinitionContainer ?? {};
1481
+ return this.statefulConfigurationApiService.init({
1482
+ request: this.configurationService.generateRequest(),
1483
+ actions: actions?.map(action => ({ name: action.apiName, script: action.script })),
1484
+ selectors: selectors?.map(selector => ({ name: selector.apiName, script: selector.script })),
1485
+ });
1486
+ }), tap$1(stateId => (this.stateId = stateId || null)), map$2(() => undefined));
1487
+ }
1488
+ cleanup() {
1489
+ this.stateId = null;
1490
+ this.configurationService.reset();
1491
+ this.stateSubj$.next({});
1492
+ }
1493
+ execute$(req) {
1494
+ if (this.isStatefulConfiguration) {
1495
+ return this.executeStateful$(req);
1496
+ }
1497
+ else {
1498
+ return this.executeStateless$(req);
1499
+ }
1500
+ }
1501
+ dispatch$(actionName, inputData) {
1502
+ return this.execute$({ actions: [{ name: actionName, inputData }] });
1503
+ }
1504
+ select$(selectorName, inputData) {
1505
+ const requestId = UUID.UUID();
1506
+ return this.execute$({
1507
+ selectors: {
1508
+ [requestId]: {
1509
+ name: selectorName,
1510
+ inputData,
1511
+ },
1512
+ },
1513
+ }).pipe(map$2(() => this.stateSubj$.value[requestId]), tap$1(() => this.stateSubj$.next(omit(this.stateSubj$.value, requestId))));
1514
+ }
1515
+ get isStatefulConfiguration() {
1516
+ return this.runtimeService.uiDefinitionProperties.statefulConfigurationEnabled ?? false;
1517
+ }
1518
+ executeStateless$(request) {
1519
+ return of(undefined).pipe(switchMap$1(() => {
1520
+ // Apply actions and execute configuration/price call
1521
+ // No need to run configuration if no actions in the request
1522
+ if (!request.actions?.length) {
1523
+ return of(undefined);
1524
+ }
1525
+ let configurationRequest = this.configurationService.generateRequest();
1526
+ request.actions.forEach(action => {
1527
+ configurationRequest = this.executeActionScript(configurationRequest, action) ?? configurationRequest;
1528
+ });
1529
+ return this.configurationService.configureRequest$(configurationRequest);
1530
+ }), tap$1(() => {
1531
+ if (!request.selectors) {
1532
+ return;
1533
+ }
1534
+ // Run selectors and apply them to the state
1535
+ const finalConfigurationRequest = this.configurationService.generateRequest();
1536
+ const selectorsResult = EntityUtil.entries(request.selectors).reduce((trunk, [key, selector]) => {
1537
+ trunk[key] = this.executeSelectorScript(finalConfigurationRequest, selector);
1538
+ return trunk;
1539
+ }, {});
1540
+ this.stateSubj$.next({
1541
+ ...this.stateSubj$.value,
1542
+ ...selectorsResult,
1543
+ });
1544
+ }), map$2(() => undefined));
1545
+ }
1546
+ executeStateful$(request) {
1547
+ if (!this.stateId) {
1548
+ return of(undefined);
1549
+ }
1550
+ return this.statefulConfigurationApiService.execute(this.stateId, request).pipe(tap$1(response => {
1551
+ this.stateId = response.stateId;
1552
+ const updatedState = this.stateSubj$.value;
1553
+ EntityUtil.entries(response.selectors).forEach(([key, value]) => {
1554
+ if (!value.success) {
1555
+ if (!this.runtimeService.uiDefinitionProperties.suppressToastMessages) {
1556
+ this.toastService.add({ summary: value.errorMessage, severity: ToastType.error });
1557
+ }
1558
+ return;
1559
+ }
1560
+ updatedState[key] = value.result;
1561
+ });
1562
+ this.stateSubj$.next(updatedState);
1563
+ }), map$2(() => undefined));
1564
+ }
1565
+ executeActionScript(request, processor) {
1566
+ const { actions } = this.runtimeService.runtimeContext?.uiDefinitionContainer ?? {};
1567
+ const script = actions?.find(action => action.apiName === processor.name)?.script;
1568
+ if (!script) {
1569
+ return null;
1570
+ }
1571
+ return this.executeProcessorScript(request, script, processor.inputData);
1572
+ }
1573
+ executeSelectorScript(request, processor) {
1574
+ const { selectors } = this.runtimeService.runtimeContext?.uiDefinitionContainer ?? {};
1575
+ const script = selectors?.find(selector => selector.apiName === processor.name)?.script;
1576
+ if (!script) {
1577
+ return null;
1578
+ }
1579
+ return this.executeProcessorScript(request, script, processor.inputData);
1580
+ }
1581
+ executeProcessorScript(request, script, inputData) {
1582
+ return new Function(`${script}\nreturn transform;`)()({
1583
+ request,
1584
+ inputData: inputData,
1585
+ });
1604
1586
  }
1605
1587
  }
1606
- RuntimeSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeSettingsService, deps: [{ token: i1.ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1607
- RuntimeSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeSettingsService, providedIn: 'root' });
1608
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeSettingsService, decorators: [{
1609
- type: Injectable,
1610
- args: [{ providedIn: 'root' }]
1611
- }], ctorParameters: function () { return [{ type: i1.ConfigurationSettingsApiService }]; } });
1588
+ ConfigurationState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationState, deps: [{ token: i1.StatefulConfigurationApiService }, { token: ConfigurationRuntimeService }, { token: ConfigurationService }, { token: i4.ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
1589
+ ConfigurationState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationState });
1590
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationState, decorators: [{
1591
+ type: Injectable
1592
+ }], ctorParameters: function () { return [{ type: i1.StatefulConfigurationApiService }, { type: ConfigurationRuntimeService }, { type: ConfigurationService }, { type: i4.ToastService }]; } });
1593
+
1594
+ class FlowConfigurationModule {
1595
+ }
1596
+ FlowConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1597
+ FlowConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule });
1598
+ FlowConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, providers: [FlowConfigurationService, FlowUpdateService, PriceApiService] });
1599
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, decorators: [{
1600
+ type: NgModule,
1601
+ args: [{
1602
+ imports: [],
1603
+ providers: [FlowConfigurationService, FlowUpdateService, PriceApiService],
1604
+ }]
1605
+ }] });
1606
+
1607
+ class ConfigurationModule {
1608
+ }
1609
+ ConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1610
+ ConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, imports: [ConfirmationDialogModule] });
1611
+ ConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, providers: [
1612
+ ContextApiService,
1613
+ ProductModelApiService,
1614
+ ConfigurationApiService,
1615
+ ConfigurationRuntimeService,
1616
+ RuntimeContextService,
1617
+ ConfigurationService,
1618
+ ConfigurationState,
1619
+ ], imports: [ConfirmationDialogModule] });
1620
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, decorators: [{
1621
+ type: NgModule,
1622
+ args: [{
1623
+ imports: [ConfirmationDialogModule],
1624
+ providers: [
1625
+ ContextApiService,
1626
+ ProductModelApiService,
1627
+ ConfigurationApiService,
1628
+ ConfigurationRuntimeService,
1629
+ RuntimeContextService,
1630
+ ConfigurationService,
1631
+ ConfigurationState,
1632
+ ],
1633
+ }]
1634
+ }] });
1612
1635
 
1613
1636
  const DEFAULT_FORMATTING_SETTINGS = {
1614
1637
  currencySymbol: DEFAULT_CURRENCY_SYMBOL,
@@ -1616,12 +1639,13 @@ const DEFAULT_FORMATTING_SETTINGS = {
1616
1639
  dateFormats: getSupportedDateFormats(DEFAULT_DATE_FORMAT),
1617
1640
  decimalSeparator: DEFAULT_DECIMAL_SEPARATOR,
1618
1641
  thousandsSeparator: DEFAULT_THOUSANDS_SEPARATOR,
1642
+ actionCodeLabels: DEFAULT_ACTION_CODE_LABELS,
1619
1643
  };
1620
1644
  class SdkCoreModule {
1621
1645
  }
1622
- SdkCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1623
- SdkCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: SdkCoreModule, imports: [ConfigurationModule, FlowConfigurationModule] });
1624
- SdkCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkCoreModule, providers: [
1646
+ SdkCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1647
+ SdkCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, imports: [ConfigurationModule, FlowConfigurationModule] });
1648
+ SdkCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, providers: [
1625
1649
  ContextService,
1626
1650
  QuoteDraftService,
1627
1651
  ProductImagesService,
@@ -1632,7 +1656,7 @@ SdkCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
1632
1656
  useExisting: RuntimeSettingsService,
1633
1657
  },
1634
1658
  ], imports: [ConfigurationModule, FlowConfigurationModule] });
1635
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkCoreModule, decorators: [{
1659
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, decorators: [{
1636
1660
  type: NgModule,
1637
1661
  args: [{
1638
1662
  imports: [ConfigurationModule, FlowConfigurationModule],
@@ -1673,9 +1697,9 @@ class CalendarDirective {
1673
1697
  }
1674
1698
  }
1675
1699
  }
1676
- CalendarDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CalendarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1677
- CalendarDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: CalendarDirective, selector: "[vlCalendar]", inputs: { vlCalendar: "vlCalendar" }, ngImport: i0 });
1678
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CalendarDirective, decorators: [{
1700
+ CalendarDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CalendarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1701
+ CalendarDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: CalendarDirective, selector: "[vlCalendar]", inputs: { vlCalendar: "vlCalendar" }, ngImport: i0 });
1702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CalendarDirective, decorators: [{
1679
1703
  type: Directive,
1680
1704
  args: [{
1681
1705
  selector: '[vlCalendar]',
@@ -1686,10 +1710,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
1686
1710
 
1687
1711
  class SdkDirectivesModule {
1688
1712
  }
1689
- SdkDirectivesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1690
- SdkDirectivesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: SdkDirectivesModule, declarations: [CalendarDirective], exports: [CalendarDirective] });
1691
- SdkDirectivesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkDirectivesModule });
1692
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkDirectivesModule, decorators: [{
1713
+ SdkDirectivesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1714
+ SdkDirectivesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SdkDirectivesModule, declarations: [CalendarDirective], exports: [CalendarDirective] });
1715
+ SdkDirectivesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkDirectivesModule });
1716
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkDirectivesModule, decorators: [{
1693
1717
  type: NgModule,
1694
1718
  args: [{
1695
1719
  declarations: [CalendarDirective],
@@ -1720,9 +1744,9 @@ class DatePipe {
1720
1744
  }
1721
1745
  }
1722
1746
  }
1723
- DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1724
- DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: DatePipe, name: "vlDate" });
1725
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DatePipe, decorators: [{
1747
+ DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1748
+ DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DatePipe, name: "vlDate" });
1749
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatePipe, decorators: [{
1726
1750
  type: Pipe,
1727
1751
  args: [{
1728
1752
  name: 'vlDate',
@@ -1742,9 +1766,9 @@ class NumberPipe {
1742
1766
  return formatNumber(price, this.formattingSettings?.thousandsSeparator, this.formattingSettings?.decimalSeparator, this.formattingSettings?.decimalsCount);
1743
1767
  }
1744
1768
  }
1745
- NumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1746
- NumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: NumberPipe, name: "vlNumber" });
1747
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NumberPipe, decorators: [{
1769
+ NumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1770
+ NumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NumberPipe, name: "vlNumber" });
1771
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NumberPipe, decorators: [{
1748
1772
  type: Pipe,
1749
1773
  args: [{
1750
1774
  name: 'vlNumber',
@@ -1767,25 +1791,42 @@ class PricePipe {
1767
1791
  return `${this.formattingSettings?.currencySymbol || DEFAULT_CURRENCY_SYMBOL}${formatNumber(price, this.formattingSettings?.thousandsSeparator, this.formattingSettings?.decimalSeparator, this.formattingSettings?.decimalsCount)}`;
1768
1792
  }
1769
1793
  }
1770
- PricePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PricePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1771
- PricePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: PricePipe, name: "vlPrice" });
1772
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PricePipe, decorators: [{
1794
+ PricePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PricePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1795
+ PricePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: PricePipe, name: "vlPrice" });
1796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PricePipe, decorators: [{
1773
1797
  type: Pipe,
1774
1798
  args: [{
1775
1799
  name: 'vlPrice',
1776
1800
  }]
1777
1801
  }] });
1778
1802
 
1803
+ class ActionCodePipe {
1804
+ constructor() {
1805
+ this.formattingSettings = inject(FORMATTING_SETTINGS_TOKEN, { optional: true })?.getFormattingSettings();
1806
+ }
1807
+ transform(actionCode) {
1808
+ return this.formattingSettings?.actionCodeLabels[actionCode] ?? actionCode;
1809
+ }
1810
+ }
1811
+ ActionCodePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ActionCodePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1812
+ ActionCodePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ActionCodePipe, name: "vlActionCode" });
1813
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ActionCodePipe, decorators: [{
1814
+ type: Pipe,
1815
+ args: [{
1816
+ name: 'vlActionCode',
1817
+ }]
1818
+ }] });
1819
+
1779
1820
  class SdkPipesModule {
1780
1821
  }
1781
- SdkPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1782
- SdkPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: SdkPipesModule, declarations: [NumberPipe, PricePipe, DatePipe], exports: [NumberPipe, PricePipe, DatePipe] });
1783
- SdkPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkPipesModule });
1784
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkPipesModule, decorators: [{
1822
+ SdkPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1823
+ SdkPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SdkPipesModule, declarations: [NumberPipe, PricePipe, DatePipe, ActionCodePipe], exports: [NumberPipe, PricePipe, DatePipe, ActionCodePipe] });
1824
+ SdkPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkPipesModule });
1825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkPipesModule, decorators: [{
1785
1826
  type: NgModule,
1786
1827
  args: [{
1787
- declarations: [NumberPipe, PricePipe, DatePipe],
1788
- exports: [NumberPipe, PricePipe, DatePipe],
1828
+ declarations: [NumberPipe, PricePipe, DatePipe, ActionCodePipe],
1829
+ exports: [NumberPipe, PricePipe, DatePipe, ActionCodePipe],
1789
1830
  }]
1790
1831
  }] });
1791
1832
 
@@ -1793,5 +1834,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
1793
1834
  * Generated bundle index. Do not edit.
1794
1835
  */
1795
1836
 
1796
- export { CalendarDirective, ConfigurationRuntimeService, ConfigurationService, ConfigurationState, ContextService, DEFAULT_FORMATTING_SETTINGS, DatePipe, FORMATTING_SETTINGS_TOKEN, FlowConfigurationModule, FlowConfigurationService, FlowUpdateService, LineItemWorker, MetricsCalculationService, NumberPipe, PricePipe, ProductImagesService, QuoteDraftService, RuntimeMode, RuntimeOperation, RuntimeSettingsService, RuntimeStep, SdkCoreModule, SdkDirectivesModule, SdkPipesModule, UI_DEFINITION_VERSION, calculateCardinalityVariables, extractMetadata, filterOutTechnicalAttributes, findLineItem, findLineItemWithComparator, generateLineItem, generateModifiedAssetsMap, getAttributeValue, getAttributes, getDefaultLineItem, getGuidedSellingConfigurationRequest, getOriginParent, getRecommendedPrices, insertLineItem, isLineItemModified, isTechnicalAttribute, lineItem_utils as lineItemUtils, mapAttributes, multiplyLineItems, patchAttributes, recalculateCardinalityVariables, removeLineItem, replaceLineItem, upsertAttributes };
1837
+ export { ActionCodePipe, CalendarDirective, ConfigurationRuntimeService, ConfigurationService, ConfigurationState, ContextService, DEFAULT_FORMATTING_SETTINGS, DatePipe, FORMATTING_SETTINGS_TOKEN, FlowConfigurationModule, FlowConfigurationService, FlowUpdateService, LineItemWorker, MetricsCalculationService, NumberPipe, PricePipe, ProductImagesService, QuoteDraftService, RuntimeMode, RuntimeOperation, RuntimeSettingsService, RuntimeStep, SdkCoreModule, SdkDirectivesModule, SdkPipesModule, UI_DEFINITION_VERSION, calculateCardinalityVariables, extractMetadata, filterOutTechnicalAttributes, findLineItem, findLineItemWithComparator, generateLineItem, generateModifiedAssetsMap, getAttributeValue, getAttributes, getDefaultLineItem, getGuidedSellingConfigurationRequest, getOriginParent, getRecommendedPrices, insertLineItem, isLineItemModified, isTechnicalAttribute, lineItem_utils as lineItemUtils, mapAttributes, multiplyLineItems, patchAttributes, recalculateCardinalityVariables, removeLineItem, replaceLineItem, upsertAttributes };
1797
1838
  //# sourceMappingURL=veloceapps-sdk-core.mjs.map