@veloceapps/sdk 6.0.0-31 → 6.0.0-33
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/bundles/veloceapps-sdk-cms.umd.js +1214 -783
- package/bundles/veloceapps-sdk-cms.umd.js.map +1 -1
- package/bundles/veloceapps-sdk.umd.js +5 -5
- package/bundles/veloceapps-sdk.umd.js.map +1 -1
- package/cms/components/element-children/element-children.component.d.ts +13 -3
- package/cms/components/element-children/element-children.module.d.ts +4 -2
- package/cms/components/element-drop-handle/element-drop-handle.component.d.ts +12 -0
- package/cms/components/element-drop-handle/element-drop-handle.module.d.ts +9 -0
- package/cms/components/element-renderer/element-renderer.component.d.ts +3 -3
- package/cms/components/preview/index.d.ts +1 -0
- package/cms/components/preview/preview.component.d.ts +9 -8
- package/cms/components/preview/preview.module.d.ts +2 -1
- package/cms/components/preview/preview.types.d.ts +11 -0
- package/cms/index.d.ts +1 -0
- package/cms/launcher.module.d.ts +3 -1
- package/cms/modules/runtime/index.d.ts +2 -0
- package/cms/modules/runtime/runtime.module.d.ts +8 -0
- package/cms/modules/runtime/services/compilation.service.d.ts +18 -0
- package/cms/modules/runtime/services/runtime-editor.service.d.ts +18 -0
- package/cms/modules/runtime/services/runtime.service.d.ts +27 -0
- package/cms/modules/runtime/tokens.d.ts +3 -0
- package/cms/{types → modules/runtime/types}/compilation.types.d.ts +1 -1
- package/cms/modules/runtime/types/runtime.actions.d.ts +9 -0
- package/cms/plugins/element-hover.plugin.d.ts +32 -0
- package/cms/services/index.d.ts +0 -1
- package/cms/services/io-provider.service.d.ts +3 -3
- package/cms/types/common.types.d.ts +1 -1
- package/cms/types/configuration.types.d.ts +1 -0
- package/cms/types/index.d.ts +1 -1
- package/cms/utils/elements-resolver.d.ts +2 -1
- package/cms/utils/index.d.ts +1 -0
- package/cms/utils/path.utils.d.ts +0 -1
- package/cms/utils/ui-definition.utils.d.ts +6 -0
- package/esm2015/cms/cms.elements.js +17 -4
- package/esm2015/cms/components/element-children/element-children.component.js +23 -7
- package/esm2015/cms/components/element-children/element-children.module.js +6 -4
- package/esm2015/cms/components/element-drop-handle/element-drop-handle.component.js +32 -0
- package/esm2015/cms/components/element-drop-handle/element-drop-handle.module.js +19 -0
- package/esm2015/cms/components/element-renderer/element-renderer.component.js +7 -7
- package/esm2015/cms/components/preview/index.js +2 -1
- package/esm2015/cms/components/preview/preview.component.js +20 -35
- package/esm2015/cms/components/preview/preview.module.js +5 -4
- package/esm2015/cms/components/preview/preview.types.js +2 -0
- package/esm2015/cms/index.js +2 -1
- package/esm2015/cms/launcher.module.js +8 -7
- package/esm2015/cms/modules/runtime/index.js +3 -0
- package/esm2015/cms/modules/runtime/runtime.module.js +32 -0
- package/esm2015/cms/modules/runtime/services/compilation.service.js +81 -0
- package/esm2015/cms/modules/runtime/services/runtime-editor.service.js +27 -0
- package/esm2015/cms/modules/runtime/services/runtime.service.js +74 -0
- package/esm2015/cms/modules/runtime/tokens.js +3 -0
- package/esm2015/cms/modules/runtime/types/compilation.types.js +2 -0
- package/esm2015/cms/modules/runtime/types/runtime.actions.js +2 -0
- package/esm2015/cms/plugins/configuration.plugin.js +9 -1
- package/esm2015/cms/plugins/element-hover.plugin.js +157 -0
- package/esm2015/cms/services/index.js +1 -2
- package/esm2015/cms/services/io-provider.service.js +7 -7
- package/esm2015/cms/types/common.types.js +1 -1
- package/esm2015/cms/types/configuration.types.js +1 -1
- package/esm2015/cms/types/index.js +2 -2
- package/esm2015/cms/utils/elements-resolver.js +13 -6
- package/esm2015/cms/utils/index.js +2 -1
- package/esm2015/cms/utils/path.utils.js +2 -13
- package/esm2015/cms/utils/ui-definition.utils.js +82 -0
- package/esm2015/src/components/doc-gen/doc-gen.component.js +1 -1
- package/esm2015/src/pages/catalog/catalog.component.js +1 -1
- package/esm2015/src/pages/product/product.component.js +1 -1
- package/esm2015/src/pages/remote/remote.component.js +1 -1
- package/esm2015/src/pages/shopping-cart/shopping-cart.component.js +1 -1
- package/fesm2015/veloceapps-sdk-cms.js +1109 -713
- package/fesm2015/veloceapps-sdk-cms.js.map +1 -1
- package/fesm2015/veloceapps-sdk.js +5 -5
- package/fesm2015/veloceapps-sdk.js.map +1 -1
- package/package.json +5 -3
- package/cms/services/dynamic-module.service.d.ts +0 -15
- package/cms/services/launcher.service.d.ts +0 -18
- package/esm2015/cms/services/dynamic-module.service.js +0 -33
- package/esm2015/cms/services/launcher.service.js +0 -58
- package/esm2015/cms/types/compilation.types.js +0 -2
@@ -1,10 +1,20 @@
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy } from '@angular/core';
|
2
|
+
import { Observable } from 'rxjs';
|
3
|
+
import { RuntimeEditorService } from '../../modules/runtime/services/runtime-editor.service';
|
4
|
+
import { RuntimeService } from '../../modules/runtime/services/runtime.service';
|
1
5
|
import { ElementContextService } from '../../services/element-context.service';
|
2
6
|
import { ElementMetadata } from '../../types/common.types';
|
3
7
|
import * as i0 from "@angular/core";
|
4
|
-
export declare class ElementChildrenComponent {
|
8
|
+
export declare class ElementChildrenComponent implements OnDestroy {
|
5
9
|
private elementContext;
|
6
|
-
|
7
|
-
|
10
|
+
private runtimeService;
|
11
|
+
private runtimeEditorService;
|
12
|
+
private cdr;
|
13
|
+
metadata$: Observable<ElementMetadata | undefined>;
|
14
|
+
dragMode$: Observable<boolean>;
|
15
|
+
private destroyed$;
|
16
|
+
constructor(elementContext: ElementContextService, runtimeService: RuntimeService, runtimeEditorService: RuntimeEditorService, cdr: ChangeDetectorRef);
|
17
|
+
ngOnDestroy(): void;
|
8
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElementChildrenComponent, never>;
|
9
19
|
static ɵcmp: i0.ɵɵComponentDeclaration<ElementChildrenComponent, "element-children", never, {}, {}, never, never>;
|
10
20
|
}
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
import * as i1 from "./element-children.component";
|
3
|
-
import * as i2 from "
|
3
|
+
import * as i2 from "@veloceapps/components";
|
4
|
+
import * as i3 from "../element-renderer/element-renderer.module";
|
5
|
+
import * as i4 from "../element-drop-handle/element-drop-handle.module";
|
4
6
|
export declare class ElementChildrenModule {
|
5
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElementChildrenModule, never>;
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ElementChildrenModule, [typeof i1.ElementChildrenComponent], [typeof i2.ElementRendererModule], [typeof i1.ElementChildrenComponent]>;
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ElementChildrenModule, [typeof i1.ElementChildrenComponent], [typeof i2.LetDirectiveModule, typeof i3.ElementRendererModule, typeof i4.ElementDropHandleModule], [typeof i1.ElementChildrenComponent]>;
|
7
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<ElementChildrenModule>;
|
8
10
|
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { DndDropEvent } from 'ngx-drag-drop';
|
2
|
+
import { RuntimeEditorService } from '../../modules/runtime/services/runtime-editor.service';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class ElementDropHandleComponent {
|
5
|
+
private runtimeService;
|
6
|
+
index: number;
|
7
|
+
parentPath: string;
|
8
|
+
constructor(runtimeService: RuntimeEditorService);
|
9
|
+
handleDrop(e: DndDropEvent): void;
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ElementDropHandleComponent, never>;
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ElementDropHandleComponent, "vl-element-drop-handle", never, { "index": "index"; "parentPath": "parentPath"; }, {}, never, never>;
|
12
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./element-drop-handle.component";
|
3
|
+
import * as i2 from "@angular/common";
|
4
|
+
import * as i3 from "ngx-drag-drop";
|
5
|
+
export declare class ElementDropHandleModule {
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ElementDropHandleModule, never>;
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ElementDropHandleModule, [typeof i1.ElementDropHandleComponent], [typeof i2.CommonModule, typeof i3.DndModule], [typeof i1.ElementDropHandleComponent]>;
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ElementDropHandleModule>;
|
9
|
+
}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { ChangeDetectorRef, ElementRef, Injector, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
|
2
2
|
import { ConfigurationService } from '@veloceapps/sdk/core';
|
3
|
-
import {
|
3
|
+
import { RuntimeService } from '../../modules/runtime/services/runtime.service';
|
4
4
|
import { ElementContextService } from '../../services/element-context.service';
|
5
5
|
import { IOProviderService } from '../../services/io-provider.service';
|
6
6
|
import { ElementMetadata } from '../../types/common.types';
|
7
7
|
import * as i0 from "@angular/core";
|
8
8
|
export declare class ElementRendererComponent implements OnInit, OnDestroy {
|
9
9
|
private parentInjector;
|
10
|
-
private
|
10
|
+
private runtimeService;
|
11
11
|
private elementContext;
|
12
12
|
private ioProviderService;
|
13
13
|
private configurationService;
|
@@ -18,7 +18,7 @@ export declare class ElementRendererComponent implements OnInit, OnDestroy {
|
|
18
18
|
private factory?;
|
19
19
|
private refs;
|
20
20
|
private destroy$;
|
21
|
-
constructor(parentInjector: Injector,
|
21
|
+
constructor(parentInjector: Injector, runtimeService: RuntimeService, elementContext: ElementContextService, ioProviderService: IOProviderService, configurationService: ConfigurationService, elementRef: ElementRef, cdr: ChangeDetectorRef);
|
22
22
|
ngOnInit(): void;
|
23
23
|
ngOnDestroy(): void;
|
24
24
|
private createComponents;
|
@@ -1,34 +1,35 @@
|
|
1
|
-
import { OnDestroy, OnInit } from '@angular/core';
|
1
|
+
import { ChangeDetectorRef, 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 } from 'rxjs';
|
5
|
+
import { RuntimeService } from '../../modules/runtime/services/runtime.service';
|
5
6
|
import { IntegrationState } from '../../services';
|
6
|
-
import { LauncherService } from '../../services/launcher.service';
|
7
7
|
import { ElementMetadata } from '../../types/common.types';
|
8
|
+
import { CMSPreviewConfig } from './preview.types';
|
8
9
|
import * as i0 from "@angular/core";
|
9
10
|
interface State {
|
10
11
|
loading: boolean;
|
11
12
|
failure: boolean;
|
12
13
|
}
|
13
14
|
export declare class PreviewComponent implements OnInit, OnDestroy {
|
14
|
-
private
|
15
|
+
private runtimeService;
|
15
16
|
private configurationService;
|
16
17
|
private messageService;
|
17
|
-
private
|
18
|
+
private configurationRuntimeService;
|
18
19
|
private integrationState;
|
20
|
+
private cdr;
|
19
21
|
modelId?: string;
|
20
22
|
uiDefinition?: UIDefinition;
|
21
|
-
|
23
|
+
config?: CMSPreviewConfig;
|
22
24
|
state$: BehaviorSubject<State>;
|
23
25
|
elements: ElementMetadata[];
|
24
26
|
private destroy$;
|
25
|
-
constructor(
|
27
|
+
constructor(runtimeService: RuntimeService, configurationService: ConfigurationService, messageService: MessageService, configurationRuntimeService: ConfigurationRuntimeService, integrationState: IntegrationState, cdr: ChangeDetectorRef);
|
26
28
|
ngOnInit(): void;
|
27
29
|
ngOnDestroy(): void;
|
28
30
|
private initializeConfiguration$;
|
29
|
-
private elementToMetadataSafe;
|
30
31
|
private startPreview;
|
31
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<PreviewComponent, never>;
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PreviewComponent, "vl-cms-preview", never, { "modelId": "modelId"; "uiDefinition": "uiDefinition"; "
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PreviewComponent, "vl-cms-preview", never, { "modelId": "modelId"; "uiDefinition": "uiDefinition"; "config": "config"; }, {}, never, never>;
|
33
34
|
}
|
34
35
|
export {};
|
@@ -4,8 +4,9 @@ import * as i2 from "@angular/common";
|
|
4
4
|
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
|
+
import * as i6 from "../element-drop-handle/element-drop-handle.module";
|
7
8
|
export declare class PreviewModule {
|
8
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<PreviewModule, never>;
|
9
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PreviewModule, [typeof i1.PreviewComponent], [typeof i2.CommonModule, typeof i3.LoaderModule, typeof i4.ElementRendererModule, typeof i5.ElementChildrenModule], [typeof i1.PreviewComponent]>;
|
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]>;
|
10
11
|
static ɵinj: i0.ɵɵInjectorDeclaration<PreviewModule>;
|
11
12
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export interface CMSPreviewConfig {
|
2
|
+
/**
|
3
|
+
* When `true`, IntegrationState keeps data on component destroy
|
4
|
+
*/
|
5
|
+
suppressClearState?: boolean;
|
6
|
+
/**
|
7
|
+
* When `true`, preview adds additional components/plugins needed for UIBuilder
|
8
|
+
* (like element hover/selection or Drag&Drop zones)
|
9
|
+
*/
|
10
|
+
uiBuilderMode?: boolean;
|
11
|
+
}
|
package/cms/index.d.ts
CHANGED
@@ -5,6 +5,7 @@ export * from './decorators';
|
|
5
5
|
export * from './injection-tokens';
|
6
6
|
export * from './launcher.module';
|
7
7
|
export * from './modules/federated/export';
|
8
|
+
export * from './modules/runtime';
|
8
9
|
export * from './services';
|
9
10
|
export * from './types';
|
10
11
|
export * from './utils';
|
package/cms/launcher.module.d.ts
CHANGED
@@ -3,8 +3,10 @@ import * as i1 from "@angular/common";
|
|
3
3
|
import * as i2 from "@veloceapps/core";
|
4
4
|
import * as i3 from "@veloceapps/api";
|
5
5
|
import * as i4 from "@veloceapps/sdk/core";
|
6
|
+
import * as i5 from "./modules/runtime/runtime.module";
|
7
|
+
import * as i6 from "./components/preview/preview.module";
|
6
8
|
export declare class LauncherModule {
|
7
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<LauncherModule, never>;
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<LauncherModule, never, [typeof i1.CommonModule, typeof i2.CoreModule, typeof i3.ApiModule, typeof i4.SdkCoreModule],
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LauncherModule, never, [typeof i1.CommonModule, typeof i2.CoreModule, typeof i3.ApiModule, typeof i4.SdkCoreModule, typeof i5.RuntimeModule, typeof i6.PreviewModule], [typeof i6.PreviewModule]>;
|
9
11
|
static ɵinj: i0.ɵɵInjectorDeclaration<LauncherModule>;
|
10
12
|
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "@angular/common";
|
3
|
+
import * as i2 from "@veloceapps/core";
|
4
|
+
export declare class RuntimeModule {
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RuntimeModule, never>;
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RuntimeModule, never, [typeof i1.CommonModule, typeof i2.CoreModule], never>;
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<RuntimeModule>;
|
8
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Compiler, NgModule, Type } from '@angular/core';
|
2
|
+
import { UIDefinition } from '@veloceapps/sdk/core';
|
3
|
+
import { Observable } from 'rxjs';
|
4
|
+
import { CompilationResult } from '../../../modules/runtime/types/compilation.types';
|
5
|
+
import { ElementMetadata } from '../../../types/common.types';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
export declare class CompilationService {
|
8
|
+
private compiler;
|
9
|
+
private uiDefinitionMeta?;
|
10
|
+
private elementsResolver?;
|
11
|
+
constructor(compiler: Compiler);
|
12
|
+
compileUIDefinition$(uiDefinition: UIDefinition): Observable<CompilationResult>;
|
13
|
+
compileElement$(element: ElementMetadata): Observable<CompilationResult>;
|
14
|
+
clearModuleCache(modules: Type<NgModule>[]): void;
|
15
|
+
private getModule;
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CompilationService, never>;
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CompilationService>;
|
18
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Patch } from 'rfc6902';
|
2
|
+
import { BehaviorSubject, Observable, ReplaySubject } from 'rxjs';
|
3
|
+
import { RuntimeElementDeleted, RuntimeElementDropped } from '../types/runtime.actions';
|
4
|
+
import { RuntimeService } from './runtime.service';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
export declare class RuntimeEditorService {
|
7
|
+
private runtimeService;
|
8
|
+
private editorModeSubj$;
|
9
|
+
dragMode$: BehaviorSubject<boolean>;
|
10
|
+
elementDropped$: ReplaySubject<RuntimeElementDropped>;
|
11
|
+
elementDeleted$: ReplaySubject<RuntimeElementDeleted>;
|
12
|
+
editorMode$: Observable<boolean>;
|
13
|
+
constructor(runtimeService: RuntimeService);
|
14
|
+
applyPatch$(patch: Patch): Observable<void>;
|
15
|
+
toggleEditorMode(): void;
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RuntimeEditorService, never>;
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RuntimeEditorService>;
|
18
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { ComponentFactory, Injector, NgModule, Type } from '@angular/core';
|
2
|
+
import { UIDefinition } from '@veloceapps/sdk/core';
|
3
|
+
import { Patch } from 'rfc6902';
|
4
|
+
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
5
|
+
import { CMSPreviewConfig } from '../../../components/preview/preview.types';
|
6
|
+
import { ElementMetadata } from '../../../types';
|
7
|
+
import * as i0 from "@angular/core";
|
8
|
+
export declare class RuntimeService {
|
9
|
+
private injector;
|
10
|
+
modules: Type<NgModule>[];
|
11
|
+
componentFactories: Record<string, ComponentFactory<any>>;
|
12
|
+
applicationTree: ElementMetadata[];
|
13
|
+
config?: CMSPreviewConfig;
|
14
|
+
isInitialized$: BehaviorSubject<boolean>;
|
15
|
+
updated$: Subject<void>;
|
16
|
+
private compilationService;
|
17
|
+
constructor(injector: Injector);
|
18
|
+
initialize$(uiDefinition?: UIDefinition, config?: CMSPreviewConfig): Observable<ElementMetadata[]>;
|
19
|
+
applyPatch$(patch: Patch): Observable<void>;
|
20
|
+
getCompiledElement$(path: string): Observable<ElementMetadata | undefined>;
|
21
|
+
clear(): void;
|
22
|
+
private addElement$;
|
23
|
+
private deleteElement;
|
24
|
+
private addComponentFactories;
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RuntimeService, never>;
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RuntimeService>;
|
27
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ModuleWithComponentFactories, NgModule } from '@angular/core';
|
2
|
-
import { ElementMetadata } from '
|
2
|
+
import { ElementMetadata } from '../../../types/common.types';
|
3
3
|
export interface CompilationResult {
|
4
4
|
elements: ElementMetadata[];
|
5
5
|
module: ModuleWithComponentFactories<NgModule>;
|
@@ -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 color;
|
9
|
+
private el;
|
10
|
+
private metadata;
|
11
|
+
private document;
|
12
|
+
private runtimeEditorService;
|
13
|
+
private overlayEl?;
|
14
|
+
private highlighted;
|
15
|
+
private destroyed$;
|
16
|
+
private mouseOverListenerBound;
|
17
|
+
private mouseLeaveListenerBound;
|
18
|
+
constructor(host: ElementComponent);
|
19
|
+
ngOnDestroy(): void;
|
20
|
+
private attachListeners;
|
21
|
+
private detachListeners;
|
22
|
+
private mouseOverListener;
|
23
|
+
private mouseLeaveListener;
|
24
|
+
private addHighlight;
|
25
|
+
private removeHighlight;
|
26
|
+
private createContainer;
|
27
|
+
private addRemoveButton;
|
28
|
+
private addElementName;
|
29
|
+
private deleteRemoveButton;
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ElementHoverPlugin, never>;
|
31
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ElementHoverPlugin, never, never, {}, {}, never>;
|
32
|
+
}
|
package/cms/services/index.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { BehaviorSubject, Observable } from 'rxjs';
|
2
|
+
import { RuntimeService } from '../modules/runtime/services/runtime.service';
|
2
3
|
import { ElementMetadata } from '../types/common.types';
|
3
|
-
import { DynamicModuleService } from './dynamic-module.service';
|
4
4
|
import * as i0 from "@angular/core";
|
5
5
|
export declare class IOProviderService {
|
6
|
-
private
|
6
|
+
private runtimeService;
|
7
7
|
private inputs;
|
8
|
-
constructor(
|
8
|
+
constructor(runtimeService: RuntimeService);
|
9
9
|
connect(el: ElementMetadata, name: string, target?: string | null): Observable<any> | undefined;
|
10
10
|
provide(el: ElementMetadata, name: string, target?: string | null): BehaviorSubject<any> | undefined;
|
11
11
|
private resolveTarget;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Dictionary } from 'lodash';
|
2
2
|
import { Entity } from '../engine/models/entity';
|
3
3
|
import { Plugin } from '../engine/models/plugin';
|
4
|
-
export declare type ELEMENT_TYPE = 'CUSTOM' | 'CONTAINER' | 'SERVICE' | 'REFERENCE';
|
4
|
+
export declare type ELEMENT_TYPE = 'CUSTOM' | 'CONTAINER' | 'SERVICE' | 'REFERENCE' | 'PAGE' | 'PAGE_LAYOUT' | 'LAYOUT_REGION';
|
5
5
|
export declare type ElementStyleDeclaration = Partial<CSSStyleDeclaration>;
|
6
6
|
export interface ElementConfig {
|
7
7
|
component: typeof Entity;
|
package/cms/types/index.d.ts
CHANGED
@@ -3,10 +3,11 @@ import { UIDefinitionMetadata } from '@veloceapps/sdk/core';
|
|
3
3
|
import { ElementMetadata } from '../types';
|
4
4
|
export declare class ElementsResolver {
|
5
5
|
private uiDef;
|
6
|
-
|
6
|
+
elements: ElementMetadata[];
|
7
7
|
private renderableElements;
|
8
8
|
private sharedElements;
|
9
9
|
constructor(uiDef: UIDefinitionMetadata, elements: ElementMetadata[]);
|
10
|
+
addElement(element: ElementMetadata): void;
|
10
11
|
getNgComponents(): Type<any>[];
|
11
12
|
private transpile;
|
12
13
|
private transpileScripts;
|
package/cms/utils/index.d.ts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import { ElementMetadata, ElementPath, PathBlock } from '../types';
|
2
2
|
export declare const parseBoundPath: (path: string) => PathBlock[];
|
3
3
|
export declare const parsePath: (path: string) => ElementPath;
|
4
|
-
export declare const findElementByModule: (elements: ElementMetadata[], module: string, elementName: string) => ElementMetadata | undefined;
|
5
4
|
export declare const getAbsolutePath: (elements: ElementMetadata[], subject: ElementMetadata, path: ElementPath) => string | undefined;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { ElementMetadata } from '../types';
|
2
|
+
export declare function getElementUniqueName<T>(collection: T[], name: string, comparator: (name: string) => (value: T, index?: number, array?: T[]) => boolean): string;
|
3
|
+
export declare const insertElement: (source: ElementMetadata[], target: ElementMetadata, path: string, index: number) => ElementMetadata[];
|
4
|
+
export declare const removeElement: (source: ElementMetadata[], path: string) => ElementMetadata[];
|
5
|
+
export declare const findElementByPath: (source: ElementMetadata[], path: string) => ElementMetadata | undefined;
|
6
|
+
export declare const findElementByModule: (elements: ElementMetadata[], module: string, elementName: string) => ElementMetadata | undefined;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { ElementComponent } from './components/element.component';
|
2
|
+
import { ElementHoverPlugin } from './plugins/element-hover.plugin';
|
2
3
|
import { IOPlugin } from './plugins/io.plugin';
|
3
4
|
import { ScriptPlugin } from './plugins/script.plugin';
|
4
5
|
/*
|
@@ -7,12 +8,12 @@ import { ScriptPlugin } from './plugins/script.plugin';
|
|
7
8
|
export const CONFIG = {
|
8
9
|
CUSTOM: {
|
9
10
|
component: ElementComponent,
|
10
|
-
plugins: [IOPlugin, ScriptPlugin],
|
11
|
+
plugins: [ElementHoverPlugin, IOPlugin, ScriptPlugin],
|
11
12
|
},
|
12
13
|
CONTAINER: {
|
13
14
|
component: ElementComponent,
|
14
15
|
defaultTemplate: '<element-children></element-children>',
|
15
|
-
plugins: [ScriptPlugin],
|
16
|
+
plugins: [ElementHoverPlugin, ScriptPlugin],
|
16
17
|
},
|
17
18
|
SERVICE: {
|
18
19
|
component: ElementComponent,
|
@@ -22,8 +23,20 @@ export const CONFIG = {
|
|
22
23
|
},
|
23
24
|
REFERENCE: {
|
24
25
|
component: ElementComponent,
|
25
|
-
plugins: [IOPlugin, ScriptPlugin],
|
26
|
+
plugins: [ElementHoverPlugin, IOPlugin, ScriptPlugin],
|
26
27
|
suppressTemplate: true,
|
27
28
|
},
|
29
|
+
PAGE: {
|
30
|
+
component: ElementComponent,
|
31
|
+
plugins: [ElementHoverPlugin, IOPlugin, ScriptPlugin],
|
32
|
+
},
|
33
|
+
PAGE_LAYOUT: {
|
34
|
+
component: ElementComponent,
|
35
|
+
plugins: [ElementHoverPlugin, IOPlugin, ScriptPlugin],
|
36
|
+
},
|
37
|
+
LAYOUT_REGION: {
|
38
|
+
component: ElementComponent,
|
39
|
+
plugins: [ElementHoverPlugin, IOPlugin, ScriptPlugin],
|
40
|
+
},
|
28
41
|
};
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY21zLmVsZW1lbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9zZGsvY21z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BFbGVtZW50Q29tcG9uZW50LFxuICAgIHBsdWdpbnM6IFtFbGVtZW50SG92ZXJQbHVnaW4sIElPUGx1Z2luLCBTY3JpcHRQbHVnaW5dLFxuICB9LFxufTtcbiJdfQ==
|
@@ -1,15 +1,31 @@
|
|
1
1
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
2
|
+
import { combineLatest, map, of, Subject, takeUntil } from 'rxjs';
|
2
3
|
import * as i0 from "@angular/core";
|
3
4
|
import * as i1 from "../../services/element-context.service";
|
4
|
-
import * as i2 from "
|
5
|
+
import * as i2 from "../../modules/runtime/services/runtime.service";
|
6
|
+
import * as i3 from "../../modules/runtime/services/runtime-editor.service";
|
7
|
+
import * as i4 from "../element-drop-handle/element-drop-handle.component";
|
8
|
+
import * as i5 from "../element-renderer/element-renderer.component";
|
5
9
|
export class ElementChildrenComponent {
|
6
|
-
constructor(elementContext) {
|
10
|
+
constructor(elementContext, runtimeService, runtimeEditorService, cdr) {
|
11
|
+
var _a, _b;
|
7
12
|
this.elementContext = elementContext;
|
8
|
-
this.
|
13
|
+
this.runtimeService = runtimeService;
|
14
|
+
this.runtimeEditorService = runtimeEditorService;
|
15
|
+
this.cdr = cdr;
|
16
|
+
this.destroyed$ = new Subject();
|
17
|
+
const path = (_b = (_a = this.elementContext) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.path;
|
18
|
+
this.metadata$ = path ? this.runtimeService.getCompiledElement$(path) : of(undefined);
|
19
|
+
this.dragMode$ = combineLatest([this.runtimeEditorService.editorMode$, this.runtimeEditorService.dragMode$]).pipe(map(flags => flags.every(Boolean)));
|
20
|
+
this.runtimeService.updated$.pipe(takeUntil(this.destroyed$)).subscribe(() => this.cdr.detectChanges());
|
21
|
+
}
|
22
|
+
ngOnDestroy() {
|
23
|
+
this.destroyed$.next();
|
24
|
+
this.destroyed$.complete();
|
9
25
|
}
|
10
26
|
}
|
11
|
-
ElementChildrenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementChildrenComponent, deps: [{ token: i1.ElementContextService }], target: i0.ɵɵFactoryTarget.Component });
|
12
|
-
ElementChildrenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ElementChildrenComponent, selector: "element-children", ngImport: i0, template: "<ng-container *ngIf=\"metadata
|
27
|
+
ElementChildrenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementChildrenComponent, deps: [{ token: i1.ElementContextService }, { token: i2.RuntimeService }, { token: i3.RuntimeEditorService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
28
|
+
ElementChildrenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ElementChildrenComponent, selector: "element-children", ngImport: i0, template: "<ng-container *ngIf=\"metadata$ | async as metadata\">\n <vl-element-drop-handle *ngIf=\"dragMode$ | async\" [index]=\"0\" [parentPath]=\"metadata.path\"></vl-element-drop-handle>\n <ng-container *ngFor=\"let child of metadata.children; let i = index\">\n <vl-cms-element-renderer [meta]=\"child\"></vl-cms-element-renderer>\n <vl-element-drop-handle\n *ngIf=\"dragMode$ | async\"\n [index]=\"i + 1\"\n [parentPath]=\"metadata.path\"\n ></vl-element-drop-handle>\n </ng-container>\n</ng-container>\n", styles: [":host{display:contents}\n"], components: [{ type: i4.ElementDropHandleComponent, selector: "vl-element-drop-handle", inputs: ["index", "parentPath"] }, { type: i5.ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: ["meta"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
13
29
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementChildrenComponent, decorators: [{
|
14
30
|
type: Component,
|
15
31
|
args: [{
|
@@ -19,5 +35,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
19
35
|
styleUrls: ['./element-children.component.scss'],
|
20
36
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
21
37
|
}]
|
22
|
-
}], ctorParameters: function () { return [{ type: i1.ElementContextService }]; } });
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
38
|
+
}], ctorParameters: function () { return [{ type: i1.ElementContextService }, { type: i2.RuntimeService }, { type: i3.RuntimeEditorService }, { type: i0.ChangeDetectorRef }]; } });
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxlbWVudC1jaGlsZHJlbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3Nkay9jbXMvY29tcG9uZW50cy9lbGVtZW50LWNoaWxkcmVuL2VsZW1lbnQtY2hpbGRyZW4uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zZGsvY21zL2NvbXBvbmVudHMvZWxlbWVudC1jaGlsZHJlbi9lbGVtZW50LWNoaWxkcmVuLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBcUIsU0FBUyxFQUFhLE1BQU0sZUFBZSxDQUFDO0FBQ2pHLE9BQU8sRUFBRSxhQUFhLEVBQUUsR0FBRyxFQUFjLEVBQUUsRUFBRSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sTUFBTSxDQUFDOzs7Ozs7O0FBYTlFLE1BQU0sT0FBTyx3QkFBd0I7SUFNbkMsWUFDVSxjQUFxQyxFQUNyQyxjQUE4QixFQUM5QixvQkFBMEMsRUFDMUMsR0FBc0I7O1FBSHRCLG1CQUFjLEdBQWQsY0FBYyxDQUF1QjtRQUNyQyxtQkFBYyxHQUFkLGNBQWMsQ0FBZ0I7UUF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lbWVudC1kcm9wLWhhbmRsZT5cbiAgPC9uZy1jb250YWluZXI+XG48L25nLWNvbnRhaW5lcj5cbiJdfQ==
|
@@ -1,18 +1,20 @@
|
|
1
1
|
import { NgModule } from '@angular/core';
|
2
|
+
import { LetDirectiveModule } from '@veloceapps/components';
|
3
|
+
import { ElementDropHandleModule } from '../element-drop-handle/element-drop-handle.module';
|
2
4
|
import { ElementRendererModule } from '../element-renderer/element-renderer.module';
|
3
5
|
import { ElementChildrenComponent } from './element-children.component';
|
4
6
|
import * as i0 from "@angular/core";
|
5
7
|
export class ElementChildrenModule {
|
6
8
|
}
|
7
9
|
ElementChildrenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementChildrenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
8
|
-
ElementChildrenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [ElementRendererModule], exports: [ElementChildrenComponent] });
|
9
|
-
ElementChildrenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementChildrenModule, imports: [[ElementRendererModule]] });
|
10
|
+
ElementChildrenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [LetDirectiveModule, ElementRendererModule, ElementDropHandleModule], exports: [ElementChildrenComponent] });
|
11
|
+
ElementChildrenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementChildrenModule, imports: [[LetDirectiveModule, ElementRendererModule, ElementDropHandleModule]] });
|
10
12
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementChildrenModule, decorators: [{
|
11
13
|
type: NgModule,
|
12
14
|
args: [{
|
13
15
|
declarations: [ElementChildrenComponent],
|
14
|
-
imports: [ElementRendererModule],
|
16
|
+
imports: [LetDirectiveModule, ElementRendererModule, ElementDropHandleModule],
|
15
17
|
exports: [ElementChildrenComponent],
|
16
18
|
}]
|
17
19
|
}] });
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxlbWVudC1jaGlsZHJlbi5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3Nkay9jbXMvY29tcG9uZW50cy9lbGVtZW50LWNoaWxkcmVuL2VsZW1lbnQtY2hpbGRyZW4ubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDNUQsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sbURBQW1ELENBQUM7QUFDNUYsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sNkNBQTZDLENBQUM7QUFDcEYsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sOEJBQThCLENBQUM7O0FBT3hFLE1BQU0sT0FBTyxxQkFBcUI7O21IQUFyQixxQkFBcUI7b0hBQXJCLHFCQUFxQixpQkFKakIsd0JBQXdCLGFBQzdCLGtCQUFrQixFQUFFLHFCQUFxQixFQUFFLHVCQUF1QixhQUNsRSx3QkFBd0I7b0hBRXZCLHFCQUFxQixZQUh2QixDQUFDLGtCQUFrQixFQUFFLHFCQUFxQixFQUFFLHVCQUF1QixDQUFDOzRGQUdsRSxxQkFBcUI7a0JBTGpDLFFBQVE7bUJBQUM7b0JBQ1IsWUFBWSxFQUFFLENBQUMsd0JBQXdCLENBQUM7b0JBQ3hDLE9BQU8sRUFBRSxDQUFDLGtCQUFrQixFQUFFLHFCQUFxQixFQUFFLHVCQUF1QixDQUFDO29CQUM3RSxPQUFPLEVBQUUsQ0FBQyx3QkFBd0IsQ0FBQztpQkFDcEMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgTGV0RGlyZWN0aXZlTW9kdWxlIH0gZnJvbSAnQHZlbG9jZWFwcHMvY29tcG9uZW50cyc7XG5pbXBvcnQgeyBFbGVtZW50RHJvcEhhbmRsZU1vZHVsZSB9IGZyb20gJy4uL2VsZW1lbnQtZHJvcC1oYW5kbGUvZWxlbWVudC1kcm9wLWhhbmRsZS5tb2R1bGUnO1xuaW1wb3J0IHsgRWxlbWVudFJlbmRlcmVyTW9kdWxlIH0gZnJvbSAnLi4vZWxlbWVudC1yZW5kZXJlci9lbGVtZW50LXJlbmRlcmVyLm1vZHVsZSc7XG5pbXBvcnQgeyBFbGVtZW50Q2hpbGRyZW5Db21wb25lbnQgfSBmcm9tICcuL2VsZW1lbnQtY2hpbGRyZW4uY29tcG9uZW50JztcblxuQE5nTW9kdWxlKHtcbiAgZGVjbGFyYXRpb25zOiBbRWxlbWVudENoaWxkcmVuQ29tcG9uZW50XSxcbiAgaW1wb3J0czogW0xldERpcmVjdGl2ZU1vZHVsZSwgRWxlbWVudFJlbmRlcmVyTW9kdWxlLCBFbGVtZW50RHJvcEhhbmRsZU1vZHVsZV0sXG4gIGV4cG9ydHM6IFtFbGVtZW50Q2hpbGRyZW5Db21wb25lbnRdLFxufSlcbmV4cG9ydCBjbGFzcyBFbGVtZW50Q2hpbGRyZW5Nb2R1bGUge31cbiJdfQ==
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
import * as i1 from "../../modules/runtime/services/runtime-editor.service";
|
4
|
+
import * as i2 from "ngx-drag-drop";
|
5
|
+
export class ElementDropHandleComponent {
|
6
|
+
constructor(runtimeService) {
|
7
|
+
this.runtimeService = runtimeService;
|
8
|
+
}
|
9
|
+
handleDrop(e) {
|
10
|
+
this.runtimeService.elementDropped$.next({
|
11
|
+
element: e.data,
|
12
|
+
index: this.index,
|
13
|
+
path: this.parentPath,
|
14
|
+
});
|
15
|
+
}
|
16
|
+
}
|
17
|
+
ElementDropHandleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementDropHandleComponent, deps: [{ token: i1.RuntimeEditorService }], target: i0.ɵɵFactoryTarget.Component });
|
18
|
+
ElementDropHandleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ElementDropHandleComponent, selector: "vl-element-drop-handle", inputs: { index: "index", parentPath: "parentPath" }, ngImport: i0, template: "<div class=\"container\" dndDropzone (dndDrop)=\"handleDrop($event)\">\n <div class=\"handle\"></div>\n</div>\n", styles: [":host{width:0;position:relative}.container{width:40px;height:100%;position:absolute;transform:translate(-50%);display:flex;justify-content:center;align-items:center}.handle{display:none;background:red;height:calc(100% - 10px);width:2px;pointer-events:none}.container.dndDragover .handle{display:block}\n"], directives: [{ type: i2.DndDropzoneDirective, selector: "[dndDropzone]", inputs: ["dndDropzone", "dndEffectAllowed", "dndAllowExternal", "dndHorizontal", "dndDragoverClass", "dndDropzoneDisabledClass", "dndDisableIf", "dndDisableDropIf"], outputs: ["dndDragover", "dndDrop"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ElementDropHandleComponent, decorators: [{
|
20
|
+
type: Component,
|
21
|
+
args: [{
|
22
|
+
selector: 'vl-element-drop-handle',
|
23
|
+
templateUrl: './element-drop-handle.component.html',
|
24
|
+
styleUrls: ['./element-drop-handle.component.scss'],
|
25
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
26
|
+
}]
|
27
|
+
}], ctorParameters: function () { return [{ type: i1.RuntimeEditorService }]; }, propDecorators: { index: [{
|
28
|
+
type: Input
|
29
|
+
}], parentPath: [{
|
30
|
+
type: Input
|
31
|
+
}] } });
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxlbWVudC1kcm9wLWhhbmRsZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3Nkay9jbXMvY29tcG9uZW50cy9lbGVtZW50LWRyb3AtaGFuZGxlL2VsZW1lbnQtZHJvcC1oYW5kbGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zZGsvY21zL2NvbXBvbmVudHMvZWxlbWVudC1kcm9wLWhhbmRsZS9lbGVtZW50LWRyb3AtaGFuZGxlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7O0FBVzFFLE1BQU0sT0FBTywwQkFBMEI7SUFJckMsWUFBb0IsY0FBb0M7UUFBcEMsbUJBQWMsR0FBZCxjQUFjLENBQXNCO0lBQUcsQ0FBQztJQUVyRCxVQUFVLENBQUMsQ0FBZTtRQUMvQixJQUFJLENBQUMsY0FBYyxDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUM7WUFDdkMsT0FBTyxFQUFFLENBQUMsQ0FBQyxJQUF1QjtZQUNsQyxLQUFLLEVBQUUsSUFBSSxDQUFDLEtBQUs7WUFDakIsSUFBSSxFQUFFLElBQUksQ0FBQyxVQUFVO1NBQ3RCLENBQUMsQ0FBQztJ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