@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloceapps/sdk",
3
- "version": "11.0.0-2",
3
+ "version": "11.0.0-21",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/animations": "~15.2.0",
@@ -1,5 +1,5 @@
1
1
  import { OnDestroy } from '@angular/core';
2
- import { UITemplatesApiService } from '@veloceapps/api';
2
+ import { UITemplatesApiService } from '@veloceapps/api/v2';
3
3
  import { ToastService } from '@veloceapps/components';
4
4
  import { UIDefinition } from '@veloceapps/core';
5
5
  import { FlowCustomization, FlowInfoService, FlowStateService } from '@veloceapps/sdk/core';
@@ -1,5 +1,5 @@
1
1
  import { OnDestroy } from '@angular/core';
2
- import { UITemplatesApiService } from '@veloceapps/api';
2
+ import { UITemplatesApiService } from '@veloceapps/api/v2';
3
3
  import { ToastService } from '@veloceapps/components';
4
4
  import { UIDefinition } from '@veloceapps/core';
5
5
  import { FlowCustomization, FlowInfoService, FlowStateService } from '@veloceapps/sdk/core';
@@ -4,9 +4,8 @@ import * as i2 from "./pages/product/product.module";
4
4
  import * as i3 from "./pages/shopping-cart/shopping-cart.module";
5
5
  import * as i4 from "./pages/catalog/catalog.module";
6
6
  import * as i5 from "./pages/assets/assets.module";
7
- import * as i6 from "./pages/remote/remote.module";
8
7
  export declare class FlowRoutingModule {
9
8
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowRoutingModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<FlowRoutingModule, never, [typeof i1.RouterModule, typeof i2.ProductModule, typeof i3.ShoppingCartModule, typeof i4.CatalogModule, typeof i5.AssetsModule, typeof i6.RemoteModule], [typeof i1.RouterModule]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FlowRoutingModule, never, [typeof i1.RouterModule, typeof i2.ProductModule, typeof i3.ShoppingCartModule, typeof i4.CatalogModule, typeof i5.AssetsModule], [typeof i1.RouterModule]>;
11
10
  static ɵinj: i0.ɵɵInjectorDeclaration<FlowRoutingModule>;
12
11
  }
