@veloceapps/sdk 8.0.0-133 → 8.0.0-135

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ import { UUID, ConfigurationContextMode, ConfigurationContext, UITemplateType, i
4
4
  import { BehaviorSubject, switchMap, map as map$1, tap as tap$1, noop, catchError, throwError, of, forkJoin, Subject, filter as filter$1, zip, combineLatest, shareReplay as shareReplay$1, finalize, takeUntil, take as take$1, distinctUntilChanged } from 'rxjs';
5
5
  import { map, filter, tap, switchMap as switchMap$1, skip, take, shareReplay, catchError as catchError$1, finalize as finalize$1, first } from 'rxjs/operators';
6
6
  import * as i1 from '@veloceapps/api';
7
- import { PriceApiService, ContextApiService, ProductModelApiService, ConfigurationApiService } from '@veloceapps/api';
7
+ import { ApiModule } from '@veloceapps/api';
8
8
  import { merge, isEmpty, flatten, sortBy, map as map$2, omit, isEqual, cloneDeep, assign, uniqBy, transform, uniq } from 'lodash';
9
9
  import * as i6 from '@veloceapps/components';
10
10
  import { ToastType, ConfirmationComponent, ConfirmationDialogModule } from '@veloceapps/components';
@@ -107,16 +107,17 @@ class ContextService {
107
107
  return this.resolve().properties.mode;
108
108
  }
109
109
  get isEditMode$() {
110
- return this.resolve$().pipe(map(() => {
111
- const context = this.resolve();
112
- if (context.mode === ConfigurationContextMode.ACCOUNT) {
113
- return true;
114
- }
115
- if (context.mode === ConfigurationContextMode.QUOTE) {
116
- return context.properties.Status === 'Draft';
117
- }
118
- return false;
119
- }));
110
+ return this.resolve$().pipe(map(() => this.isEditMode));
111
+ }
112
+ get isEditMode() {
113
+ const context = this.resolve();
114
+ if (context.mode === ConfigurationContextMode.ACCOUNT) {
115
+ return true;
116
+ }
117
+ if (context.mode === ConfigurationContextMode.QUOTE) {
118
+ return context.properties.Status === 'Draft';
119
+ }
120
+ return false;
120
121
  }
121
122
  resolve() {
122
123
  if (!this.context.value) {
@@ -154,10 +155,9 @@ class ContextService {
154
155
  }
155
156
  }
156
157
  ContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextService, deps: [{ token: i1.ContextApiService }], target: i0.ɵɵFactoryTarget.Injectable });
157
- ContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextService, providedIn: 'root' });
158
+ ContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextService });
158
159
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextService, decorators: [{
159
- type: Injectable,
160
- args: [{ providedIn: 'root' }]
160
+ type: Injectable
161
161
  }], ctorParameters: function () { return [{ type: i1.ContextApiService }]; } });
162
162
 
163
163
  class FlowInfoService {
@@ -240,10 +240,9 @@ class FlowInfoService {
240
240
  }
241
241
  }
242
242
  FlowInfoService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowInfoService, deps: [{ token: i1.FlowsApiService }, { token: i1.UITemplatesApiService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
243
- FlowInfoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowInfoService, providedIn: 'root' });
243
+ FlowInfoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowInfoService });
244
244
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowInfoService, decorators: [{
245
- type: Injectable,
246
- args: [{ providedIn: 'root' }]
245
+ type: Injectable
247
246
  }], ctorParameters: function () {
248
247
  return [{ type: i1.FlowsApiService }, { type: i1.UITemplatesApiService }, { type: undefined, decorators: [{
249
248
  type: Optional
@@ -497,10 +496,9 @@ class IntegrationState {
497
496
  }
498
497
  }
499
498
  IntegrationState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IntegrationState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
500
- IntegrationState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IntegrationState, providedIn: 'root' });
499
+ IntegrationState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IntegrationState });
501
500
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IntegrationState, decorators: [{
502
- type: Injectable,
503
- args: [{ providedIn: 'root' }]
501
+ type: Injectable
504
502
  }] });
505
503
 
506
504
  class QuoteDraftService {
@@ -728,10 +726,9 @@ class QuoteDraftService {
728
726
  }
729
727
  }
