@veloceapps/sdk 11.0.0-2 → 11.0.0-21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. package/cms/cms.actions.d.ts +92 -29
  2. package/cms/components/element-renderer/element-renderer.component.d.ts +3 -10
  3. package/cms/services/element-context.service.d.ts +0 -1
  4. package/cms/types/common.types.d.ts +2 -0
  5. package/cms/types/index.d.ts +0 -1
  6. package/cms/utils/path.utils.d.ts +1 -2
  7. package/cms/vendor-map.d.ts +19 -40
  8. package/core/index.d.ts +0 -1
  9. package/core/modules/configuration/index.d.ts +1 -4
  10. package/core/modules/configuration/services/configuration-runtime.service.d.ts +3 -22
  11. package/core/modules/configuration/services/configuration-state.service.d.ts +8 -8
  12. package/core/modules/configuration/services/configuration.service.d.ts +23 -47
  13. package/core/modules/flow-configuration/index.d.ts +0 -3
  14. package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +10 -39
  15. package/core/services/catalog-products.service.d.ts +11 -0
  16. package/core/services/flow-info.service.d.ts +25 -11
  17. package/core/services/flow-state-configuration.service.d.ts +2 -8
  18. package/core/services/flow-state.service.d.ts +13 -22
  19. package/core/services/index.d.ts +2 -3
  20. package/core/services/integration.state.d.ts +1 -1
  21. package/core/services/sales-transaction.service.d.ts +30 -0
  22. package/core/types/flow-state.types.d.ts +2 -2
  23. package/core/types/index.d.ts +0 -1
  24. package/core/utils/index.d.ts +2 -2
  25. package/core/utils/transaction-item.utils.d.ts +7 -0
  26. package/core/utils/transaction-item.worker.d.ts +8 -0
  27. package/esm2020/cms/cms.actions.mjs +93 -71
  28. package/esm2020/cms/cms.default.mjs +2 -3
  29. package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +7 -64
  30. package/esm2020/cms/components/preview/preview.component.mjs +3 -3
  31. package/esm2020/cms/services/element-context.service.mjs +1 -1
  32. package/esm2020/cms/types/common.types.mjs +1 -1
  33. package/esm2020/cms/types/index.mjs +1 -2
  34. package/esm2020/cms/utils/element.utils.mjs +3 -3
  35. package/esm2020/cms/utils/path.utils.mjs +1 -10
  36. package/esm2020/cms/vendor-map.mjs +12 -17
  37. package/esm2020/core/core.module.mjs +9 -7
  38. package/esm2020/core/index.mjs +1 -2
  39. package/esm2020/core/modules/configuration/configuration.module.mjs +3 -4
  40. package/esm2020/core/modules/configuration/index.mjs +2 -5
  41. package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +9 -102
  42. package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +60 -76
  43. package/esm2020/core/modules/configuration/services/configuration.service.mjs +96 -225
  44. package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +3 -4
  45. package/esm2020/core/modules/flow-configuration/index.mjs +1 -4
  46. package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +33 -126
  47. package/esm2020/core/services/catalog-products.service.mjs +25 -0
  48. package/esm2020/core/services/flow-info.service.mjs +77 -29
  49. package/esm2020/core/services/flow-state-configuration.service.mjs +10 -25
  50. package/esm2020/core/services/flow-state.service.mjs +62 -169
  51. package/esm2020/core/services/index.mjs +3 -4
  52. package/esm2020/core/services/integration.state.mjs +2 -2
  53. package/esm2020/core/services/sales-transaction.service.mjs +68 -0
  54. package/esm2020/core/types/flow-state.types.mjs +1 -1
  55. package/esm2020/core/types/index.mjs +1 -2
  56. package/esm2020/core/utils/index.mjs +3 -3
  57. package/esm2020/core/utils/transaction-item.utils.mjs +60 -0
  58. package/esm2020/core/utils/transaction-item.worker.mjs +16 -0
  59. package/esm2020/src/components/flow-header/flow-header.component.mjs +3 -7
  60. package/esm2020/src/components/guided-selling/guided-selling.component.mjs +3 -7
  61. package/esm2020/src/flow-routing.module.mjs +11 -41
  62. package/esm2020/src/flow.component.mjs +5 -5
  63. package/esm2020/src/guards/flow.guard.mjs +13 -14
  64. package/esm2020/src/guards/product-unload.guard.mjs +7 -9
  65. package/esm2020/src/index.mjs +1 -3
  66. package/esm2020/src/pages/assets/assets.component.mjs +3 -4
  67. package/esm2020/src/pages/catalog/catalog.component.mjs +3 -4
  68. package/esm2020/src/pages/debug/debug.component.mjs +12 -21
  69. package/esm2020/src/pages/product/product.component.mjs +12 -82
  70. package/esm2020/src/pages/product/product.module.mjs +5 -5
  71. package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +5 -6
  72. package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +3 -4
  73. package/esm2020/src/resolvers/flow.resolver.mjs +10 -18
  74. package/esm2020/src/resolvers/sales-transaction.resolver.mjs +83 -0
  75. package/esm2020/src/resolvers/ui-definition.resolver.mjs +42 -0
  76. package/esm2020/src/services/flow-dialog.service.mjs +8 -8
  77. package/esm2020/src/services/flow-router.service.mjs +16 -33
  78. package/esm2020/src/services/flow.service.mjs +13 -54
  79. package/esm2020/src/types/index.mjs +2 -3
  80. package/esm2020/src/types/route.types.mjs +1 -1
  81. package/fesm2015/veloceapps-sdk-cms.mjs +126 -268
  82. package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
  83. package/fesm2015/veloceapps-sdk-core.mjs +712 -1644
  84. package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
  85. package/fesm2015/veloceapps-sdk.mjs +167 -763
  86. package/fesm2015/veloceapps-sdk.mjs.map +1 -1
  87. package/fesm2020/veloceapps-sdk-cms.mjs +114 -262
  88. package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
  89. package/fesm2020/veloceapps-sdk-core.mjs +758 -1725
  90. package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
  91. package/fesm2020/veloceapps-sdk.mjs +167 -757
  92. package/fesm2020/veloceapps-sdk.mjs.map +1 -1
  93. package/package.json +1 -1
  94. package/src/components/flow-header/flow-header.component.d.ts +1 -1
  95. package/src/components/guided-selling/guided-selling.component.d.ts +1 -1
  96. package/src/flow-routing.module.d.ts +1 -2
  97. package/src/flow.component.d.ts +2 -2
  98. package/src/guards/product-unload.guard.d.ts +5 -6
  99. package/src/index.d.ts +0 -2
  100. package/src/pages/assets/assets.component.d.ts +1 -1
  101. package/src/pages/catalog/catalog.component.d.ts +1 -1
  102. package/src/pages/debug/debug.component.d.ts +1 -4
  103. package/src/pages/product/product.component.d.ts +5 -14
  104. package/src/pages/product/product.module.d.ts +1 -1
  105. package/src/pages/record-not-found/record-not-found.component.d.ts +2 -3
  106. package/src/pages/shopping-cart/shopping-cart.component.d.ts +1 -1
  107. package/src/resolvers/flow.resolver.d.ts +5 -6
  108. package/src/resolvers/sales-transaction.resolver.d.ts +18 -0
  109. package/src/resolvers/ui-definition.resolver.d.ts +3 -0
  110. package/src/services/flow-dialog.service.d.ts +5 -4
  111. package/src/services/flow-router.service.d.ts +4 -6
  112. package/src/services/flow.service.d.ts +2 -7
  113. package/src/types/index.d.ts +1 -2
  114. package/src/types/route.types.d.ts +0 -5
  115. package/cms/plugins/configuration.plugin.d.ts +0 -23
  116. package/cms/types/configuration.types.d.ts +0 -21
  117. package/core/modules/configuration/helpers.d.ts +0 -6
  118. package/core/modules/configuration/services/runtime-context.service.d.ts +0 -12
  119. package/core/modules/configuration/types/configuration-runtime.types.d.ts +0 -6
  120. package/core/modules/flow-configuration/services/flow-update.service.d.ts +0 -13
  121. package/core/modules/flow-configuration/types/update.types.d.ts +0 -12
  122. package/core/services/context.service.d.ts +0 -23
  123. package/core/services/quote-draft.service.d.ts +0 -50
  124. package/core/types/runtime.types.d.ts +0 -30
  125. package/core/utils/line-item.utils.d.ts +0 -25
  126. package/core/utils/line-item.worker.d.ts +0 -9
  127. package/esm2020/cms/plugins/configuration.plugin.mjs +0 -109
  128. package/esm2020/cms/types/configuration.types.mjs +0 -2
  129. package/esm2020/core/modules/configuration/helpers.mjs +0 -73
  130. package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +0 -43
  131. package/esm2020/core/modules/configuration/types/configuration-runtime.types.mjs +0 -2
  132. package/esm2020/core/modules/flow-configuration/services/flow-update.service.mjs +0 -138
  133. package/esm2020/core/modules/flow-configuration/types/update.types.mjs +0 -2
  134. package/esm2020/core/services/context.service.mjs +0 -91
  135. package/esm2020/core/services/quote-draft.service.mjs +0 -192
  136. package/esm2020/core/types/runtime.types.mjs +0 -16
  137. package/esm2020/core/utils/line-item.utils.mjs +0 -187
  138. package/esm2020/core/utils/line-item.worker.mjs +0 -19
  139. package/esm2020/src/guards/context.guard.mjs +0 -91
  140. package/esm2020/src/guards/index.mjs +0 -2
  141. package/esm2020/src/pages/remote/remote.component.mjs +0 -342
  142. package/esm2020/src/pages/remote/remote.module.mjs +0 -20
  143. package/esm2020/src/pages/remote/remote.types.mjs +0 -2
  144. package/esm2020/src/resolvers/quote.resolver.mjs +0 -82
  145. package/esm2020/src/types/context-route.types.mjs +0 -2
  146. package/esm2020/src/types/metrics.types.mjs +0 -2
  147. package/esm2020/src/utils/flow.utils.mjs +0 -25
  148. package/esm2020/src/utils/index.mjs +0 -2
  149. package/src/guards/context.guard.d.ts +0 -19
  150. package/src/guards/index.d.ts +0 -1
  151. package/src/pages/remote/remote.component.d.ts +0 -46
  152. package/src/pages/remote/remote.module.d.ts +0 -10
  153. package/src/pages/remote/remote.types.d.ts +0 -4
  154. package/src/resolvers/quote.resolver.d.ts +0 -19
  155. package/src/types/context-route.types.d.ts +0 -5
  156. package/src/types/metrics.types.d.ts +0 -5
  157. package/src/utils/flow.utils.d.ts +0 -8
  158. package/src/utils/index.d.ts +0 -1
