@veloceapps/sdk 8.0.0-4 → 8.0.0-40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. package/cms/components/element.component.d.ts +0 -1
  2. package/cms/utils/element.utils.d.ts +3 -1
  3. package/cms/vendor-map.d.ts +2 -1
  4. package/core/modules/configuration/services/configuration-runtime.service.d.ts +1 -1
  5. package/core/modules/configuration/services/configuration.service.d.ts +3 -0
  6. package/core/modules/flow-configuration/types/update.types.d.ts +1 -1
  7. package/core/services/context.service.d.ts +1 -0
  8. package/esm2020/cms/components/element-children/element-children.component.mjs +3 -3
  9. package/esm2020/cms/components/element-children/element-children.module.mjs +4 -4
  10. package/esm2020/cms/components/element-drop-handle/element-drop-handle.component.mjs +3 -3
  11. package/esm2020/cms/components/element-drop-handle/element-drop-handle.module.mjs +4 -4
  12. package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +3 -3
  13. package/esm2020/cms/components/element-renderer/element-renderer.module.mjs +4 -4
  14. package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +5 -5
  15. package/esm2020/cms/components/element.component.mjs +2 -11
  16. package/esm2020/cms/components/plugin.component.mjs +3 -3
  17. package/esm2020/cms/components/preview/preview.component.mjs +3 -3
  18. package/esm2020/cms/components/preview/preview.module.mjs +4 -4
  19. package/esm2020/cms/directives/custom-template.directive.mjs +7 -7
  20. package/esm2020/cms/launcher.module.mjs +4 -4
  21. package/esm2020/cms/modules/federated/federated-host.directive.mjs +3 -3
  22. package/esm2020/cms/modules/federated/federated.component.mjs +3 -3
  23. package/esm2020/cms/modules/federated/federated.module.mjs +4 -4
  24. package/esm2020/cms/modules/migrations/migrations.module.mjs +4 -4
  25. package/esm2020/cms/modules/migrations/services/migrations.service.mjs +3 -3
  26. package/esm2020/cms/modules/runtime/runtime.module.mjs +4 -4
  27. package/esm2020/cms/modules/runtime/services/compilation.service.mjs +3 -3
  28. package/esm2020/cms/modules/runtime/services/runtime-editor.service.mjs +3 -3
  29. package/esm2020/cms/modules/runtime/services/runtime.service.mjs +3 -3
  30. package/esm2020/cms/plugins/configuration.plugin.mjs +3 -3
  31. package/esm2020/cms/plugins/element-hover.plugin.mjs +3 -3
  32. package/esm2020/cms/plugins/io.plugin.mjs +14 -5
  33. package/esm2020/cms/plugins/page.plugin.mjs +3 -3
  34. package/esm2020/cms/plugins/region.plugin.mjs +3 -3
  35. package/esm2020/cms/plugins/script.plugin.mjs +3 -3
  36. package/esm2020/cms/services/element-context.service.mjs +3 -3
  37. package/esm2020/cms/services/integration.state.mjs +3 -3
  38. package/esm2020/cms/services/io-provider.service.mjs +3 -3
  39. package/esm2020/cms/services/resources.service.mjs +3 -3
  40. package/esm2020/cms/services/templates.service.mjs +3 -3
  41. package/esm2020/cms/utils/element.utils.mjs +13 -3
  42. package/esm2020/cms/utils/elements-resolver.mjs +2 -2
  43. package/esm2020/cms/vendor-map.mjs +3 -2
  44. package/esm2020/core/core.module.mjs +5 -5
  45. package/esm2020/core/directives/directives.module.mjs +4 -4
  46. package/esm2020/core/directives/primeng-calendar.directive.mjs +3 -3
  47. package/esm2020/core/modules/configuration/configuration.module.mjs +4 -4
  48. package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +8 -11
  49. package/esm2020/core/modules/configuration/services/configuration.service.mjs +13 -5
  50. package/esm2020/core/modules/configuration/services/configuration.state.mjs +3 -3
  51. package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +3 -3
  52. package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +4 -4
  53. package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +3 -3
  54. package/esm2020/core/modules/flow-configuration/services/flow-update.service.mjs +13 -4
  55. package/esm2020/core/modules/flow-configuration/types/update.types.mjs +1 -1
  56. package/esm2020/core/pipes/date.pipe.mjs +3 -3
  57. package/esm2020/core/pipes/number.pipe.mjs +3 -3
  58. package/esm2020/core/pipes/pipes.module.mjs +4 -4
  59. package/esm2020/core/pipes/price.pipe.mjs +3 -3
  60. package/esm2020/core/services/context.service.mjs +17 -5
  61. package/esm2020/core/services/metric-calculation/metric-calculation.service.mjs +3 -3
  62. package/esm2020/core/services/product-images.service.mjs +3 -3
  63. package/esm2020/core/services/quote-draft.service.mjs +3 -3
  64. package/esm2020/core/services/runtime-settings.service.mjs +3 -3
  65. package/esm2020/runtime/components/component-preview/component-preview.component.mjs +3 -3
  66. package/esm2020/runtime/components/section-renderer/section-renderer.component.mjs +3 -3
  67. package/esm2020/runtime/components/ui-runtime/runtime.component.mjs +3 -3
  68. package/esm2020/runtime/components/ui-runtime-preview/runtime-preview.component.mjs +3 -3
  69. package/esm2020/runtime/execution/components/children-placeholder/children-placeholder.component.mjs +6 -6
  70. package/esm2020/runtime/execution/components/context-provider/context-provider.component.mjs +3 -3
  71. package/esm2020/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.mjs +3 -3
  72. package/esm2020/runtime/execution/components/federated/federated.component.mjs +3 -3
  73. package/esm2020/runtime/execution/components/velo-attribute/velo-attribute.component.mjs +3 -3
  74. package/esm2020/runtime/execution/components/velo-multiselect/velo-multiselect.component.mjs +3 -3
  75. package/esm2020/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.mjs +3 -3
  76. package/esm2020/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.mjs +3 -3
  77. package/esm2020/runtime/execution/components/velo-port-radio/velo-port-radio.component.mjs +3 -3
  78. package/esm2020/runtime/execution/components/velo-type/velo-type.component.mjs +3 -3
  79. package/esm2020/runtime/execution/directives/section-script.directive.mjs +3 -3
  80. package/esm2020/runtime/execution/directives/sf-query.directive.mjs +3 -3
  81. package/esm2020/runtime/execution/directives/velo-attribute.directive.mjs +3 -3
  82. package/esm2020/runtime/execution/directives/velo-port.directive.mjs +18 -18
  83. package/esm2020/runtime/execution/directives/vl-approval.directive.mjs +3 -3
  84. package/esm2020/runtime/execution/directives/vl-document-attachments.directive.mjs +3 -3
  85. package/esm2020/runtime/execution/directives/vl-document-templates.directive.mjs +3 -3
  86. package/esm2020/runtime/execution/directives/vl-quote.directive.mjs +3 -3
  87. package/esm2020/runtime/execution/directives/vl-ramp.directive.mjs +3 -3
  88. package/esm2020/runtime/execution/runtime-execution.module.mjs +4 -4
  89. package/esm2020/runtime/runtime.module.mjs +4 -4
  90. package/esm2020/runtime/services/cart.service.mjs +3 -3
  91. package/esm2020/runtime/services/collapsible-state.service.mjs +3 -3
  92. package/esm2020/runtime/services/configuration.service.mjs +3 -3
  93. package/esm2020/runtime/services/current-state.service.mjs +3 -3
  94. package/esm2020/runtime/services/form-scope.service.mjs +3 -3
  95. package/esm2020/runtime/services/product-model-cache.service.mjs +3 -3
  96. package/esm2020/runtime/services/runtime-context.service.mjs +3 -3
  97. package/esm2020/runtime/services/runtime-form.service.mjs +3 -3
  98. package/esm2020/runtime/services/runtime.service.mjs +3 -3
  99. package/esm2020/runtime/services/section-helper.service.mjs +3 -3
  100. package/esm2020/runtime/services/section-scope.service.mjs +3 -3
  101. package/esm2020/runtime/services/section-store.service.mjs +3 -3
  102. package/esm2020/runtime/services/section.service.mjs +6 -6
  103. package/esm2020/src/components/dialog/dialog.component.mjs +3 -3
  104. package/esm2020/src/components/dialog/dialog.module.mjs +4 -4
  105. package/esm2020/src/components/doc-gen/doc-gen.component.mjs +11 -15
  106. package/esm2020/src/components/doc-gen/doc-gen.module.mjs +4 -4
  107. package/esm2020/src/components/guided-selling/guided-selling.component.mjs +10 -13
  108. package/esm2020/src/components/guided-selling/guided-selling.module.mjs +4 -4
  109. package/esm2020/src/components/header/cart-overlay/cart-preview.component.mjs +3 -3
  110. package/esm2020/src/components/header/cart-overlay/cart-preview.module.mjs +4 -4
  111. package/esm2020/src/components/header/header.component.mjs +4 -4
  112. package/esm2020/src/components/header/header.module.mjs +4 -4
  113. package/esm2020/src/components/header/metrics/metrics.component.mjs +4 -4
  114. package/esm2020/src/components/header/metrics/metrics.module.mjs +4 -4
  115. package/esm2020/src/flow-routing.module.mjs +4 -4
  116. package/esm2020/src/flow.component.mjs +3 -3
  117. package/esm2020/src/flow.module.mjs +4 -4
  118. package/esm2020/src/guards/context.guard.mjs +3 -3
  119. package/esm2020/src/guards/product-unload.guard.mjs +3 -3
  120. package/esm2020/src/guards/root.guard.mjs +3 -3
  121. package/esm2020/src/pages/assets/assets.component.mjs +3 -3
  122. package/esm2020/src/pages/assets/assets.module.mjs +4 -4
  123. package/esm2020/src/pages/catalog/catalog.component.mjs +3 -3
  124. package/esm2020/src/pages/catalog/catalog.module.mjs +4 -4
  125. package/esm2020/src/pages/debug/debug.component.mjs +3 -3
  126. package/esm2020/src/pages/debug/debug.module.mjs +4 -4
  127. package/esm2020/src/pages/empty-account/empty-account.component.mjs +3 -3
  128. package/esm2020/src/pages/empty-account/empty-account.module.mjs +4 -4
  129. package/esm2020/src/pages/legacy-product/legacy-product.component.mjs +3 -3
  130. package/esm2020/src/pages/legacy-product/legacy-product.module.mjs +4 -4
  131. package/esm2020/src/pages/product/product.component.mjs +3 -3
  132. package/esm2020/src/pages/product/product.module.mjs +4 -4
  133. package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +3 -3
  134. package/esm2020/src/pages/record-not-found/record-not-found.module.mjs +4 -4
  135. package/esm2020/src/pages/remote/remote.component.mjs +3 -3
  136. package/esm2020/src/pages/remote/remote.module.mjs +4 -4
  137. package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +3 -3
  138. package/esm2020/src/pages/shopping-cart/shopping-cart.module.mjs +4 -4
  139. package/esm2020/src/resolvers/flow.resolver.mjs +3 -3
  140. package/esm2020/src/resolvers/quote.resolver.mjs +3 -3
  141. package/esm2020/src/services/doc-gen.service.mjs +3 -3
  142. package/esm2020/src/services/flow-dialog.service.mjs +3 -3
  143. package/esm2020/src/services/flow-router.service.mjs +5 -5
  144. package/esm2020/src/services/flow.service.mjs +13 -5
  145. package/esm2020/src/services/guided-selling.service.mjs +3 -3
  146. package/fesm2015/veloceapps-sdk-cms.mjs +1192 -1181
  147. package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
  148. package/fesm2015/veloceapps-sdk-core.mjs +777 -753
  149. package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
  150. package/fesm2015/veloceapps-sdk-runtime.mjs +137 -137
  151. package/fesm2015/veloceapps-sdk.mjs +217 -211
  152. package/fesm2015/veloceapps-sdk.mjs.map +1 -1
  153. package/fesm2020/veloceapps-sdk-cms.mjs +1016 -1004
  154. package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
  155. package/fesm2020/veloceapps-sdk-core.mjs +445 -419
  156. package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
  157. package/fesm2020/veloceapps-sdk-runtime.mjs +137 -137
  158. package/fesm2020/veloceapps-sdk.mjs +216 -211
  159. package/fesm2020/veloceapps-sdk.mjs.map +1 -1
  160. package/package.json +3 -3
  161. package/src/components/doc-gen/doc-gen.component.d.ts +3 -6
  162. package/src/components/guided-selling/guided-selling.component.d.ts +2 -4
