@veloceapps/sdk 7.0.2-7 → 7.0.2-70
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 +102 -11
- package/cms/cms.default.d.ts +2 -2
- package/cms/components/element-children/element-children.component.d.ts +3 -1
- package/cms/components/element-tools-panel/element-tools-panel.component.d.ts +14 -0
- package/cms/components/preview/preview.component.d.ts +6 -5
- package/cms/components/preview/preview.module.d.ts +2 -1
- package/cms/components/preview/preview.types.d.ts +4 -0
- package/cms/definitions/index.d.ts +1 -0
- package/cms/definitions/ui-builder.definitions.d.ts +6 -0
- package/cms/index.d.ts +2 -0
- package/cms/injection-tokens.d.ts +2 -4
- package/cms/modules/migrations/services/migrations.service.d.ts +1 -1
- package/cms/modules/migrations/types/migrations.types.d.ts +1 -1
- package/cms/modules/runtime/index.d.ts +1 -0
- package/cms/modules/runtime/services/compilation.service.d.ts +3 -2
- package/cms/modules/runtime/services/runtime-editor.service.d.ts +6 -4
- package/cms/modules/runtime/services/runtime.service.d.ts +6 -2
- package/cms/modules/runtime/types/runtime.actions.d.ts +5 -2
- package/cms/plugins/element-hover.plugin.d.ts +33 -0
- package/cms/plugins/page.plugin.d.ts +15 -0
- package/cms/plugins/script.plugin.d.ts +0 -3
- package/cms/types/common.types.d.ts +11 -1
- package/cms/types/index.d.ts +2 -0
- package/cms/types/integration.types.d.ts +1 -0
- package/cms/types/layouts.types.d.ts +30 -2
- package/cms/types/pages.types.d.ts +1 -0
- package/cms/utils/element.utils.d.ts +1 -1
- package/cms/utils/elements-resolver.d.ts +6 -2
- package/cms/utils/index.d.ts +1 -0
- package/cms/utils/script.utils.d.ts +2 -0
- package/cms/utils/ui-builder-layout.utils.d.ts +4 -0
- package/cms/vendor-map.d.ts +15 -19
- package/core/core.module.d.ts +2 -0
- package/core/directives/directives.module.d.ts +7 -0
- package/core/directives/index.d.ts +2 -0
- package/core/directives/primeng-calendar.directive.d.ts +14 -0
- package/core/index.d.ts +2 -0
- package/core/modules/configuration/helpers.d.ts +4 -2
- package/core/modules/configuration/index.d.ts +1 -0
- package/core/modules/configuration/services/configuration-runtime.service.d.ts +2 -2
- package/core/modules/configuration/services/configuration.service.d.ts +6 -4
- package/core/modules/configuration/types/configuration-runtime.types.d.ts +1 -0
- package/core/modules/configuration/types/configuration.types.d.ts +10 -0
- package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +2 -1
- package/core/pipes/date.pipe.d.ts +12 -0
- package/core/pipes/index.d.ts +4 -0
- package/core/pipes/number.pipe.d.ts +10 -0
- package/core/pipes/pipes.module.d.ts +9 -0
- package/core/pipes/price.pipe.d.ts +10 -0
- package/core/services/index.d.ts +1 -0
- package/core/services/runtime-settings.service.d.ts +21 -0
- package/core/types/formatting-settings.types.d.ts +11 -0
- package/core/types/index.d.ts +1 -0
- package/core/types/runtime.types.d.ts +1 -2
- package/core/types/ui-definition.types.d.ts +0 -40
- package/core/utils/line-item.utils.d.ts +10 -15
- package/core/utils/line-item.worker.d.ts +3 -6
- package/core/utils/ui-definition.utils.d.ts +1 -1
- package/esm2020/cms/cms.actions.mjs +140 -40
- package/esm2020/cms/cms.default.mjs +1 -1
- package/esm2020/cms/cms.elements.mjs +16 -4
- package/esm2020/cms/cms.layouts.mjs +73 -13
- package/esm2020/cms/components/element-children/element-children.component.mjs +11 -6
- package/esm2020/cms/components/element-drop-handle/element-drop-handle.component.mjs +2 -2
- package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +35 -0
- package/esm2020/cms/components/preview/preview.component.mjs +18 -16
- package/esm2020/cms/components/preview/preview.module.mjs +22 -4
- package/esm2020/cms/components/preview/preview.types.mjs +1 -1
- package/esm2020/cms/definitions/index.mjs +2 -0
- package/esm2020/cms/definitions/ui-builder.definitions.mjs +18 -0
- package/esm2020/cms/index.mjs +3 -1
- package/esm2020/cms/injection-tokens.mjs +1 -2
- package/esm2020/cms/modules/migrations/migrations.mjs +10 -3
- package/esm2020/cms/modules/migrations/services/migrations.service.mjs +1 -1
- package/esm2020/cms/modules/migrations/types/migrations.types.mjs +1 -1
- package/esm2020/cms/modules/runtime/index.mjs +2 -1
- package/esm2020/cms/modules/runtime/services/compilation.service.mjs +5 -3
- package/esm2020/cms/modules/runtime/services/runtime-editor.service.mjs +5 -3
- package/esm2020/cms/modules/runtime/services/runtime.service.mjs +41 -6
- package/esm2020/cms/modules/runtime/types/runtime.actions.mjs +1 -1
- package/esm2020/cms/plugins/element-hover.plugin.mjs +121 -0
- package/esm2020/cms/plugins/page.plugin.mjs +37 -0
- package/esm2020/cms/plugins/region.plugin.mjs +3 -2
- package/esm2020/cms/plugins/script.plugin.mjs +6 -40
- package/esm2020/cms/services/integration.state.mjs +3 -6
- package/esm2020/cms/services/io-provider.service.mjs +7 -5
- package/esm2020/cms/types/common.types.mjs +1 -1
- package/esm2020/cms/types/index.mjs +3 -1
- package/esm2020/cms/types/integration.types.mjs +1 -1
- package/esm2020/cms/types/layouts.types.mjs +70 -1
- package/esm2020/cms/types/pages.types.mjs +2 -0
- package/esm2020/cms/utils/element.utils.mjs +1 -1
- package/esm2020/cms/utils/elements-resolver.mjs +22 -8
- package/esm2020/cms/utils/index.mjs +2 -1
- package/esm2020/cms/utils/script.utils.mjs +42 -0
- package/esm2020/cms/utils/ui-builder-layout.utils.mjs +46 -0
- package/esm2020/cms/vendor-map.mjs +5 -3
- package/esm2020/core/core.module.mjs +33 -4
- package/esm2020/core/directives/directives.module.mjs +16 -0
- package/esm2020/core/directives/index.mjs +3 -0
- package/esm2020/core/directives/primeng-calendar.directive.mjs +41 -0
- package/esm2020/core/index.mjs +3 -1
- package/esm2020/core/modules/configuration/configuration.module.mjs +2 -2
- package/esm2020/core/modules/configuration/helpers.mjs +37 -7
- package/esm2020/core/modules/configuration/index.mjs +2 -1
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +3 -2
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +35 -10
- package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +6 -12
- package/esm2020/core/modules/configuration/types/configuration-runtime.types.mjs +1 -1
- package/esm2020/core/modules/configuration/types/configuration.types.mjs +2 -0
- package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +4 -4
- package/esm2020/core/pipes/date.pipe.mjs +38 -0
- package/esm2020/core/pipes/index.mjs +5 -0
- package/esm2020/core/pipes/number.pipe.mjs +27 -0
- package/esm2020/core/pipes/pipes.module.mjs +18 -0
- package/esm2020/core/pipes/price.pipe.mjs +30 -0
- package/esm2020/core/services/index.mjs +2 -1
- package/esm2020/core/services/runtime-settings.service.mjs +88 -0
- package/esm2020/core/types/formatting-settings.types.mjs +3 -0
- package/esm2020/core/types/index.mjs +2 -1
- package/esm2020/core/types/runtime.types.mjs +1 -1
- package/esm2020/core/types/ui-definition.types.mjs +1 -1
- package/esm2020/core/utils/line-item.utils.mjs +22 -9
- package/esm2020/core/utils/line-item.worker.mjs +5 -5
- package/esm2020/core/utils/ui-definition.utils.mjs +1 -1
- package/esm2020/runtime/components/ui-runtime-preview/runtime-preview.component.mjs +2 -2
- package/esm2020/runtime/services/runtime-context.service.mjs +8 -5
- package/esm2020/runtime/services/runtime.service.mjs +1 -1
- package/esm2020/runtime/types/runtime.types.mjs +1 -1
- package/esm2020/src/components/dialog/dialog.component.mjs +3 -3
- package/esm2020/src/components/doc-gen/doc-gen.component.mjs +30 -7
- package/esm2020/src/components/guided-selling/guided-selling.component.mjs +117 -0
- package/esm2020/src/components/guided-selling/guided-selling.module.mjs +19 -0
- package/esm2020/src/components/header/cart-overlay/cart-preview.component.mjs +5 -6
- package/esm2020/src/components/header/cart-overlay/cart-preview.module.mjs +7 -4
- package/esm2020/src/components/header/header.component.mjs +59 -45
- package/esm2020/src/components/header/header.module.mjs +7 -3
- package/esm2020/src/components/header/metrics/metrics.component.mjs +35 -7
- package/esm2020/src/components/header/metrics/metrics.module.mjs +7 -3
- package/esm2020/src/flow-routing.module.mjs +1 -1
- package/esm2020/src/flow.component.mjs +4 -3
- package/esm2020/src/flow.module.mjs +11 -6
- package/esm2020/src/guards/context.guard.mjs +11 -8
- package/esm2020/src/pages/assets/assets.component.mjs +2 -2
- package/esm2020/src/pages/catalog/catalog.component.mjs +3 -3
- package/esm2020/src/pages/product/product.component.mjs +16 -9
- package/esm2020/src/pages/remote/remote.component.mjs +1 -1
- package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +3 -3
- package/esm2020/src/services/flow-dialog.service.mjs +15 -15
- package/esm2020/src/services/flow-router.service.mjs +10 -5
- package/esm2020/src/services/flow.service.mjs +2 -2
- package/esm2020/src/services/guided-selling.service.mjs +33 -0
- package/esm2020/src/types/flow-customization.types.mjs +1 -1
- package/fesm2015/veloceapps-sdk-cms.mjs +872 -394
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +371 -47
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-runtime.mjs +7 -4
- package/fesm2015/veloceapps-sdk-runtime.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +374 -135
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +955 -396
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +361 -44
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-runtime.mjs +7 -4
- package/fesm2020/veloceapps-sdk-runtime.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +364 -133
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/runtime/components/ui-runtime-preview/runtime-preview.component.d.ts +3 -3
- package/runtime/services/runtime.service.d.ts +2 -2
- package/runtime/types/runtime.types.d.ts +2 -2
- package/src/components/doc-gen/doc-gen.component.d.ts +7 -3
- package/src/components/guided-selling/guided-selling.component.d.ts +29 -0
- package/src/components/guided-selling/guided-selling.module.d.ts +9 -0
- package/src/components/header/cart-overlay/cart-preview.component.d.ts +1 -1
- package/src/components/header/cart-overlay/cart-preview.module.d.ts +1 -1
- package/src/components/header/header.component.d.ts +3 -4
- package/src/components/header/header.module.d.ts +2 -1
- package/src/components/header/metrics/metrics.component.d.ts +10 -2
- package/src/components/header/metrics/metrics.module.d.ts +2 -1
- package/src/flow.module.d.ts +6 -5
- package/src/guards/context.guard.d.ts +3 -2
- package/src/pages/assets/assets.component.d.ts +2 -1
- package/src/pages/catalog/catalog.component.d.ts +2 -1
- package/src/pages/product/product.component.d.ts +6 -3
- package/src/pages/remote/remote.component.d.ts +2 -1
- package/src/pages/shopping-cart/shopping-cart.component.d.ts +2 -1
- package/src/services/flow-router.service.d.ts +3 -1
- package/src/services/guided-selling.service.d.ts +13 -0
- package/src/types/flow-customization.types.d.ts +2 -2
package/cms/cms.actions.d.ts
CHANGED
|
@@ -1,36 +1,127 @@
|
|
|
1
1
|
import { IntegrationAction } from './types';
|
|
2
|
-
export declare
|
|
3
|
-
FLOW_CONFIGURE_PRODUCT = "
|
|
4
|
-
FLOW_NAVIGATE_BACK = "
|
|
5
|
-
FLOW_NAVIGATE_TO_CATALOG = "
|
|
6
|
-
FLOW_APPLY_PRODUCT_CONFIGURATION = "
|
|
7
|
-
FLOW_OPEN_DOC_GEN = "
|
|
8
|
-
FLOW_CLOSE_DOC_GEN = "
|
|
9
|
-
FLOW_SWITCH_OBJECT = "
|
|
10
|
-
REMOTE_APPLY = "
|
|
11
|
-
REMOTE_CANCEL = "
|
|
2
|
+
export declare namespace FlowAction {
|
|
3
|
+
const FLOW_CONFIGURE_PRODUCT = "[FLOW]_CONFIGURE_PRODUCT";
|
|
4
|
+
const FLOW_NAVIGATE_BACK = "[FLOW]_NAVIGATE_BACK";
|
|
5
|
+
const FLOW_NAVIGATE_TO_CATALOG = "[FLOW]_NAVIGATE_TO_CATALOG";
|
|
6
|
+
const FLOW_APPLY_PRODUCT_CONFIGURATION = "[FLOW]_APPLY_PRODUCT_CONFIGURATION";
|
|
7
|
+
const FLOW_OPEN_DOC_GEN = "[FLOW]_OPEN_DOC_GEN";
|
|
8
|
+
const FLOW_CLOSE_DOC_GEN = "[FLOW]_CLOSE_DOC_GEN";
|
|
9
|
+
const FLOW_SWITCH_OBJECT = "[FLOW]_SWITCH_OBJECT";
|
|
10
|
+
const REMOTE_APPLY = "[FLOW]_REMOTE_APPLY";
|
|
11
|
+
const REMOTE_CANCEL = "[FLOW]_REMOTE_CANCEL";
|
|
12
|
+
const OPEN_GUIDED_SELLING = "[FLOW]_OPEN_GUIDED_SELLING";
|
|
13
|
+
const SUBMIT_GUIDED_SELLING = "[FLOW]_SUBMIT_GUIDED_SELLING";
|
|
14
|
+
const CLOSE_GUIDED_SELLING = "[FLOW]_CLOSE_GUIDED_SELLING";
|
|
15
|
+
const ConfigureProductAction: ({ lineItemId, productId, }: {
|
|
16
|
+
lineItemId?: string | undefined;
|
|
17
|
+
productId?: string | undefined;
|
|
18
|
+
}) => IntegrationAction;
|
|
19
|
+
const NavigateBackAction: () => IntegrationAction;
|
|
20
|
+
const NavigateToCatalogAction: () => IntegrationAction;
|
|
21
|
+
const ApplyProductConfigurationAction: () => IntegrationAction;
|
|
22
|
+
const OpenDocGenAction: () => IntegrationAction;
|
|
23
|
+
const CloseDocGenAction: () => IntegrationAction;
|
|
24
|
+
const RemoteApplyAction: () => IntegrationAction;
|
|
25
|
+
const RemoteCancelAction: () => IntegrationAction;
|
|
26
|
+
const SwitchObjectAction: (payload: {
|
|
27
|
+
id: string;
|
|
28
|
+
}) => IntegrationAction;
|
|
29
|
+
const OpenGuidedSelling: (payload: {
|
|
30
|
+
guidedSellingId: string;
|
|
31
|
+
}) => IntegrationAction;
|
|
32
|
+
const CloseGuidedSelling: (payload?: {
|
|
33
|
+
keepState?: boolean;
|
|
34
|
+
}) => IntegrationAction;
|
|
35
|
+
const SubmitGuidedSelling: (payload: {
|
|
36
|
+
result: Record<string, any>;
|
|
37
|
+
}) => IntegrationAction;
|
|
12
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated
|
|
41
|
+
* Use FlowAction namespace instead
|
|
42
|
+
*/
|
|
13
43
|
export declare const ConfigureProductAction: ({ lineItemId, productId, }: {
|
|
14
44
|
lineItemId?: string | undefined;
|
|
15
45
|
productId?: string | undefined;
|
|
16
46
|
}) => IntegrationAction;
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated
|
|
49
|
+
* Use FlowAction namespace instead
|
|
50
|
+
*/
|
|
17
51
|
export declare const NavigateBackAction: () => IntegrationAction;
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated
|
|
54
|
+
* Use FlowAction namespace instead
|
|
55
|
+
*/
|
|
18
56
|
export declare const NavigateToCatalogAction: () => IntegrationAction;
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated
|
|
59
|
+
* Use FlowAction namespace instead
|
|
60
|
+
*/
|
|
19
61
|
export declare const ApplyProductConfigurationAction: () => IntegrationAction;
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated
|
|
64
|
+
* Use FlowAction namespace instead
|
|
65
|
+
*/
|
|
20
66
|
export declare const OpenDocGenAction: () => IntegrationAction;
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated
|
|
69
|
+
* Use FlowAction namespace instead
|
|
70
|
+
*/
|
|
21
71
|
export declare const CloseDocGenAction: () => IntegrationAction;
|
|
72
|
+
/**
|
|
73
|
+
* @deprecated
|
|
74
|
+
* Use FlowAction namespace instead
|
|
75
|
+
*/
|
|
22
76
|
export declare const RemoteApplyAction: () => IntegrationAction;
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated
|
|
79
|
+
* Use FlowAction namespace instead
|
|
80
|
+
*/
|
|
23
81
|
export declare const RemoteCancelAction: () => IntegrationAction;
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated
|
|
84
|
+
* Use FlowAction namespace instead
|
|
85
|
+
*/
|
|
24
86
|
export declare const SwitchObjectAction: (payload: {
|
|
25
87
|
id: string;
|
|
26
88
|
}) => IntegrationAction;
|
|
27
89
|
export declare namespace CmsAction {
|
|
28
90
|
const GO_TO_PAGE = "[CMS]_GO_TO_PAGE";
|
|
91
|
+
const UPDATE_CUSTOMIZATION = "[CMS]_UPDATE_CUSTOMIZATION";
|
|
92
|
+
const SHOW_OVERLAY = "[CMS]_SHOW_OVERLAY";
|
|
93
|
+
const HIDE_OVERLAY = "[CMS]_HIDE_OVERLAY";
|
|
94
|
+
const HIDE_ALL_OVERLAYS = "[CMS]_HIDE_ALL_OVERLAYS";
|
|
29
95
|
/**
|
|
30
96
|
* Navigate UI definition to a specific page
|
|
31
97
|
*
|
|
32
98
|
* @param pageName name of the page
|
|
33
|
-
* @returns void
|
|
34
99
|
*/
|
|
35
100
|
const GoToPage: (pageName: string) => IntegrationAction;
|
|
101
|
+
/**
|
|
102
|
+
* Update UI definition customization state
|
|
103
|
+
*
|
|
104
|
+
* @param pageName name of the page
|
|
105
|
+
*/
|
|
106
|
+
const UpdateCustomization: (value: any) => IntegrationAction;
|
|
107
|
+
/**
|
|
108
|
+
* Show an Overlay on the selected page
|
|
109
|
+
*
|
|
110
|
+
* @param name - name of the overlay
|
|
111
|
+
* @returns void
|
|
112
|
+
*/
|
|
113
|
+
const ShowOverlay: (name: string) => IntegrationAction;
|
|
114
|
+
/**
|
|
115
|
+
* Hide an Overlay on the selected page
|
|
116
|
+
*
|
|
117
|
+
* @param name - name of the overlay
|
|
118
|
+
* @returns void
|
|
119
|
+
*/
|
|
120
|
+
const HideOverlay: (name: string) => IntegrationAction;
|
|
121
|
+
/**
|
|
122
|
+
* Hide all Overlays on the selected page
|
|
123
|
+
*
|
|
124
|
+
* @returns void
|
|
125
|
+
*/
|
|
126
|
+
const HideAllOverlays: () => IntegrationAction;
|
|
36
127
|
}
|
package/cms/cms.default.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UIDefinitionType } from '@veloceapps/
|
|
1
|
+
import { UIDefinitionType } from '@veloceapps/core';
|
|
2
2
|
import { Plugin } from './engine/models/plugin';
|
|
3
3
|
export declare const DEFAULT_PLUGINS: {
|
|
4
|
-
[key in UIDefinitionType]: typeof Plugin[];
|
|
4
|
+
[key in UIDefinitionType]: (typeof Plugin)[];
|
|
5
5
|
};
|
|
@@ -10,11 +10,13 @@ export declare class ElementChildrenComponent implements OnDestroy {
|
|
|
10
10
|
private runtimeService;
|
|
11
11
|
private runtimeEditorService;
|
|
12
12
|
private cdr;
|
|
13
|
+
filter?: (elements: ElementMetadata[]) => ElementMetadata[];
|
|
13
14
|
metadata$: Observable<ElementMetadata | undefined>;
|
|
14
15
|
dragMode$: Observable<boolean>;
|
|
15
16
|
private destroyed$;
|
|
16
17
|
constructor(elementContext: ElementContextService, runtimeService: RuntimeService, runtimeEditorService: RuntimeEditorService, cdr: ChangeDetectorRef);
|
|
17
18
|
ngOnDestroy(): void;
|
|
19
|
+
getFilteredChildren(elements: ElementMetadata[]): ElementMetadata[];
|
|
18
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElementChildrenComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ElementChildrenComponent, "element-children", never, {}, {}, never, never, false, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ElementChildrenComponent, "element-children", never, { "filter": "filter"; }, {}, never, never, false, never>;
|
|
20
22
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RuntimeEditorService } from '../../modules/runtime';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ElementToolsPanelComponent {
|
|
4
|
+
private readonly metadata;
|
|
5
|
+
private readonly config;
|
|
6
|
+
private readonly elementRef;
|
|
7
|
+
runtimeEditorService?: RuntimeEditorService;
|
|
8
|
+
showDeleteButton: boolean;
|
|
9
|
+
constructor();
|
|
10
|
+
deleteHandler(): void;
|
|
11
|
+
showSettingsHandler(): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ElementToolsPanelComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ElementToolsPanelComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { UIDefinition } from '@veloceapps/core';
|
|
3
|
+
import { ConfigurationRuntimeService, ConfigurationService } from '@veloceapps/sdk/core';
|
|
3
4
|
import { MessageService } from 'primeng/api';
|
|
4
5
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
5
6
|
import { RuntimeService } from '../../modules/runtime/services/runtime.service';
|
|
@@ -17,19 +18,19 @@ export declare class PreviewComponent implements OnInit, OnDestroy {
|
|
|
17
18
|
private messageService;
|
|
18
19
|
private configurationRuntimeService;
|
|
19
20
|
private integrationState;
|
|
20
|
-
private cdr;
|
|
21
21
|
modelId?: string;
|
|
22
22
|
uiDefinition?: UIDefinition;
|
|
23
23
|
config?: CMSPreviewConfig;
|
|
24
24
|
state$: BehaviorSubject<State>;
|
|
25
25
|
elements$: Observable<ElementMetadata[]>;
|
|
26
26
|
private destroy$;
|
|
27
|
-
constructor(runtimeService: RuntimeService, configurationService: ConfigurationService, messageService: MessageService, configurationRuntimeService: ConfigurationRuntimeService, integrationState: IntegrationState
|
|
27
|
+
constructor(runtimeService: RuntimeService, configurationService: ConfigurationService, messageService: MessageService, configurationRuntimeService: ConfigurationRuntimeService, integrationState: IntegrationState);
|
|
28
28
|
ngOnInit(): void;
|
|
29
29
|
ngOnDestroy(): void;
|
|
30
|
-
trackBy(_: number, el: ElementMetadata):
|
|
30
|
+
trackBy(_: number, el: ElementMetadata): ElementMetadata;
|
|
31
31
|
private initializeConfiguration$;
|
|
32
32
|
private startPreview;
|
|
33
|
+
private getPages$;
|
|
33
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<PreviewComponent, never>;
|
|
34
35
|
static ɵcmp: i0.ɵɵComponentDeclaration<PreviewComponent, "vl-cms-preview", never, { "modelId": "modelId"; "uiDefinition": "uiDefinition"; "config": "config"; }, {}, never, never, false, never>;
|
|
35
36
|
}
|
|
@@ -5,8 +5,9 @@ import * as i3 from "@veloceapps/components";
|
|
|
5
5
|
import * as i4 from "../element-renderer/element-renderer.module";
|
|
6
6
|
import * as i5 from "../element-children/element-children.module";
|
|
7
7
|
import * as i6 from "../element-drop-handle/element-drop-handle.module";
|
|
8
|
+
import * as i7 from "../element-tools-panel/element-tools-panel.component";
|
|
8
9
|
export declare class PreviewModule {
|
|
9
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<PreviewModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PreviewModule, [typeof i1.PreviewComponent], [typeof i2.CommonModule, typeof i3.LoaderModule, typeof i4.ElementRendererModule, typeof i5.ElementChildrenModule, typeof i6.ElementDropHandleModule], [typeof i1.PreviewComponent]>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PreviewModule, [typeof i1.PreviewComponent], [typeof i2.CommonModule, typeof i3.LoaderModule, typeof i4.ElementRendererModule, typeof i5.ElementChildrenModule, typeof i6.ElementDropHandleModule, typeof i7.ElementToolsPanelComponent], [typeof i1.PreviewComponent]>;
|
|
11
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<PreviewModule>;
|
|
12
13
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ui-builder.definitions';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ElementMetadata, ElementStyleDeclaration, FullPageLayout, PageType } from '../types';
|
|
2
|
+
export declare const DEFAULT_ELEMENT: Partial<ElementMetadata>;
|
|
3
|
+
export declare const STARTING_PAGE_NAME = "Starting Page";
|
|
4
|
+
export declare const STARTING_PAGE_TYPE: PageType;
|
|
5
|
+
export declare const STARTING_PAGE_LAYOUT: FullPageLayout;
|
|
6
|
+
export declare const STARTING_PAGE_STYLES: ElementStyleDeclaration;
|
package/cms/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * from './cms.actions';
|
|
2
|
+
export * from './cms.layouts';
|
|
2
3
|
export * from './components';
|
|
3
4
|
export * from './components/preview';
|
|
4
5
|
export * from './decorators';
|
|
6
|
+
export * from './definitions';
|
|
5
7
|
export * from './injection-tokens';
|
|
6
8
|
export * from './launcher.module';
|
|
7
9
|
export * from './modules/federated/export';
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { UIDefinitionMetadata } from '@veloceapps/
|
|
3
|
-
import { Dictionary } from 'lodash';
|
|
2
|
+
import { UIDefinitionMetadata } from '@veloceapps/core';
|
|
4
3
|
import { Plugin } from './engine/models/plugin';
|
|
5
4
|
import { ElementConfig, ElementMetadata } from './types/common.types';
|
|
6
5
|
export declare const DEFAULT_PLUGINS_TOKEN: InjectionToken<(typeof Plugin)[]>;
|
|
7
6
|
export declare const UI_DEFINITION_METADATA: InjectionToken<UIDefinitionMetadata>;
|
|
8
7
|
export declare const ELEMENT_METADATA: InjectionToken<ElementMetadata>;
|
|
9
|
-
export declare const SHARED_ELEMENT_METADATA: InjectionToken<ElementMetadata>;
|
|
8
|
+
export declare const SHARED_ELEMENT_METADATA: InjectionToken<ElementMetadata | undefined>;
|
|
10
9
|
export declare const ELEMENT_CONFIG: InjectionToken<ElementConfig>;
|
|
11
|
-
export declare const VENDOR_MAP: InjectionToken<Dictionary<any>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { UIDefinition } from '@veloceapps/
|
|
1
|
+
import { UIDefinition } from '@veloceapps/core';
|
|
2
2
|
export type UIDefinitionMigrationFn = (uiDef: UIDefinition) => UIDefinition;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
|
-
import { UIDefinition } from '@veloceapps/
|
|
2
|
+
import { UIDefinition } from '@veloceapps/core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
+
import { CMSPreviewConfig } from '../../../components/preview';
|
|
4
5
|
import { CompilationResult } from '../../../modules/runtime/types/compilation.types';
|
|
5
6
|
import { ElementMetadata } from '../../../types/common.types';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
@@ -9,7 +10,7 @@ export declare class CompilationService {
|
|
|
9
10
|
private uiDefinitionMeta?;
|
|
10
11
|
private elementsResolver?;
|
|
11
12
|
constructor(injector: Injector);
|
|
12
|
-
compileUIDefinition$(uiDefinition: UIDefinition): Observable<CompilationResult>;
|
|
13
|
+
compileUIDefinition$(uiDefinition: UIDefinition, config?: CMSPreviewConfig): Observable<CompilationResult>;
|
|
13
14
|
compileElement$(element: ElementMetadata): Observable<CompilationResult>;
|
|
14
15
|
clear(): void;
|
|
15
16
|
private getModule;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { Patch } from 'rfc6902';
|
|
2
2
|
import { BehaviorSubject, Observable, ReplaySubject } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { RuntimeElementDeleteEvent, RuntimeElementDropEvent, RuntimeShowSettingsEvent } from '../types/runtime.actions';
|
|
4
4
|
import { RuntimeService } from './runtime.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class RuntimeEditorService {
|
|
7
7
|
private runtimeService;
|
|
8
8
|
private editorModeSubj$;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
onElementDropped$: ReplaySubject<RuntimeElementDropEvent>;
|
|
10
|
+
onElementDeleted$: ReplaySubject<RuntimeElementDeleteEvent>;
|
|
11
|
+
onElementSettingsToggled$: ReplaySubject<RuntimeShowSettingsEvent>;
|
|
12
12
|
editorMode$: Observable<boolean>;
|
|
13
|
+
dragMode$: BehaviorSubject<boolean>;
|
|
14
|
+
selectedElementPath$: BehaviorSubject<string | null>;
|
|
13
15
|
constructor(runtimeService: RuntimeService);
|
|
14
16
|
applyPatch$(patch: Patch): Observable<void>;
|
|
15
17
|
toggleEditorMode(): void;
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import { Injector, NgModule, NgModuleRef, Type } from '@angular/core';
|
|
2
|
-
import { UIDefinition } from '@veloceapps/
|
|
2
|
+
import { UIDefinition } from '@veloceapps/core';
|
|
3
3
|
import { Patch } from 'rfc6902';
|
|
4
4
|
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
5
5
|
import { CMSPreviewConfig } from '../../../components/preview/preview.types';
|
|
6
6
|
import { Entity } from '../../../engine/models/entity';
|
|
7
|
+
import { IntegrationState } from '../../../services/integration.state';
|
|
7
8
|
import { ElementMetadata } from '../../../types';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class RuntimeService {
|
|
10
11
|
private injector;
|
|
12
|
+
private integrationState;
|
|
11
13
|
moduleRefs: NgModuleRef<NgModule>[];
|
|
12
14
|
componentTypes: Record<string, Type<Entity>>;
|
|
13
15
|
applicationTree: ElementMetadata[];
|
|
14
16
|
config?: CMSPreviewConfig;
|
|
15
17
|
isInitialized$: BehaviorSubject<boolean>;
|
|
16
18
|
updated$: Subject<void>;
|
|
19
|
+
selectedPageName$: BehaviorSubject<string | null>;
|
|
20
|
+
selectedOverlayNames$: BehaviorSubject<string[]>;
|
|
17
21
|
private compilationService;
|
|
18
|
-
constructor(injector: Injector);
|
|
22
|
+
constructor(injector: Injector, integrationState: IntegrationState);
|
|
19
23
|
initialize$(uiDefinition?: UIDefinition, config?: CMSPreviewConfig): Observable<ElementMetadata[]>;
|
|
20
24
|
applyPatch$(patch: Patch): Observable<void>;
|
|
21
25
|
getCompiledElement$(path: string): Observable<ElementMetadata | undefined>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { ElementMetadata } from '../../../types';
|
|
2
|
-
export interface
|
|
2
|
+
export interface RuntimeElementDropEvent {
|
|
3
3
|
element: ElementMetadata;
|
|
4
4
|
path: string;
|
|
5
5
|
index: number;
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface RuntimeElementDeleteEvent {
|
|
8
|
+
path: string;
|
|
9
|
+
}
|
|
10
|
+
export interface RuntimeShowSettingsEvent {
|
|
8
11
|
path: string;
|
|
9
12
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { ElementComponent } from '../components/element.component';
|
|
3
|
+
import { PluginComponent } from '../components/plugin.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ElementHoverPlugin implements PluginComponent, OnDestroy {
|
|
6
|
+
host: ElementComponent;
|
|
7
|
+
private readonly hoverClassName;
|
|
8
|
+
private readonly metadata;
|
|
9
|
+
private readonly appRef;
|
|
10
|
+
private readonly el;
|
|
11
|
+
private readonly document;
|
|
12
|
+
private readonly runtimeEditorService;
|
|
13
|
+
private overlayEl?;
|
|
14
|
+
private isHovered$;
|
|
15
|
+
private isSelected$;
|
|
16
|
+
private destroyed$;
|
|
17
|
+
private listenersAttached;
|
|
18
|
+
private mouseOverListenerBound;
|
|
19
|
+
private mouseLeaveListenerBound;
|
|
20
|
+
private clickListenerBound;
|
|
21
|
+
constructor(host: ElementComponent);
|
|
22
|
+
ngOnDestroy(): void;
|
|
23
|
+
private attachListeners;
|
|
24
|
+
private detachListeners;
|
|
25
|
+
private mouseOverListener;
|
|
26
|
+
private clickListener;
|
|
27
|
+
private mouseLeaveListener;
|
|
28
|
+
private addHighlight;
|
|
29
|
+
private removeHighlight;
|
|
30
|
+
private updateHighlight;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ElementHoverPlugin, never>;
|
|
32
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ElementHoverPlugin>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { ElementComponent } from '../components/element.component';
|
|
3
|
+
import { PluginComponent } from '../components/plugin.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class PagePlugin implements PluginComponent, OnDestroy {
|
|
6
|
+
host: ElementComponent;
|
|
7
|
+
private metadata;
|
|
8
|
+
private el;
|
|
9
|
+
private destroy$;
|
|
10
|
+
constructor(host: ElementComponent);
|
|
11
|
+
ngOnDestroy(): void;
|
|
12
|
+
private styleFullPage;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PagePlugin, never>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PagePlugin, never, never, {}, {}, never, never, false, never>;
|
|
15
|
+
}
|
|
@@ -3,11 +3,8 @@ import { PluginComponent } from '../components/plugin.component';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class ScriptPlugin implements PluginComponent {
|
|
5
5
|
host: ElementComponent;
|
|
6
|
-
private document;
|
|
7
|
-
private vendorMap;
|
|
8
6
|
constructor(host: ElementComponent);
|
|
9
7
|
private addScript;
|
|
10
|
-
private normalizeImports;
|
|
11
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScriptPlugin, never>;
|
|
12
9
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ScriptPlugin, never, never, {}, {}, never, never, false, never>;
|
|
13
10
|
}
|
|
@@ -2,7 +2,8 @@ import { Dictionary } from 'lodash';
|
|
|
2
2
|
import { Entity } from '../engine/models/entity';
|
|
3
3
|
import { Plugin } from '../engine/models/plugin';
|
|
4
4
|
import { PageLayout } from './layouts.types';
|
|
5
|
-
|
|
5
|
+
import { PageType } from './pages.types';
|
|
6
|
+
export type ELEMENT_TYPE = 'CUSTOMIZATION_PAGE' | 'CUSTOM' | 'CONTAINER' | 'SERVICE' | 'REFERENCE' | 'PAGE' | 'REGION';
|
|
6
7
|
export type ElementStyleDeclaration = Partial<CSSStyleDeclaration>;
|
|
7
8
|
export interface ElementConfig {
|
|
8
9
|
component: typeof Entity;
|
|
@@ -10,6 +11,9 @@ export interface ElementConfig {
|
|
|
10
11
|
defaultTemplate?: string;
|
|
11
12
|
suppressTemplate?: boolean;
|
|
12
13
|
suppressStyles?: boolean;
|
|
14
|
+
builder?: {
|
|
15
|
+
suppressRemovable?: boolean;
|
|
16
|
+
};
|
|
13
17
|
}
|
|
14
18
|
export interface ElementModel {
|
|
15
19
|
/**
|
|
@@ -104,6 +108,12 @@ export interface ElementDefaultMetadata {
|
|
|
104
108
|
* Used only when `type === PAGE`
|
|
105
109
|
*/
|
|
106
110
|
layout?: PageLayout;
|
|
111
|
+
/**
|
|
112
|
+
* Page Type
|
|
113
|
+
*
|
|
114
|
+
* Used only when `type === PAGE`
|
|
115
|
+
*/
|
|
116
|
+
pageType?: PageType;
|
|
107
117
|
}
|
|
108
118
|
export interface ElementMetadata extends Omit<ElementDefaultMetadata, 'children'> {
|
|
109
119
|
path: string;
|
package/cms/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* List of available layouts:
|
|
2
|
+
* List of available layouts for Full Page Type:
|
|
3
3
|
*
|
|
4
4
|
LAYOUT_1
|
|
5
5
|
+-------------------------+
|
|
@@ -66,9 +66,37 @@
|
|
|
66
66
|
| |
|
|
67
67
|
| |
|
|
68
68
|
+-------------------------+
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* List of available layouts for Sidepanel Page Type:
|
|
72
|
+
*
|
|
73
|
+
LAYOUT_7
|
|
74
|
+
+-------------------------+
|
|
75
|
+
| | |
|
|
76
|
+
| | |
|
|
77
|
+
| LEFT | DISABLED |
|
|
78
|
+
| SIDE | PAGE |
|
|
79
|
+
| PANEL | |
|
|
80
|
+
| | |
|
|
81
|
+
| | |
|
|
82
|
+
+-------------------------+
|
|
69
83
|
|
|
84
|
+
LAYOUT_8
|
|
85
|
+
+-------------------------+
|
|
86
|
+
| | |
|
|
87
|
+
| | |
|
|
88
|
+
| DISABLED | RIGHT |
|
|
89
|
+
| PAGE | SIDE |
|
|
90
|
+
| | PANEL |
|
|
91
|
+
| | |
|
|
92
|
+
| | |
|
|
93
|
+
+-------------------------+
|
|
70
94
|
*/
|
|
71
|
-
export type
|
|
95
|
+
export type FullPageLayout = 'LAYOUT_1' | 'LAYOUT_2' | 'LAYOUT_3' | 'LAYOUT_4' | 'LAYOUT_5' | 'LAYOUT_6';
|
|
96
|
+
export type SidepanelPageLayout = 'LAYOUT_7' | 'LAYOUT_8';
|
|
97
|
+
export type PageLayout = FullPageLayout | SidepanelPageLayout;
|
|
72
98
|
export interface PageLayoutConfig {
|
|
99
|
+
hasHeader: boolean;
|
|
100
|
+
hasFooter: boolean;
|
|
73
101
|
styles?: string;
|
|
74
102
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PageType = 'FULL_PAGE' | 'SIDEPANEL';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UIElement } from '@veloceapps/
|
|
1
|
+
import { UIElement } from '@veloceapps/core';
|
|
2
2
|
import { ELEMENT_TYPE, ElementConfig, ElementDefaultMetadata, ElementMetadata } from '../types';
|
|
3
3
|
export declare class UiBuildError extends Error {
|
|
4
4
|
affectedMetadata: ElementMetadata;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
|
-
import { UIDefinitionMetadata } from '@veloceapps/
|
|
2
|
+
import { UIDefinitionMetadata } from '@veloceapps/core';
|
|
3
|
+
import { CMSPreviewConfig } from '../components/preview';
|
|
3
4
|
import { Entity } from '../engine/models/entity';
|
|
4
5
|
import { ElementMetadata } from '../types';
|
|
5
6
|
export declare class ElementsResolver {
|
|
6
7
|
private uiDef;
|
|
8
|
+
private config?;
|
|
7
9
|
elements: ElementMetadata[];
|
|
8
10
|
private renderableElements;
|
|
9
11
|
private sharedElements;
|
|
10
|
-
|
|
12
|
+
private uiDefMetadata;
|
|
13
|
+
constructor(uiDef: UIDefinitionMetadata, elements: ElementMetadata[], sharedElements?: ElementMetadata[], config?: CMSPreviewConfig | undefined);
|
|
11
14
|
addElement(element: ElementMetadata): void;
|
|
12
15
|
getNgComponents(): Record<string, Type<Entity>>;
|
|
13
16
|
private transpile;
|
|
@@ -23,4 +26,5 @@ export declare class ElementsResolver {
|
|
|
23
26
|
private resolveElement;
|
|
24
27
|
private getElementStyles;
|
|
25
28
|
private convertInlineStylesToCSS;
|
|
29
|
+
private getDefaultCustomizationState;
|
|
26
30
|
}
|
package/cms/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ElementMetadata, ElementStyleDeclaration, PageLayout, PageType } from '../types';
|
|
2
|
+
export declare const constructPageChildren: (path: string, layout: PageLayout) => ElementMetadata[];
|
|
3
|
+
export declare const constructRegion: (name: string, parentPath: string) => ElementMetadata;
|
|
4
|
+
export declare const constructPage: (name: string, pageType: PageType, layout: PageLayout, configuredStyles?: ElementStyleDeclaration) => ElementMetadata;
|