@pepperi-addons/ngx-composite-lib 0.4.2-beta.67 → 0.4.2-beta.69
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-builder.component.mjs +31 -11
- package/esm2020/layout-builder/layout-builder.service.mjs +108 -83
- package/fesm2015/pepperi-addons-ngx-composite-lib-layout-builder.mjs +139 -95
- package/fesm2015/pepperi-addons-ngx-composite-lib-layout-builder.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-layout-builder.mjs +136 -93
- package/fesm2020/pepperi-addons-ngx-composite-lib-layout-builder.mjs.map +1 -1
- package/layout-builder/layout-builder.component.d.ts +8 -2
- package/layout-builder/layout-builder.service.d.ts +17 -12
- package/package.json +1 -1
- package/src/assets/i18n/en.ngx-composite-lib.json +2 -0
|
@@ -19,8 +19,13 @@ 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 _blocksLimitNumber;
|
|
23
|
+
set blocksLimitNumber(value: number);
|
|
24
|
+
private _layoutEditorTitle;
|
|
25
|
+
set layoutEditorTitle(value: string);
|
|
26
|
+
get layoutEditorTitle(): string;
|
|
22
27
|
backClick: EventEmitter<void>;
|
|
23
|
-
|
|
28
|
+
editorChange: EventEmitter<IEditor>;
|
|
24
29
|
blockAdded: EventEmitter<IPepLayoutBlockAddedEvent>;
|
|
25
30
|
blocksRemoved: EventEmitter<string[]>;
|
|
26
31
|
protected lockScreen: boolean;
|
|
@@ -32,6 +37,7 @@ export declare class PepLayoutBuilderComponent extends BaseDestroyerDirective im
|
|
|
32
37
|
constructor(renderer: Renderer2, hostElement: ElementRef, translate: TranslateService, layoutBuilderService: PepLayoutBuilderService, pepAddonService: PepAddonService);
|
|
33
38
|
private setScreenWidth;
|
|
34
39
|
private updateViewportWidth;
|
|
40
|
+
private setLayoutEditorTitle;
|
|
35
41
|
private subscribeEvents;
|
|
36
42
|
ngOnInit(): void;
|
|
37
43
|
onResize(event: any): void;
|
|
@@ -41,5 +47,5 @@ export declare class PepLayoutBuilderComponent extends BaseDestroyerDirective im
|
|
|
41
47
|
onSectionEditorObjectChange(sectionEditor: ILayoutSectionEditor): void;
|
|
42
48
|
onNavigateBackFromEditor(): void;
|
|
43
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<PepLayoutBuilderComponent, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PepLayoutBuilderComponent, "pep-layout-builder", never, { "availableBlocksForDrag": "availableBlocksForDrag"; }, { "backClick": "backClick"; "
|
|
50
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PepLayoutBuilderComponent, "pep-layout-builder", never, { "availableBlocksForDrag": "availableBlocksForDrag"; "blocksLimitNumber": "blocksLimitNumber"; "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>;
|
|
45
51
|
}
|
|
@@ -5,13 +5,16 @@ import { IPepDraggableItem } from "@pepperi-addons/ngx-lib/draggable-items";
|
|
|
5
5
|
import { DataViewScreenSize } from "@pepperi-addons/papi-sdk";
|
|
6
6
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
7
7
|
import { LayoutEditorType, IEditor, IPepLayoutBlockAddedEvent, ILayoutEditor, IPepLayoutSection, IPepLayoutSectionColumn, IPepLayoutView, ILayoutSectionEditor } from "./layout-builder.model";
|
|
8
|
+
import { PepDialogService } from "@pepperi-addons/ngx-lib/dialog";
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class PepLayoutBuilderService {
|
|
10
11
|
protected translate: TranslateService;
|
|
12
|
+
protected dialogService: PepDialogService;
|
|
11
13
|
static readonly AVAILABLE_BLOCKS_CONTAINER_ID = "availableBlocks";
|
|
12
14
|
static readonly MAIN_EDITOR_ID = "main";
|
|
13
15
|
private _defaultSectionTitle;
|
|
14
|
-
|
|
16
|
+
private _blocksLimitNumber;
|
|
17
|
+
setBlocksLimitNumber(value: number): void;
|
|
15
18
|
private _editorsBreadCrumb;
|
|
16
19
|
private _editMode;
|
|
17
20
|
get editMode(): boolean;
|
|
@@ -22,13 +25,13 @@ export declare class PepLayoutBuilderService {
|
|
|
22
25
|
get screenSizeChange$(): Observable<PepScreenSizeType>;
|
|
23
26
|
private _screenWidthSubject;
|
|
24
27
|
get screenWidthChange$(): Observable<string>;
|
|
25
|
-
|
|
28
|
+
private _editorSubject;
|
|
26
29
|
get editorChange$(): Observable<IEditor | null>;
|
|
27
30
|
private _sectionsColumnsDropListSubject;
|
|
28
31
|
get sectionsColumnsDropListChange$(): Observable<any[]>;
|
|
29
32
|
private _sectionsViewSubject;
|
|
30
33
|
get sectionsChange$(): Observable<IPepLayoutSection[]>;
|
|
31
|
-
|
|
34
|
+
protected _layoutViewSubject: BehaviorSubject<IPepLayoutView | null>;
|
|
32
35
|
get layoutViewChange$(): Observable<IPepLayoutView | null>;
|
|
33
36
|
private _draggingBlockKey;
|
|
34
37
|
get draggingBlockKey(): Observable<string>;
|
|
@@ -48,32 +51,33 @@ export declare class PepLayoutBuilderService {
|
|
|
48
51
|
get availableBlocksForDragMap(): ReadonlyMap<string, IPepDraggableItem>;
|
|
49
52
|
private _availableBlocksForDragMapSubject;
|
|
50
53
|
get availableBlocksForDragMapChange$(): Observable<ReadonlyMap<string, IPepDraggableItem>>;
|
|
51
|
-
constructor(translate: TranslateService);
|
|
54
|
+
constructor(translate: TranslateService, dialogService: PepDialogService);
|
|
52
55
|
private setEditableState;
|
|
53
56
|
private notifyLayoutViewChange;
|
|
54
57
|
private notifyBlockAdded;
|
|
55
58
|
private notifyBlocksRemoved;
|
|
56
59
|
private notifyEditorChange;
|
|
57
60
|
private notifyAvailableBlocksForDragMapChange;
|
|
61
|
+
private notifyPreviewModeChange;
|
|
62
|
+
private notifyLockScreen;
|
|
63
|
+
private notifySectionsColumnsDropListChange;
|
|
58
64
|
private updateLayoutEditorProperties;
|
|
59
65
|
private loadDefaultEditor;
|
|
60
66
|
private changeCurrentEditor;
|
|
61
|
-
private
|
|
67
|
+
private getEditorByType;
|
|
68
|
+
private getInternalBlockEditor;
|
|
62
69
|
private getSectionEditorTitle;
|
|
63
|
-
private
|
|
70
|
+
private getInternalSectionEditor;
|
|
64
71
|
private getSectionColumnByIdForEditor;
|
|
65
|
-
private setSectionsColumnsGap;
|
|
66
72
|
private getCssScreenWidh;
|
|
67
73
|
private getBlockContainerByBlockKey;
|
|
68
74
|
private changeCursorOnDragStart;
|
|
69
75
|
private changeCursorOnDragEnd;
|
|
70
76
|
/***********************************************************************************************/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
updateCurrentEditorTitle(title: string): void;
|
|
77
|
+
setSectionsColumnsDropListChange(sectionsColumnsDropList: any[]): void;
|
|
78
|
+
setLockScreen(value: boolean): void;
|
|
79
|
+
changePreviewMode(value: boolean): void;
|
|
75
80
|
setAvailableBlocksToDrag(availableBlocksForDrag: Array<IPepDraggableItem>): void;
|
|
76
|
-
private getBlockEditor;
|
|
77
81
|
getScreenType(size: PepScreenSizeType): DataViewScreenSize;
|
|
78
82
|
getSectionColumnKey(sectionKey?: string, index?: string): string;
|
|
79
83
|
getIsHidden(hideIn: DataViewScreenSize[] | undefined, currentScreenType: DataViewScreenSize): boolean;
|
|
@@ -89,6 +93,7 @@ export declare class PepLayoutBuilderService {
|
|
|
89
93
|
onSectionDragEnd(event: CdkDragEnd): void;
|
|
90
94
|
removeBlockFromSection(blockId: string): void;
|
|
91
95
|
hideBlock(sectionId: string, blockId: string, hideIn: DataViewScreenSize[]): void;
|
|
96
|
+
private getBlocksNumber;
|
|
92
97
|
onBlockDropped(event: CdkDragDrop<IPepLayoutSectionColumn, any, any>, sectionId: string): void;
|
|
93
98
|
onBlockDragStart(event: CdkDragStart): void;
|
|
94
99
|
onBlockDragEnd(event: CdkDragEnd): void;
|
package/package.json
CHANGED
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"PREVIEW": "Preview"
|
|
64
64
|
},
|
|
65
65
|
"MESSAGES": {
|
|
66
|
+
"DIALOG_NOTICE_TITLE": "Notice",
|
|
66
67
|
"DIALOG_INFO_TITLE": "Info",
|
|
67
68
|
"DIALOG_ERROR_TITLE": "Error",
|
|
68
69
|
"DIALOG_DELETE_TITLE": "Delete",
|
|
@@ -125,6 +126,7 @@
|
|
|
125
126
|
"SECTIONS_TITLE": "Sections",
|
|
126
127
|
"SPLIT_TITLE": "Split",
|
|
127
128
|
"ADD_SECTION": "Add Section",
|
|
129
|
+
"BLOCKS_COUNT_LIMIT_MESSAGE": "You exceeded your blocks number limit - please contact your administrator.",
|
|
128
130
|
"DELETE_SECTION_MSG": "This action will delete out of range content. This action is irreversible!",
|
|
129
131
|
"DELETE_SECTION_TITLE": "Caution",
|
|
130
132
|
"GENERAL": "General",
|