@@ -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, ConfigurationMode, ConfigurationTranslatorUtils, getUIDefinitionProperties, ChargeGroupUtils, DEFAULT_CURRENCY_ISO_CODE, DEFAULT_CURRENCY_SYMBOL, validateDateFormat, DEFAULT_DATE_FORMAT, DEFAULT_DECIMALS_COUNT, getSupportedDateFormats, DEFAULT_DECIMAL_SEPARATOR, DEFAULT_THOUSANDS_SEPARATOR, parseJsonSafely, 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, throwError, shareReplay as shareReplay$1, tap as tap$1, map as map$2, 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,6 +561,26 @@ var lineItem_utils = /*#__PURE__*/Object.freeze({
708
561
  upsertAttributes: upsertAttributes
709
562
  });
710
563
 
564
+ const FORMATTING_SETTINGS_TOKEN = new InjectionToken('Summary of formatting settings for variant types of data, e.g. numbers, text, dates, etc');
565
+
566
+ var RuntimeMode;
567
+ (function (RuntimeMode) {
568
+ RuntimeMode[RuntimeMode["TEST"] = 0] = "TEST";
569
+ RuntimeMode[RuntimeMode["PROD"] = 1] = "PROD";
570
+ })(RuntimeMode || (RuntimeMode = {}));
571
+ var RuntimeOperation;
572
+ (function (RuntimeOperation) {
573
+ RuntimeOperation["INIT"] = "INIT";
574
+ RuntimeOperation["UPDATE"] = "UPDATE";
575
+ })(RuntimeOperation || (RuntimeOperation = {}));
576
+ var RuntimeStep;
577
+ (function (RuntimeStep) {
578
+ RuntimeStep["START"] = "START";
579
+ RuntimeStep["UPDATE"] = "UPDATE";
580
+ })(RuntimeStep || (RuntimeStep = {}));
581
+
582
+ const UI_DEFINITION_VERSION = 3;
583
+
711
584
  class LineItemWorker {
712
585
  constructor(src) {
713
586
  this.li = { ...src };
@@ -738,6 +611,7 @@ class ConfigurationService {
738
611
  this.lineItem = new BehaviorSubject(undefined);
739
612
  this.charges = new BehaviorSubject({});
740
613
  this.pricePlans = new BehaviorSubject({});
614
+ this.procedureContext = new BehaviorSubject({});
741
615
  this.isLoadingSubj$ = new BehaviorSubject(false);
742
616
  this.isLoading$ = this.isLoadingSubj$.asObservable();
743
617
  this.hasUnsavedChanges = false;
@@ -814,6 +688,12 @@ class ConfigurationService {
814
688
  get pricePlansSnapshot() {
815
689
  return this.pricePlans.value;
816
690
  }
691
+ get procedureContext$() {
692
+ return this.procedureContext.asObservable();
693
+ }
694
+ get procedureContextSnapshot() {
695
+ return this.procedureContext.value;
696
+ }
817
697
  configure() {
818
698
  return this.configureRequest$(this.generateRequest());
819
699
  }
@@ -824,10 +704,11 @@ class ConfigurationService {
824
704
  const mainPricingEnabled = runtimeContext.properties?.PricingEnabled;
825
705
  const pricingEnabled = mainPricingEnabled ? mainPricingEnabled === 'true' : uiDefinitionProperties.pricingEnabled;
826
706
  this.isLoadingSubj$.next(true);
827
- return this.configurationApiService.configureLineItem({ configurationRequest, runtimeModel, pricingEnabled }).pipe(tap(({ lineItem, context, charges, pricePlans, deletedLineItems }) => {
707
+ return this.configurationApiService.configureLineItem({ configurationRequest, runtimeModel, pricingEnabled }).pipe(tap(({ lineItem, context, charges, pricePlans, deletedLineItems, procedureContext }) => {
828
708
  this.contextService.update(context ?? {});
829
709
  this.charges.next(charges ?? {});
830
710
  this.pricePlans.next(pricePlans ?? {});
711
+ this.procedureContext.next(procedureContext ?? {});
831
712
  if (lineItem) {
832
713
  this.lineItem.next(lineItem);
833
714
  }
@@ -920,179 +801,50 @@ class ConfigurationService {
920
801
  return this.quoteDraftService.quoteDraft?.initialState.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);
921
802
  }
922
803
  }
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: [{
804
+ 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 });
805
+ ConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService });
806
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationService, decorators: [{
926
807
  type: Injectable
927
808
  }], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: ConfigurationRuntimeService }, { type: ContextService }, { type: i1.ConfigurationApiService }, { type: i5.MessageService }, { type: i6.DialogService }]; } });
928
809
 
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 })),
810
+ function extractMetadata(uiDefinition) {
811
+ return omit(uiDefinition, [
812
+ 'children',
813
+ 'pages',
814
+ 'components',
815
+ ]);
816
+ }
817
+
818
+ class FlowUpdateService {
819
+ update(rootLineItems, updates, charges) {
820
+ let remainingUpdates = [...updates];
821
+ let currentLevel = rootLineItems;
822
+ while (currentLevel.length && remainingUpdates.length) {
823
+ currentLevel.forEach(li => {
824
+ const unhandledUpdates = [];
825
+ remainingUpdates.forEach(update => {
826
+ let updated = false;
827
+ switch (update.dataType) {
828
+ case 'LINEITEM':
829
+ updated = this.applyLineItemUpdate(li, update, charges);
830
+ break;
831
+ case 'CHARGE':
832
+ updated = this.applyChargeUpdate(li, update);
833
+ break;
834
+ case 'GROUP_CHARGE':
835
+ updated = this.applyChargeGroupUpdate(li, update);
836
+ break;
837
+ default:
838
+ // Unknown dataType. Do not try to handle it anymore
839
+ updated = true;
840
+ }
841
+ if (!updated) {
842
+ unhandledUpdates.push(update);
843
+ }
844
+ });
845
+ remainingUpdates = unhandledUpdates;
949
846
  });
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: [{
1055
- type: Injectable
1056
- }], ctorParameters: function () { return [{ type: i1.StatefulConfigurationApiService }, { type: ConfigurationRuntimeService }, { type: ConfigurationService }, { type: i4.ToastService }]; } });
1057
-
1058
- function extractMetadata(uiDefinition) {
1059
- return omit(uiDefinition, [
1060
- 'children',
1061
- 'pages',
1062
- 'components',
1063
- ]);
1064
- }
1065
-
1066
- class FlowUpdateService {
1067
- update(rootLineItems, updates, charges) {
1068
- let remainingUpdates = [...updates];
1069
- let currentLevel = rootLineItems;
1070
- while (currentLevel.length && remainingUpdates.length) {
1071
- currentLevel.forEach(li => {
1072
- const unhandledUpdates = [];
1073
- remainingUpdates.forEach(update => {
1074
- let updated = false;
1075
- switch (update.dataType) {
1076
- case 'LINEITEM':
1077
- updated = this.applyLineItemUpdate(li, update, charges);
1078
- break;
1079
- case 'CHARGE':
1080
- updated = this.applyChargeUpdate(li, update);
1081
- break;
1082
- case 'GROUP_CHARGE':
1083
- updated = this.applyChargeGroupUpdate(li, update);
1084
- break;
1085
- default:
1086
- // Unknown dataType. Do not try to handle it anymore
1087
- updated = true;
1088
- }
1089
- if (!updated) {
1090
- unhandledUpdates.push(update);
1091
- }
1092
- });
1093
- remainingUpdates = unhandledUpdates;
1094
- });
1095
- currentLevel = flatten(currentLevel.map(parent => parent.lineItems));
847
+ currentLevel = flatten(currentLevel.map(parent => parent.lineItems));
1096
848
  }
1097
849
  }
1098
850
  delete(lineItems, id) {
@@ -1135,6 +887,7 @@ class FlowUpdateService {
1135
887
  }
1136
888
  break;
1137
889
  case 'LIST_PRICE_ADJUSTMENT':
890
+ case 'MARGIN_ADJUSTMENT':
1138
891
  {
1139
892
  const charge = lineItem.chargeItems.find(charge => (charges || {})[charge.chargeId]?.main);
1140
893
  if (charge) {
@@ -1142,6 +895,14 @@ class FlowUpdateService {
1142
895
  }
1143
896
  }
1144
897
  break;
898
+ case 'COST_ADJUSTMENT':
899
+ {
900
+ const charge = lineItem.chargeItems.find(charge => (charges || {})[charge.chargeId]?.main);
901
+ if (charge) {
902
+ charge.costAdjustment = update.newValue;
903
+ }
904
+ }
905
+ break;
1145
906
  default:
1146
907
  throw new Error(`Not suppored AttributeType for LineItem update: ${update.attributeType}`);
1147
908
  }
@@ -1180,9 +941,9 @@ class FlowUpdateService {
1180
941
  return true;
1181
942
  }
1182
943
  }
1183
- FlowUpdateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowUpdateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1184
- FlowUpdateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowUpdateService });
1185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowUpdateService, decorators: [{
944
+ FlowUpdateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowUpdateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
945
+ FlowUpdateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowUpdateService });
946
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowUpdateService, decorators: [{
1186
947
  type: Injectable
1187
948
  }] });
