@veloceapps/sdk 11.0.0-1 → 11.0.0-100
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.
- package/cms/cms.actions.d.ts +94 -69
- package/cms/components/element-renderer/element-renderer.component.d.ts +3 -10
- package/cms/components/preview/preview.component.d.ts +5 -6
- package/cms/components/preview/preview.types.d.ts +0 -4
- package/cms/services/element-context.service.d.ts +0 -1
- package/cms/types/common.types.d.ts +2 -0
- package/cms/types/index.d.ts +0 -1
- package/cms/utils/path.utils.d.ts +1 -2
- package/cms/vendor-map.d.ts +27 -60
- package/core/index.d.ts +1 -1
- package/core/modules/configuration/index.d.ts +4 -4
- package/core/modules/configuration/services/configuration-runtime.service.d.ts +8 -19
- package/core/modules/configuration/services/configuration-state.service.d.ts +8 -12
- package/core/modules/configuration/services/configuration.service.d.ts +24 -48
- package/core/modules/configuration/services/guided-selling.service.d.ts +15 -0
- package/core/modules/configuration/services/test-mode-configuration.service.d.ts +23 -0
- package/core/modules/configuration/types/configuration-runtime.types.d.ts +0 -3
- package/core/modules/configuration/types/configuration.types.d.ts +4 -2
- package/core/modules/configuration/types/index.d.ts +2 -0
- package/core/modules/flow-configuration/index.d.ts +0 -3
- package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +11 -38
- package/core/operators/filter-successful-execute.operator.d.ts +3 -0
- package/core/operators/index.d.ts +1 -0
- package/core/services/catalog-products.service.d.ts +11 -0
- package/core/services/flow-info.service.d.ts +27 -12
- package/core/services/flow-state-configuration.service.d.ts +9 -8
- package/core/services/flow-state.service.d.ts +12 -24
- package/core/services/index.d.ts +3 -3
- package/core/services/integration.state.d.ts +1 -1
- package/core/services/product-images.service.d.ts +3 -3
- package/core/services/runtime-settings.service.d.ts +1 -1
- package/core/services/sales-transaction.service.d.ts +27 -0
- package/core/types/flow-customization.types.d.ts +2 -14
- package/core/types/flow-state.types.d.ts +2 -2
- package/core/types/index.d.ts +0 -1
- package/core/utils/index.d.ts +2 -2
- package/core/utils/transaction-item.utils.d.ts +7 -0
- package/core/utils/transaction-item.worker.d.ts +8 -0
- package/esm2020/cms/cms.actions.mjs +93 -106
- package/esm2020/cms/cms.default.mjs +2 -3
- package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +7 -64
- package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +3 -3
- package/esm2020/cms/components/preview/preview.component.mjs +19 -28
- package/esm2020/cms/components/preview/preview.types.mjs +1 -1
- package/esm2020/cms/services/element-context.service.mjs +1 -1
- package/esm2020/cms/types/common.types.mjs +1 -1
- package/esm2020/cms/types/index.mjs +1 -2
- package/esm2020/cms/utils/element.utils.mjs +3 -3
- package/esm2020/cms/utils/elements-resolver.mjs +16 -5
- package/esm2020/cms/utils/path.utils.mjs +1 -10
- package/esm2020/cms/vendor-map.mjs +20 -25
- package/esm2020/core/core.module.mjs +7 -7
- package/esm2020/core/index.mjs +2 -2
- package/esm2020/core/modules/configuration/configuration.module.mjs +17 -4
- package/esm2020/core/modules/configuration/index.mjs +5 -5
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +16 -99
- package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +69 -78
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +125 -228
- package/esm2020/core/modules/configuration/services/guided-selling.service.mjs +62 -0
- package/esm2020/core/modules/configuration/services/test-mode-configuration.service.mjs +74 -0
- package/esm2020/core/modules/configuration/types/configuration-runtime.types.mjs +1 -1
- package/esm2020/core/modules/configuration/types/configuration.types.mjs +1 -1
- package/esm2020/core/modules/configuration/types/index.mjs +3 -0
- package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +3 -4
- package/esm2020/core/modules/flow-configuration/index.mjs +1 -4
- package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +44 -128
- package/esm2020/core/operators/filter-successful-execute.operator.mjs +5 -0
- package/esm2020/core/operators/index.mjs +2 -0
- package/esm2020/core/services/catalog-products.service.mjs +25 -0
- package/esm2020/core/services/flow-info.service.mjs +82 -31
- package/esm2020/core/services/flow-state-configuration.service.mjs +55 -25
- package/esm2020/core/services/flow-state.service.mjs +58 -180
- package/esm2020/core/services/index.mjs +4 -4
- package/esm2020/core/services/integration.state.mjs +2 -2
- package/esm2020/core/services/product-images.service.mjs +8 -8
- package/esm2020/core/services/runtime-settings.service.mjs +3 -3
- package/esm2020/core/services/sales-transaction.service.mjs +67 -0
- package/esm2020/core/types/flow-customization.types.mjs +1 -1
- package/esm2020/core/types/flow-state.types.mjs +1 -1
- package/esm2020/core/types/index.mjs +1 -2
- package/esm2020/core/utils/index.mjs +3 -3
- package/esm2020/core/utils/transaction-item.utils.mjs +60 -0
- package/esm2020/core/utils/transaction-item.worker.mjs +16 -0
- package/esm2020/src/components/flow-header/flow-header.component.mjs +8 -12
- package/esm2020/src/components/guided-selling/guided-selling.component.mjs +8 -12
- package/esm2020/src/flow-routing.module.mjs +12 -41
- package/esm2020/src/flow.component.mjs +5 -5
- package/esm2020/src/guards/flow.guard.mjs +13 -14
- package/esm2020/src/guards/product-unload.guard.mjs +7 -9
- package/esm2020/src/index.mjs +1 -3
- package/esm2020/src/pages/assets/assets.component.mjs +8 -9
- package/esm2020/src/pages/catalog/catalog.component.mjs +8 -9
- package/esm2020/src/pages/debug/debug.component.mjs +14 -23
- package/esm2020/src/pages/product/product.component.mjs +12 -82
- package/esm2020/src/pages/product/product.module.mjs +5 -5
- package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +5 -6
- package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +8 -9
- package/esm2020/src/resolvers/flow.resolver.mjs +10 -18
- package/esm2020/src/resolvers/pcm-model.resolver.mjs +12 -0
- package/esm2020/src/resolvers/sales-transaction.resolver.mjs +64 -0
- package/esm2020/src/resolvers/ui-definition.resolver.mjs +42 -0
- package/esm2020/src/services/flow-dialog.service.mjs +10 -31
- package/esm2020/src/services/flow-router.service.mjs +16 -33
- package/esm2020/src/services/flow.service.mjs +15 -54
- package/esm2020/src/types/index.mjs +2 -3
- package/esm2020/src/types/route.types.mjs +1 -1
- package/fesm2015/veloceapps-sdk-cms.mjs +174 -357
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +900 -1652
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +192 -817
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +162 -350
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +976 -1735
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +192 -811
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/flow-header/flow-header.component.d.ts +3 -3
- package/src/components/guided-selling/guided-selling.component.d.ts +3 -3
- package/src/flow-routing.module.d.ts +1 -2
- package/src/flow.component.d.ts +2 -2
- package/src/guards/product-unload.guard.d.ts +5 -6
- package/src/index.d.ts +0 -2
- package/src/pages/assets/assets.component.d.ts +3 -3
- package/src/pages/catalog/catalog.component.d.ts +3 -3
- package/src/pages/debug/debug.component.d.ts +2 -5
- package/src/pages/product/product.component.d.ts +5 -14
- package/src/pages/product/product.module.d.ts +1 -1
- package/src/pages/record-not-found/record-not-found.component.d.ts +2 -3
- package/src/pages/shopping-cart/shopping-cart.component.d.ts +3 -3
- package/src/resolvers/flow.resolver.d.ts +5 -6
- package/src/resolvers/pcm-model.resolver.d.ts +3 -0
- package/src/resolvers/sales-transaction.resolver.d.ts +18 -0
- package/src/resolvers/ui-definition.resolver.d.ts +3 -0
- package/src/services/flow-dialog.service.d.ts +6 -8
- package/src/services/flow-router.service.d.ts +4 -6
- package/src/services/flow.service.d.ts +3 -7
- package/src/types/index.d.ts +1 -2
- package/src/types/route.types.d.ts +0 -5
- package/cms/plugins/configuration.plugin.d.ts +0 -23
- package/cms/types/configuration.types.d.ts +0 -21
- package/core/modules/configuration/helpers.d.ts +0 -6
- package/core/modules/configuration/services/runtime-context.service.d.ts +0 -12
- package/core/modules/flow-configuration/services/flow-update.service.d.ts +0 -13
- package/core/modules/flow-configuration/types/update.types.d.ts +0 -12
- package/core/services/context.service.d.ts +0 -23
- package/core/services/quote-draft.service.d.ts +0 -50
- package/core/types/runtime.types.d.ts +0 -30
- package/core/utils/line-item.utils.d.ts +0 -25
- package/core/utils/line-item.worker.d.ts +0 -9
- package/esm2020/cms/plugins/configuration.plugin.mjs +0 -109
- package/esm2020/cms/types/configuration.types.mjs +0 -2
- package/esm2020/core/modules/configuration/helpers.mjs +0 -73
- package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +0 -43
- package/esm2020/core/modules/flow-configuration/services/flow-update.service.mjs +0 -138
- package/esm2020/core/modules/flow-configuration/types/update.types.mjs +0 -2
- package/esm2020/core/services/context.service.mjs +0 -91
- package/esm2020/core/services/quote-draft.service.mjs +0 -192
- package/esm2020/core/types/runtime.types.mjs +0 -16
- package/esm2020/core/utils/line-item.utils.mjs +0 -187
- package/esm2020/core/utils/line-item.worker.mjs +0 -19
- package/esm2020/src/guards/context.guard.mjs +0 -91
- package/esm2020/src/guards/index.mjs +0 -2
- package/esm2020/src/pages/remote/remote.component.mjs +0 -342
- package/esm2020/src/pages/remote/remote.module.mjs +0 -20
- package/esm2020/src/pages/remote/remote.types.mjs +0 -2
- package/esm2020/src/resolvers/quote.resolver.mjs +0 -82
- package/esm2020/src/types/context-route.types.mjs +0 -2
- package/esm2020/src/types/metrics.types.mjs +0 -2
- package/esm2020/src/utils/flow.utils.mjs +0 -25
- package/esm2020/src/utils/index.mjs +0 -2
- package/src/guards/context.guard.d.ts +0 -19
- package/src/guards/index.d.ts +0 -1
- package/src/pages/remote/remote.component.d.ts +0 -46
- package/src/pages/remote/remote.module.d.ts +0 -10
- package/src/pages/remote/remote.types.d.ts +0 -4
- package/src/resolvers/quote.resolver.d.ts +0 -19
- package/src/types/context-route.types.d.ts +0 -5
- package/src/types/metrics.types.d.ts +0 -5
- package/src/utils/flow.utils.d.ts +0 -8
- package/src/utils/index.d.ts +0 -1
package/cms/cms.actions.d.ts
CHANGED
@@ -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,75 +14,86 @@ 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: ({
|
20
|
-
|
17
|
+
const ConfigureProductAction: ({ transactionItemId, productId, qty, }: {
|
18
|
+
transactionItemId?: string | undefined;
|
21
19
|
productId?: string | undefined;
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
20
|
+
qty?: number | undefined;
|
21
|
+
}) => {
|
22
|
+
type: string;
|
23
|
+
payload: {
|
24
|
+
transactionItemId: string | undefined;
|
25
|
+
productId: string | undefined;
|
26
|
+
qty: number | undefined;
|
27
|
+
};
|
28
|
+
};
|
29
|
+
const NavigateBackAction: () => {
|
30
|
+
type: string;
|
31
|
+
};
|
32
|
+
const NavigateToAction: (path: string, productId?: string, transactionItemId?: string) => {
|
33
|
+
type: string;
|
34
|
+
payload: {
|
35
|
+
path: string;
|
36
|
+
productId: string | undefined;
|
37
|
+
transactionItemId: string | undefined;
|
38
|
+
};
|
39
|
+
};
|
40
|
+
const NavigateToCatalogAction: () => {
|
41
|
+
type: string;
|
42
|
+
};
|
43
|
+
const NavigateToShoppingCartAction: () => {
|
44
|
+
type: string;
|
45
|
+
};
|
46
|
+
const ApplyProductConfigurationAction: () => {
|
47
|
+
type: string;
|
48
|
+
};
|
49
|
+
const RemoteApplyAction: () => {
|
50
|
+
type: string;
|
51
|
+
};
|
52
|
+
const RemoteCancelAction: () => {
|
53
|
+
type: string;
|
54
|
+
};
|
30
55
|
const SwitchObjectAction: (payload: {
|
31
56
|
id: string;
|
32
|
-
}) =>
|
57
|
+
}) => {
|
58
|
+
type: string;
|
59
|
+
payload: {
|
60
|
+
id: string;
|
61
|
+
};
|
62
|
+
};
|
33
63
|
const OpenGuidedSelling: (payload: {
|
34
64
|
guidedSellingId: string;
|
35
|
-
}) =>
|
65
|
+
}) => {
|
66
|
+
type: string;
|
67
|
+
payload: {
|
68
|
+
guidedSellingId: string;
|
69
|
+
};
|
70
|
+
};
|
36
71
|
const CloseGuidedSelling: (payload?: {
|
37
72
|
keepState?: boolean;
|
38
|
-
}) =>
|
73
|
+
}) => {
|
74
|
+
type: string;
|
75
|
+
payload: {
|
76
|
+
keepState?: boolean | undefined;
|
77
|
+
} | undefined;
|
78
|
+
};
|
39
79
|
const SubmitGuidedSelling: (payload: {
|
40
80
|
result: Record<string, any>;
|
41
|
-
}) =>
|
42
|
-
|
81
|
+
}) => {
|
82
|
+
type: string;
|
83
|
+
payload: {
|
84
|
+
result: Record<string, any>;
|
85
|
+
};
|
86
|
+
};
|
87
|
+
const OpenDialog: (dialog: string) => {
|
88
|
+
type: string;
|
89
|
+
payload: {
|
90
|
+
dialog: string;
|
91
|
+
};
|
92
|
+
};
|
43
93
|
}
|
44
|
-
/**
|
45
|
-
* @deprecated
|
46
|
-
* Use FlowAction namespace instead
|
47
|
-
*/
|
48
|
-
export declare const ConfigureProductAction: ({ lineItemId, productId, }: {
|
49
|
-
lineItemId?: string | undefined;
|
50
|
-
productId?: string | undefined;
|
51
|
-
}) => IntegrationAction;
|
52
|
-
/**
|
53
|
-
* @deprecated
|
54
|
-
* Use FlowAction namespace instead
|
55
|
-
*/
|
56
|
-
export declare const NavigateBackAction: () => IntegrationAction;
|
57
|
-
/**
|
58
|
-
* @deprecated
|
59
|
-
* Use FlowAction namespace instead
|
60
|
-
*/
|
61
|
-
export declare const NavigateToCatalogAction: () => IntegrationAction;
|
62
|
-
/**
|
63
|
-
* @deprecated
|
64
|
-
* Use FlowAction namespace instead
|
65
|
-
*/
|
66
|
-
export declare const ApplyProductConfigurationAction: () => IntegrationAction;
|
67
|
-
/**
|
68
|
-
* @deprecated
|
69
|
-
* Use FlowAction namespace instead
|
70
|
-
*/
|
71
|
-
export declare const RemoteApplyAction: () => IntegrationAction;
|
72
|
-
/**
|
73
|
-
* @deprecated
|
74
|
-
* Use FlowAction namespace instead
|
75
|
-
*/
|
76
|
-
export declare const RemoteCancelAction: () => IntegrationAction;
|
77
|
-
/**
|
78
|
-
* @deprecated
|
79
|
-
* Use FlowAction namespace instead
|
80
|
-
*/
|
81
|
-
export declare const SwitchObjectAction: (payload: {
|
82
|
-
id: string;
|
83
|
-
}) => IntegrationAction;
|
84
94
|
export declare namespace CmsAction {
|
85
95
|
const GO_TO_PAGE = "[CMS]_GO_TO_PAGE";
|
86
96
|
const UPDATE_CUSTOMIZATION = "[CMS]_UPDATE_CUSTOMIZATION";
|
87
|
-
const EMIT_CUSTOMIZATION_CHANGES = "[CMS]_EMIT_CUSTOMIZATION_CHANGES";
|
88
97
|
const SHOW_OVERLAY = "[CMS]_SHOW_OVERLAY";
|
89
98
|
const HIDE_OVERLAY = "[CMS]_HIDE_OVERLAY";
|
90
99
|
const HIDE_ALL_OVERLAYS = "[CMS]_HIDE_ALL_OVERLAYS";
|
@@ -93,37 +102,53 @@ export declare namespace CmsAction {
|
|
93
102
|
*
|
94
103
|
* @param pageName name of the page
|
95
104
|
*/
|
96
|
-
const GoToPage: (pageName: string) =>
|
105
|
+
const GoToPage: (pageName: string) => {
|
106
|
+
type: string;
|
107
|
+
payload: {
|
108
|
+
pageName: string;
|
109
|
+
};
|
110
|
+
};
|
97
111
|
/**
|
98
112
|
* Update UI definition customization state
|
99
113
|
*
|
100
114
|
* @param pageName name of the page
|
101
115
|
*/
|
102
|
-
const UpdateCustomization: (value: any) =>
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
const EmitCustomizationChanges: (changes: CustomizationChanges) => IntegrationAction;
|
116
|
+
const UpdateCustomization: (value: any) => {
|
117
|
+
type: string;
|
118
|
+
payload: {
|
119
|
+
value: any;
|
120
|
+
};
|
121
|
+
};
|
109
122
|
/**
|
110
123
|
* Show an Overlay on the selected page
|
111
124
|
*
|
112
125
|
* @param name - name of the overlay
|
113
126
|
* @returns void
|
114
127
|
*/
|
115
|
-
const ShowOverlay: (name: string) =>
|
128
|
+
const ShowOverlay: (name: string) => {
|
129
|
+
type: string;
|
130
|
+
payload: {
|
131
|
+
name: string;
|
132
|
+
};
|
133
|
+
};
|
116
134
|
/**
|
117
135
|
* Hide an Overlay on the selected page
|
118
136
|
*
|
119
137
|
* @param name - name of the overlay
|
120
138
|
* @returns void
|
121
139
|
*/
|
122
|
-
const HideOverlay: (name: string) =>
|
140
|
+
const HideOverlay: (name: string) => {
|
141
|
+
type: string;
|
142
|
+
payload: {
|
143
|
+
name: string;
|
144
|
+
};
|
145
|
+
};
|
123
146
|
/**
|
124
147
|
* Hide all Overlays on the selected page
|
125
148
|
*
|
126
149
|
* @returns void
|
127
150
|
*/
|
128
|
-
const HideAllOverlays: () =>
|
151
|
+
const HideAllOverlays: () => {
|
152
|
+
type: string;
|
153
|
+
};
|
129
154
|
}
|
@@ -1,36 +1,29 @@
|
|
1
|
-
import { ChangeDetectorRef,
|
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(
|
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,
|
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
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
2
2
|
import { ToastService } from '@veloceapps/components';
|
3
3
|
import { UIDefinition } from '@veloceapps/core';
|
4
|
-
import {
|
5
|
-
import { BehaviorSubject
|
4
|
+
import { IntegrationState } from '@veloceapps/sdk/core';
|
5
|
+
import { BehaviorSubject } from 'rxjs';
|
6
6
|
import { RuntimeService } from '../../modules/runtime/services/runtime.service';
|
7
7
|
import { ElementMetadata } from '../../types/common.types';
|
8
8
|
import { CMSPreviewConfig } from './preview.types';
|
@@ -13,20 +13,19 @@ interface State {
|
|
13
13
|
}
|
14
14
|
export declare class PreviewComponent implements OnInit, OnDestroy {
|
15
15
|
private runtimeService;
|
16
|
-
private configurationState;
|
17
16
|
private toastService;
|
18
17
|
private integrationState;
|
19
18
|
uiDefinition?: UIDefinition;
|
20
19
|
config?: CMSPreviewConfig;
|
21
20
|
state$: BehaviorSubject<State>;
|
22
|
-
elements$:
|
21
|
+
elements$: BehaviorSubject<ElementMetadata[]>;
|
23
22
|
private destroy$;
|
24
|
-
constructor(runtimeService: RuntimeService,
|
23
|
+
constructor(runtimeService: RuntimeService, toastService: ToastService, integrationState: IntegrationState);
|
25
24
|
ngOnInit(): void;
|
26
25
|
ngOnDestroy(): void;
|
27
26
|
trackBy(_: number, el: ElementMetadata): ElementMetadata;
|
28
27
|
private startPreview;
|
29
|
-
private
|
28
|
+
private getElements$;
|
30
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<PreviewComponent, never>;
|
31
30
|
static ɵcmp: i0.ɵɵComponentDeclaration<PreviewComponent, "vl-cms-preview", never, { "uiDefinition": "uiDefinition"; "config": "config"; }, {}, never, never, false, never>;
|
32
31
|
}
|
@@ -13,10 +13,6 @@ export interface CMSPreviewConfig {
|
|
13
13
|
* When `true`, preview renders settings page (element with `type: CUSTOMIZATION_PAGE`)
|
14
14
|
*/
|
15
15
|
customizationMode?: boolean;
|
16
|
-
/**
|
17
|
-
* When `true`, preview component does not clear configuration state on destroy
|
18
|
-
*/
|
19
|
-
persistConfigurationState?: boolean;
|
20
16
|
/**
|
21
17
|
* Custom initialization function which will be executed before starting a preview
|
22
18
|
*/
|
@@ -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
|
}
|
package/cms/types/index.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { ElementMetadata, ElementPath
|
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;
|
package/cms/vendor-map.d.ts
CHANGED
@@ -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 {
|
4
|
+
import { ContractedPriceApiService } from '@veloceapps/api';
|
5
|
+
import { CatalogApiService, ConfigurationSettingsApiService, GuidedSellingApiService, DocumentAttachmentApiService, SalesforceApiService, SalesTransactionApiService, ShoppingCartSettingsApiService } from '@veloceapps/api/v2';
|
5
6
|
import { ToastService, ToastType } from '@veloceapps/components';
|
6
|
-
import {
|
7
|
-
import { ActionCodePipe, ConfigurationService,
|
7
|
+
import { Operator, parseJsonSafely, parseJwt, Predicate, TokenInfoService, UITemplateType } from '@veloceapps/core';
|
8
|
+
import { ActionCodePipe, ConfigurationService, GuidedSellingService, ConfigurationStateService, DatePipe, filterSuccessfulExecute, FlowConfigurationService, FlowInfoService, 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,98 +13,56 @@ 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;
|
23
|
+
UITemplateType: typeof UITemplateType;
|
30
24
|
};
|
31
25
|
'@veloceapps/components': {
|
32
26
|
ToastService: typeof ToastService;
|
33
27
|
ToastType: typeof ToastType;
|
34
28
|
};
|
35
29
|
'@veloceapps/api': {
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
RampApiService: typeof RampApiService;
|
30
|
+
ContractedPriceApiService: typeof ContractedPriceApiService;
|
31
|
+
};
|
32
|
+
'@veloceapps/api/v2': {
|
40
33
|
CatalogApiService: typeof CatalogApiService;
|
41
|
-
DeltaApiService: typeof DeltaApiService;
|
42
|
-
PicklistsApiService: typeof PicklistsApiService;
|
43
|
-
PriceApiService: typeof PriceApiService;
|
44
|
-
ShoppingCartSettingsApiService: typeof ShoppingCartSettingsApiService;
|
45
34
|
ConfigurationSettingsApiService: typeof ConfigurationSettingsApiService;
|
35
|
+
DocumentAttachmentApiService: typeof DocumentAttachmentApiService;
|
46
36
|
GuidedSellingApiService: typeof GuidedSellingApiService;
|
47
|
-
|
37
|
+
SalesforceApiService: typeof SalesforceApiService;
|
38
|
+
SalesTransactionApiService: typeof SalesTransactionApiService;
|
39
|
+
ShoppingCartSettingsApiService: typeof ShoppingCartSettingsApiService;
|
48
40
|
};
|
49
41
|
'@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
42
|
ConfigurationService: typeof ConfigurationService;
|
74
43
|
ConfigurationStateService: typeof ConfigurationStateService;
|
75
|
-
|
44
|
+
GuidedSellingService: typeof GuidedSellingService;
|
45
|
+
filterSuccessfulExecute: typeof filterSuccessfulExecute;
|
46
|
+
FlowInfoService: typeof FlowInfoService;
|
76
47
|
FlowConfigurationService: typeof FlowConfigurationService;
|
77
48
|
IntegrationState: typeof IntegrationState;
|
78
49
|
FlowStateService: typeof FlowStateService;
|
79
50
|
FlowStateConfigurationService: typeof FlowStateConfigurationService;
|
80
|
-
|
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: <
|
64
|
+
cmsInject: <T_1 = unknown>(token: string) => T_1;
|
94
65
|
FlowAction: typeof cmsActions.FlowAction;
|
95
|
-
ConfigureProductAction: ({ lineItemId, productId, }: {
|
96
|
-
lineItemId?: string | undefined;
|
97
|
-
productId?: string | undefined;
|
98
|
-
}) => import("@veloceapps/sdk/core").IntegrationAction<any>;
|
99
|
-
NavigateBackAction: () => import("@veloceapps/sdk/core").IntegrationAction<any>;
|
100
|
-
NavigateToCatalogAction: () => import("@veloceapps/sdk/core").IntegrationAction<any>;
|
101
|
-
ApplyProductConfigurationAction: () => import("@veloceapps/sdk/core").IntegrationAction<any>;
|
102
|
-
RemoteApplyAction: () => import("@veloceapps/sdk/core").IntegrationAction<any>;
|
103
|
-
RemoteCancelAction: () => import("@veloceapps/sdk/core").IntegrationAction<any>;
|
104
|
-
SwitchObjectAction: (payload: {
|
105
|
-
id: string;
|
106
|
-
}) => import("@veloceapps/sdk/core").IntegrationAction<any>;
|
107
66
|
CmsAction: typeof cmsActions.CmsAction;
|
108
67
|
DEFAULT_PLUGINS_TOKEN: angularCore.InjectionToken<typeof import("./engine/models/plugin").Plugin[]>;
|
109
68
|
UI_DEFINITION_METADATA: angularCore.InjectionToken<import("@veloceapps/core").UIDefinitionMetadata>;
|
@@ -111,5 +70,13 @@ export declare const vendorMap: {
|
|
111
70
|
SHARED_ELEMENT_METADATA: angularCore.InjectionToken<import("@veloceapps/sdk/cms").ElementMetadata | undefined>;
|
112
71
|
ELEMENT_CONFIG: angularCore.InjectionToken<import("@veloceapps/sdk/cms").ElementConfig>;
|
113
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;
|
114
81
|
};
|
115
82
|
export type VendorMap = typeof vendorMap;
|
package/core/index.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
export * from './core.module';
|
2
2
|
export * from './directives';
|
3
3
|
export * from './modules';
|
4
|
+
export * from './operators';
|
4
5
|
export * from './pipes';
|
5
6
|
export * from './services';
|
6
7
|
export * from './types';
|
7
8
|
export * from './utils';
|
8
|
-
export * as lineItemUtils from './utils/line-item.utils';
|
@@ -1,6 +1,6 @@
|
|
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 './
|
6
|
-
export * from './
|
3
|
+
export * from './services/configuration.service';
|
4
|
+
export * from './services/test-mode-configuration.service';
|
5
|
+
export * from './services/guided-selling.service';
|
6
|
+
export * from './types';
|
@@ -1,28 +1,17 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { PCMApiService } from '@veloceapps/api/v2';
|
2
|
+
import { PCMModel, UIDefinitionContainer, UIDefinitionProps } from '@veloceapps/core';
|
3
3
|
import { Observable } from 'rxjs';
|
4
|
-
import { ContextService } from '../../../services';
|
5
|
-
import { RuntimeContext } from '../../../types';
|
6
4
|
import { RuntimeInitializationProps } from '../types/configuration-runtime.types';
|
7
|
-
import { RuntimeContextService } from './runtime-context.service';
|
8
5
|
import * as i0 from "@angular/core";
|
9
6
|
export declare class ConfigurationRuntimeService {
|
10
|
-
private
|
11
|
-
|
12
|
-
private runtimeContextService;
|
13
|
-
private _runtimeContext?;
|
14
|
-
private _isInitialized;
|
7
|
+
private pcmApiService;
|
8
|
+
uiDefinitionContainer: UIDefinitionContainer | null;
|
15
9
|
initializationProps?: RuntimeInitializationProps;
|
16
|
-
|
17
|
-
constructor(
|
10
|
+
pcmModel?: PCMModel;
|
11
|
+
constructor(pcmApiService: PCMApiService);
|
12
|
+
get uiDefinitionProps(): UIDefinitionProps;
|
18
13
|
reset(): void;
|
19
|
-
|
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;
|
14
|
+
init$(props: RuntimeInitializationProps): Observable<PCMModel>;
|
26
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationRuntimeService, never>;
|
27
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurationRuntimeService>;
|
28
17
|
}
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import { FlowStateApiService
|
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,
|
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
|
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,
|
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,15 +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(
|
43
|
-
/**
|
44
|
-
* @deprecated Will be removed in @veloceapps/sdk@9
|
45
|
-
*/
|
46
|
-
saveConfiguration(quoteId?: string, flow?: boolean): Observable<SaveQuoteResponse>;
|
43
|
+
saveConfiguration(): Observable<SalesTransactionUpsertResponse>;
|
47
44
|
cancelConfiguration(): Observable<void>;
|
48
45
|
private get isStatefulConfiguration();
|
49
46
|
private initStateful$;
|
50
|
-
private initStateless$;
|
51
47
|
private execToRequest;
|
52
48
|
private handleSelectorsResponse;
|
53
49
|
private executeRequest$;
|