@pepperi-addons/ngx-composite-lib 0.4.2-beta.61 → 0.4.2-beta.63

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.
Files changed (57) hide show
  1. package/esm2020/generic-list/generic-list.component.mjs +2 -2
  2. package/esm2020/group-buttons-settings/group-buttons-settings.component.mjs +3 -3
  3. package/esm2020/layout-builder/hide-in/hide-in.component.mjs +54 -0
  4. package/esm2020/layout-builder/hide-in/hide-in.module.mjs +81 -0
  5. package/esm2020/layout-builder/layout/layout.component.mjs +190 -0
  6. package/esm2020/layout-builder/layout/layout.module.mjs +58 -0
  7. package/esm2020/layout-builder/layout-builder.component.mjs +188 -0
  8. package/esm2020/layout-builder/layout-builder.model.mjs +6 -0
  9. package/esm2020/layout-builder/layout-builder.module.mjs +129 -0
  10. package/esm2020/layout-builder/layout-builder.service.mjs +605 -0
  11. package/esm2020/layout-builder/layout-editor/layout-editor.component.mjs +156 -0
  12. package/esm2020/layout-builder/layout-editor/layout-editor.module.mjs +109 -0
  13. package/esm2020/layout-builder/pepperi-addons-ngx-composite-lib-layout-builder.mjs +5 -0
  14. package/esm2020/layout-builder/public-api.mjs +10 -0
  15. package/esm2020/layout-builder/section/section.component.mjs +313 -0
  16. package/esm2020/layout-builder/section/section.module.mjs +45 -0
  17. package/esm2020/layout-builder/section-block/section-block.component.mjs +109 -0
  18. package/esm2020/layout-builder/section-block/section-block.module.mjs +48 -0
  19. package/esm2020/layout-builder/section-editor/section-editor.component.mjs +191 -0
  20. package/esm2020/layout-builder/section-editor/section-editor.module.mjs +40 -0
  21. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.mjs +1 -1
  22. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.mjs.map +1 -1
  23. package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs +2 -2
  24. package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs.map +1 -1
  25. package/fesm2015/pepperi-addons-ngx-composite-lib-layout-builder.mjs +2206 -0
  26. package/fesm2015/pepperi-addons-ngx-composite-lib-layout-builder.mjs.map +1 -0
  27. package/fesm2020/pepperi-addons-ngx-composite-lib-generic-list.mjs +1 -1
  28. package/fesm2020/pepperi-addons-ngx-composite-lib-generic-list.mjs.map +1 -1
  29. package/fesm2020/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs +2 -2
  30. package/fesm2020/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs.map +1 -1
  31. package/fesm2020/pepperi-addons-ngx-composite-lib-layout-builder.mjs +2186 -0
  32. package/fesm2020/pepperi-addons-ngx-composite-lib-layout-builder.mjs.map +1 -0
  33. package/group-buttons-settings/group-buttons-settings.component.d.ts +1 -1
  34. package/layout-builder/hide-in/hide-in.component.d.ts +25 -0
  35. package/layout-builder/hide-in/hide-in.component.theme.scss +9 -0
  36. package/layout-builder/hide-in/hide-in.module.d.ts +20 -0
  37. package/layout-builder/index.d.ts +5 -0
  38. package/layout-builder/layout/layout.component.d.ts +49 -0
  39. package/layout-builder/layout/layout.module.d.ts +17 -0
  40. package/layout-builder/layout-builder.component.d.ts +45 -0
  41. package/layout-builder/layout-builder.component.theme.scss +56 -0
  42. package/layout-builder/layout-builder.model.d.ts +51 -0
  43. package/layout-builder/layout-builder.module.d.ts +32 -0
  44. package/layout-builder/layout-builder.service.d.ts +96 -0
  45. package/layout-builder/layout-editor/layout-editor.component.d.ts +49 -0
  46. package/layout-builder/layout-editor/layout-editor.module.d.ts +28 -0
  47. package/layout-builder/public-api.d.ts +6 -0
  48. package/layout-builder/section/section.component.d.ts +78 -0
  49. package/layout-builder/section/section.component.theme.scss +115 -0
  50. package/layout-builder/section/section.module.d.ts +14 -0
  51. package/layout-builder/section-block/section-block.component.d.ts +39 -0
  52. package/layout-builder/section-block/section-block.component.theme.scss +13 -0
  53. package/layout-builder/section-block/section-block.module.d.ts +13 -0
  54. package/layout-builder/section-editor/section-editor.component.d.ts +53 -0
  55. package/layout-builder/section-editor/section-editor.module.d.ts +13 -0
  56. package/package.json +9 -1
  57. package/src/assets/i18n/en.ngx-composite-lib.json +40 -2