1188
949
 
@@ -1315,54 +1076,12 @@ class FlowConfigurationService {
1315
1076
  };
1316
1077
  }
1317
1078
  }
1318
- 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 });
1319
- FlowConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationService });
1320
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationService, decorators: [{
1079
+ 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 });
1080
+ FlowConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationService });
1081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationService, decorators: [{
1321
1082
  type: Injectable
1322
1083
  }], ctorParameters: function () { return [{ type: i1.ProceduresApiService }, { type: ContextService }, { type: QuoteDraftService }, { type: FlowUpdateService }, { type: ConfigurationService }]; } });
1323
1084
 
1324
- class FlowConfigurationModule {
1325
- }
1326
- FlowConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1327
- FlowConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationModule });
1328
- FlowConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationModule, providers: [FlowConfigurationService, FlowUpdateService, PriceApiService] });
1329
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowConfigurationModule, decorators: [{
1330
- type: NgModule,
1331
- args: [{
1332
- imports: [],
1333
- providers: [FlowConfigurationService, FlowUpdateService, PriceApiService],
1334
- }]
1335
- }] });
1336
-
1337
- class ConfigurationModule {
1338
- }
1339
- ConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1340
- ConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationModule, imports: [ConfirmationDialogModule] });
1341
- ConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationModule, providers: [
1342
- ContextApiService,
1343
- ProductModelApiService,
1344
- ConfigurationApiService,
1345
- ConfigurationRuntimeService,
1346
- RuntimeContextService,
1347
- ConfigurationService,
1348
- ConfigurationState,
1349
- ], imports: [ConfirmationDialogModule] });
1350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationModule, decorators: [{
1351
- type: NgModule,
1352
- args: [{
1353
- imports: [ConfirmationDialogModule],
1354
- providers: [
1355
- ContextApiService,
1356
- ProductModelApiService,
1357
- ConfigurationApiService,
1358
- ConfigurationRuntimeService,
1359
- RuntimeContextService,
1360
- ConfigurationService,
1361
- ConfigurationState,
1362
- ],
1363
- }]
1364
- }] });
1365
-
1366
1085
  function calculateMetricByMethod(lineItems, metric, method) {
1367
1086
  const items = getLineItemsByMethod(lineItems, method);
1368
1087
  return items.reduce((acc, li) => {
@@ -1472,9 +1191,9 @@ class MetricsCalculationService {
1472
1191
  return this.activeMetricRules.find(metricRule => metricRule.metrics.find(metric => metric.totalName === name));
1473
1192
  }
1474
1193
  }
1475
- 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 });
1476
- MetricsCalculationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsCalculationService, providedIn: 'root' });
1477
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsCalculationService, decorators: [{
1194
+ 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 });
1195
+ MetricsCalculationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsCalculationService, providedIn: 'root' });
1196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsCalculationService, decorators: [{
1478
1197
  type: Injectable,
1479
1198
  args: [{ providedIn: 'root' }]
1480
1199
  }], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: FlowConfigurationService }, { type: i1.ConfigurationSettingsApiService }]; } });
