@veloceapps/sdk 7.0.2-4 → 7.0.2-40
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 +30 -1
- 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 +4 -4
- package/cms/components/preview/preview.module.d.ts +2 -1
- package/cms/components/preview/preview.types.d.ts +4 -0
- package/cms/index.d.ts +1 -0
- package/cms/injection-tokens.d.ts +1 -3
- package/cms/modules/runtime/index.d.ts +1 -0
- package/cms/modules/runtime/services/compilation.service.d.ts +2 -1
- package/cms/modules/runtime/services/runtime-editor.service.d.ts +6 -4
- package/cms/modules/runtime/services/runtime.service.d.ts +5 -1
- package/cms/modules/runtime/types/runtime.actions.d.ts +5 -2
- package/cms/plugins/element-hover.plugin.d.ts +32 -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/layouts.types.d.ts +30 -2
- package/cms/types/pages.types.d.ts +1 -0
- package/cms/utils/elements-resolver.d.ts +5 -1
- package/cms/utils/script.utils.d.ts +2 -0
- package/cms/vendor-map.d.ts +12 -6
- 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/services/configuration.service.d.ts +3 -3
- 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/ui-definition.types.d.ts +8 -2
- package/core/utils/line-item.utils.d.ts +7 -2
- package/core/utils/line-item.worker.d.ts +2 -2
- package/esm2020/cms/cms.actions.mjs +42 -2
- 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 +17 -15
- package/esm2020/cms/components/preview/preview.module.mjs +22 -4
- package/esm2020/cms/components/preview/preview.types.mjs +1 -1
- package/esm2020/cms/index.mjs +2 -1
- package/esm2020/cms/injection-tokens.mjs +1 -2
- 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 +112 -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/layouts.types.mjs +70 -1
- package/esm2020/cms/types/pages.types.mjs +2 -0
- package/esm2020/cms/utils/elements-resolver.mjs +22 -8
- package/esm2020/cms/utils/script.utils.mjs +42 -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 +3 -6
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +2 -1
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +6 -5
- 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/ui-definition.types.mjs +1 -1
- package/esm2020/core/utils/line-item.utils.mjs +38 -16
- package/esm2020/core/utils/line-item.worker.mjs +5 -5
- package/esm2020/src/components/header/header.component.mjs +39 -33
- package/esm2020/src/components/header/header.module.mjs +7 -3
- package/esm2020/src/components/header/metrics/metrics.component.mjs +9 -7
- package/esm2020/src/components/header/metrics/metrics.module.mjs +7 -3
- package/esm2020/src/flow-routing.module.mjs +1 -1
- package/esm2020/src/guards/context.guard.mjs +11 -8
- package/fesm2015/veloceapps-sdk-cms.mjs +728 -373
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +317 -33
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +70 -52
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +777 -355
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +310 -33
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +68 -51
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/header/header.component.d.ts +2 -3
- package/src/components/header/header.module.d.ts +2 -1
- package/src/components/header/metrics/metrics.component.d.ts +4 -2
- package/src/components/header/metrics/metrics.module.d.ts +2 -1
- package/src/guards/context.guard.d.ts +3 -2
package/cms/cms.actions.d.ts
CHANGED
|
@@ -26,11 +26,40 @@ export declare const SwitchObjectAction: (payload: {
|
|
|
26
26
|
}) => IntegrationAction;
|
|
27
27
|
export declare namespace CmsAction {
|
|
28
28
|
const GO_TO_PAGE = "[CMS]_GO_TO_PAGE";
|
|
29
|
+
const UPDATE_CUSTOMIZATION = "[CMS]_UPDATE_CUSTOMIZATION";
|
|
30
|
+
const SHOW_OVERLAY = "[CMS]_SHOW_OVERLAY";
|
|
31
|
+
const HIDE_OVERLAY = "[CMS]_HIDE_OVERLAY";
|
|
32
|
+
const HIDE_ALL_OVERLAYS = "[CMS]_HIDE_ALL_OVERLAYS";
|
|
29
33
|
/**
|
|
30
34
|
* Navigate UI definition to a specific page
|
|
31
35
|
*
|
|
32
36
|
* @param pageName name of the page
|
|
33
|
-
* @returns void
|
|
34
37
|
*/
|
|
35
38
|
const GoToPage: (pageName: string) => IntegrationAction;
|
|
39
|
+
/**
|
|
40
|
+
* Update UI definition customization state
|
|
41
|
+
*
|
|
42
|
+
* @param pageName name of the page
|
|
43
|
+
*/
|
|
44
|
+
const UpdateCustomization: (value: any) => IntegrationAction;
|
|
45
|
+
/**
|
|
46
|
+
* Show an Overlay on the selected page
|
|
47
|
+
*
|
|
48
|
+
* @param name - name of the overlay
|
|
49
|
+
* @returns void
|
|
50
|
+
*/
|
|
51
|
+
const ShowOverlay: (name: string) => IntegrationAction;
|
|
52
|
+
/**
|
|
53
|
+
* Hide an Overlay on the selected page
|
|
54
|
+
*
|
|
55
|
+
* @param name - name of the overlay
|
|
56
|
+
* @returns void
|
|
57
|
+
*/
|
|
58
|
+
const HideOverlay: (name: string) => IntegrationAction;
|
|
59
|
+
/**
|
|
60
|
+
* Hide all Overlays on the selected page
|
|
61
|
+
*
|
|
62
|
+
* @returns void
|
|
63
|
+
*/
|
|
64
|
+
const HideAllOverlays: () => IntegrationAction;
|
|
36
65
|
}
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { ConfigurationRuntimeService, ConfigurationService, UIDefinition } from '@veloceapps/sdk/core';
|
|
3
3
|
import { MessageService } from 'primeng/api';
|
|
4
4
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
@@ -17,19 +17,19 @@ export declare class PreviewComponent implements OnInit, OnDestroy {
|
|
|
17
17
|
private messageService;
|
|
18
18
|
private configurationRuntimeService;
|
|
19
19
|
private integrationState;
|
|
20
|
-
private cdr;
|
|
21
20
|
modelId?: string;
|
|
22
21
|
uiDefinition?: UIDefinition;
|
|
23
22
|
config?: CMSPreviewConfig;
|
|
24
23
|
state$: BehaviorSubject<State>;
|
|
25
24
|
elements$: Observable<ElementMetadata[]>;
|
|
26
25
|
private destroy$;
|
|
27
|
-
constructor(runtimeService: RuntimeService, configurationService: ConfigurationService, messageService: MessageService, configurationRuntimeService: ConfigurationRuntimeService, integrationState: IntegrationState
|
|
26
|
+
constructor(runtimeService: RuntimeService, configurationService: ConfigurationService, messageService: MessageService, configurationRuntimeService: ConfigurationRuntimeService, integrationState: IntegrationState);
|
|
28
27
|
ngOnInit(): void;
|
|
29
28
|
ngOnDestroy(): void;
|
|
30
|
-
trackBy(_: number, el: ElementMetadata):
|
|
29
|
+
trackBy(_: number, el: ElementMetadata): ElementMetadata;
|
|
31
30
|
private initializeConfiguration$;
|
|
32
31
|
private startPreview;
|
|
32
|
+
private getPages$;
|
|
33
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<PreviewComponent, never>;
|
|
34
34
|
static ɵcmp: i0.ɵɵComponentDeclaration<PreviewComponent, "vl-cms-preview", never, { "modelId": "modelId"; "uiDefinition": "uiDefinition"; "config": "config"; }, {}, never, never, false, never>;
|
|
35
35
|
}
|
|
@@ -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
|
}
|
package/cms/index.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { UIDefinitionMetadata } from '@veloceapps/sdk/core';
|
|
3
|
-
import { Dictionary } from 'lodash';
|
|
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,6 +1,7 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
2
|
import { UIDefinition } from '@veloceapps/sdk/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;
|
|
@@ -4,18 +4,22 @@ 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,32 @@
|
|
|
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 mouseOverListenerBound;
|
|
18
|
+
private mouseLeaveListenerBound;
|
|
19
|
+
private clickListenerBound;
|
|
20
|
+
constructor(host: ElementComponent);
|
|
21
|
+
ngOnDestroy(): void;
|
|
22
|
+
private attachListeners;
|
|
23
|
+
private detachListeners;
|
|
24
|
+
private mouseOverListener;
|
|
25
|
+
private clickListener;
|
|
26
|
+
private mouseLeaveListener;
|
|
27
|
+
private addHighlight;
|
|
28
|
+
private removeHighlight;
|
|
29
|
+
private updateHighlight;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ElementHoverPlugin, never>;
|
|
31
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ElementHoverPlugin>;
|
|
32
|
+
}
|
|
@@ -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,13 +1,16 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
2
|
import { UIDefinitionMetadata } from '@veloceapps/sdk/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/vendor-map.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as angularCore from '@angular/core';
|
|
2
2
|
import * as angularForms from '@angular/forms';
|
|
3
3
|
import { CatalogApiService, ConfigurationSettingsApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, GuidedSellingApiService, PicklistsApiService, PriceApiService, QuoteApiService, RampApiService, SalesforceApiService, ShoppingCartSettingsApiService } from '@veloceapps/api';
|
|
4
|
-
import { ToastService } from '@veloceapps/components';
|
|
4
|
+
import { ToastService, ToastType } from '@veloceapps/components';
|
|
5
5
|
import { Operator, Predicate, parseJsonSafely } from '@veloceapps/core';
|
|
6
|
-
import { ConfigurationService, ContextService, FlowConfigurationService, LineItemWorker, ProductImagesService, QuoteDraftService } from '@veloceapps/sdk/core';
|
|
6
|
+
import { ConfigurationService, ContextService, FlowConfigurationService, LineItemWorker, ProductImagesService, QuoteDraftService, RuntimeSettingsService } from '@veloceapps/sdk/core';
|
|
7
7
|
import lodash from 'lodash';
|
|
8
8
|
import * as rxjs from 'rxjs';
|
|
9
9
|
import * as rxjsOperators from 'rxjs/operators';
|
|
@@ -25,6 +25,7 @@ export declare const vendorMap: {
|
|
|
25
25
|
};
|
|
26
26
|
'@veloceapps/components': {
|
|
27
27
|
ToastService: typeof ToastService;
|
|
28
|
+
ToastType: typeof ToastType;
|
|
28
29
|
};
|
|
29
30
|
'@veloceapps/api': {
|
|
30
31
|
SalesforceApiService: typeof SalesforceApiService;
|
|
@@ -45,7 +46,7 @@ export declare const vendorMap: {
|
|
|
45
46
|
findLineItemWithComparator: (lineItems: import("@veloceapps/core").LineItem[], comparator: (li: import("@veloceapps/core").LineItem) => boolean) => import("@veloceapps/core").LineItem | undefined;
|
|
46
47
|
insertLineItem: (lineItem: import("@veloceapps/core").LineItem, parentId: string, toInsert: import("@veloceapps/core").LineItem) => import("@veloceapps/core").LineItem;
|
|
47
48
|
removeLineItem: (lineItem: import("@veloceapps/core").LineItem, idToRemove: string) => import("@veloceapps/core").LineItem;
|
|
48
|
-
replaceLineItem: (lineItem: import("@veloceapps/core").LineItem, replaceTo: import("@veloceapps/core").LineItem) => import("@veloceapps/core").LineItem;
|
|
49
|
+
replaceLineItem: (lineItem: import("@veloceapps/core").LineItem, replaceTo: import("@veloceapps/core").LineItem, skipCardinalityCalculation?: boolean | undefined) => import("@veloceapps/core").LineItem;
|
|
49
50
|
calculateCardinalityVariables: (lineItems: import("@veloceapps/core").LineItem[]) => Map<string, number>;
|
|
50
51
|
recalculateCardinalityVariables: (original: import("@veloceapps/core").LineItem, updated: import("@veloceapps/core").LineItem) => import("@veloceapps/core").LineItem;
|
|
51
52
|
mapAttributes: (attributes: import("@veloceapps/core").Attribute[]) => lodash.Dictionary<any>;
|
|
@@ -57,7 +58,7 @@ export declare const vendorMap: {
|
|
|
57
58
|
patchAttributes: (rootLineItem: import("@veloceapps/core").LineItem, id: string, attrs: {
|
|
58
59
|
name: string;
|
|
59
60
|
value: any;
|
|
60
|
-
}[]) => import("@veloceapps/core").LineItem;
|
|
61
|
+
}[], skipCardinalityCalculation?: boolean | undefined) => import("@veloceapps/core").LineItem;
|
|
61
62
|
getAttributeValue: (attributes: import("@veloceapps/core").Attribute[], name: string) => any;
|
|
62
63
|
generateLineItem: (port: string, type: string, parentId: string, attributes?: {
|
|
63
64
|
name: string;
|
|
@@ -68,13 +69,19 @@ export declare const vendorMap: {
|
|
|
68
69
|
list: number;
|
|
69
70
|
};
|
|
70
71
|
generateModifiedAssetsMap: (lineItems: import("@veloceapps/core").LineItem[]) => Record<string, boolean>;
|
|
72
|
+
getOriginParent: (lineItems: import("@veloceapps/core").LineItem[], currentLineItem: import("@veloceapps/core").LineItem) => import("@veloceapps/core").LineItem | undefined;
|
|
73
|
+
isLineItemModified: <T_1 extends Pick<import("@veloceapps/core").LineItem, "actionCode" | "status">>(lineItem: T_1) => boolean;
|
|
71
74
|
multiplyLineItems: (lineItem: import("@veloceapps/core").LineItem, qty: number, split: boolean) => import("@veloceapps/core").LineItem[];
|
|
75
|
+
filterOutTechnicalAttributes: <T_2 extends {
|
|
76
|
+
name: string;
|
|
77
|
+
}>(attributes: T_2[]) => T_2[];
|
|
72
78
|
ConfigurationService: typeof ConfigurationService;
|
|
73
79
|
QuoteDraftService: typeof QuoteDraftService;
|
|
74
80
|
FlowConfigurationService: typeof FlowConfigurationService;
|
|
75
81
|
LineItemWorker: typeof LineItemWorker;
|
|
76
82
|
ProductImagesService: typeof ProductImagesService;
|
|
77
83
|
ContextService: typeof ContextService;
|
|
84
|
+
RuntimeSettingsService: typeof RuntimeSettingsService;
|
|
78
85
|
};
|
|
79
86
|
'@veloceapps/sdk/cms': {
|
|
80
87
|
TemplatesService: typeof TemplatesService;
|
|
@@ -99,9 +106,8 @@ export declare const vendorMap: {
|
|
|
99
106
|
DEFAULT_PLUGINS_TOKEN: angularCore.InjectionToken<typeof import("./engine/models/plugin").Plugin[]>;
|
|
100
107
|
UI_DEFINITION_METADATA: angularCore.InjectionToken<import("@veloceapps/sdk/core").UIDefinitionMetadata>;
|
|
101
108
|
ELEMENT_METADATA: angularCore.InjectionToken<import("@veloceapps/sdk/cms").ElementMetadata>;
|
|
102
|
-
SHARED_ELEMENT_METADATA: angularCore.InjectionToken<import("@veloceapps/sdk/cms").ElementMetadata>;
|
|
109
|
+
SHARED_ELEMENT_METADATA: angularCore.InjectionToken<import("@veloceapps/sdk/cms").ElementMetadata | undefined>;
|
|
103
110
|
ELEMENT_CONFIG: angularCore.InjectionToken<import("@veloceapps/sdk/cms").ElementConfig>;
|
|
104
|
-
VENDOR_MAP: angularCore.InjectionToken<lodash.Dictionary<any>>;
|
|
105
111
|
};
|
|
106
112
|
};
|
|
107
113
|
export type VendorMap = typeof vendorMap;
|
package/core/core.module.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { FormattingSettings } from './types';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
import * as i1 from "./modules/configuration/configuration.module";
|
|
3
4
|
import * as i2 from "./modules/flow-configuration/flow-configuration.module";
|
|
5
|
+
export declare const DEFAULT_FORMATTING_SETTINGS: FormattingSettings;
|
|
4
6
|
export declare class SdkCoreModule {
|
|
5
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdkCoreModule, never>;
|
|
6
8
|
static ɵmod: i0.ɵɵNgModuleDeclaration<SdkCoreModule, never, [typeof i1.ConfigurationModule, typeof i2.FlowConfigurationModule], never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./primeng-calendar.directive";
|
|
3
|
+
export declare class SdkDirectivesModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdkDirectivesModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdkDirectivesModule, [typeof i1.CalendarDirective], never, [typeof i1.CalendarDirective]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SdkDirectivesModule>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Calendar } from 'primeng/calendar';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CalendarDirective implements OnInit, OnDestroy {
|
|
5
|
+
set vlCalendar(calendar: Calendar);
|
|
6
|
+
private calendar;
|
|
7
|
+
private ngControl;
|
|
8
|
+
private formattingSettings;
|
|
9
|
+
private destroy$;
|
|
10
|
+
ngOnDestroy(): void;
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarDirective, never>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CalendarDirective, "[vlCalendar]", never, { "vlCalendar": "vlCalendar"; }, {}, never, never, false, never>;
|
|
14
|
+
}
|
package/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigurationApiService } from '@veloceapps/api';
|
|
2
|
-
import { Charge, CompiledPricePlan, ConfigurationContext, LineItem, RuntimeModel } from '@veloceapps/core';
|
|
2
|
+
import { Charge, CompiledPricePlan, ConfigurationContext, LineItem, PatchLineItemOptions, RuntimeModel } from '@veloceapps/core';
|
|
3
3
|
import { Dictionary } from 'lodash';
|
|
4
4
|
import { MessageService } from 'primeng/api';
|
|
5
5
|
import { DialogService } from 'primeng/dynamicdialog';
|
|
@@ -24,8 +24,8 @@ export declare class ConfigurationService {
|
|
|
24
24
|
hasUnsavedChanges: boolean;
|
|
25
25
|
constructor(quoteDraftService: QuoteDraftService, runtimeService: ConfigurationRuntimeService, contextService: ContextService, configurationApiService: ConfigurationApiService, messageService: MessageService, dialogService: DialogService);
|
|
26
26
|
reset(): void;
|
|
27
|
-
patch$(lineItem: LineItem): Observable<LineItem>;
|
|
28
|
-
patch(lineItem: LineItem): void;
|
|
27
|
+
patch$(lineItem: LineItem, options?: PatchLineItemOptions): Observable<LineItem>;
|
|
28
|
+
patch(lineItem: LineItem, options?: PatchLineItemOptions): void;
|
|
29
29
|
setConfigurableRamp(lineItem: LineItem): void;
|
|
30
30
|
get(): Observable<LineItem | undefined>;
|
|
31
31
|
getSnapshot(): LineItem | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OnDestroy, PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DatePipe implements PipeTransform, OnDestroy {
|
|
4
|
+
private locale;
|
|
5
|
+
private defaultOptions;
|
|
6
|
+
private formattingSettings;
|
|
7
|
+
private destroy$;
|
|
8
|
+
ngOnDestroy(): void;
|
|
9
|
+
transform(date: string | number | Date | undefined | null): string;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatePipe, never>;
|
|
11
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DatePipe, "vlDate", false>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OnDestroy, PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NumberPipe implements PipeTransform, OnDestroy {
|
|
4
|
+
private formattingSettings;
|
|
5
|
+
private destroy$;
|
|
6
|
+
ngOnDestroy(): void;
|
|
7
|
+
transform(price: string | number): string;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NumberPipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<NumberPipe, "vlNumber", false>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./number.pipe";
|
|
3
|
+
import * as i2 from "./price.pipe";
|
|
4
|
+
import * as i3 from "./date.pipe";
|
|
5
|
+
export declare class SdkPipesModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdkPipesModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdkPipesModule, [typeof i1.NumberPipe, typeof i2.PricePipe, typeof i3.DatePipe], never, [typeof i1.NumberPipe, typeof i2.PricePipe, typeof i3.DatePipe]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SdkPipesModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OnDestroy, PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class PricePipe implements PipeTransform, OnDestroy {
|
|
4
|
+
private formattingSettings;
|
|
5
|
+
private destroy$;
|
|
6
|
+
ngOnDestroy(): void;
|
|
7
|
+
transform(price: string | number): string;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PricePipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<PricePipe, "vlPrice", false>;
|
|
10
|
+
}
|
package/core/services/index.d.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ConfigurationSettingsApiService } from '@veloceapps/api';
|
|
2
|
+
import { RuntimeConfigurationSettings, RuntimeCurrencySettings } from '@veloceapps/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { FormattingSettings } from '../types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class RuntimeSettingsService {
|
|
7
|
+
private configurationSettingsApiService;
|
|
8
|
+
private configurationSettings$;
|
|
9
|
+
private currencySettings$;
|
|
10
|
+
private formattingSettings;
|
|
11
|
+
constructor(configurationSettingsApiService: ConfigurationSettingsApiService);
|
|
12
|
+
create(): Observable<void>;
|
|
13
|
+
initCurrency(iso?: string): void;
|
|
14
|
+
getFormattingSettings(): FormattingSettings;
|
|
15
|
+
getConfigurationSettings(): RuntimeConfigurationSettings;
|
|
16
|
+
getCurrencySettings(): RuntimeCurrencySettings;
|
|
17
|
+
private parseConfigurationSettings;
|
|
18
|
+
private getCurrencySymbol;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RuntimeSettingsService, never>;
|
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RuntimeSettingsService>;
|
|
21
|
+
}
|