@veloceapps/sdk 11.0.0-16 → 11.0.0-17
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 +98 -22
- package/cms/components/element-renderer/element-renderer.component.d.ts +3 -10
- 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 +4 -27
- package/core/index.d.ts +0 -1
- package/core/modules/configuration/index.d.ts +1 -4
- package/core/modules/configuration/services/configuration-runtime.service.d.ts +3 -20
- package/core/modules/configuration/services/configuration-state.service.d.ts +3 -3
- package/core/modules/configuration/services/configuration.service.d.ts +23 -46
- package/core/modules/flow-configuration/index.d.ts +0 -3
- package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +5 -13
- package/core/services/flow-info.service.d.ts +3 -2
- package/core/services/flow-state-configuration.service.d.ts +2 -8
- package/core/services/flow-state.service.d.ts +6 -12
- package/core/services/index.d.ts +0 -1
- package/core/services/integration.state.d.ts +1 -1
- package/core/services/sales-transaction.service.d.ts +4 -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 +99 -65
- package/esm2020/cms/cms.default.mjs +2 -3
- package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +7 -64
- package/esm2020/cms/components/preview/preview.component.mjs +3 -3
- 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/path.utils.mjs +1 -10
- package/esm2020/cms/vendor-map.mjs +4 -5
- package/esm2020/core/core.module.mjs +4 -5
- package/esm2020/core/index.mjs +1 -2
- package/esm2020/core/modules/configuration/configuration.module.mjs +3 -4
- package/esm2020/core/modules/configuration/index.mjs +2 -5
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +9 -67
- package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +46 -54
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +96 -226
- 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 +15 -32
- package/esm2020/core/services/flow-info.service.mjs +9 -3
- package/esm2020/core/services/flow-state-configuration.service.mjs +10 -25
- package/esm2020/core/services/flow-state.service.mjs +25 -58
- package/esm2020/core/services/index.mjs +1 -2
- package/esm2020/core/services/integration.state.mjs +2 -2
- package/esm2020/core/services/sales-transaction.service.mjs +11 -5
- 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/flow-routing.module.mjs +8 -8
- package/esm2020/src/guards/flow.guard.mjs +5 -7
- package/esm2020/src/guards/product-unload.guard.mjs +7 -7
- package/esm2020/src/index.mjs +1 -2
- package/esm2020/src/pages/debug/debug.component.mjs +10 -15
- package/esm2020/src/pages/product/product.component.mjs +11 -14
- package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +5 -6
- package/esm2020/src/resolvers/sales-transaction.resolver.mjs +83 -0
- package/esm2020/src/resolvers/ui-definition.resolver.mjs +5 -4
- package/esm2020/src/services/flow-dialog.service.mjs +1 -1
- package/esm2020/src/services/flow-router.service.mjs +17 -24
- package/esm2020/src/services/flow.service.mjs +5 -13
- package/esm2020/src/types/index.mjs +2 -3
- package/esm2020/src/types/route.types.mjs +1 -1
- package/fesm2015/veloceapps-sdk-cms.mjs +116 -252
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +318 -1116
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +87 -120
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +112 -244
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +366 -1162
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +87 -120
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/guards/product-unload.guard.d.ts +3 -3
- package/src/index.d.ts +0 -1
- package/src/pages/debug/debug.component.d.ts +1 -3
- package/src/pages/product/product.component.d.ts +3 -4
- package/src/pages/record-not-found/record-not-found.component.d.ts +2 -3
- package/src/resolvers/sales-transaction.resolver.d.ts +18 -0
- package/src/services/flow-dialog.service.d.ts +2 -1
- package/src/services/flow-router.service.d.ts +5 -5
- package/src/services/flow.service.d.ts +0 -1
- 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 -7
- package/core/modules/configuration/services/runtime-context.service.d.ts +0 -12
- package/core/modules/configuration/types/configuration-runtime.types.d.ts +0 -8
- 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/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 -67
- package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +0 -45
- package/esm2020/core/modules/configuration/types/configuration-runtime.types.mjs +0 -2
- 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/quote-draft.service.mjs +0 -174
- 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/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 -14
- package/esm2020/src/utils/index.mjs +0 -2
- package/src/resolvers/quote.resolver.d.ts +0 -18
- 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 -1
- package/src/utils/index.d.ts +0 -1
package/cms/cms.actions.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CustomizationChanges } from '@veloceapps/core';
|
|
2
|
-
import { IntegrationAction } from '@veloceapps/sdk/core';
|
|
3
2
|
export declare namespace FlowAction {
|
|
4
3
|
const FLOW_CONFIGURE_PRODUCT = "[FLOW]_CONFIGURE_PRODUCT";
|
|
5
4
|
const FLOW_NAVIGATE_BACK = "[FLOW]_NAVIGATE_BACK";
|
|
@@ -16,30 +15,80 @@ export declare namespace FlowAction {
|
|
|
16
15
|
const SUBMIT_GUIDED_SELLING = "[FLOW]_SUBMIT_GUIDED_SELLING";
|
|
17
16
|
const CLOSE_GUIDED_SELLING = "[FLOW]_CLOSE_GUIDED_SELLING";
|
|
18
17
|
const OPEN_DIALOG = "[FLOW]_OPEN_DIALOG";
|
|
19
|
-
const ConfigureProductAction: ({
|
|
20
|
-
|
|
18
|
+
const ConfigureProductAction: ({ transactionItemId, productId, }: {
|
|
19
|
+
transactionItemId?: string | undefined;
|
|
21
20
|
productId?: string | undefined;
|
|
22
|
-
}) =>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
21
|
+
}) => {
|
|
22
|
+
type: string;
|
|
23
|
+
payload: {
|
|
24
|
+
transactionItemId: string | undefined;
|
|
25
|
+
productId: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
const NavigateBackAction: () => {
|
|
29
|
+
type: string;
|
|
30
|
+
};
|
|
31
|
+
const NavigateToAction: (path: string, productId?: string, transactionItemId?: string) => {
|
|
32
|
+
type: string;
|
|
33
|
+
payload: {
|
|
34
|
+
path: string;
|
|
35
|
+
productId: string | undefined;
|
|
36
|
+
transactionItemId: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
const NavigateToCatalogAction: () => {
|
|
40
|
+
type: string;
|
|
41
|
+
};
|
|
42
|
+
const NavigateToShoppingCartAction: () => {
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
const ApplyProductConfigurationAction: () => {
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
const RemoteApplyAction: () => {
|
|
49
|
+
type: string;
|
|
50
|
+
};
|
|
51
|
+
const RemoteCancelAction: () => {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
30
54
|
const SwitchObjectAction: (payload: {
|
|
31
55
|
id: string;
|
|
32
|
-
}) =>
|
|
56
|
+
}) => {
|
|
57
|
+
type: string;
|
|
58
|
+
payload: {
|
|
59
|
+
id: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
33
62
|
const OpenGuidedSelling: (payload: {
|
|
34
63
|
guidedSellingId: string;
|
|
35
|
-
}) =>
|
|
64
|
+
}) => {
|
|
65
|
+
type: string;
|
|
66
|
+
payload: {
|
|
67
|
+
guidedSellingId: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
36
70
|
const CloseGuidedSelling: (payload?: {
|
|
37
71
|
keepState?: boolean;
|
|
38
|
-
}) =>
|
|
72
|
+
}) => {
|
|
73
|
+
type: string;
|
|
74
|
+
payload: {
|
|
75
|
+
keepState?: boolean | undefined;
|
|
76
|
+
} | undefined;
|
|
77
|
+
};
|
|
39
78
|
const SubmitGuidedSelling: (payload: {
|
|
40
79
|
result: Record<string, any>;
|
|
41
|
-
}) =>
|
|
42
|
-
|
|
80
|
+
}) => {
|
|
81
|
+
type: string;
|
|
82
|
+
payload: {
|
|
83
|
+
result: Record<string, any>;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
const OpenDialog: (dialog: string) => {
|
|
87
|
+
type: string;
|
|
88
|
+
payload: {
|
|
89
|
+
dialog: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
43
92
|
}
|
|
44
93
|
export declare namespace CmsAction {
|
|
45
94
|
const GO_TO_PAGE = "[CMS]_GO_TO_PAGE";
|
|
@@ -53,37 +102,64 @@ export declare namespace CmsAction {
|
|
|
53
102
|
*
|
|
54
103
|
* @param pageName name of the page
|
|
55
104
|
*/
|
|
56
|
-
const GoToPage: (pageName: string) =>
|
|
105
|
+
const GoToPage: (pageName: string) => {
|
|
106
|
+
type: string;
|
|
107
|
+
payload: {
|
|
108
|
+
pageName: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
57
111
|
/**
|
|
58
112
|
* Update UI definition customization state
|
|
59
113
|
*
|
|
60
114
|
* @param pageName name of the page
|
|
61
115
|
*/
|
|
62
|
-
const UpdateCustomization: (value: any) =>
|
|
116
|
+
const UpdateCustomization: (value: any) => {
|
|
117
|
+
type: string;
|
|
118
|
+
payload: {
|
|
119
|
+
value: any;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
63
122
|
/**
|
|
64
123
|
* Emit customization page changes
|
|
65
124
|
*
|
|
66
125
|
* @param changes - object with customization page changes
|
|
67
126
|
*/
|
|
68
|
-
const EmitCustomizationChanges: (changes: CustomizationChanges) =>
|
|
127
|
+
const EmitCustomizationChanges: (changes: CustomizationChanges) => {
|
|
128
|
+
type: string;
|
|
129
|
+
payload: {
|
|
130
|
+
changes: CustomizationChanges;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
69
133
|
/**
|
|
70
134
|
* Show an Overlay on the selected page
|
|
71
135
|
*
|
|
72
136
|
* @param name - name of the overlay
|
|
73
137
|
* @returns void
|
|
74
138
|
*/
|
|
75
|
-
const ShowOverlay: (name: string) =>
|
|
139
|
+
const ShowOverlay: (name: string) => {
|
|
140
|
+
type: string;
|
|
141
|
+
payload: {
|
|
142
|
+
name: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
76
145
|
/**
|
|
77
146
|
* Hide an Overlay on the selected page
|
|
78
147
|
*
|
|
79
148
|
* @param name - name of the overlay
|
|
80
149
|
* @returns void
|
|
81
150
|
*/
|
|
82
|
-
const HideOverlay: (name: string) =>
|
|
151
|
+
const HideOverlay: (name: string) => {
|
|
152
|
+
type: string;
|
|
153
|
+
payload: {
|
|
154
|
+
name: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
83
157
|
/**
|
|
84
158
|
* Hide all Overlays on the selected page
|
|
85
159
|
*
|
|
86
160
|
* @returns void
|
|
87
161
|
*/
|
|
88
|
-
const HideAllOverlays: () =>
|
|
162
|
+
const HideAllOverlays: () => {
|
|
163
|
+
type: string;
|
|
164
|
+
};
|
|
89
165
|
}
|
|
@@ -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
|
}
|
|
@@ -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
|
@@ -5,7 +5,7 @@ import { CatalogApiService, ConfigurationSettingsApiService, ContractedPriceApiS
|
|
|
5
5
|
import { SalesTransactionApiService } from '@veloceapps/api/v2';
|
|
6
6
|
import { ToastService, ToastType } from '@veloceapps/components';
|
|
7
7
|
import { Operator, parseJsonSafely, parseJwt, Predicate, TokenInfoService } from '@veloceapps/core';
|
|
8
|
-
import { ActionCodePipe, ConfigurationService, ConfigurationStateService, DatePipe, FlowConfigurationService, FlowStateConfigurationService, FlowStateService, IntegrationState,
|
|
8
|
+
import { ActionCodePipe, ConfigurationService, ConfigurationStateService, DatePipe, FlowConfigurationService, FlowStateConfigurationService, FlowStateService, IntegrationState, NumberPipe, PricePipe, ProductImagesService, RuntimeSettingsService, SalesTransactionService, TransactionItemWorker } from '@veloceapps/sdk/core';
|
|
9
9
|
import lodash from 'lodash';
|
|
10
10
|
import * as rxjs from 'rxjs';
|
|
11
11
|
import * as rxjsOperators from 'rxjs/operators';
|
|
@@ -42,49 +42,26 @@ export declare const vendorMap: {
|
|
|
42
42
|
SalesTransactionApiService: typeof SalesTransactionApiService;
|
|
43
43
|
};
|
|
44
44
|
'@veloceapps/sdk/core': {
|
|
45
|
-
findLineItem: (id: string, lineItems: import("@veloceapps/core").LineItem[]) => import("@veloceapps/core").LineItem | undefined;
|
|
46
|
-
findLineItemWithComparator: (lineItems: import("@veloceapps/core").LineItem[], comparator: (li: import("@veloceapps/core").LineItem) => boolean) => import("@veloceapps/core").LineItem | undefined;
|
|
47
|
-
insertLineItem: (lineItem: import("@veloceapps/core").LineItem, parentId: string, toInsert: import("@veloceapps/core").LineItem) => import("@veloceapps/core").LineItem;
|
|
48
|
-
removeLineItem: (lineItem: import("@veloceapps/core").LineItem, idToRemove: string) => import("@veloceapps/core").LineItem;
|
|
49
|
-
replaceLineItem: (lineItem: import("@veloceapps/core").LineItem, replaceTo: import("@veloceapps/core").LineItem, skipCardinalityCalculation?: boolean | undefined) => import("@veloceapps/core").LineItem;
|
|
50
|
-
recalculateCardinalityVariables: (original: import("@veloceapps/core").LineItem, updated: import("@veloceapps/core").LineItem) => import("@veloceapps/core").LineItem;
|
|
51
|
-
mapAttributes: (attributes: import("@veloceapps/core").Attribute[]) => lodash.Dictionary<any>;
|
|
52
|
-
getAttributes: (attributes: import("@veloceapps/core").Attribute[], names?: string[] | undefined) => import("@veloceapps/core").Attribute[];
|
|
53
|
-
upsertAttributes: (originalAttributes: import("@veloceapps/core").Attribute[], attributesToUpsert: import("@veloceapps/core").NewAttribute[]) => import("@veloceapps/core").Attribute[];
|
|
54
|
-
patchAttributes: (rootLineItem: import("@veloceapps/core").LineItem, id: string, attrs: import("@veloceapps/core").NewAttribute[], skipCardinalityCalculation?: boolean | undefined) => import("@veloceapps/core").LineItem;
|
|
55
|
-
getAttributeValue: (attributes: import("@veloceapps/core").Attribute[], name: string) => any;
|
|
56
|
-
generateLineItem: (port: string, type: string, parentId: string, attributes?: import("@veloceapps/core").NewAttribute[] | undefined, lineItems?: import("@veloceapps/core").LineItem[] | undefined) => import("@veloceapps/core").LineItem;
|
|
57
|
-
getRecommendedPrices: (portDomain: import("@veloceapps/core").PortDomain, type: string) => {
|
|
58
|
-
net: number;
|
|
59
|
-
list: number;
|
|
60
|
-
};
|
|
61
|
-
getOriginParent: (lineItems: import("@veloceapps/core").LineItem[], currentLineItem: import("@veloceapps/core").LineItem) => import("@veloceapps/core").LineItem | undefined;
|
|
62
|
-
assetPredicateFn: (lineItem: import("@veloceapps/core").LineItem, assetId?: string | undefined) => boolean;
|
|
63
|
-
multiplyLineItems: (lineItem: import("@veloceapps/core").LineItem, qty: number, split: boolean) => import("@veloceapps/core").LineItem[];
|
|
64
|
-
isTechnicalAttribute: (name: string) => boolean;
|
|
65
|
-
filterOutTechnicalAttributes: <T_1 extends {
|
|
66
|
-
name: string;
|
|
67
|
-
}>(attributes: T_1[]) => T_1[];
|
|
68
45
|
ConfigurationService: typeof ConfigurationService;
|
|
69
46
|
ConfigurationStateService: typeof ConfigurationStateService;
|
|
70
|
-
QuoteDraftService: typeof QuoteDraftService;
|
|
71
47
|
FlowConfigurationService: typeof FlowConfigurationService;
|
|
72
48
|
IntegrationState: typeof IntegrationState;
|
|
73
49
|
FlowStateService: typeof FlowStateService;
|
|
74
50
|
FlowStateConfigurationService: typeof FlowStateConfigurationService;
|
|
75
|
-
|
|
51
|
+
TransactionItemWorker: typeof TransactionItemWorker;
|
|
76
52
|
ProductImagesService: typeof ProductImagesService;
|
|
77
53
|
RuntimeSettingsService: typeof RuntimeSettingsService;
|
|
78
54
|
ActionCodePipe: typeof ActionCodePipe;
|
|
79
55
|
DatePipe: typeof DatePipe;
|
|
80
56
|
NumberPipe: typeof NumberPipe;
|
|
81
57
|
PricePipe: typeof PricePipe;
|
|
58
|
+
SalesTransactionService: typeof SalesTransactionService;
|
|
82
59
|
};
|
|
83
60
|
'@veloceapps/sdk/cms': {
|
|
84
61
|
TemplatesService: typeof TemplatesService;
|
|
85
62
|
IntegrationState: typeof IntegrationState;
|
|
86
63
|
ResourcesService: typeof ResourcesService;
|
|
87
|
-
cmsInject: <
|
|
64
|
+
cmsInject: <T_1 = unknown>(token: string) => T_1;
|
|
88
65
|
FlowAction: typeof cmsActions.FlowAction;
|
|
89
66
|
CmsAction: typeof cmsActions.CmsAction;
|
|
90
67
|
DEFAULT_PLUGINS_TOKEN: angularCore.InjectionToken<typeof import("./engine/models/plugin").Plugin[]>;
|
package/core/index.d.ts
CHANGED
|
@@ -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 './
|
|
6
|
-
export * from './types/configuration.types';
|
|
3
|
+
export * from './services/configuration.service';
|
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RuntimeModel, UIDefinitionContainer, UIDefinitionProps } from '@veloceapps/core';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { RuntimeContext } from '../../../types';
|
|
5
|
-
import { RuntimeInitializationProps } from '../types/configuration-runtime.types';
|
|
6
|
-
import { RuntimeContextService } from './runtime-context.service';
|
|
1
|
+
import { UIDefinitionContainer, UIDefinitionProps } from '@veloceapps/core';
|
|
7
2
|
import * as i0 from "@angular/core";
|
|
8
3
|
export declare class ConfigurationRuntimeService {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
private _runtimeContext?;
|
|
12
|
-
private _isInitialized;
|
|
13
|
-
initializationProps?: RuntimeInitializationProps;
|
|
14
|
-
uiDefinitionProperties: UIDefinitionProps;
|
|
15
|
-
constructor(apiService: ConfigurationApiService, runtimeContextService: RuntimeContextService);
|
|
4
|
+
uiDefinitionContainer: UIDefinitionContainer | null;
|
|
5
|
+
get uiDefinitionProps(): UIDefinitionProps;
|
|
16
6
|
reset(): void;
|
|
17
|
-
initTestMode(uiDefinitionContainer: UIDefinitionContainer): Observable<RuntimeContext>;
|
|
18
|
-
init(props: RuntimeInitializationProps): Observable<RuntimeContext>;
|
|
19
|
-
overrideUIDefinition(uiDefinitionContainer: UIDefinitionContainer): void;
|
|
20
|
-
private id15to18;
|
|
21
|
-
get isInitialized(): boolean;
|
|
22
|
-
get runtimeModel(): RuntimeModel | undefined;
|
|
23
|
-
get runtimeContext(): RuntimeContext | undefined;
|
|
24
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationRuntimeService, never>;
|
|
25
8
|
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurationRuntimeService>;
|
|
26
9
|
}
|
|
@@ -12,13 +12,13 @@ import * as i0 from "@angular/core";
|
|
|
12
12
|
export declare class ConfigurationStateService {
|
|
13
13
|
private configurationRuntimeService;
|
|
14
14
|
private configurationService;
|
|
15
|
-
private salesTransactionService;
|
|
16
|
-
private toastService;
|
|
17
15
|
private flowStateService;
|
|
18
16
|
private flowInfoService;
|
|
19
17
|
private flowConfigurationService;
|
|
20
18
|
private flowStateApiService;
|
|
19
|
+
private salesTransactionService;
|
|
21
20
|
private salesTransactionApiService;
|
|
21
|
+
private toastService;
|
|
22
22
|
isInitialized$: BehaviorSubject<boolean>;
|
|
23
23
|
canceledConfiguration$: Subject<void>;
|
|
24
24
|
private readonly NOT_INITIALIZED;
|
|
@@ -32,7 +32,7 @@ export declare class ConfigurationStateService {
|
|
|
32
32
|
private statefulRequestStream$;
|
|
33
33
|
private statefulExecutionRequest$;
|
|
34
34
|
private statelessExecutionRequest$;
|
|
35
|
-
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);
|
|
36
36
|
get isExecutionInProgress$(): Observable<boolean>;
|
|
37
37
|
init$(): Observable<void>;
|
|
38
38
|
cleanup(): void;
|
|
@@ -1,59 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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 { FlowInfoService } from '../../../services';
|
|
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 configurationApiService;
|
|
18
|
-
private messageService;
|
|
19
|
-
private dialogService;
|
|
20
|
-
private runtimeSettings;
|
|
21
10
|
private flowInfoService;
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
private
|
|
25
|
-
private
|
|
26
|
-
private isLoadingSubj$;
|
|
11
|
+
private messageService;
|
|
12
|
+
private configurationRuntimeService;
|
|
13
|
+
private salesTransactionService;
|
|
14
|
+
private proceduresApiService;
|
|
27
15
|
isLoading$: Observable<boolean>;
|
|
28
16
|
hasUnsavedChanges: boolean;
|
|
29
|
-
|
|
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
|
-
|
|
32
|
-
patch(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
getRuntimeContext(): RuntimeContext;
|
|
38
|
-
get state$(): Observable<ConfigurePrice | null>;
|
|
39
|
-
get stateSnapshot(): ConfigurePrice | null;
|
|
40
|
-
get previousStateSnapshot(): ConfigurePrice | null;
|
|
41
|
-
get charges$(): Observable<Dictionary<Charge>>;
|
|
42
|
-
get chargesSnapshot(): Dictionary<Charge>;
|
|
43
|
-
get pricePlans$(): Observable<Dictionary<CompiledPricePlan>>;
|
|
44
|
-
get pricePlansSnapshot(): Dictionary<CompiledPricePlan>;
|
|
45
|
-
get procedureContext$(): Observable<Dictionary<unknown>>;
|
|
46
|
-
get procedureContextSnapshot(): Dictionary<unknown>;
|
|
47
|
-
configure(): Observable<LineItem>;
|
|
48
|
-
configureRequest$(configurationRequest: ConfigurationRequest): Observable<LineItem>;
|
|
49
|
-
configureExternal$(props: ExternalConfigurationProps): Observable<LineItem>;
|
|
50
|
-
configureGuidedSelling$(data: GuidedSellingSubmitData): Observable<ConfigurePrice>;
|
|
51
|
-
generateRequest(lightMode?: boolean): ConfigurationRequest;
|
|
52
|
-
generateLineItem(): LineItem;
|
|
53
|
-
getAsset(): LineItem | undefined;
|
|
54
|
-
private getUIDefinitionProperties;
|
|
55
|
-
private showInactiveProductsConfirmation;
|
|
56
|
-
private extendedConfigureLineItem$;
|
|
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>;
|
|
57
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationService, never>;
|
|
58
35
|
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurationService>;
|
|
59
36
|
}
|
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
import { ProceduresApiService } from '@veloceapps/api/v2';
|
|
2
|
-
import { SalesTransaction
|
|
2
|
+
import { SalesTransaction } from '@veloceapps/core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import {
|
|
5
|
-
import { ExternalConfigurationProps } from '../../configuration';
|
|
6
|
-
import { ConfigurationService } from '../../configuration/services/configuration.service';
|
|
7
|
-
import { FlowUpdateService } from './flow-update.service';
|
|
4
|
+
import { SalesTransactionService } from '../../../services/sales-transaction.service';
|
|
8
5
|
import * as i0 from "@angular/core";
|
|
9
6
|
export declare class FlowConfigurationService {
|
|
10
7
|
private proceduresApiService;
|
|
11
8
|
private salesTransactionService;
|
|
12
|
-
private updateService;
|
|
13
|
-
private configurationService;
|
|
14
|
-
private flowInfoService;
|
|
15
9
|
updated$: Observable<void>;
|
|
16
10
|
private updatedSubj$;
|
|
17
|
-
constructor(proceduresApiService: ProceduresApiService, salesTransactionService: SalesTransactionService
|
|
11
|
+
constructor(proceduresApiService: ProceduresApiService, salesTransactionService: SalesTransactionService);
|
|
18
12
|
calculate$(state: SalesTransaction): Observable<void>;
|
|
19
13
|
calculate(state: SalesTransaction): void;
|
|
20
|
-
revert$(
|
|
21
|
-
revert(
|
|
14
|
+
revert$(transactionItemId: string): Observable<SalesTransaction | null>;
|
|
15
|
+
revert(transactionItemId: string): void;
|
|
22
16
|
delete$(ids: string[]): Observable<SalesTransaction | null>;
|
|
23
17
|
delete(ids: string[]): void;
|
|
24
|
-
addTerm$(term: SalesTransactionItem): Observable<SalesTransaction | null>;
|
|
25
|
-
addToCart$(props: ExternalConfigurationProps): Observable<SalesTransaction | null>;
|
|
26
18
|
private handleErrorAndBounceBack;
|
|
27
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowConfigurationService, never>;
|
|
28
20
|
static ɵprov: i0.ɵɵInjectableDeclaration<FlowConfigurationService>;
|
|
@@ -2,7 +2,7 @@ import { Params } from '@angular/router';
|
|
|
2
2
|
import { UITemplatesApiService } from '@veloceapps/api/v2';
|
|
3
3
|
import { Flow, FlowContext, UITemplate, UITemplateType } from '@veloceapps/core';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
-
import { FlowCustomization } from '../types';
|
|
5
|
+
import { FlowCustomization } from '../types/flow-customization.types';
|
|
6
6
|
import { RuntimeSettingsService } from './runtime-settings.service';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class FlowInfoService {
|
|
@@ -31,8 +31,9 @@ export declare class FlowInfoService {
|
|
|
31
31
|
private templatesSubj$;
|
|
32
32
|
private contextSubj$;
|
|
33
33
|
constructor(runtimeSettingsService: RuntimeSettingsService, templatesApiService: UITemplatesApiService, customizationService?: FlowCustomization | undefined);
|
|
34
|
-
|
|
34
|
+
reset(): void;
|
|
35
35
|
init$(flowId: string, routeQueryParams: Params): Observable<void>;
|
|
36
|
+
updateContext(update: Partial<FlowContext>): void;
|
|
36
37
|
private initFlow$;
|
|
37
38
|
private initFlowTemplates$;
|
|
38
39
|
private remapTemplateName;
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import { FlowStateApiService } from '@veloceapps/api';
|
|
2
1
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { NewConfigurationProps } from '../modules/configuration';
|
|
4
|
-
import { FlowConfigurationService } from '../modules/flow-configuration';
|
|
2
|
+
import { NewConfigurationProps } from '../modules/configuration/types/configuration.types';
|
|
5
3
|
import { FlowInfoService } from './flow-info.service';
|
|
6
4
|
import { FlowStateService } from './flow-state.service';
|
|
7
5
|
import * as i0 from "@angular/core";
|
|
8
6
|
export declare class FlowStateConfigurationService {
|
|
9
7
|
private flowInfoService;
|
|
10
|
-
private flowConfigurationService;
|
|
11
|
-
private flowStateApiService;
|
|
12
8
|
private flowStateService;
|
|
13
|
-
|
|
14
|
-
constructor(flowInfoService: FlowInfoService, flowConfigurationService: FlowConfigurationService, flowStateApiService: FlowStateApiService, flowStateService: FlowStateService);
|
|
15
|
-
get configurationStateId(): string | null;
|
|
9
|
+
constructor(flowInfoService: FlowInfoService, flowStateService: FlowStateService);
|
|
16
10
|
addToCart$(props: NewConfigurationProps): Observable<void>;
|
|
17
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowStateConfigurationService, never>;
|
|
18
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<FlowStateConfigurationService>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { FlowStateApiService } from '@veloceapps/api';
|
|
2
2
|
import { ConfigurationProcessorsApiService, SalesTransactionApiService } from '@veloceapps/api/v2';
|
|
3
3
|
import { ToastService } from '@veloceapps/components';
|
|
4
|
-
import {
|
|
5
|
-
import { Dictionary } from 'lodash';
|
|
4
|
+
import { FlowStateExecutionRequest, FlowStateExecutionRequestDTO, FlowStateExecutionResult, FlowStateSelectorResponse, UITemplateType } from '@veloceapps/core';
|
|
6
5
|
import { Observable } from 'rxjs';
|
|
7
6
|
import { FlowConfigurationService } from '../modules';
|
|
8
7
|
import { FlowCustomization } from '../types/flow-customization.types';
|
|
@@ -11,18 +10,14 @@ import { FlowInfoService } from './flow-info.service';
|
|
|
11
10
|
import { SalesTransactionService } from './sales-transaction.service';
|
|
12
11
|
import * as i0 from "@angular/core";
|
|
13
12
|
export declare class FlowStateService {
|
|
14
|
-
private salesTransactionService;
|
|
15
|
-
private flowInfoService;
|
|
16
13
|
private flowConfiguration;
|
|
17
|
-
private
|
|
14
|
+
private flowInfoService;
|
|
18
15
|
private flowStateApiService;
|
|
16
|
+
private processorsApiService;
|
|
19
17
|
private salesTransactionApiService;
|
|
18
|
+
private salesTransactionService;
|
|
20
19
|
private toastService;
|
|
21
20
|
private customizationService?;
|
|
22
|
-
charges$: Observable<Dictionary<Charge>>;
|
|
23
|
-
pricePlans$: Observable<Dictionary<CompiledPricePlan>>;
|
|
24
|
-
activeMetrics$: Observable<MetricRule[]>;
|
|
25
|
-
isPriceListLocked$: Observable<boolean>;
|
|
26
21
|
private readonly NOT_INITIALIZED;
|
|
27
22
|
private readonly EXECUTION_BUFFER_TIME;
|
|
28
23
|
private executedFunctions;
|
|
@@ -36,9 +31,9 @@ export declare class FlowStateService {
|
|
|
36
31
|
private statefulRequestStream$;
|
|
37
32
|
private statefulExecutionRequest$;
|
|
38
33
|
private cleanup$;
|
|
39
|
-
constructor(
|
|
34
|
+
constructor(flowConfiguration: FlowConfigurationService, flowInfoService: FlowInfoService, flowStateApiService: FlowStateApiService, processorsApiService: ConfigurationProcessorsApiService, salesTransactionApiService: SalesTransactionApiService, salesTransactionService: SalesTransactionService, toastService: ToastService, customizationService?: FlowCustomization | undefined);
|
|
40
35
|
init$(): Observable<void>;
|
|
41
|
-
|
|
36
|
+
reset(): void;
|
|
42
37
|
get hasUnsavedChanges(): boolean;
|
|
43
38
|
get stateId(): string | null;
|
|
44
39
|
get isExecutionInProgress$(): Observable<boolean>;
|
|
@@ -67,7 +62,6 @@ export declare class FlowStateService {
|
|
|
67
62
|
private executeStateless$;
|
|
68
63
|
private executeStatelessActions;
|
|
69
64
|
private executeStatelessSelectors;
|
|
70
|
-
private getFlowSafe;
|
|
71
65
|
private initProcessors$;
|
|
72
66
|
private executeActionScript;
|
|
73
67
|
private executeSelectorScript;
|
package/core/services/index.d.ts
CHANGED
|
@@ -3,6 +3,5 @@ export * from './flow-state-configuration.service';
|
|
|
3
3
|
export * from './flow-state.service';
|
|
4
4
|
export * from './integration.state';
|
|
5
5
|
export * from './product-images.service';
|
|
6
|
-
export * from './quote-draft.service';
|
|
7
6
|
export * from './runtime-settings.service';
|
|
8
7
|
export * from './sales-transaction.service';
|
|
@@ -10,7 +10,7 @@ export declare class IntegrationState<S = IntegrationStateModel> {
|
|
|
10
10
|
dispatch(action: IntegrationAction): void;
|
|
11
11
|
listen$<P = any>(actionType: string): Observable<P>;
|
|
12
12
|
listenAll$<T extends IntegrationAction>(): Observable<T>;
|
|
13
|
-
|
|
13
|
+
reset(): void;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<IntegrationState<any>, never>;
|
|
15
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<IntegrationState<any>>;
|
|
16
16
|
}
|
|
@@ -9,7 +9,7 @@ export declare class SalesTransactionService {
|
|
|
9
9
|
private stateSubj$;
|
|
10
10
|
private isInitializedSubj$;
|
|
11
11
|
private hasUnsavedChangesSubj$;
|
|
12
|
-
private
|
|
12
|
+
private initialState;
|
|
13
13
|
hasUnsavedChanges$: Observable<boolean>;
|
|
14
14
|
state$: Observable<SalesTransaction>;
|
|
15
15
|
get isInitialized$(): Observable<boolean>;
|
|
@@ -17,11 +17,13 @@ export declare class SalesTransactionService {
|
|
|
17
17
|
set hasUnsavedChanges(value: boolean);
|
|
18
18
|
get hasUnsavedChanges(): boolean;
|
|
19
19
|
get state(): SalesTransaction | null;
|
|
20
|
+
get hasAssets(): boolean;
|
|
21
|
+
get hasProducts(): boolean;
|
|
20
22
|
constructor(flowInfoService: FlowInfoService, salesTransactionApiService: SalesTransactionApiService);
|
|
21
23
|
init(headerId: string, params: Record<string, string>): Observable<SalesTransaction>;
|
|
22
24
|
finalizeInit(): void;
|
|
23
25
|
reset(): void;
|
|
24
|
-
|
|
26
|
+
getInitialState(): SalesTransactionItem[];
|
|
25
27
|
setState(state: SalesTransaction): void;
|
|
26
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<SalesTransactionService, never>;
|
|
27
29
|
static ɵprov: i0.ɵɵInjectableDeclaration<SalesTransactionService>;
|