@@ -1498,9 +1217,9 @@ class ProductImagesService {
1498
1217
  .subscribe();
1499
1218
  }
1500
1219
  }
1501
- ProductImagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductImagesService, deps: [{ token: i1.ProductApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1502
- ProductImagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductImagesService, providedIn: 'root' });
1503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductImagesService, decorators: [{
1220
+ ProductImagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService, deps: [{ token: i1.ProductApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1221
+ ProductImagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService, providedIn: 'root' });
1222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService, decorators: [{
1504
1223
  type: Injectable,
1505
1224
  args: [{ providedIn: 'root' }]
1506
1225
  }], ctorParameters: function () { return [{ type: i1.ProductApiService }]; } });
@@ -1587,13 +1306,320 @@ class RuntimeSettingsService {
1587
1306
  }, {});
1588
1307
  }
1589
1308
  }
1590
- RuntimeSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeSettingsService, deps: [{ token: i1.ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1591
- RuntimeSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeSettingsService, providedIn: 'root' });
1592
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeSettingsService, decorators: [{
1309
+ RuntimeSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, deps: [{ token: i1.ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1310
+ RuntimeSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, providedIn: 'root' });
1311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, decorators: [{
1593
1312
  type: Injectable,
1594
1313
  args: [{ providedIn: 'root' }]
1595
1314
  }], ctorParameters: function () { return [{ type: i1.ConfigurationSettingsApiService }]; } });