@@ -8,13 +8,13 @@ import * as i0 from "@angular/core";
8
8
  export declare class FlowComponent implements OnDestroy {
9
9
  private routerService;
10
10
  private flowService;
11
- private flowInfo;
11
+ private flowInfoService;
12
12
  private guidedSellingService;
13
13
  isLoading$: Observable<boolean>;
14
14
  showHeader$: Observable<boolean>;
15
15
  isStandalone$: Observable<boolean>;
16
16
  guidedSellingVisible$: Observable<boolean>;
17
- constructor(routerService: FlowRouterService, flowService: FlowService, flowInfo: FlowInfoService, guidedSellingService: FlowGuidedSellingService);
17
+ constructor(routerService: FlowRouterService, flowService: FlowService, flowInfoService: FlowInfoService, guidedSellingService: FlowGuidedSellingService);
18
18
  ngOnDestroy(): void;
19
19
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowComponent, never>;
20
20
  static ɵcmp: i0.ɵɵComponentDeclaration<FlowComponent, "vl-flow", never, {}, {}, never, never, false, never>;
@@ -1,16 +1,15 @@
1
1
  import { Component } from '@angular/core';
2
- import { ActivatedRouteSnapshot, CanDeactivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
3
- import { ConfigurationService, ContextService, QuoteDraftService } from '@veloceapps/sdk/core';
2
+ import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
3
+ import { ConfigurationService, FlowInfoService } from '@veloceapps/sdk/core';
4
4
  import { Observable } from 'rxjs';
5
5
  import { FlowDialogService } from '../services/flow-dialog.service';
6
6
  import * as i0 from "@angular/core";
7
- export declare class ProductUnloadGuard implements CanDeactivate<any> {
7
+ export declare class ProductUnloadGuard {
8
8
  private router;
9
- private contextService;
10
- private quoteDraftService;
9
+ private flowInfoService;
11
10
  private configurationService;
12
11
  private flowDialogService;
13
- constructor(router: Router, contextService: ContextService, quoteDraftService: QuoteDraftService, configurationService: ConfigurationService, flowDialogService: FlowDialogService);
12
+ constructor(router: Router, flowInfoService: FlowInfoService, configurationService: ConfigurationService, flowDialogService: FlowDialogService);
14
13
  canDeactivate(_: Component, route: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean | UrlTree>;
15
14
  static ɵfac: i0.ɵɵFactoryDeclaration<ProductUnloadGuard, never>;
16
15
  static ɵprov: i0.ɵɵInjectableDeclaration<ProductUnloadGuard>;
package/src/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  export * from './constants';
2
2
  export * from './flow.module';
3
- export * from './guards';
4
3
  export * from './services';
5
4
  export * from './types';
6
- export * from './utils';
@@ -1,5 +1,5 @@
1
1
  import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
2
- import { UITemplatesApiService } from '@veloceapps/api';
2
+ import { UITemplatesApiService } from '@veloceapps/api/v2';
3
3
  import { ToastService } from '@veloceapps/components';
4
4
  import { UIDefinition } from '@veloceapps/core';
5
5
  import { FlowCustomization, FlowInfoService } from '@veloceapps/sdk/core';
@@ -1,5 +1,5 @@
1
1
  import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
2
- import { UITemplatesApiService } from '@veloceapps/api';
2
+ import { UITemplatesApiService } from '@veloceapps/api/v2';
3
3
  import { ToastService } from '@veloceapps/components';
4
4
  import { UIDefinition } from '@veloceapps/core';
5
5
  import { FlowCustomization, FlowInfoService } from '@veloceapps/sdk/core';
@@ -2,21 +2,18 @@ import { FormControl, FormGroup } from '@angular/forms';
2
2
  import { ActivatedRoute, Params, Router } from '@angular/router';
3
3
  import { FlowsApiService } from '@veloceapps/api';
4
4
  import { Flow } from '@veloceapps/core';
5
- import { ContextService, QuoteDraftService } from '@veloceapps/sdk/core';
6
5
  import { Observable } from 'rxjs';
7
6
  import * as i0 from "@angular/core";
8
7
  export declare class DebugComponent {
9
8
  private flowsApiService;
10
9
  private router;
11
10
  private activatedRoute;
12
- private context;
13
- private quoteDraftService;
14
11
  form: FormGroup<{
15
12
  id: FormControl<string | null>;
16
13
  }>;
17
14
  selectedFlow?: Flow;
18
15
  flows$: Observable<Flow[]>;
19
- constructor(flowsApiService: FlowsApiService, router: Router, activatedRoute: ActivatedRoute, context: ContextService, quoteDraftService: QuoteDraftService);
16
+ constructor(flowsApiService: FlowsApiService, router: Router, activatedRoute: ActivatedRoute);
20
17
  runFlow(): void;
21
18
  getQueryParamsString(params: Params): string;
22
19
  static ɵfac: i0.ɵɵFactoryDeclaration<DebugComponent, never>;
@@ -1,24 +1,15 @@
1
- import { UIDefinition } from '@veloceapps/core';
1
+ import { UIDefinitionContainer } from '@veloceapps/core';
2
2
  import { CMSPreviewConfig } from '@veloceapps/sdk/cms';
3
- import { ConfigurationRuntimeService, ConfigurationService, ConfigurationStateService, ContextService, FlowCustomization, FlowInfoService, FlowStateService, IntegrationState, QuoteDraftService } from '@veloceapps/sdk/core';
3
+ import { ConfigurationRuntimeService, ConfigurationStateService } from '@veloceapps/sdk/core';
4
4
  import { BehaviorSubject } from 'rxjs';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class ProductComponent {
7
- private contextService;
8
7
  private configurationRuntimeService;
9
- private configurationService;
10
8
  private configurationStateService;
11
- private quoteDraftService;
12
- private flowInfoService;
13
- private flowStateService;
14
- private integrationState;
15
- private customizationService?;
16
9
  config: CMSPreviewConfig;
17
- uiDefinition$: BehaviorSubject<UIDefinition | undefined>;
18
- constructor(contextService: ContextService, configurationRuntimeService: ConfigurationRuntimeService, configurationService: ConfigurationService, configurationStateService: ConfigurationStateService, quoteDraftService: QuoteDraftService, flowInfoService: FlowInfoService, flowStateService: FlowStateService, integrationState: IntegrationState, customizationService?: FlowCustomization | undefined);
19
- private customizeUI$;
10
+ uiDefinitionContainer$: BehaviorSubject<UIDefinitionContainer | null>;
11
+ constructor(configurationRuntimeService: ConfigurationRuntimeService, configurationStateService: ConfigurationStateService);
20
12
  private init$;
21
- private getLineItem;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<ProductComponent, [null, null, null, null, null, null, null, null, { optional: true; }]>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProductComponent, never>;
23
14
  static ɵcmp: i0.ɵɵComponentDeclaration<ProductComponent, "vl-flow-product", never, {}, {}, never, never, false, never>;
24
15
  }
@@ -5,6 +5,6 @@ import * as i3 from "@veloceapps/sdk/cms";
5
5
  import * as i4 from "@veloceapps/components";
6
6
  export declare class ProductModule {
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<ProductModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<ProductModule, [typeof i1.ProductComponent], [typeof i2.CommonModule, typeof i3.PreviewModule, typeof i4.LoaderModule], [typeof i1.ProductComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ProductModule, [typeof i1.ProductComponent], [typeof i2.CommonModule, typeof i3.PreviewModule, typeof i4.LoaderModule, typeof i4.LetDirectiveModule], [typeof i1.ProductComponent]>;
9
9
  static ɵinj: i0.ɵɵInjectorDeclaration<ProductModule>;
10
10
  }
@@ -1,13 +1,12 @@
1
- import { ActivatedRoute, Router } from '@angular/router';
1
+ import { Router } from '@angular/router';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class RecordNotFoundComponent {
4
4
  private router;
5
- private route;
6
5
  message: string;
7
6
  subMessage: string;
8
7
  type: string;
9
8
  details: string[];
10
- constructor(router: Router, route: ActivatedRoute);
9
+ constructor(router: Router);
11
10
  static ɵfac: i0.ɵɵFactoryDeclaration<RecordNotFoundComponent, never>;
12
11
  static ɵcmp: i0.ɵɵComponentDeclaration<RecordNotFoundComponent, "vl-flow-record-not-found", never, {}, {}, never, never, false, never>;
13
12
  }
@@ -1,5 +1,5 @@
1
1
  import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
2
- import { UITemplatesApiService } from '@veloceapps/api';
2
+ import { UITemplatesApiService } from '@veloceapps/api/v2';
3
3
  import { ToastService } from '@veloceapps/components';
4
4
  import { UIDefinition } from '@veloceapps/core';
5
5
  import { FlowCustomization, FlowInfoService } from '@veloceapps/sdk/core';
@@ -1,14 +1,13 @@
1
- import { ActivatedRouteSnapshot, Resolve, Router } from '@angular/router';
2
- import { ContextService, FlowInfoService } from '@veloceapps/sdk/core';
1
+ import { ActivatedRouteSnapshot, Router } from '@angular/router';
2
+ import { FlowInfoService } from '@veloceapps/sdk/core';
3
3
  import { Observable } from 'rxjs';
4
4
  import { FlowRouterService } from '../services/flow-router.service';
5
5
  import * as i0 from "@angular/core";
6
- export declare class FlowResolver implements Resolve<unknown> {
6
+ export declare class FlowResolver {
7
7
  private router;
8
8
  private routerService;
9
- private contextService;
10
- private flowInfo;
11
- constructor(router: Router, routerService: FlowRouterService, contextService: ContextService, flowInfo: FlowInfoService);
9
+ private flowInfoService;
10
+ constructor(router: Router, routerService: FlowRouterService, flowInfoService: FlowInfoService);
12
11
  resolve(route: ActivatedRouteSnapshot): Observable<boolean>;
13
12
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowResolver, never>;
14
13
  static ɵprov: i0.ɵɵInjectableDeclaration<FlowResolver>;
@@ -0,0 +1,18 @@
1
+ import { ActivatedRouteSnapshot, Router } from '@angular/router';
2
+ import { FlowInfoService, FlowStateService, SalesTransactionService } from '@veloceapps/sdk/core';
3
+ import { Observable } from 'rxjs';
4
+ import { FlowRouterService } from '../services/flow-router.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class SalesTransactionResolver {
7
+ private router;
8
+ private routerService;
9
+ private flowInfoService;
10
+ private flowStateService;
11
+ private salesTransactionService;
12
+ constructor(router: Router, routerService: FlowRouterService, flowInfoService: FlowInfoService, flowStateService: FlowStateService, salesTransactionService: SalesTransactionService);
13
+ resolve(route: ActivatedRouteSnapshot): Observable<boolean>;
14
+ private checkDynamicNavigation$;
15
+ private getNavigateTo;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<SalesTransactionResolver, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<SalesTransactionResolver>;
18
+ }
@@ -0,0 +1,3 @@
1
+ import { ResolveFn } from '@angular/router';
2
+ import { UIDefinitionContainer } from '@veloceapps/core';
3
+ export declare const resolveUIDefinition: ResolveFn<UIDefinitionContainer>;
@@ -1,13 +1,14 @@
1
- import { ContextService, RuntimeSettingsService } from '@veloceapps/sdk/core';
1
+ import { FlowInfoService, RuntimeSettingsService } from '@veloceapps/sdk/core';
2
2
  import { DialogService } from 'primeng/dynamicdialog';
3
3
  import { Observable } from 'rxjs';
4
4
  import { FlowDialogConfig } from '../components/dialog/dialog.types';
5
5
  import * as i0 from "@angular/core";
6
+ export type FlowDialogFn = keyof Omit<FlowDialogService, 'show' | 'constructor'>;
6
7
  export declare class FlowDialogService {
7
8
  private dialogService;
8
- private contextService;
9
9
  private runtimeSettings;
10
- constructor(dialogService: DialogService, contextService: ContextService, runtimeSettings: RuntimeSettingsService);
10
+ private flowInfoService;
11
+ constructor(dialogService: DialogService, runtimeSettings: RuntimeSettingsService, flowInfoService: FlowInfoService);
11
12
  show(config: FlowDialogConfig): Observable<boolean>;
12
13
  showEmptyCartDialog(): Observable<boolean>;
13
14
  showReadonlyModeDialog(): Observable<boolean>;
@@ -19,7 +20,7 @@ export declare class FlowDialogService {
19
20
  showOutsideShoppingCartQuoteSubmitFailureDialog(): Observable<boolean>;
20
21
  showAccountSubmitFailureDialog(): Observable<boolean>;
21
22
  showTermsLimitReachedDialog(): Observable<boolean>;
22
- showDialog(dialog: keyof Omit<FlowDialogService, 'show' | 'constructor'>): Observable<boolean>;
23
+ showDialog(dialog: FlowDialogFn): Observable<boolean>;
23
24
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowDialogService, never>;
24
25
  static ɵprov: i0.ɵɵInjectableDeclaration<FlowDialogService>;
25
26
  }
@@ -1,20 +1,18 @@
1
1
  import { ActivatedRoute, ActivatedRouteSnapshot, Params, Router } from '@angular/router';
2
- import { ContextService, FlowInfoService, FlowStateService, IntegrationState } from '@veloceapps/sdk/core';
2
+ import { FlowInfoService, IntegrationState } from '@veloceapps/sdk/core';
3
3
  import { Observable } from 'rxjs';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class FlowRouterService {
6
6
  private router;
7
7
  private route;
8
- private contextService;
9
8
  private integrationState;
10
9
  private flowInfoService;
11
- private flowStateService;
12
10
  private routeChange$;
13
11
  private lastChildParams$;
14
12
  private lastChildRoute$;
15
13
  private urlHistory;
16
14
  loading$: Observable<boolean>;
17
- constructor(router: Router, route: ActivatedRoute, contextService: ContextService, integrationState: IntegrationState, flowInfoService: FlowInfoService, flowStateService: FlowStateService);
15
+ constructor(router: Router, route: ActivatedRoute, integrationState: IntegrationState, flowInfoService: FlowInfoService);
18
16
  getFlowRootRoute(route: ActivatedRouteSnapshot): ActivatedRouteSnapshot | undefined;
19
17
  getFlowRootPath(route: ActivatedRouteSnapshot): string;
20
18
  get route$(): Observable<ActivatedRouteSnapshot>;
@@ -32,8 +30,8 @@ export declare class FlowRouterService {
32
30
  isCatalogRoute$(): Observable<boolean>;
33
31
  isAssetsRoute$(): Observable<boolean>;
34
32
  navigateBack(): void;
35
- navigateTo(path: string, productId?: string, lineItemId?: string): void;
36
- navigateToProductConfiguration(productId: string, lineItemId?: string): void;
33
+ navigateTo(path: string, productId?: string, transactionItemId?: string): void;
34
+ navigateToProductConfiguration(productId: string, transactionItemId?: string): void;
37
35
  navigateToShoppingCart(): void;
38
36
  navigateToCatalog(): void;
39
37
  navigateToAssets(): void;
@@ -1,25 +1,20 @@
1
1
  import { IntegrationState } from '@veloceapps/sdk/cms';
2
- import { ConfigurationService, ConfigurationStateService, FlowConfigurationService, FlowInfoService, FlowStateService, QuoteDraftService } from '@veloceapps/sdk/core';
2
+ import { ConfigurationService, ConfigurationStateService, FlowStateService } from '@veloceapps/sdk/core';
3
3
  import { FlowDialogService } from './flow-dialog.service';
4
4
  import { FlowRouterService } from './flow-router.service';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class FlowService {
7
7
  private integrationState;
8
8
  private flowRouterService;
9
- private quoteDraftService;
10
9
  private configurationService;
11
10
  private configurationStateService;
12
11
  private flowDialogService;
13
- private flowConfigurationService;
14
- private flowInfoService;
15
12
  private flowStateService;
16
13
  private cleanup$;
17
- constructor(integrationState: IntegrationState, flowRouterService: FlowRouterService, quoteDraftService: QuoteDraftService, configurationService: ConfigurationService, configurationStateService: ConfigurationStateService, flowDialogService: FlowDialogService, flowConfigurationService: FlowConfigurationService, flowInfoService: FlowInfoService, flowStateService: FlowStateService);
14
+ constructor(integrationState: IntegrationState, flowRouterService: FlowRouterService, configurationService: ConfigurationService, configurationStateService: ConfigurationStateService, flowDialogService: FlowDialogService, flowStateService: FlowStateService);
18
15
  cleanup(): void;
19
16
  initSubscriptions(): void;
20
17
  private updateFlowParams;
21
- private prepareConfiguration$;
22
- private legacyApplyConfiguration;
23
18
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowService, never>;
24
19
  static ɵprov: i0.ɵɵInjectableDeclaration<FlowService>;
25
20
  }
@@ -1,2 +1 @@
1
- export * from './context-route.types';
2
- export * from './metrics.types';
1
+ export * from './route.types';
@@ -1,9 +1,4 @@
1
1
  import { Route } from '@angular/router';
2
- export interface FlowObjectIdProperties {
3
- accountId?: string;
4
- quoteId?: string;
5
- orderId?: string;
6
- }
7
2
  export interface RouteWithId extends Route {
8
3
  id?: string;
9
4
  }
@@ -1,23 +0,0 @@
1
- import { OnDestroy } from '@angular/core';
2
- import { ElementComponent } from '../components/element.component';
3
- import { PluginComponent } from '../components/plugin.component';
4
- import { ConfigurationElement } from '../types';
5
- import * as i0 from "@angular/core";
6
- export declare class ConfigurationPlugin implements PluginComponent, OnDestroy {
7
- host: ElementComponent & ConfigurationElement;
8
- private modelSnapshot?;
9
- private destroy$;
10
- private elementMetadata;
11
- private configurationService;
12
- constructor(host: ElementComponent & ConfigurationElement);
13
- ngOnDestroy(): void;
14
- private register;
15
- private registerType;
16
- private registerPort;
17
- private registerAttribute;
18
- private get attributeHost();
19
- private get typeHost();
20
- private get portHost();
21
- static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationPlugin, never>;
22
- static ɵdir: i0.ɵɵDirectiveDeclaration<ConfigurationPlugin, never, never, {}, {}, never, never, false, never>;
23
- }
@@ -1,21 +0,0 @@
1
- import { LineItem, PortDomain } from '@veloceapps/core';
2
- import { Observable } from 'rxjs';
3
- export interface ConfigurationElement {
4
- boundName: string;
5
- }
6
- export interface TypeElement extends ConfigurationElement {
7
- updateQty: (qty: number) => void;
8
- remove: () => void;
9
- }
10
- export interface PortElement extends ConfigurationElement {
11
- portItems$: Observable<LineItem[]>;
12
- portDomain$: Observable<PortDomain | undefined>;
13
- addPortItem: (type: string, attributes: {
14
- name: string;
15
- value: any;
16
- }[]) => void;
17
- }
18
- export interface AttributeElement extends ConfigurationElement {
19
- value$: Observable<any | undefined>;
20
- patch: (value: any) => void;
21
- }
@@ -1,6 +0,0 @@
1
- import { ConfigurationContext, ConfigurationRequest, LineItem, UIDefinitionProps } from '@veloceapps/core';
2
- import { RuntimeContext } from '../../types';
3
- import { GuidedSellingSubmitData, NewConfigurationProps } from './types/configuration.types';
4
- export declare const getDefaultLineItem: (context: RuntimeContext, uiDefinitionProperties: UIDefinitionProps, qty?: number) => LineItem;
5
- export declare const getGuidedSellingConfigurationRequest: (data: GuidedSellingSubmitData, context: ConfigurationContext) => ConfigurationRequest;
6
- export declare const generateConfigurationLineItem: (props: NewConfigurationProps, qty?: number) => LineItem;
@@ -1,12 +0,0 @@
1
- import { ConfigurationApiService } from '@veloceapps/api';
2
- import { Observable } from 'rxjs';
3
- import { RuntimeContext } from '../../../types';
4
- import * as i0 from "@angular/core";
5
- export declare class RuntimeContextService {
6
- private configurationApiService;
7
- constructor(configurationApiService: ConfigurationApiService);
8
- getRuntimeContext(productId: string, offeringId?: string): Observable<RuntimeContext>;
9
- private getUIDefinitionContainer;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<RuntimeContextService, never>;
11
- static ɵprov: i0.ɵɵInjectableDeclaration<RuntimeContextService>;
12
- }
@@ -1,6 +0,0 @@
1
- export interface RuntimeInitializationProps {
2
- productId: string;
3
- offeringId?: string;
4
- defaultQty?: number;
5
- attributesMap?: Record<string, any>;
6
- }
@@ -1,13 +0,0 @@
1
- import { Charge, LineItem } from '@veloceapps/core';
2
- import { Dictionary } from 'lodash';
3
- import { FlowUpdateParams } from '../types/update.types';
4
- import * as i0 from "@angular/core";
5
- export declare class FlowUpdateService {
6
- update(rootLineItems: LineItem[], updates: FlowUpdateParams[], charges?: Dictionary<Charge>): void;
7
- delete(lineItems: LineItem[], id: string): LineItem[];
8
- private applyLineItemUpdate;
9
- private applyChargeUpdate;
10
- private applyChargeGroupUpdate;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<FlowUpdateService, never>;
12
- static ɵprov: i0.ɵɵInjectableDeclaration<FlowUpdateService>;
13
- }
@@ -1,12 +0,0 @@
1
- export type FlowUpdateDataType = 'LINEITEM' | 'CHARGE' | 'GROUP_CHARGE';
2
- export type FlowUpdateAttributeType = 'QTY' | 'EFFECTIVE_START_DATE' | 'END_DATE' | 'PRICE_ADJUSTMENT' | 'LIST_PRICE_ADJUSTMENT' | 'COST_ADJUSTMENT' | 'MARGIN_ADJUSTMENT';
3
- export interface FlowUpdateParams {
4
- id: string;
5
- dataType: FlowUpdateDataType;
6
- attributeType: FlowUpdateAttributeType;
7
- newValue: any;
8
- }
9
- export interface FlowDeleteParams {
10
- id: string;
11
- dataType: FlowUpdateDataType;
12
- }
@@ -1,23 +0,0 @@
1
- import { ContextApiService } from '@veloceapps/api';
2
- import { ConfigurationContext, ConfigurationContextMode } from '@veloceapps/core';
3
- import { Observable } from 'rxjs';
4
- import * as i0 from "@angular/core";
5
- export declare class ContextService {
6
- private contextApiService;
7
- private context;
8
- constructor(contextApiService: ContextApiService);
9
- get isInitialized(): boolean;
10
- get isInitialized$(): Observable<boolean>;
11
- get mode(): ConfigurationContextMode | undefined;
12
- get isEditMode$(): Observable<boolean>;
13
- get isEditMode(): boolean;
14
- resolve(): ConfigurationContext;
15
- resolve$(): Observable<ConfigurationContext>;
16
- create(headerId: string, mode: ConfigurationContextMode): Observable<ConfigurationContext>;
17
- initTestMode(): Observable<ConfigurationContext>;
18
- update(partialContext: Partial<ConfigurationContext>): ConfigurationContext;
19
- set(context: ConfigurationContext): ConfigurationContext;
20
- delete(): void;
21
- static ɵfac: i0.ɵɵFactoryDeclaration<ContextService, never>;
22
- static ɵprov: i0.ɵɵInjectableDeclaration<ContextService>;
23
- }
@@ -1,50 +0,0 @@
1
- import { AccountApiService, QuoteApiService } from '@veloceapps/api';
2
- import { AccountAssetsState, LineItem, PriceSummary, QuoteDraft } from '@veloceapps/core';
3
- import { Dictionary } from 'lodash';
4
- import { Observable } from 'rxjs';
5
- import { ContextService } from './context.service';
6
- import { FlowInfoService } from './flow-info.service';
7
- import * as i0 from "@angular/core";
8
- export declare class QuoteDraftService {
9
- private context;
10
- private flowInfoService;
11
- private accountApiService;
12
- private quoteApiService;
13
- private quoteSubj$;
14
- private assetsSubj$;
15
- private resetSubj$;
16
- private isInitializedSubj$;
17
- private initialCurrentState;
18
- private _hasUnsavedChanges;
19
- get isInitialized$(): Observable<boolean>;
20
- get isInitialized(): boolean;
21
- set isInitialized(value: boolean);
22
- get hasUnsavedChanges(): boolean;
23
- set hasUnsavedChanges(value: boolean);
24
- get hasProducts$(): Observable<boolean>;
25
- get hasProducts(): boolean;
26
- get hasAssets$(): Observable<boolean>;
27
- get hasAssets(): boolean;
28
- get assetsState(): AccountAssetsState | null;
29
- reset$: Observable<boolean>;
30
- constructor(context: ContextService, flowInfoService: FlowInfoService, accountApiService: AccountApiService, quoteApiService: QuoteApiService);
31
- reset(): void;
32
- init(headerId: string, params: Dictionary<string>): Observable<void>;
33
- finalizeInit(): void;
34
- setCurrentLineItemState(lineItems: LineItem[]): void;
35
- updateQuoteDraft(update: Partial<QuoteDraft>): void;
36
- updateByPriceSummary(priceSummary: PriceSummary): void;
37
- setAssetsState(assetsState: AccountAssetsState): void;
38
- get quoteDraft$(): Observable<QuoteDraft>;
39
- get quoteDraft(): QuoteDraft | null;
40
- get currentState$(): Observable<LineItem[]>;
41
- get currentState(): LineItem[];
42
- get isStandalone(): boolean;
43
- get isStandalone$(): Observable<boolean>;
44
- getInitialCurrentState(): LineItem[];
45
- isEditMode$(): Observable<boolean>;
46
- isEditMode(): boolean;
47
- private markAsUpdated;
48
- static ɵfac: i0.ɵɵFactoryDeclaration<QuoteDraftService, never>;
49
- static ɵprov: i0.ɵɵInjectableDeclaration<QuoteDraftService>;
50
- }
@@ -1,30 +0,0 @@
1
- import { ContextProperties, RuntimeModel, UIDefinitionContainer } from '@veloceapps/core';
2
- export declare enum RuntimeMode {
3
- TEST = 0,
4
- PROD = 1
5
- }
6
- export declare enum RuntimeOperation {
7
- INIT = "INIT",
8
- UPDATE = "UPDATE"
9
- }
10
- export declare enum RuntimeStep {
11
- START = "START",
12
- UPDATE = "UPDATE"
13
- }
14
- export interface InvocationContext {
15
- runtimeOperation?: RuntimeOperation;
16
- runtimeStep?: RuntimeStep;
17
- }
18
- export interface RuntimeContext {
19
- modelId: string;
20
- runtimeMode: RuntimeMode;
21
- runtimeModel: RuntimeModel;
22
- uiDefinitionContainer?: UIDefinitionContainer;
23
- productId?: string;
24
- productName?: string;
25
- productType?: string;
26
- properties?: ContextProperties;
27
- offeringId?: string;
28
- offeringInstanceId?: string;
29
- invocationContext?: InvocationContext;
30
- }
@@ -1,25 +0,0 @@
1
- import { Attribute, LineItem, NewAttribute, PortDomain } from '@veloceapps/core';
2
- import { Dictionary } from 'lodash';
3
- export declare const findLineItem: (id: string, lineItems: LineItem[]) => LineItem | undefined;
4
- export declare const findLineItemWithComparator: (lineItems: LineItem[], comparator: (li: LineItem) => boolean) => LineItem | undefined;
5
- export declare const insertLineItem: (lineItem: LineItem, parentId: string, toInsert: LineItem) => LineItem;
6
- export declare const removeLineItem: (lineItem: LineItem, idToRemove: string) => LineItem;
7
- export declare const replaceLineItem: (lineItem: LineItem, replaceTo: LineItem, skipCardinalityCalculation?: boolean) => LineItem;
8
- export declare const recalculateCardinalityVariables: (original: LineItem, updated: LineItem) => LineItem;
9
- export declare const mapAttributes: (attributes: Attribute[]) => Dictionary<any>;
10
- export declare const getAttributes: (attributes: Attribute[], names?: string[]) => Attribute[];
11
- export declare const upsertAttributes: (originalAttributes: Attribute[], attributesToUpsert: NewAttribute[]) => Attribute[];
12
- export declare const patchAttributes: (rootLineItem: LineItem, id: string, attrs: NewAttribute[], skipCardinalityCalculation?: boolean) => LineItem;
13
- export declare const getAttributeValue: (attributes: Attribute[], name: string) => any;
14
- export declare const generateLineItem: (port: string, type: string, parentId: string, attributes?: NewAttribute[], lineItems?: LineItem[]) => LineItem;
15
- export declare const getRecommendedPrices: (portDomain: PortDomain, type: string) => {
16
- net: number;
17
- list: number;
18
- };
19
- export declare const getOriginParent: (lineItems: LineItem[], currentLineItem: LineItem) => LineItem | undefined;
20
- export declare const assetPredicateFn: (lineItem: LineItem, assetId?: string) => boolean;
21
- export declare const multiplyLineItems: (lineItem: LineItem, qty: number, split: boolean) => LineItem[];
22
- export declare const isTechnicalAttribute: (name: string) => boolean;
23
- export declare const filterOutTechnicalAttributes: <T extends {
24
- name: string;
25
- }>(attributes: T[]) => T[];
@@ -1,9 +0,0 @@
1
- import { LineItem, NewAttribute } from '@veloceapps/core';
2
- export declare class LineItemWorker {
3
- li: LineItem;
4
- constructor(src: LineItem);
5
- insert(parentId: string, toInsert: LineItem): LineItemWorker;
6
- remove(id: string): LineItemWorker;
7
- replace(toReplace: LineItem, skipCardinalityCalculation?: boolean): LineItemWorker;
8
- patchAttribute(attrs: NewAttribute[], id?: string, skipCardinalityCalculation?: boolean): LineItemWorker;
9
- }