@@ -1,5 +1,3 @@
1
- import { CustomizationChanges } from '@veloceapps/core';
2
- import { IntegrationAction } from '@veloceapps/sdk/core';
3
1
  export declare namespace FlowAction {
4
2
  const FLOW_CONFIGURE_PRODUCT = "[FLOW]_CONFIGURE_PRODUCT";
5
3
  const FLOW_NAVIGATE_BACK = "[FLOW]_NAVIGATE_BACK";
@@ -16,35 +14,84 @@ export declare namespace FlowAction {
16
14
  const SUBMIT_GUIDED_SELLING = "[FLOW]_SUBMIT_GUIDED_SELLING";
17
15
  const CLOSE_GUIDED_SELLING = "[FLOW]_CLOSE_GUIDED_SELLING";
18
16
  const OPEN_DIALOG = "[FLOW]_OPEN_DIALOG";
19
- const ConfigureProductAction: ({ lineItemId, productId, }: {
20
- lineItemId?: string | undefined;
17
+ const ConfigureProductAction: ({ transactionItemId, productId, }: {
18
+ transactionItemId?: string | undefined;
21
19
  productId?: string | undefined;
22
- }) => IntegrationAction;
23
- const NavigateBackAction: () => IntegrationAction;
24
- const NavigateToAction: (path: string, productId?: string, lineItemId?: string) => IntegrationAction;
25
- const NavigateToCatalogAction: () => IntegrationAction;
26
- const NavigateToShoppingCartAction: () => IntegrationAction;
27
- const ApplyProductConfigurationAction: () => IntegrationAction;
28
- const RemoteApplyAction: () => IntegrationAction;
29
- const RemoteCancelAction: () => IntegrationAction;
20
+ }) => {
21
+ type: string;
22
+ payload: {
23
+ transactionItemId: string | undefined;
24
+ productId: string | undefined;
25
+ };
26
+ };
27
+ const NavigateBackAction: () => {
28
+ type: string;
29
+ };
30
+ const NavigateToAction: (path: string, productId?: string, transactionItemId?: string) => {
31
+ type: string;
32
+ payload: {
33
+ path: string;
34
+ productId: string | undefined;
35
+ transactionItemId: string | undefined;
36
+ };
37
+ };
38
+ const NavigateToCatalogAction: () => {
39
+ type: string;
40
+ };
41
+ const NavigateToShoppingCartAction: () => {
42
+ type: string;
43
+ };
44
+ const ApplyProductConfigurationAction: () => {
45
+ type: string;
46
+ };
47
+ const RemoteApplyAction: () => {
48
+ type: string;
49
+ };
50
+ const RemoteCancelAction: () => {
51
+ type: string;
52
+ };
30
53
  const SwitchObjectAction: (payload: {
31
54
  id: string;
32
- }) => IntegrationAction;
55
+ }) => {
56
+ type: string;
57
+ payload: {
58
+ id: string;
59
+ };
60
+ };
33
61
  const OpenGuidedSelling: (payload: {
34
62
  guidedSellingId: string;
35
- }) => IntegrationAction;
63
+ }) => {
64
+ type: string;
65
+ payload: {
66
+ guidedSellingId: string;
67
+ };
68
+ };
36
69
  const CloseGuidedSelling: (payload?: {
37
70
  keepState?: boolean;
38
- }) => IntegrationAction;
71
+ }) => {
72
+ type: string;
73
+ payload: {
74
+ keepState?: boolean | undefined;
75
+ } | undefined;
76
+ };
39
77
  const SubmitGuidedSelling: (payload: {
40
78
  result: Record<string, any>;
41
- }) => IntegrationAction;
42
- const OpenDialog: (dialog: string) => IntegrationAction;
79
+ }) => {
80
+ type: string;
81
+ payload: {
82
+ result: Record<string, any>;
83
+ };
84
+ };
85
+ const OpenDialog: (dialog: string) => {
86
+ type: string;
87
+ payload: {
88
+ dialog: string;
89
+ };
90
+ };
43
91
  }