1596
1315
 
1316
+ class RuntimeContextService {
1317
+ constructor(configurationApiService) {
1318
+ this.configurationApiService = configurationApiService;
1319
+ }
1320
+ getRuntimeContext(productId, offeringId) {
1321
+ return this.configurationApiService.getRuntimeDataByProductId(productId, offeringId).pipe(map(runtimeData => {
1322
+ const uiDefinitionContainer = this.getUIDefinitionContainer(runtimeData);
1323
+ const runtimeModel = RuntimeModel.create(runtimeData.types, runtimeData.products);
1324
+ const { productName, properties } = Array.from(runtimeModel.components.values()).find(c => c.productId === productId) ?? {};
1325
+ const uiDefinitionProperties = getUIDefinitionProperties(uiDefinitionContainer);
1326
+ return {
1327
+ modelId: runtimeData.modelId,
1328
+ uiDefinitionContainer: uiDefinitionContainer,
1329
+ runtimeModel: runtimeModel,
1330
+ runtimeMode: RuntimeMode.PROD,
1331
+ productId: productId,
1332
+ productType: properties?.['displayName'] || productName,
1333
+ offeringId: offeringId,
1334
+ properties: {
1335
+ PricingEnabled: uiDefinitionProperties.pricingEnabled ? 'true' : 'false',
1336
+ PriceListId: uiDefinitionProperties.priceList,
1337
+ },
1338
+ };
1339
+ }));
1340
+ }
1341
+ getUIDefinitionContainer(runtimeData) {
1342
+ const containers = runtimeData.uiDefinitions.filter(container => !isLegacyUIDefinition(container.source));
1343
+ return containers.find(container => container.source.primary) ?? containers[0];
1344
+ }
1345
+ }
1346
+ RuntimeContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeContextService, deps: [{ token: i1.ConfigurationApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1347
+ RuntimeContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeContextService });
1348
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeContextService, decorators: [{
1349
+ type: Injectable
1350
+ }], ctorParameters: function () { return [{ type: i1.ConfigurationApiService }]; } });
1351
+
1352
+ class ConfigurationRuntimeService {
1353
+ constructor(apiService, contextService, runtimeContextService) {
1354
+ this.apiService = apiService;
1355
+ this.contextService = contextService;
1356
+ this.runtimeContextService = runtimeContextService;
1357
+ this._isInitialized = false;
1358
+ this.uiDefinitionProperties = {};
1359
+ }
1360
+ reset() {
1361
+ this._isInitialized = false;
1362
+ this._runtimeContext = undefined;
1363
+ this.initializationProps = undefined;
1364
+ this.uiDefinitionProperties = {};
1365
+ }
1366
+ initTestMode(uiDefinitionContainer) {
1367
+ this.uiDefinitionProperties = getUIDefinitionProperties(uiDefinitionContainer);
1368
+ const uiDefinitionExternals = uiDefinitionContainer.source.externals ?? {};
1369
+ return combineLatest([
1370
+ this.apiService.getRuntimeDataByModelId(uiDefinitionContainer.modelId),
1371
+ this.contextService.initTestMode(),
1372
+ ]).pipe(first(), map(([runtimeData, context]) => {
1373
+ this.contextService.update({
1374
+ properties: {
1375
+ ...this.runtimeContext?.properties,
1376
+ ...context.properties,
1377
+ ModelId: uiDefinitionContainer.modelId,
1378
+ PricingEnabled: this.uiDefinitionProperties.pricingEnabled ? 'true' : 'false',
1379
+ PriceListId: this.uiDefinitionProperties.priceList,
1380
+ offeringId: this.uiDefinitionProperties.offeringId,
1381
+ ...uiDefinitionExternals,
1382
+ },
1383
+ });
1384
+ this._runtimeContext = {
1385
+ modelId: uiDefinitionContainer.modelId,
1386
+ runtimeModel: RuntimeModel.create(runtimeData.types, runtimeData.products),
1387
+ runtimeMode: RuntimeMode.TEST,
1388
+ uiDefinitionContainer,
1389
+ };
1390
+ return this._runtimeContext;
1391
+ }), tap(() => (this._isInitialized = true)));
1392
+ }
1393
+ init(props) {
1394
+ this.initializationProps = props;
1395
+ const context = this.contextService.resolve();
1396
+ return this.runtimeContextService.getRuntimeContext(props.productId, props.offeringId).pipe(tap(runtimeContext => {
1397
+ this.uiDefinitionProperties = getUIDefinitionProperties(runtimeContext.uiDefinitionContainer);
1398
+ const { PriceListId } = context.properties ?? {};
1399
+ const mergeContext = {
1400
+ ...runtimeContext,
1401
+ properties: {
1402
+ ...runtimeContext.properties,
1403
+ ...context.properties,
1404
+ PricingEnabled: PriceListId ? 'true' : 'false',
1405
+ },
1406
+ };
1407
+ this.id15to18('AccountId', mergeContext.properties);
1408
+ this._runtimeContext = mergeContext;
1409
+ if (context.properties && this._runtimeContext.properties?.StartDate) {
1410
+ this.contextService.update({
1411
+ properties: {
1412
+ ...this._runtimeContext.properties,
1413
+ ...context.properties,
1414
+ },
1415
+ });
1416
+ }
1417
+ return this._runtimeContext;
1418
+ }), tap(() => (this._isInitialized = true)));
1419
+ }
1420
+ overrideUIDefinition(uiDefinitionContainer) {
1421
+ if (!this._runtimeContext) {
1422
+ return;
1423
+ }
1424
+ this._runtimeContext.uiDefinitionContainer = uiDefinitionContainer;
1425
+ this.uiDefinitionProperties = getUIDefinitionProperties(uiDefinitionContainer);
1426
+ }
1427
+ id15to18(propertyName, source) {
1428
+ if (!source) {
1429
+ return;
1430
+ }
1431
+ const value = source[propertyName];
1432
+ if (typeof value === 'string' && value.length === 15) {
1433
+ source[propertyName] = SalesforceIdUtils.generateId18FromId15(value);
1434
+ }
1435
+ }
1436
+ get isInitialized() {
1437
+ return this._isInitialized;
1438
+ }
1439
+ get runtimeModel() {
1440
+ return this.runtimeContext?.runtimeModel;
1441
+ }
1442
+ get runtimeContext() {
1443
+ return this._runtimeContext;
1444
+ }
1445
+ }
1446
+ 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 });
1447
+ ConfigurationRuntimeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationRuntimeService });
1448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationRuntimeService, decorators: [{
1449
+ type: Injectable
1450
+ }], ctorParameters: function () { return [{ type: i1.ConfigurationApiService }, { type: ContextService }, { type: RuntimeContextService }]; } });
1451
+
1452
+ class ConfigurationState {
1453
+ constructor(statefulConfigurationApiService, runtimeService, configurationService, toastService) {
1454
+ this.statefulConfigurationApiService = statefulConfigurationApiService;
1455
+ this.runtimeService = runtimeService;
1456
+ this.configurationService = configurationService;
1457
+ this.toastService = toastService;
1458
+ this.stateSubj$ = new BehaviorSubject({});
1459
+ this.state$ = this.stateSubj$.asObservable();
1460
+ this.stateId = null;
1461
+ }
1462
+ init$() {
1463
+ return this.configurationService.configure().pipe(switchMap$1(() => {
1464
+ if (!this.isStatefulConfiguration) {
1465
+ return of(undefined);
1466
+ }
1467
+ const { actions, selectors } = this.runtimeService.runtimeContext?.uiDefinitionContainer ?? {};
1468
+ return this.statefulConfigurationApiService.init({
1469
+ request: this.configurationService.generateRequest(),
1470
+ actions: actions?.map(action => ({ name: action.apiName, script: action.script })),
1471
+ selectors: selectors?.map(selector => ({ name: selector.apiName, script: selector.script })),
1472
+ });
1473
+ }), tap$1(stateId => (this.stateId = stateId || null)), map$2(() => undefined));
1474
+ }
1475
+ cleanup() {
1476
+ this.stateId = null;
1477
+ this.configurationService.reset();
1478
+ this.stateSubj$.next({});
1479
+ }
1480
+ execute$(req) {
1481
+ if (this.isStatefulConfiguration) {
1482
+ return this.executeStateful$(req);
1483
+ }
1484
+ else {
1485
+ return this.executeStateless$(req);
1486
+ }
1487
+ }
1488
+ dispatch$(actionName, inputData) {
1489
+ return this.execute$({ actions: [{ name: actionName, inputData }] });
1490
+ }
1491
+ select$(selectorName, inputData) {
1492
+ const requestId = UUID.UUID();
1493
+ return this.execute$({
1494
+ selectors: {
1495
+ [requestId]: {
1496
+ name: selectorName,
1497
+ inputData,
1498
+ },
1499
+ },
1500
+ }).pipe(map$2(() => this.stateSubj$.value[requestId]), tap$1(() => this.stateSubj$.next(omit(this.stateSubj$.value, requestId))));
1501
+ }
1502
+ get isStatefulConfiguration() {
1503
+ return this.runtimeService.uiDefinitionProperties.statefulConfigurationEnabled ?? false;
1504
+ }
1505
+ executeStateless$(request) {
1506
+ return of(undefined).pipe(switchMap$1(() => {
1507
+ // Apply actions and execute configuration/price call
1508
+ // No need to run configuration if no actions in the request
1509
+ if (!request.actions?.length) {
1510
+ return of(undefined);
1511
+ }
1512
+ let configurationRequest = this.configurationService.generateRequest();
1513
+ request.actions.forEach(action => {
1514
+ configurationRequest = this.executeActionScript(configurationRequest, action) ?? configurationRequest;
1515
+ });
1516
+ return this.configurationService.configureRequest$(configurationRequest);
1517
+ }), tap$1(() => {
1518
+ if (!request.selectors) {
1519
+ return;
1520
+ }
1521
+ // Run selectors and apply them to the state
1522
+ const finalConfigurationRequest = this.configurationService.generateRequest();
1523
+ const selectorsResult = EntityUtil.entries(request.selectors).reduce((trunk, [key, selector]) => {
1524
+ trunk[key] = this.executeSelectorScript(finalConfigurationRequest, selector);
1525
+ return trunk;
1526
+ }, {});
1527
+ this.stateSubj$.next({
1528
+ ...this.stateSubj$.value,
1529
+ ...selectorsResult,
1530
+ });
1531
+ }), map$2(() => undefined));
1532
+ }
1533
+ executeStateful$(request) {
1534
+ if (!this.stateId) {
1535
+ return of(undefined);
1536
+ }
1537
+ return this.statefulConfigurationApiService.execute(this.stateId, request).pipe(tap$1(response => {
1538
+ this.stateId = response.stateId;
1539
+ const updatedState = this.stateSubj$.value;
1540
+ EntityUtil.entries(response.selectors).forEach(([key, value]) => {
1541
+ if (!value.success) {
1542
+ if (!this.runtimeService.uiDefinitionProperties.suppressToastMessages) {
1543
+ this.toastService.add({ summary: value.errorMessage, severity: ToastType.error });
1544
+ }
1545
+ return;
1546
+ }
1547
+ updatedState[key] = value.result;
1548
+ });
1549
+ this.stateSubj$.next(updatedState);
1550
+ }), map$2(() => undefined));
1551
+ }
1552
+ executeActionScript(request, processor) {
1553
+ const { actions } = this.runtimeService.runtimeContext?.uiDefinitionContainer ?? {};
1554
+ const script = actions?.find(action => action.apiName === processor.name)?.script;
1555
+ if (!script) {
1556
+ return null;
1557
+ }
1558
+ return this.executeProcessorScript(request, script, processor.inputData);
1559
+ }
1560
+ executeSelectorScript(request, processor) {
1561
+ const { selectors } = this.runtimeService.runtimeContext?.uiDefinitionContainer ?? {};
1562
+ const script = selectors?.find(selector => selector.apiName === processor.name)?.script;
1563
+ if (!script) {
1564
+ return null;
1565
+ }
1566
+ return this.executeProcessorScript(request, script, processor.inputData);
1567
+ }
1568
+ executeProcessorScript(request, script, inputData) {
1569
+ return new Function(`${script}\nreturn transform;`)()({
1570
+ request,
1571
+ inputData: inputData,
1572
+ });
1573
+ }
1574
+ }
1575
+ 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 });
1576
+ ConfigurationState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationState });
1577
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationState, decorators: [{
1578
+ type: Injectable
1579
+ }], ctorParameters: function () { return [{ type: i1.StatefulConfigurationApiService }, { type: ConfigurationRuntimeService }, { type: ConfigurationService }, { type: i4.ToastService }]; } });
1580
+
1581
+ class FlowConfigurationModule {
1582
+ }
1583
+ FlowConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1584
+ FlowConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule });
1585
+ FlowConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, providers: [FlowConfigurationService, FlowUpdateService, PriceApiService] });
1586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, decorators: [{
1587
+ type: NgModule,
1588
+ args: [{
1589
+ imports: [],
1590
+ providers: [FlowConfigurationService, FlowUpdateService, PriceApiService],
1591
+ }]
1592
+ }] });
1593
+
1594
+ class ConfigurationModule {
1595
+ }
1596
+ ConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1597
+ ConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, imports: [ConfirmationDialogModule] });
1598
+ ConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, providers: [
1599
+ ContextApiService,
1600
+ ProductModelApiService,
1601
+ ConfigurationApiService,
1602
+ ConfigurationRuntimeService,
1603
+ RuntimeContextService,
1604
+ ConfigurationService,
1605
+ ConfigurationState,
1606
+ ], imports: [ConfirmationDialogModule] });
1607
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, decorators: [{
1608
+ type: NgModule,
1609
+ args: [{
1610
+ imports: [ConfirmationDialogModule],
1611
+ providers: [
1612
+ ContextApiService,
1613
+ ProductModelApiService,
1614
+ ConfigurationApiService,
1615
+ ConfigurationRuntimeService,
1616
+ RuntimeContextService,
1617
+ ConfigurationService,
1618
+ ConfigurationState,
1619
+ ],
1620
+ }]
1621
+ }] });
1622
+
1597
1623
  const DEFAULT_FORMATTING_SETTINGS = {
1598
1624
  currencySymbol: DEFAULT_CURRENCY_SYMBOL,
1599
1625
  decimalsCount: DEFAULT_DECIMALS_COUNT,
@@ -1603,9 +1629,9 @@ const DEFAULT_FORMATTING_SETTINGS = {
1603
1629
  };
1604
1630
  class SdkCoreModule {
1605
1631
  }
1606
- SdkCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1607
- SdkCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: SdkCoreModule, imports: [ConfigurationModule, FlowConfigurationModule] });
1608
- SdkCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkCoreModule, providers: [
1632
+ SdkCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1633
+ SdkCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, imports: [ConfigurationModule, FlowConfigurationModule] });
1634
+ SdkCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, providers: [
1609
1635
  ContextService,
1610
1636
  QuoteDraftService,
1611
1637
  ProductImagesService,
@@ -1616,7 +1642,7 @@ SdkCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
1616
1642
  useExisting: RuntimeSettingsService,
1617
1643
  },