730
728
  QuoteDraftService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService, deps: [{ token: ContextService }, { token: i1.QuoteApiService }, { token: i1.PriceApiService }, { token: IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
731
- QuoteDraftService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService, providedIn: 'root' });
729
+ QuoteDraftService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService });
732
730
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService, decorators: [{
733
- type: Injectable,
734
- args: [{ providedIn: 'root' }]
731
+ type: Injectable
735
732
  }], ctorParameters: function () { return [{ type: ContextService }, { type: i1.QuoteApiService }, { type: i1.PriceApiService }, { type: IntegrationState }]; } });
736
733
 
737
734
  class FlowStateService {
@@ -1176,10 +1173,9 @@ class FlowStateService {
1176
1173
  }
1177
1174
  }
1178
1175
  FlowStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateService, deps: [{ token: ContextService }, { token: QuoteDraftService }, { token: FlowInfoService }, { token: FlowConfigurationService }, { token: i1.ConfigurationProcessorsApiService }, { token: i1.FlowStateApiService }, { token: i1.QuoteApiService }, { token: i6.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1179
- FlowStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateService, providedIn: 'root' });
1176
+ FlowStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateService });
1180
1177
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateService, decorators: [{
1181
- type: Injectable,
1182
- args: [{ providedIn: 'root' }]
1178
+ type: Injectable
1183
1179
  }], ctorParameters: function () {
1184
1180
  return [{ type: ContextService }, { type: QuoteDraftService }, { type: FlowInfoService }, { type: FlowConfigurationService }, { type: i1.ConfigurationProcessorsApiService }, { type: i1.FlowStateApiService }, { type: i1.QuoteApiService }, { type: i6.ToastService }, { type: undefined, decorators: [{
1185
1181
  type: Optional
@@ -1420,10 +1416,9 @@ class RuntimeSettingsService {
1420
1416
  }
1421
1417
  }
1422
1418
  RuntimeSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, deps: [{ token: i1.ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1423
- RuntimeSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, providedIn: 'root' });
1419
+ RuntimeSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService });
1424
1420
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuntimeSettingsService, decorators: [{
1425
- type: Injectable,
1426
- args: [{ providedIn: 'root' }]
1421
+ type: Injectable
1427
1422
  }], ctorParameters: function () { return [{ type: i1.ConfigurationSettingsApiService }]; } });
1428
1423
 
1429
1424
  class ConfigurationService {
@@ -1789,22 +1784,21 @@ class FlowConfigurationService {
1789
1784
  }
1790
1785
  }
1791
1786
  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 });
1792
- FlowConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationService, providedIn: 'root' });
1787
+ FlowConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationService });
1793
1788
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationService, decorators: [{
1794
- type: Injectable,
1795
- args: [{ providedIn: 'root' }]
1789
+ type: Injectable
1796
1790
  }], ctorParameters: function () { return [{ type: i1.ProceduresApiService }, { type: ContextService }, { type: QuoteDraftService }, { type: FlowUpdateService }, { type: ConfigurationService }]; } });
1797
1791
 
1798
1792
  class FlowConfigurationModule {
1799
1793
  }
1800
1794
  FlowConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1801
- FlowConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule });
1802
- FlowConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, providers: [FlowConfigurationService, FlowUpdateService, PriceApiService] });
1795
+ FlowConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, imports: [ApiModule] });
1796
+ FlowConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, providers: [FlowConfigurationService, FlowUpdateService], imports: [ApiModule] });
1803
1797
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowConfigurationModule, decorators: [{
1804
1798
  type: NgModule,
1805
1799
  args: [{
1806
- imports: [],
1807
- providers: [FlowConfigurationService, FlowUpdateService, PriceApiService],
1800
+ imports: [ApiModule],
1801
+ providers: [FlowConfigurationService, FlowUpdateService],
1808
1802
  }]
1809
1803
  }] });
1810
1804
 
@@ -1845,10 +1839,9 @@ class FlowStateConfigurationService {
1845
1839
  }
1846
1840
  }
1847
1841
  FlowStateConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateConfigurationService, deps: [{ token: FlowInfoService }, { token: FlowConfigurationService }, { token: i1.FlowStateApiService }, { token: FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
1848
- FlowStateConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateConfigurationService, providedIn: 'root' });
1842
+ FlowStateConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateConfigurationService });
1849
1843
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateConfigurationService, decorators: [{
1850
- type: Injectable,
1851
- args: [{ providedIn: 'root' }]
1844
+ type: Injectable
1852
1845
  }], ctorParameters: function () { return [{ type: FlowInfoService }, { type: FlowConfigurationService }, { type: i1.FlowStateApiService }, { type: FlowStateService }]; } });