@@ -0,0 +1,49 @@
1
+ import { ElementRef, Renderer2, OnInit, EventEmitter, TemplateRef } from '@angular/core';
2
+ import { CdkDragDrop, CdkDragEnd, CdkDragStart } from '@angular/cdk/drag-drop';
3
+ import { BaseDestroyerDirective, PepCustomizationService, PepLayoutService } from '@pepperi-addons/ngx-lib';
4
+ import { PepLayoutBuilderService } from '../layout-builder.service';
5
+ import { IPepLayoutSection, IPepLayoutView, PepLayoutSizeType } from '../layout-builder.model';
6
+ import { Observable } from 'rxjs';
7
+ import { DataViewScreenSize } from '@pepperi-addons/papi-sdk';
8
+ import * as i0 from "@angular/core";
9
+ export declare class PepLayoutComponent extends BaseDestroyerDirective implements OnInit {
10
+ customizationService: PepCustomizationService;
11
+ layoutService: PepLayoutService;
12
+ layoutBuilderService: PepLayoutBuilderService;
13
+ private hostElement;
14
+ private renderer;
15
+ skeletonContainer: ElementRef;
16
+ sectionsContainer: ElementRef;
17
+ private _layoutView;
18
+ set layoutView(value: IPepLayoutView);
19
+ get layoutView(): IPepLayoutView;
20
+ blockTemplate: TemplateRef<any> | undefined;
21
+ private _showSkeleton;
22
+ set showSkeleton(value: boolean);
23
+ get showSkeleton(): boolean;
24
+ layoutViewChange: EventEmitter<IPepLayoutView>;
25
+ private _horizontalSpacing;
26
+ set horizontalSpacing(value: PepLayoutSizeType | undefined);
27
+ get horizontalSpacing(): PepLayoutSizeType | undefined;
28
+ private _verticalSpacing;
29
+ set verticalSpacing(value: PepLayoutSizeType | undefined);
30
+ get verticalSpacing(): PepLayoutSizeType | undefined;
31
+ protected paddingInline: string;
32
+ protected sectionsGap: PepLayoutSizeType;
33
+ protected columnsGap: PepLayoutSizeType;
34
+ protected previewMode: boolean;
35
+ private _sectionsSubject;
36
+ protected get sections$(): Observable<IPepLayoutSection[]>;
37
+ protected screenType: DataViewScreenSize;
38
+ constructor(customizationService: PepCustomizationService, layoutService: PepLayoutService, layoutBuilderService: PepLayoutBuilderService, hostElement: ElementRef, renderer: Renderer2);
39
+ private convertLayoutSizeType;
40
+ private animateSkeleton;
41
+ private setLayoutDataProperties;
42
+ ngOnInit(): void;
43
+ getSectionsTemplateRows(): string;
44
+ onSectionDropped(event: CdkDragDrop<any[]>): void;
45
+ onDragStart(event: CdkDragStart): void;
46
+ onDragEnd(event: CdkDragEnd): void;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<PepLayoutComponent, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<PepLayoutComponent, "pep-layout", never, { "layoutView": "layoutView"; "blockTemplate": "blockTemplate"; "showSkeleton": "showSkeleton"; }, { "layoutViewChange": "layoutViewChange"; }, never, never, false>;
49
+ }
@@ -0,0 +1,17 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./layout.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/common/http";
5
+ import * as i4 from "@pepperi-addons/ngx-lib";
6
+ import * as i5 from "@pepperi-addons/ngx-lib/skeleton-loader";
7
+ import * as i6 from "@pepperi-addons/ngx-lib/remote-loader";
8
+ import * as i7 from "@pepperi-addons/ngx-lib/size-detector";
9
+ import * as i8 from "@pepperi-addons/ngx-lib/dialog";
10
+ import * as i9 from "@angular/cdk/drag-drop";
11
+ import * as i10 from "../section/section.module";
12
+ import * as i11 from "@ngx-translate/core";
13
+ export declare class PepLayoutModule {
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<PepLayoutModule, never>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PepLayoutModule, [typeof i1.PepLayoutComponent], [typeof i2.CommonModule, typeof i3.HttpClientModule, typeof i4.PepNgxLibModule, typeof i5.PepSkeletonLoaderModule, typeof i6.PepRemoteLoaderModule, typeof i7.PepSizeDetectorModule, typeof i8.PepDialogModule, typeof i9.DragDropModule, typeof i10.SectionModule, typeof i11.TranslateModule], [typeof i1.PepLayoutComponent]>;
16
+ static ɵinj: i0.ɵɵInjectorDeclaration<PepLayoutModule>;
17
+ }
@@ -0,0 +1,45 @@
1
+ import { ElementRef, Renderer2, OnInit, EventEmitter } from '@angular/core';
2
+ import { BaseDestroyerDirective, PepAddonService } from '@pepperi-addons/ngx-lib';
3
+ import { DataViewScreenSize } from '@pepperi-addons/papi-sdk';
4
+ import { TranslateService } from '@ngx-translate/core';
5
+ import { PepButton } from '@pepperi-addons/ngx-lib/button';
6
+ import { IPepSideBarStateChangeEvent } from '@pepperi-addons/ngx-lib/side-bar';
7
+ import { IPepDraggableItem } from '@pepperi-addons/ngx-lib/draggable-items';
8
+ import { IEditor, ILayoutEditor, ILayoutSectionEditor, IPepLayoutBlockAddedEvent } from './layout-builder.model';
9
+ import { PepLayoutBuilderService } from './layout-builder.service';
10
+ import * as i0 from "@angular/core";
11
+ export declare class PepLayoutBuilderComponent extends BaseDestroyerDirective implements OnInit {
12
+ private renderer;
13
+ private hostElement;
14
+ private translate;
15
+ private layoutBuilderService;
16
+ private pepAddonService;
17
+ layoutBuilderWrapper: ElementRef;
18
+ private sideBarComponent;
19
+ private _availableBlocksForDrag;
20
+ set availableBlocksForDrag(value: Array<IPepDraggableItem>);
21
+ get availableBlocksForDrag(): Array<IPepDraggableItem>;
22
+ backClick: EventEmitter<void>;
23
+ blockEditorChange: EventEmitter<string>;
24
+ blockAdded: EventEmitter<IPepLayoutBlockAddedEvent>;
25
+ blocksRemoved: EventEmitter<string[]>;
26
+ protected lockScreen: boolean;
27
+ protected previewMode: boolean;
28
+ protected currentEditor: IEditor | null;
29
+ protected viewportWidth: number;
30
+ protected screenTypes: Array<PepButton>;
31
+ protected selectedScreenType: DataViewScreenSize;
32
+ constructor(renderer: Renderer2, hostElement: ElementRef, translate: TranslateService, layoutBuilderService: PepLayoutBuilderService, pepAddonService: PepAddonService);
33
+ private setScreenWidth;
34
+ private updateViewportWidth;
35
+ private subscribeEvents;
36
+ ngOnInit(): void;
37
+ onResize(event: any): void;
38
+ togglePreviewMode(): void;
39
+ onSidebarStateChange(event: IPepSideBarStateChangeEvent): void;
40
+ onLayoutEditorObjectChange(pageEditor: ILayoutEditor): void;
41
+ onSectionEditorObjectChange(sectionEditor: ILayoutSectionEditor): void;
42
+ onNavigateBackFromEditor(): void;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<PepLayoutBuilderComponent, never>;
44
+ static ɵcmp: i0.ɵɵComponentDeclaration<PepLayoutBuilderComponent, "pep-layout-builder", never, { "availableBlocksForDrag": "availableBlocksForDrag"; }, { "backClick": "backClick"; "blockEditorChange": "blockEditorChange"; "blockAdded": "blockAdded"; "blocksRemoved": "blocksRemoved"; }, never, ["[layout-editor-top-content]", "[layout-editor-bottom-content]", "[block-editor-content]", "[header-end-content]", "pep-layout"], false>;
45
+ }
@@ -0,0 +1,56 @@
1
+ @use '@pepperi-addons/ngx-lib/src/core/style/abstracts/mixins' as ngx-mixins;
2
+ @use '@pepperi-addons/ngx-lib/src/core/style/abstracts/functions' as ngx-functions;
3
+
4
+ // set mat tab as fixed tab just on the editors
5
+ .layout-builder-editor-wrapper {
6
+ ::ng-deep {
7
+ .layout-builder-editor-tabs {
8
+ .mat-tab-header {
9
+ background: ngx-functions.get-pep-color(color-system-primary-invert, color-base);
10
+ }
11
+ }
12
+ }
13
+ }
14
+
15
+ .main-area-container {
16
+ background: ngx-functions.get-pep-color(color-system-primary, color-tran-10);
17
+
18
+ .header-container {
19
+ background: ngx-functions.get-pep-color(color-system-primary-invert, color-base);
20
+ box-shadow: ngx-functions.get-pep-shadow(shadow-sm, regular);
21
+
22
+ .header-title {
23
+ color: ngx-functions.get-pep-color(color-text, color-dimmed);
24
+ }
25
+
26
+ .size-limit-container {
27
+ @include ngx-mixins.state-weak-default();
28
+ }
29
+ }
30
+
31
+ &.preview-mode {
32
+ .header-container {
33
+ background: unset;
34
+ // box-shadow: unset;
35
+ background-color: ngx-functions.get-pep-color(color-text, color-caution);
36
+
37
+ .preview-title,
38
+ .color-link {
39
+ color: ngx-functions.get-pep-color(color-text, color-invert);
40
+ }
41
+ }
42
+
43
+ .layout-builder-wrapper {
44
+ overflow: auto;
45
+ }
46
+ }
47
+
48
+ .layout-builder-wrapper {
49
+ background: ngx-functions.get-pep-color(color-system-primary-invert, color-base);
50
+ box-shadow: ngx-functions.get-pep-shadow(shadow-md, regular);
51
+
52
+ .backdrop {
53
+ background: ngx-functions.get-pep-color(color-system-primary, color-tran-70);
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,51 @@
1
+ import { PageBlockContainer, PageLayout, PageSection, PageSectionColumn, PageSizeType, SplitType } from "@pepperi-addons/papi-sdk";
2
+ import { IPepDraggableItem } from "@pepperi-addons/ngx-lib/draggable-items";
3
+ export declare type PepLayoutSizeType = PageSizeType;
4
+ export interface IPepLayout extends PageLayout {
5
+ Sections: IPepLayoutSection[];
6
+ VerticalSpacing?: PepLayoutSizeType;
7
+ HorizontalSpacing?: PepLayoutSizeType;
8
+ SectionsGap?: PepLayoutSizeType;
9
+ ColumnsGap?: PepLayoutSizeType;
10
+ }
11
+ export interface IPepLayoutSection extends PageSection {
12
+ Columns: IPepLayoutSectionColumn[];
13
+ ColumnsGap?: PepLayoutSizeType;
14
+ }
15
+ export interface IPepLayoutSectionColumn extends PageSectionColumn {
16
+ BlockContainer?: IPepLayoutBlockContainer;
17
+ }
18
+ export interface IPepLayoutBlockContainer extends PageBlockContainer {
19
+ DraggableItemKey: string;
20
+ }
21
+ export interface IPepLayoutBlockAddedEvent {
22
+ BlockKey: string;
23
+ DraggableItem: IPepDraggableItem;
24
+ }
25
+ export interface IPepLayoutView {
26
+ Title: string;
27
+ Layout: IPepLayout;
28
+ }
29
+ export declare type LayoutEditorType = 'layout-builder' | 'section' | 'block';
30
+ export interface IEditor {
31
+ id: string;
32
+ title: string;
33
+ type: LayoutEditorType;
34
+ hostObject?: any;
35
+ }
36
+ export interface ILayoutEditor {
37
+ maxWidth: number;
38
+ horizontalSpacing?: PepLayoutSizeType;
39
+ verticalSpacing?: PepLayoutSizeType;
40
+ sectionsGap?: PepLayoutSizeType;
41
+ columnsGap?: PepLayoutSizeType;
42
+ roundedCorners?: PepLayoutSizeType;
43
+ }
44
+ export interface ILayoutSectionEditor {
45
+ id: string;
46
+ sectionName: string;
47
+ split: SplitType | undefined;
48
+ height: number;
49
+ collapseOnTablet: boolean;
50
+ fillHeight: boolean;
51
+ }
@@ -0,0 +1,32 @@
1
+ import { PepIconRegistry } from '@pepperi-addons/ngx-lib/icon';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "./layout-builder.component";
4
+ import * as i2 from "@angular/common";
5
+ import * as i3 from "@angular/cdk/drag-drop";
6
+ import * as i4 from "@angular/material/core";
7
+ import * as i5 from "@angular/material/tabs";
8
+ import * as i6 from "@pepperi-addons/ngx-lib";
9
+ import * as i7 from "@pepperi-addons/ngx-lib/dialog";
10
+ import * as i8 from "@pepperi-addons/ngx-lib/icon";
11
+ import * as i9 from "@pepperi-addons/ngx-lib/page-layout";
12
+ import * as i10 from "@pepperi-addons/ngx-lib/side-bar";
13
+ import * as i11 from "@pepperi-addons/ngx-lib/button";
14
+ import * as i12 from "@pepperi-addons/ngx-lib/checkbox";
15
+ import * as i13 from "@pepperi-addons/ngx-lib/textbox";
16
+ import * as i14 from "@pepperi-addons/ngx-lib/select";
17
+ import * as i15 from "@pepperi-addons/ngx-lib/size-detector";
18
+ import * as i16 from "@pepperi-addons/ngx-lib/group-buttons";
19
+ import * as i17 from "@pepperi-addons/ngx-lib/skeleton-loader";
20
+ import * as i18 from "@pepperi-addons/ngx-lib/draggable-items";
21
+ import * as i19 from "@pepperi-addons/ngx-composite-lib/group-buttons-settings";
22
+ import * as i20 from "./hide-in/hide-in.module";
23
+ import * as i21 from "./layout/layout.module";
24
+ import * as i22 from "./layout-editor/layout-editor.module";
25
+ import * as i23 from "./section-editor/section-editor.module";
26
+ export declare class PepLayoutBuilderModule {
27
+ private pepIconRegistry;
28
+ constructor(pepIconRegistry: PepIconRegistry);
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<PepLayoutBuilderModule, never>;
30
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PepLayoutBuilderModule, [typeof i1.PepLayoutBuilderComponent], [typeof i2.CommonModule, typeof i3.DragDropModule, typeof i4.MatCommonModule, typeof i5.MatTabsModule, typeof i6.PepNgxLibModule, typeof i7.PepDialogModule, typeof i8.PepIconModule, typeof i9.PepPageLayoutModule, typeof i10.PepSideBarModule, typeof i11.PepButtonModule, typeof i12.PepCheckboxModule, typeof i13.PepTextboxModule, typeof i14.PepSelectModule, typeof i15.PepSizeDetectorModule, typeof i16.PepGroupButtonsModule, typeof i17.PepSkeletonLoaderModule, typeof i18.PepDraggableItemsModule, typeof i19.PepGroupButtonsSettingsModule, typeof i20.PepHideInModule, typeof i21.PepLayoutModule, typeof i22.PepLayoutEditorModule, typeof i23.SectionEditorModule], [typeof i1.PepLayoutBuilderComponent, typeof i21.PepLayoutModule]>;
31
+ static ɵinj: i0.ɵɵInjectorDeclaration<PepLayoutBuilderModule>;
32
+ }
@@ -0,0 +1,96 @@
1
+ import { CdkDragDrop, CdkDragEnd, CdkDragStart } from "@angular/cdk/drag-drop";
2
+ import { TranslateService } from "@ngx-translate/core";
3
+ import { PepScreenSizeType } from "@pepperi-addons/ngx-lib";
4
+ import { IPepDraggableItem } from "@pepperi-addons/ngx-lib/draggable-items";
5
+ import { DataViewScreenSize } from "@pepperi-addons/papi-sdk";
6
+ import { Observable } from 'rxjs';
7
+ import { LayoutEditorType, IEditor, IPepLayoutBlockAddedEvent, ILayoutEditor, IPepLayoutSection, IPepLayoutSectionColumn, IPepLayoutView, ILayoutSectionEditor } from "./layout-builder.model";
8
+ import * as i0 from "@angular/core";
9
+ export declare class PepLayoutBuilderService {
10
+ private translate;
11
+ static readonly AVAILABLE_BLOCKS_CONTAINER_ID = "availableBlocks";
12
+ static readonly MAIN_EDITOR_ID = "main";
13
+ private _defaultSectionTitle;
14
+ set defaultSectionTitle(value: string);
15
+ private _editorsBreadCrumb;
16
+ isEditMode: boolean;
17
+ private _screenSizeSubject;
18
+ get screenSizeChange$(): Observable<PepScreenSizeType>;
19
+ private _screenWidthSubject;
20
+ get screenWidthChange$(): Observable<string>;
21
+ private _editorSubject;
22
+ get editorChange$(): Observable<IEditor | null>;
23
+ private _sectionsColumnsDropListSubject;
24
+ get sectionsColumnsDropListChange$(): Observable<any[]>;
25
+ private _sectionsViewSubject;
26
+ get sectionsChange$(): Observable<IPepLayoutSection[]>;
27
+ private _layoutViewSubject;
28
+ get layoutViewChange$(): Observable<IPepLayoutView | null>;
29
+ private _draggingBlockKey;
30
+ get draggingBlockKey(): Observable<string>;
31
+ private _draggingSectionKey;
32
+ get draggingSectionKey(): Observable<string>;
33
+ private _lockScreenSubject;
34
+ get lockScreenChange$(): Observable<boolean>;
35
+ private _previewModeSubject;
36
+ get previewModeChange$(): Observable<boolean>;
37
+ private _blockAddedEventSubject;
38
+ get blockAddedEventSubject$(): Observable<IPepLayoutBlockAddedEvent | null>;
39
+ private _blocksRemovedEventSubject;
40
+ get blocksRemovedEventSubject$(): Observable<string[]>;
41
+ private _showSkeletonSubject;
42
+ get showSkeletonChange$(): Observable<boolean>;
43
+ private _availableBlocksForDragMap;
44
+ get availableBlocksForDragMap(): ReadonlyMap<string, IPepDraggableItem>;
45
+ private _availableBlocksForDragMapSubject;
46
+ get availableBlocksForDragMapChange$(): Observable<ReadonlyMap<string, IPepDraggableItem>>;
47
+ isOffline: boolean;
48
+ constructor(translate: TranslateService);
49
+ private notifyLayoutViewChange;
50
+ private notifyBlockAdded;
51
+ private notifyBlocksRemoved;
52
+ private notifyEditorChange;
53
+ private notifyAvailableBlocksForDragMapChange;
54
+ private updateLayoutEditorProperties;
55
+ private loadDefaultEditor;
56
+ private changeCurrentEditor;
57
+ private getEditor;
58
+ private getSectionEditorTitle;
59
+ private getSectionEditor;
60
+ private getSectionColumnByIdForEditor;
61
+ private setSectionsColumnsGap;
62
+ private getCssScreenWidh;
63
+ private getBlockContainerByBlockKey;
64
+ private changeCursorOnDragStart;
65
+ private changeCursorOnDragEnd;
66
+ /***********************************************************************************************/
67
+ notifySectionsColumnsDropListChange(sectionsColumnsDropList: any[]): void;
68
+ notifyPreviewModeChange(value: boolean): void;
69
+ notifyLockScreen(value: boolean): void;
70
+ setAvailableBlocksToDrag(availableBlocksForDrag: Array<IPepDraggableItem>): void;
71
+ getBlockEditor(blockKey: string): IEditor;
72
+ getScreenType(size: PepScreenSizeType): DataViewScreenSize;
73
+ getSectionColumnKey(sectionKey?: string, index?: string): string;
74
+ getIsHidden(hideIn: DataViewScreenSize[] | undefined, currentScreenType: DataViewScreenSize): boolean;
75
+ navigateToEditor(editorType: LayoutEditorType, id: string): boolean;
76
+ navigateBackFromEditor(): void;
77
+ updateLayoutFromEditor(editorData: ILayoutEditor): void;
78
+ updateSectionFromEditor(sectionData: ILayoutSectionEditor): void;
79
+ addSection(section?: IPepLayoutSection | null): void;
80
+ removeSection(sectionId: string): void;
81
+ hideSection(sectionId: string, hideIn: DataViewScreenSize[]): void;
82
+ onSectionDropped(event: CdkDragDrop<any[]>): void;
83
+ onSectionDragStart(event: CdkDragStart): void;
84
+ onSectionDragEnd(event: CdkDragEnd): void;
85
+ removeBlockFromSection(blockId: string): void;
86
+ hideBlock(sectionId: string, blockId: string, hideIn: DataViewScreenSize[]): void;
87
+ onBlockDropped(event: CdkDragDrop<IPepLayoutSectionColumn, any, any>, sectionId: string): void;
88
+ onBlockDragStart(event: CdkDragStart): void;
89
+ onBlockDragEnd(event: CdkDragEnd): void;
90
+ doesColumnContainBlock(sectionId: string, columnIndex: number): boolean;
91
+ setScreenWidth(screenType: DataViewScreenSize): void;
92
+ showSkeleton(show: boolean): void;
93
+ loadLayoutBuilder(layoutView: IPepLayoutView): void;
94
+ static ɵfac: i0.ɵɵFactoryDeclaration<PepLayoutBuilderService, never>;
95
+ static ɵprov: i0.ɵɵInjectableDeclaration<PepLayoutBuilderService>;
96
+ }
@@ -0,0 +1,49 @@
1
+ import { CdkDragEnd, CdkDragStart } from '@angular/cdk/drag-drop';
2
+ import { AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
3
+ import { OnInit, EventEmitter } from '@angular/core';
4
+ import { BaseDestroyerDirective, PepCustomizationService } from '@pepperi-addons/ngx-lib';
5
+ import { IPepDraggableItem } from '@pepperi-addons/ngx-lib/draggable-items';
6
+ import { ILayoutEditor, PepLayoutSizeType } from '../layout-builder.model';
7
+ import { PepLayoutBuilderService } from '../layout-builder.service';
8
+ import * as i0 from "@angular/core";
9
+ export declare class PepLayoutEditorComponent extends BaseDestroyerDirective implements OnInit, AfterViewInit {
10
+ customizationService: PepCustomizationService;
11
+ layoutBuilderService: PepLayoutBuilderService;
12
+ private hostElement;
13
+ private renderer;
14
+ _topContentRef: ElementRef;
15
+ _bottomContentRef: ElementRef;
16
+ availableBlocksContainer: ElementRef;
17
+ availableBlocksForDrag: Array<IPepDraggableItem>;
18
+ private _hostObject;
19
+ set hostObject(value: ILayoutEditor);
20
+ get hostObject(): ILayoutEditor;
21
+ hostObjectChange: EventEmitter<ILayoutEditor>;
22
+ protected isFullWidth: boolean;
23
+ protected maxWidth: number;
24
+ protected horizontalSpacing: PepLayoutSizeType;
25
+ protected verticalSpacing: PepLayoutSizeType;
26
+ protected sectionsGap: PepLayoutSizeType;
27
+ protected columnsGap: PepLayoutSizeType;
28
+ protected roundedCorners: PepLayoutSizeType;
29
+ protected availableBlocksContainerId: string;
30
+ protected sectionsColumnsDropList: never[];
31
+ protected showTopContent: boolean;
32
+ protected showBottomContent: boolean;
33
+ constructor(customizationService: PepCustomizationService, layoutBuilderService: PepLayoutBuilderService, hostElement: ElementRef, renderer: Renderer2);
34
+ private updateHostObject;
35
+ ngOnInit(): void;
36
+ ngAfterViewInit(): void;
37
+ onAddSectionClick(event: any): void;
38
+ isFullWidthChange(isChecked: boolean): void;
39
+ onMaxWidthChange(maxWidth: string): void;
40
+ setColumnsHorizntalGap(key: string): void;
41
+ setColumnsVerticalGap(key: string): void;
42
+ setSectionGap(key: string): void;
43
+ setColumnsGap(key: string): void;
44
+ setRoundedCorners(key: string): void;
45
+ onDragStart(event: CdkDragStart): void;
46
+ onDragEnd(event: CdkDragEnd): void;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<PepLayoutEditorComponent, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<PepLayoutEditorComponent, "pep-layout-editor", never, { "availableBlocksForDrag": "availableBlocksForDrag"; "hostObject": "hostObject"; }, { "hostObjectChange": "hostObjectChange"; }, never, ["[layout-editor-top-content]", "[layout-editor-bottom-content]"], false>;
49
+ }
@@ -0,0 +1,28 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./layout-editor.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/common/http";
5
+ import * as i4 from "@pepperi-addons/ngx-lib";
6
+ import * as i5 from "@pepperi-addons/ngx-lib/remote-loader";
7
+ import * as i6 from "@pepperi-addons/ngx-lib/select";
8
+ import * as i7 from "@pepperi-addons/ngx-lib/textbox";
9
+ import * as i8 from "@angular/cdk/drag-drop";
10
+ import * as i9 from "@angular/cdk/overlay";
11
+ import * as i10 from "@angular/material/tabs";
12
+ import * as i11 from "@pepperi-addons/ngx-lib/button";
13
+ import * as i12 from "@pepperi-addons/ngx-lib/checkbox";
14
+ import * as i13 from "@pepperi-addons/ngx-lib/group-buttons";
15
+ import * as i14 from "@pepperi-addons/ngx-lib/color";
16
+ import * as i15 from "@pepperi-addons/ngx-lib/image";
17
+ import * as i16 from "@pepperi-addons/ngx-composite-lib/group-buttons-settings";
18
+ import * as i17 from "@pepperi-addons/ngx-lib/draggable-items";
19
+ import * as i18 from "@pepperi-addons/ngx-lib/dialog";
20
+ import * as i19 from "@angular/material/slider";
21
+ import * as i20 from "@pepperi-addons/ngx-lib/textarea";
22
+ import * as i21 from "../section-editor/section-editor.module";
23
+ export declare class PepLayoutEditorModule {
24
+ constructor();
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<PepLayoutEditorModule, never>;
26
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PepLayoutEditorModule, [typeof i1.PepLayoutEditorComponent], [typeof i2.CommonModule, typeof i3.HttpClientModule, typeof i4.PepNgxLibModule, typeof i5.PepRemoteLoaderModule, typeof i6.PepSelectModule, typeof i7.PepTextboxModule, typeof i8.DragDropModule, typeof i9.OverlayModule, typeof i10.MatTabsModule, typeof i11.PepButtonModule, typeof i12.PepCheckboxModule, typeof i13.PepGroupButtonsModule, typeof i14.PepColorModule, typeof i15.PepImageModule, typeof i16.PepGroupButtonsSettingsModule, typeof i17.PepDraggableItemsModule, typeof i18.PepDialogModule, typeof i19.MatSliderModule, typeof i20.PepTextareaModule, typeof i21.SectionEditorModule], [typeof i1.PepLayoutEditorComponent]>;
27
+ static ɵinj: i0.ɵɵInjectorDeclaration<PepLayoutEditorModule>;
28
+ }
@@ -0,0 +1,6 @@
1
+ export * from './layout-builder.module';
2
+ export * from './layout-builder.model';
3
+ export * from './layout-builder.service';
4
+ export * from './layout-builder.component';
5
+ export * from './layout/layout.module';
6
+ export * from './layout/layout.component';
@@ -0,0 +1,78 @@
1
+ import { ElementRef, OnInit, QueryList, Renderer2, TemplateRef } from '@angular/core';
2
+ import { CdkDrag, CdkDragDrop, CdkDragEnd, CdkDragEnter, CdkDragExit, CdkDragStart, CdkDropList } from '@angular/cdk/drag-drop';
3
+ import { DataViewScreenSize, SplitType } from '@pepperi-addons/papi-sdk';
4
+ import { BaseDestroyerDirective, PepLayoutService, PepScreenSizeType } from '@pepperi-addons/ngx-lib';
5
+ import { PepLayoutBuilderService } from '../layout-builder.service';
6
+ import { IPepLayoutSectionColumn, PepLayoutSizeType } from '../layout-builder.model';
7
+ import * as i0 from "@angular/core";
8
+ export declare class SectionComponent extends BaseDestroyerDirective implements OnInit {
9
+ private renderer;
10
+ private layoutBuilderService;
11
+ private layoutService;
12
+ sectionContainerRef: ElementRef;
13
+ columnsElementRef: QueryList<ElementRef>;
14
+ blockTemplate: TemplateRef<any> | undefined;
15
+ key: string;
16
+ name: string;
17
+ private _split;
18
+ set split(value: SplitType | undefined);
19
+ get split(): SplitType | undefined;
20
+ private _height;
21
+ set height(value: number | undefined);
22
+ get height(): number | undefined;
23
+ private _collapseOnTablet;
24
+ set collapseOnTablet(value: boolean);
25
+ get collapseOnTablet(): boolean;
26
+ private _columns;
27
+ set columns(value: Array<IPepLayoutSectionColumn>);
28
+ get columns(): Array<IPepLayoutSectionColumn>;
29
+ private _hideIn;
30
+ set hideIn(value: DataViewScreenSize[]);
31
+ get hideIn(): DataViewScreenSize[];
32
+ columnsGap: PepLayoutSizeType;
33
+ styleMaxHeight: string;
34
+ styleHeight: string;
35
+ protected sectionsColumnsDropList: string[];
36
+ private _editable;
37
+ protected set editable(value: boolean);
38
+ protected get editable(): boolean;
39
+ private _screenSize;
40
+ protected set screenSize(value: PepScreenSizeType);
41
+ protected get screenSize(): PepScreenSizeType;
42
+ protected sectionColumnKeyPrefix: string;
43
+ protected isMainEditorState: boolean;
44
+ protected isEditing: boolean;
45
+ protected selectedSectionKey: string;
46
+ protected selectedBlockKey: string;
47
+ protected containsBlocks: boolean;
48
+ protected shouldSetDefaultHeight: boolean;
49
+ protected pepScreenSizeToFlipToVertical: PepScreenSizeType;
50
+ protected screenType: DataViewScreenSize;
51
+ protected hideForCurrentScreenType: boolean;
52
+ protected draggingBlockKey: string;
53
+ protected draggingSectionKey: string;
54
+ protected hoverState: boolean;
55
+ constructor(renderer: Renderer2, layoutBuilderService: PepLayoutBuilderService, layoutService: PepLayoutService);
56
+ private calculateIfSectionContainsBlocks;
57
+ private setScreenType;
58
+ private setIfHideForCurrentScreenType;
59
+ private getCssSplitString;
60
+ private refreshSplit;
61
+ private setStyleHeight;
62
+ getIsDragging(): boolean;
63
+ getIsHidden(hideIn: DataViewScreenSize[] | undefined, currentScreenType: DataViewScreenSize): boolean;
64
+ ngOnInit(): void;
65
+ onEditSectionClick(): void;
66
+ onRemoveSectionClick(): void;
67
+ onHideSectionChange(hideIn: DataViewScreenSize[]): void;
68
+ onHideInMenuOpened(): void;
69
+ onHideInMenuClosed(): void;
70
+ onBlockDropped(event: CdkDragDrop<IPepLayoutSectionColumn, any, any>): void;
71
+ canDropPredicate(columnIndex: number): (drag: CdkDrag, drop: CdkDropList) => boolean;
72
+ onDragStart(event: CdkDragStart): void;
73
+ onDragEnd(event: CdkDragEnd): void;
74
+ onSectionBlockDragExited(event: CdkDragExit): void;
75
+ onSectionBlockDragEntered(event: CdkDragEnter): void;
76
+ static ɵfac: i0.ɵɵFactoryDeclaration<SectionComponent, never>;
77
+ static ɵcmp: i0.ɵɵComponentDeclaration<SectionComponent, "section", never, { "blockTemplate": "blockTemplate"; "key": "key"; "name": "name"; "split": "split"; "height": "height"; "collapseOnTablet": "collapseOnTablet"; "columns": "columns"; "hideIn": "hideIn"; "columnsGap": "columnsGap"; }, {}, never, never, false>;
78
+ }
@@ -0,0 +1,115 @@
1
+ @use '@pepperi-addons/ngx-lib/src/core/style/abstracts/mixins' as ngx-mixins;
2
+ @use '@pepperi-addons/ngx-lib/src/core/style/abstracts/functions' as ngx-functions;
3
+
4
+ @use '../mixins.scss' as mix;
5
+
6
+ .section-container {
7
+ // background: ngx-functions.get-pep-color(color-system-primary-invert, color-base);
8
+ background: transparent;
9
+
10
+ // This css is only for edit mode.
11
+ &.editable-state {
12
+ $color-caution: ngx-functions.get-pep-color(color-text, color-caution);
13
+ $color-system-primary: ngx-functions.get-pep-color(color-system-primary, color-base);
14
+
15
+ &.active-section {
16
+ background: ngx-functions.get-pep-color(color-system-primary-invert, color-base);
17
+ @include ngx-mixins.focus();
18
+
19
+ .columns-wrapper {
20
+ background: ngx-functions.get-pep-color(color-system-primary-invert, color-base);
21
+ }
22
+ }
23
+
24
+ // For section hidden state
25
+ &.section-hidden-state {
26
+ // If the current section is not active (his editor after edit click)
27
+ &:not(.active-section) {
28
+ @include ngx-mixins.pep-cross-hatch();
29
+ }
30
+ }
31
+
32
+ // Only in main editor state show focus colors.
33
+ &.main-editor-state {
34
+ &.cdk-drag-preview {
35
+ @include ngx-mixins.focus(false, $color-caution, mix.$border-width);
36
+ }
37
+
38
+ &.cdk-drag-placeholder {
39
+ @include ngx-mixins.focus();
40
+
41
+ &:hover,
42
+ &.show-hover-state {
43
+ @include ngx-mixins.focus(true);
44
+ }
45
+ }
46
+
47
+ &:hover,
48
+ &.show-hover-state {
49
+ &:not(.section-is-dragging) {
50
+ @include ngx-mixins.focus(false, $color-caution, mix.$border-width);
51
+ }
52
+ }
53
+
54
+ .section-toolbar {
55
+ ::ng-deep.pep-draggable-item-container {
56
+ @include ngx-mixins.focus(false, $color-caution, mix.$border-width);
57
+ }
58
+ }
59
+ }
60
+
61
+ .section-background {
62
+ .back-template {
63
+ background-color: #BEC3E5;
64
+ @include mix.dash-border(border-right, mix.$border-width, $color-system-primary);
65
+ }
66
+ }
67
+
68
+ .columns-wrapper {
69
+ .section-column {
70
+ @include mix.dash-border(border, mix.$border-width, $color-system-primary);
71
+
72
+ &.active-column {
73
+ background: ngx-functions.get-pep-color(color-system-primary-invert, color-base);
74
+ }
75
+
76
+ // &.cdk-drop-list-receivin - can recive block
77
+ // &.cdk-drop-list-dragging - the block is dragging on this area.
78
+ &.cdk-drop-list-dragging {
79
+ @include ngx-mixins.focus();
80
+ }
81
+
82
+ // When section column already contains block show on hover caution focus.
83
+ &.already-contains-block {
84
+ &:hover {
85
+ @include ngx-mixins.focus(false, $color-caution);
86
+ }
87
+ }
88
+ }
89
+
90
+ // Only if there is no gap remove the double border.
91
+ &.gap-none {
92
+ .section-column {
93
+ // Remove the border for no dupplicate.
94
+ &:not(&:first-of-type) {
95
+ &.horizontal {
96
+ border-left: unset;
97
+
98
+ &.cdk-drop-list-dragging {
99
+ @include mix.dash-border(border-left, mix.$border-width, $color-system-primary);
100
+ }
101
+ }
102
+
103
+ &.vertical {
104
+ border-top: unset;
105
+
106
+ &.cdk-drop-list-dragging {
107
+ @include mix.dash-border(border-top, mix.$border-width, $color-system-primary);
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,14 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./section.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/cdk/drag-drop";
5
+ import * as i4 from "@pepperi-addons/ngx-lib/button";
6
+ import * as i5 from "@pepperi-addons/ngx-lib/remote-loader";
7
+ import * as i6 from "../section-block/section-block.module";
8
+ import * as i7 from "../hide-in/hide-in.module";
9
+ import * as i8 from "@pepperi-addons/ngx-lib/draggable-items";
10
+ export declare class SectionModule {
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SectionModule, never>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SectionModule, [typeof i1.SectionComponent], [typeof i2.CommonModule, typeof i3.DragDropModule, typeof i4.PepButtonModule, typeof i5.PepRemoteLoaderModule, typeof i6.SectionBlockModule, typeof i7.PepHideInModule, typeof i8.PepDraggableItemsModule], [typeof i1.SectionComponent]>;
13
+ static ɵinj: i0.ɵɵInjectorDeclaration<SectionModule>;
14
+ }