@veloceapps/sdk 7.0.2-71 → 7.0.2-73

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/cms/components/preview/preview.component.d.ts +6 -9
  2. package/cms/components/preview/preview.types.d.ts +5 -0
  3. package/cms/services/resources.service.d.ts +9 -0
  4. package/cms/vendor-map.d.ts +2 -1
  5. package/core/modules/configuration/index.d.ts +1 -0
  6. package/core/modules/configuration/services/configuration-runtime.service.d.ts +4 -3
  7. package/core/modules/configuration/services/configuration.service.d.ts +6 -4
  8. package/core/modules/configuration/services/configuration.state.d.ts +30 -0
  9. package/core/modules/configuration/services/runtime-context.service.d.ts +1 -1
  10. package/core/types/runtime.types.d.ts +2 -2
  11. package/esm2020/cms/components/preview/preview.component.mjs +17 -37
  12. package/esm2020/cms/components/preview/preview.types.mjs +1 -1
  13. package/esm2020/cms/services/resources.service.mjs +19 -1
  14. package/esm2020/cms/vendor-map.mjs +3 -2
  15. package/esm2020/core/modules/configuration/configuration.module.mjs +4 -1
  16. package/esm2020/core/modules/configuration/index.mjs +2 -1
  17. package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +27 -19
  18. package/esm2020/core/modules/configuration/services/configuration.service.mjs +41 -29
  19. package/esm2020/core/modules/configuration/services/configuration.state.mjs +142 -0
  20. package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +10 -11
  21. package/esm2020/core/services/quote-draft.service.mjs +1 -1
  22. package/esm2020/core/types/runtime.types.mjs +1 -1
  23. package/esm2020/src/components/doc-gen/doc-gen.component.mjs +1 -1
  24. package/esm2020/src/components/guided-selling/guided-selling.component.mjs +1 -1
  25. package/esm2020/src/pages/assets/assets.component.mjs +1 -1
  26. package/esm2020/src/pages/catalog/catalog.component.mjs +1 -1
  27. package/esm2020/src/pages/legacy-product/legacy-product.component.mjs +4 -4
  28. package/esm2020/src/pages/product/product.component.mjs +50 -66
  29. package/esm2020/src/pages/remote/remote.component.mjs +19 -19
  30. package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +1 -1
  31. package/esm2020/src/types/flow-customization.types.mjs +1 -1
  32. package/fesm2015/veloceapps-sdk-cms.mjs +44 -43
  33. package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
  34. package/fesm2015/veloceapps-sdk-core.mjs +214 -59
  35. package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
  36. package/fesm2015/veloceapps-sdk.mjs +67 -80
  37. package/fesm2015/veloceapps-sdk.mjs.map +1 -1
  38. package/fesm2020/veloceapps-sdk-cms.mjs +42 -43
  39. package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
  40. package/fesm2020/veloceapps-sdk-core.mjs +206 -55
  41. package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
  42. package/fesm2020/veloceapps-sdk.mjs +64 -76
  43. package/fesm2020/veloceapps-sdk.mjs.map +1 -1
  44. package/package.json +1 -1
  45. package/src/pages/product/product.component.d.ts +10 -21
  46. package/src/pages/remote/remote.component.d.ts +3 -4
  47. package/src/types/flow-customization.types.d.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloceapps/sdk",
3
- "version": "7.0.2-71",
3
+ "version": "7.0.2-73",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/animations": "~15.2.0",
@@ -1,34 +1,23 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
2
1
  import { UIDefinition } from '@veloceapps/core';
3
- import { IntegrationState } from '@veloceapps/sdk/cms';
4
- import { ConfigurationRuntimeService, ConfigurationService, ContextService, QuoteDraftService } from '@veloceapps/sdk/core';
5
- import { MessageService } from 'primeng/api';
2
+ import { CMSPreviewConfig, IntegrationState } from '@veloceapps/sdk/cms';
3
+ import { ConfigurationRuntimeService, ConfigurationService, ConfigurationState, ContextService, QuoteDraftService } from '@veloceapps/sdk/core';
6
4
  import { BehaviorSubject } from 'rxjs';
7
5
  import { FlowCustomization } from '../../types/flow-customization.types';
8
6
  import * as i0 from "@angular/core";