1618
1644
  ], imports: [ConfigurationModule, FlowConfigurationModule] });
1619
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkCoreModule, decorators: [{
1645
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, decorators: [{
1620
1646
  type: NgModule,
1621
1647
  args: [{
1622
1648
  imports: [ConfigurationModule, FlowConfigurationModule],
@@ -1657,9 +1683,9 @@ class CalendarDirective {
1657
1683
  }
1658
1684
  }
1659
1685
  }
1660
- CalendarDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CalendarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1661
- CalendarDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.8", type: CalendarDirective, selector: "[vlCalendar]", inputs: { vlCalendar: "vlCalendar" }, ngImport: i0 });
1662
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CalendarDirective, decorators: [{
1686
+ CalendarDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CalendarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1687
+ CalendarDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: CalendarDirective, selector: "[vlCalendar]", inputs: { vlCalendar: "vlCalendar" }, ngImport: i0 });
1688
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CalendarDirective, decorators: [{
1663
1689
  type: Directive,
1664
1690
  args: [{
1665
1691
  selector: '[vlCalendar]',
@@ -1670,10 +1696,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
1670
1696
 
1671
1697
  class SdkDirectivesModule {
1672
1698
  }
1673
- SdkDirectivesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1674
- SdkDirectivesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: SdkDirectivesModule, declarations: [CalendarDirective], exports: [CalendarDirective] });
1675
- SdkDirectivesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkDirectivesModule });
1676
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkDirectivesModule, decorators: [{
1699
+ SdkDirectivesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1700
+ SdkDirectivesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SdkDirectivesModule, declarations: [CalendarDirective], exports: [CalendarDirective] });
1701
+ SdkDirectivesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkDirectivesModule });
1702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkDirectivesModule, decorators: [{
1677
1703
  type: NgModule,
1678
1704
  args: [{
1679
1705
  declarations: [CalendarDirective],
@@ -1704,9 +1730,9 @@ class DatePipe {
1704
1730
  }
1705
1731
  }
1706
1732
  }
1707
- DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1708
- DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: DatePipe, name: "vlDate" });
1709
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DatePipe, decorators: [{
1733
+ DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1734
+ DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DatePipe, name: "vlDate" });
1735
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatePipe, decorators: [{
1710
1736
  type: Pipe,
1711
1737
  args: [{
1712
1738
  name: 'vlDate',
@@ -1726,9 +1752,9 @@ class NumberPipe {
1726
1752
  return formatNumber(price, this.formattingSettings?.thousandsSeparator, this.formattingSettings?.decimalSeparator, this.formattingSettings?.decimalsCount);
1727
1753
  }
1728
1754
  }
1729
- NumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1730
- NumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: NumberPipe, name: "vlNumber" });
1731
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: NumberPipe, decorators: [{
1755
+ NumberPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1756
+ NumberPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NumberPipe, name: "vlNumber" });
1757
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NumberPipe, decorators: [{
1732
1758
  type: Pipe,
1733
1759
  args: [{
1734
1760
  name: 'vlNumber',
@@ -1751,9 +1777,9 @@ class PricePipe {
1751
1777
  return `${this.formattingSettings?.currencySymbol || DEFAULT_CURRENCY_SYMBOL}${formatNumber(price, this.formattingSettings?.thousandsSeparator, this.formattingSettings?.decimalSeparator, this.formattingSettings?.decimalsCount)}`;
1752
1778
  }
1753
1779
  }
1754
- PricePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PricePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1755
- PricePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: PricePipe, name: "vlPrice" });
1756
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PricePipe, decorators: [{
1780
+ PricePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PricePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1781
+ PricePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: PricePipe, name: "vlPrice" });
1782
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PricePipe, decorators: [{
1757
1783
  type: Pipe,
1758
1784
  args: [{
1759
1785
  name: 'vlPrice',
@@ -1762,10 +1788,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
1762
1788
 
1763
1789
  class SdkPipesModule {
1764
1790
  }
1765
- SdkPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1766
- SdkPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: SdkPipesModule, declarations: [NumberPipe, PricePipe, DatePipe], exports: [NumberPipe, PricePipe, DatePipe] });
1767
- SdkPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkPipesModule });
1768
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SdkPipesModule, decorators: [{
1791
+ SdkPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1792
+ SdkPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SdkPipesModule, declarations: [NumberPipe, PricePipe, DatePipe], exports: [NumberPipe, PricePipe, DatePipe] });
1793
+ SdkPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkPipesModule });
1794
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkPipesModule, decorators: [{
1769
1795
  type: NgModule,
1770
1796
  args: [{
1771
1797
  declarations: [NumberPipe, PricePipe, DatePipe],