@pepperi-addons/ngx-composite-lib 0.4.2-beta.74 → 0.4.2-beta.76
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/esm2020/layout-builder/layout/layout.component.mjs +1 -1
- package/esm2020/layout-builder/layout-builder-internal.service.mjs +48 -58
- package/esm2020/layout-builder/layout-builder.component.mjs +24 -12
- package/esm2020/layout-builder/layout-builder.model.mjs +1 -1
- package/esm2020/layout-builder/layout-builder.service.mjs +4 -1
- package/esm2020/layout-builder/layout-editor/layout-editor.component.mjs +2 -2
- package/esm2020/layout-builder/section/section.component.mjs +2 -2
- package/esm2020/layout-builder/section-block/section-block.component.mjs +16 -12
- package/fesm2015/pepperi-addons-ngx-composite-lib-layout-builder.mjs +93 -84
- package/fesm2015/pepperi-addons-ngx-composite-lib-layout-builder.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-layout-builder.mjs +90 -81
- package/fesm2020/pepperi-addons-ngx-composite-lib-layout-builder.mjs.map +1 -1
- package/layout-builder/layout-builder-internal.service.d.ts +7 -12
- package/layout-builder/layout-builder.component.d.ts +8 -5
- package/layout-builder/layout-builder.model.d.ts +5 -1
- package/layout-builder/layout-builder.service.d.ts +1 -0
- package/layout-builder/layout-editor/layout-editor.component.d.ts +3 -3
- package/layout-builder/section-block/section-block.component.d.ts +1 -2
- package/package.json +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { CdkDragDrop, CdkDragEnd, CdkDragStart } from "@angular/cdk/drag-drop";
|
|
2
2
|
import { TranslateService } from "@ngx-translate/core";
|
|
3
3
|
import { PepScreenSizeType } from "@pepperi-addons/ngx-lib";
|
|
4
|
-
import { IPepDraggableItem } from "@pepperi-addons/ngx-lib/draggable-items";
|
|
5
4
|
import { DataViewScreenSize } from "@pepperi-addons/papi-sdk";
|
|
6
5
|
import { Observable } from 'rxjs';
|
|
7
|
-
import { LayoutEditorType, IEditor, IPepLayoutBlockAddedEvent, ILayoutEditor, IPepLayoutSection, IPepLayoutSectionColumn, IPepLayoutView, ILayoutSectionEditor } from "./layout-builder.model";
|
|
6
|
+
import { LayoutEditorType, IEditor, IPepLayoutBlockAddedEvent, ILayoutEditor, IPepLayoutSection, IPepLayoutSectionColumn, IPepLayoutView, ILayoutSectionEditor, IPepLayoutBlockConfig } from "./layout-builder.model";
|
|
8
7
|
import { PepDialogService } from "@pepperi-addons/ngx-lib/dialog";
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
10
9
|
export declare class LayoutBuilderInternalService {
|
|
@@ -14,7 +13,9 @@ export declare class LayoutBuilderInternalService {
|
|
|
14
13
|
static readonly MAIN_EDITOR_ID = "main";
|
|
15
14
|
private _defaultSectionTitle;
|
|
16
15
|
private _blocksLimitNumber;
|
|
17
|
-
|
|
16
|
+
private _navigateToEditorAfterBlockAdded;
|
|
17
|
+
private _getBlockTitle;
|
|
18
|
+
setBlocksConfig(value: IPepLayoutBlockConfig): void;
|
|
18
19
|
private _editorsBreadCrumb;
|
|
19
20
|
private _editMode;
|
|
20
21
|
get editMode(): boolean;
|
|
@@ -47,17 +48,12 @@ export declare class LayoutBuilderInternalService {
|
|
|
47
48
|
get blocksRemovedEventSubject$(): Observable<string[]>;
|
|
48
49
|
private _showSkeletonSubject;
|
|
49
50
|
get showSkeletonChange$(): Observable<boolean>;
|
|
50
|
-
private _availableBlocksForDragMap;
|
|
51
|
-
get availableBlocksForDragMap(): ReadonlyMap<string, IPepDraggableItem>;
|
|
52
|
-
private _availableBlocksForDragMapSubject;
|
|
53
|
-
get availableBlocksForDragMapChange$(): Observable<ReadonlyMap<string, IPepDraggableItem>>;
|
|
54
51
|
constructor(translate: TranslateService, dialogService: PepDialogService);
|
|
55
52
|
private setEditableState;
|
|
56
53
|
private notifyLayoutViewChange;
|
|
57
54
|
private notifyBlockAdded;
|
|
58
55
|
private notifyBlocksRemoved;
|
|
59
56
|
private notifyEditorChange;
|
|
60
|
-
private notifyAvailableBlocksForDragMapChange;
|
|
61
57
|
private notifyPreviewModeChange;
|
|
62
58
|
private notifyLockScreen;
|
|
63
59
|
private notifySectionsColumnsDropListChange;
|
|
@@ -70,20 +66,18 @@ export declare class LayoutBuilderInternalService {
|
|
|
70
66
|
private getSectionEditor;
|
|
71
67
|
private getSectionColumnByIdForEditor;
|
|
72
68
|
private getCssScreenWidh;
|
|
73
|
-
private getBlockContainerByBlockKey;
|
|
74
69
|
private getBlocksNumber;
|
|
75
70
|
private changeCursorOnDragStart;
|
|
76
71
|
private changeCursorOnDragEnd;
|
|
77
72
|
/***********************************************************************************************/
|
|
73
|
+
getBlockTitle(blockKey: string): string;
|
|
78
74
|
setSectionsColumnsDropListChange(sectionsColumnsDropList: any[]): void;
|
|
79
|
-
setLockScreen(value: boolean): void;
|
|
80
75
|
changePreviewMode(value: boolean): void;
|
|
81
|
-
setAvailableBlocksToDrag(availableBlocksForDrag: Array<IPepDraggableItem>): void;
|
|
82
76
|
getCurrentScreenType(): DataViewScreenSize;
|
|
83
77
|
getScreenType(size: PepScreenSizeType): DataViewScreenSize;
|
|
84
78
|
getSectionColumnKey(sectionKey?: string, index?: string): string;
|
|
85
79
|
getIsHidden(hideIn: DataViewScreenSize[] | undefined, currentScreenType: DataViewScreenSize): boolean;
|
|
86
|
-
navigateToEditor(editorType: LayoutEditorType, id: string): boolean;
|
|
80
|
+
navigateToEditor(editorType: LayoutEditorType, id: string, title: string): boolean;
|
|
87
81
|
navigateBackFromEditor(): void;
|
|
88
82
|
updateLayoutFromEditor(editorData: ILayoutEditor): void;
|
|
89
83
|
updateSectionFromEditor(sectionData: ILayoutSectionEditor): void;
|
|
@@ -101,6 +95,7 @@ export declare class LayoutBuilderInternalService {
|
|
|
101
95
|
doesColumnContainBlock(sectionId: string, columnIndex: number): boolean;
|
|
102
96
|
setScreenWidth(screenType: DataViewScreenSize): void;
|
|
103
97
|
showSkeleton(show: boolean): void;
|
|
98
|
+
lockScreen(value: boolean): void;
|
|
104
99
|
loadLayoutBuilder(layoutView: IPepLayoutView): void;
|
|
105
100
|
static ɵfac: i0.ɵɵFactoryDeclaration<LayoutBuilderInternalService, never>;
|
|
106
101
|
static ɵprov: i0.ɵɵInjectableDeclaration<LayoutBuilderInternalService>;
|
|
@@ -5,7 +5,7 @@ import { TranslateService } from '@ngx-translate/core';
|
|
|
5
5
|
import { PepButton } from '@pepperi-addons/ngx-lib/button';
|
|
6
6
|
import { IPepSideBarStateChangeEvent } from '@pepperi-addons/ngx-lib/side-bar';
|
|
7
7
|
import { IPepDraggableItem } from '@pepperi-addons/ngx-lib/draggable-items';
|
|
8
|
-
import { IEditor, ILayoutEditor, ILayoutSectionEditor, IPepLayoutBlockAddedEvent } from './layout-builder.model';
|
|
8
|
+
import { IEditor, ILayoutEditor, ILayoutSectionEditor, IPepLayoutBlockAddedEvent, IPepLayoutBlockConfig } from './layout-builder.model';
|
|
9
9
|
import { LayoutBuilderInternalService } from './layout-builder-internal.service';
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
export declare class PepLayoutBuilderComponent extends BaseDestroyerDirective implements OnInit {
|
|
@@ -19,8 +19,11 @@ export declare class PepLayoutBuilderComponent extends BaseDestroyerDirective im
|
|
|
19
19
|
private _availableBlocksForDrag;
|
|
20
20
|
set availableBlocksForDrag(value: Array<IPepDraggableItem>);
|
|
21
21
|
get availableBlocksForDrag(): Array<IPepDraggableItem>;
|
|
22
|
-
private
|
|
23
|
-
set
|
|
22
|
+
private _blocksLayoutConfig;
|
|
23
|
+
set blocksLayoutConfig(value: IPepLayoutBlockConfig);
|
|
24
|
+
private _blockEditorTitle;
|
|
25
|
+
set blockEditorTitle(value: string);
|
|
26
|
+
get blockEditorTitle(): string;
|
|
24
27
|
private _layoutEditorTitle;
|
|
25
28
|
set layoutEditorTitle(value: string);
|
|
26
29
|
get layoutEditorTitle(): string;
|
|
@@ -37,7 +40,7 @@ export declare class PepLayoutBuilderComponent extends BaseDestroyerDirective im
|
|
|
37
40
|
constructor(renderer: Renderer2, hostElement: ElementRef, translate: TranslateService, layoutBuilderInternalService: LayoutBuilderInternalService, pepAddonService: PepAddonService);
|
|
38
41
|
private setScreenWidth;
|
|
39
42
|
private updateViewportWidth;
|
|
40
|
-
private
|
|
43
|
+
private setEditorTitle;
|
|
41
44
|
private subscribeEvents;
|
|
42
45
|
ngOnInit(): void;
|
|
43
46
|
onResize(event: any): void;
|
|
@@ -47,5 +50,5 @@ export declare class PepLayoutBuilderComponent extends BaseDestroyerDirective im
|
|
|
47
50
|
onSectionEditorObjectChange(sectionEditor: ILayoutSectionEditor): void;
|
|
48
51
|
onNavigateBackFromEditor(): void;
|
|
49
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<PepLayoutBuilderComponent, never>;
|
|
50
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PepLayoutBuilderComponent, "pep-layout-builder", never, { "availableBlocksForDrag": "availableBlocksForDrag"; "
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PepLayoutBuilderComponent, "pep-layout-builder", never, { "availableBlocksForDrag": "availableBlocksForDrag"; "blocksLayoutConfig": "blocksLayoutConfig"; "blockEditorTitle": "blockEditorTitle"; "layoutEditorTitle": "layoutEditorTitle"; }, { "backClick": "backClick"; "editorChange": "editorChange"; "blockAdded": "blockAdded"; "blocksRemoved": "blocksRemoved"; }, never, ["[layout-editor-top-content]", "[layout-editor-bottom-content]", "[block-editor-content]", "[header-end-content]", "[layout-content]"], false>;
|
|
51
54
|
}
|
|
@@ -16,7 +16,11 @@ export interface IPepLayoutSectionColumn extends PageSectionColumn {
|
|
|
16
16
|
BlockContainer?: IPepLayoutBlockContainer;
|
|
17
17
|
}
|
|
18
18
|
export interface IPepLayoutBlockContainer extends PageBlockContainer {
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
export interface IPepLayoutBlockConfig {
|
|
21
|
+
navigateToEditorAfterBlockAdded?: boolean;
|
|
22
|
+
blocksLimitNumber?: number;
|
|
23
|
+
getBlockTitle?: (blockKey: string) => string;
|
|
20
24
|
}
|
|
21
25
|
export interface IPepLayoutBlockAddedEvent {
|
|
22
26
|
BlockKey: string;
|
|
@@ -9,6 +9,7 @@ export declare class PepLayoutBuilderService {
|
|
|
9
9
|
getCurrentScreenType(): DataViewScreenSize;
|
|
10
10
|
getIsHidden(hideIn: DataViewScreenSize[] | undefined, currentScreenType: DataViewScreenSize): boolean;
|
|
11
11
|
showSkeleton(show: boolean): void;
|
|
12
|
+
lockScreen(lock: boolean): void;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<PepLayoutBuilderService, never>;
|
|
13
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<PepLayoutBuilderService>;
|
|
14
15
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CdkDragEnd, CdkDragStart } from '@angular/cdk/drag-drop';
|
|
2
|
-
import {
|
|
2
|
+
import { AfterContentInit, ElementRef, Renderer2 } from '@angular/core';
|
|
3
3
|
import { OnInit, EventEmitter } from '@angular/core';
|
|
4
4
|
import { BaseDestroyerDirective } from '@pepperi-addons/ngx-lib';
|
|
5
5
|
import { IPepDraggableItem } from '@pepperi-addons/ngx-lib/draggable-items';
|
|
6
6
|
import { ILayoutEditor, PepLayoutSizeType } from '../layout-builder.model';
|
|
7
7
|
import { LayoutBuilderInternalService } from '../layout-builder-internal.service';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class PepLayoutEditorComponent extends BaseDestroyerDirective implements OnInit,
|
|
9
|
+
export declare class PepLayoutEditorComponent extends BaseDestroyerDirective implements OnInit, AfterContentInit {
|
|
10
10
|
private layoutBuilderInternalService;
|
|
11
11
|
private hostElement;
|
|
12
12
|
private renderer;
|
|
@@ -32,7 +32,7 @@ export declare class PepLayoutEditorComponent extends BaseDestroyerDirective imp
|
|
|
32
32
|
constructor(layoutBuilderInternalService: LayoutBuilderInternalService, hostElement: ElementRef, renderer: Renderer2);
|
|
33
33
|
private updateHostObject;
|
|
34
34
|
ngOnInit(): void;
|
|
35
|
-
|
|
35
|
+
ngAfterContentInit(): void;
|
|
36
36
|
onAddSectionClick(event: any): void;
|
|
37
37
|
isFullWidthChange(isChecked: boolean): void;
|
|
38
38
|
onMaxWidthChange(maxWidth: string): void;
|
|
@@ -2,7 +2,6 @@ import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
|
2
2
|
import { CdkDragEnd, CdkDragEnter, CdkDragExit, CdkDragStart } from '@angular/cdk/drag-drop';
|
|
3
3
|
import { DataViewScreenSize } from '@pepperi-addons/papi-sdk';
|
|
4
4
|
import { BaseDestroyerDirective } from '@pepperi-addons/ngx-lib';
|
|
5
|
-
import { IPepDraggableItem } from '@pepperi-addons/ngx-lib/draggable-items';
|
|
6
5
|
import { LayoutBuilderInternalService } from '../layout-builder-internal.service';
|
|
7
6
|
import { IPepLayoutBlockContainer } from '../layout-builder.model';
|
|
8
7
|
import * as i0 from "@angular/core";
|
|
@@ -23,7 +22,7 @@ export declare class SectionBlockComponent extends BaseDestroyerDirective implem
|
|
|
23
22
|
dragExited: EventEmitter<CdkDragExit>;
|
|
24
23
|
dragEntered: EventEmitter<CdkDragEnter>;
|
|
25
24
|
protected hideForCurrentScreenType: boolean;
|
|
26
|
-
protected
|
|
25
|
+
protected blockTitle: string;
|
|
27
26
|
constructor(layoutBuilderInternalService: LayoutBuilderInternalService);
|
|
28
27
|
private setIfHideForCurrentScreenType;
|
|
29
28
|
ngOnInit(): void;
|