@pepperi-addons/ngx-composite-lib 0.4.2-beta.7 → 0.4.2-beta.70
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/color-settings/color-settings.component.d.ts +3 -2
- package/core/common/services/dimx.service.d.ts +4 -0
- package/esm2020/color-settings/color-settings.component.mjs +6 -3
- package/esm2020/core/common/directives/reset-configuration-field.directive.mjs +5 -4
- package/esm2020/core/common/services/dimx.service.mjs +1 -1
- package/esm2020/file-status-panel/file-status-panel.module.mjs +23 -3
- package/esm2020/flow-picker-button/flow-picker-button.component.mjs +94 -0
- package/esm2020/flow-picker-button/flow-picker-button.module.mjs +36 -0
- package/esm2020/flow-picker-button/flow-picker-button.service.mjs +21 -0
- package/esm2020/flow-picker-button/pepperi-addons-ngx-composite-lib-flow-picker-button.mjs +5 -0
- package/esm2020/flow-picker-button/public-api.mjs +6 -0
- package/esm2020/generic-list/generic-list.component.mjs +64 -7
- package/esm2020/generic-list/generic-list.service.mjs +6 -2
- package/esm2020/group-buttons-settings/group-buttons-settings.component.mjs +17 -4
- package/esm2020/group-buttons-settings/group-buttons-settings.model.mjs +1 -1
- package/esm2020/icon-picker/icon-picker.component.mjs +79 -0
- package/esm2020/icon-picker/icon-picker.module.mjs +44 -0
- package/esm2020/icon-picker/icon-picker.service.mjs +17 -0
- package/esm2020/icon-picker/pepperi-addons-ngx-composite-lib-icon-picker.mjs +5 -0
- package/esm2020/icon-picker/public-api.mjs +6 -0
- package/esm2020/layout-builder/hide-in/hide-in.component.mjs +54 -0
- package/esm2020/layout-builder/hide-in/hide-in.module.mjs +81 -0
- package/esm2020/layout-builder/layout/layout.component.mjs +204 -0
- package/esm2020/layout-builder/layout/layout.module.mjs +58 -0
- package/esm2020/layout-builder/layout-builder-internal.service.mjs +655 -0
- package/esm2020/layout-builder/layout-builder.component.mjs +205 -0
- package/esm2020/layout-builder/layout-builder.model.mjs +6 -0
- package/esm2020/layout-builder/layout-builder.module.mjs +136 -0
- package/esm2020/layout-builder/layout-builder.service.mjs +33 -0
- package/esm2020/layout-builder/layout-editor/layout-editor.component.mjs +156 -0
- package/esm2020/layout-builder/layout-editor/layout-editor.module.mjs +109 -0
- package/esm2020/layout-builder/pepperi-addons-ngx-composite-lib-layout-builder.mjs +5 -0
- package/esm2020/layout-builder/public-api.mjs +10 -0
- package/esm2020/layout-builder/section/section.component.mjs +298 -0
- package/esm2020/layout-builder/section/section.module.mjs +45 -0
- package/esm2020/layout-builder/section-block/section-block.component.mjs +109 -0
- package/esm2020/layout-builder/section-block/section-block.module.mjs +48 -0
- package/esm2020/layout-builder/section-editor/section-editor.component.mjs +191 -0
- package/esm2020/layout-builder/section-editor/section-editor.module.mjs +40 -0
- package/esm2020/manage-parameters/manage-parameter/manage-parameter.component.mjs +82 -0
- package/esm2020/manage-parameters/manage-parameters.component.mjs +153 -0
- package/esm2020/manage-parameters/manage-parameters.model.mjs +24 -0
- package/esm2020/manage-parameters/manage-parameters.module.mjs +45 -0
- package/esm2020/manage-parameters/manage-parameters.service.mjs +142 -0
- package/esm2020/manage-parameters/pepperi-addons-ngx-composite-lib-manage-parameters.mjs +5 -0
- package/esm2020/manage-parameters/public-api.mjs +8 -0
- package/esm2020/rich-text/pepperi-addons-ngx-composite-lib-rich-text.mjs +5 -0
- package/esm2020/rich-text/public-api.mjs +6 -0
- package/esm2020/rich-text/rich-text.component.mjs +154 -0
- package/esm2020/rich-text/rich-text.module.mjs +52 -0
- package/esm2020/rich-text/rich-text.service.mjs +21 -0
- package/esm2020/shadow-settings/shadow-settings.component.mjs +7 -4
- package/esm2020/show-if-badge/pepperi-addons-ngx-composite-lib-show-if-badge.mjs +5 -0
- package/esm2020/show-if-badge/public-api.mjs +6 -0
- package/esm2020/show-if-badge/show-if-badge.component.mjs +44 -0
- package/esm2020/show-if-badge/show-if-badge.module.mjs +50 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.mjs +5 -2
- package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.mjs +22 -3
- package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-flow-picker-button.mjs +161 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-flow-picker-button.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.mjs +70 -7
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs +16 -3
- package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-icon-picker.mjs +146 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-icon-picker.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-layout-builder.mjs +2307 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-layout-builder.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-manage-parameters.mjs +441 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-manage-parameters.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-rich-text.mjs +234 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-rich-text.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-shadow-settings.mjs +6 -3
- package/fesm2015/pepperi-addons-ngx-composite-lib-shadow-settings.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-show-if-badge.mjs +100 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-show-if-badge.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib.mjs +4 -3
- package/fesm2015/pepperi-addons-ngx-composite-lib.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-color-settings.mjs +5 -2
- package/fesm2020/pepperi-addons-ngx-composite-lib-color-settings.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-file-status-panel.mjs +22 -3
- package/fesm2020/pepperi-addons-ngx-composite-lib-file-status-panel.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-flow-picker-button.mjs +155 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-flow-picker-button.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-generic-list.mjs +68 -7
- package/fesm2020/pepperi-addons-ngx-composite-lib-generic-list.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs +16 -3
- package/fesm2020/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-icon-picker.mjs +145 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-icon-picker.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-layout-builder.mjs +2286 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-layout-builder.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-manage-parameters.mjs +438 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-manage-parameters.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-rich-text.mjs +230 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-rich-text.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-shadow-settings.mjs +6 -3
- package/fesm2020/pepperi-addons-ngx-composite-lib-shadow-settings.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-show-if-badge.mjs +100 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-show-if-badge.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib.mjs +4 -3
- package/fesm2020/pepperi-addons-ngx-composite-lib.mjs.map +1 -1
- package/flow-picker-button/flow-picker-button.component.d.ts +27 -0
- package/flow-picker-button/flow-picker-button.module.d.ts +11 -0
- package/flow-picker-button/flow-picker-button.service.d.ts +9 -0
- package/flow-picker-button/index.d.ts +5 -0
- package/flow-picker-button/public-api.d.ts +2 -0
- package/generic-list/generic-list.component.d.ts +17 -5
- package/generic-list/generic-list.service.d.ts +2 -1
- package/group-buttons-settings/group-buttons-settings.component.d.ts +5 -2
- package/group-buttons-settings/group-buttons-settings.model.d.ts +1 -1
- package/icon-picker/icon-picker.component.d.ts +24 -0
- package/icon-picker/icon-picker.module.d.ts +13 -0
- package/icon-picker/icon-picker.service.d.ts +8 -0
- package/icon-picker/index.d.ts +5 -0
- package/icon-picker/public-api.d.ts +2 -0
- package/layout-builder/hide-in/hide-in.component.d.ts +25 -0
- package/layout-builder/hide-in/hide-in.component.theme.scss +9 -0
- package/layout-builder/hide-in/hide-in.module.d.ts +20 -0
- package/layout-builder/index.d.ts +5 -0
- package/layout-builder/layout/layout.component.d.ts +51 -0
- package/layout-builder/layout/layout.module.d.ts +17 -0
- package/layout-builder/layout-builder-internal.service.d.ts +107 -0
- package/layout-builder/layout-builder.component.d.ts +51 -0
- package/layout-builder/layout-builder.component.theme.scss +56 -0
- package/layout-builder/layout-builder.model.d.ts +51 -0
- package/layout-builder/layout-builder.module.d.ts +32 -0
- package/layout-builder/layout-builder.service.d.ts +14 -0
- package/layout-builder/layout-editor/layout-editor.component.d.ts +49 -0
- package/layout-builder/layout-editor/layout-editor.module.d.ts +28 -0
- package/layout-builder/public-api.d.ts +6 -0
- package/layout-builder/section/section.component.d.ts +76 -0
- package/layout-builder/section/section.component.theme.scss +115 -0
- package/layout-builder/section/section.module.d.ts +14 -0
- package/layout-builder/section-block/section-block.component.d.ts +39 -0
- package/layout-builder/section-block/section-block.component.theme.scss +13 -0
- package/layout-builder/section-block/section-block.module.d.ts +13 -0
- package/layout-builder/section-editor/section-editor.component.d.ts +53 -0
- package/layout-builder/section-editor/section-editor.module.d.ts +13 -0
- package/manage-parameters/index.d.ts +5 -0
- package/manage-parameters/manage-parameter/manage-parameter.component.d.ts +28 -0
- package/manage-parameters/manage-parameters.component.d.ts +33 -0
- package/manage-parameters/manage-parameters.model.d.ts +21 -0
- package/manage-parameters/manage-parameters.module.d.ts +14 -0
- package/manage-parameters/manage-parameters.service.d.ts +16 -0
- package/manage-parameters/public-api.d.ts +3 -0
- package/package.json +50 -2
- package/rich-text/index.d.ts +5 -0
- package/rich-text/public-api.d.ts +2 -0
- package/rich-text/rich-text.component.d.ts +43 -0
- package/rich-text/rich-text.module.d.ts +16 -0
- package/rich-text/rich-text.service.d.ts +9 -0
- package/shadow-settings/shadow-settings.component.d.ts +2 -1
- package/show-if-badge/index.d.ts +5 -0
- package/show-if-badge/public-api.d.ts +2 -0
- package/show-if-badge/show-if-badge.component.d.ts +20 -0
- package/show-if-badge/show-if-badge.module.d.ts +16 -0
- package/src/assets/i18n/en.ngx-composite-lib.json +77 -4
- package/src/assets/images/brand-leaf-full@1x.png +0 -0
- package/src/assets/images/brand-leaf-full@2x.png +0 -0
- package/src/assets/images/brand-leaf-round.png +0 -0
- package/src/assets/images/brand-leaf-round@2x.png +0 -0
- package/src/assets/images/brand-leaf-skiny@1x.png +0 -0
- package/src/assets/images/brand-leaf-skiny@2x.png +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
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 { LayoutBuilderInternalService } from './layout-builder-internal.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
|
+
private _blocksLimitNumber;
|
|
23
|
+
set blocksLimitNumber(value: number);
|
|
24
|
+
private _layoutEditorTitle;
|
|
25
|
+
set layoutEditorTitle(value: string);
|
|
26
|
+
get layoutEditorTitle(): string;
|
|
27
|
+
backClick: EventEmitter<void>;
|
|
28
|
+
editorChange: EventEmitter<IEditor>;
|
|
29
|
+
blockAdded: EventEmitter<IPepLayoutBlockAddedEvent>;
|
|
30
|
+
blocksRemoved: EventEmitter<string[]>;
|
|
31
|
+
protected lockScreen: boolean;
|
|
32
|
+
protected previewMode: boolean;
|
|
33
|
+
protected currentEditor: IEditor | null;
|
|
34
|
+
protected viewportWidth: number;
|
|
35
|
+
protected screenTypes: Array<PepButton>;
|
|
36
|
+
protected selectedScreenType: DataViewScreenSize;
|
|
37
|
+
constructor(renderer: Renderer2, hostElement: ElementRef, translate: TranslateService, layoutBuilderService: LayoutBuilderInternalService, pepAddonService: PepAddonService);
|
|
38
|
+
private setScreenWidth;
|
|
39
|
+
private updateViewportWidth;
|
|
40
|
+
private setLayoutEditorTitle;
|
|
41
|
+
private subscribeEvents;
|
|
42
|
+
ngOnInit(): void;
|
|
43
|
+
onResize(event: any): void;
|
|
44
|
+
togglePreviewMode(): void;
|
|
45
|
+
onSidebarStateChange(event: IPepSideBarStateChangeEvent): void;
|
|
46
|
+
onLayoutEditorObjectChange(pageEditor: ILayoutEditor): void;
|
|
47
|
+
onSectionEditorObjectChange(sectionEditor: ILayoutSectionEditor): void;
|
|
48
|
+
onNavigateBackFromEditor(): void;
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PepLayoutBuilderComponent, never>;
|
|
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>;
|
|
51
|
+
}
|
|
@@ -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,14 @@
|
|
|
1
|
+
import { DataViewScreenSize } from "@pepperi-addons/papi-sdk";
|
|
2
|
+
import { LayoutBuilderInternalService } from "./layout-builder-internal.service";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class PepLayoutBuilderService {
|
|
5
|
+
private layoutBuilderInternalService;
|
|
6
|
+
get editMode(): boolean;
|
|
7
|
+
get editableState(): boolean;
|
|
8
|
+
constructor(layoutBuilderInternalService: LayoutBuilderInternalService);
|
|
9
|
+
getCurrentScreenType(): DataViewScreenSize;
|
|
10
|
+
getIsHidden(hideIn: DataViewScreenSize[] | undefined, currentScreenType: DataViewScreenSize): boolean;
|
|
11
|
+
showSkeleton(show: boolean): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PepLayoutBuilderService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PepLayoutBuilderService>;
|
|
14
|
+
}
|
|
@@ -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 { LayoutBuilderInternalService } from '../layout-builder-internal.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class PepLayoutEditorComponent extends BaseDestroyerDirective implements OnInit, AfterViewInit {
|
|
10
|
+
customizationService: PepCustomizationService;
|
|
11
|
+
layoutBuilderService: LayoutBuilderInternalService;
|
|
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: LayoutBuilderInternalService, 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,76 @@
|
|
|
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 { LayoutBuilderInternalService } from '../layout-builder-internal.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
|
+
protected get editable(): boolean;
|
|
37
|
+
private _screenSize;
|
|
38
|
+
protected set screenSize(value: PepScreenSizeType);
|
|
39
|
+
protected get screenSize(): PepScreenSizeType;
|
|
40
|
+
protected sectionColumnKeyPrefix: string;
|
|
41
|
+
protected isMainEditorState: boolean;
|
|
42
|
+
protected isEditing: boolean;
|
|
43
|
+
protected selectedSectionKey: string;
|
|
44
|
+
protected selectedBlockKey: string;
|
|
45
|
+
protected containsBlocks: boolean;
|
|
46
|
+
protected shouldSetDefaultHeight: boolean;
|
|
47
|
+
protected pepScreenSizeToFlipToVertical: PepScreenSizeType;
|
|
48
|
+
protected screenType: DataViewScreenSize;
|
|
49
|
+
protected hideForCurrentScreenType: boolean;
|
|
50
|
+
protected draggingBlockKey: string;
|
|
51
|
+
protected draggingSectionKey: string;
|
|
52
|
+
protected hoverState: boolean;
|
|
53
|
+
constructor(renderer: Renderer2, layoutBuilderService: LayoutBuilderInternalService, layoutService: PepLayoutService);
|
|
54
|
+
private calculateIfSectionContainsBlocks;
|
|
55
|
+
private setScreenType;
|
|
56
|
+
private setIfHideForCurrentScreenType;
|
|
57
|
+
private getCssSplitString;
|
|
58
|
+
private refreshSplit;
|
|
59
|
+
private setStyleHeight;
|
|
60
|
+
getIsDragging(): boolean;
|
|
61
|
+
getIsHidden(hideIn: DataViewScreenSize[] | undefined, currentScreenType: DataViewScreenSize): boolean;
|
|
62
|
+
ngOnInit(): void;
|
|
63
|
+
onEditSectionClick(): void;
|
|
64
|
+
onRemoveSectionClick(): void;
|
|
65
|
+
onHideSectionChange(hideIn: DataViewScreenSize[]): void;
|
|
66
|
+
onHideInMenuOpened(): void;
|
|
67
|
+
onHideInMenuClosed(): void;
|
|
68
|
+
onBlockDropped(event: CdkDragDrop<IPepLayoutSectionColumn, any, any>): void;
|
|
69
|
+
canDropPredicate(columnIndex: number): (drag: CdkDrag, drop: CdkDropList) => boolean;
|
|
70
|
+
onDragStart(event: CdkDragStart): void;
|
|
71
|
+
onDragEnd(event: CdkDragEnd): void;
|
|
72
|
+
onSectionBlockDragExited(event: CdkDragExit): void;
|
|
73
|
+
onSectionBlockDragEntered(event: CdkDragEnter): void;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SectionComponent, never>;
|
|
75
|
+
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>;
|
|
76
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { CdkDragEnd, CdkDragEnter, CdkDragExit, CdkDragStart } from '@angular/cdk/drag-drop';
|
|
3
|
+
import { DataViewScreenSize } from '@pepperi-addons/papi-sdk';
|
|
4
|
+
import { BaseDestroyerDirective } from '@pepperi-addons/ngx-lib';
|
|
5
|
+
import { IPepDraggableItem } from '@pepperi-addons/ngx-lib/draggable-items';
|
|
6
|
+
import { LayoutBuilderInternalService } from '../layout-builder-internal.service';
|
|
7
|
+
import { IPepLayoutBlockContainer } from '../layout-builder.model';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class SectionBlockComponent extends BaseDestroyerDirective implements OnInit {
|
|
10
|
+
private layoutBuilderService;
|
|
11
|
+
blockTemplate: TemplateRef<any> | undefined;
|
|
12
|
+
sectionKey: string;
|
|
13
|
+
sectionHeight: string;
|
|
14
|
+
isMainEditorState: boolean;
|
|
15
|
+
editable: boolean;
|
|
16
|
+
active: boolean;
|
|
17
|
+
private _blockContainer;
|
|
18
|
+
set blockContainer(value: IPepLayoutBlockContainer | undefined);
|
|
19
|
+
get blockContainer(): IPepLayoutBlockContainer | undefined;
|
|
20
|
+
private _screenType;
|
|
21
|
+
set screenType(value: DataViewScreenSize);
|
|
22
|
+
get screenType(): DataViewScreenSize;
|
|
23
|
+
dragExited: EventEmitter<CdkDragExit>;
|
|
24
|
+
dragEntered: EventEmitter<CdkDragEnter>;
|
|
25
|
+
protected hideForCurrentScreenType: boolean;
|
|
26
|
+
protected availableBlock: IPepDraggableItem | undefined;
|
|
27
|
+
constructor(layoutBuilderService: LayoutBuilderInternalService);
|
|
28
|
+
private setIfHideForCurrentScreenType;
|
|
29
|
+
ngOnInit(): void;
|
|
30
|
+
onEditBlockClick(): void;
|
|
31
|
+
onRemoveBlockClick(): void;
|
|
32
|
+
onHideBlockChange(hideIn: DataViewScreenSize[]): void;
|
|
33
|
+
onDragStart(event: CdkDragStart): void;
|
|
34
|
+
onDragEnd(event: CdkDragEnd): void;
|
|
35
|
+
onDragExited(event: CdkDragExit): void;
|
|
36
|
+
onDragEntered(event: CdkDragEnter): void;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SectionBlockComponent, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SectionBlockComponent, "section-block", never, { "blockTemplate": "blockTemplate"; "sectionKey": "sectionKey"; "sectionHeight": "sectionHeight"; "isMainEditorState": "isMainEditorState"; "editable": "editable"; "active": "active"; "blockContainer": "blockContainer"; "screenType": "screenType"; }, { "dragExited": "dragExited"; "dragEntered": "dragEntered"; }, never, never, false>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@use '@pepperi-addons/ngx-lib/src/core/style/abstracts/mixins' as ngx-mixins;
|
|
2
|
+
|
|
3
|
+
.section-block-container {
|
|
4
|
+
&.editable-state {
|
|
5
|
+
|
|
6
|
+
// If the current block is not active (his editor after edit click)
|
|
7
|
+
&.block-hidden-state {
|
|
8
|
+
&:not(.active-block) {
|
|
9
|
+
@include ngx-mixins.pep-cross-hatch();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./section-block.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/skeleton-loader";
|
|
7
|
+
import * as i6 from "@pepperi-addons/ngx-lib/remote-loader";
|
|
8
|
+
import * as i7 from "@pepperi-addons/ngx-lib/draggable-items";
|
|
9
|
+
export declare class SectionBlockModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SectionBlockModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SectionBlockModule, [typeof i1.SectionBlockComponent], [typeof i2.CommonModule, typeof i3.DragDropModule, typeof i4.PepButtonModule, typeof i5.PepSkeletonLoaderModule, typeof i6.PepRemoteLoaderModule, typeof i7.PepDraggableItemsModule], [typeof i1.SectionBlockComponent]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SectionBlockModule>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
+
import { IPepOption } from '@pepperi-addons/ngx-lib';
|
|
4
|
+
import { SplitType } from '@pepperi-addons/papi-sdk';
|
|
5
|
+
import { PepDialogService } from '@pepperi-addons/ngx-lib/dialog';
|
|
6
|
+
import { ILayoutSectionEditor } from '../layout-builder.model';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export interface ISplitOption {
|
|
9
|
+
key: SplitType;
|
|
10
|
+
value: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IAllSplitOption {
|
|
13
|
+
key: string;
|
|
14
|
+
value: Array<ISplitOption>;
|
|
15
|
+
}
|
|
16
|
+
export declare class SectionEditorComponent implements OnInit {
|
|
17
|
+
private translate;
|
|
18
|
+
private dialog;
|
|
19
|
+
readonly MIN_HEIGHT = 40;
|
|
20
|
+
private _hostObject;
|
|
21
|
+
set hostObject(value: ILayoutSectionEditor);
|
|
22
|
+
get hostObject(): ILayoutSectionEditor;
|
|
23
|
+
sectionName: string;
|
|
24
|
+
private _split;
|
|
25
|
+
set split(value: SplitType | undefined);
|
|
26
|
+
get split(): SplitType | undefined;
|
|
27
|
+
isAutoHeight: boolean;
|
|
28
|
+
height: number;
|
|
29
|
+
hostObjectChange: EventEmitter<ILayoutSectionEditor>;
|
|
30
|
+
collapseOnTablet: boolean;
|
|
31
|
+
fillHeight: boolean;
|
|
32
|
+
subSections: boolean;
|
|
33
|
+
partsNumber: string;
|
|
34
|
+
partsNumberOptions: IPepOption[];
|
|
35
|
+
splitOptions: ISplitOption[];
|
|
36
|
+
allSplitOptions: IAllSplitOption[];
|
|
37
|
+
constructor(translate: TranslateService, dialog: PepDialogService);
|
|
38
|
+
private initData;
|
|
39
|
+
private loadSplitOptions;
|
|
40
|
+
private updateHostObject;
|
|
41
|
+
ngOnInit(): void;
|
|
42
|
+
isAutoHeightChange(isChecked: boolean): void;
|
|
43
|
+
onHeightChange(height: number): void;
|
|
44
|
+
onSectionNameChange(value: string): void;
|
|
45
|
+
onCollapseOnTabletChange(value: boolean): void;
|
|
46
|
+
onFillHeightChange(value: boolean): void;
|
|
47
|
+
onSubSectionsChange(value: boolean): void;
|
|
48
|
+
onPartsNumberChange(key: string): void;
|
|
49
|
+
showDeleteSectionMsg(continueCB: () => void, cancelCB: () => void): void;
|
|
50
|
+
onSplitChange(key: string): void;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SectionEditorComponent, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SectionEditorComponent, "section-editor", never, { "hostObject": "hostObject"; }, { "hostObjectChange": "hostObjectChange"; }, never, never, false>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./section-editor.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@pepperi-addons/ngx-lib/button";
|
|
5
|
+
import * as i4 from "@pepperi-addons/ngx-lib/textbox";
|
|
6
|
+
import * as i5 from "@pepperi-addons/ngx-lib/select";
|
|
7
|
+
import * as i6 from "@pepperi-addons/ngx-lib/checkbox";
|
|
8
|
+
import * as i7 from "@ngx-translate/core";
|
|
9
|
+
export declare class SectionEditorModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SectionEditorModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SectionEditorModule, [typeof i1.SectionEditorComponent], [typeof i2.CommonModule, typeof i3.PepButtonModule, typeof i4.PepTextboxModule, typeof i5.PepSelectModule, typeof i6.PepCheckboxModule, typeof i7.TranslateModule], [typeof i1.SectionEditorComponent]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SectionEditorModule>;
|
|
13
|
+
}
|