44
92
  export declare namespace CmsAction {
45
93
  const GO_TO_PAGE = "[CMS]_GO_TO_PAGE";
46
94
  const UPDATE_CUSTOMIZATION = "[CMS]_UPDATE_CUSTOMIZATION";
47
- const EMIT_CUSTOMIZATION_CHANGES = "[CMS]_EMIT_CUSTOMIZATION_CHANGES";
48
95
  const SHOW_OVERLAY = "[CMS]_SHOW_OVERLAY";
49
96
  const HIDE_OVERLAY = "[CMS]_HIDE_OVERLAY";
50
97
  const HIDE_ALL_OVERLAYS = "[CMS]_HIDE_ALL_OVERLAYS";
@@ -53,37 +100,53 @@ export declare namespace CmsAction {
53
100
  *
54
101
  * @param pageName name of the page
55
102
  */
56
- const GoToPage: (pageName: string) => IntegrationAction;
103
+ const GoToPage: (pageName: string) => {
104
+ type: string;
105
+ payload: {
106
+ pageName: string;
107
+ };
108
+ };
57
109
  /**
58
110
  * Update UI definition customization state
59
111
  *
60
112
  * @param pageName name of the page
61
113
  */
62
- const UpdateCustomization: (value: any) => IntegrationAction;
63
- /**
64
- * Emit customization page changes
65
- *
66
- * @param changes - object with customization page changes
67
- */
68
- const EmitCustomizationChanges: (changes: CustomizationChanges) => IntegrationAction;
114
+ const UpdateCustomization: (value: any) => {
115
+ type: string;
116
+ payload: {
117
+ value: any;
118
+ };
119
+ };
69
120
  /**
70
121
  * Show an Overlay on the selected page
71
122
  *
72
123
  * @param name - name of the overlay
73
124
  * @returns void
74
125
  */
75
- const ShowOverlay: (name: string) => IntegrationAction;
126
+ const ShowOverlay: (name: string) => {
127
+ type: string;
128
+ payload: {
129
+ name: string;
130
+ };
131
+ };
76
132
  /**
77
133
  * Hide an Overlay on the selected page
78
134
  *
79
135
  * @param name - name of the overlay
80
136
  * @returns void
81
137
  */
82
- const HideOverlay: (name: string) => IntegrationAction;
138
+ const HideOverlay: (name: string) => {
139
+ type: string;
140
+ payload: {
141
+ name: string;
142
+ };
143
+ };
83
144
  /**
84
145
  * Hide all Overlays on the selected page
85
146
  *
86
147
  * @returns void
87
148
  */
88
- const HideAllOverlays: () => IntegrationAction;
149
+ const HideAllOverlays: () => {
150
+ type: string;
151
+ };
89
152
  }
@@ -1,36 +1,29 @@
1
- import { ChangeDetectorRef, ElementRef, Injector, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
2
- import { ConfigurationService } from '@veloceapps/sdk/core';
1
+ import { ChangeDetectorRef, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
3
2
  import { RuntimeService } from '../../modules/runtime/services/runtime.service';
4
3
  import { ElementContextService } from '../../services/element-context.service';
5
4
  import { IOProviderService } from '../../services/io-provider.service';
6
5
  import { ElementMetadata } from '../../types/common.types';
7
6
  import * as i0 from "@angular/core";
8
7
  export declare class ElementRendererComponent implements OnInit, OnDestroy {
9
- private parentInjector;
10
8
  private runtimeService;
11
9
  private elementContext;
12
10
  private ioProviderService;
13
- private configurationService;
14
- private elementRef;
15
11
  private cdr;
16
12
  el?: ViewContainerRef;
17
13
  meta: ElementMetadata;
18
14
  private type?;
19
15
  private refs;
20
16
  private destroy$;
21
- constructor(parentInjector: Injector, runtimeService: RuntimeService, elementContext: ElementContextService, ioProviderService: IOProviderService, configurationService: ConfigurationService, elementRef: ElementRef, cdr: ChangeDetectorRef);
17
+ constructor(runtimeService: RuntimeService, elementContext: ElementContextService, ioProviderService: IOProviderService, cdr: ChangeDetectorRef);
22
18
  ngOnInit(): void;
23
19
  ngOnDestroy(): void;
24
20
  private createComponents;
25
21
  private createFromPath;
26
- private getModelComponent;
27
- private createFromLineItem;
28
22
  private processChildren;
29
- private getParentLineItem$;
30
23
  private createComponent;
31
24
  private updateComponent;
32
25
  private destroyComponent;
33
26
  private destroyComponents;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<ElementRendererComponent, [{ skipSelf: true; }, null, null, null, null, null, null]>;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<ElementRendererComponent, never>;
35
28
  static ɵcmp: i0.ɵɵComponentDeclaration<ElementRendererComponent, "vl-cms-element-renderer", never, { "meta": "meta"; }, {}, never, never, false, never>;
36
29
  }
@@ -2,7 +2,6 @@ import { ElementMetadata } from '../types/common.types';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class ElementContextService {
4
4
  metadata?: ElementMetadata;
5
- parentModelId?: string;
6
5
  static ɵfac: i0.ɵɵFactoryDeclaration<ElementContextService, never>;
7
6
  static ɵprov: i0.ɵɵInjectableDeclaration<ElementContextService>;
8
7
  }
@@ -29,6 +29,8 @@ export interface ElementModel {
29
29
  */
30
30
  path?: string;
31
31
  /**
32
+ * @deprecated
33
+ * To be removed!!!
32
34
  * Used only when `UIDefinitionType = CONFIGURATION`.
33
35
  */
34
36
  lineItem?: string;
@@ -1,6 +1,5 @@
1
1
  export * from '../modules/runtime/types/compilation.types';
2
2
  export * from './common.types';
3
- export * from './configuration.types';
4
3
  export * from './elements.types';
5
4
  export * from './layouts.types';
6
5
  export * from './pages.types';
@@ -1,4 +1,3 @@
1
- import { ElementMetadata, ElementPath, PathBlock } from '../types';
2
- export declare const parseBoundPath: (path: string) => PathBlock[];
1
+ import { ElementMetadata, ElementPath } from '../types';
3
2
  export declare const parsePath: (path: string) => ElementPath;
4
3
  export declare const getAbsolutePath: (elements: ElementMetadata[], subject: ElementMetadata, path: ElementPath) => string | undefined;
@@ -1,10 +1,11 @@
1
1
  import { DataSource } from '@angular/cdk/collections';
2
2
  import * as angularCore from '@angular/core';
3
3
  import * as angularForms from '@angular/forms';
4
- import { CatalogApiService, ConfigurationSettingsApiService, ContractedPriceApiService, DeltaApiService, DocumentAttachmentApiService, GuidedSellingApiService, PicklistsApiService, PriceApiService, QuoteApiService, RampApiService, SalesforceApiService, ShoppingCartSettingsApiService } from '@veloceapps/api';
4
+ import { CatalogApiService, ConfigurationSettingsApiService, ContractedPriceApiService, DeltaApiService, DocumentAttachmentApiService, GuidedSellingApiService, PicklistsApiService, PriceApiService, RampApiService, SalesforceApiService, ShoppingCartSettingsApiService } from '@veloceapps/api';
5
+ import { SalesTransactionApiService } from '@veloceapps/api/v2';
5
6
  import { ToastService, ToastType } from '@veloceapps/components';
6
- import { ConfigurationContextMode, Operator, Predicate, parseJsonSafely, parseJwt } from '@veloceapps/core';
7
- import { ActionCodePipe, ConfigurationService, ConfigurationStateService, ContextService, DatePipe, FlowConfigurationService, FlowStateConfigurationService, FlowStateService, IntegrationState, LineItemWorker, NumberPipe, PricePipe, ProductImagesService, QuoteDraftService, RuntimeSettingsService } from '@veloceapps/sdk/core';
7
+ import { Operator, parseJsonSafely, parseJwt, Predicate, TokenInfoService } from '@veloceapps/core';
8
+ import { ActionCodePipe, ConfigurationService, ConfigurationStateService, DatePipe, FlowConfigurationService, FlowStateConfigurationService, FlowStateService, IntegrationState, NumberPipe, PricePipe, ProductImagesService, RuntimeSettingsService, SalesTransactionService, TransactionItemWorker } from '@veloceapps/sdk/core';
8
9
  import lodash from 'lodash';
9
10
  import * as rxjs from 'rxjs';
10
11
  import * as rxjsOperators from 'rxjs/operators';
@@ -12,21 +13,13 @@ import * as cmsActions from './cms.actions';
12
13
  import { ResourcesService } from './services/resources.service';
13
14
  import { TemplatesService } from './services/templates.service';
14
15
  export declare const vendorMap: {
15
- '@angular/core': typeof angularCore;
16
- '@angular/forms': typeof angularForms;
17
- '@angular/cdk/collections': {
18
- DataSource: typeof DataSource;
19
- };
20
- rxjs: typeof rxjs;
21
- 'rxjs/operators': typeof rxjsOperators;
22
- lodash: lodash.LoDashStatic;
23
16
  '@veloceapps/core': {
24
17
  isDefined: <T>(value: T) => value is Exclude<T, null | undefined>;
25
18
  Operator: typeof Operator;
26
19
  Predicate: typeof Predicate;
27
20
  parseJsonSafely: typeof parseJsonSafely;
28
- ConfigurationContextMode: typeof ConfigurationContextMode;
29
21
  parseJwt: typeof parseJwt;
22
+ TokenInfoService: typeof TokenInfoService;
30
23
  };
31
24
  '@veloceapps/components': {
32
25
  ToastService: typeof ToastService;
@@ -34,7 +27,6 @@ export declare const vendorMap: {
34
27
  };
35
28
  '@veloceapps/api': {
36
29
  SalesforceApiService: typeof SalesforceApiService;
37
- QuoteApiService: typeof QuoteApiService;
38
30
  DocumentAttachmentApiService: typeof DocumentAttachmentApiService;
39
31
  RampApiService: typeof RampApiService;
40
32
  CatalogApiService: typeof CatalogApiService;
@@ -46,51 +38,30 @@ export declare const vendorMap: {
46
38
  GuidedSellingApiService: typeof GuidedSellingApiService;
47
39
  ContractedPriceApiService: typeof ContractedPriceApiService;
48
40
  };
41
+ '@veloceapps/api/v2': {
42
+ SalesTransactionApiService: typeof SalesTransactionApiService;
43
+ };
49
44
  '@veloceapps/sdk/core': {
50
- findLineItem: (id: string, lineItems: import("@veloceapps/core").LineItem[]) => import("@veloceapps/core").LineItem | undefined;
51
- findLineItemWithComparator: (lineItems: import("@veloceapps/core").LineItem[], comparator: (li: import("@veloceapps/core").LineItem) => boolean) => import("@veloceapps/core").LineItem | undefined;
52
- insertLineItem: (lineItem: import("@veloceapps/core").LineItem, parentId: string, toInsert: import("@veloceapps/core").LineItem) => import("@veloceapps/core").LineItem;
53
- removeLineItem: (lineItem: import("@veloceapps/core").LineItem, idToRemove: string) => import("@veloceapps/core").LineItem;
54
- replaceLineItem: (lineItem: import("@veloceapps/core").LineItem, replaceTo: import("@veloceapps/core").LineItem, skipCardinalityCalculation?: boolean | undefined) => import("@veloceapps/core").LineItem;
55
- recalculateCardinalityVariables: (original: import("@veloceapps/core").LineItem, updated: import("@veloceapps/core").LineItem) => import("@veloceapps/core").LineItem;
56
- mapAttributes: (attributes: import("@veloceapps/core").Attribute[]) => lodash.Dictionary<any>;
57
- getAttributes: (attributes: import("@veloceapps/core").Attribute[], names?: string[] | undefined) => import("@veloceapps/core").Attribute[];
58
- upsertAttributes: (originalAttributes: import("@veloceapps/core").Attribute[], attributesToUpsert: import("@veloceapps/core").NewAttribute[]) => import("@veloceapps/core").Attribute[];
59
- patchAttributes: (rootLineItem: import("@veloceapps/core").LineItem, id: string, attrs: import("@veloceapps/core").NewAttribute[], skipCardinalityCalculation?: boolean | undefined) => import("@veloceapps/core").LineItem;
60
- getAttributeValue: (attributes: import("@veloceapps/core").Attribute[], name: string) => any;
61
- generateLineItem: (port: string, type: string, parentId: string, attributes?: import("@veloceapps/core").NewAttribute[] | undefined, lineItems?: import("@veloceapps/core").LineItem[] | undefined) => import("@veloceapps/core").LineItem;
62
- getRecommendedPrices: (portDomain: import("@veloceapps/core").PortDomain, type: string) => {
63
- net: number;
64
- list: number;
65
- };
66
- getOriginParent: (lineItems: import("@veloceapps/core").LineItem[], currentLineItem: import("@veloceapps/core").LineItem) => import("@veloceapps/core").LineItem | undefined;
67
- assetPredicateFn: (lineItem: import("@veloceapps/core").LineItem, assetId?: string | undefined) => boolean;
68
- multiplyLineItems: (lineItem: import("@veloceapps/core").LineItem, qty: number, split: boolean) => import("@veloceapps/core").LineItem[];
69
- isTechnicalAttribute: (name: string) => boolean;
70
- filterOutTechnicalAttributes: <T_1 extends {
71
- name: string;
72
- }>(attributes: T_1[]) => T_1[];
73
45
  ConfigurationService: typeof ConfigurationService;
74
46
  ConfigurationStateService: typeof ConfigurationStateService;
75
- QuoteDraftService: typeof QuoteDraftService;
76
47
  FlowConfigurationService: typeof FlowConfigurationService;
77
48
  IntegrationState: typeof IntegrationState;
78
49
  FlowStateService: typeof FlowStateService;
79
50
  FlowStateConfigurationService: typeof FlowStateConfigurationService;
80
- LineItemWorker: typeof LineItemWorker;
51
+ TransactionItemWorker: typeof TransactionItemWorker;
81
52
  ProductImagesService: typeof ProductImagesService;
82
- ContextService: typeof ContextService;
83
53
  RuntimeSettingsService: typeof RuntimeSettingsService;
84
54
  ActionCodePipe: typeof ActionCodePipe;
85
55
  DatePipe: typeof DatePipe;
86
56
  NumberPipe: typeof NumberPipe;
87
57
  PricePipe: typeof PricePipe;
58
+ SalesTransactionService: typeof SalesTransactionService;
88
59
  };
89
60
  '@veloceapps/sdk/cms': {
90
61
  TemplatesService: typeof TemplatesService;
91
62
  IntegrationState: typeof IntegrationState;
92
63
  ResourcesService: typeof ResourcesService;
93
- cmsInject: <T_2 = unknown>(token: string) => T_2;
64
+ cmsInject: <T_1 = unknown>(token: string) => T_1;
94
65
  FlowAction: typeof cmsActions.FlowAction;
95
66
  CmsAction: typeof cmsActions.CmsAction;
96
67
  DEFAULT_PLUGINS_TOKEN: angularCore.InjectionToken<typeof import("./engine/models/plugin").Plugin[]>;
@@ -99,5 +70,13 @@ export declare const vendorMap: {
99
70
  SHARED_ELEMENT_METADATA: angularCore.InjectionToken<import("@veloceapps/sdk/cms").ElementMetadata | undefined>;
100
71
  ELEMENT_CONFIG: angularCore.InjectionToken<import("@veloceapps/sdk/cms").ElementConfig>;
101
72
  };
73
+ '@angular/core': typeof angularCore;
74
+ '@angular/forms': typeof angularForms;
75
+ '@angular/cdk/collections': {
76
+ DataSource: typeof DataSource;
77
+ };
78
+ rxjs: typeof rxjs;
79
+ 'rxjs/operators': typeof rxjsOperators;
80
+ lodash: lodash.LoDashStatic;
102
81
  };
103
82
  export type VendorMap = typeof vendorMap;
package/core/index.d.ts CHANGED
@@ -5,4 +5,3 @@ export * from './pipes';
5
5
  export * from './services';
6
6
  export * from './types';
7
7
  export * from './utils';
8
- export * as lineItemUtils from './utils/line-item.utils';
@@ -1,6 +1,3 @@
1
- export * from './helpers';
2
1
  export * from './services/configuration-runtime.service';
3
- export * from './services/configuration.service';
4
2
  export * from './services/configuration-state.service';
5
- export * from './types/configuration-runtime.types';
6
- export * from './types/configuration.types';
3
+ export * from './services/configuration.service';
@@ -1,28 +1,9 @@
1
- import { ConfigurationApiService } from '@veloceapps/api';
2
- import { RuntimeModel, UIDefinitionContainer, UIDefinitionProps } from '@veloceapps/core';
3
- import { Observable } from 'rxjs';
4
- import { ContextService } from '../../../services';
5
- import { RuntimeContext } from '../../../types';
6
- import { RuntimeInitializationProps } from '../types/configuration-runtime.types';
7
- import { RuntimeContextService } from './runtime-context.service';
1
+ import { UIDefinitionContainer, UIDefinitionProps } from '@veloceapps/core';
8
2
  import * as i0 from "@angular/core";
9
3
  export declare class ConfigurationRuntimeService {
10
- private apiService;
11
- private contextService;
12
- private runtimeContextService;
13
- private _runtimeContext?;
14
- private _isInitialized;
15
- initializationProps?: RuntimeInitializationProps;
16
- uiDefinitionProperties: UIDefinitionProps;
17
- constructor(apiService: ConfigurationApiService, contextService: ContextService, runtimeContextService: RuntimeContextService);
4
+ uiDefinitionContainer: UIDefinitionContainer | null;
5
+ get uiDefinitionProps(): UIDefinitionProps;
18
6
  reset(): void;
19
- initTestMode(uiDefinitionContainer: UIDefinitionContainer): Observable<RuntimeContext>;
20
- init(props: RuntimeInitializationProps): Observable<RuntimeContext>;
21
- overrideUIDefinition(uiDefinitionContainer: UIDefinitionContainer): void;
22
- private id15to18;
23
- get isInitialized(): boolean;
24
- get runtimeModel(): RuntimeModel | undefined;
25
- get runtimeContext(): RuntimeContext | undefined;
26
7
  static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationRuntimeService, never>;
27
8
  static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurationRuntimeService>;
28
9
  }
@@ -1,8 +1,9 @@
1
- import { FlowStateApiService, QuoteApiService, SaveQuoteResponse } from '@veloceapps/api';
1
+ import { FlowStateApiService } from '@veloceapps/api';
2
+ import { SalesTransactionApiService, SalesTransactionUpsertResponse } from '@veloceapps/api/v2';
2
3
  import { ToastService } from '@veloceapps/components';
3
4
  import { FlowStateExecutionRequest, FlowStateExecutionResult, FlowStateSelectorResponse } from '@veloceapps/core';
4
5
  import { BehaviorSubject, Observable, Subject } from 'rxjs';
5
- import { FlowInfoService, FlowStateService, QuoteDraftService } from '../../../services';
6
+ import { FlowInfoService, FlowStateService, SalesTransactionService } from '../../../services';
6
7
  import { FlowStateSubscriptionOptions } from '../../../types/flow-state.types';
7
8
  import { FlowConfigurationService } from '../../flow-configuration';
8
9
  import { ConfigurationRuntimeService } from './configuration-runtime.service';
@@ -11,13 +12,13 @@ import * as i0 from "@angular/core";
11
12
  export declare class ConfigurationStateService {
12
13
  private configurationRuntimeService;
13
14
  private configurationService;
14
- private quoteDraftService;
15
- private toastService;
16
15
  private flowStateService;
17
16
  private flowInfoService;
18
17
  private flowConfigurationService;
19
18
  private flowStateApiService;
20
- private quoteApiService;
19
+ private salesTransactionService;
20
+ private salesTransactionApiService;
21
+ private toastService;
21
22
  isInitialized$: BehaviorSubject<boolean>;
22
23
  canceledConfiguration$: Subject<void>;
23
24
  private readonly NOT_INITIALIZED;
@@ -31,7 +32,7 @@ export declare class ConfigurationStateService {
31
32
  private statefulRequestStream$;
32
33
  private statefulExecutionRequest$;
33
34
  private statelessExecutionRequest$;
34
- constructor(configurationRuntimeService: ConfigurationRuntimeService, configurationService: ConfigurationService, quoteDraftService: QuoteDraftService, toastService: ToastService, flowStateService: FlowStateService, flowInfoService: FlowInfoService, flowConfigurationService: FlowConfigurationService, flowStateApiService: FlowStateApiService, quoteApiService: QuoteApiService);
35
+ constructor(configurationRuntimeService: ConfigurationRuntimeService, configurationService: ConfigurationService, flowStateService: FlowStateService, flowInfoService: FlowInfoService, flowConfigurationService: FlowConfigurationService, flowStateApiService: FlowStateApiService, salesTransactionService: SalesTransactionService, salesTransactionApiService: SalesTransactionApiService, toastService: ToastService);
35
36
  get isExecutionInProgress$(): Observable<boolean>;
36
37
  init$(): Observable<void>;
37
38
  cleanup(): void;
@@ -39,11 +40,10 @@ export declare class ConfigurationStateService {
39
40
  dispatch$(actionName: string, inputData?: unknown): Observable<FlowStateExecutionResult>;
40
41
  select$<Response = unknown>(selectorName: string, inputData?: unknown): Observable<FlowStateSelectorResponse<Response>>;
41
42
  subscribe$<Response = unknown>(selectorName: string, inputData?: unknown, options?: FlowStateSubscriptionOptions): Observable<FlowStateSelectorResponse<Response>>;
42
- saveConfiguration(flow?: boolean): Observable<SaveQuoteResponse>;
43
+ saveConfiguration(): Observable<SalesTransactionUpsertResponse>;
43
44
  cancelConfiguration(): Observable<void>;
44
45
  private get isStatefulConfiguration();
45
46
  private initStateful$;
46
- private initStateless$;
47
47
  private execToRequest;
48
48
  private handleSelectorsResponse;
49
49
  private executeRequest$;
@@ -1,60 +1,36 @@
1
- import { ConfigurationApiService } from '@veloceapps/api';
2
- import { Charge, CompiledPricePlan, ConfigurationContext, ConfigurationRequest, ConfigurePrice, LineItem, PatchLineItemOptions, RuntimeModel } from '@veloceapps/core';
3
- import { Dictionary } from 'lodash';
1
+ import { ProceduresApiService } from '@veloceapps/api/v2';
2
+ import { SalesTransaction, SalesTransactionItem } from '@veloceapps/core';
4
3
  import { MessageService } from 'primeng/api';
5
- import { DialogService } from 'primeng/dynamicdialog';
6
4
  import { Observable } from 'rxjs';
7
- import { ContextService } from '../../../services/context.service';
8
- import { QuoteDraftService } from '../../../services/quote-draft.service';
9
- import { RuntimeSettingsService } from '../../../services/runtime-settings.service';
10
- import { RuntimeContext } from '../../../types';
5
+ import { FlowInfoService, SalesTransactionService } from '../../../services';
11
6
  import { ExternalConfigurationProps, GuidedSellingSubmitData } from '../types/configuration.types';
12
7
  import { ConfigurationRuntimeService } from './configuration-runtime.service';
13
8
  import * as i0 from "@angular/core";
14
9
  export declare class ConfigurationService {
15
- private quoteDraftService;
16
- private runtimeService;
17
- private contextService;
18
- private configurationApiService;
10
+ private flowInfoService;
19
11
  private messageService;
20
- private dialogService;
21
- private runtimeSettings;
22
- private mode;
23
- private configurableRamp;
24
- private configurationState;
25
- private previousConfigurationState;
26
- private isLoadingSubj$;
12
+ private configurationRuntimeService;
13
+ private salesTransactionService;
14
+ private proceduresApiService;
27
15
  isLoading$: Observable<boolean>;
28
16
  hasUnsavedChanges: boolean;
29
- constructor(quoteDraftService: QuoteDraftService, runtimeService: ConfigurationRuntimeService, contextService: ContextService, configurationApiService: ConfigurationApiService, messageService: MessageService, dialogService: DialogService, runtimeSettings: RuntimeSettingsService);
17
+ private configurationStateSubj$;
18
+ private previousConfigurationStateSubj$;
19
+ private isLoadingSubj$;
20
+ get state$(): Observable<SalesTransaction>;
21
+ get state(): SalesTransaction | null;
22
+ get previousState(): SalesTransaction | null;
23
+ get asset(): SalesTransactionItem | null;
24
+ get root$(): Observable<SalesTransactionItem>;
25
+ get root(): SalesTransactionItem | null;
26
+ constructor(flowInfoService: FlowInfoService, messageService: MessageService, configurationRuntimeService: ConfigurationRuntimeService, salesTransactionService: SalesTransactionService, proceduresApiService: ProceduresApiService);
30
27
  reset(): void;
31
- patch$(lineItem: LineItem, options?: PatchLineItemOptions): Observable<LineItem>;
32
- patch(lineItem: LineItem, options?: PatchLineItemOptions): void;
33
- setConfigurableRamp(lineItem: LineItem): void;
34
- get(): Observable<LineItem | undefined>;
35
- getSnapshot(): LineItem | undefined;
36
- getRuntimeModel(): RuntimeModel;
37
- getRuntimeContext(): RuntimeContext;
38
- get state$(): Observable<ConfigurePrice | null>;
39
- get stateSnapshot(): ConfigurePrice | null;
40
- get previousStateSnapshot(): ConfigurePrice | null;
41
- get contextSnapshot(): ConfigurationContext;
42
- get context$(): Observable<ConfigurationContext>;
43
- get charges$(): Observable<Dictionary<Charge>>;
44
- get chargesSnapshot(): Dictionary<Charge>;
45
- get pricePlans$(): Observable<Dictionary<CompiledPricePlan>>;
46
- get pricePlansSnapshot(): Dictionary<CompiledPricePlan>;
47
- get procedureContext$(): Observable<Dictionary<unknown>>;
48
- get procedureContextSnapshot(): Dictionary<unknown>;
49
- configure(): Observable<LineItem>;
50
- configureRequest$(configurationRequest: ConfigurationRequest): Observable<LineItem>;
51
- configureExternal$(props: ExternalConfigurationProps): Observable<LineItem>;
52
- configureGuidedSelling$(data: GuidedSellingSubmitData): Observable<ConfigurePrice>;
53
- generateRequest(lightMode?: boolean): ConfigurationRequest;
54
- generateLineItem(): LineItem;
55
- getAsset(): LineItem | undefined;
56
- private getUIDefinitionProperties;
57
- private showInactiveProductsConfirmation;
28
+ init$(): Observable<void>;
29
+ patch$(transactionItem: SalesTransactionItem): Observable<void>;
30
+ patch(transactionItem: SalesTransactionItem): void;
31
+ configureRequest$(salesTransaction: SalesTransaction): Observable<SalesTransaction>;
32
+ configureExternal$(props: ExternalConfigurationProps): Observable<SalesTransaction>;
33
+ configureGuidedSelling$(data: GuidedSellingSubmitData): Observable<SalesTransaction>;
58
34
  static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationService, never>;
59
35
  static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurationService>;
60
36
  }
@@ -1,4 +1 @@
1
- export * from './flow-configuration.module';
2
1
  export * from './services/flow-configuration.service';
3
- export * from './services/flow-update.service';
4
- export * from './types/update.types';
@@ -1,50 +1,21 @@
1
- import { ProceduresApiService } from '@veloceapps/api';
2
- import { Charge, CompiledPricePlan, ConfigurationContext, LineItem, MetricRule, QuoteDraft } from '@veloceapps/core';
3
- import { Dictionary } from 'lodash';
1
+ import { ProceduresApiService } from '@veloceapps/api/v2';
2
+ import { SalesTransaction } from '@veloceapps/core';
4
3
  import { Observable } from 'rxjs';
5
- import { ContextService } from '../../../services/context.service';
6
- import { QuoteDraftService } from '../../../services/quote-draft.service';
7
- import { ExternalConfigurationProps } from '../../configuration';
8
- import { ConfigurationService } from '../../configuration/services/configuration.service';
9
- import { FlowUpdateParams } from '../types/update.types';
10
- import { FlowUpdateService } from './flow-update.service';
11
- import { FlowInfoService } from '../../../services';
4
+ import { SalesTransactionService } from '../../../services/sales-transaction.service';
12
5
  import * as i0 from "@angular/core";
13
6
  export declare class FlowConfigurationService {
14
7
  private proceduresApiService;
15
- private contextService;
16
- private quoteDraftService;
17
- private updateService;
18
- private configurationService;
19
- private flowInfoService;
20
- /**
21
- * An event being fired when QuoteDraft was updated
22
- */
8
+ private salesTransactionService;
23
9
  updated$: Observable<void>;
24
10
  private updatedSubj$;
25
- constructor(proceduresApiService: ProceduresApiService, contextService: ContextService, quoteDraftService: QuoteDraftService, updateService: FlowUpdateService, configurationService: ConfigurationService, flowInfoService: FlowInfoService);
26
- calculate$(quoteDraft: QuoteDraft): Observable<void>;
27
- calculate(quoteDraft: QuoteDraft): void;
28
- update$(updates: FlowUpdateParams[]): Observable<QuoteDraft | null>;
29
- update(updates: FlowUpdateParams[]): void;
30
- revert$(lineItemId: string): Observable<QuoteDraft | null>;
31
- revert(lineItemId: string): void;
32
- delete$(ids: string[]): Observable<QuoteDraft | null>;
11
+ constructor(proceduresApiService: ProceduresApiService, salesTransactionService: SalesTransactionService);
12
+ calculate$(state: SalesTransaction): Observable<void>;
13
+ calculate(state: SalesTransaction): void;
14
+ revert$(transactionItemId: string): Observable<SalesTransaction | null>;
15
+ revert(transactionItemId: string): void;
16
+ delete$(ids: string[]): Observable<SalesTransaction | null>;
33
17
  delete(ids: string[]): void;
34
- addTerm$(term: LineItem): Observable<QuoteDraft | null>;
35
- addToCart$(props: ExternalConfigurationProps): Observable<QuoteDraft | null>;
36
- get(): Observable<LineItem[]>;
37
- getSnapshot(): LineItem[];
38
- get charges$(): Observable<Dictionary<Charge>>;
39
- get pricePlans$(): Observable<Dictionary<CompiledPricePlan>>;
40
- get activeMetrics$(): Observable<MetricRule[]>;
41
- get chargesSnapshot(): Dictionary<Charge>;
42
- get pricePlansSnapshot(): Dictionary<CompiledPricePlan>;
43
- get activeMetricsSnapshot(): MetricRule[];
44
- get contextSnapshot(): ConfigurationContext;
45
- get context$(): Observable<ConfigurationContext>;
46
18
  private handleErrorAndBounceBack;
47
- private extendedApply$;
48
19
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowConfigurationService, never>;
49
20
  static ɵprov: i0.ɵɵInjectableDeclaration<FlowConfigurationService>;
50
21
  }
@@ -0,0 +1,11 @@
1
+ import { CatalogProducts } from '@veloceapps/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CatalogProductsService {
4
+ private stateSubj$;
5
+ state$: import("rxjs").Observable<CatalogProducts>;
6
+ get state(): CatalogProducts | null;
7
+ reset(): void;
8
+ setState(state: CatalogProducts): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<CatalogProductsService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<CatalogProductsService>;
11
+ }