1853
1846
 
1854
1847
  function calculateMetricByMethod(lineItems, metric, method) {
@@ -1962,10 +1955,9 @@ class MetricsCalculationService {
1962
1955
  }
1963
1956
  }
1964
1957
  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 });
1965
- MetricsCalculationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsCalculationService, providedIn: 'root' });
1958
+ MetricsCalculationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsCalculationService });
1966
1959
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: MetricsCalculationService, decorators: [{
1967
- type: Injectable,
1968
- args: [{ providedIn: 'root' }]
1960
+ type: Injectable
1969
1961
  }], ctorParameters: function () { return [{ type: QuoteDraftService }, { type: FlowConfigurationService }, { type: i1.ConfigurationSettingsApiService }]; } });
1970
1962
 
1971
1963
  class ProductImagesService {
@@ -1988,10 +1980,9 @@ class ProductImagesService {
1988
1980
  }
1989
1981
  }
1990
1982
  ProductImagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService, deps: [{ token: i1.ProductApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1991
- ProductImagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService, providedIn: 'root' });
1983
+ ProductImagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService });
1992
1984
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductImagesService, decorators: [{
1993
- type: Injectable,
1994
- args: [{ providedIn: 'root' }]
1985
+ type: Injectable
1995
1986
  }], ctorParameters: function () { return [{ type: i1.ProductApiService }]; } });
1996
1987
 
1997
1988
  class RuntimeContextService {
@@ -2383,29 +2374,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2383
2374
  class ConfigurationModule {
2384
2375
  }
2385
2376
  ConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2386
- ConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, imports: [ConfirmationDialogModule] });
2387
- ConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, providers: [
2388
- ContextApiService,
2389
- ProductModelApiService,
2390
- ConfigurationApiService,
2391
- ConfigurationRuntimeService,
2392
- RuntimeContextService,
2393
- ConfigurationService,
2394
- ConfigurationStateService,
2395
- ], imports: [ConfirmationDialogModule] });
2377
+ ConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, imports: [ConfirmationDialogModule, ApiModule] });
2378
+ ConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, providers: [ConfigurationRuntimeService, RuntimeContextService, ConfigurationService, ConfigurationStateService], imports: [ConfirmationDialogModule, ApiModule] });
2396
2379
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationModule, decorators: [{
2397
2380
  type: NgModule,
2398
2381
  args: [{
2399
- imports: [ConfirmationDialogModule],
2400
- providers: [
2401
- ContextApiService,
2402
- ProductModelApiService,
2403
- ConfigurationApiService,
2404
- ConfigurationRuntimeService,
2405
- RuntimeContextService,
2406
- ConfigurationService,
2407
- ConfigurationStateService,
2408
- ],
2382
+ imports: [ConfirmationDialogModule, ApiModule],
2383
+ providers: [ConfigurationRuntimeService, RuntimeContextService, ConfigurationService, ConfigurationStateService],
2409
2384
  }]
2410
2385
  }] });
2411
2386
 
@@ -2422,7 +2397,15 @@ class SdkCoreModule {
2422
2397
  SdkCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2423
2398
  SdkCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, imports: [ConfigurationModule, FlowConfigurationModule] });
2424
2399
  SdkCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SdkCoreModule, providers: [
2400
+ ContextService,
2401
+ FlowInfoService,
2402
+ QuoteDraftService,
2403
+ ProductImagesService,
2425
2404
  IntegrationState,
2405
+ FlowStateService,
2406
+ FlowStateConfigurationService,
2407
+ MetricsCalculationService,
2408
+ RuntimeSettingsService,
2426
2409
  {
2427
2410
  provide: FORMATTING_SETTINGS_TOKEN,
2428
2411
  useExisting: RuntimeSettingsService,
@@ -2433,7 +2416,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2433
2416
  args: [{
2434
2417
  imports: [ConfigurationModule, FlowConfigurationModule],
2435
2418
  providers: [
2419
+ ContextService,
2420
+ FlowInfoService,
2421
+ QuoteDraftService,
2422
+ ProductImagesService,
2436
2423
  IntegrationState,
2424
+ FlowStateService,
2425
+ FlowStateConfigurationService,
2426
+ MetricsCalculationService,
2427
+ RuntimeSettingsService,
2437
2428
  {
2438
2429
  provide: FORMATTING_SETTINGS_TOKEN,
2439
2430
  useExisting: RuntimeSettingsService,