9
- interface State {
10
- loading: boolean;
11
- failure: boolean;
12
- }
13
- export declare class ProductComponent implements OnInit, OnDestroy {
7
+ export declare class ProductComponent {
14
8
  private contextService;
15
- private runtimeService;
9
+ private configurationRuntimeService;
16
10
  private configurationService;
11
+ private configurationState;
17
12
  private quoteDraftService;
18
- private messageService;
19
13
  private integrationState;
20
14
  private customizationService?;
21
- private destroy$;
22
- uiDefinition?: UIDefinition;
23
- state$: BehaviorSubject<State>;
24
- constructor(contextService: ContextService, runtimeService: ConfigurationRuntimeService, configurationService: ConfigurationService, quoteDraftService: QuoteDraftService, messageService: MessageService, integrationState: IntegrationState, customizationService?: FlowCustomization | undefined);
25
- ngOnInit(): void;
26
- ngOnDestroy(): void;
27
- private customize;
28
- private init;
29
- private throwIfNoUIDefinition;
15
+ config: CMSPreviewConfig;
16
+ uiDefinition$: BehaviorSubject<UIDefinition | undefined>;
17
+ constructor(contextService: ContextService, configurationRuntimeService: ConfigurationRuntimeService, configurationService: ConfigurationService, configurationState: ConfigurationState, quoteDraftService: QuoteDraftService, integrationState: IntegrationState, customizationService?: FlowCustomization | undefined);
18
+ private customizeUI$;
19
+ private init$;
30
20
  private getLineItemId;
31
21
  static ɵfac: i0.ɵɵFactoryDeclaration<ProductComponent, [null, null, null, null, null, null, { optional: true; }]>;
32
22
  static ɵcmp: i0.ɵɵComponentDeclaration<ProductComponent, "vl-flow-product", never, {}, {}, never, never, false, never>;
33
23
  }
34
- export {};
@@ -1,9 +1,8 @@
1
1
  import { Location } from '@angular/common';
2
2
  import { OnDestroy } from '@angular/core';
3
- import { QuoteApiService } from '@veloceapps/api';
4
3
  import { UIDefinition } from '@veloceapps/core';
5
4
  import { IntegrationState } from '@veloceapps/sdk/cms';
6
- import { ConfigurationRuntimeService, ConfigurationService, ContextService, QuoteDraftService } from '@veloceapps/sdk/core';
5
+ import { ConfigurationRuntimeService, ConfigurationService, ConfigurationState, ContextService, QuoteDraftService } from '@veloceapps/sdk/core';
7
6
  import { MessageService } from 'primeng/api';
8
7
  import { BehaviorSubject } from 'rxjs';
9
8
  import * as i0 from "@angular/core";
@@ -14,9 +13,9 @@ interface State {
14
13
  export declare class RemoteComponent implements OnDestroy {
15
14
  private contextService;
16
15
  private quoteDraftService;
17
- private quoteApiService;
18
16
  private runtimeService;
19
17
  private configurationService;
18
+ private configurationState;
20
19
  private messageService;
21
20
  private integrationState;
22
21
  private location;
@@ -25,7 +24,7 @@ export declare class RemoteComponent implements OnDestroy {
25
24
  private readonly DYNAMIC_OPTION_PRODUCTS_KEY;
26
25
  private rpcMessage;
27
26
  private destroyed$;
28
- constructor(contextService: ContextService, quoteDraftService: QuoteDraftService, quoteApiService: QuoteApiService, runtimeService: ConfigurationRuntimeService, configurationService: ConfigurationService, messageService: MessageService, integrationState: IntegrationState, location: Location);
27
+ constructor(contextService: ContextService, quoteDraftService: QuoteDraftService, runtimeService: ConfigurationRuntimeService, configurationService: ConfigurationService, configurationState: ConfigurationState, messageService: MessageService, integrationState: IntegrationState, location: Location);
29
28
  ngOnDestroy(): void;
30
29
  private initConfiguration;
31
30
  private throwIfNoUIDefinition;
@@ -1,10 +1,10 @@
1
1
  import { InjectionToken } from '@angular/core';
2
- import { LegacyUIDefinition, TemplateComponentWithAttachments, UIDefinition } from '@veloceapps/core';
2
+ import { TemplateComponentWithAttachments, UIDefinitionContainer } from '@veloceapps/core';
3
3
  import { Observable } from 'rxjs';
4
4
  export declare const FLOW_CUSTOMIZATION: InjectionToken<FlowCustomization>;
5
5
  export interface FlowCustomization {
6
- getUiDefinition?(productId: string): Observable<UIDefinition | null>;
7
- getLegacyUiDefinition?(productId: string): Observable<LegacyUIDefinition | null>;
6
+ getUiDefinition?(productId: string): Observable<UIDefinitionContainer | null>;
7
+ getLegacyUiDefinition?(productId: string): Observable<UIDefinitionContainer | null>;
8
8
  getShoppingCartComponent?(templateName: string): Observable<TemplateComponentWithAttachments | null>;
9
9
  getCatalogComponent?(templateName: string): Observable<TemplateComponentWithAttachments | null>;
10
10
  getAssetsComponent?(templateName: string): Observable<TemplateComponentWithAttachments | null>;