@pepperi-addons/ngx-composite-lib 0.4.2-beta.99 → 0.5.0-ng15.1
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 +1 -1
- package/core/common/directives/reset-configuration-field.directive.d.ts +1 -1
- package/data-view-builder/data-view-builder.component.d.ts +1 -1
- package/data-view-builder/data-view-builder.model.d.ts +1 -1
- package/data-view-builder/menu-data-view/menu-data-view.component.d.ts +1 -1
- package/esm2020/color-settings/color-settings.component.mjs +13 -13
- package/esm2020/color-settings/color-settings.module.mjs +5 -5
- package/esm2020/core/common/directives/reset-configuration-field.directive.mjs +24 -24
- package/esm2020/core/common/services/dimx.service.mjs +4 -4
- package/esm2020/core/common/services/utilities.service.mjs +4 -4
- package/esm2020/data-view-builder/data-view-builder.component.mjs +19 -19
- package/esm2020/data-view-builder/data-view-builder.module.mjs +5 -5
- package/esm2020/data-view-builder/data-view-builder.service.mjs +7 -7
- package/esm2020/data-view-builder/menu-data-view/menu-data-view.component.mjs +4 -4
- package/esm2020/file-status-panel/file-status-panel.component.mjs +4 -4
- package/esm2020/file-status-panel/file-status-panel.module.mjs +5 -5
- package/esm2020/flow-picker-button/flow-picker-button.component.mjs +16 -16
- package/esm2020/flow-picker-button/flow-picker-button.module.mjs +5 -5
- package/esm2020/flow-picker-button/flow-picker-button.service.mjs +4 -4
- package/esm2020/generic-fields-builder/field-container/field-container.component.mjs +18 -0
- package/esm2020/generic-fields-builder/generic-fields-builder.component.mjs +119 -0
- package/esm2020/generic-fields-builder/generic-fields-builder.module.mjs +82 -0
- package/esm2020/generic-fields-builder/generic-fields-builder.service.mjs +39 -0
- package/esm2020/generic-fields-builder/pepperi-addons-ngx-composite-lib-generic-fields-builder.mjs +5 -0
- package/esm2020/generic-fields-builder/public-api.mjs +6 -0
- package/esm2020/generic-form/generic-form.component.mjs +13 -13
- package/esm2020/generic-form/generic-form.module.mjs +5 -5
- package/esm2020/generic-form/generic-form.service.mjs +4 -4
- package/esm2020/generic-list/generic-list.component.mjs +102 -49
- package/esm2020/generic-list/generic-list.module.mjs +18 -10
- package/esm2020/generic-list/generic-list.service.mjs +30 -5
- package/esm2020/group-buttons-settings/group-buttons-settings.component.mjs +15 -15
- package/esm2020/group-buttons-settings/group-buttons-settings.module.mjs +5 -5
- package/esm2020/icon-picker/icon-picker.component.mjs +4 -4
- package/esm2020/icon-picker/icon-picker.module.mjs +5 -5
- package/esm2020/icon-picker/icon-picker.service.mjs +4 -4
- package/esm2020/layout-builder/hide-in/hide-in.component.mjs +5 -5
- package/esm2020/layout-builder/hide-in/hide-in.module.mjs +5 -5
- package/esm2020/layout-builder/layout/layout.component.mjs +67 -42
- package/esm2020/layout-builder/layout/layout.module.mjs +7 -5
- package/esm2020/layout-builder/layout-builder-editor/layout-builder-editor.component.mjs +4 -4
- package/esm2020/layout-builder/layout-builder-editor/layout-builder-editor.module.mjs +5 -5
- package/esm2020/layout-builder/layout-builder-internal.service.mjs +77 -77
- package/esm2020/layout-builder/layout-builder.component.mjs +134 -103
- package/esm2020/layout-builder/layout-builder.model.mjs +1 -1
- package/esm2020/layout-builder/layout-builder.module.mjs +5 -5
- package/esm2020/layout-builder/layout-builder.service.mjs +31 -18
- package/esm2020/layout-builder/main-editor/main-editor.component.mjs +47 -36
- package/esm2020/layout-builder/main-editor/main-editor.module.mjs +5 -5
- package/esm2020/layout-builder/section/section.component.mjs +59 -34
- package/esm2020/layout-builder/section/section.module.mjs +5 -5
- package/esm2020/layout-builder/section-block/section-block.component.mjs +19 -19
- package/esm2020/layout-builder/section-block/section-block.module.mjs +5 -5
- package/esm2020/layout-builder/section-editor/section-editor.component.mjs +31 -22
- package/esm2020/layout-builder/section-editor/section-editor.module.mjs +10 -6
- package/esm2020/manage-parameters/manage-parameter/manage-parameter.component.mjs +10 -6
- package/esm2020/manage-parameters/manage-parameters.component.mjs +55 -19
- package/esm2020/manage-parameters/manage-parameters.model.mjs +1 -1
- package/esm2020/manage-parameters/manage-parameters.module.mjs +5 -5
- package/esm2020/manage-parameters/manage-parameters.service.mjs +14 -7
- package/esm2020/mapping-parameters/mapping-parameters.component.mjs +44 -0
- package/esm2020/mapping-parameters/mapping-parameters.model.mjs +6 -0
- package/esm2020/mapping-parameters/mapping-parameters.module.mjs +59 -0
- package/esm2020/mapping-parameters/mapping-parameters.service.mjs +37 -0
- package/esm2020/mapping-parameters/param-map/param-map.component.mjs +73 -0
- package/esm2020/mapping-parameters/pepperi-addons-ngx-composite-lib-mapping-parameters.mjs +5 -0
- package/esm2020/mapping-parameters/public-api.mjs +4 -0
- package/esm2020/ngx-composite-lib.module.mjs +5 -5
- package/esm2020/padding-settings/padding-settings.component.mjs +32 -22
- package/esm2020/padding-settings/padding-settings.model.mjs +3 -3
- package/esm2020/padding-settings/padding-settings.module.mjs +5 -5
- package/esm2020/rich-text/rich-text.component.mjs +12 -12
- package/esm2020/rich-text/rich-text.module.mjs +5 -5
- package/esm2020/rich-text/rich-text.service.mjs +4 -4
- package/esm2020/shadow-settings/shadow-settings.component.mjs +12 -12
- package/esm2020/shadow-settings/shadow-settings.module.mjs +5 -5
- package/esm2020/show-if-badge/show-if-badge.component.mjs +5 -5
- package/esm2020/show-if-badge/show-if-badge.module.mjs +5 -5
- package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.mjs +16 -16
- package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-data-view-builder.mjs +31 -31
- package/fesm2015/pepperi-addons-ngx-composite-lib-data-view-builder.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.mjs +7 -7
- 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 +22 -22
- package/fesm2015/pepperi-addons-ngx-composite-lib-flow-picker-button.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-fields-builder.mjs +254 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-fields-builder.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.mjs +19 -19
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.mjs +148 -60
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs +18 -18
- package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-icon-picker.mjs +10 -10
- package/fesm2015/pepperi-addons-ngx-composite-lib-icon-picker.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-layout-builder.mjs +853 -725
- package/fesm2015/pepperi-addons-ngx-composite-lib-layout-builder.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-manage-parameters.mjs +83 -35
- package/fesm2015/pepperi-addons-ngx-composite-lib-manage-parameters.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-mapping-parameters.mjs +207 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-mapping-parameters.mjs.map +1 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-padding-settings.mjs +37 -27
- package/fesm2015/pepperi-addons-ngx-composite-lib-padding-settings.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-rich-text.mjs +18 -18
- package/fesm2015/pepperi-addons-ngx-composite-lib-rich-text.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-shadow-settings.mjs +15 -15
- package/fesm2015/pepperi-addons-ngx-composite-lib-shadow-settings.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-show-if-badge.mjs +8 -8
- package/fesm2015/pepperi-addons-ngx-composite-lib-show-if-badge.mjs.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib.mjs +33 -33
- package/fesm2015/pepperi-addons-ngx-composite-lib.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-color-settings.mjs +16 -16
- package/fesm2020/pepperi-addons-ngx-composite-lib-color-settings.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-data-view-builder.mjs +31 -31
- package/fesm2020/pepperi-addons-ngx-composite-lib-data-view-builder.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-file-status-panel.mjs +7 -7
- 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 +22 -22
- package/fesm2020/pepperi-addons-ngx-composite-lib-flow-picker-button.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-generic-fields-builder.mjs +254 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-generic-fields-builder.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-generic-form.mjs +19 -19
- package/fesm2020/pepperi-addons-ngx-composite-lib-generic-form.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-generic-list.mjs +146 -60
- package/fesm2020/pepperi-addons-ngx-composite-lib-generic-list.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs +18 -18
- package/fesm2020/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-icon-picker.mjs +10 -10
- package/fesm2020/pepperi-addons-ngx-composite-lib-icon-picker.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-layout-builder.mjs +844 -727
- package/fesm2020/pepperi-addons-ngx-composite-lib-layout-builder.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-manage-parameters.mjs +81 -33
- package/fesm2020/pepperi-addons-ngx-composite-lib-manage-parameters.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-mapping-parameters.mjs +209 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-mapping-parameters.mjs.map +1 -0
- package/fesm2020/pepperi-addons-ngx-composite-lib-padding-settings.mjs +37 -27
- package/fesm2020/pepperi-addons-ngx-composite-lib-padding-settings.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-rich-text.mjs +18 -18
- package/fesm2020/pepperi-addons-ngx-composite-lib-rich-text.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-shadow-settings.mjs +15 -15
- package/fesm2020/pepperi-addons-ngx-composite-lib-shadow-settings.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib-show-if-badge.mjs +8 -8
- package/fesm2020/pepperi-addons-ngx-composite-lib-show-if-badge.mjs.map +1 -1
- package/fesm2020/pepperi-addons-ngx-composite-lib.mjs +33 -33
- package/fesm2020/pepperi-addons-ngx-composite-lib.mjs.map +1 -1
- package/file-status-panel/file-status-panel.component.d.ts +1 -1
- package/file-status-panel/file-status-panel.model.d.ts +1 -1
- package/flow-picker-button/flow-picker-button.component.d.ts +1 -1
- package/generic-fields-builder/field-container/field-container.component.d.ts +10 -0
- package/generic-fields-builder/generic-fields-builder.component.d.ts +46 -0
- package/generic-fields-builder/generic-fields-builder.module.d.ts +23 -0
- package/generic-fields-builder/generic-fields-builder.service.d.ts +14 -0
- package/generic-fields-builder/index.d.ts +5 -0
- package/generic-fields-builder/public-api.d.ts +2 -0
- package/generic-form/generic-form.component.d.ts +1 -1
- package/generic-list/generic-list.component.d.ts +25 -9
- package/generic-list/generic-list.module.d.ts +13 -11
- package/generic-list/generic-list.service.d.ts +3 -1
- package/group-buttons-settings/group-buttons-settings.component.d.ts +1 -1
- package/group-buttons-settings/group-buttons-settings.model.d.ts +1 -1
- package/icon-picker/icon-picker.component.d.ts +1 -1
- package/layout-builder/hide-in/hide-in.component.d.ts +1 -1
- package/layout-builder/hide-in/hide-in.component.theme.scss +1 -1
- package/layout-builder/layout/layout.component.d.ts +12 -8
- package/layout-builder/layout-builder-editor/layout-builder-editor.component.d.ts +1 -1
- package/layout-builder/layout-builder-internal.service.d.ts +5 -10
- package/layout-builder/layout-builder.component.d.ts +11 -4
- package/layout-builder/layout-builder.component.theme.scss +1 -1
- package/layout-builder/layout-builder.model.d.ts +3 -3
- package/layout-builder/layout-builder.service.d.ts +15 -6
- package/layout-builder/main-editor/main-editor.component.d.ts +7 -5
- package/layout-builder/section/section.component.d.ts +8 -1
- package/layout-builder/section-block/section-block.component.d.ts +1 -1
- package/layout-builder/section-editor/section-editor.component.d.ts +4 -1
- package/layout-builder/section-editor/section-editor.module.d.ts +3 -2
- package/manage-parameters/manage-parameter/manage-parameter.component.d.ts +3 -1
- package/manage-parameters/manage-parameters.component.d.ts +10 -3
- package/manage-parameters/manage-parameters.model.d.ts +4 -1
- package/manage-parameters/manage-parameters.service.d.ts +2 -2
- package/mapping-parameters/index.d.ts +5 -0
- package/mapping-parameters/mapping-parameters.component.d.ts +19 -0
- package/mapping-parameters/mapping-parameters.model.d.ts +8 -0
- package/mapping-parameters/mapping-parameters.module.d.ts +18 -0
- package/mapping-parameters/mapping-parameters.service.d.ts +12 -0
- package/mapping-parameters/param-map/param-map.component.d.ts +27 -0
- package/mapping-parameters/public-api.d.ts +3 -0
- package/package.json +19 -2
- package/padding-settings/padding-settings.component.d.ts +1 -1
- package/padding-settings/padding-settings.model.d.ts +2 -2
- package/rich-text/rich-text.component.d.ts +1 -1
- package/shadow-settings/shadow-settings.component.d.ts +1 -1
- package/shadow-settings/shadow-settings.model.d.ts +1 -1
- package/show-if-badge/show-if-badge.component.d.ts +1 -1
- package/src/assets/i18n/en.ngx-composite-lib.json +22 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, Input, Output, NgModule, Injectable, ViewChild, ViewChildren, HostBinding, ElementRef, HostListener } from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Input, Output, NgModule, Injectable, ViewChild, ViewChildren, HostBinding, ElementRef, HostListener, Optional } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i3$2 from '@angular/cdk/drag-drop';
|
|
@@ -9,27 +9,27 @@ import * as i2$2 from '@angular/material/tabs';
|
|
|
9
9
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
10
10
|
import * as i3$1 from '@pepperi-addons/ngx-lib';
|
|
11
11
|
import { PepScreenSizeType, PepGuid, BaseDestroyerDirective, PepNgxLibModule } from '@pepperi-addons/ngx-lib';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i5$4 from '@pepperi-addons/ngx-lib/size-detector';
|
|
13
13
|
import { PepSizeDetectorModule } from '@pepperi-addons/ngx-lib/size-detector';
|
|
14
14
|
import * as i4$1 from '@pepperi-addons/ngx-lib/button';
|
|
15
15
|
import { PepButtonModule } from '@pepperi-addons/ngx-lib/button';
|
|
16
16
|
import * as i2$1 from '@pepperi-addons/ngx-lib/dialog';
|
|
17
|
-
import { PepDialogData,
|
|
18
|
-
import * as
|
|
17
|
+
import { PepDialogData, PepDialogActionButton, PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';
|
|
18
|
+
import * as i7$1 from '@pepperi-addons/ngx-lib/group-buttons';
|
|
19
19
|
import { PepGroupButtonsModule } from '@pepperi-addons/ngx-lib/group-buttons';
|
|
20
|
-
import * as
|
|
20
|
+
import * as i4$4 from '@pepperi-addons/ngx-lib/page-layout';
|
|
21
21
|
import { PepPageLayoutModule } from '@pepperi-addons/ngx-lib/page-layout';
|
|
22
|
-
import * as
|
|
22
|
+
import * as i5$3 from '@pepperi-addons/ngx-lib/side-bar';
|
|
23
23
|
import { PepSideBarComponent, PepSideBarModule } from '@pepperi-addons/ngx-lib/side-bar';
|
|
24
|
-
import * as
|
|
24
|
+
import * as i5$1 from '@pepperi-addons/ngx-lib/draggable-items';
|
|
25
25
|
import { PepDraggableItemsModule } from '@pepperi-addons/ngx-lib/draggable-items';
|
|
26
|
-
import * as
|
|
26
|
+
import * as i4$2 from '@pepperi-addons/ngx-lib/checkbox';
|
|
27
27
|
import { PepCheckboxModule } from '@pepperi-addons/ngx-lib/checkbox';
|
|
28
28
|
import * as i4$3 from '@pepperi-addons/ngx-lib/select';
|
|
29
29
|
import { PepSelectModule } from '@pepperi-addons/ngx-lib/select';
|
|
30
|
-
import * as
|
|
30
|
+
import * as i2$3 from '@pepperi-addons/ngx-lib/textbox';
|
|
31
31
|
import { PepTextboxModule } from '@pepperi-addons/ngx-lib/textbox';
|
|
32
|
-
import * as
|
|
32
|
+
import * as i5$2 from '@pepperi-addons/ngx-composite-lib/group-buttons-settings';
|
|
33
33
|
import { PepGroupButtonsSettingsModule } from '@pepperi-addons/ngx-composite-lib/group-buttons-settings';
|
|
34
34
|
import { __awaiter } from 'tslib';
|
|
35
35
|
import * as i1 from '@ngx-translate/core';
|
|
@@ -45,8 +45,10 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
45
45
|
import * as i1$1 from '@pepperi-addons/ngx-lib/icon';
|
|
46
46
|
import { pepIconSystemView, PepIconModule, pepIconDeviceDesktop, pepIconDeviceTablet, pepIconDeviceMobile } from '@pepperi-addons/ngx-lib/icon';
|
|
47
47
|
import { HttpClientModule } from '@angular/common/http';
|
|
48
|
-
import * as
|
|
48
|
+
import * as i4$5 from '@pepperi-addons/ngx-lib/skeleton-loader';
|
|
49
49
|
import { PepSkeletonLoaderModule } from '@pepperi-addons/ngx-lib/skeleton-loader';
|
|
50
|
+
import * as i7 from '@pepperi-addons/ngx-composite-lib/padding-settings';
|
|
51
|
+
import { PepPaddingSettings, PepPaddingSettingsModule } from '@pepperi-addons/ngx-composite-lib/padding-settings';
|
|
50
52
|
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
51
53
|
import { BehaviorSubject } from 'rxjs';
|
|
52
54
|
import { distinctUntilChanged, filter } from 'rxjs/operators';
|
|
@@ -89,11 +91,11 @@ class HideInComponent {
|
|
|
89
91
|
this.menuClosed.emit();
|
|
90
92
|
}
|
|
91
93
|
}
|
|
92
|
-
HideInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
93
|
-
HideInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
94
|
+
HideInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HideInComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
95
|
+
HideInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: HideInComponent, selector: "hide-in", inputs: { hideIn: "hideIn" }, outputs: { hideInChange: "hideInChange", menuOpened: "menuOpened", menuClosed: "menuClosed" }, ngImport: i0, template: "\n<pep-button sizeType=\"xs\" iconName=\"system_view\" [matMenuTriggerFor]=\"menu\" (menuClosed)=\"onMenuClosed()\" (menuOpened)=\"onMenuOpened()\"\n class=\"badge-button\" [ngClass]=\"{ 'none': !hideIn || hideIn.length === 0}\"\n matBadge=\"{{ hideIn?.length }}\" matBadgePosition=\"after\" matBadgeSize=\"small\" \n></pep-button>\n\n<mat-menu #menu=\"matMenu\" class=\"hide-in-menu\">\n <div mat-menu-item class=\"title\" disabled>\n <span>{{('LAYOUT_BUILDER.HIDE_IN.HIDE_IN_TITLE' | translate)}}</span>\n </div>\n <div mat-menu-item class=\"splitter\"></div>\n <ng-container *ngFor=\"let menuItem of menuItems\">\n <button mat-menu-item (click)=\"onItemClick($event, menuItem)\" title=\"{{ menuItem.text }}\">\n <mat-checkbox type=\"checkbox\" title=\"{{ menuItem.text }}\" class=\"md\"\n (change)=\"onItemClick($event, menuItem)\" [checked]=\"menuItem.selected\">\n <span class=\"pull-left flip title ellipsis\">{{ menuItem.text }}</span>\n </mat-checkbox>\n </button>\n </ng-container>\n</mat-menu>\n", styles: [".hide-in-menu .mat-menu-item.splitter,.hide-in-menu .mat-mdc-menu-item.splitter{margin-inline:var(--pep-spacing-sm, .5rem)}.mat-mdc-menu-item ::ng-deep .mat-checkbox-layout .mat-checkbox-inner-container,.mat-mdc-menu-item ::ng-deep .mat-checkbox-layout .mat-mdc-checkbox-inner-container,.mat-mdc-menu-item ::ng-deep .mat-mdc-checkbox-layout .mat-checkbox-inner-container,.mat-mdc-menu-item ::ng-deep .mat-mdc-checkbox-layout .mat-mdc-checkbox-inner-container{margin-inline-end:var(--pep-spacing-xs, .25rem)!important}.badge-button .mat-badge-content,.badge-button .mat-mdc-badge-content{font-weight:var(--pep-font-weight-bold, 600);background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),var(--pep-color-strong-l, 27%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));background-color:hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))!important;box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.32)}.badge-button .mat-badge-content .svg-icon,.badge-button .mat-mdc-badge-content .svg-icon{fill:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.badge-button .mat-badge-content .svg-icon.stroke,.badge-button .mat-mdc-badge-content .svg-icon.stroke{fill:unset;stroke:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.badge-button.none ::ng-deep .mat-badge-content,.badge-button.none ::ng-deep .mat-mdc-badge-content{display:none}.badge-button ::ng-deep .mat-badge-content{z-index:1;right:-4px!important}\n", ".hide-in-menu .mat-mdc-menu-item.title{color:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.7)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i4.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i4$1.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HideInComponent, decorators: [{
|
|
95
97
|
type: Component,
|
|
96
|
-
args: [{ selector: 'hide-in', template: "\n<pep-button sizeType=\"xs\" iconName=\"system_view\" [matMenuTriggerFor]=\"menu\" (menuClosed)=\"onMenuClosed()\" (menuOpened)=\"onMenuOpened()\"\n class=\"badge-button\" [ngClass]=\"{ 'none': !hideIn || hideIn.length === 0}\"\n matBadge=\"{{ hideIn?.length }}\" matBadgePosition=\"after\" matBadgeSize=\"small\" \n></pep-button>\n\n<mat-menu #menu=\"matMenu\" class=\"hide-in-menu\">\n <div mat-menu-item class=\"title\" disabled>\n <span>{{('LAYOUT_BUILDER.HIDE_IN.HIDE_IN_TITLE' | translate)}}</span>\n </div>\n <div mat-menu-item class=\"splitter\"></div>\n <ng-container *ngFor=\"let menuItem of menuItems\">\n <button mat-menu-item (click)=\"onItemClick($event, menuItem)\" title=\"{{ menuItem.text }}\">\n <mat-checkbox type=\"checkbox\" title=\"{{ menuItem.text }}\" class=\"md\"\n (change)=\"onItemClick($event, menuItem)\" [checked]=\"menuItem.selected\">\n <span class=\"pull-left flip title ellipsis\">{{ menuItem.text }}</span>\n </mat-checkbox>\n </button>\n </ng-container>\n</mat-menu>\n", styles: [".hide-in-menu .mat-menu-item.splitter{margin-inline:var(--pep-spacing-sm, .5rem)}.mat-menu-item ::ng-deep .mat-checkbox-layout .mat-checkbox-inner-container{margin-inline-end:var(--pep-spacing-xs, .25rem)!important}.badge-button .mat-badge-content{font-weight:var(--pep-font-weight-bold, 600);background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),var(--pep-color-strong-l, 27%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));background-color:hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))!important;box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.32)}.badge-button .mat-badge-content .svg-icon{fill:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.badge-button .mat-badge-content .svg-icon.stroke{fill:unset;stroke:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.badge-button.none ::ng-deep .mat-badge-content{display:none}.badge-button ::ng-deep .mat-badge-content{z-index:1;right:-4px!important}\n", ".hide-in-menu .mat-menu-item.title{color:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.7)}\n"] }]
|
|
98
|
+
args: [{ selector: 'hide-in', template: "\n<pep-button sizeType=\"xs\" iconName=\"system_view\" [matMenuTriggerFor]=\"menu\" (menuClosed)=\"onMenuClosed()\" (menuOpened)=\"onMenuOpened()\"\n class=\"badge-button\" [ngClass]=\"{ 'none': !hideIn || hideIn.length === 0}\"\n matBadge=\"{{ hideIn?.length }}\" matBadgePosition=\"after\" matBadgeSize=\"small\" \n></pep-button>\n\n<mat-menu #menu=\"matMenu\" class=\"hide-in-menu\">\n <div mat-menu-item class=\"title\" disabled>\n <span>{{('LAYOUT_BUILDER.HIDE_IN.HIDE_IN_TITLE' | translate)}}</span>\n </div>\n <div mat-menu-item class=\"splitter\"></div>\n <ng-container *ngFor=\"let menuItem of menuItems\">\n <button mat-menu-item (click)=\"onItemClick($event, menuItem)\" title=\"{{ menuItem.text }}\">\n <mat-checkbox type=\"checkbox\" title=\"{{ menuItem.text }}\" class=\"md\"\n (change)=\"onItemClick($event, menuItem)\" [checked]=\"menuItem.selected\">\n <span class=\"pull-left flip title ellipsis\">{{ menuItem.text }}</span>\n </mat-checkbox>\n </button>\n </ng-container>\n</mat-menu>\n", styles: [".hide-in-menu .mat-menu-item.splitter,.hide-in-menu .mat-mdc-menu-item.splitter{margin-inline:var(--pep-spacing-sm, .5rem)}.mat-mdc-menu-item ::ng-deep .mat-checkbox-layout .mat-checkbox-inner-container,.mat-mdc-menu-item ::ng-deep .mat-checkbox-layout .mat-mdc-checkbox-inner-container,.mat-mdc-menu-item ::ng-deep .mat-mdc-checkbox-layout .mat-checkbox-inner-container,.mat-mdc-menu-item ::ng-deep .mat-mdc-checkbox-layout .mat-mdc-checkbox-inner-container{margin-inline-end:var(--pep-spacing-xs, .25rem)!important}.badge-button .mat-badge-content,.badge-button .mat-mdc-badge-content{font-weight:var(--pep-font-weight-bold, 600);background:hsl(var(--pep-color-strong-h, 78),var(--pep-color-strong-s, 87%),var(--pep-color-strong-l, 27%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));background-color:hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))!important;box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.32)}.badge-button .mat-badge-content .svg-icon,.badge-button .mat-mdc-badge-content .svg-icon{fill:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.badge-button .mat-badge-content .svg-icon.stroke,.badge-button .mat-mdc-badge-content .svg-icon.stroke{fill:unset;stroke:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.badge-button.none ::ng-deep .mat-badge-content,.badge-button.none ::ng-deep .mat-mdc-badge-content{display:none}.badge-button ::ng-deep .mat-badge-content{z-index:1;right:-4px!important}\n", ".hide-in-menu .mat-mdc-menu-item.title{color:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.7)}\n"] }]
|
|
97
99
|
}], ctorParameters: function () { return [{ type: i1.TranslateService }]; }, propDecorators: { hideIn: [{
|
|
98
100
|
type: Input
|
|
99
101
|
}], hideInChange: [{
|
|
@@ -112,8 +114,8 @@ class HideInModule {
|
|
|
112
114
|
]);
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
|
-
HideInModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
116
|
-
HideInModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
117
|
+
HideInModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HideInModule, deps: [{ token: i1$1.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
118
|
+
HideInModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: HideInModule, declarations: [HideInComponent], imports: [CommonModule,
|
|
117
119
|
MatButtonModule,
|
|
118
120
|
MatMenuModule,
|
|
119
121
|
MatIconModule,
|
|
@@ -122,7 +124,7 @@ HideInModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
|
122
124
|
PepButtonModule,
|
|
123
125
|
PepCheckboxModule,
|
|
124
126
|
PepIconModule, i1.TranslateModule], exports: [HideInComponent] });
|
|
125
|
-
HideInModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
127
|
+
HideInModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HideInModule, imports: [CommonModule,
|
|
126
128
|
MatButtonModule,
|
|
127
129
|
MatMenuModule,
|
|
128
130
|
MatIconModule,
|
|
@@ -141,7 +143,7 @@ HideInModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
|
141
143
|
// }, isolate: false
|
|
142
144
|
// }),
|
|
143
145
|
] });
|
|
144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HideInModule, decorators: [{
|
|
145
147
|
type: NgModule,
|
|
146
148
|
args: [{
|
|
147
149
|
declarations: [HideInComponent],
|
|
@@ -170,64 +172,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
170
172
|
}], ctorParameters: function () { return [{ type: i1$1.PepIconRegistry }]; } });
|
|
171
173
|
|
|
172
174
|
class LayoutBuilderInternalService {
|
|
173
|
-
constructor(translate, dialogService, layoutService) {
|
|
174
|
-
this.translate = translate;
|
|
175
|
-
this.dialogService = dialogService;
|
|
176
|
-
this.layoutService = layoutService;
|
|
177
|
-
this._defaultSectionTitle = '';
|
|
178
|
-
// This configuration is for blocks behavior.
|
|
179
|
-
this._blocksLimitNumber = 0;
|
|
180
|
-
this._navigateToEditorAfterBlockAdded = false;
|
|
181
|
-
this._getBlockTitle = (blockKey) => { return blockKey; };
|
|
182
|
-
this._editorsBreadCrumb = Array();
|
|
183
|
-
this._editMode = false;
|
|
184
|
-
this._editableState = false;
|
|
185
|
-
// This subject is for the screen size change events.
|
|
186
|
-
this._screenSizeSubject = new BehaviorSubject(undefined);
|
|
187
|
-
// This subject is for demostrate the container size (Usage only in edit mode).
|
|
188
|
-
this._screenWidthSubject = new BehaviorSubject('100%');
|
|
189
|
-
// This subject is for load the current editor (Usage only in edit mode).
|
|
190
|
-
this._editorSubject = new BehaviorSubject(null);
|
|
191
|
-
// This is the sections columns drop list subject.
|
|
192
|
-
this._sectionsColumnsDropListSubject = new BehaviorSubject([]);
|
|
193
|
-
// This is the sections subject (a pare from the layout view object)
|
|
194
|
-
this._sectionsViewSubject = new BehaviorSubject([]);
|
|
195
|
-
// This subject is for layout view change.
|
|
196
|
-
this._layoutViewSubject = new BehaviorSubject(null);
|
|
197
|
-
// This subject is for edit mode when block is dragging now or not.
|
|
198
|
-
this._draggingBlockKey = new BehaviorSubject('');
|
|
199
|
-
// This subject is for edit mode when section is dragging now or not.
|
|
200
|
-
this._draggingSectionKey = new BehaviorSubject('');
|
|
201
|
-
// This subject is for lock or unlock the screen (Usage only in edit mode).
|
|
202
|
-
this._lockScreenSubject = new BehaviorSubject(false);
|
|
203
|
-
// This is for control the preview mode (for load the blocks with the CPI events)
|
|
204
|
-
this._previewModeSubject = new BehaviorSubject(false);
|
|
205
|
-
// This is for editor mode for block added.
|
|
206
|
-
this._blockAddedEventSubject = new BehaviorSubject(null);
|
|
207
|
-
// This is for editor mode for blocks removed.
|
|
208
|
-
this._blocksRemovedEventSubject = new BehaviorSubject([]);
|
|
209
|
-
// This subject is for skeleton.
|
|
210
|
-
this._showSkeletonSubject = new BehaviorSubject(true);
|
|
211
|
-
//
|
|
212
|
-
this.translate.get('LAYOUT_BUILDER.SECTION').subscribe((res) => {
|
|
213
|
-
// Set the default section name.
|
|
214
|
-
this._defaultSectionTitle = res;
|
|
215
|
-
});
|
|
216
|
-
this.layoutService.onResize$.subscribe((size) => {
|
|
217
|
-
this.notifyScreenSizeChange(size);
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
175
|
setBlocksConfig(value) {
|
|
221
176
|
var _a;
|
|
222
177
|
this._blocksLimitNumber = value.blocksLimitNumber || 0;
|
|
223
178
|
this._navigateToEditorAfterBlockAdded = (_a = value.navigateToEditorAfterBlockAdded) !== null && _a !== void 0 ? _a : false;
|
|
224
179
|
this._getBlockTitle = value.getBlockTitle ? value.getBlockTitle : (blockKey) => { return blockKey; };
|
|
225
180
|
}
|
|
226
|
-
get
|
|
227
|
-
return this.
|
|
181
|
+
get editorMode() {
|
|
182
|
+
return this._editorMode;
|
|
228
183
|
}
|
|
229
|
-
|
|
230
|
-
this.
|
|
184
|
+
setEditorMode(value) {
|
|
185
|
+
this._editorMode = value;
|
|
231
186
|
this.setEditableState();
|
|
232
187
|
}
|
|
233
188
|
get editableState() {
|
|
@@ -258,9 +213,6 @@ class LayoutBuilderInternalService {
|
|
|
258
213
|
get draggingSectionKey() {
|
|
259
214
|
return this._draggingSectionKey.asObservable().pipe(distinctUntilChanged());
|
|
260
215
|
}
|
|
261
|
-
get lockScreenChange$() {
|
|
262
|
-
return this._lockScreenSubject.asObservable().pipe(distinctUntilChanged());
|
|
263
|
-
}
|
|
264
216
|
get previewModeChange$() {
|
|
265
217
|
return this._previewModeSubject.asObservable().pipe(distinctUntilChanged());
|
|
266
218
|
}
|
|
@@ -270,15 +222,65 @@ class LayoutBuilderInternalService {
|
|
|
270
222
|
get blocksRemovedEventSubject$() {
|
|
271
223
|
return this._blocksRemovedEventSubject.asObservable();
|
|
272
224
|
}
|
|
273
|
-
|
|
274
|
-
|
|
225
|
+
// // This subject is for skeleton.
|
|
226
|
+
// private _showSkeletonSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
|
|
227
|
+
// get showSkeletonChange$(): Observable<boolean> {
|
|
228
|
+
// return this._showSkeletonSubject.asObservable().pipe(distinctUntilChanged());
|
|
229
|
+
// }
|
|
230
|
+
constructor(translate, dialogService, layoutService) {
|
|
231
|
+
this.translate = translate;
|
|
232
|
+
this.dialogService = dialogService;
|
|
233
|
+
this.layoutService = layoutService;
|
|
234
|
+
this._defaultSectionTitle = '';
|
|
235
|
+
// This configuration is for blocks behavior.
|
|
236
|
+
this._blocksLimitNumber = 0;
|
|
237
|
+
this._navigateToEditorAfterBlockAdded = false;
|
|
238
|
+
this._getBlockTitle = (blockKey) => { return blockKey; };
|
|
239
|
+
this._editorsBreadCrumb = Array();
|
|
240
|
+
this._editorMode = false;
|
|
241
|
+
this._editableState = false;
|
|
242
|
+
// This subject is for the screen size change events.
|
|
243
|
+
this._screenSizeSubject = new BehaviorSubject(undefined);
|
|
244
|
+
// This subject is for demostrate the container size (Usage only in edit mode).
|
|
245
|
+
this._screenWidthSubject = new BehaviorSubject('100%');
|
|
246
|
+
// This subject is for load the current editor (Usage only in edit mode).
|
|
247
|
+
this._editorSubject = new BehaviorSubject(null);
|
|
248
|
+
// This is the sections columns drop list subject.
|
|
249
|
+
this._sectionsColumnsDropListSubject = new BehaviorSubject([]);
|
|
250
|
+
// This is the sections subject (a pare from the layout view object)
|
|
251
|
+
this._sectionsViewSubject = new BehaviorSubject([]);
|
|
252
|
+
// This subject is for layout view change.
|
|
253
|
+
this._layoutViewSubject = new BehaviorSubject(null);
|
|
254
|
+
// This subject is for edit mode when block is dragging now or not.
|
|
255
|
+
this._draggingBlockKey = new BehaviorSubject('');
|
|
256
|
+
// This subject is for edit mode when section is dragging now or not.
|
|
257
|
+
this._draggingSectionKey = new BehaviorSubject('');
|
|
258
|
+
// // This subject is for lock or unlock the screen (Usage only in edit mode).
|
|
259
|
+
// private _lockScreenSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
|
260
|
+
// get lockScreenChange$(): Observable<boolean> {
|
|
261
|
+
// return this._lockScreenSubject.asObservable().pipe(distinctUntilChanged());
|
|
262
|
+
// }
|
|
263
|
+
// This is for control the preview mode (for load the blocks with the CPI events)
|
|
264
|
+
this._previewModeSubject = new BehaviorSubject(false);
|
|
265
|
+
// This is for editor mode for block added.
|
|
266
|
+
this._blockAddedEventSubject = new BehaviorSubject(null);
|
|
267
|
+
// This is for editor mode for blocks removed.
|
|
268
|
+
this._blocksRemovedEventSubject = new BehaviorSubject([]);
|
|
269
|
+
//
|
|
270
|
+
this.translate.get('LAYOUT_BUILDER.SECTION').subscribe((res) => {
|
|
271
|
+
// Set the default section name.
|
|
272
|
+
this._defaultSectionTitle = res;
|
|
273
|
+
});
|
|
274
|
+
this.layoutService.onResize$.subscribe((size) => {
|
|
275
|
+
this.notifyScreenSizeChange(size);
|
|
276
|
+
});
|
|
275
277
|
}
|
|
276
278
|
setEditableState() {
|
|
277
|
-
this._editableState = this.
|
|
279
|
+
this._editableState = this.editorMode && !this._previewModeSubject.getValue();
|
|
278
280
|
}
|
|
279
281
|
notifyLayoutViewChange(layoutViewToUpdate) {
|
|
280
282
|
if (layoutViewToUpdate) {
|
|
281
|
-
if (this.
|
|
283
|
+
if (this.editorMode) {
|
|
282
284
|
this.updateLayoutEditorProperties(layoutViewToUpdate);
|
|
283
285
|
}
|
|
284
286
|
// Update the layout for the view.
|
|
@@ -304,9 +306,9 @@ class LayoutBuilderInternalService {
|
|
|
304
306
|
this._previewModeSubject.next(value);
|
|
305
307
|
this.setEditableState();
|
|
306
308
|
}
|
|
307
|
-
notifyLockScreen(value) {
|
|
308
|
-
|
|
309
|
-
}
|
|
309
|
+
// private notifyLockScreen(value: boolean) {
|
|
310
|
+
// this._lockScreenSubject.next(value);
|
|
311
|
+
// }
|
|
310
312
|
notifySectionsColumnsDropListChange(sectionsColumnsDropList) {
|
|
311
313
|
this._sectionsColumnsDropListSubject.next(sectionsColumnsDropList);
|
|
312
314
|
}
|
|
@@ -385,7 +387,8 @@ class LayoutBuilderInternalService {
|
|
|
385
387
|
split: section.Split || undefined,
|
|
386
388
|
height: section.Height || 0,
|
|
387
389
|
collapseOnTablet: (_a = section.CollapseOnTablet) !== null && _a !== void 0 ? _a : false,
|
|
388
|
-
fillHeight: (_b = section.FillHeight) !== null && _b !== void 0 ? _b : false
|
|
390
|
+
fillHeight: (_b = section.FillHeight) !== null && _b !== void 0 ? _b : false,
|
|
391
|
+
padding: section.Padding || new PepPaddingSettings(true, '0')
|
|
389
392
|
};
|
|
390
393
|
return {
|
|
391
394
|
id: sectionId,
|
|
@@ -536,6 +539,7 @@ class LayoutBuilderInternalService {
|
|
|
536
539
|
currentSection.Height = sectionData.height;
|
|
537
540
|
currentSection.CollapseOnTablet = sectionData.collapseOnTablet;
|
|
538
541
|
currentSection.FillHeight = sectionData.fillHeight;
|
|
542
|
+
currentSection.Padding = sectionData.padding;
|
|
539
543
|
// Get the new columns number from currentSection.Split, if its undefined put a default 1.
|
|
540
544
|
const newColumnsLength = ((_a = currentSection.Split) === null || _a === void 0 ? void 0 : _a.split(' ').length) || 1;
|
|
541
545
|
if (newColumnsLength > currentSection.Columns.length) {
|
|
@@ -764,14 +768,14 @@ class LayoutBuilderInternalService {
|
|
|
764
768
|
}
|
|
765
769
|
}
|
|
766
770
|
}
|
|
767
|
-
showSkeleton(show) {
|
|
768
|
-
|
|
769
|
-
}
|
|
770
|
-
lockScreen(value) {
|
|
771
|
-
|
|
772
|
-
}
|
|
771
|
+
// showSkeleton(show: boolean): void {
|
|
772
|
+
// this._showSkeletonSubject.next(show);
|
|
773
|
+
// }
|
|
774
|
+
// lockScreen(value: boolean): void {
|
|
775
|
+
// this.notifyLockScreen(value);
|
|
776
|
+
// }
|
|
773
777
|
loadLayoutBuilder(layoutView) {
|
|
774
|
-
if (this.
|
|
778
|
+
if (this.editorMode) {
|
|
775
779
|
if (this._editorsBreadCrumb.length === 0) {
|
|
776
780
|
// Load the layout editor.
|
|
777
781
|
this.loadDefaultEditor(layoutView);
|
|
@@ -783,31 +787,13 @@ class LayoutBuilderInternalService {
|
|
|
783
787
|
}
|
|
784
788
|
LayoutBuilderInternalService.AVAILABLE_BLOCKS_CONTAINER_ID = 'availableBlocks';
|
|
785
789
|
LayoutBuilderInternalService.MAIN_EDITOR_ID = 'main';
|
|
786
|
-
LayoutBuilderInternalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
787
|
-
LayoutBuilderInternalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
788
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
789
|
-
type: Injectable
|
|
790
|
-
args: [{
|
|
791
|
-
providedIn: 'root',
|
|
792
|
-
}]
|
|
790
|
+
LayoutBuilderInternalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LayoutBuilderInternalService, deps: [{ token: i1.TranslateService }, { token: i2$1.PepDialogService }, { token: i3$1.PepLayoutService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
791
|
+
LayoutBuilderInternalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LayoutBuilderInternalService });
|
|
792
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LayoutBuilderInternalService, decorators: [{
|
|
793
|
+
type: Injectable
|
|
793
794
|
}], ctorParameters: function () { return [{ type: i1.TranslateService }, { type: i2$1.PepDialogService }, { type: i3$1.PepLayoutService }]; } });
|
|
794
795
|
|
|
795
796
|
class SectionBlockComponent extends BaseDestroyerDirective {
|
|
796
|
-
constructor(layoutBuilderInternalService) {
|
|
797
|
-
super();
|
|
798
|
-
this.layoutBuilderInternalService = layoutBuilderInternalService;
|
|
799
|
-
this.sectionKey = '';
|
|
800
|
-
this.sectionHeight = '';
|
|
801
|
-
this.isMainEditorState = false;
|
|
802
|
-
this.editable = false;
|
|
803
|
-
this.active = false;
|
|
804
|
-
this.dragExited = new EventEmitter();
|
|
805
|
-
this.dragEntered = new EventEmitter();
|
|
806
|
-
this.hideForCurrentScreenType = false;
|
|
807
|
-
// protected remoteLoaderOptions: PepRemoteLoaderOptions;
|
|
808
|
-
// protected availableBlock: IPepDraggableItem | undefined;
|
|
809
|
-
this.blockTitle = '';
|
|
810
|
-
}
|
|
811
797
|
set blockContainer(value) {
|
|
812
798
|
this._blockContainer = value;
|
|
813
799
|
// if (this._blockContainer) {
|
|
@@ -825,6 +811,21 @@ class SectionBlockComponent extends BaseDestroyerDirective {
|
|
|
825
811
|
get screenType() {
|
|
826
812
|
return this._screenType;
|
|
827
813
|
}
|
|
814
|
+
constructor(layoutBuilderInternalService) {
|
|
815
|
+
super();
|
|
816
|
+
this.layoutBuilderInternalService = layoutBuilderInternalService;
|
|
817
|
+
this.sectionKey = '';
|
|
818
|
+
this.sectionHeight = '';
|
|
819
|
+
this.isMainEditorState = false;
|
|
820
|
+
this.editable = false;
|
|
821
|
+
this.active = false;
|
|
822
|
+
this.dragExited = new EventEmitter();
|
|
823
|
+
this.dragEntered = new EventEmitter();
|
|
824
|
+
this.hideForCurrentScreenType = false;
|
|
825
|
+
// protected remoteLoaderOptions: PepRemoteLoaderOptions;
|
|
826
|
+
// protected availableBlock: IPepDraggableItem | undefined;
|
|
827
|
+
this.blockTitle = '';
|
|
828
|
+
}
|
|
828
829
|
setIfHideForCurrentScreenType() {
|
|
829
830
|
this.hideForCurrentScreenType = this.blockContainer ?
|
|
830
831
|
this.layoutBuilderInternalService.getIsHidden(this.blockContainer.Hide, this.screenType) : false;
|
|
@@ -874,9 +875,9 @@ class SectionBlockComponent extends BaseDestroyerDirective {
|
|
|
874
875
|
this.dragEntered.emit(event);
|
|
875
876
|
}
|
|
876
877
|
}
|
|
877
|
-
SectionBlockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
878
|
-
SectionBlockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
879
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
878
|
+
SectionBlockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionBlockComponent, deps: [{ token: LayoutBuilderInternalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
879
|
+
SectionBlockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SectionBlockComponent, selector: "section-block", inputs: { blockTemplate: "blockTemplate", sectionKey: "sectionKey", sectionHeight: "sectionHeight", isMainEditorState: "isMainEditorState", editable: "editable", active: "active", blockContainer: "blockContainer", screenType: "screenType" }, outputs: { dragExited: "dragExited", dragEntered: "dragEntered" }, usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"blockContainer?.BlockKey && (editable || !hideForCurrentScreenType)\" \n class=\"section-block-container\"\n [ngClass]=\"{ 'editable-state': editable, 'block-hidden-state': hideForCurrentScreenType, 'active-block': active }\"\n cdkDrag [cdkDragData]=\"blockContainer\" [cdkDragDisabled]=\"!editable || !isMainEditorState\" \n (cdkDragStarted)=\"onDragStart($event)\" (cdkDragEnded)=\"onDragEnd($event)\"\n (cdkDragExited)=\"onDragExited($event)\" (cdkDragEntered)=\"onDragEntered($event)\">\n \n <pep-draggable-item *ngIf=\"editable && isMainEditorState\" cdkDragHandle style=\"cursor: grab;\"\n class=\"block-toolbar\" [title]=\"blockTitle\" >\n <ng-container pep-actions>\n <pep-button classNames=\"caution\" sizeType=\"xs\" iconName=\"system_bin\" (buttonClick)=\"onRemoveBlockClick();\"></pep-button>\n <!-- <hide-in [hideIn]=\"blockContainer.Hide\" (hideInChange)=\"onHideBlockChange($event)\"></hide-in> -->\n <pep-button sizeType=\"xs\" iconName=\"system_edit\" (buttonClick)=\"onEditBlockClick();\"></pep-button>\n </ng-container>\n </pep-draggable-item>\n <div class=\"block-template-wrapper\" [ngStyle]=\"{ 'overflow': (sectionHeight === 'unset' ? 'unset' : 'auto') }\">\n <div *ngIf=\"blockTemplate\" class=\"block-template\">\n <ng-container *ngTemplateOutlet=\"blockTemplate; context: { blockKey: blockContainer?.BlockKey }\">\n </ng-container>\n </div>\n </div>\n</div>\n", styles: [".section-block-container{height:100%;width:100%}.section-block-container.editable-state:not(.active-block) .block-template-wrapper .block-template{pointer-events:none;opacity:.5}.section-block-container.editable-state.cdk-drag-preview .block-template-wrapper,.section-block-container.editable-state.cdk-drag-placeholder .block-toolbar{opacity:0}.section-block-container.editable-state .block-toolbar{position:absolute;top:50%;left:50%;width:95%;max-width:240px;transform:translate(-50%,-50%);z-index:3}.section-block-container.editable-state .block-toolbar:hover{z-index:12!important}.section-block-container .block-template-wrapper{height:100%;position:relative}.section-block-container .block-template-wrapper .block-template{display:block;height:100%;width:100%}\n", ".section-block-container.editable-state.block-hidden-state:not(.active-block){background:repeating-linear-gradient(45deg,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0),hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .8rem),repeating-linear-gradient(-45deg,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0),hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .8rem)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i4$1.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i5$1.DraggableItemComponent, selector: "pep-draggable-item", inputs: ["title", "titlePrefix", "titleClassNames", "data", "disabled", "shadow", "styleType", "toggleContent", "isToggleContentOpen", "actionsMenu", "menuStyleType"], outputs: ["contentToggle", "actionsMenuItemClick"] }] });
|
|
880
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionBlockComponent, decorators: [{
|
|
880
881
|
type: Component,
|
|
881
882
|
args: [{ selector: 'section-block', template: "<div *ngIf=\"blockContainer?.BlockKey && (editable || !hideForCurrentScreenType)\" \n class=\"section-block-container\"\n [ngClass]=\"{ 'editable-state': editable, 'block-hidden-state': hideForCurrentScreenType, 'active-block': active }\"\n cdkDrag [cdkDragData]=\"blockContainer\" [cdkDragDisabled]=\"!editable || !isMainEditorState\" \n (cdkDragStarted)=\"onDragStart($event)\" (cdkDragEnded)=\"onDragEnd($event)\"\n (cdkDragExited)=\"onDragExited($event)\" (cdkDragEntered)=\"onDragEntered($event)\">\n \n <pep-draggable-item *ngIf=\"editable && isMainEditorState\" cdkDragHandle style=\"cursor: grab;\"\n class=\"block-toolbar\" [title]=\"blockTitle\" >\n <ng-container pep-actions>\n <pep-button classNames=\"caution\" sizeType=\"xs\" iconName=\"system_bin\" (buttonClick)=\"onRemoveBlockClick();\"></pep-button>\n <!-- <hide-in [hideIn]=\"blockContainer.Hide\" (hideInChange)=\"onHideBlockChange($event)\"></hide-in> -->\n <pep-button sizeType=\"xs\" iconName=\"system_edit\" (buttonClick)=\"onEditBlockClick();\"></pep-button>\n </ng-container>\n </pep-draggable-item>\n <div class=\"block-template-wrapper\" [ngStyle]=\"{ 'overflow': (sectionHeight === 'unset' ? 'unset' : 'auto') }\">\n <div *ngIf=\"blockTemplate\" class=\"block-template\">\n <ng-container *ngTemplateOutlet=\"blockTemplate; context: { blockKey: blockContainer?.BlockKey }\">\n </ng-container>\n </div>\n </div>\n</div>\n", styles: [".section-block-container{height:100%;width:100%}.section-block-container.editable-state:not(.active-block) .block-template-wrapper .block-template{pointer-events:none;opacity:.5}.section-block-container.editable-state.cdk-drag-preview .block-template-wrapper,.section-block-container.editable-state.cdk-drag-placeholder .block-toolbar{opacity:0}.section-block-container.editable-state .block-toolbar{position:absolute;top:50%;left:50%;width:95%;max-width:240px;transform:translate(-50%,-50%);z-index:3}.section-block-container.editable-state .block-toolbar:hover{z-index:12!important}.section-block-container .block-template-wrapper{height:100%;position:relative}.section-block-container .block-template-wrapper .block-template{display:block;height:100%;width:100%}\n", ".section-block-container.editable-state.block-hidden-state:not(.active-block){background:repeating-linear-gradient(45deg,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0),hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .8rem),repeating-linear-gradient(-45deg,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0),hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .8rem)}\n"] }]
|
|
882
883
|
}], ctorParameters: function () { return [{ type: LayoutBuilderInternalService }]; }, propDecorators: { blockTemplate: [{
|
|
@@ -902,35 +903,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
902
903
|
}] } });
|
|
903
904
|
|
|
904
905
|
class SectionComponent extends BaseDestroyerDirective {
|
|
905
|
-
constructor(renderer, layoutBuilderInternalService) {
|
|
906
|
-
super();
|
|
907
|
-
this.renderer = renderer;
|
|
908
|
-
this.layoutBuilderInternalService = layoutBuilderInternalService;
|
|
909
|
-
this.key = '';
|
|
910
|
-
this.name = '';
|
|
911
|
-
this._split = undefined;
|
|
912
|
-
this._height = undefined;
|
|
913
|
-
this._collapseOnTablet = false;
|
|
914
|
-
this._columns = [];
|
|
915
|
-
this._hideIn = [];
|
|
916
|
-
this.styleMaxHeight = 'unset';
|
|
917
|
-
this.styleHeight = 'unset';
|
|
918
|
-
this.sectionsColumnsDropList = [];
|
|
919
|
-
// PepScreenSizeType = PepScreenSizeType;
|
|
920
|
-
this.sectionColumnKeyPrefix = '';
|
|
921
|
-
this.isMainEditorState = false;
|
|
922
|
-
this.isEditing = false;
|
|
923
|
-
this.selectedSectionKey = '';
|
|
924
|
-
this.selectedBlockKey = '';
|
|
925
|
-
this.containsBlocks = false;
|
|
926
|
-
this.shouldSetDefaultHeight = false;
|
|
927
|
-
this.pepScreenSizeToFlipToVertical = PepScreenSizeType.SM;
|
|
928
|
-
this.hideForCurrentScreenType = false;
|
|
929
|
-
this.draggingBlockKey = '';
|
|
930
|
-
this.draggingSectionKey = '';
|
|
931
|
-
this.hoverState = false;
|
|
932
|
-
this.isHorizontalView = false;
|
|
933
|
-
}
|
|
934
906
|
set split(value) {
|
|
935
907
|
this._split = value;
|
|
936
908
|
this.refreshSplit();
|
|
@@ -953,6 +925,12 @@ class SectionComponent extends BaseDestroyerDirective {
|
|
|
953
925
|
get collapseOnTablet() {
|
|
954
926
|
return this._collapseOnTablet;
|
|
955
927
|
}
|
|
928
|
+
set padding(value) {
|
|
929
|
+
this._padding = value || new PepPaddingSettings(true, '0');
|
|
930
|
+
}
|
|
931
|
+
get padding() {
|
|
932
|
+
return this._padding;
|
|
933
|
+
}
|
|
956
934
|
set columns(value) {
|
|
957
935
|
this._columns = value || [];
|
|
958
936
|
}
|
|
@@ -982,6 +960,36 @@ class SectionComponent extends BaseDestroyerDirective {
|
|
|
982
960
|
get screenSize() {
|
|
983
961
|
return this._screenSize;
|
|
984
962
|
}
|
|
963
|
+
constructor(renderer, layoutBuilderInternalService) {
|
|
964
|
+
super();
|
|
965
|
+
this.renderer = renderer;
|
|
966
|
+
this.layoutBuilderInternalService = layoutBuilderInternalService;
|
|
967
|
+
this.key = '';
|
|
968
|
+
this.name = '';
|
|
969
|
+
this._split = undefined;
|
|
970
|
+
this._height = undefined;
|
|
971
|
+
this._collapseOnTablet = false;
|
|
972
|
+
this._padding = new PepPaddingSettings(true, '0');
|
|
973
|
+
this._columns = [];
|
|
974
|
+
this._hideIn = [];
|
|
975
|
+
this.styleMaxHeight = 'unset';
|
|
976
|
+
this.styleHeight = 'unset';
|
|
977
|
+
this.sectionsColumnsDropList = [];
|
|
978
|
+
// PepScreenSizeType = PepScreenSizeType;
|
|
979
|
+
this.sectionColumnKeyPrefix = '';
|
|
980
|
+
this.isMainEditorState = false;
|
|
981
|
+
this.isEditing = false;
|
|
982
|
+
this.selectedSectionKey = '';
|
|
983
|
+
this.selectedBlockKey = '';
|
|
984
|
+
this.containsBlocks = false;
|
|
985
|
+
this.shouldSetDefaultHeight = false;
|
|
986
|
+
this.pepScreenSizeToFlipToVertical = PepScreenSizeType.SM;
|
|
987
|
+
this.hideForCurrentScreenType = false;
|
|
988
|
+
this.draggingBlockKey = '';
|
|
989
|
+
this.draggingSectionKey = '';
|
|
990
|
+
this.hoverState = false;
|
|
991
|
+
this.isHorizontalView = false;
|
|
992
|
+
}
|
|
985
993
|
calculateIfSectionContainsBlocks() {
|
|
986
994
|
this.containsBlocks = this.columns.some(column => column.BlockContainer);
|
|
987
995
|
if (this.editable) {
|
|
@@ -1204,12 +1212,27 @@ class SectionComponent extends BaseDestroyerDirective {
|
|
|
1204
1212
|
onSectionBlockDragEntered(event) {
|
|
1205
1213
|
//
|
|
1206
1214
|
}
|
|
1215
|
+
getPadding() {
|
|
1216
|
+
// calc buttons bar padding
|
|
1217
|
+
let padding = '0rem';
|
|
1218
|
+
const paddingObj = this._padding || new PepPaddingSettings();
|
|
1219
|
+
if (paddingObj === null || paddingObj === void 0 ? void 0 : paddingObj.IsUniform) {
|
|
1220
|
+
padding = paddingObj.PaddingValue + 'rem';
|
|
1221
|
+
}
|
|
1222
|
+
else {
|
|
1223
|
+
const num = paddingObj.PaddingValue.split(',');
|
|
1224
|
+
padding = num[0] + 'rem ' + num[1] + 'rem ' + num[2] + 'rem ' + num[3] + 'rem';
|
|
1225
|
+
}
|
|
1226
|
+
return {
|
|
1227
|
+
'padding': padding
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1207
1230
|
}
|
|
1208
|
-
SectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1209
|
-
SectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: SectionComponent, selector: "section", inputs: { blockTemplate: "blockTemplate", key: "key", name: "name", split: "split", height: "height", collapseOnTablet: "collapseOnTablet", columns: "columns", hideIn: "hideIn", columnsGap: "columnsGap" }, host: { properties: { "style.max-height": "this.styleMaxHeight", "style.height": "this.styleHeight" } }, viewQueries: [{ propertyName: "sectionContainerRef", first: true, predicate: ["sectionContainer"], descendants: true }, { propertyName: "columnsElementRef", predicate: ["columnsWrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div #sectionContainer *ngIf=\"editable || (containsBlocks && !hideForCurrentScreenType)\" class=\"section-container \"\n [ngClass]=\"{ \n 'mobile': screenType === 'Phablet',\n 'editable-state': editable, 'main-editor-state': isMainEditorState, 'default-height': shouldSetDefaultHeight, 'active-section': isEditing,\n 'section-hidden-state': hideForCurrentScreenType, 'section-is-dragging': draggingSectionKey !== '', 'show-hover-state': hoverState }\" \n cdkDragBoundary=\".layout-builder-wrapper\" cdkDrag [cdkDragData]=\"key\" [cdkDragDisabled]=\"!editable || selectedSectionKey.length > 0 || selectedBlockKey.length > 0\" (cdkDragStarted)=\"onDragStart($event)\" (cdkDragEnded)=\"onDragEnd($event)\" \n >\n <pep-draggable-item *ngIf=\"editable && isMainEditorState && draggingSectionKey === ''\" cdkDragHandle style=\"cursor: grab;\"\n class=\"section-toolbar\" [ngClass]=\"{ 'hide-toolbar': !hoverState }\" [title]=\"name\">\n <ng-container pep-actions>\n <pep-button classNames=\"caution\" sizeType=\"xs\" iconName=\"system_bin\" (buttonClick)=\"onRemoveSectionClick();\"></pep-button>\n <hide-in [hideIn]=\"hideIn\" (hideInChange)=\"onHideSectionChange($event)\" (menuClosed)=\"onHideInMenuClosed()\" (menuOpened)=\"onHideInMenuOpened()\"></hide-in>\n <pep-button sizeType=\"xs\" iconName=\"system_edit\" (buttonClick)=\"onEditSectionClick();\"></pep-button>\n </ng-container>\n </pep-draggable-item>\n\n <div *ngIf=\"editable\" class=\"section-background\">\n <div class=\"back-template\" *ngFor=\"let number of [0,1,2,3,4,5,6,7,8,9,10,11]\"></div>\n </div>\n <div #columnsWrapper class=\"columns-wrapper gap-{{ columnsGap }}\" \n [ngClass]=\"{ 'mobile': screenType === 'Phablet', 'is-dragging': editable && getIsDragging }\">\n <ng-container *ngFor=\"let column of columns; let i=index;\">\n \n <!-- This is moved to the section-block component cause when we change to work with 'grid-column' style we have to draw the columns.\n *ngIf=\"editable || (column.BlockContainer && column.BlockContainer.BlockKey && column.BlockContainer.BlockKey.length > 0 && !getIsHidden(column?.BlockContainer?.Hide, screenType))\" \n -->\n <div *ngIf=\"editable || isHorizontalView || (column.BlockContainer && column.BlockContainer.BlockKey && column.BlockContainer.BlockKey.length > 0)\"\n [id]=\"sectionColumnKeyPrefix + i\" \n class=\"section-column {{isHorizontalView ? 'horizontal' : 'vertical'}}\"\n [ngClass]=\"{ 'active-column': selectedBlockKey === column.BlockContainer?.BlockKey, \n 'is-hidden': getIsHidden(column?.BlockContainer?.Hide, screenType),\n 'already-contains-block': editable && column.BlockContainer && column.BlockContainer.BlockKey && column.BlockContainer.BlockKey.length > 0 && \n draggingBlockKey && draggingBlockKey.length > 0 && column.BlockContainer.BlockKey !== draggingBlockKey }\"\n cdkDropList\n [cdkDropListData]=\"column\"\n [cdkDropListOrientation]=\"isHorizontalView ? 'horizontal' : 'vertical'\" \n [cdkDropListConnectedTo]=\"sectionsColumnsDropList\"\n (cdkDropListDropped)=\"onBlockDropped($event)\"\n [cdkDropListEnterPredicate]=\"canDropPredicate(i)\"\n >\n <section-block *ngIf=\"column.BlockContainer?.BlockKey\" \n class=\"section-block\" [sectionKey]=\"key\" [blockTemplate]=\"blockTemplate\"\n [blockContainer]=\"column.BlockContainer\" [editable]=\"editable\" [isMainEditorState]=\"isMainEditorState\" [sectionHeight]=\"styleHeight\"\n [active]=\"selectedBlockKey === column.BlockContainer?.BlockKey\" [screenType]=\"screenType\"\n (dragExited)=\"onSectionBlockDragExited($event)\" (dragEntered)=\"onSectionBlockDragEntered($event)\"></section-block>\n </div>\n </ng-container>\n </div>\n</div>\n", styles: [".section-container{position:relative;display:grid;height:100%;max-height:inherit}.section-container.editable-state{min-height:2.5rem}.section-container.editable-state.default-height{min-height:16rem}.section-container.editable-state.active-section{z-index:11}.section-container.editable-state.active-section .columns-wrapper{z-index:1}.section-container.editable-state.active-section ::ng-deep .block-template-wrapper .block-template{pointer-events:unset!important;opacity:unset!important}.section-container.editable-state.cdk-drag-placeholder{opacity:.5}.section-container.editable-state:not(.cdk-drag-placeholder):hover .section-toolbar,.section-container.editable-state:not(.cdk-drag-placeholder).show-hover-state .section-toolbar{display:block!important}.section-container.editable-state:not(.cdk-drag-preview) .hide-toolbar{display:none}.section-container.editable-state.main-editor-state .mobile .is-hidden{display:none}.section-container.editable-state .mobile .is-hidden{display:block}.section-container.editable-state .section-toolbar{position:absolute;top:0;height:2.625rem;z-index:11}.section-container.editable-state .section-toolbar ::ng-deep .pep-draggable-item-container{border-radius:0 0 var(--pep-border-radius-md, .25rem) 0}.section-container.editable-state .section-background{position:absolute;width:100%;height:100%;z-index:0;display:grid;grid-template-columns:repeat(12,1fr)}.section-container.editable-state .section-background .back-template{opacity:.1}.section-container.editable-state .section-background .back-template:last-of-type{border-right:0 none}.section-container .columns-wrapper{display:grid;grid-auto-flow:column;height:inherit;max-height:inherit;overflow:inherit}.section-container .columns-wrapper.is-dragging{overflow:unset}.section-container .columns-wrapper.gap-none{gap:0}.section-container .columns-wrapper.gap-sm{gap:var(--pep-spacing-sm, .5rem)}.section-container .columns-wrapper.gap-md{gap:var(--pep-spacing-lg, 1rem)}.section-container .columns-wrapper.gap-lg{gap:var(--pep-spacing-2xl, 2rem)}.section-container .columns-wrapper .section-column{position:relative;height:inherit;max-height:inherit;overflow:inherit}.section-container .columns-wrapper .section-column .section-block{height:inherit;max-height:inherit}\n", ".section-container{background:transparent}.section-container.editable-state.active-section{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.section-container.editable-state.active-section .columns-wrapper{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.section-container.editable-state.section-hidden-state:not(.active-section){background:repeating-linear-gradient(45deg,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0),hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .8rem),repeating-linear-gradient(-45deg,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0),hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .8rem)}.section-container.editable-state.main-editor-state.cdk-drag-preview{box-shadow:0 0 0 .125rem hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state.main-editor-state.cdk-drag-placeholder{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.section-container.editable-state.main-editor-state.cdk-drag-placeholder:hover,.section-container.editable-state.main-editor-state.cdk-drag-placeholder.show-hover-state{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)!important}.section-container.editable-state.main-editor-state:hover:not(.section-is-dragging),.section-container.editable-state.main-editor-state.show-hover-state:not(.section-is-dragging){box-shadow:0 0 0 .125rem hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state.main-editor-state .section-toolbar ::ng-deep .pep-draggable-item-container{box-shadow:0 0 0 .125rem hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state .section-background .back-template{background-color:#bec3e5;border-right:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}.section-container.editable-state .columns-wrapper .section-column{border:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}.section-container.editable-state .columns-wrapper .section-column.active-column{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.section-container.editable-state .columns-wrapper .section-column.cdk-drop-list-dragging{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.section-container.editable-state .columns-wrapper .section-column.already-contains-block:hover{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).horizontal{border-left:unset}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).horizontal.cdk-drop-list-dragging{border-left:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).vertical{border-top:unset}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).vertical.cdk-drop-list-dragging{border-top:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i4$1.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: SectionBlockComponent, selector: "section-block", inputs: ["blockTemplate", "sectionKey", "sectionHeight", "isMainEditorState", "editable", "active", "blockContainer", "screenType"], outputs: ["dragExited", "dragEntered"] }, { kind: "component", type: HideInComponent, selector: "hide-in", inputs: ["hideIn"], outputs: ["hideInChange", "menuOpened", "menuClosed"] }, { kind: "component", type: i7.DraggableItemComponent, selector: "pep-draggable-item", inputs: ["title", "titlePrefix", "titleClassNames", "data", "disabled", "shadow", "styleType", "toggleContent", "isToggleContentOpen", "actionsMenu", "menuStyleType"], outputs: ["contentToggle", "actionsMenuItemClick"] }] });
|
|
1210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1231
|
+
SectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionComponent, deps: [{ token: i0.Renderer2 }, { token: LayoutBuilderInternalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1232
|
+
SectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SectionComponent, selector: "section", inputs: { blockTemplate: "blockTemplate", key: "key", name: "name", split: "split", height: "height", collapseOnTablet: "collapseOnTablet", padding: "padding", columns: "columns", hideIn: "hideIn", columnsGap: "columnsGap" }, host: { properties: { "style.max-height": "this.styleMaxHeight", "style.height": "this.styleHeight" } }, viewQueries: [{ propertyName: "sectionContainerRef", first: true, predicate: ["sectionContainer"], descendants: true }, { propertyName: "columnsElementRef", predicate: ["columnsWrapper"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div #sectionContainer *ngIf=\"editable || (containsBlocks && !hideForCurrentScreenType)\" class=\"section-container \"\n [ngStyle]=\"getPadding()\"\n [ngClass]=\"{ \n 'mobile': screenType === 'Phablet',\n 'editable-state': editable, 'main-editor-state': isMainEditorState, 'default-height': shouldSetDefaultHeight, 'active-section': isEditing,\n 'section-hidden-state': hideForCurrentScreenType, 'section-is-dragging': draggingSectionKey !== '', 'show-hover-state': hoverState }\" \n cdkDragBoundary=\".layout-builder-wrapper\" cdkDrag [cdkDragData]=\"key\" [cdkDragDisabled]=\"!editable || selectedSectionKey.length > 0 || selectedBlockKey.length > 0\" (cdkDragStarted)=\"onDragStart($event)\" (cdkDragEnded)=\"onDragEnd($event)\" \n >\n <pep-draggable-item *ngIf=\"editable && isMainEditorState && draggingSectionKey === ''\" cdkDragHandle style=\"cursor: grab;\"\n class=\"section-toolbar\" [ngClass]=\"{ 'hide-toolbar': !hoverState }\" [title]=\"name\">\n <ng-container pep-actions>\n <pep-button classNames=\"caution\" sizeType=\"xs\" iconName=\"system_bin\" (buttonClick)=\"onRemoveSectionClick();\"></pep-button>\n <hide-in [hideIn]=\"hideIn\" (hideInChange)=\"onHideSectionChange($event)\" (menuClosed)=\"onHideInMenuClosed()\" (menuOpened)=\"onHideInMenuOpened()\"></hide-in>\n <pep-button sizeType=\"xs\" iconName=\"system_edit\" (buttonClick)=\"onEditSectionClick();\"></pep-button>\n </ng-container>\n </pep-draggable-item>\n\n <div *ngIf=\"editable\" class=\"section-background\">\n <div class=\"back-template\" *ngFor=\"let number of [0,1,2,3,4,5,6,7,8,9,10,11]\"></div>\n </div>\n <div #columnsWrapper class=\"columns-wrapper gap-{{ columnsGap }}\" \n [ngClass]=\"{ 'mobile': screenType === 'Phablet', 'is-dragging': editable && getIsDragging }\">\n <ng-container *ngFor=\"let column of columns; let i=index;\">\n \n <!-- This is moved to the section-block component cause when we change to work with 'grid-column' style we have to draw the columns.\n *ngIf=\"editable || (column.BlockContainer && column.BlockContainer.BlockKey && column.BlockContainer.BlockKey.length > 0 && !getIsHidden(column?.BlockContainer?.Hide, screenType))\" \n -->\n <div *ngIf=\"editable || isHorizontalView || (column.BlockContainer && column.BlockContainer.BlockKey && column.BlockContainer.BlockKey.length > 0)\"\n [id]=\"sectionColumnKeyPrefix + i\" \n class=\"section-column {{isHorizontalView ? 'horizontal' : 'vertical'}}\"\n [ngClass]=\"{ 'active-column': selectedBlockKey === column.BlockContainer?.BlockKey, \n 'is-hidden': getIsHidden(column?.BlockContainer?.Hide, screenType),\n 'already-contains-block': editable && column.BlockContainer && column.BlockContainer.BlockKey && column.BlockContainer.BlockKey.length > 0 && \n draggingBlockKey && draggingBlockKey.length > 0 && column.BlockContainer.BlockKey !== draggingBlockKey }\"\n cdkDropList\n [cdkDropListData]=\"column\"\n [cdkDropListOrientation]=\"isHorizontalView ? 'horizontal' : 'vertical'\" \n [cdkDropListConnectedTo]=\"sectionsColumnsDropList\"\n (cdkDropListDropped)=\"onBlockDropped($event)\"\n [cdkDropListEnterPredicate]=\"canDropPredicate(i)\"\n >\n <section-block *ngIf=\"column.BlockContainer?.BlockKey\" \n class=\"section-block\" [sectionKey]=\"key\" [blockTemplate]=\"blockTemplate\"\n [blockContainer]=\"column.BlockContainer\" [editable]=\"editable\" [isMainEditorState]=\"isMainEditorState\" [sectionHeight]=\"styleHeight\"\n [active]=\"selectedBlockKey === column.BlockContainer?.BlockKey\" [screenType]=\"screenType\"\n (dragExited)=\"onSectionBlockDragExited($event)\" (dragEntered)=\"onSectionBlockDragEntered($event)\"></section-block>\n </div>\n </ng-container>\n </div>\n</div>\n", styles: [".section-container{position:relative;display:grid;height:100%;max-height:inherit}.section-container.editable-state{min-height:2.5rem}.section-container.editable-state.default-height{min-height:16rem}.section-container.editable-state.active-section{z-index:11}.section-container.editable-state.active-section .columns-wrapper{z-index:1}.section-container.editable-state.active-section ::ng-deep .block-template-wrapper .block-template{pointer-events:unset!important;opacity:unset!important}.section-container.editable-state.cdk-drag-placeholder{opacity:.5}.section-container.editable-state:not(.cdk-drag-placeholder):hover .section-toolbar,.section-container.editable-state:not(.cdk-drag-placeholder).show-hover-state .section-toolbar{display:block!important}.section-container.editable-state:not(.cdk-drag-preview) .hide-toolbar{display:none}.section-container.editable-state.main-editor-state .mobile .is-hidden{display:none}.section-container.editable-state .mobile .is-hidden{display:block}.section-container.editable-state .section-toolbar{position:absolute;top:0;height:2.625rem;z-index:11}.section-container.editable-state .section-toolbar ::ng-deep .pep-draggable-item-container{border-radius:0 0 var(--pep-border-radius-md, .25rem) 0}.section-container.editable-state .section-background{position:absolute;width:100%;height:100%;z-index:0;display:grid;grid-template-columns:repeat(12,1fr)}.section-container.editable-state .section-background .back-template{opacity:.1}.section-container.editable-state .section-background .back-template:last-of-type{border-right:0 none}.section-container .columns-wrapper{display:grid;grid-auto-flow:column;height:inherit;max-height:inherit;overflow:inherit}.section-container .columns-wrapper.is-dragging{overflow:unset}.section-container .columns-wrapper.gap-none{gap:0}.section-container .columns-wrapper.gap-sm{gap:var(--pep-spacing-sm, .5rem)}.section-container .columns-wrapper.gap-md{gap:var(--pep-spacing-lg, 1rem)}.section-container .columns-wrapper.gap-lg{gap:var(--pep-spacing-2xl, 2rem)}.section-container .columns-wrapper .section-column{position:relative;height:inherit;max-height:inherit;overflow:inherit}.section-container .columns-wrapper .section-column .section-block{height:inherit;max-height:inherit}\n", ".section-container{background:transparent}.section-container.editable-state.active-section{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.section-container.editable-state.active-section .columns-wrapper{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.section-container.editable-state.section-hidden-state:not(.active-section){background:repeating-linear-gradient(45deg,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0),hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .8rem),repeating-linear-gradient(-45deg,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0),hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .8rem)}.section-container.editable-state.main-editor-state.cdk-drag-preview{box-shadow:0 0 0 .125rem hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state.main-editor-state.cdk-drag-placeholder{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.section-container.editable-state.main-editor-state.cdk-drag-placeholder:hover,.section-container.editable-state.main-editor-state.cdk-drag-placeholder.show-hover-state{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)!important}.section-container.editable-state.main-editor-state:hover:not(.section-is-dragging),.section-container.editable-state.main-editor-state.show-hover-state:not(.section-is-dragging){box-shadow:0 0 0 .125rem hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state.main-editor-state .section-toolbar ::ng-deep .pep-draggable-item-container{box-shadow:0 0 0 .125rem hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state .section-background .back-template{background-color:#bec3e5;border-right:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}.section-container.editable-state .columns-wrapper .section-column{border:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}.section-container.editable-state .columns-wrapper .section-column.active-column{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.section-container.editable-state .columns-wrapper .section-column.cdk-drop-list-dragging{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.section-container.editable-state .columns-wrapper .section-column.already-contains-block:hover{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).horizontal{border-left:unset}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).horizontal.cdk-drop-list-dragging{border-left:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).vertical{border-top:unset}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).vertical.cdk-drop-list-dragging{border-top:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i3$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i4$1.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: SectionBlockComponent, selector: "section-block", inputs: ["blockTemplate", "sectionKey", "sectionHeight", "isMainEditorState", "editable", "active", "blockContainer", "screenType"], outputs: ["dragExited", "dragEntered"] }, { kind: "component", type: HideInComponent, selector: "hide-in", inputs: ["hideIn"], outputs: ["hideInChange", "menuOpened", "menuClosed"] }, { kind: "component", type: i5$1.DraggableItemComponent, selector: "pep-draggable-item", inputs: ["title", "titlePrefix", "titleClassNames", "data", "disabled", "shadow", "styleType", "toggleContent", "isToggleContentOpen", "actionsMenu", "menuStyleType"], outputs: ["contentToggle", "actionsMenuItemClick"] }] });
|
|
1233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionComponent, decorators: [{
|
|
1211
1234
|
type: Component,
|
|
1212
|
-
args: [{ selector: 'section', template: "<div #sectionContainer *ngIf=\"editable || (containsBlocks && !hideForCurrentScreenType)\" class=\"section-container \"\n [ngClass]=\"{ \n 'mobile': screenType === 'Phablet',\n 'editable-state': editable, 'main-editor-state': isMainEditorState, 'default-height': shouldSetDefaultHeight, 'active-section': isEditing,\n 'section-hidden-state': hideForCurrentScreenType, 'section-is-dragging': draggingSectionKey !== '', 'show-hover-state': hoverState }\" \n cdkDragBoundary=\".layout-builder-wrapper\" cdkDrag [cdkDragData]=\"key\" [cdkDragDisabled]=\"!editable || selectedSectionKey.length > 0 || selectedBlockKey.length > 0\" (cdkDragStarted)=\"onDragStart($event)\" (cdkDragEnded)=\"onDragEnd($event)\" \n >\n <pep-draggable-item *ngIf=\"editable && isMainEditorState && draggingSectionKey === ''\" cdkDragHandle style=\"cursor: grab;\"\n class=\"section-toolbar\" [ngClass]=\"{ 'hide-toolbar': !hoverState }\" [title]=\"name\">\n <ng-container pep-actions>\n <pep-button classNames=\"caution\" sizeType=\"xs\" iconName=\"system_bin\" (buttonClick)=\"onRemoveSectionClick();\"></pep-button>\n <hide-in [hideIn]=\"hideIn\" (hideInChange)=\"onHideSectionChange($event)\" (menuClosed)=\"onHideInMenuClosed()\" (menuOpened)=\"onHideInMenuOpened()\"></hide-in>\n <pep-button sizeType=\"xs\" iconName=\"system_edit\" (buttonClick)=\"onEditSectionClick();\"></pep-button>\n </ng-container>\n </pep-draggable-item>\n\n <div *ngIf=\"editable\" class=\"section-background\">\n <div class=\"back-template\" *ngFor=\"let number of [0,1,2,3,4,5,6,7,8,9,10,11]\"></div>\n </div>\n <div #columnsWrapper class=\"columns-wrapper gap-{{ columnsGap }}\" \n [ngClass]=\"{ 'mobile': screenType === 'Phablet', 'is-dragging': editable && getIsDragging }\">\n <ng-container *ngFor=\"let column of columns; let i=index;\">\n \n <!-- This is moved to the section-block component cause when we change to work with 'grid-column' style we have to draw the columns.\n *ngIf=\"editable || (column.BlockContainer && column.BlockContainer.BlockKey && column.BlockContainer.BlockKey.length > 0 && !getIsHidden(column?.BlockContainer?.Hide, screenType))\" \n -->\n <div *ngIf=\"editable || isHorizontalView || (column.BlockContainer && column.BlockContainer.BlockKey && column.BlockContainer.BlockKey.length > 0)\"\n [id]=\"sectionColumnKeyPrefix + i\" \n class=\"section-column {{isHorizontalView ? 'horizontal' : 'vertical'}}\"\n [ngClass]=\"{ 'active-column': selectedBlockKey === column.BlockContainer?.BlockKey, \n 'is-hidden': getIsHidden(column?.BlockContainer?.Hide, screenType),\n 'already-contains-block': editable && column.BlockContainer && column.BlockContainer.BlockKey && column.BlockContainer.BlockKey.length > 0 && \n draggingBlockKey && draggingBlockKey.length > 0 && column.BlockContainer.BlockKey !== draggingBlockKey }\"\n cdkDropList\n [cdkDropListData]=\"column\"\n [cdkDropListOrientation]=\"isHorizontalView ? 'horizontal' : 'vertical'\" \n [cdkDropListConnectedTo]=\"sectionsColumnsDropList\"\n (cdkDropListDropped)=\"onBlockDropped($event)\"\n [cdkDropListEnterPredicate]=\"canDropPredicate(i)\"\n >\n <section-block *ngIf=\"column.BlockContainer?.BlockKey\" \n class=\"section-block\" [sectionKey]=\"key\" [blockTemplate]=\"blockTemplate\"\n [blockContainer]=\"column.BlockContainer\" [editable]=\"editable\" [isMainEditorState]=\"isMainEditorState\" [sectionHeight]=\"styleHeight\"\n [active]=\"selectedBlockKey === column.BlockContainer?.BlockKey\" [screenType]=\"screenType\"\n (dragExited)=\"onSectionBlockDragExited($event)\" (dragEntered)=\"onSectionBlockDragEntered($event)\"></section-block>\n </div>\n </ng-container>\n </div>\n</div>\n", styles: [".section-container{position:relative;display:grid;height:100%;max-height:inherit}.section-container.editable-state{min-height:2.5rem}.section-container.editable-state.default-height{min-height:16rem}.section-container.editable-state.active-section{z-index:11}.section-container.editable-state.active-section .columns-wrapper{z-index:1}.section-container.editable-state.active-section ::ng-deep .block-template-wrapper .block-template{pointer-events:unset!important;opacity:unset!important}.section-container.editable-state.cdk-drag-placeholder{opacity:.5}.section-container.editable-state:not(.cdk-drag-placeholder):hover .section-toolbar,.section-container.editable-state:not(.cdk-drag-placeholder).show-hover-state .section-toolbar{display:block!important}.section-container.editable-state:not(.cdk-drag-preview) .hide-toolbar{display:none}.section-container.editable-state.main-editor-state .mobile .is-hidden{display:none}.section-container.editable-state .mobile .is-hidden{display:block}.section-container.editable-state .section-toolbar{position:absolute;top:0;height:2.625rem;z-index:11}.section-container.editable-state .section-toolbar ::ng-deep .pep-draggable-item-container{border-radius:0 0 var(--pep-border-radius-md, .25rem) 0}.section-container.editable-state .section-background{position:absolute;width:100%;height:100%;z-index:0;display:grid;grid-template-columns:repeat(12,1fr)}.section-container.editable-state .section-background .back-template{opacity:.1}.section-container.editable-state .section-background .back-template:last-of-type{border-right:0 none}.section-container .columns-wrapper{display:grid;grid-auto-flow:column;height:inherit;max-height:inherit;overflow:inherit}.section-container .columns-wrapper.is-dragging{overflow:unset}.section-container .columns-wrapper.gap-none{gap:0}.section-container .columns-wrapper.gap-sm{gap:var(--pep-spacing-sm, .5rem)}.section-container .columns-wrapper.gap-md{gap:var(--pep-spacing-lg, 1rem)}.section-container .columns-wrapper.gap-lg{gap:var(--pep-spacing-2xl, 2rem)}.section-container .columns-wrapper .section-column{position:relative;height:inherit;max-height:inherit;overflow:inherit}.section-container .columns-wrapper .section-column .section-block{height:inherit;max-height:inherit}\n", ".section-container{background:transparent}.section-container.editable-state.active-section{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.section-container.editable-state.active-section .columns-wrapper{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.section-container.editable-state.section-hidden-state:not(.active-section){background:repeating-linear-gradient(45deg,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0),hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .8rem),repeating-linear-gradient(-45deg,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0),hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .8rem)}.section-container.editable-state.main-editor-state.cdk-drag-preview{box-shadow:0 0 0 .125rem hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state.main-editor-state.cdk-drag-placeholder{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.section-container.editable-state.main-editor-state.cdk-drag-placeholder:hover,.section-container.editable-state.main-editor-state.cdk-drag-placeholder.show-hover-state{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)!important}.section-container.editable-state.main-editor-state:hover:not(.section-is-dragging),.section-container.editable-state.main-editor-state.show-hover-state:not(.section-is-dragging){box-shadow:0 0 0 .125rem hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state.main-editor-state .section-toolbar ::ng-deep .pep-draggable-item-container{box-shadow:0 0 0 .125rem hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state .section-background .back-template{background-color:#bec3e5;border-right:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}.section-container.editable-state .columns-wrapper .section-column{border:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}.section-container.editable-state .columns-wrapper .section-column.active-column{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.section-container.editable-state .columns-wrapper .section-column.cdk-drop-list-dragging{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.section-container.editable-state .columns-wrapper .section-column.already-contains-block:hover{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).horizontal{border-left:unset}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).horizontal.cdk-drop-list-dragging{border-left:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).vertical{border-top:unset}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).vertical.cdk-drop-list-dragging{border-top:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}\n"] }]
|
|
1235
|
+
args: [{ selector: 'section', template: "<div #sectionContainer *ngIf=\"editable || (containsBlocks && !hideForCurrentScreenType)\" class=\"section-container \"\n [ngStyle]=\"getPadding()\"\n [ngClass]=\"{ \n 'mobile': screenType === 'Phablet',\n 'editable-state': editable, 'main-editor-state': isMainEditorState, 'default-height': shouldSetDefaultHeight, 'active-section': isEditing,\n 'section-hidden-state': hideForCurrentScreenType, 'section-is-dragging': draggingSectionKey !== '', 'show-hover-state': hoverState }\" \n cdkDragBoundary=\".layout-builder-wrapper\" cdkDrag [cdkDragData]=\"key\" [cdkDragDisabled]=\"!editable || selectedSectionKey.length > 0 || selectedBlockKey.length > 0\" (cdkDragStarted)=\"onDragStart($event)\" (cdkDragEnded)=\"onDragEnd($event)\" \n >\n <pep-draggable-item *ngIf=\"editable && isMainEditorState && draggingSectionKey === ''\" cdkDragHandle style=\"cursor: grab;\"\n class=\"section-toolbar\" [ngClass]=\"{ 'hide-toolbar': !hoverState }\" [title]=\"name\">\n <ng-container pep-actions>\n <pep-button classNames=\"caution\" sizeType=\"xs\" iconName=\"system_bin\" (buttonClick)=\"onRemoveSectionClick();\"></pep-button>\n <hide-in [hideIn]=\"hideIn\" (hideInChange)=\"onHideSectionChange($event)\" (menuClosed)=\"onHideInMenuClosed()\" (menuOpened)=\"onHideInMenuOpened()\"></hide-in>\n <pep-button sizeType=\"xs\" iconName=\"system_edit\" (buttonClick)=\"onEditSectionClick();\"></pep-button>\n </ng-container>\n </pep-draggable-item>\n\n <div *ngIf=\"editable\" class=\"section-background\">\n <div class=\"back-template\" *ngFor=\"let number of [0,1,2,3,4,5,6,7,8,9,10,11]\"></div>\n </div>\n <div #columnsWrapper class=\"columns-wrapper gap-{{ columnsGap }}\" \n [ngClass]=\"{ 'mobile': screenType === 'Phablet', 'is-dragging': editable && getIsDragging }\">\n <ng-container *ngFor=\"let column of columns; let i=index;\">\n \n <!-- This is moved to the section-block component cause when we change to work with 'grid-column' style we have to draw the columns.\n *ngIf=\"editable || (column.BlockContainer && column.BlockContainer.BlockKey && column.BlockContainer.BlockKey.length > 0 && !getIsHidden(column?.BlockContainer?.Hide, screenType))\" \n -->\n <div *ngIf=\"editable || isHorizontalView || (column.BlockContainer && column.BlockContainer.BlockKey && column.BlockContainer.BlockKey.length > 0)\"\n [id]=\"sectionColumnKeyPrefix + i\" \n class=\"section-column {{isHorizontalView ? 'horizontal' : 'vertical'}}\"\n [ngClass]=\"{ 'active-column': selectedBlockKey === column.BlockContainer?.BlockKey, \n 'is-hidden': getIsHidden(column?.BlockContainer?.Hide, screenType),\n 'already-contains-block': editable && column.BlockContainer && column.BlockContainer.BlockKey && column.BlockContainer.BlockKey.length > 0 && \n draggingBlockKey && draggingBlockKey.length > 0 && column.BlockContainer.BlockKey !== draggingBlockKey }\"\n cdkDropList\n [cdkDropListData]=\"column\"\n [cdkDropListOrientation]=\"isHorizontalView ? 'horizontal' : 'vertical'\" \n [cdkDropListConnectedTo]=\"sectionsColumnsDropList\"\n (cdkDropListDropped)=\"onBlockDropped($event)\"\n [cdkDropListEnterPredicate]=\"canDropPredicate(i)\"\n >\n <section-block *ngIf=\"column.BlockContainer?.BlockKey\" \n class=\"section-block\" [sectionKey]=\"key\" [blockTemplate]=\"blockTemplate\"\n [blockContainer]=\"column.BlockContainer\" [editable]=\"editable\" [isMainEditorState]=\"isMainEditorState\" [sectionHeight]=\"styleHeight\"\n [active]=\"selectedBlockKey === column.BlockContainer?.BlockKey\" [screenType]=\"screenType\"\n (dragExited)=\"onSectionBlockDragExited($event)\" (dragEntered)=\"onSectionBlockDragEntered($event)\"></section-block>\n </div>\n </ng-container>\n </div>\n</div>\n", styles: [".section-container{position:relative;display:grid;height:100%;max-height:inherit}.section-container.editable-state{min-height:2.5rem}.section-container.editable-state.default-height{min-height:16rem}.section-container.editable-state.active-section{z-index:11}.section-container.editable-state.active-section .columns-wrapper{z-index:1}.section-container.editable-state.active-section ::ng-deep .block-template-wrapper .block-template{pointer-events:unset!important;opacity:unset!important}.section-container.editable-state.cdk-drag-placeholder{opacity:.5}.section-container.editable-state:not(.cdk-drag-placeholder):hover .section-toolbar,.section-container.editable-state:not(.cdk-drag-placeholder).show-hover-state .section-toolbar{display:block!important}.section-container.editable-state:not(.cdk-drag-preview) .hide-toolbar{display:none}.section-container.editable-state.main-editor-state .mobile .is-hidden{display:none}.section-container.editable-state .mobile .is-hidden{display:block}.section-container.editable-state .section-toolbar{position:absolute;top:0;height:2.625rem;z-index:11}.section-container.editable-state .section-toolbar ::ng-deep .pep-draggable-item-container{border-radius:0 0 var(--pep-border-radius-md, .25rem) 0}.section-container.editable-state .section-background{position:absolute;width:100%;height:100%;z-index:0;display:grid;grid-template-columns:repeat(12,1fr)}.section-container.editable-state .section-background .back-template{opacity:.1}.section-container.editable-state .section-background .back-template:last-of-type{border-right:0 none}.section-container .columns-wrapper{display:grid;grid-auto-flow:column;height:inherit;max-height:inherit;overflow:inherit}.section-container .columns-wrapper.is-dragging{overflow:unset}.section-container .columns-wrapper.gap-none{gap:0}.section-container .columns-wrapper.gap-sm{gap:var(--pep-spacing-sm, .5rem)}.section-container .columns-wrapper.gap-md{gap:var(--pep-spacing-lg, 1rem)}.section-container .columns-wrapper.gap-lg{gap:var(--pep-spacing-2xl, 2rem)}.section-container .columns-wrapper .section-column{position:relative;height:inherit;max-height:inherit;overflow:inherit}.section-container .columns-wrapper .section-column .section-block{height:inherit;max-height:inherit}\n", ".section-container{background:transparent}.section-container.editable-state.active-section{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.section-container.editable-state.active-section .columns-wrapper{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.section-container.editable-state.section-hidden-state:not(.active-section){background:repeating-linear-gradient(45deg,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0),hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .8rem),repeating-linear-gradient(-45deg,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0),hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),0) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .65rem,hsla(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%),.32) .8rem)}.section-container.editable-state.main-editor-state.cdk-drag-preview{box-shadow:0 0 0 .125rem hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state.main-editor-state.cdk-drag-placeholder{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.section-container.editable-state.main-editor-state.cdk-drag-placeholder:hover,.section-container.editable-state.main-editor-state.cdk-drag-placeholder.show-hover-state{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)!important}.section-container.editable-state.main-editor-state:hover:not(.section-is-dragging),.section-container.editable-state.main-editor-state.show-hover-state:not(.section-is-dragging){box-shadow:0 0 0 .125rem hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state.main-editor-state .section-toolbar ::ng-deep .pep-draggable-item-container{box-shadow:0 0 0 .125rem hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state .section-background .back-template{background-color:#bec3e5;border-right:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}.section-container.editable-state .columns-wrapper .section-column{border:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}.section-container.editable-state .columns-wrapper .section-column.active-column{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.section-container.editable-state .columns-wrapper .section-column.cdk-drop-list-dragging{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.section-container.editable-state .columns-wrapper .section-column.already-contains-block:hover{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).horizontal{border-left:unset}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).horizontal.cdk-drop-list-dragging{border-left:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).vertical{border-top:unset}.section-container.editable-state .columns-wrapper.gap-none .section-column:not(.section-container.editable-state .columns-wrapper.gap-none .section-column:first-of-type).vertical.cdk-drop-list-dragging{border-top:.125rem dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%))}\n"] }]
|
|
1213
1236
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: LayoutBuilderInternalService }]; }, propDecorators: { sectionContainerRef: [{
|
|
1214
1237
|
type: ViewChild,
|
|
1215
1238
|
args: ['sectionContainer']
|
|
@@ -1228,6 +1251,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1228
1251
|
type: Input
|
|
1229
1252
|
}], collapseOnTablet: [{
|
|
1230
1253
|
type: Input
|
|
1254
|
+
}], padding: [{
|
|
1255
|
+
type: Input
|
|
1231
1256
|
}], columns: [{
|
|
1232
1257
|
type: Input
|
|
1233
1258
|
}], hideIn: [{
|
|
@@ -1244,16 +1269,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1244
1269
|
|
|
1245
1270
|
class SectionBlockModule {
|
|
1246
1271
|
}
|
|
1247
|
-
SectionBlockModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1248
|
-
SectionBlockModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1272
|
+
SectionBlockModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionBlockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1273
|
+
SectionBlockModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SectionBlockModule, declarations: [SectionBlockComponent], imports: [CommonModule,
|
|
1249
1274
|
DragDropModule,
|
|
1250
1275
|
PepButtonModule,
|
|
1251
1276
|
PepDraggableItemsModule], exports: [SectionBlockComponent] });
|
|
1252
|
-
SectionBlockModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1277
|
+
SectionBlockModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionBlockModule, imports: [CommonModule,
|
|
1253
1278
|
DragDropModule,
|
|
1254
1279
|
PepButtonModule,
|
|
1255
1280
|
PepDraggableItemsModule] });
|
|
1256
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionBlockModule, decorators: [{
|
|
1257
1282
|
type: NgModule,
|
|
1258
1283
|
args: [{
|
|
1259
1284
|
declarations: [
|
|
@@ -1271,21 +1296,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1271
1296
|
|
|
1272
1297
|
class SectionModule {
|
|
1273
1298
|
}
|
|
1274
|
-
SectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1275
|
-
SectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1299
|
+
SectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1300
|
+
SectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SectionModule, declarations: [SectionComponent], imports: [CommonModule,
|
|
1276
1301
|
DragDropModule,
|
|
1277
1302
|
PepButtonModule,
|
|
1278
1303
|
SectionBlockModule,
|
|
1279
1304
|
HideInModule,
|
|
1280
1305
|
PepDraggableItemsModule, i1.TranslateModule], exports: [SectionComponent] });
|
|
1281
|
-
SectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1306
|
+
SectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionModule, imports: [CommonModule,
|
|
1282
1307
|
DragDropModule,
|
|
1283
1308
|
PepButtonModule,
|
|
1284
1309
|
SectionBlockModule,
|
|
1285
1310
|
HideInModule,
|
|
1286
1311
|
PepDraggableItemsModule,
|
|
1287
1312
|
TranslateModule.forChild()] });
|
|
1288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionModule, decorators: [{
|
|
1289
1314
|
type: NgModule,
|
|
1290
1315
|
args: [{
|
|
1291
1316
|
declarations: [SectionComponent],
|
|
@@ -1302,293 +1327,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1302
1327
|
}]
|
|
1303
1328
|
}] });
|
|
1304
1329
|
|
|
1305
|
-
class
|
|
1306
|
-
constructor(
|
|
1307
|
-
// public customizationService: PepCustomizationService,
|
|
1308
|
-
// public layoutService: PepLayoutService,
|
|
1309
|
-
layoutBuilderInternalService, hostElement, renderer) {
|
|
1330
|
+
class PepLayoutBuilderEditorComponent extends BaseDestroyerDirective {
|
|
1331
|
+
constructor(hostElement, renderer) {
|
|
1310
1332
|
super();
|
|
1311
|
-
this.layoutBuilderInternalService = layoutBuilderInternalService;
|
|
1312
1333
|
this.hostElement = hostElement;
|
|
1313
1334
|
this.renderer = renderer;
|
|
1314
|
-
this.
|
|
1315
|
-
this.
|
|
1316
|
-
this.layoutViewChange = new EventEmitter();
|
|
1317
|
-
this.screenTypeChange = new EventEmitter();
|
|
1318
|
-
this._horizontalSpacing = 'md';
|
|
1319
|
-
this._verticalSpacing = 'md';
|
|
1320
|
-
this.paddingInline = '1rem';
|
|
1321
|
-
this.previewMode = false;
|
|
1322
|
-
this._sectionsSubject = new BehaviorSubject([]);
|
|
1323
|
-
this.renderer.addClass(this.hostElement.nativeElement, 'pep-layout');
|
|
1335
|
+
this.editorTabs = [];
|
|
1336
|
+
this.renderer.addClass(this.hostElement.nativeElement, 'pep-layout-builder-editor');
|
|
1324
1337
|
}
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1338
|
+
}
|
|
1339
|
+
PepLayoutBuilderEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderEditorComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1340
|
+
PepLayoutBuilderEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepLayoutBuilderEditorComponent, selector: "pep-layout-builder-editor", inputs: { editorTabs: "editorTabs" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"editorTabs && editorTabs.length > 0 then tabsTemplate else regularTemplate\">\n</ng-container>\n<ng-template #tabsTemplate>\n <mat-tab-group #tabGroup class=\"layout-builder-editor-tabs\" animationDuration=\"0ms\">\n <mat-tab *ngFor=\"let tab of editorTabs\" label=\"{{tab.title | translate}}\">\n <div class=\"layout-builder-editor-tab\">\n <ng-container *ngIf=\"tab.templateRef\">\n <ng-container *ngTemplateOutlet=\"tab.templateRef; context: { tabKey: tab.key }\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!tab.templateRef\">\n <ng-content></ng-content>\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n</ng-template>\n<ng-template #regularTemplate>\n <div class=\"layout-builder-editor-container\">\n <ng-content></ng-content>\n </div>\n</ng-template>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$2.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i2$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
1341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderEditorComponent, decorators: [{
|
|
1342
|
+
type: Component,
|
|
1343
|
+
args: [{ selector: 'pep-layout-builder-editor', template: "<ng-container *ngIf=\"editorTabs && editorTabs.length > 0 then tabsTemplate else regularTemplate\">\n</ng-container>\n<ng-template #tabsTemplate>\n <mat-tab-group #tabGroup class=\"layout-builder-editor-tabs\" animationDuration=\"0ms\">\n <mat-tab *ngFor=\"let tab of editorTabs\" label=\"{{tab.title | translate}}\">\n <div class=\"layout-builder-editor-tab\">\n <ng-container *ngIf=\"tab.templateRef\">\n <ng-container *ngTemplateOutlet=\"tab.templateRef; context: { tabKey: tab.key }\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!tab.templateRef\">\n <ng-content></ng-content>\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n</ng-template>\n<ng-template #regularTemplate>\n <div class=\"layout-builder-editor-container\">\n <ng-content></ng-content>\n </div>\n</ng-template>" }]
|
|
1344
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { editorTabs: [{
|
|
1345
|
+
type: Input
|
|
1346
|
+
}] } });
|
|
1347
|
+
|
|
1348
|
+
class MainEditorComponent extends BaseDestroyerDirective {
|
|
1349
|
+
set hostObject(value) {
|
|
1350
|
+
this._hostObject = value;
|
|
1351
|
+
this.isFullWidth = !value.maxWidth || value.maxWidth === 0;
|
|
1352
|
+
this.maxWidth = value.maxWidth;
|
|
1353
|
+
this.horizontalSpacing = this._hostObject.horizontalSpacing || 'md';
|
|
1354
|
+
this.verticalSpacing = this._hostObject.verticalSpacing || 'md';
|
|
1355
|
+
this.sectionsGap = this._hostObject.sectionsGap || 'md';
|
|
1356
|
+
this.columnsGap = this._hostObject.columnsGap || 'md';
|
|
1357
|
+
this.roundedCorners = this._hostObject.roundedCorners || 'none';
|
|
1328
1358
|
}
|
|
1329
|
-
get
|
|
1330
|
-
return this.
|
|
1359
|
+
get hostObject() {
|
|
1360
|
+
return this._hostObject;
|
|
1331
1361
|
}
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
this.
|
|
1341
|
-
this.
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
this.
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
}
|
|
1355
|
-
convertLayoutSizeType(size) {
|
|
1356
|
-
let res;
|
|
1357
|
-
if (size === 'lg') {
|
|
1358
|
-
res = '2rem';
|
|
1359
|
-
}
|
|
1360
|
-
else if (size === 'md') {
|
|
1361
|
-
res = '1rem';
|
|
1362
|
-
}
|
|
1363
|
-
else if (size === 'sm') {
|
|
1364
|
-
res = '0.5rem';
|
|
1365
|
-
}
|
|
1366
|
-
else {
|
|
1367
|
-
res = '0';
|
|
1368
|
-
}
|
|
1369
|
-
return res;
|
|
1370
|
-
}
|
|
1371
|
-
animateSkeleton() {
|
|
1372
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1373
|
-
if (this._showSkeleton) {
|
|
1374
|
-
// this.sectionsContainer?.nativeElement?.classList.add('out');
|
|
1375
|
-
(_b = (_a = this.sectionsContainer) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.classList.remove('in');
|
|
1376
|
-
(_d = (_c = this.skeletonContainer) === null || _c === void 0 ? void 0 : _c.nativeElement) === null || _d === void 0 ? void 0 : _d.classList.add('in');
|
|
1377
|
-
// this.skeletonContainer?.nativeElement?.classList.remove('out');
|
|
1378
|
-
}
|
|
1379
|
-
else {
|
|
1380
|
-
(_f = (_e = this.sectionsContainer) === null || _e === void 0 ? void 0 : _e.nativeElement) === null || _f === void 0 ? void 0 : _f.classList.add('in');
|
|
1381
|
-
// this.sectionsContainer?.nativeElement?.classList.remove('out');
|
|
1382
|
-
// this.skeletonContainer?.nativeElement?.classList.add('out');
|
|
1383
|
-
(_h = (_g = this.skeletonContainer) === null || _g === void 0 ? void 0 : _g.nativeElement) === null || _h === void 0 ? void 0 : _h.classList.remove('in');
|
|
1384
|
-
}
|
|
1385
|
-
}
|
|
1386
|
-
setLayoutDataProperties() {
|
|
1387
|
-
var _a;
|
|
1388
|
-
const layoutView = this._layoutView;
|
|
1389
|
-
if (layoutView) {
|
|
1390
|
-
if ((_a = this.sectionsContainer) === null || _a === void 0 ? void 0 : _a.nativeElement) {
|
|
1391
|
-
const maxWidth = coerceNumberProperty(layoutView.Layout.MaxWidth, 0);
|
|
1392
|
-
const maxWidthToSet = maxWidth === 0 ? 'unset' : `${maxWidth}px`;
|
|
1393
|
-
this.renderer.setStyle(this.sectionsContainer.nativeElement, 'max-width', maxWidthToSet);
|
|
1394
|
-
}
|
|
1395
|
-
this.sectionsGap = layoutView.Layout.SectionsGap || 'md';
|
|
1396
|
-
this.columnsGap = layoutView.Layout.ColumnsGap || 'md';
|
|
1397
|
-
this.horizontalSpacing = layoutView.Layout.HorizontalSpacing;
|
|
1398
|
-
this.verticalSpacing = layoutView.Layout.VerticalSpacing;
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
setScreentType(screenSize) {
|
|
1402
|
-
const screenType = this.layoutBuilderInternalService.getScreenType(screenSize);
|
|
1403
|
-
this.selectedScreenType = screenType;
|
|
1404
|
-
this.screenTypeChange.emit(screenType);
|
|
1405
|
-
}
|
|
1406
|
-
ngOnInit() {
|
|
1407
|
-
/***********************************************************************************************/
|
|
1408
|
-
/* Internal Events - for code usage
|
|
1409
|
-
/***********************************************************************************************/
|
|
1410
|
-
if (this.layoutBuilderInternalService.editMode) {
|
|
1411
|
-
this.layoutBuilderInternalService.previewModeChange$.pipe(this.getDestroyer()).subscribe((previewMode) => {
|
|
1412
|
-
this.previewMode = previewMode;
|
|
1413
|
-
});
|
|
1414
|
-
}
|
|
1415
|
-
this.layoutBuilderInternalService.sectionsChange$.pipe(this.getDestroyer()).subscribe((sections) => {
|
|
1416
|
-
this._sectionsSubject.next(sections);
|
|
1417
|
-
});
|
|
1418
|
-
this.layoutBuilderInternalService.showSkeletonChange$.pipe(this.getDestroyer()).subscribe((showSkeleton) => {
|
|
1419
|
-
if (showSkeleton !== undefined) {
|
|
1420
|
-
this._showSkeleton = showSkeleton;
|
|
1421
|
-
this.animateSkeleton();
|
|
1422
|
-
}
|
|
1423
|
-
});
|
|
1424
|
-
// this.layoutService.onResize$.pipe(this.getDestroyer()).subscribe((size: any) => {
|
|
1425
|
-
// this.setScreentType(size);
|
|
1426
|
-
// });
|
|
1427
|
-
this.layoutBuilderInternalService.screenSizeChange$.pipe(this.getDestroyer()).subscribe((size) => {
|
|
1428
|
-
this.setScreentType(size);
|
|
1429
|
-
});
|
|
1430
|
-
/***********************************************************************************************/
|
|
1431
|
-
/* External Events - for raise to the client
|
|
1432
|
-
/***********************************************************************************************/
|
|
1433
|
-
this.layoutBuilderInternalService.layoutViewChange$.pipe(this.getDestroyer()).subscribe((layoutView) => {
|
|
1434
|
-
this._layoutView = layoutView;
|
|
1435
|
-
this.setLayoutDataProperties();
|
|
1436
|
-
this.layoutViewChange.emit(this._layoutView);
|
|
1437
|
-
});
|
|
1438
|
-
}
|
|
1439
|
-
getSectionsTemplateRows() {
|
|
1440
|
-
let gridAutoRows = '';
|
|
1441
|
-
// let fillHeightCount = 0;
|
|
1442
|
-
this.sections$.pipe(this.getDestroyer()).subscribe((sections) => {
|
|
1443
|
-
if (sections === null || sections === void 0 ? void 0 : sections.length) {
|
|
1444
|
-
sections.forEach((sec) => {
|
|
1445
|
-
if (sec.FillHeight === true) {
|
|
1446
|
-
// fillHeightCount++;
|
|
1447
|
-
gridAutoRows += ' auto';
|
|
1448
|
-
}
|
|
1449
|
-
else {
|
|
1450
|
-
gridAutoRows += ' min-content';
|
|
1451
|
-
}
|
|
1452
|
-
});
|
|
1453
|
-
//if all are fill height should return 1fr for all
|
|
1454
|
-
//if not should return auto for fill height and min content for none
|
|
1455
|
-
return gridAutoRows;
|
|
1456
|
-
}
|
|
1457
|
-
else {
|
|
1458
|
-
return '';
|
|
1459
|
-
}
|
|
1460
|
-
});
|
|
1461
|
-
return gridAutoRows;
|
|
1462
|
-
}
|
|
1463
|
-
onSectionDropped(event) {
|
|
1464
|
-
this.layoutBuilderInternalService.onSectionDropped(event);
|
|
1465
|
-
}
|
|
1466
|
-
onDragStart(event) {
|
|
1467
|
-
this.layoutBuilderInternalService.onSectionDragStart(event);
|
|
1468
|
-
}
|
|
1469
|
-
onDragEnd(event) {
|
|
1470
|
-
this.layoutBuilderInternalService.onSectionDragEnd(event);
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
PepLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutComponent, deps: [{ token: LayoutBuilderInternalService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1474
|
-
PepLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepLayoutComponent, selector: "pep-layout", inputs: { layoutView: "layoutView", blockTemplate: "blockTemplate", showSkeleton: "showSkeleton" }, outputs: { layoutViewChange: "layoutViewChange", screenTypeChange: "screenTypeChange" }, host: { properties: { "style.padding-inline": "this.paddingInline" } }, viewQueries: [{ propertyName: "skeletonContainer", first: true, predicate: ["skeletonCont"], descendants: true, static: true }, { propertyName: "sectionsContainer", first: true, predicate: ["sectionsCont"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<!-- For the top spacing -->\n<div class=\"top-spacing spacing-{{verticalSpacing}}\" ></div>\n<div #sectionsCont cdkDropListGroup class=\"sections-container gap-{{ sectionsGap }}\" [ngClass]=\"{'preview-state': previewMode }\" \n cdkDropList (cdkDropListDropped)=\"onSectionDropped($event)\" [ngStyle]=\"{'grid-auto-rows': getSectionsTemplateRows()}\"\n >\n <section *ngFor=\"let section of sections$ | async; let i=index;\" \n class=\"draggable-section \" [ngClass]=\"selectedScreenType === 'Phablet' ? 'margin-'+sectionsGap : ''\" [blockTemplate]=\"blockTemplate\"\n [key]=\"section.Key\" [name]=\"section.Name || ('LAYOUT_BUILDER.SECTION' | translate) + ' ' + (i+1)\" [split]=\"section.Split\" [height]=\"section.Height\"\n [columns]=\"section.Columns\" [collapseOnTablet]=\"section.CollapseOnTablet || false\" [hideIn]=\"section.Hide || []\" [columnsGap]=\"columnsGap\"\n >\n </section>\n</div>\n<div #skeletonCont class=\"skeleton-container \">\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"xl\" ></pep-skeleton-loader>\n <div class=\"split-skeleton-container\">\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"max\" ></pep-skeleton-loader>\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"max\" ></pep-skeleton-loader>\n </div>\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"xl\" ></pep-skeleton-loader>\n\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"max\" ></pep-skeleton-loader>\n</div>\n<!-- For the bottom spacing -->\n<div class=\"bottom-spacing spacing-{{verticalSpacing}}\"></div>\n<pep-size-detector></pep-size-detector>", styles: [":host{display:grid;grid-template-areas:\"top-spacing\" \"content\" \"bottom-spacing\";grid-template-rows:auto 1fr auto;height:100%}.top-spacing{grid-area:top-spacing}.top-spacing.spacing-none{height:0}.top-spacing.spacing-sm{height:var(--pep-spacing-sm, .5rem)}.top-spacing.spacing-md{height:var(--pep-spacing-lg, 1rem)}.top-spacing.spacing-lg{height:var(--pep-spacing-2xl, 2rem)}.bottom-spacing{grid-area:bottom-spacing}.bottom-spacing.spacing-none{height:0}.bottom-spacing.spacing-sm{height:var(--pep-spacing-sm, .5rem)}.bottom-spacing.spacing-md{height:var(--pep-spacing-lg, 1rem)}.bottom-spacing.spacing-lg{height:var(--pep-spacing-2xl, 2rem)}.skeleton-container{display:grid;grid-area:content;height:100%;gap:var(--pep-spacing-lg, 1rem);grid-template-rows:auto auto auto 1fr;opacity:0}.skeleton-container .split-skeleton-container{display:grid;height:10rem;gap:var(--pep-spacing-lg, 1rem);grid-auto-flow:column}.sections-container{z-index:11;grid-area:content;width:100%;max-width:inherit;overflow-x:unset;margin:0 auto;position:relative;display:grid;grid-row:1px;height:inherit;opacity:0}.sections-container.gap-none{gap:0}.sections-container.gap-sm{gap:var(--pep-spacing-sm, .5rem)}.sections-container.gap-md{gap:var(--pep-spacing-lg, 1rem)}.sections-container.gap-lg{gap:var(--pep-spacing-2xl, 2rem)}.sections-container .draggable-section{display:block}.sections-container.preview-state section{display:contents}@keyframes in{0%{opacity:0;transform:translateY(-80);filter:blur(20px)}to{transform:translateY(0);opacity:1;filter:blur(0)}}.in{animation-name:in;animation-direction:normal;animation-duration:1.2s;animation-fill-mode:forwards}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3$3.PepSkeletonLoaderComponent, selector: "pep-skeleton-loader", inputs: ["rowHeightType", "rowsNumber", "lastRowOffset"] }, { kind: "component", type: i4$2.PepSizeDetectorComponent, selector: "pep-size-detector", inputs: ["showScreenSize", "useAsWebComponent"], outputs: ["sizeChange"] }, { kind: "directive", type: i3$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$2.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "component", type: SectionComponent, selector: "section", inputs: ["blockTemplate", "key", "name", "split", "height", "collapseOnTablet", "columns", "hideIn", "columnsGap"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
1475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutComponent, decorators: [{
|
|
1476
|
-
type: Component,
|
|
1477
|
-
args: [{ selector: 'pep-layout', template: "<!-- For the top spacing -->\n<div class=\"top-spacing spacing-{{verticalSpacing}}\" ></div>\n<div #sectionsCont cdkDropListGroup class=\"sections-container gap-{{ sectionsGap }}\" [ngClass]=\"{'preview-state': previewMode }\" \n cdkDropList (cdkDropListDropped)=\"onSectionDropped($event)\" [ngStyle]=\"{'grid-auto-rows': getSectionsTemplateRows()}\"\n >\n <section *ngFor=\"let section of sections$ | async; let i=index;\" \n class=\"draggable-section \" [ngClass]=\"selectedScreenType === 'Phablet' ? 'margin-'+sectionsGap : ''\" [blockTemplate]=\"blockTemplate\"\n [key]=\"section.Key\" [name]=\"section.Name || ('LAYOUT_BUILDER.SECTION' | translate) + ' ' + (i+1)\" [split]=\"section.Split\" [height]=\"section.Height\"\n [columns]=\"section.Columns\" [collapseOnTablet]=\"section.CollapseOnTablet || false\" [hideIn]=\"section.Hide || []\" [columnsGap]=\"columnsGap\"\n >\n </section>\n</div>\n<div #skeletonCont class=\"skeleton-container \">\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"xl\" ></pep-skeleton-loader>\n <div class=\"split-skeleton-container\">\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"max\" ></pep-skeleton-loader>\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"max\" ></pep-skeleton-loader>\n </div>\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"xl\" ></pep-skeleton-loader>\n\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"max\" ></pep-skeleton-loader>\n</div>\n<!-- For the bottom spacing -->\n<div class=\"bottom-spacing spacing-{{verticalSpacing}}\"></div>\n<pep-size-detector></pep-size-detector>", styles: [":host{display:grid;grid-template-areas:\"top-spacing\" \"content\" \"bottom-spacing\";grid-template-rows:auto 1fr auto;height:100%}.top-spacing{grid-area:top-spacing}.top-spacing.spacing-none{height:0}.top-spacing.spacing-sm{height:var(--pep-spacing-sm, .5rem)}.top-spacing.spacing-md{height:var(--pep-spacing-lg, 1rem)}.top-spacing.spacing-lg{height:var(--pep-spacing-2xl, 2rem)}.bottom-spacing{grid-area:bottom-spacing}.bottom-spacing.spacing-none{height:0}.bottom-spacing.spacing-sm{height:var(--pep-spacing-sm, .5rem)}.bottom-spacing.spacing-md{height:var(--pep-spacing-lg, 1rem)}.bottom-spacing.spacing-lg{height:var(--pep-spacing-2xl, 2rem)}.skeleton-container{display:grid;grid-area:content;height:100%;gap:var(--pep-spacing-lg, 1rem);grid-template-rows:auto auto auto 1fr;opacity:0}.skeleton-container .split-skeleton-container{display:grid;height:10rem;gap:var(--pep-spacing-lg, 1rem);grid-auto-flow:column}.sections-container{z-index:11;grid-area:content;width:100%;max-width:inherit;overflow-x:unset;margin:0 auto;position:relative;display:grid;grid-row:1px;height:inherit;opacity:0}.sections-container.gap-none{gap:0}.sections-container.gap-sm{gap:var(--pep-spacing-sm, .5rem)}.sections-container.gap-md{gap:var(--pep-spacing-lg, 1rem)}.sections-container.gap-lg{gap:var(--pep-spacing-2xl, 2rem)}.sections-container .draggable-section{display:block}.sections-container.preview-state section{display:contents}@keyframes in{0%{opacity:0;transform:translateY(-80);filter:blur(20px)}to{transform:translateY(0);opacity:1;filter:blur(0)}}.in{animation-name:in;animation-direction:normal;animation-duration:1.2s;animation-fill-mode:forwards}\n"] }]
|
|
1478
|
-
}], ctorParameters: function () { return [{ type: LayoutBuilderInternalService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { skeletonContainer: [{
|
|
1479
|
-
type: ViewChild,
|
|
1480
|
-
args: ['skeletonCont', { static: true }]
|
|
1481
|
-
}], sectionsContainer: [{
|
|
1482
|
-
type: ViewChild,
|
|
1483
|
-
args: ['sectionsCont', { static: true }]
|
|
1484
|
-
}], layoutView: [{
|
|
1485
|
-
type: Input
|
|
1486
|
-
}], blockTemplate: [{
|
|
1487
|
-
type: Input
|
|
1488
|
-
}], showSkeleton: [{
|
|
1489
|
-
type: Input
|
|
1490
|
-
}], layoutViewChange: [{
|
|
1491
|
-
type: Output
|
|
1492
|
-
}], screenTypeChange: [{
|
|
1493
|
-
type: Output
|
|
1494
|
-
}], paddingInline: [{
|
|
1495
|
-
type: HostBinding,
|
|
1496
|
-
args: ['style.padding-inline']
|
|
1497
|
-
}] } });
|
|
1498
|
-
|
|
1499
|
-
class PepLayoutModule {
|
|
1500
|
-
}
|
|
1501
|
-
PepLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1502
|
-
PepLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutModule, declarations: [PepLayoutComponent], imports: [CommonModule,
|
|
1503
|
-
HttpClientModule,
|
|
1504
|
-
PepNgxLibModule,
|
|
1505
|
-
PepSkeletonLoaderModule,
|
|
1506
|
-
PepSizeDetectorModule,
|
|
1507
|
-
PepDialogModule,
|
|
1508
|
-
DragDropModule,
|
|
1509
|
-
SectionModule, i1.TranslateModule], exports: [PepLayoutComponent] });
|
|
1510
|
-
PepLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutModule, imports: [CommonModule,
|
|
1511
|
-
HttpClientModule,
|
|
1512
|
-
PepNgxLibModule,
|
|
1513
|
-
PepSkeletonLoaderModule,
|
|
1514
|
-
PepSizeDetectorModule,
|
|
1515
|
-
PepDialogModule,
|
|
1516
|
-
DragDropModule,
|
|
1517
|
-
SectionModule,
|
|
1518
|
-
TranslateModule.forChild()] });
|
|
1519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutModule, decorators: [{
|
|
1520
|
-
type: NgModule,
|
|
1521
|
-
args: [{
|
|
1522
|
-
declarations: [
|
|
1523
|
-
PepLayoutComponent,
|
|
1524
|
-
],
|
|
1525
|
-
imports: [
|
|
1526
|
-
CommonModule,
|
|
1527
|
-
HttpClientModule,
|
|
1528
|
-
PepNgxLibModule,
|
|
1529
|
-
PepSkeletonLoaderModule,
|
|
1530
|
-
PepSizeDetectorModule,
|
|
1531
|
-
PepDialogModule,
|
|
1532
|
-
DragDropModule,
|
|
1533
|
-
SectionModule,
|
|
1534
|
-
TranslateModule.forChild()
|
|
1535
|
-
],
|
|
1536
|
-
exports: [PepLayoutComponent],
|
|
1537
|
-
}]
|
|
1538
|
-
}] });
|
|
1539
|
-
|
|
1540
|
-
class PepLayoutBuilderEditorComponent extends BaseDestroyerDirective {
|
|
1541
|
-
constructor(hostElement, renderer) {
|
|
1542
|
-
super();
|
|
1543
|
-
this.hostElement = hostElement;
|
|
1544
|
-
this.renderer = renderer;
|
|
1545
|
-
this.editorTabs = [];
|
|
1546
|
-
this.renderer.addClass(this.hostElement.nativeElement, 'pep-layout-builder-editor');
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
PepLayoutBuilderEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderEditorComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1550
|
-
PepLayoutBuilderEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepLayoutBuilderEditorComponent, selector: "pep-layout-builder-editor", inputs: { editorTabs: "editorTabs" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"editorTabs && editorTabs.length > 0 then tabsTemplate else regularTemplate\">\n</ng-container>\n<ng-template #tabsTemplate>\n <mat-tab-group #tabGroup class=\"layout-builder-editor-tabs\" animationDuration=\"0ms\">\n <mat-tab *ngFor=\"let tab of editorTabs\" label=\"{{tab.title | translate}}\">\n <div class=\"layout-builder-editor-tab\">\n <ng-container *ngIf=\"tab.templateRef\">\n <ng-container *ngTemplateOutlet=\"tab.templateRef; context: { tabKey: tab.key }\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!tab.templateRef\">\n <ng-content></ng-content>\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n</ng-template>\n<ng-template #regularTemplate>\n <div class=\"layout-builder-editor-container\">\n <ng-content></ng-content>\n </div>\n</ng-template>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$2.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i2$2.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
1551
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderEditorComponent, decorators: [{
|
|
1552
|
-
type: Component,
|
|
1553
|
-
args: [{ selector: 'pep-layout-builder-editor', template: "<ng-container *ngIf=\"editorTabs && editorTabs.length > 0 then tabsTemplate else regularTemplate\">\n</ng-container>\n<ng-template #tabsTemplate>\n <mat-tab-group #tabGroup class=\"layout-builder-editor-tabs\" animationDuration=\"0ms\">\n <mat-tab *ngFor=\"let tab of editorTabs\" label=\"{{tab.title | translate}}\">\n <div class=\"layout-builder-editor-tab\">\n <ng-container *ngIf=\"tab.templateRef\">\n <ng-container *ngTemplateOutlet=\"tab.templateRef; context: { tabKey: tab.key }\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!tab.templateRef\">\n <ng-content></ng-content>\n </ng-container>\n </div>\n </mat-tab>\n </mat-tab-group>\n\n</ng-template>\n<ng-template #regularTemplate>\n <div class=\"layout-builder-editor-container\">\n <ng-content></ng-content>\n </div>\n</ng-template>" }]
|
|
1554
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { editorTabs: [{
|
|
1555
|
-
type: Input
|
|
1556
|
-
}] } });
|
|
1557
|
-
|
|
1558
|
-
class MainEditorComponent extends BaseDestroyerDirective {
|
|
1559
|
-
// protected showBottomContent = false;
|
|
1560
|
-
// onLoadFlowHostObject;
|
|
1561
|
-
// onChangeFlowHostObject;
|
|
1562
|
-
constructor(layoutBuilderInternalService, hostElement, renderer) {
|
|
1563
|
-
super();
|
|
1564
|
-
this.layoutBuilderInternalService = layoutBuilderInternalService;
|
|
1565
|
-
this.hostElement = hostElement;
|
|
1566
|
-
this.renderer = renderer;
|
|
1567
|
-
this.availableBlocksForDrag = [];
|
|
1568
|
-
this.hostObjectChange = new EventEmitter();
|
|
1569
|
-
this.horizontalSpacing = 'md';
|
|
1570
|
-
this.verticalSpacing = 'md';
|
|
1571
|
-
this.sectionsGap = 'md';
|
|
1572
|
-
this.columnsGap = 'md';
|
|
1573
|
-
this.roundedCorners = 'none';
|
|
1574
|
-
// protected sizesGroupButtons = Array<ISpacingOption>();
|
|
1575
|
-
this.availableBlocksContainerId = LayoutBuilderInternalService.AVAILABLE_BLOCKS_CONTAINER_ID;
|
|
1576
|
-
this.sectionsColumnsDropList = [];
|
|
1577
|
-
this.showTopContent = false;
|
|
1578
|
-
this.renderer.addClass(this.hostElement.nativeElement, 'pep-layout-main-editor');
|
|
1579
|
-
}
|
|
1580
|
-
set hostObject(value) {
|
|
1581
|
-
this._hostObject = value;
|
|
1582
|
-
this.isFullWidth = !value.maxWidth || value.maxWidth === 0;
|
|
1583
|
-
this.maxWidth = value.maxWidth;
|
|
1584
|
-
this.horizontalSpacing = this._hostObject.horizontalSpacing || 'md';
|
|
1585
|
-
this.verticalSpacing = this._hostObject.verticalSpacing || 'md';
|
|
1586
|
-
this.sectionsGap = this._hostObject.sectionsGap || 'md';
|
|
1587
|
-
this.columnsGap = this._hostObject.columnsGap || 'md';
|
|
1588
|
-
this.roundedCorners = this._hostObject.roundedCorners || 'none';
|
|
1589
|
-
}
|
|
1590
|
-
get hostObject() {
|
|
1591
|
-
return this._hostObject;
|
|
1362
|
+
// protected showBottomContent = false;
|
|
1363
|
+
// onLoadFlowHostObject;
|
|
1364
|
+
// onChangeFlowHostObject;
|
|
1365
|
+
constructor(hostElement, renderer) {
|
|
1366
|
+
super();
|
|
1367
|
+
this.hostElement = hostElement;
|
|
1368
|
+
this.renderer = renderer;
|
|
1369
|
+
this.availableBlocksForDrag = [];
|
|
1370
|
+
this.sectionsColumnsDropList = [];
|
|
1371
|
+
this.hostObjectChange = new EventEmitter();
|
|
1372
|
+
this.addSectionClick = new EventEmitter();
|
|
1373
|
+
this.onBlockDragStart = new EventEmitter();
|
|
1374
|
+
this.onBlockDragEnd = new EventEmitter();
|
|
1375
|
+
this.horizontalSpacing = 'md';
|
|
1376
|
+
this.verticalSpacing = 'md';
|
|
1377
|
+
this.sectionsGap = 'md';
|
|
1378
|
+
this.columnsGap = 'md';
|
|
1379
|
+
this.roundedCorners = 'none';
|
|
1380
|
+
// protected sizesGroupButtons = Array<ISpacingOption>();
|
|
1381
|
+
this.availableBlocksContainerId = LayoutBuilderInternalService.AVAILABLE_BLOCKS_CONTAINER_ID;
|
|
1382
|
+
this.showTopContent = false;
|
|
1383
|
+
this.renderer.addClass(this.hostElement.nativeElement, 'pep-layout-main-editor');
|
|
1592
1384
|
}
|
|
1593
1385
|
updateHostObject() {
|
|
1594
1386
|
this._hostObject.maxWidth = this.isFullWidth ? 0 : this.maxWidth;
|
|
@@ -1600,9 +1392,9 @@ class MainEditorComponent extends BaseDestroyerDirective {
|
|
|
1600
1392
|
this.hostObjectChange.emit(this.hostObject);
|
|
1601
1393
|
}
|
|
1602
1394
|
ngOnInit() {
|
|
1603
|
-
this.layoutBuilderInternalService.sectionsColumnsDropListChange$.subscribe((sectionsColumnsDropList) => {
|
|
1604
|
-
|
|
1605
|
-
});
|
|
1395
|
+
// this.layoutBuilderInternalService.sectionsColumnsDropListChange$.subscribe((sectionsColumnsDropList: any) => {
|
|
1396
|
+
// this.sectionsColumnsDropList = sectionsColumnsDropList;
|
|
1397
|
+
// });
|
|
1606
1398
|
}
|
|
1607
1399
|
ngAfterContentInit() {
|
|
1608
1400
|
var _a;
|
|
@@ -1614,7 +1406,7 @@ class MainEditorComponent extends BaseDestroyerDirective {
|
|
|
1614
1406
|
// }
|
|
1615
1407
|
}
|
|
1616
1408
|
onAddSectionClick(event) {
|
|
1617
|
-
this.
|
|
1409
|
+
this.addSectionClick.emit();
|
|
1618
1410
|
}
|
|
1619
1411
|
isFullWidthChange(isChecked) {
|
|
1620
1412
|
this.isFullWidth = isChecked;
|
|
@@ -1646,18 +1438,20 @@ class MainEditorComponent extends BaseDestroyerDirective {
|
|
|
1646
1438
|
this.updateHostObject();
|
|
1647
1439
|
}
|
|
1648
1440
|
onDragStart(event) {
|
|
1649
|
-
this.
|
|
1441
|
+
this.onBlockDragStart.emit(event);
|
|
1442
|
+
// this.layoutBuilderInternalService.onBlockDragStart(event);
|
|
1650
1443
|
}
|
|
1651
1444
|
onDragEnd(event) {
|
|
1652
|
-
this.
|
|
1445
|
+
this.onBlockDragEnd.emit(event);
|
|
1446
|
+
// this.layoutBuilderInternalService.onBlockDragEnd(event);
|
|
1653
1447
|
}
|
|
1654
1448
|
}
|
|
1655
|
-
MainEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1656
|
-
MainEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1449
|
+
MainEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MainEditorComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1450
|
+
MainEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MainEditorComponent, selector: "main-editor", inputs: { availableBlocksForDrag: "availableBlocksForDrag", sectionsColumnsDropList: "sectionsColumnsDropList", hostObject: "hostObject" }, outputs: { hostObjectChange: "hostObjectChange", addSectionClick: "addSectionClick", onBlockDragStart: "onBlockDragStart", onBlockDragEnd: "onBlockDragEnd" }, viewQueries: [{ propertyName: "_topContentRef", first: true, predicate: ["topContentRef"], descendants: true, static: true }, { propertyName: "availableBlocksContainer", first: true, predicate: ["availableBlocksContainer"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<pep-layout-builder-editor [editorTabs]=\"[\n {key: '1', title: 'LAYOUT_BUILDER.GENERAL', templateRef: firstTabTemplate}, \n {key: '2', title: 'LAYOUT_BUILDER.DESIGN', templateRef: secondTabTemplate}]\">\n</pep-layout-builder-editor>\n\n<ng-template #firstTabTemplate let-tabKey=\"tabKey\">\n <div #topContentRef class=\"layout-builder-editor-group\">\n <ng-content select=\"[layout-editor-top-content]\"></ng-content>\n <div *ngIf=\"showTopContent\" class=\"editor-separator\"></div>\n </div>\n <div>\n <label class=\"editor-title\">{{'LAYOUT_BUILDER.SECTIONS_TITLE' | translate}}</label>\n <pep-button class=\"add-section-button\" value=\"{{'LAYOUT_BUILDER.ADD_SECTION' | translate}}\" styleType=\"regular\" iconName=\"number_plus\" iconPosition=\"end\"\n (buttonClick)=\"onAddSectionClick($event)\"></pep-button>\n </div>\n <div class=\"editor-separator\"></div>\n <pep-draggable-items class=\"available-blocks\" [containerId]=\"availableBlocksContainerId\" [items]=\"availableBlocksForDrag\" [title]=\"'LAYOUT_BUILDER.BLOCKS_TITLE' | translate\"\n titleSizeType=\"xl\" titleType=\"with-bottom-border\" [showSearch]=\"true\" [dropAreaIds]=\"sectionsColumnsDropList\" (itemDragStarted)=\"onDragStart($event)\" (itemDragEnded)=\"onDragEnd($event)\">\n </pep-draggable-items>\n <!-- <div #bottomContentRef class=\"layout-builder-editor-group\">\n <div *ngIf=\"showBottomContent\" class=\"editor-separator\"></div>\n <ng-content select=\"[layout-editor-bottom-content]\"></ng-content>\n </div> -->\n</ng-template>\n\n<ng-template #secondTabTemplate let-tabKey=\"tabKey\">\n <div>\n <pep-checkbox class=\"checkbox-as-title\" [value]=\"isFullWidth\" [label]=\"'LAYOUT_BUILDER.FULL_WIDTH_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"isFullWidthChange($event)\"></pep-checkbox>\n <pep-textbox [label]=\"'LAYOUT_BUILDER.MAX_WIDTH_TITLE' | translate\" type=\"int\" [disabled]=\"isFullWidth\" [value]=\"maxWidth.toString()\" (valueChange)=\"onMaxWidthChange($event)\"></pep-textbox>\n </div>\n <div class=\"editor-separator\"></div>\n <!-- Spacing -->\n <pep-group-buttons-settings [groupType]=\"'sizes'\" \n [header]=\"'LAYOUT_BUILDER.SPACING_TITLE' | translate\" [subHeader]=\"'LAYOUT_BUILDER.SPACING_HORIZONTAL_TITLE' | translate\"\n [btnKey]=\"horizontalSpacing.toLowerCase()\" [excludeKeys]=\"['xs','xl','2xl']\" [useNone]=\"true\"\n (btnkeyChange)=\"setColumnsHorizntalGap($event)\">\n </pep-group-buttons-settings>\n <pep-group-buttons-settings [groupType]=\"'sizes'\" \n [subHeader]=\"'LAYOUT_BUILDER.SPACING_VERTICAL_TITLE' | translate\"\n [btnKey]=\"verticalSpacing.toLowerCase()\" [excludeKeys]=\"['xs','xl','2xl']\" [useNone]=\"true\"\n (btnkeyChange)=\"setColumnsVerticalGap($event)\">\n </pep-group-buttons-settings>\n <div class=\"editor-separator\"></div>\n <!-- Gaps -->\n <pep-group-buttons-settings [groupType]=\"'sizes'\" \n [header]=\"'LAYOUT_BUILDER.GAPS_TITLE' | translate\" [subHeader]=\"'LAYOUT_BUILDER.SECTIONS_GAP_TITLE' | translate\"\n [btnKey]=\"sectionsGap.toLowerCase()\" [excludeKeys]=\"['xs','xl','2xl']\" [useNone]=\"true\"\n (btnkeyChange)=\"setSectionGap($event)\">\n </pep-group-buttons-settings>\n <pep-group-buttons-settings [groupType]=\"'sizes'\" \n [subHeader]=\"'LAYOUT_BUILDER.COLUMNS_GAP_TITLE' | translate\"\n [btnKey]=\"columnsGap.toLowerCase()\" [excludeKeys]=\"['xs','xl','2xl']\" [useNone]=\"true\"\n (btnkeyChange)=\"setColumnsGap($event)\">\n </pep-group-buttons-settings>\n <!-- Rounded Corners -->\n <!--\n <div class=\"editor-separator\"></div>\n <label class=\"editor-title\">{{'LAYOUT_BUILDER.ROUNDED_CORNERS_TITLE' | translate}}</label><br>\n <label class=\"body-xs ellipsis\">{{'LAYOUT_BUILDER.BORDER_RADIUS_TITLE' | translate}}</label>\n <pep-group-buttons [buttons]=\"sizesGroupButtons\" [selectedButtonKey]=\"roundedCorners\" buttonsClass=\"ms regular\" viewType=\"toggle\"\n (buttonClick)=\"setRoundedCorners($event)\"></pep-group-buttons> -->\n</ng-template>\n", styles: [":host pep-draggable-items ::ng-deep .draggable-items-overflow{padding-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.PepTextboxComponent, selector: "pep-textbox", inputs: ["key", "value", "minFractionDigits", "maxFractionDigits", "accessory", "label", "placeholder", "type", "mandatory", "disabled", "readonly", "maxFieldCharacters", "hint", "textColor", "xAlignment", "rowSpan", "minValue", "maxValue", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType", "parentFieldKey", "regex", "regexError", "isInFocus"], outputs: ["valueChange", "keyup", "validationChange"] }, { kind: "component", type: i4$1.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i4$2.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: i5$2.GroupButtonsSettingsComponent, selector: "pep-group-buttons-settings", inputs: ["header", "subHeader", "groupType", "btnsArray", "excludeKeys", "useNone", "disabled", "dir", "titleSize", "bold", "btnKey"], outputs: ["btnkeyChange"] }, { kind: "component", type: i5$1.PepDraggableItemsComponent, selector: "pep-draggable-items", inputs: ["containerId", "showSearch", "title", "titleType", "titleSizeType", "itemPlaceholderType", "dropAreaIds", "items"], outputs: ["itemDragStarted", "itemDragEnded"] }, { kind: "component", type: PepLayoutBuilderEditorComponent, selector: "pep-layout-builder-editor", inputs: ["editorTabs"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
1451
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MainEditorComponent, decorators: [{
|
|
1658
1452
|
type: Component,
|
|
1659
1453
|
args: [{ selector: 'main-editor', template: "<pep-layout-builder-editor [editorTabs]=\"[\n {key: '1', title: 'LAYOUT_BUILDER.GENERAL', templateRef: firstTabTemplate}, \n {key: '2', title: 'LAYOUT_BUILDER.DESIGN', templateRef: secondTabTemplate}]\">\n</pep-layout-builder-editor>\n\n<ng-template #firstTabTemplate let-tabKey=\"tabKey\">\n <div #topContentRef class=\"layout-builder-editor-group\">\n <ng-content select=\"[layout-editor-top-content]\"></ng-content>\n <div *ngIf=\"showTopContent\" class=\"editor-separator\"></div>\n </div>\n <div>\n <label class=\"editor-title\">{{'LAYOUT_BUILDER.SECTIONS_TITLE' | translate}}</label>\n <pep-button class=\"add-section-button\" value=\"{{'LAYOUT_BUILDER.ADD_SECTION' | translate}}\" styleType=\"regular\" iconName=\"number_plus\" iconPosition=\"end\"\n (buttonClick)=\"onAddSectionClick($event)\"></pep-button>\n </div>\n <div class=\"editor-separator\"></div>\n <pep-draggable-items class=\"available-blocks\" [containerId]=\"availableBlocksContainerId\" [items]=\"availableBlocksForDrag\" [title]=\"'LAYOUT_BUILDER.BLOCKS_TITLE' | translate\"\n titleSizeType=\"xl\" titleType=\"with-bottom-border\" [showSearch]=\"true\" [dropAreaIds]=\"sectionsColumnsDropList\" (itemDragStarted)=\"onDragStart($event)\" (itemDragEnded)=\"onDragEnd($event)\">\n </pep-draggable-items>\n <!-- <div #bottomContentRef class=\"layout-builder-editor-group\">\n <div *ngIf=\"showBottomContent\" class=\"editor-separator\"></div>\n <ng-content select=\"[layout-editor-bottom-content]\"></ng-content>\n </div> -->\n</ng-template>\n\n<ng-template #secondTabTemplate let-tabKey=\"tabKey\">\n <div>\n <pep-checkbox class=\"checkbox-as-title\" [value]=\"isFullWidth\" [label]=\"'LAYOUT_BUILDER.FULL_WIDTH_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"isFullWidthChange($event)\"></pep-checkbox>\n <pep-textbox [label]=\"'LAYOUT_BUILDER.MAX_WIDTH_TITLE' | translate\" type=\"int\" [disabled]=\"isFullWidth\" [value]=\"maxWidth.toString()\" (valueChange)=\"onMaxWidthChange($event)\"></pep-textbox>\n </div>\n <div class=\"editor-separator\"></div>\n <!-- Spacing -->\n <pep-group-buttons-settings [groupType]=\"'sizes'\" \n [header]=\"'LAYOUT_BUILDER.SPACING_TITLE' | translate\" [subHeader]=\"'LAYOUT_BUILDER.SPACING_HORIZONTAL_TITLE' | translate\"\n [btnKey]=\"horizontalSpacing.toLowerCase()\" [excludeKeys]=\"['xs','xl','2xl']\" [useNone]=\"true\"\n (btnkeyChange)=\"setColumnsHorizntalGap($event)\">\n </pep-group-buttons-settings>\n <pep-group-buttons-settings [groupType]=\"'sizes'\" \n [subHeader]=\"'LAYOUT_BUILDER.SPACING_VERTICAL_TITLE' | translate\"\n [btnKey]=\"verticalSpacing.toLowerCase()\" [excludeKeys]=\"['xs','xl','2xl']\" [useNone]=\"true\"\n (btnkeyChange)=\"setColumnsVerticalGap($event)\">\n </pep-group-buttons-settings>\n <div class=\"editor-separator\"></div>\n <!-- Gaps -->\n <pep-group-buttons-settings [groupType]=\"'sizes'\" \n [header]=\"'LAYOUT_BUILDER.GAPS_TITLE' | translate\" [subHeader]=\"'LAYOUT_BUILDER.SECTIONS_GAP_TITLE' | translate\"\n [btnKey]=\"sectionsGap.toLowerCase()\" [excludeKeys]=\"['xs','xl','2xl']\" [useNone]=\"true\"\n (btnkeyChange)=\"setSectionGap($event)\">\n </pep-group-buttons-settings>\n <pep-group-buttons-settings [groupType]=\"'sizes'\" \n [subHeader]=\"'LAYOUT_BUILDER.COLUMNS_GAP_TITLE' | translate\"\n [btnKey]=\"columnsGap.toLowerCase()\" [excludeKeys]=\"['xs','xl','2xl']\" [useNone]=\"true\"\n (btnkeyChange)=\"setColumnsGap($event)\">\n </pep-group-buttons-settings>\n <!-- Rounded Corners -->\n <!--\n <div class=\"editor-separator\"></div>\n <label class=\"editor-title\">{{'LAYOUT_BUILDER.ROUNDED_CORNERS_TITLE' | translate}}</label><br>\n <label class=\"body-xs ellipsis\">{{'LAYOUT_BUILDER.BORDER_RADIUS_TITLE' | translate}}</label>\n <pep-group-buttons [buttons]=\"sizesGroupButtons\" [selectedButtonKey]=\"roundedCorners\" buttonsClass=\"ms regular\" viewType=\"toggle\"\n (buttonClick)=\"setRoundedCorners($event)\"></pep-group-buttons> -->\n</ng-template>\n", styles: [":host pep-draggable-items ::ng-deep .draggable-items-overflow{padding-bottom:0!important}\n"] }]
|
|
1660
|
-
}], ctorParameters: function () { return [{ type:
|
|
1454
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { _topContentRef: [{
|
|
1661
1455
|
type: ViewChild,
|
|
1662
1456
|
args: ['topContentRef', { static: true }]
|
|
1663
1457
|
}], availableBlocksContainer: [{
|
|
@@ -1665,141 +1459,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1665
1459
|
args: ['availableBlocksContainer', { read: ElementRef }]
|
|
1666
1460
|
}], availableBlocksForDrag: [{
|
|
1667
1461
|
type: Input
|
|
1462
|
+
}], sectionsColumnsDropList: [{
|
|
1463
|
+
type: Input
|
|
1668
1464
|
}], hostObject: [{
|
|
1669
1465
|
type: Input
|
|
1670
1466
|
}], hostObjectChange: [{
|
|
1671
1467
|
type: Output
|
|
1468
|
+
}], addSectionClick: [{
|
|
1469
|
+
type: Output
|
|
1470
|
+
}], onBlockDragStart: [{
|
|
1471
|
+
type: Output
|
|
1472
|
+
}], onBlockDragEnd: [{
|
|
1473
|
+
type: Output
|
|
1672
1474
|
}] } });
|
|
1673
1475
|
|
|
1674
|
-
class PepLayoutBuilderEditorModule {
|
|
1675
|
-
constructor() {
|
|
1676
|
-
//
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
PepLayoutBuilderEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1680
|
-
PepLayoutBuilderEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderEditorModule, declarations: [PepLayoutBuilderEditorComponent], imports: [CommonModule,
|
|
1681
|
-
HttpClientModule,
|
|
1682
|
-
OverlayModule,
|
|
1683
|
-
MatTabsModule,
|
|
1684
|
-
PepNgxLibModule, i1.TranslateModule], exports: [PepLayoutBuilderEditorComponent] });
|
|
1685
|
-
PepLayoutBuilderEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderEditorModule, imports: [CommonModule,
|
|
1686
|
-
HttpClientModule,
|
|
1687
|
-
OverlayModule,
|
|
1688
|
-
MatTabsModule,
|
|
1689
|
-
PepNgxLibModule,
|
|
1690
|
-
TranslateModule.forChild()] });
|
|
1691
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderEditorModule, decorators: [{
|
|
1692
|
-
type: NgModule,
|
|
1693
|
-
args: [{
|
|
1694
|
-
declarations: [
|
|
1695
|
-
PepLayoutBuilderEditorComponent
|
|
1696
|
-
],
|
|
1697
|
-
imports: [
|
|
1698
|
-
CommonModule,
|
|
1699
|
-
HttpClientModule,
|
|
1700
|
-
OverlayModule,
|
|
1701
|
-
MatTabsModule,
|
|
1702
|
-
PepNgxLibModule,
|
|
1703
|
-
TranslateModule.forChild()
|
|
1704
|
-
],
|
|
1705
|
-
exports: [PepLayoutBuilderEditorComponent]
|
|
1706
|
-
}]
|
|
1707
|
-
}], ctorParameters: function () { return []; } });
|
|
1708
|
-
|
|
1709
|
-
class MainEditorModule {
|
|
1710
|
-
constructor() {
|
|
1711
|
-
// this.pepIconRegistry.registerIcons(pepIcons);
|
|
1712
|
-
}
|
|
1713
|
-
}
|
|
1714
|
-
MainEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: MainEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1715
|
-
MainEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: MainEditorModule, declarations: [MainEditorComponent], imports: [CommonModule,
|
|
1716
|
-
HttpClientModule,
|
|
1717
|
-
DragDropModule,
|
|
1718
|
-
OverlayModule,
|
|
1719
|
-
MatTabsModule,
|
|
1720
|
-
MatSliderModule,
|
|
1721
|
-
PepNgxLibModule,
|
|
1722
|
-
PepSelectModule,
|
|
1723
|
-
PepTextboxModule,
|
|
1724
|
-
PepButtonModule,
|
|
1725
|
-
PepCheckboxModule,
|
|
1726
|
-
PepGroupButtonsModule,
|
|
1727
|
-
PepColorModule,
|
|
1728
|
-
PepImageModule,
|
|
1729
|
-
PepGroupButtonsSettingsModule,
|
|
1730
|
-
PepDraggableItemsModule,
|
|
1731
|
-
PepDialogModule,
|
|
1732
|
-
PepLayoutBuilderEditorModule, i1.TranslateModule], exports: [MainEditorComponent] });
|
|
1733
|
-
MainEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: MainEditorModule, imports: [CommonModule,
|
|
1734
|
-
HttpClientModule,
|
|
1735
|
-
DragDropModule,
|
|
1736
|
-
OverlayModule,
|
|
1737
|
-
MatTabsModule,
|
|
1738
|
-
MatSliderModule,
|
|
1739
|
-
PepNgxLibModule,
|
|
1740
|
-
PepSelectModule,
|
|
1741
|
-
PepTextboxModule,
|
|
1742
|
-
PepButtonModule,
|
|
1743
|
-
PepCheckboxModule,
|
|
1744
|
-
PepGroupButtonsModule,
|
|
1745
|
-
PepColorModule,
|
|
1746
|
-
PepImageModule,
|
|
1747
|
-
PepGroupButtonsSettingsModule,
|
|
1748
|
-
PepDraggableItemsModule,
|
|
1749
|
-
PepDialogModule,
|
|
1750
|
-
PepLayoutBuilderEditorModule,
|
|
1751
|
-
TranslateModule.forChild()] });
|
|
1752
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: MainEditorModule, decorators: [{
|
|
1753
|
-
type: NgModule,
|
|
1754
|
-
args: [{
|
|
1755
|
-
declarations: [
|
|
1756
|
-
MainEditorComponent
|
|
1757
|
-
],
|
|
1758
|
-
imports: [
|
|
1759
|
-
CommonModule,
|
|
1760
|
-
HttpClientModule,
|
|
1761
|
-
DragDropModule,
|
|
1762
|
-
OverlayModule,
|
|
1763
|
-
MatTabsModule,
|
|
1764
|
-
MatSliderModule,
|
|
1765
|
-
PepNgxLibModule,
|
|
1766
|
-
PepSelectModule,
|
|
1767
|
-
PepTextboxModule,
|
|
1768
|
-
PepButtonModule,
|
|
1769
|
-
PepCheckboxModule,
|
|
1770
|
-
PepGroupButtonsModule,
|
|
1771
|
-
PepColorModule,
|
|
1772
|
-
PepImageModule,
|
|
1773
|
-
PepGroupButtonsSettingsModule,
|
|
1774
|
-
PepDraggableItemsModule,
|
|
1775
|
-
PepDialogModule,
|
|
1776
|
-
PepLayoutBuilderEditorModule,
|
|
1777
|
-
TranslateModule.forChild()
|
|
1778
|
-
],
|
|
1779
|
-
exports: [MainEditorComponent]
|
|
1780
|
-
}]
|
|
1781
|
-
}], ctorParameters: function () { return []; } });
|
|
1782
|
-
|
|
1783
1476
|
class SectionEditorComponent {
|
|
1784
|
-
constructor(translate, dialog) {
|
|
1785
|
-
this.translate = translate;
|
|
1786
|
-
this.dialog = dialog;
|
|
1787
|
-
this.MIN_HEIGHT = 40;
|
|
1788
|
-
this.sectionName = '';
|
|
1789
|
-
this.isAutoHeight = true;
|
|
1790
|
-
this.height = this.MIN_HEIGHT;
|
|
1791
|
-
this.hostObjectChange = new EventEmitter();
|
|
1792
|
-
this.collapseOnTablet = false;
|
|
1793
|
-
this.fillHeight = false;
|
|
1794
|
-
this.subSections = false;
|
|
1795
|
-
this.partsNumber = "2";
|
|
1796
|
-
this.partsNumberOptions = Array();
|
|
1797
|
-
this.splitOptions = Array();
|
|
1798
|
-
this.allSplitOptions = Array();
|
|
1799
|
-
this.initData();
|
|
1800
|
-
}
|
|
1801
1477
|
set hostObject(value) {
|
|
1802
|
-
var _a, _b;
|
|
1478
|
+
var _a, _b, _c;
|
|
1803
1479
|
this._hostObject = value;
|
|
1804
1480
|
this.sectionName = value.sectionName;
|
|
1805
1481
|
this.split = value.split;
|
|
@@ -1807,6 +1483,7 @@ class SectionEditorComponent {
|
|
|
1807
1483
|
this.height = this.isAutoHeight ? this.MIN_HEIGHT : value.height;
|
|
1808
1484
|
this.collapseOnTablet = (_a = value.collapseOnTablet) !== null && _a !== void 0 ? _a : false;
|
|
1809
1485
|
this.fillHeight = (_b = value.fillHeight) !== null && _b !== void 0 ? _b : false;
|
|
1486
|
+
this.padding = (_c = value.padding) !== null && _c !== void 0 ? _c : new PepPaddingSettings(true, '0');
|
|
1810
1487
|
}
|
|
1811
1488
|
get hostObject() {
|
|
1812
1489
|
return this._hostObject;
|
|
@@ -1827,6 +1504,24 @@ class SectionEditorComponent {
|
|
|
1827
1504
|
get split() {
|
|
1828
1505
|
return this._split;
|
|
1829
1506
|
}
|
|
1507
|
+
constructor(translate, dialog) {
|
|
1508
|
+
this.translate = translate;
|
|
1509
|
+
this.dialog = dialog;
|
|
1510
|
+
this.MIN_HEIGHT = 40;
|
|
1511
|
+
this.sectionName = '';
|
|
1512
|
+
this.isAutoHeight = true;
|
|
1513
|
+
this.height = this.MIN_HEIGHT;
|
|
1514
|
+
this.hostObjectChange = new EventEmitter();
|
|
1515
|
+
this.collapseOnTablet = false;
|
|
1516
|
+
this.fillHeight = false;
|
|
1517
|
+
this.subSections = false;
|
|
1518
|
+
this.partsNumber = "2";
|
|
1519
|
+
this.partsNumberOptions = Array();
|
|
1520
|
+
this.splitOptions = Array();
|
|
1521
|
+
this.allSplitOptions = Array();
|
|
1522
|
+
this.padding = new PepPaddingSettings(true, '0');
|
|
1523
|
+
this.initData();
|
|
1524
|
+
}
|
|
1830
1525
|
initData() {
|
|
1831
1526
|
this.partsNumberOptions = [
|
|
1832
1527
|
{ 'key': '2', 'value': '2 Parts' },
|
|
@@ -1870,6 +1565,7 @@ class SectionEditorComponent {
|
|
|
1870
1565
|
this._hostObject.height = this.isAutoHeight ? 0 : this.height;
|
|
1871
1566
|
this._hostObject.collapseOnTablet = this.collapseOnTablet;
|
|
1872
1567
|
this._hostObject.fillHeight = this.fillHeight;
|
|
1568
|
+
this._hostObject.padding = this.padding;
|
|
1873
1569
|
this.hostObjectChange.emit(this.hostObject);
|
|
1874
1570
|
}
|
|
1875
1571
|
ngOnInit() {
|
|
@@ -1897,6 +1593,10 @@ class SectionEditorComponent {
|
|
|
1897
1593
|
this.fillHeight = value;
|
|
1898
1594
|
this.updateHostObject();
|
|
1899
1595
|
}
|
|
1596
|
+
onPaddingChange(value) {
|
|
1597
|
+
this.padding = value;
|
|
1598
|
+
this.updateHostObject();
|
|
1599
|
+
}
|
|
1900
1600
|
onSubSectionsChange(value) {
|
|
1901
1601
|
const oldValue = this.subSections;
|
|
1902
1602
|
// Check if cancel the sub sections ( change from any -> 1 section ), if true need to show confirm message
|
|
@@ -1952,90 +1652,63 @@ class SectionEditorComponent {
|
|
|
1952
1652
|
this.updateHostObject();
|
|
1953
1653
|
}
|
|
1954
1654
|
}
|
|
1955
|
-
SectionEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1956
|
-
SectionEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1957
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1655
|
+
SectionEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionEditorComponent, deps: [{ token: i1.TranslateService }, { token: i2$1.PepDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1656
|
+
SectionEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SectionEditorComponent, selector: "section-editor", inputs: { hostObject: "hostObject" }, outputs: { hostObjectChange: "hostObjectChange" }, ngImport: i0, template: "<pep-layout-builder-editor class=\"section-editor-container\">\n <div>\n <pep-textbox [value]=\"sectionName\" [label]=\"'LAYOUT_BUILDER.SECTION_NAME_TITLE' | translate\" (valueChange)=\"onSectionNameChange($event)\"></pep-textbox>\n </div>\n <!-- \n <div>\n <pep-checkbox class=\"checkbox-as-title\" [value]=\"isAutoHeight\" [label]=\"'LAYOUT_BUILDER.AUTO_HEIGHT_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"isAutoHeightChange($event)\"></pep-checkbox>\n <pep-textbox [label]=\"'LAYOUT_BUILDER.HEIGHT_TITLE' | translate\" type=\"int\" [minValue]=\"MIN_HEIGHT\" [disabled]=\"isAutoHeight\" [value]=\"height\" (valueChange)=\"onHeightChange($event)\"></pep-textbox> \n </div>\n -->\n <div class=\"editor-separator\"></div>\n <div>\n <label class=\"editor-title\">{{'LAYOUT_BUILDER.LAYOUT' | translate}}</label>\n <pep-checkbox class=\"checkbox-as-sub-title\" [value]=\"subSections\" [label]=\"'LAYOUT_BUILDER.SUB_SECTION_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onSubSectionsChange($event)\"></pep-checkbox>\n <div class=\"split-area\">\n <pep-select [label]=\"'LAYOUT_BUILDER.SECTIONS_TITLE' | translate\" [value]=\"partsNumber\" [options]=\"partsNumberOptions\" \n (valueChange)=\"onPartsNumberChange($event)\" [emptyOption]=\"false\" [disabled]=\"!subSections\"></pep-select>\n <pep-select [label]=\"'LAYOUT_BUILDER.SPLIT_TITLE' | translate\" [value]=\"split || ''\" [options]=\"splitOptions\"\n (valueChange)=\"onSplitChange($event)\" [emptyOption]=\"false\" [disabled]=\"!subSections\"></pep-select>\n </div>\n </div>\n <div>\n <pep-checkbox class=\"checkbox-as-sub-title\" [value]=\"collapseOnTablet\" [label]=\"'LAYOUT_BUILDER.COLLAPSE_ON_TABLET_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onCollapseOnTabletChange($event)\"></pep-checkbox>\n <span class=\"header-title body-xs\">{{('LAYOUT_BUILDER.COLLAPSE_ON_TABLET_DESCRIPTION' | translate)}}</span>\n </div>\n <div>\n <pep-checkbox class=\"checkbox-as-sub-title\" [value]=\"fillHeight\" [label]=\"'LAYOUT_BUILDER.FILL_HEIGHT_SECTION_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onFillHeightChange($event)\"></pep-checkbox>\n <span class=\"header-title body-xs\">{{('LAYOUT_BUILDER.FILL_HEIGHT_SECTION_DESCRIPTION' | translate)}}</span>\n </div>\n <div class=\"editor-separator\"></div>\n <pep-padding-settings \n [padding]=\"padding\" (paddingChange)=\"onPaddingChange($event)\">\n</pep-padding-settings>\n</pep-layout-builder-editor>\n\n<!-- <div class=\"section-editor-container layout-builder-editor-container\">\n <div>\n <pep-textbox [value]=\"sectionName\" [label]=\"'LAYOUT_BUILDER.SECTION_NAME_TITLE' | translate\" (valueChange)=\"onSectionNameChange($event)\"></pep-textbox>\n </div>\n <div class=\"editor-separator\"></div>\n <div>\n <pep-checkbox class=\"checkbox-as-title\" [value]=\"subSections\" [label]=\"'LAYOUT_BUILDER.SUB_SECTION_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onSubSectionsChange($event)\"></pep-checkbox>\n <div class=\"split-area\">\n <pep-select [label]=\"'LAYOUT_BUILDER.SECTIONS_TITLE' | translate\" [value]=\"partsNumber\" [options]=\"partsNumberOptions\" \n (valueChange)=\"onPartsNumberChange($event)\" [emptyOption]=\"false\" [disabled]=\"!subSections\"></pep-select>\n <pep-select [label]=\"'LAYOUT_BUILDER.SPLIT_TITLE' | translate\" [value]=\"split || ''\" [options]=\"splitOptions\"\n (valueChange)=\"onSplitChange($event)\" [emptyOption]=\"false\" [disabled]=\"!subSections\"></pep-select>\n </div>\n </div>\n <div class=\"editor-separator\"></div>\n <div>\n <pep-checkbox class=\"checkbox-as-title\" [value]=\"collapseOnTablet\" [label]=\"'LAYOUT_BUILDER.COLLAPSE_ON_TABLET_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onCollapseOnTabletChange($event)\"></pep-checkbox>\n <span class=\"header-title body-xs\">{{('LAYOUT_BUILDER.COLLAPSE_ON_TABLET_DESCRIPTION' | translate)}}</span>\n </div>\n <div class=\"editor-separator\"></div>\n <div>\n <pep-checkbox class=\"checkbox-as-title\" [value]=\"fillHeight\" [label]=\"'LAYOUT_BUILDER.FILL_HEIGHT_SECTION_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onFillHeightChange($event)\"></pep-checkbox>\n <span class=\"header-title body-xs\">{{('LAYOUT_BUILDER.FILL_HEIGHT_SECTION_DESCRIPTION' | translate)}}</span>\n </div>\n</div> -->\n", styles: [".section-editor-container .split-area{display:grid;grid-template-columns:1fr 1fr;gap:var(--pep-spacing-lg, 1rem)}\n"], dependencies: [{ kind: "component", type: i2$3.PepTextboxComponent, selector: "pep-textbox", inputs: ["key", "value", "minFractionDigits", "maxFractionDigits", "accessory", "label", "placeholder", "type", "mandatory", "disabled", "readonly", "maxFieldCharacters", "hint", "textColor", "xAlignment", "rowSpan", "minValue", "maxValue", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType", "parentFieldKey", "regex", "regexError", "isInFocus"], outputs: ["valueChange", "keyup", "validationChange"] }, { kind: "component", type: i4$3.PepSelectComponent, selector: "pep-select", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "placeholder", "placeholderWhenDisabled", "autoSortOptions", "options", "visible", "emptyOption", "form", "layoutType", "parentFieldKey", "isActive", "showTitle", "renderTitle", "typeaheadDebounceInterval", "addValueToOptionsIfNotExist"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: i4$2.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: PepLayoutBuilderEditorComponent, selector: "pep-layout-builder-editor", inputs: ["editorTabs"] }, { kind: "component", type: i7.PaddingSettingsComponent, selector: "pep-padding-settings", inputs: ["padding"], outputs: ["paddingChange"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
1657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionEditorComponent, decorators: [{
|
|
1958
1658
|
type: Component,
|
|
1959
|
-
args: [{ selector: 'section-editor', template: "<pep-layout-builder-editor class=\"section-editor-container\">\n <div>\n <pep-textbox [value]=\"sectionName\" [label]=\"'LAYOUT_BUILDER.SECTION_NAME_TITLE' | translate\" (valueChange)=\"onSectionNameChange($event)\"></pep-textbox>\n </div>\n <!-- \n <div>\n <pep-checkbox class=\"checkbox-as-title\" [value]=\"isAutoHeight\" [label]=\"'LAYOUT_BUILDER.AUTO_HEIGHT_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"isAutoHeightChange($event)\"></pep-checkbox>\n <pep-textbox [label]=\"'LAYOUT_BUILDER.HEIGHT_TITLE' | translate\" type=\"int\" [minValue]=\"MIN_HEIGHT\" [disabled]=\"isAutoHeight\" [value]=\"height\" (valueChange)=\"onHeightChange($event)\"></pep-textbox> \n </div>\n -->\n <div class=\"editor-separator\"></div>\n <div>\n <pep-checkbox class=\"checkbox-as-title\" [value]=\"subSections\" [label]=\"'LAYOUT_BUILDER.SUB_SECTION_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onSubSectionsChange($event)\"></pep-checkbox>\n <div class=\"split-area\">\n <pep-select [label]=\"'LAYOUT_BUILDER.SECTIONS_TITLE' | translate\" [value]=\"partsNumber\" [options]=\"partsNumberOptions\" \n (valueChange)=\"onPartsNumberChange($event)\" [emptyOption]=\"false\" [disabled]=\"!subSections\"></pep-select>\n <pep-select [label]=\"'LAYOUT_BUILDER.SPLIT_TITLE' | translate\" [value]=\"split || ''\" [options]=\"splitOptions\"\n (valueChange)=\"onSplitChange($event)\" [emptyOption]=\"false\" [disabled]=\"!subSections\"></pep-select>\n </div>\n </div>\n <div
|
|
1659
|
+
args: [{ selector: 'section-editor', template: "<pep-layout-builder-editor class=\"section-editor-container\">\n <div>\n <pep-textbox [value]=\"sectionName\" [label]=\"'LAYOUT_BUILDER.SECTION_NAME_TITLE' | translate\" (valueChange)=\"onSectionNameChange($event)\"></pep-textbox>\n </div>\n <!-- \n <div>\n <pep-checkbox class=\"checkbox-as-title\" [value]=\"isAutoHeight\" [label]=\"'LAYOUT_BUILDER.AUTO_HEIGHT_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"isAutoHeightChange($event)\"></pep-checkbox>\n <pep-textbox [label]=\"'LAYOUT_BUILDER.HEIGHT_TITLE' | translate\" type=\"int\" [minValue]=\"MIN_HEIGHT\" [disabled]=\"isAutoHeight\" [value]=\"height\" (valueChange)=\"onHeightChange($event)\"></pep-textbox> \n </div>\n -->\n <div class=\"editor-separator\"></div>\n <div>\n <label class=\"editor-title\">{{'LAYOUT_BUILDER.LAYOUT' | translate}}</label>\n <pep-checkbox class=\"checkbox-as-sub-title\" [value]=\"subSections\" [label]=\"'LAYOUT_BUILDER.SUB_SECTION_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onSubSectionsChange($event)\"></pep-checkbox>\n <div class=\"split-area\">\n <pep-select [label]=\"'LAYOUT_BUILDER.SECTIONS_TITLE' | translate\" [value]=\"partsNumber\" [options]=\"partsNumberOptions\" \n (valueChange)=\"onPartsNumberChange($event)\" [emptyOption]=\"false\" [disabled]=\"!subSections\"></pep-select>\n <pep-select [label]=\"'LAYOUT_BUILDER.SPLIT_TITLE' | translate\" [value]=\"split || ''\" [options]=\"splitOptions\"\n (valueChange)=\"onSplitChange($event)\" [emptyOption]=\"false\" [disabled]=\"!subSections\"></pep-select>\n </div>\n </div>\n <div>\n <pep-checkbox class=\"checkbox-as-sub-title\" [value]=\"collapseOnTablet\" [label]=\"'LAYOUT_BUILDER.COLLAPSE_ON_TABLET_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onCollapseOnTabletChange($event)\"></pep-checkbox>\n <span class=\"header-title body-xs\">{{('LAYOUT_BUILDER.COLLAPSE_ON_TABLET_DESCRIPTION' | translate)}}</span>\n </div>\n <div>\n <pep-checkbox class=\"checkbox-as-sub-title\" [value]=\"fillHeight\" [label]=\"'LAYOUT_BUILDER.FILL_HEIGHT_SECTION_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onFillHeightChange($event)\"></pep-checkbox>\n <span class=\"header-title body-xs\">{{('LAYOUT_BUILDER.FILL_HEIGHT_SECTION_DESCRIPTION' | translate)}}</span>\n </div>\n <div class=\"editor-separator\"></div>\n <pep-padding-settings \n [padding]=\"padding\" (paddingChange)=\"onPaddingChange($event)\">\n</pep-padding-settings>\n</pep-layout-builder-editor>\n\n<!-- <div class=\"section-editor-container layout-builder-editor-container\">\n <div>\n <pep-textbox [value]=\"sectionName\" [label]=\"'LAYOUT_BUILDER.SECTION_NAME_TITLE' | translate\" (valueChange)=\"onSectionNameChange($event)\"></pep-textbox>\n </div>\n <div class=\"editor-separator\"></div>\n <div>\n <pep-checkbox class=\"checkbox-as-title\" [value]=\"subSections\" [label]=\"'LAYOUT_BUILDER.SUB_SECTION_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onSubSectionsChange($event)\"></pep-checkbox>\n <div class=\"split-area\">\n <pep-select [label]=\"'LAYOUT_BUILDER.SECTIONS_TITLE' | translate\" [value]=\"partsNumber\" [options]=\"partsNumberOptions\" \n (valueChange)=\"onPartsNumberChange($event)\" [emptyOption]=\"false\" [disabled]=\"!subSections\"></pep-select>\n <pep-select [label]=\"'LAYOUT_BUILDER.SPLIT_TITLE' | translate\" [value]=\"split || ''\" [options]=\"splitOptions\"\n (valueChange)=\"onSplitChange($event)\" [emptyOption]=\"false\" [disabled]=\"!subSections\"></pep-select>\n </div>\n </div>\n <div class=\"editor-separator\"></div>\n <div>\n <pep-checkbox class=\"checkbox-as-title\" [value]=\"collapseOnTablet\" [label]=\"'LAYOUT_BUILDER.COLLAPSE_ON_TABLET_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onCollapseOnTabletChange($event)\"></pep-checkbox>\n <span class=\"header-title body-xs\">{{('LAYOUT_BUILDER.COLLAPSE_ON_TABLET_DESCRIPTION' | translate)}}</span>\n </div>\n <div class=\"editor-separator\"></div>\n <div>\n <pep-checkbox class=\"checkbox-as-title\" [value]=\"fillHeight\" [label]=\"'LAYOUT_BUILDER.FILL_HEIGHT_SECTION_TITLE' | translate\" [renderTitle]=\"false\" (valueChange)=\"onFillHeightChange($event)\"></pep-checkbox>\n <span class=\"header-title body-xs\">{{('LAYOUT_BUILDER.FILL_HEIGHT_SECTION_DESCRIPTION' | translate)}}</span>\n </div>\n</div> -->\n", styles: [".section-editor-container .split-area{display:grid;grid-template-columns:1fr 1fr;gap:var(--pep-spacing-lg, 1rem)}\n"] }]
|
|
1960
1660
|
}], ctorParameters: function () { return [{ type: i1.TranslateService }, { type: i2$1.PepDialogService }]; }, propDecorators: { hostObject: [{
|
|
1961
1661
|
type: Input
|
|
1962
1662
|
}], hostObjectChange: [{
|
|
1963
1663
|
type: Output
|
|
1964
1664
|
}] } });
|
|
1965
1665
|
|
|
1966
|
-
|
|
1967
|
-
}
|
|
1968
|
-
SectionEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1969
|
-
SectionEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: SectionEditorModule, declarations: [SectionEditorComponent], imports: [CommonModule,
|
|
1970
|
-
PepButtonModule,
|
|
1971
|
-
PepTextboxModule,
|
|
1972
|
-
PepSelectModule,
|
|
1973
|
-
PepCheckboxModule,
|
|
1974
|
-
PepLayoutBuilderEditorModule, i1.TranslateModule], exports: [SectionEditorComponent] });
|
|
1975
|
-
SectionEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionEditorModule, imports: [CommonModule,
|
|
1976
|
-
PepButtonModule,
|
|
1977
|
-
PepTextboxModule,
|
|
1978
|
-
PepSelectModule,
|
|
1979
|
-
PepCheckboxModule,
|
|
1980
|
-
PepLayoutBuilderEditorModule,
|
|
1981
|
-
TranslateModule.forChild()] });
|
|
1982
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionEditorModule, decorators: [{
|
|
1983
|
-
type: NgModule,
|
|
1984
|
-
args: [{
|
|
1985
|
-
declarations: [SectionEditorComponent],
|
|
1986
|
-
imports: [
|
|
1987
|
-
CommonModule,
|
|
1988
|
-
PepButtonModule,
|
|
1989
|
-
PepTextboxModule,
|
|
1990
|
-
PepSelectModule,
|
|
1991
|
-
PepCheckboxModule,
|
|
1992
|
-
PepLayoutBuilderEditorModule,
|
|
1993
|
-
TranslateModule.forChild()
|
|
1994
|
-
],
|
|
1995
|
-
exports: [SectionEditorComponent]
|
|
1996
|
-
}]
|
|
1997
|
-
}] });
|
|
1998
|
-
|
|
1666
|
+
// import { PepLayoutBuilderService } from './layout-builder.service';
|
|
1999
1667
|
class PepLayoutBuilderComponent extends BaseDestroyerDirective {
|
|
2000
|
-
|
|
1668
|
+
set availableBlocksForDrag(value) {
|
|
1669
|
+
this._availableBlocksForDrag = value;
|
|
1670
|
+
}
|
|
1671
|
+
get availableBlocksForDrag() {
|
|
1672
|
+
return this._availableBlocksForDrag;
|
|
1673
|
+
}
|
|
1674
|
+
set blocksLayoutConfig(value) {
|
|
1675
|
+
this._blocksLayoutConfig = value;
|
|
1676
|
+
this.setBlocksConfig();
|
|
1677
|
+
}
|
|
1678
|
+
set layoutEditorTitle(value) {
|
|
1679
|
+
this._layoutEditorTitle = value;
|
|
1680
|
+
}
|
|
1681
|
+
get layoutEditorTitle() {
|
|
1682
|
+
return this._layoutEditorTitle;
|
|
1683
|
+
}
|
|
1684
|
+
constructor(renderer, hostElement, translate,
|
|
1685
|
+
// private layoutBuilderService: PepLayoutBuilderService,
|
|
1686
|
+
// private layoutBuilderInternalService: LayoutBuilderInternalService,
|
|
1687
|
+
pepAddonService) {
|
|
2001
1688
|
super();
|
|
2002
1689
|
this.renderer = renderer;
|
|
2003
1690
|
this.hostElement = hostElement;
|
|
2004
1691
|
this.translate = translate;
|
|
2005
|
-
this.layoutBuilderInternalService = layoutBuilderInternalService;
|
|
2006
1692
|
this.pepAddonService = pepAddonService;
|
|
2007
1693
|
this._availableBlocksForDrag = [];
|
|
2008
1694
|
this._blocksLayoutConfig = {};
|
|
2009
1695
|
this._layoutEditorTitle = '';
|
|
1696
|
+
this.lockScreen = false;
|
|
2010
1697
|
this.backClick = new EventEmitter();
|
|
2011
1698
|
this.editorChange = new EventEmitter();
|
|
2012
1699
|
this.blockAdded = new EventEmitter();
|
|
2013
1700
|
this.blocksRemoved = new EventEmitter();
|
|
2014
|
-
this.
|
|
1701
|
+
this.editableStateChange = new EventEmitter();
|
|
2015
1702
|
this.previewMode = false;
|
|
2016
1703
|
this.currentEditor = null;
|
|
2017
1704
|
this.viewportWidth = 0;
|
|
1705
|
+
this.sectionsColumnsDropList = [];
|
|
2018
1706
|
this.pepAddonService.setShellRouterData({ showSidebar: false, addPadding: false });
|
|
2019
1707
|
this.renderer.addClass(this.hostElement.nativeElement, 'pep-layout-builder');
|
|
2020
1708
|
}
|
|
2021
|
-
set availableBlocksForDrag(value) {
|
|
2022
|
-
this._availableBlocksForDrag = value;
|
|
2023
|
-
}
|
|
2024
|
-
get availableBlocksForDrag() {
|
|
2025
|
-
return this._availableBlocksForDrag;
|
|
2026
|
-
}
|
|
2027
|
-
set blocksLayoutConfig(value) {
|
|
2028
|
-
this._blocksLayoutConfig = value;
|
|
2029
|
-
this.layoutBuilderInternalService.setBlocksConfig(this._blocksLayoutConfig);
|
|
2030
|
-
}
|
|
2031
|
-
set layoutEditorTitle(value) {
|
|
2032
|
-
this._layoutEditorTitle = value;
|
|
2033
|
-
}
|
|
2034
|
-
get layoutEditorTitle() {
|
|
2035
|
-
return this._layoutEditorTitle;
|
|
2036
|
-
}
|
|
2037
1709
|
setScreenWidth(screenType) {
|
|
2038
|
-
|
|
1710
|
+
var _a;
|
|
1711
|
+
(_a = this.layoutBuilderInternalService) === null || _a === void 0 ? void 0 : _a.setScreenWidth(screenType);
|
|
2039
1712
|
}
|
|
2040
1713
|
updateViewportWidth() {
|
|
2041
1714
|
var _a;
|
|
@@ -2045,76 +1718,89 @@ class PepLayoutBuilderComponent extends BaseDestroyerDirective {
|
|
|
2045
1718
|
});
|
|
2046
1719
|
}
|
|
2047
1720
|
}
|
|
2048
|
-
subscribeEvents() {
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
this.
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
this.
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
1721
|
+
subscribeEvents(layoutBuilderInternalService) {
|
|
1722
|
+
if (layoutBuilderInternalService) {
|
|
1723
|
+
/***********************************************************************************************/
|
|
1724
|
+
/* Internal Events - for code usage
|
|
1725
|
+
/***********************************************************************************************/
|
|
1726
|
+
layoutBuilderInternalService.sectionsColumnsDropListChange$.subscribe((sectionsColumnsDropList) => {
|
|
1727
|
+
this.sectionsColumnsDropList = sectionsColumnsDropList;
|
|
1728
|
+
});
|
|
1729
|
+
layoutBuilderInternalService.previewModeChange$.pipe(this.getDestroyer()).subscribe((previewMode) => {
|
|
1730
|
+
this.previewMode = previewMode;
|
|
1731
|
+
this.editableStateChange.emit(!this.previewMode);
|
|
1732
|
+
});
|
|
1733
|
+
// layoutBuilderInternalService.lockScreenChange$.pipe(this.getDestroyer()).subscribe((lockScreen: any) => {
|
|
1734
|
+
// this.lockScreen = lockScreen;
|
|
1735
|
+
// });
|
|
1736
|
+
layoutBuilderInternalService.screenSizeChange$.pipe(this.getDestroyer()).subscribe((size) => {
|
|
1737
|
+
const screenType = layoutBuilderInternalService.getScreenType(size);
|
|
1738
|
+
this.selectedScreenType = screenType;
|
|
1739
|
+
});
|
|
1740
|
+
// For update the layout data
|
|
1741
|
+
layoutBuilderInternalService.layoutViewChange$.pipe(this.getDestroyer()).subscribe((layoutView) => {
|
|
1742
|
+
var _a;
|
|
1743
|
+
if (layoutView) {
|
|
1744
|
+
if ((_a = this.layoutBuilderWrapper) === null || _a === void 0 ? void 0 : _a.nativeElement) {
|
|
1745
|
+
const maxWidth = coerceNumberProperty(layoutView.Layout.MaxWidth, 0);
|
|
1746
|
+
const maxWidthToSet = maxWidth === 0 ? '100%' : `${maxWidth}px`;
|
|
1747
|
+
this.renderer.setStyle(this.layoutBuilderWrapper.nativeElement, 'max-width', maxWidthToSet);
|
|
1748
|
+
this.updateViewportWidth();
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
});
|
|
1752
|
+
layoutBuilderInternalService.screenWidthChange$.pipe(this.getDestroyer()).subscribe((width) => {
|
|
1753
|
+
var _a;
|
|
2066
1754
|
if ((_a = this.layoutBuilderWrapper) === null || _a === void 0 ? void 0 : _a.nativeElement) {
|
|
2067
|
-
|
|
2068
|
-
const maxWidthToSet = maxWidth === 0 ? '100%' : `${maxWidth}px`;
|
|
2069
|
-
this.renderer.setStyle(this.layoutBuilderWrapper.nativeElement, 'max-width', maxWidthToSet);
|
|
1755
|
+
this.renderer.setStyle(this.layoutBuilderWrapper.nativeElement, 'width', width);
|
|
2070
1756
|
this.updateViewportWidth();
|
|
2071
1757
|
}
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
// Init the side bar scroll top to 0.
|
|
2096
|
-
if (this.sideBarComponent) {
|
|
2097
|
-
const sideLayout = this.sideBarComponent.nativeElement.querySelector('.side-layout');
|
|
2098
|
-
sideLayout === null || sideLayout === void 0 ? void 0 : sideLayout.scrollTo(0, 0);
|
|
1758
|
+
});
|
|
1759
|
+
// Get the sections id's into sectionsColumnsDropList for the drag & drop.
|
|
1760
|
+
layoutBuilderInternalService.sectionsChange$.pipe(this.getDestroyer()).subscribe((sections) => {
|
|
1761
|
+
// Concat all results into one array.
|
|
1762
|
+
const sectionsColumnsDropList = [].concat(...sections.map((section) => {
|
|
1763
|
+
return section.Columns.map((column, index) => layoutBuilderInternalService.getSectionColumnKey(section.Key, index.toString()));
|
|
1764
|
+
}));
|
|
1765
|
+
layoutBuilderInternalService.setSectionsColumnsDropListChange(sectionsColumnsDropList);
|
|
1766
|
+
});
|
|
1767
|
+
/***********************************************************************************************/
|
|
1768
|
+
/* External Events - for raise to the client
|
|
1769
|
+
/***********************************************************************************************/
|
|
1770
|
+
// For update editor.
|
|
1771
|
+
layoutBuilderInternalService.editorChange$.pipe(this.getDestroyer()).subscribe((editor) => {
|
|
1772
|
+
if (editor) {
|
|
1773
|
+
// Init the side bar scroll top to 0.
|
|
1774
|
+
if (this.sideBarComponent) {
|
|
1775
|
+
const sideLayout = this.sideBarComponent.nativeElement.querySelector('.side-layout');
|
|
1776
|
+
sideLayout === null || sideLayout === void 0 ? void 0 : sideLayout.scrollTo(0, 0);
|
|
1777
|
+
}
|
|
1778
|
+
this.currentEditor = editor;
|
|
1779
|
+
// Raise event to let the user set the block editor in the UI.
|
|
1780
|
+
this.editorChange.emit(editor);
|
|
2099
1781
|
}
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
1782
|
+
});
|
|
1783
|
+
layoutBuilderInternalService.blockAddedEventSubject$.pipe(this.getDestroyer()).subscribe((event) => {
|
|
1784
|
+
if (event) {
|
|
1785
|
+
this.blockAdded.emit(event);
|
|
1786
|
+
}
|
|
1787
|
+
});
|
|
1788
|
+
layoutBuilderInternalService.blocksRemovedEventSubject$.pipe(this.getDestroyer()).subscribe((event) => {
|
|
1789
|
+
if ((event === null || event === void 0 ? void 0 : event.length) > 0) {
|
|
1790
|
+
this.blocksRemoved.emit(event);
|
|
1791
|
+
}
|
|
1792
|
+
});
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
setBlocksConfig() {
|
|
1796
|
+
if (this.layoutBuilderInternalService) {
|
|
1797
|
+
this.layoutBuilderInternalService.setBlocksConfig(this._blocksLayoutConfig);
|
|
1798
|
+
}
|
|
2115
1799
|
}
|
|
2116
1800
|
ngOnInit() {
|
|
2117
|
-
|
|
1801
|
+
var _a;
|
|
1802
|
+
(_a = this.layoutBuilderInternalService) === null || _a === void 0 ? void 0 : _a.setEditorMode(true);
|
|
1803
|
+
this.setBlocksConfig();
|
|
2118
1804
|
// Get the first translation for load all translations.
|
|
2119
1805
|
this.translate.get('LAYOUT_BUILDER.DESKTOP').subscribe((res) => {
|
|
2120
1806
|
this.screenTypes = [
|
|
@@ -2123,44 +1809,62 @@ class PepLayoutBuilderComponent extends BaseDestroyerDirective {
|
|
|
2123
1809
|
{ key: 'Phablet', value: this.translate.instant('LAYOUT_BUILDER.MOBILE'), callback: () => this.setScreenWidth('Phablet'), iconName: pepIconDeviceMobile.name, iconPosition: 'end' }
|
|
2124
1810
|
];
|
|
2125
1811
|
});
|
|
2126
|
-
this.subscribeEvents();
|
|
1812
|
+
this.subscribeEvents(this.layoutBuilderInternalService);
|
|
2127
1813
|
}
|
|
2128
1814
|
ngOnDestroy() {
|
|
1815
|
+
var _a;
|
|
2129
1816
|
super.ngOnDestroy();
|
|
2130
|
-
this.layoutBuilderInternalService.
|
|
1817
|
+
(_a = this.layoutBuilderInternalService) === null || _a === void 0 ? void 0 : _a.setEditorMode(false);
|
|
1818
|
+
this.layoutBuilderInternalService = undefined;
|
|
1819
|
+
// this.layoutBuilderService.removeInternalService(this._layoutKey);
|
|
2131
1820
|
}
|
|
2132
1821
|
onResize(event) {
|
|
2133
1822
|
this.updateViewportWidth();
|
|
2134
1823
|
}
|
|
2135
1824
|
togglePreviewMode() {
|
|
2136
|
-
|
|
1825
|
+
var _a;
|
|
1826
|
+
(_a = this.layoutBuilderInternalService) === null || _a === void 0 ? void 0 : _a.changePreviewMode(!this.previewMode);
|
|
2137
1827
|
this.updateViewportWidth();
|
|
2138
1828
|
}
|
|
2139
1829
|
onSidebarStateChange(event) {
|
|
2140
1830
|
this.updateViewportWidth();
|
|
2141
1831
|
}
|
|
2142
1832
|
onLayoutEditorObjectChange(pageEditor) {
|
|
2143
|
-
|
|
1833
|
+
var _a;
|
|
1834
|
+
(_a = this.layoutBuilderInternalService) === null || _a === void 0 ? void 0 : _a.updateLayoutFromEditor(pageEditor);
|
|
2144
1835
|
}
|
|
2145
1836
|
onSectionEditorObjectChange(sectionEditor) {
|
|
2146
|
-
|
|
1837
|
+
var _a;
|
|
1838
|
+
(_a = this.layoutBuilderInternalService) === null || _a === void 0 ? void 0 : _a.updateSectionFromEditor(sectionEditor);
|
|
2147
1839
|
}
|
|
2148
|
-
|
|
1840
|
+
onAddSectionClick(event) {
|
|
1841
|
+
var _a;
|
|
1842
|
+
(_a = this.layoutBuilderInternalService) === null || _a === void 0 ? void 0 : _a.addSection();
|
|
1843
|
+
}
|
|
1844
|
+
onBlockDragStart(event) {
|
|
1845
|
+
var _a;
|
|
1846
|
+
(_a = this.layoutBuilderInternalService) === null || _a === void 0 ? void 0 : _a.onBlockDragStart(event);
|
|
1847
|
+
}
|
|
1848
|
+
onBlockDragEnd(event) {
|
|
2149
1849
|
var _a;
|
|
1850
|
+
(_a = this.layoutBuilderInternalService) === null || _a === void 0 ? void 0 : _a.onBlockDragEnd(event);
|
|
1851
|
+
}
|
|
1852
|
+
onNavigateBackFromEditor() {
|
|
1853
|
+
var _a, _b;
|
|
2150
1854
|
if (!this.currentEditor || ((_a = this.currentEditor) === null || _a === void 0 ? void 0 : _a.type) === 'layout-builder') {
|
|
2151
1855
|
this.backClick.emit();
|
|
2152
1856
|
}
|
|
2153
1857
|
else {
|
|
2154
|
-
this.layoutBuilderInternalService.navigateBackFromEditor();
|
|
1858
|
+
(_b = this.layoutBuilderInternalService) === null || _b === void 0 ? void 0 : _b.navigateBackFromEditor();
|
|
2155
1859
|
}
|
|
2156
1860
|
}
|
|
2157
1861
|
}
|
|
2158
|
-
PepLayoutBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2159
|
-
PepLayoutBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepLayoutBuilderComponent, selector: "pep-layout-builder", inputs: { availableBlocksForDrag: "availableBlocksForDrag", blocksLayoutConfig: "blocksLayoutConfig", layoutEditorTitle: "layoutEditorTitle" }, outputs: { backClick: "backClick", editorChange: "editorChange", blockAdded: "blockAdded", blocksRemoved: "blocksRemoved" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "layoutBuilderWrapper", first: true, predicate: ["layoutBuilderWrapper"], descendants: true, static: true }, { propertyName: "sideBarComponent", first: true, predicate: PepSideBarComponent, descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"lockScreen\" class=\"cdk-overlay-backdrop cdk-overlay-dark-backdrop cdk-overlay-backdrop-showing\"></div>\n\n<pep-page-layout [showShadow]=\"!previewMode && currentEditor !== null\" >\n <div pep-side-area *ngIf=\"!previewMode && currentEditor\" style=\"height: inherit;\">\n <pep-side-bar #sideBar [ignoreResize]=\"true\" (stateChange)=\"onSidebarStateChange($event)\">\n <div header-content class=\"side-bar-title\">\n <pep-button class=\"back-button\" sizeType=\"sm\" iconName=\"arrow_left_alt\" (buttonClick)=\"onNavigateBackFromEditor();\"></pep-button>\n <div #editorTitle class=\"title title-lg ellipsis\" \n [title]=\"currentEditor.type === 'layout-builder' ? (layoutEditorTitle || currentEditor.title) : currentEditor.title\">\n <span>{{ editorTitle.title }}</span>\n </div>\n </div>\n <div class=\"layout-builder-editor-wrapper\">\n <main-editor *ngIf=\"currentEditor.type === 'layout-builder'\" [availableBlocksForDrag]=\"availableBlocksForDrag\"\n [hostObject]=\"currentEditor.hostObject\" (hostObjectChange)=\"onLayoutEditorObjectChange($event)\"\n >\n <ng-container layout-editor-top-content>\n <ng-content select=\"[layout-editor-top-content]\"></ng-content>\n </ng-container>\n <!-- <ng-container layout-editor-bottom-content>\n <ng-content select=\"[layout-editor-bottom-content]\"></ng-content>\n </ng-container> -->\n </main-editor>\n \n <section-editor *ngIf=\"currentEditor.type === 'section'\" \n [hostObject]=\"currentEditor.hostObject\" (hostObjectChange)=\"onSectionEditorObjectChange($event)\"></section-editor>\n \n <ng-container *ngIf=\"currentEditor.type === 'block'\" >\n <ng-content select=\"[block-editor-content]\"></ng-content>\n </ng-container>\n </div>\n </pep-side-bar>\n </div>\n <ng-container pep-main-area>\n <div class=\"main-area-container\" [ngClass]=\"{'preview-mode': previewMode }\">\n <div class=\"header-container\" >\n <ng-container *ngIf=\"!previewMode; then editorTitleTemplate; else previewTitleTemplate\"></ng-container>\n <ng-template #editorTitleTemplate>\n <div>\n <span class=\"header-title body-xs\">{{('LAYOUT_BUILDER.VIEWPORT_WIDTH' | translate)}}: </span>\n <span class=\"body-xs\"><b>{{viewportWidth}}</b></span>\n </div>\n </ng-template>\n <ng-template #previewTitleTemplate>\n <div class=\"preview-title body-sm\">\n <span>{{('LAYOUT_BUILDER.PREVIEW_TITLE' | translate)}}</span>\n </div>\n </ng-template>\n\n <div class=\"header-group-btn\">\n <pep-group-buttons [buttons]=\"screenTypes\" [selectedButtonKey]=\"selectedScreenType\" sizeType=\"sm\" viewType=\"toggle\" >\n </pep-group-buttons>\n </div>\n\n <ng-container *ngIf=\"!previewMode; then editorButtonsTemplate; else previewButtonsTemplate\"></ng-container>\n <ng-template #editorButtonsTemplate>\n <div class=\"header-end\">\n <pep-button key='Preview' [value]=\"'ACTIONS.PREVIEW' | translate\" sizeType=\"sm\" (buttonClick)=\"togglePreviewMode()\"></pep-button>\n <ng-content select=\"[header-end-content]\"></ng-content>\n </div>\n </ng-template>\n <ng-template #previewButtonsTemplate>\n <a class=\"color-link body-sm\" (click)=\"togglePreviewMode()\" href=\"javascript:void(0)\">{{('LAYOUT_BUILDER.PREVIEW_CLICK_HERE' | translate)}}</a> \n </ng-template>\n </div>\n <div #layoutBuilderWrapper class=\"layout-builder-wrapper\" [ngClass]=\"{'limit-min-width': selectedScreenType === 'Landscape' }\">\n <ng-content select=\"[layout-content]\"></ng-content>\n <div *ngIf=\"!previewMode\" class=\"backdrop\" [ngClass]=\"{'show-backdrop': currentEditor?.type === 'section' || currentEditor?.type === 'block'}\"></div>\n </div>\n </div>\n </ng-container>\n</pep-page-layout>", styles: [".side-bar-title{display:flex;padding-top:var(--pep-spacing-sm, .5rem)}.side-bar-title .back-button{margin-inline-end:var(--pep-spacing-sm, .5rem)}.side-bar-title .title{display:grid;align-items:center}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs{height:100%}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-header,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-header{position:sticky;top:calc(var(--pep-top-bar-spacing-top, 1.5rem) + var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));z-index:2}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-header-pagination,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-header-pagination{display:none}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-labels,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-labels{display:grid;grid-template-columns:1fr 1fr}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-labels .mat-tab-label,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-labels .mat-tab-label{padding:0 var(--pep-spacing-md, .75rem)!important}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-body-wrapper,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-body-wrapper{overflow:unset;margin:0;display:block}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-body-wrapper .mat-tab-body.mat-tab-body-active,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-body-wrapper .mat-tab-body.mat-tab-body-active{overflow:unset}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-body-wrapper .mat-tab-body.mat-tab-body-active .mat-tab-body-content,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-body-wrapper .mat-tab-body.mat-tab-body-active .mat-tab-body-content{overflow:unset;display:flex;flex-direction:column;padding-inline:0!important}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab{overflow:inherit;display:inherit;flex-direction:inherit;gap:var(--pep-spacing-lg, 1rem)}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab .group-buttons-container .toggle-buttons{width:100%}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-textbox{margin-bottom:0!important}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container{padding-top:var(--pep-spacing-lg, 1rem);padding-bottom:var(--pep-spacing-lg, 1rem)}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group{overflow:inherit;display:inherit;flex-direction:inherit;gap:var(--pep-spacing-lg, 1rem);display:flex;flex-direction:column}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group .group-buttons-container .toggle-buttons{width:100%}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-textbox{margin-bottom:0!important}.layout-builder-editor-wrapper ::ng-deep .editor-title{display:block;font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-bold, 600)!important;font-size:var(--pep-font-size-xl, 1.25rem)!important;line-height:var(--pep-line-height-xl, 1.5625rem)!important;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layout-builder-editor-wrapper ::ng-deep .editor-sub-title{display:block;font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400)!important;font-size:var(--pep-font-size-md, 1rem)!important;line-height:var(--pep-line-height-md, 1.25rem)!important;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layout-builder-editor-wrapper ::ng-deep .editor-separator{margin-top:var(--pep-spacing-lg, 1rem);border-bottom:1px solid hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.24)}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title{margin-bottom:.5rem!important;min-height:unset!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container{background:unset!important;padding-left:unset!important;padding-right:unset!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-inner-container,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-inner-container{margin-left:0!important;margin-right:0!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-layout{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400);font-size:var(--pep-font-size-lg, 1.125rem)!important;line-height:var(--pep-line-height-lg, 1.40625rem)!important;font-weight:var(--pep-font-weight-bold, 600)!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout .mat-checkbox-label span,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-layout .mat-checkbox-label span{margin:0 .5rem}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400);font-size:var(--pep-font-size-md, 1rem)!important;line-height:var(--pep-line-height-md, 1.25rem)!important;font-weight:var(--pep-font-weight-normal, 400)!important}.main-area-container{min-height:100%;display:grid;grid-template-rows:auto 1fr}.main-area-container .header-container{display:flex;position:sticky;top:0;z-index:100;height:3rem;align-items:center;justify-content:space-between;padding:0 var(--pep-spacing-sm, .5rem)}.main-area-container .header-container .header-group-btn{display:flex;justify-content:space-around;align-items:center}.main-area-container .header-container .header-end{display:flex;justify-content:flex-end;gap:var(--pep-spacing-sm, .5rem)}.main-area-container .header-container ::ng-deep .group-buttons-container .toggle-buttons{width:16rem}.main-area-container .layout-builder-wrapper{width:100%;margin:0 auto;position:relative}.main-area-container .layout-builder-wrapper.limit-min-width{min-width:800px}.main-area-container .layout-builder-wrapper .backdrop{position:absolute;width:100%;height:100%;top:0;z-index:10;display:none}.main-area-container .layout-builder-wrapper .backdrop.show-backdrop{display:block}\n", ".layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-header,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-header{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.main-area-container{background:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.04)}.main-area-container .header-container{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16)}.main-area-container .header-container .header-title{color:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.7)}.main-area-container .header-container .size-limit-container{background:hsla(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%),.08)}.main-area-container.preview-mode .header-container{background:unset;background-color:hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.main-area-container.preview-mode .header-container .preview-title,.main-area-container.preview-mode .header-container .color-link{color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.main-area-container.preview-mode .layout-builder-wrapper{overflow:auto}.main-area-container .layout-builder-wrapper{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:var(--pep-shadow-md-offset, 0 .5rem 1rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16)}.main-area-container .layout-builder-wrapper .backdrop{background:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.5)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$2.PepPageLayoutComponent, selector: "pep-page-layout", inputs: ["addPadding", "showShadow"] }, { kind: "component", type: i6$1.PepSideBarComponent, selector: "pep-side-bar", inputs: ["position", "ignoreResize", "showHeader", "showFooter", "showToggle", "stateType", "useAsWebComponent"], outputs: ["stateChange"] }, { kind: "component", type: i4$1.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i8.PepGroupButtonsComponent, selector: "pep-group-buttons", inputs: ["viewType", "styleType", "sizeType", "buttons", "buttonsDisabled", "supportUnselect", "selectedButtonKey", "stretch"], outputs: ["buttonClick"] }, { kind: "component", type: MainEditorComponent, selector: "main-editor", inputs: ["availableBlocksForDrag", "hostObject"], outputs: ["hostObjectChange"] }, { kind: "component", type: SectionEditorComponent, selector: "section-editor", inputs: ["hostObject"], outputs: ["hostObjectChange"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
2160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1862
|
+
PepLayoutBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.TranslateService }, { token: i3$1.PepAddonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1863
|
+
PepLayoutBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepLayoutBuilderComponent, selector: "pep-layout-builder", inputs: { availableBlocksForDrag: "availableBlocksForDrag", blocksLayoutConfig: "blocksLayoutConfig", layoutEditorTitle: "layoutEditorTitle", lockScreen: "lockScreen" }, outputs: { backClick: "backClick", editorChange: "editorChange", blockAdded: "blockAdded", blocksRemoved: "blocksRemoved", editableStateChange: "editableStateChange" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "layoutBuilderWrapper", first: true, predicate: ["layoutBuilderWrapper"], descendants: true, static: true }, { propertyName: "sideBarComponent", first: true, predicate: PepSideBarComponent, descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"lockScreen\" class=\"cdk-overlay-backdrop cdk-overlay-dark-backdrop cdk-overlay-backdrop-showing\"></div>\n\n<pep-page-layout [showShadow]=\"!previewMode && currentEditor !== null\" >\n <div pep-side-area *ngIf=\"!previewMode && currentEditor\" style=\"height: inherit;\">\n <pep-side-bar #sideBar [ignoreResize]=\"true\" (stateChange)=\"onSidebarStateChange($event)\">\n <div header-content class=\"side-bar-title\">\n <pep-button class=\"back-button\" sizeType=\"sm\" iconName=\"arrow_left_alt\" (buttonClick)=\"onNavigateBackFromEditor();\"></pep-button>\n <div #editorTitle class=\"title title-lg ellipsis\" \n [title]=\"currentEditor.type === 'layout-builder' ? (layoutEditorTitle || currentEditor.title) : currentEditor.title\">\n <span class=\"ellipsis\">{{ editorTitle.title }}</span>\n </div>\n </div>\n <div class=\"layout-builder-editor-wrapper\">\n <main-editor *ngIf=\"currentEditor.type === 'layout-builder'\" [sectionsColumnsDropList]=\"sectionsColumnsDropList\" [availableBlocksForDrag]=\"availableBlocksForDrag\"\n [hostObject]=\"currentEditor.hostObject\" (hostObjectChange)=\"onLayoutEditorObjectChange($event)\" \n (addSectionClick)=\"onAddSectionClick($event)\" (onBlockDragStart)=\"onBlockDragStart($event)\" (onBlockDragEnd)=\"onBlockDragEnd($event)\"\n >\n <ng-container layout-editor-top-content>\n <ng-content select=\"[layout-editor-top-content]\"></ng-content>\n </ng-container>\n <!-- <ng-container layout-editor-bottom-content>\n <ng-content select=\"[layout-editor-bottom-content]\"></ng-content>\n </ng-container> -->\n </main-editor>\n \n <section-editor *ngIf=\"currentEditor.type === 'section'\" \n [hostObject]=\"currentEditor.hostObject\" (hostObjectChange)=\"onSectionEditorObjectChange($event)\"></section-editor>\n \n <ng-container *ngIf=\"currentEditor.type === 'block'\" >\n <ng-content select=\"[block-editor-content]\"></ng-content>\n </ng-container>\n </div>\n </pep-side-bar>\n </div>\n <ng-container pep-main-area>\n <div class=\"main-area-container\" [ngClass]=\"{'preview-mode': previewMode }\">\n <div class=\"header-container\" >\n <ng-container *ngIf=\"!previewMode; then editorTitleTemplate; else previewTitleTemplate\"></ng-container>\n <ng-template #editorTitleTemplate>\n <div>\n <span class=\"header-title body-xs\">{{('LAYOUT_BUILDER.VIEWPORT_WIDTH' | translate)}}: </span>\n <span class=\"body-xs\"><b>{{viewportWidth}}</b></span>\n </div>\n </ng-template>\n <ng-template #previewTitleTemplate>\n <div class=\"preview-title body-sm\">\n <span>{{('LAYOUT_BUILDER.PREVIEW_TITLE' | translate)}}</span>\n </div>\n </ng-template>\n\n <div class=\"header-group-btn\">\n <pep-group-buttons [buttons]=\"screenTypes\" [selectedButtonKey]=\"selectedScreenType\" sizeType=\"sm\" viewType=\"toggle\" >\n </pep-group-buttons>\n </div>\n\n <ng-container *ngIf=\"!previewMode; then editorButtonsTemplate; else previewButtonsTemplate\"></ng-container>\n <ng-template #editorButtonsTemplate>\n <div class=\"header-end\">\n <pep-button key='Preview' [value]=\"'ACTIONS.PREVIEW' | translate\" sizeType=\"sm\" (buttonClick)=\"togglePreviewMode()\"></pep-button>\n <ng-content select=\"[header-end-content]\"></ng-content>\n </div>\n </ng-template>\n <ng-template #previewButtonsTemplate>\n <a class=\"color-link body-sm\" (click)=\"togglePreviewMode()\" href=\"javascript:void(0)\">{{('LAYOUT_BUILDER.PREVIEW_CLICK_HERE' | translate)}}</a> \n </ng-template>\n </div>\n <div #layoutBuilderWrapper class=\"layout-builder-wrapper\" [ngClass]=\"{'limit-min-width': selectedScreenType === 'Landscape' }\">\n <ng-content select=\"[layout-content]\"></ng-content>\n <div *ngIf=\"!previewMode\" class=\"backdrop\" [ngClass]=\"{'show-backdrop': currentEditor?.type === 'section' || currentEditor?.type === 'block'}\"></div>\n </div>\n </div>\n </ng-container>\n</pep-page-layout>", styles: [".side-bar-title{display:flex;padding-top:var(--pep-spacing-sm, .5rem)}.side-bar-title .back-button{margin-inline-end:var(--pep-spacing-sm, .5rem)}.side-bar-title .title{display:grid;align-items:center}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs{height:100%}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-header,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-header{position:sticky;top:calc(var(--pep-top-bar-spacing-top, 1.5rem) + var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));z-index:2}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-header-pagination,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-header-pagination,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-header-pagination,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-header-pagination{display:none}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-labels,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-labels,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-labels,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-labels{display:grid;grid-template-columns:1fr 1fr}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-labels .mat-tab-label,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-labels .mat-mdc-tab-label,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-labels .mat-tab-label,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-labels .mat-mdc-tab-label,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-labels .mat-tab-label,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-labels .mat-mdc-tab-label,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-labels .mat-tab-label,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-labels .mat-mdc-tab-label{padding:0 var(--pep-spacing-md, .75rem)!important}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-body-wrapper,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-body-wrapper,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-body-wrapper,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-body-wrapper{overflow:unset;margin:0;display:block}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active{overflow:unset}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active .mat-tab-body-content,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active .mat-tab-body-content,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active .mat-tab-body-content,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active .mat-tab-body-content{overflow:unset;display:flex;flex-direction:column;padding-inline:0!important}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab{overflow:inherit;display:inherit;flex-direction:inherit;gap:var(--pep-spacing-lg, 1rem)}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab .group-buttons-container .toggle-buttons{width:100%}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-date,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab .no-margin-bottom,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-date,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab .no-margin-bottom,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-date,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab .no-margin-bottom,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-date,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab .no-margin-bottom{margin-bottom:0!important}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container{padding-top:var(--pep-spacing-lg, 1rem);padding-bottom:var(--pep-spacing-lg, 1rem)}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group{overflow:inherit;display:inherit;flex-direction:inherit;gap:var(--pep-spacing-lg, 1rem);display:flex;flex-direction:column}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group .group-buttons-container .toggle-buttons{width:100%}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-date,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container .no-margin-bottom,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-date,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group .no-margin-bottom{margin-bottom:0!important}.layout-builder-editor-wrapper ::ng-deep .editor-title{display:block;font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-bold, 600)!important;font-size:var(--pep-font-size-xl, 1.25rem)!important;line-height:var(--pep-line-height-xl, 1.5625rem)!important;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layout-builder-editor-wrapper ::ng-deep .editor-sub-title{display:block;font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400)!important;font-size:var(--pep-font-size-md, 1rem)!important;line-height:var(--pep-line-height-md, 1.25rem)!important;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layout-builder-editor-wrapper ::ng-deep .editor-separator{margin-top:var(--pep-spacing-lg, 1rem);border-bottom:1px solid hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.24)}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title{margin-bottom:.5rem!important;min-height:unset!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container{background:unset!important;padding-left:unset!important;padding-right:unset!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-inner-container,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-mdc-checkbox-inner-container,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-inner-container,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-mdc-checkbox-inner-container{margin-left:0!important;margin-right:0!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-layout{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400);font-size:var(--pep-font-size-lg, 1.125rem)!important;line-height:var(--pep-line-height-lg, 1.40625rem)!important;font-weight:var(--pep-font-weight-bold, 600)!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout .mat-checkbox-label span,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout .mat-mdc-checkbox-label span,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-layout .mat-checkbox-label span,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-layout .mat-mdc-checkbox-label span{margin:0 .5rem}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400);font-size:var(--pep-font-size-md, 1rem)!important;line-height:var(--pep-line-height-md, 1.25rem)!important;font-weight:var(--pep-font-weight-normal, 400)!important}.main-area-container{min-height:100%;display:grid;grid-template-rows:auto 1fr}.main-area-container .header-container{display:flex;position:sticky;top:0;z-index:100;height:3rem;align-items:center;justify-content:space-between;padding:0 var(--pep-spacing-sm, .5rem)}.main-area-container .header-container .header-group-btn{display:flex;justify-content:space-around;align-items:center}.main-area-container .header-container .header-end{display:flex;justify-content:flex-end;gap:var(--pep-spacing-sm, .5rem)}.main-area-container .header-container ::ng-deep .group-buttons-container .toggle-buttons{width:16rem}.main-area-container .layout-builder-wrapper{width:100%;margin:0 auto;position:relative}.main-area-container .layout-builder-wrapper.limit-min-width{min-width:800px}.main-area-container .layout-builder-wrapper .backdrop{position:absolute;width:100%;height:100%;top:0;z-index:10;display:none}.main-area-container .layout-builder-wrapper .backdrop.show-backdrop{display:block}\n", ".layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-header,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-header,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-header,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-header{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.main-area-container{background:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.04)}.main-area-container .header-container{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16)}.main-area-container .header-container .header-title{color:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.7)}.main-area-container .header-container .size-limit-container{background:hsla(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%),.08)}.main-area-container.preview-mode .header-container{background:unset;background-color:hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.main-area-container.preview-mode .header-container .preview-title,.main-area-container.preview-mode .header-container .color-link{color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.main-area-container.preview-mode .layout-builder-wrapper{overflow:auto}.main-area-container .layout-builder-wrapper{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:var(--pep-shadow-md-offset, 0 .5rem 1rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16)}.main-area-container .layout-builder-wrapper .backdrop{background:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.5)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$4.PepPageLayoutComponent, selector: "pep-page-layout", inputs: ["addPadding", "showShadow"] }, { kind: "component", type: i5$3.PepSideBarComponent, selector: "pep-side-bar", inputs: ["position", "ignoreResize", "showHeader", "showFooter", "showToggle", "stateType", "useAsWebComponent"], outputs: ["stateChange"] }, { kind: "component", type: i4$1.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i7$1.PepGroupButtonsComponent, selector: "pep-group-buttons", inputs: ["viewType", "styleType", "sizeType", "buttons", "buttonsDisabled", "supportUnselect", "selectedButtonKey", "stretch"], outputs: ["buttonClick"] }, { kind: "component", type: MainEditorComponent, selector: "main-editor", inputs: ["availableBlocksForDrag", "sectionsColumnsDropList", "hostObject"], outputs: ["hostObjectChange", "addSectionClick", "onBlockDragStart", "onBlockDragEnd"] }, { kind: "component", type: SectionEditorComponent, selector: "section-editor", inputs: ["hostObject"], outputs: ["hostObjectChange"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
1864
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderComponent, decorators: [{
|
|
2161
1865
|
type: Component,
|
|
2162
|
-
args: [{ selector: 'pep-layout-builder', template: "<div *ngIf=\"lockScreen\" class=\"cdk-overlay-backdrop cdk-overlay-dark-backdrop cdk-overlay-backdrop-showing\"></div>\n\n<pep-page-layout [showShadow]=\"!previewMode && currentEditor !== null\" >\n <div pep-side-area *ngIf=\"!previewMode && currentEditor\" style=\"height: inherit;\">\n <pep-side-bar #sideBar [ignoreResize]=\"true\" (stateChange)=\"onSidebarStateChange($event)\">\n <div header-content class=\"side-bar-title\">\n <pep-button class=\"back-button\" sizeType=\"sm\" iconName=\"arrow_left_alt\" (buttonClick)=\"onNavigateBackFromEditor();\"></pep-button>\n <div #editorTitle class=\"title title-lg ellipsis\" \n [title]=\"currentEditor.type === 'layout-builder' ? (layoutEditorTitle || currentEditor.title) : currentEditor.title\">\n <span>{{ editorTitle.title }}</span>\n </div>\n </div>\n <div class=\"layout-builder-editor-wrapper\">\n <main-editor *ngIf=\"currentEditor.type === 'layout-builder'\" [availableBlocksForDrag]=\"availableBlocksForDrag\"\n [hostObject]=\"currentEditor.hostObject\" (hostObjectChange)=\"onLayoutEditorObjectChange($event)\"\n >\n <ng-container layout-editor-top-content>\n <ng-content select=\"[layout-editor-top-content]\"></ng-content>\n </ng-container>\n <!-- <ng-container layout-editor-bottom-content>\n <ng-content select=\"[layout-editor-bottom-content]\"></ng-content>\n </ng-container> -->\n </main-editor>\n \n <section-editor *ngIf=\"currentEditor.type === 'section'\" \n [hostObject]=\"currentEditor.hostObject\" (hostObjectChange)=\"onSectionEditorObjectChange($event)\"></section-editor>\n \n <ng-container *ngIf=\"currentEditor.type === 'block'\" >\n <ng-content select=\"[block-editor-content]\"></ng-content>\n </ng-container>\n </div>\n </pep-side-bar>\n </div>\n <ng-container pep-main-area>\n <div class=\"main-area-container\" [ngClass]=\"{'preview-mode': previewMode }\">\n <div class=\"header-container\" >\n <ng-container *ngIf=\"!previewMode; then editorTitleTemplate; else previewTitleTemplate\"></ng-container>\n <ng-template #editorTitleTemplate>\n <div>\n <span class=\"header-title body-xs\">{{('LAYOUT_BUILDER.VIEWPORT_WIDTH' | translate)}}: </span>\n <span class=\"body-xs\"><b>{{viewportWidth}}</b></span>\n </div>\n </ng-template>\n <ng-template #previewTitleTemplate>\n <div class=\"preview-title body-sm\">\n <span>{{('LAYOUT_BUILDER.PREVIEW_TITLE' | translate)}}</span>\n </div>\n </ng-template>\n\n <div class=\"header-group-btn\">\n <pep-group-buttons [buttons]=\"screenTypes\" [selectedButtonKey]=\"selectedScreenType\" sizeType=\"sm\" viewType=\"toggle\" >\n </pep-group-buttons>\n </div>\n\n <ng-container *ngIf=\"!previewMode; then editorButtonsTemplate; else previewButtonsTemplate\"></ng-container>\n <ng-template #editorButtonsTemplate>\n <div class=\"header-end\">\n <pep-button key='Preview' [value]=\"'ACTIONS.PREVIEW' | translate\" sizeType=\"sm\" (buttonClick)=\"togglePreviewMode()\"></pep-button>\n <ng-content select=\"[header-end-content]\"></ng-content>\n </div>\n </ng-template>\n <ng-template #previewButtonsTemplate>\n <a class=\"color-link body-sm\" (click)=\"togglePreviewMode()\" href=\"javascript:void(0)\">{{('LAYOUT_BUILDER.PREVIEW_CLICK_HERE' | translate)}}</a> \n </ng-template>\n </div>\n <div #layoutBuilderWrapper class=\"layout-builder-wrapper\" [ngClass]=\"{'limit-min-width': selectedScreenType === 'Landscape' }\">\n <ng-content select=\"[layout-content]\"></ng-content>\n <div *ngIf=\"!previewMode\" class=\"backdrop\" [ngClass]=\"{'show-backdrop': currentEditor?.type === 'section' || currentEditor?.type === 'block'}\"></div>\n </div>\n </div>\n </ng-container>\n</pep-page-layout>", styles: [".side-bar-title{display:flex;padding-top:var(--pep-spacing-sm, .5rem)}.side-bar-title .back-button{margin-inline-end:var(--pep-spacing-sm, .5rem)}.side-bar-title .title{display:grid;align-items:center}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs{height:100%}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-header,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-header{position:sticky;top:calc(var(--pep-top-bar-spacing-top, 1.5rem) + var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));z-index:2}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-header-pagination,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-header-pagination{display:none}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-labels,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-labels{display:grid;grid-template-columns:1fr 1fr}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-labels .mat-tab-label,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-labels .mat-tab-label{padding:0 var(--pep-spacing-md, .75rem)!important}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-body-wrapper,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-body-wrapper{overflow:unset;margin:0;display:block}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-body-wrapper .mat-tab-body.mat-tab-body-active,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-body-wrapper .mat-tab-body.mat-tab-body-active{overflow:unset}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-body-wrapper .mat-tab-body.mat-tab-body-active .mat-tab-body-content,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-body-wrapper .mat-tab-body.mat-tab-body-active .mat-tab-body-content{overflow:unset;display:flex;flex-direction:column;padding-inline:0!important}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab{overflow:inherit;display:inherit;flex-direction:inherit;gap:var(--pep-spacing-lg, 1rem)}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab .group-buttons-container .toggle-buttons{width:100%}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-textbox{margin-bottom:0!important}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container{padding-top:var(--pep-spacing-lg, 1rem);padding-bottom:var(--pep-spacing-lg, 1rem)}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group{overflow:inherit;display:inherit;flex-direction:inherit;gap:var(--pep-spacing-lg, 1rem);display:flex;flex-direction:column}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group .group-buttons-container .toggle-buttons{width:100%}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-textbox{margin-bottom:0!important}.layout-builder-editor-wrapper ::ng-deep .editor-title{display:block;font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-bold, 600)!important;font-size:var(--pep-font-size-xl, 1.25rem)!important;line-height:var(--pep-line-height-xl, 1.5625rem)!important;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layout-builder-editor-wrapper ::ng-deep .editor-sub-title{display:block;font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400)!important;font-size:var(--pep-font-size-md, 1rem)!important;line-height:var(--pep-line-height-md, 1.25rem)!important;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layout-builder-editor-wrapper ::ng-deep .editor-separator{margin-top:var(--pep-spacing-lg, 1rem);border-bottom:1px solid hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.24)}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title{margin-bottom:.5rem!important;min-height:unset!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container{background:unset!important;padding-left:unset!important;padding-right:unset!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-inner-container,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-inner-container{margin-left:0!important;margin-right:0!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-layout{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400);font-size:var(--pep-font-size-lg, 1.125rem)!important;line-height:var(--pep-line-height-lg, 1.40625rem)!important;font-weight:var(--pep-font-weight-bold, 600)!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout .mat-checkbox-label span,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-layout .mat-checkbox-label span{margin:0 .5rem}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400);font-size:var(--pep-font-size-md, 1rem)!important;line-height:var(--pep-line-height-md, 1.25rem)!important;font-weight:var(--pep-font-weight-normal, 400)!important}.main-area-container{min-height:100%;display:grid;grid-template-rows:auto 1fr}.main-area-container .header-container{display:flex;position:sticky;top:0;z-index:100;height:3rem;align-items:center;justify-content:space-between;padding:0 var(--pep-spacing-sm, .5rem)}.main-area-container .header-container .header-group-btn{display:flex;justify-content:space-around;align-items:center}.main-area-container .header-container .header-end{display:flex;justify-content:flex-end;gap:var(--pep-spacing-sm, .5rem)}.main-area-container .header-container ::ng-deep .group-buttons-container .toggle-buttons{width:16rem}.main-area-container .layout-builder-wrapper{width:100%;margin:0 auto;position:relative}.main-area-container .layout-builder-wrapper.limit-min-width{min-width:800px}.main-area-container .layout-builder-wrapper .backdrop{position:absolute;width:100%;height:100%;top:0;z-index:10;display:none}.main-area-container .layout-builder-wrapper .backdrop.show-backdrop{display:block}\n", ".layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-header,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-header{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.main-area-container{background:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.04)}.main-area-container .header-container{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16)}.main-area-container .header-container .header-title{color:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.7)}.main-area-container .header-container .size-limit-container{background:hsla(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%),.08)}.main-area-container.preview-mode .header-container{background:unset;background-color:hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.main-area-container.preview-mode .header-container .preview-title,.main-area-container.preview-mode .header-container .color-link{color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.main-area-container.preview-mode .layout-builder-wrapper{overflow:auto}.main-area-container .layout-builder-wrapper{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:var(--pep-shadow-md-offset, 0 .5rem 1rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16)}.main-area-container .layout-builder-wrapper .backdrop{background:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.5)}\n"] }]
|
|
2163
|
-
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.TranslateService }, { type:
|
|
1866
|
+
args: [{ selector: 'pep-layout-builder', template: "<div *ngIf=\"lockScreen\" class=\"cdk-overlay-backdrop cdk-overlay-dark-backdrop cdk-overlay-backdrop-showing\"></div>\n\n<pep-page-layout [showShadow]=\"!previewMode && currentEditor !== null\" >\n <div pep-side-area *ngIf=\"!previewMode && currentEditor\" style=\"height: inherit;\">\n <pep-side-bar #sideBar [ignoreResize]=\"true\" (stateChange)=\"onSidebarStateChange($event)\">\n <div header-content class=\"side-bar-title\">\n <pep-button class=\"back-button\" sizeType=\"sm\" iconName=\"arrow_left_alt\" (buttonClick)=\"onNavigateBackFromEditor();\"></pep-button>\n <div #editorTitle class=\"title title-lg ellipsis\" \n [title]=\"currentEditor.type === 'layout-builder' ? (layoutEditorTitle || currentEditor.title) : currentEditor.title\">\n <span class=\"ellipsis\">{{ editorTitle.title }}</span>\n </div>\n </div>\n <div class=\"layout-builder-editor-wrapper\">\n <main-editor *ngIf=\"currentEditor.type === 'layout-builder'\" [sectionsColumnsDropList]=\"sectionsColumnsDropList\" [availableBlocksForDrag]=\"availableBlocksForDrag\"\n [hostObject]=\"currentEditor.hostObject\" (hostObjectChange)=\"onLayoutEditorObjectChange($event)\" \n (addSectionClick)=\"onAddSectionClick($event)\" (onBlockDragStart)=\"onBlockDragStart($event)\" (onBlockDragEnd)=\"onBlockDragEnd($event)\"\n >\n <ng-container layout-editor-top-content>\n <ng-content select=\"[layout-editor-top-content]\"></ng-content>\n </ng-container>\n <!-- <ng-container layout-editor-bottom-content>\n <ng-content select=\"[layout-editor-bottom-content]\"></ng-content>\n </ng-container> -->\n </main-editor>\n \n <section-editor *ngIf=\"currentEditor.type === 'section'\" \n [hostObject]=\"currentEditor.hostObject\" (hostObjectChange)=\"onSectionEditorObjectChange($event)\"></section-editor>\n \n <ng-container *ngIf=\"currentEditor.type === 'block'\" >\n <ng-content select=\"[block-editor-content]\"></ng-content>\n </ng-container>\n </div>\n </pep-side-bar>\n </div>\n <ng-container pep-main-area>\n <div class=\"main-area-container\" [ngClass]=\"{'preview-mode': previewMode }\">\n <div class=\"header-container\" >\n <ng-container *ngIf=\"!previewMode; then editorTitleTemplate; else previewTitleTemplate\"></ng-container>\n <ng-template #editorTitleTemplate>\n <div>\n <span class=\"header-title body-xs\">{{('LAYOUT_BUILDER.VIEWPORT_WIDTH' | translate)}}: </span>\n <span class=\"body-xs\"><b>{{viewportWidth}}</b></span>\n </div>\n </ng-template>\n <ng-template #previewTitleTemplate>\n <div class=\"preview-title body-sm\">\n <span>{{('LAYOUT_BUILDER.PREVIEW_TITLE' | translate)}}</span>\n </div>\n </ng-template>\n\n <div class=\"header-group-btn\">\n <pep-group-buttons [buttons]=\"screenTypes\" [selectedButtonKey]=\"selectedScreenType\" sizeType=\"sm\" viewType=\"toggle\" >\n </pep-group-buttons>\n </div>\n\n <ng-container *ngIf=\"!previewMode; then editorButtonsTemplate; else previewButtonsTemplate\"></ng-container>\n <ng-template #editorButtonsTemplate>\n <div class=\"header-end\">\n <pep-button key='Preview' [value]=\"'ACTIONS.PREVIEW' | translate\" sizeType=\"sm\" (buttonClick)=\"togglePreviewMode()\"></pep-button>\n <ng-content select=\"[header-end-content]\"></ng-content>\n </div>\n </ng-template>\n <ng-template #previewButtonsTemplate>\n <a class=\"color-link body-sm\" (click)=\"togglePreviewMode()\" href=\"javascript:void(0)\">{{('LAYOUT_BUILDER.PREVIEW_CLICK_HERE' | translate)}}</a> \n </ng-template>\n </div>\n <div #layoutBuilderWrapper class=\"layout-builder-wrapper\" [ngClass]=\"{'limit-min-width': selectedScreenType === 'Landscape' }\">\n <ng-content select=\"[layout-content]\"></ng-content>\n <div *ngIf=\"!previewMode\" class=\"backdrop\" [ngClass]=\"{'show-backdrop': currentEditor?.type === 'section' || currentEditor?.type === 'block'}\"></div>\n </div>\n </div>\n </ng-container>\n</pep-page-layout>", styles: [".side-bar-title{display:flex;padding-top:var(--pep-spacing-sm, .5rem)}.side-bar-title .back-button{margin-inline-end:var(--pep-spacing-sm, .5rem)}.side-bar-title .title{display:grid;align-items:center}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs{height:100%}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-header,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-header{position:sticky;top:calc(var(--pep-top-bar-spacing-top, 1.5rem) + var(--pep-top-bar-spacing-bottom, .5rem) + var(--pep-top-bar-field-height, 2.5rem));z-index:2}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-header-pagination,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-header-pagination,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-header-pagination,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-header-pagination{display:none}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-labels,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-labels,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-labels,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-labels{display:grid;grid-template-columns:1fr 1fr}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-labels .mat-tab-label,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-labels .mat-mdc-tab-label,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-labels .mat-tab-label,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-labels .mat-mdc-tab-label,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-labels .mat-tab-label,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-labels .mat-mdc-tab-label,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-labels .mat-tab-label,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-labels .mat-mdc-tab-label{padding:0 var(--pep-spacing-md, .75rem)!important}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-body-wrapper,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-body-wrapper,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-body-wrapper,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-body-wrapper{overflow:unset;margin:0;display:block}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active{overflow:unset}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active .mat-tab-body-content,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active .mat-tab-body-content,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active .mat-tab-body-content,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-body-wrapper .mat-mdc-tab-body.mat-tab-body-active .mat-tab-body-content{overflow:unset;display:flex;flex-direction:column;padding-inline:0!important}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab{overflow:inherit;display:inherit;flex-direction:inherit;gap:var(--pep-spacing-lg, 1rem)}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab .group-buttons-container .toggle-buttons{width:100%}.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-date,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .page-builder-editor-tab .no-margin-bottom,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-date,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .layout-builder-editor-tab .no-margin-bottom,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-date,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .page-builder-editor-tab .no-margin-bottom,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-date,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .layout-builder-editor-tab .no-margin-bottom{margin-bottom:0!important}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container{padding-top:var(--pep-spacing-lg, 1rem);padding-bottom:var(--pep-spacing-lg, 1rem)}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group{overflow:inherit;display:inherit;flex-direction:inherit;gap:var(--pep-spacing-lg, 1rem);display:flex;flex-direction:column}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container .group-buttons-container .toggle-buttons,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group .group-buttons-container .toggle-buttons{width:100%}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-date,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-container .no-margin-bottom,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-checkbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-color,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-date,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-select,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-textarea,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group pep-textbox,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-group .no-margin-bottom{margin-bottom:0!important}.layout-builder-editor-wrapper ::ng-deep .editor-title{display:block;font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-bold, 600)!important;font-size:var(--pep-font-size-xl, 1.25rem)!important;line-height:var(--pep-line-height-xl, 1.5625rem)!important;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layout-builder-editor-wrapper ::ng-deep .editor-sub-title{display:block;font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400)!important;font-size:var(--pep-font-size-md, 1rem)!important;line-height:var(--pep-line-height-md, 1.25rem)!important;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layout-builder-editor-wrapper ::ng-deep .editor-separator{margin-top:var(--pep-spacing-lg, 1rem);border-bottom:1px solid hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.24)}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title{margin-bottom:.5rem!important;min-height:unset!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container{background:unset!important;padding-left:unset!important;padding-right:unset!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-inner-container,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-mdc-checkbox-inner-container,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-inner-container,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-mdc-checkbox-inner-container{margin-left:0!important;margin-right:0!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-layout{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400);font-size:var(--pep-font-size-lg, 1.125rem)!important;line-height:var(--pep-line-height-lg, 1.40625rem)!important;font-weight:var(--pep-font-weight-bold, 600)!important}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout .mat-checkbox-label span,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout .mat-mdc-checkbox-label span,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-layout .mat-checkbox-label span,.layout-builder-editor-wrapper ::ng-deep .checkbox-as-title .pep-checkbox-container .mat-checkbox-layout .mat-mdc-checkbox-label span{margin:0 .5rem}.layout-builder-editor-wrapper ::ng-deep .checkbox-as-sub-title .pep-checkbox-container .mat-checkbox-layout{font-family:var(--pep-font-family-body, Inter),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif!important;font-weight:var(--pep-font-weight-normal, 400);font-size:var(--pep-font-size-md, 1rem)!important;line-height:var(--pep-line-height-md, 1.25rem)!important;font-weight:var(--pep-font-weight-normal, 400)!important}.main-area-container{min-height:100%;display:grid;grid-template-rows:auto 1fr}.main-area-container .header-container{display:flex;position:sticky;top:0;z-index:100;height:3rem;align-items:center;justify-content:space-between;padding:0 var(--pep-spacing-sm, .5rem)}.main-area-container .header-container .header-group-btn{display:flex;justify-content:space-around;align-items:center}.main-area-container .header-container .header-end{display:flex;justify-content:flex-end;gap:var(--pep-spacing-sm, .5rem)}.main-area-container .header-container ::ng-deep .group-buttons-container .toggle-buttons{width:16rem}.main-area-container .layout-builder-wrapper{width:100%;margin:0 auto;position:relative}.main-area-container .layout-builder-wrapper.limit-min-width{min-width:800px}.main-area-container .layout-builder-wrapper .backdrop{position:absolute;width:100%;height:100%;top:0;z-index:10;display:none}.main-area-container .layout-builder-wrapper .backdrop.show-backdrop{display:block}\n", ".layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-tab-header,.layout-builder-editor-wrapper ::ng-deep .page-builder-editor-tabs .mat-mdc-tab-header,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-tab-header,.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs .mat-mdc-tab-header{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.main-area-container{background:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.04)}.main-area-container .header-container{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:var(--pep-shadow-sm-offset, 0 .25rem .5rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16)}.main-area-container .header-container .header-title{color:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.7)}.main-area-container .header-container .size-limit-container{background:hsla(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%),.08)}.main-area-container.preview-mode .header-container{background:unset;background-color:hsl(var(--pep-color-system-caution-h, 360),var(--pep-color-system-caution-s, 100%),var(--pep-color-system-caution-l, 45%))}.main-area-container.preview-mode .header-container .preview-title,.main-area-container.preview-mode .header-container .color-link{color:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%))}.main-area-container.preview-mode .layout-builder-wrapper{overflow:auto}.main-area-container .layout-builder-wrapper{background:hsl(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%));box-shadow:var(--pep-shadow-md-offset, 0 .5rem 1rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16)}.main-area-container .layout-builder-wrapper .backdrop{background:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.5)}\n"] }]
|
|
1867
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.TranslateService }, { type: i3$1.PepAddonService }]; }, propDecorators: { layoutBuilderWrapper: [{
|
|
2164
1868
|
type: ViewChild,
|
|
2165
1869
|
args: ['layoutBuilderWrapper', { static: true }]
|
|
2166
1870
|
}], sideBarComponent: [{
|
|
@@ -2172,6 +1876,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
2172
1876
|
type: Input
|
|
2173
1877
|
}], layoutEditorTitle: [{
|
|
2174
1878
|
type: Input
|
|
1879
|
+
}], lockScreen: [{
|
|
1880
|
+
type: Input
|
|
2175
1881
|
}], backClick: [{
|
|
2176
1882
|
type: Output
|
|
2177
1883
|
}], editorChange: [{
|
|
@@ -2180,43 +1886,465 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
2180
1886
|
type: Output
|
|
2181
1887
|
}], blocksRemoved: [{
|
|
2182
1888
|
type: Output
|
|
1889
|
+
}], editableStateChange: [{
|
|
1890
|
+
type: Output
|
|
2183
1891
|
}], onResize: [{
|
|
2184
1892
|
type: HostListener,
|
|
2185
1893
|
args: ['window:resize', ['$event']]
|
|
2186
1894
|
}] } });
|
|
2187
1895
|
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
1896
|
+
// import { TranslateService } from '@ngx-translate/core';
|
|
1897
|
+
// import { PepDialogService } from '@pepperi-addons/ngx-lib/dialog';
|
|
1898
|
+
class PepLayoutComponent extends BaseDestroyerDirective {
|
|
1899
|
+
set layoutView(value) {
|
|
1900
|
+
this._layoutView = value;
|
|
1901
|
+
if (this.layoutView) {
|
|
1902
|
+
// Load the layout builder
|
|
1903
|
+
this.layoutBuilderInternalService.loadLayoutBuilder(value);
|
|
1904
|
+
}
|
|
2192
1905
|
}
|
|
2193
|
-
get
|
|
2194
|
-
return this.
|
|
1906
|
+
get layoutView() {
|
|
1907
|
+
return this._layoutView;
|
|
2195
1908
|
}
|
|
2196
|
-
|
|
2197
|
-
|
|
1909
|
+
set showSkeleton(value) {
|
|
1910
|
+
this._showSkeleton = value;
|
|
1911
|
+
this.animateSkeleton();
|
|
2198
1912
|
}
|
|
2199
|
-
|
|
2200
|
-
return this.
|
|
1913
|
+
get showSkeleton() {
|
|
1914
|
+
return this._showSkeleton;
|
|
1915
|
+
}
|
|
1916
|
+
set horizontalSpacing(value) {
|
|
1917
|
+
this._horizontalSpacing = value;
|
|
1918
|
+
this.paddingInline = this.convertLayoutSizeType(value || 'md');
|
|
1919
|
+
}
|
|
1920
|
+
get horizontalSpacing() {
|
|
1921
|
+
return this._horizontalSpacing;
|
|
1922
|
+
}
|
|
1923
|
+
set verticalSpacing(value) {
|
|
1924
|
+
this._verticalSpacing = value;
|
|
1925
|
+
}
|
|
1926
|
+
get verticalSpacing() {
|
|
1927
|
+
return this._verticalSpacing;
|
|
1928
|
+
}
|
|
1929
|
+
get sections$() {
|
|
1930
|
+
return this._sectionsSubject.asObservable();
|
|
1931
|
+
}
|
|
1932
|
+
constructor(parent,
|
|
1933
|
+
// @Host() private layoutBuilderInternalServiceHost: LayoutBuilderInternalService,
|
|
1934
|
+
// @Self() private layoutBuilderInternalServiceSelf: LayoutBuilderInternalService,
|
|
1935
|
+
// @Optional() @SkipSelf() private layoutBuilderInternalServiceSkipSelf: LayoutBuilderInternalService,
|
|
1936
|
+
// limit to the host component's instance of the HeroCacheService
|
|
1937
|
+
layoutBuilderInternalService, hostElement, renderer) {
|
|
1938
|
+
super();
|
|
1939
|
+
this.parent = parent;
|
|
1940
|
+
this.layoutBuilderInternalService = layoutBuilderInternalService;
|
|
1941
|
+
this.hostElement = hostElement;
|
|
1942
|
+
this.renderer = renderer;
|
|
1943
|
+
this.editorMode = false;
|
|
1944
|
+
this.blockTemplate = undefined;
|
|
1945
|
+
this._showSkeleton = false;
|
|
1946
|
+
// // For show & hide skeleton
|
|
1947
|
+
// private _showSkeleton = false;
|
|
1948
|
+
this.layoutViewChange = new EventEmitter();
|
|
1949
|
+
this.screenTypeChange = new EventEmitter();
|
|
1950
|
+
this._horizontalSpacing = 'md';
|
|
1951
|
+
this._verticalSpacing = 'md';
|
|
1952
|
+
this.paddingInline = '1rem';
|
|
1953
|
+
this.previewMode = false;
|
|
1954
|
+
this._sectionsSubject = new BehaviorSubject([]);
|
|
1955
|
+
// Set the service in the layout builder component if exists.
|
|
1956
|
+
if (parent) {
|
|
1957
|
+
parent.layoutBuilderInternalService = this.layoutBuilderInternalService;
|
|
1958
|
+
}
|
|
1959
|
+
this.renderer.addClass(this.hostElement.nativeElement, 'pep-layout');
|
|
1960
|
+
}
|
|
1961
|
+
convertLayoutSizeType(size) {
|
|
1962
|
+
let res;
|
|
1963
|
+
if (size === 'lg') {
|
|
1964
|
+
res = '2rem';
|
|
1965
|
+
}
|
|
1966
|
+
else if (size === 'md') {
|
|
1967
|
+
res = '1rem';
|
|
1968
|
+
}
|
|
1969
|
+
else if (size === 'sm') {
|
|
1970
|
+
res = '0.5rem';
|
|
1971
|
+
}
|
|
1972
|
+
else {
|
|
1973
|
+
res = '0';
|
|
1974
|
+
}
|
|
1975
|
+
return res;
|
|
1976
|
+
}
|
|
1977
|
+
animateSkeleton() {
|
|
1978
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1979
|
+
if (this._showSkeleton) {
|
|
1980
|
+
// this.sectionsContainer?.nativeElement?.classList.add('out');
|
|
1981
|
+
(_b = (_a = this.sectionsContainer) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.classList.remove('in');
|
|
1982
|
+
(_d = (_c = this.skeletonContainer) === null || _c === void 0 ? void 0 : _c.nativeElement) === null || _d === void 0 ? void 0 : _d.classList.add('in');
|
|
1983
|
+
// this.skeletonContainer?.nativeElement?.classList.remove('out');
|
|
1984
|
+
}
|
|
1985
|
+
else {
|
|
1986
|
+
(_f = (_e = this.sectionsContainer) === null || _e === void 0 ? void 0 : _e.nativeElement) === null || _f === void 0 ? void 0 : _f.classList.add('in');
|
|
1987
|
+
// this.sectionsContainer?.nativeElement?.classList.remove('out');
|
|
1988
|
+
// this.skeletonContainer?.nativeElement?.classList.add('out');
|
|
1989
|
+
(_h = (_g = this.skeletonContainer) === null || _g === void 0 ? void 0 : _g.nativeElement) === null || _h === void 0 ? void 0 : _h.classList.remove('in');
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
setLayoutDataProperties() {
|
|
1993
|
+
var _a;
|
|
1994
|
+
const layoutView = this._layoutView;
|
|
1995
|
+
if (layoutView) {
|
|
1996
|
+
if ((_a = this.sectionsContainer) === null || _a === void 0 ? void 0 : _a.nativeElement) {
|
|
1997
|
+
const maxWidth = coerceNumberProperty(layoutView.Layout.MaxWidth, 0);
|
|
1998
|
+
const maxWidthToSet = maxWidth === 0 ? 'unset' : `${maxWidth}px`;
|
|
1999
|
+
this.renderer.setStyle(this.sectionsContainer.nativeElement, 'max-width', maxWidthToSet);
|
|
2000
|
+
}
|
|
2001
|
+
this.sectionsGap = layoutView.Layout.SectionsGap || 'md';
|
|
2002
|
+
this.columnsGap = layoutView.Layout.ColumnsGap || 'md';
|
|
2003
|
+
this.horizontalSpacing = layoutView.Layout.HorizontalSpacing;
|
|
2004
|
+
this.verticalSpacing = layoutView.Layout.VerticalSpacing;
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
setScreentType(screenSize) {
|
|
2008
|
+
const screenType = this.layoutBuilderInternalService.getScreenType(screenSize);
|
|
2009
|
+
this.selectedScreenType = screenType;
|
|
2010
|
+
this.screenTypeChange.emit(screenType);
|
|
2011
|
+
}
|
|
2012
|
+
ngOnInit() {
|
|
2013
|
+
/***********************************************************************************************/
|
|
2014
|
+
/* Internal Events - for code usage
|
|
2015
|
+
/***********************************************************************************************/
|
|
2016
|
+
if (this.editorMode) {
|
|
2017
|
+
this.layoutBuilderInternalService.previewModeChange$.pipe(this.getDestroyer()).subscribe((previewMode) => {
|
|
2018
|
+
this.previewMode = previewMode;
|
|
2019
|
+
});
|
|
2020
|
+
}
|
|
2021
|
+
this.layoutBuilderInternalService.sectionsChange$.pipe(this.getDestroyer()).subscribe((sections) => {
|
|
2022
|
+
this._sectionsSubject.next(sections);
|
|
2023
|
+
});
|
|
2024
|
+
// this.layoutBuilderInternalService.showSkeletonChange$.pipe(this.getDestroyer()).subscribe((showSkeleton: any) => {
|
|
2025
|
+
// if (showSkeleton !== undefined) {
|
|
2026
|
+
// this._showSkeleton = showSkeleton;
|
|
2027
|
+
// this.animateSkeleton();
|
|
2028
|
+
// }
|
|
2029
|
+
// });
|
|
2030
|
+
// this.layoutService.onResize$.pipe(this.getDestroyer()).subscribe((size: any) => {
|
|
2031
|
+
// this.setScreentType(size);
|
|
2032
|
+
// });
|
|
2033
|
+
this.layoutBuilderInternalService.screenSizeChange$.pipe(this.getDestroyer()).subscribe((size) => {
|
|
2034
|
+
this.setScreentType(size);
|
|
2035
|
+
});
|
|
2036
|
+
/***********************************************************************************************/
|
|
2037
|
+
/* External Events - for raise to the client
|
|
2038
|
+
/***********************************************************************************************/
|
|
2039
|
+
this.layoutBuilderInternalService.layoutViewChange$.pipe(this.getDestroyer()).subscribe((layoutView) => {
|
|
2040
|
+
this._layoutView = layoutView;
|
|
2041
|
+
this.setLayoutDataProperties();
|
|
2042
|
+
this.layoutViewChange.emit(this._layoutView);
|
|
2043
|
+
});
|
|
2044
|
+
}
|
|
2045
|
+
ngOnDestroy() {
|
|
2046
|
+
super.ngOnDestroy();
|
|
2047
|
+
// this.layoutBuilderService.removeInternalService(this.layoutView?.Key);
|
|
2048
|
+
}
|
|
2049
|
+
getSectionsTemplateRows() {
|
|
2050
|
+
let gridAutoRows = '';
|
|
2051
|
+
// let fillHeightCount = 0;
|
|
2052
|
+
this.sections$.pipe(this.getDestroyer()).subscribe((sections) => {
|
|
2053
|
+
if (sections === null || sections === void 0 ? void 0 : sections.length) {
|
|
2054
|
+
sections.forEach((sec) => {
|
|
2055
|
+
if (sec.FillHeight === true) {
|
|
2056
|
+
// fillHeightCount++;
|
|
2057
|
+
gridAutoRows += ' auto';
|
|
2058
|
+
}
|
|
2059
|
+
else {
|
|
2060
|
+
gridAutoRows += ' min-content';
|
|
2061
|
+
}
|
|
2062
|
+
});
|
|
2063
|
+
//if all are fill height should return 1fr for all
|
|
2064
|
+
//if not should return auto for fill height and min content for none
|
|
2065
|
+
return gridAutoRows;
|
|
2066
|
+
}
|
|
2067
|
+
else {
|
|
2068
|
+
return '';
|
|
2069
|
+
}
|
|
2070
|
+
});
|
|
2071
|
+
return gridAutoRows;
|
|
2072
|
+
}
|
|
2073
|
+
onSectionDropped(event) {
|
|
2074
|
+
this.layoutBuilderInternalService.onSectionDropped(event);
|
|
2075
|
+
}
|
|
2076
|
+
onDragStart(event) {
|
|
2077
|
+
this.layoutBuilderInternalService.onSectionDragStart(event);
|
|
2078
|
+
}
|
|
2079
|
+
onDragEnd(event) {
|
|
2080
|
+
this.layoutBuilderInternalService.onSectionDragEnd(event);
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
PepLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutComponent, deps: [{ token: PepLayoutBuilderComponent, optional: true }, { token: LayoutBuilderInternalService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
2084
|
+
PepLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepLayoutComponent, selector: "pep-layout", inputs: { editorMode: "editorMode", layoutView: "layoutView", blockTemplate: "blockTemplate", showSkeleton: "showSkeleton" }, outputs: { layoutViewChange: "layoutViewChange", screenTypeChange: "screenTypeChange" }, host: { properties: { "style.padding-inline": "this.paddingInline" } }, providers: [LayoutBuilderInternalService], viewQueries: [{ propertyName: "skeletonContainer", first: true, predicate: ["skeletonCont"], descendants: true, static: true }, { propertyName: "sectionsContainer", first: true, predicate: ["sectionsCont"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<!-- For the top spacing -->\n<div class=\"top-spacing spacing-{{verticalSpacing}}\" ></div>\n<div #sectionsCont cdkDropListGroup class=\"sections-container gap-{{ sectionsGap }}\" [ngClass]=\"{'preview-state': previewMode }\" \n cdkDropList (cdkDropListDropped)=\"onSectionDropped($event)\" [ngStyle]=\"{'grid-auto-rows': getSectionsTemplateRows()}\"\n >\n <section *ngFor=\"let section of sections$ | async; let i=index;\" \n class=\"draggable-section \" [ngClass]=\"selectedScreenType === 'Phablet' ? 'margin-'+sectionsGap : ''\" [blockTemplate]=\"blockTemplate\"\n [key]=\"section.Key\" [name]=\"section.Name || ('LAYOUT_BUILDER.SECTION' | translate) + ' ' + (i+1)\" [split]=\"section.Split\" [height]=\"section.Height\"\n [columns]=\"section.Columns\" [padding]=\"section.Padding\" [collapseOnTablet]=\"section.CollapseOnTablet || false\" [hideIn]=\"section.Hide || []\" [columnsGap]=\"columnsGap\"\n >\n </section>\n</div>\n<div #skeletonCont class=\"skeleton-container \">\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"xl\" ></pep-skeleton-loader>\n <div class=\"split-skeleton-container\">\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"max\" ></pep-skeleton-loader>\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"max\" ></pep-skeleton-loader>\n </div>\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"xl\" ></pep-skeleton-loader>\n\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"max\" ></pep-skeleton-loader>\n</div>\n<!-- For the bottom spacing -->\n<div class=\"bottom-spacing spacing-{{verticalSpacing}}\"></div>\n<pep-size-detector></pep-size-detector>", styles: [":host{display:grid;grid-template-areas:\"top-spacing\" \"content\" \"bottom-spacing\";grid-template-rows:auto 1fr auto;height:100%}.top-spacing{grid-area:top-spacing}.top-spacing.spacing-none{height:0}.top-spacing.spacing-sm{height:var(--pep-spacing-sm, .5rem)}.top-spacing.spacing-md{height:var(--pep-spacing-lg, 1rem)}.top-spacing.spacing-lg{height:var(--pep-spacing-2xl, 2rem)}.bottom-spacing{grid-area:bottom-spacing}.bottom-spacing.spacing-none{height:0}.bottom-spacing.spacing-sm{height:var(--pep-spacing-sm, .5rem)}.bottom-spacing.spacing-md{height:var(--pep-spacing-lg, 1rem)}.bottom-spacing.spacing-lg{height:var(--pep-spacing-2xl, 2rem)}.skeleton-container{display:grid;grid-area:content;height:100%;gap:var(--pep-spacing-lg, 1rem);grid-template-rows:auto auto auto 1fr;opacity:0}.skeleton-container .split-skeleton-container{display:grid;height:10rem;gap:var(--pep-spacing-lg, 1rem);grid-auto-flow:column}.sections-container{z-index:11;grid-area:content;width:100%;max-width:inherit;overflow-x:unset;margin:0 auto;position:relative;display:grid;grid-row:1px;height:inherit;opacity:0}.sections-container.gap-none{gap:0}.sections-container.gap-sm{gap:var(--pep-spacing-sm, .5rem)}.sections-container.gap-md{gap:var(--pep-spacing-lg, 1rem)}.sections-container.gap-lg{gap:var(--pep-spacing-2xl, 2rem)}.sections-container .draggable-section{display:block}.sections-container.preview-state section{display:contents}@keyframes in{0%{opacity:0;transform:translateY(-80);filter:blur(20px)}to{transform:translateY(0);opacity:1;filter:blur(0)}}.in{animation-name:in;animation-direction:normal;animation-duration:1.2s;animation-fill-mode:forwards}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4$5.PepSkeletonLoaderComponent, selector: "pep-skeleton-loader", inputs: ["rowHeightType", "rowsNumber", "lastRowOffset"] }, { kind: "component", type: i5$4.PepSizeDetectorComponent, selector: "pep-size-detector", inputs: ["showScreenSize", "useAsWebComponent"], outputs: ["sizeChange"] }, { kind: "directive", type: i3$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3$2.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "component", type: SectionComponent, selector: "section", inputs: ["blockTemplate", "key", "name", "split", "height", "collapseOnTablet", "padding", "columns", "hideIn", "columnsGap"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
2085
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutComponent, decorators: [{
|
|
2086
|
+
type: Component,
|
|
2087
|
+
args: [{ selector: 'pep-layout', providers: [LayoutBuilderInternalService], template: "<!-- For the top spacing -->\n<div class=\"top-spacing spacing-{{verticalSpacing}}\" ></div>\n<div #sectionsCont cdkDropListGroup class=\"sections-container gap-{{ sectionsGap }}\" [ngClass]=\"{'preview-state': previewMode }\" \n cdkDropList (cdkDropListDropped)=\"onSectionDropped($event)\" [ngStyle]=\"{'grid-auto-rows': getSectionsTemplateRows()}\"\n >\n <section *ngFor=\"let section of sections$ | async; let i=index;\" \n class=\"draggable-section \" [ngClass]=\"selectedScreenType === 'Phablet' ? 'margin-'+sectionsGap : ''\" [blockTemplate]=\"blockTemplate\"\n [key]=\"section.Key\" [name]=\"section.Name || ('LAYOUT_BUILDER.SECTION' | translate) + ' ' + (i+1)\" [split]=\"section.Split\" [height]=\"section.Height\"\n [columns]=\"section.Columns\" [padding]=\"section.Padding\" [collapseOnTablet]=\"section.CollapseOnTablet || false\" [hideIn]=\"section.Hide || []\" [columnsGap]=\"columnsGap\"\n >\n </section>\n</div>\n<div #skeletonCont class=\"skeleton-container \">\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"xl\" ></pep-skeleton-loader>\n <div class=\"split-skeleton-container\">\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"max\" ></pep-skeleton-loader>\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"max\" ></pep-skeleton-loader>\n </div>\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"xl\" ></pep-skeleton-loader>\n\n <pep-skeleton-loader [rowsNumber]=\"1\" [lastRowOffset]=\"false\" rowHeightType=\"max\" ></pep-skeleton-loader>\n</div>\n<!-- For the bottom spacing -->\n<div class=\"bottom-spacing spacing-{{verticalSpacing}}\"></div>\n<pep-size-detector></pep-size-detector>", styles: [":host{display:grid;grid-template-areas:\"top-spacing\" \"content\" \"bottom-spacing\";grid-template-rows:auto 1fr auto;height:100%}.top-spacing{grid-area:top-spacing}.top-spacing.spacing-none{height:0}.top-spacing.spacing-sm{height:var(--pep-spacing-sm, .5rem)}.top-spacing.spacing-md{height:var(--pep-spacing-lg, 1rem)}.top-spacing.spacing-lg{height:var(--pep-spacing-2xl, 2rem)}.bottom-spacing{grid-area:bottom-spacing}.bottom-spacing.spacing-none{height:0}.bottom-spacing.spacing-sm{height:var(--pep-spacing-sm, .5rem)}.bottom-spacing.spacing-md{height:var(--pep-spacing-lg, 1rem)}.bottom-spacing.spacing-lg{height:var(--pep-spacing-2xl, 2rem)}.skeleton-container{display:grid;grid-area:content;height:100%;gap:var(--pep-spacing-lg, 1rem);grid-template-rows:auto auto auto 1fr;opacity:0}.skeleton-container .split-skeleton-container{display:grid;height:10rem;gap:var(--pep-spacing-lg, 1rem);grid-auto-flow:column}.sections-container{z-index:11;grid-area:content;width:100%;max-width:inherit;overflow-x:unset;margin:0 auto;position:relative;display:grid;grid-row:1px;height:inherit;opacity:0}.sections-container.gap-none{gap:0}.sections-container.gap-sm{gap:var(--pep-spacing-sm, .5rem)}.sections-container.gap-md{gap:var(--pep-spacing-lg, 1rem)}.sections-container.gap-lg{gap:var(--pep-spacing-2xl, 2rem)}.sections-container .draggable-section{display:block}.sections-container.preview-state section{display:contents}@keyframes in{0%{opacity:0;transform:translateY(-80);filter:blur(20px)}to{transform:translateY(0);opacity:1;filter:blur(0)}}.in{animation-name:in;animation-direction:normal;animation-duration:1.2s;animation-fill-mode:forwards}\n"] }]
|
|
2088
|
+
}], ctorParameters: function () {
|
|
2089
|
+
return [{ type: PepLayoutBuilderComponent, decorators: [{
|
|
2090
|
+
type: Optional
|
|
2091
|
+
}] }, { type: LayoutBuilderInternalService }, { type: i0.ElementRef }, { type: i0.Renderer2 }];
|
|
2092
|
+
}, propDecorators: { skeletonContainer: [{
|
|
2093
|
+
type: ViewChild,
|
|
2094
|
+
args: ['skeletonCont', { static: true }]
|
|
2095
|
+
}], sectionsContainer: [{
|
|
2096
|
+
type: ViewChild,
|
|
2097
|
+
args: ['sectionsCont', { static: true }]
|
|
2098
|
+
}], editorMode: [{
|
|
2099
|
+
type: Input
|
|
2100
|
+
}], layoutView: [{
|
|
2101
|
+
type: Input
|
|
2102
|
+
}], blockTemplate: [{
|
|
2103
|
+
type: Input
|
|
2104
|
+
}], showSkeleton: [{
|
|
2105
|
+
type: Input
|
|
2106
|
+
}], layoutViewChange: [{
|
|
2107
|
+
type: Output
|
|
2108
|
+
}], screenTypeChange: [{
|
|
2109
|
+
type: Output
|
|
2110
|
+
}], paddingInline: [{
|
|
2111
|
+
type: HostBinding,
|
|
2112
|
+
args: ['style.padding-inline']
|
|
2113
|
+
}] } });
|
|
2114
|
+
|
|
2115
|
+
class PepLayoutModule {
|
|
2116
|
+
}
|
|
2117
|
+
PepLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2118
|
+
PepLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutModule, declarations: [PepLayoutComponent], imports: [CommonModule,
|
|
2119
|
+
HttpClientModule,
|
|
2120
|
+
PepNgxLibModule,
|
|
2121
|
+
PepSkeletonLoaderModule,
|
|
2122
|
+
PepSizeDetectorModule,
|
|
2123
|
+
PepDialogModule,
|
|
2124
|
+
DragDropModule,
|
|
2125
|
+
SectionModule, i1.TranslateModule], exports: [PepLayoutComponent] });
|
|
2126
|
+
PepLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutModule, providers: [LayoutBuilderInternalService], imports: [CommonModule,
|
|
2127
|
+
HttpClientModule,
|
|
2128
|
+
PepNgxLibModule,
|
|
2129
|
+
PepSkeletonLoaderModule,
|
|
2130
|
+
PepSizeDetectorModule,
|
|
2131
|
+
PepDialogModule,
|
|
2132
|
+
DragDropModule,
|
|
2133
|
+
SectionModule,
|
|
2134
|
+
TranslateModule.forChild()] });
|
|
2135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutModule, decorators: [{
|
|
2136
|
+
type: NgModule,
|
|
2137
|
+
args: [{
|
|
2138
|
+
declarations: [
|
|
2139
|
+
PepLayoutComponent,
|
|
2140
|
+
],
|
|
2141
|
+
imports: [
|
|
2142
|
+
CommonModule,
|
|
2143
|
+
HttpClientModule,
|
|
2144
|
+
PepNgxLibModule,
|
|
2145
|
+
PepSkeletonLoaderModule,
|
|
2146
|
+
PepSizeDetectorModule,
|
|
2147
|
+
PepDialogModule,
|
|
2148
|
+
DragDropModule,
|
|
2149
|
+
SectionModule,
|
|
2150
|
+
TranslateModule.forChild()
|
|
2151
|
+
],
|
|
2152
|
+
exports: [PepLayoutComponent],
|
|
2153
|
+
providers: [LayoutBuilderInternalService]
|
|
2154
|
+
}]
|
|
2155
|
+
}] });
|
|
2156
|
+
|
|
2157
|
+
class PepLayoutBuilderEditorModule {
|
|
2158
|
+
constructor() {
|
|
2159
|
+
//
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
PepLayoutBuilderEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2163
|
+
PepLayoutBuilderEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderEditorModule, declarations: [PepLayoutBuilderEditorComponent], imports: [CommonModule,
|
|
2164
|
+
HttpClientModule,
|
|
2165
|
+
OverlayModule,
|
|
2166
|
+
MatTabsModule,
|
|
2167
|
+
PepNgxLibModule, i1.TranslateModule], exports: [PepLayoutBuilderEditorComponent] });
|
|
2168
|
+
PepLayoutBuilderEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderEditorModule, imports: [CommonModule,
|
|
2169
|
+
HttpClientModule,
|
|
2170
|
+
OverlayModule,
|
|
2171
|
+
MatTabsModule,
|
|
2172
|
+
PepNgxLibModule,
|
|
2173
|
+
TranslateModule.forChild()] });
|
|
2174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderEditorModule, decorators: [{
|
|
2175
|
+
type: NgModule,
|
|
2176
|
+
args: [{
|
|
2177
|
+
declarations: [
|
|
2178
|
+
PepLayoutBuilderEditorComponent
|
|
2179
|
+
],
|
|
2180
|
+
imports: [
|
|
2181
|
+
CommonModule,
|
|
2182
|
+
HttpClientModule,
|
|
2183
|
+
OverlayModule,
|
|
2184
|
+
MatTabsModule,
|
|
2185
|
+
PepNgxLibModule,
|
|
2186
|
+
TranslateModule.forChild()
|
|
2187
|
+
],
|
|
2188
|
+
exports: [PepLayoutBuilderEditorComponent]
|
|
2189
|
+
}]
|
|
2190
|
+
}], ctorParameters: function () { return []; } });
|
|
2191
|
+
|
|
2192
|
+
class MainEditorModule {
|
|
2193
|
+
constructor() {
|
|
2194
|
+
// this.pepIconRegistry.registerIcons(pepIcons);
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
MainEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MainEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2198
|
+
MainEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MainEditorModule, declarations: [MainEditorComponent], imports: [CommonModule,
|
|
2199
|
+
HttpClientModule,
|
|
2200
|
+
DragDropModule,
|
|
2201
|
+
OverlayModule,
|
|
2202
|
+
MatTabsModule,
|
|
2203
|
+
MatSliderModule,
|
|
2204
|
+
PepNgxLibModule,
|
|
2205
|
+
PepSelectModule,
|
|
2206
|
+
PepTextboxModule,
|
|
2207
|
+
PepButtonModule,
|
|
2208
|
+
PepCheckboxModule,
|
|
2209
|
+
PepGroupButtonsModule,
|
|
2210
|
+
PepColorModule,
|
|
2211
|
+
PepImageModule,
|
|
2212
|
+
PepGroupButtonsSettingsModule,
|
|
2213
|
+
PepDraggableItemsModule,
|
|
2214
|
+
PepDialogModule,
|
|
2215
|
+
PepLayoutBuilderEditorModule, i1.TranslateModule], exports: [MainEditorComponent] });
|
|
2216
|
+
MainEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MainEditorModule, imports: [CommonModule,
|
|
2217
|
+
HttpClientModule,
|
|
2218
|
+
DragDropModule,
|
|
2219
|
+
OverlayModule,
|
|
2220
|
+
MatTabsModule,
|
|
2221
|
+
MatSliderModule,
|
|
2222
|
+
PepNgxLibModule,
|
|
2223
|
+
PepSelectModule,
|
|
2224
|
+
PepTextboxModule,
|
|
2225
|
+
PepButtonModule,
|
|
2226
|
+
PepCheckboxModule,
|
|
2227
|
+
PepGroupButtonsModule,
|
|
2228
|
+
PepColorModule,
|
|
2229
|
+
PepImageModule,
|
|
2230
|
+
PepGroupButtonsSettingsModule,
|
|
2231
|
+
PepDraggableItemsModule,
|
|
2232
|
+
PepDialogModule,
|
|
2233
|
+
PepLayoutBuilderEditorModule,
|
|
2234
|
+
TranslateModule.forChild()] });
|
|
2235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MainEditorModule, decorators: [{
|
|
2236
|
+
type: NgModule,
|
|
2237
|
+
args: [{
|
|
2238
|
+
declarations: [
|
|
2239
|
+
MainEditorComponent
|
|
2240
|
+
],
|
|
2241
|
+
imports: [
|
|
2242
|
+
CommonModule,
|
|
2243
|
+
HttpClientModule,
|
|
2244
|
+
DragDropModule,
|
|
2245
|
+
OverlayModule,
|
|
2246
|
+
MatTabsModule,
|
|
2247
|
+
MatSliderModule,
|
|
2248
|
+
PepNgxLibModule,
|
|
2249
|
+
PepSelectModule,
|
|
2250
|
+
PepTextboxModule,
|
|
2251
|
+
PepButtonModule,
|
|
2252
|
+
PepCheckboxModule,
|
|
2253
|
+
PepGroupButtonsModule,
|
|
2254
|
+
PepColorModule,
|
|
2255
|
+
PepImageModule,
|
|
2256
|
+
PepGroupButtonsSettingsModule,
|
|
2257
|
+
PepDraggableItemsModule,
|
|
2258
|
+
PepDialogModule,
|
|
2259
|
+
PepLayoutBuilderEditorModule,
|
|
2260
|
+
TranslateModule.forChild()
|
|
2261
|
+
],
|
|
2262
|
+
exports: [MainEditorComponent]
|
|
2263
|
+
}]
|
|
2264
|
+
}], ctorParameters: function () { return []; } });
|
|
2265
|
+
|
|
2266
|
+
class SectionEditorModule {
|
|
2267
|
+
}
|
|
2268
|
+
SectionEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2269
|
+
SectionEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SectionEditorModule, declarations: [SectionEditorComponent], imports: [CommonModule,
|
|
2270
|
+
PepButtonModule,
|
|
2271
|
+
PepTextboxModule,
|
|
2272
|
+
PepSelectModule,
|
|
2273
|
+
PepCheckboxModule,
|
|
2274
|
+
PepLayoutBuilderEditorModule,
|
|
2275
|
+
PepPaddingSettingsModule, i1.TranslateModule], exports: [SectionEditorComponent] });
|
|
2276
|
+
SectionEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionEditorModule, imports: [CommonModule,
|
|
2277
|
+
PepButtonModule,
|
|
2278
|
+
PepTextboxModule,
|
|
2279
|
+
PepSelectModule,
|
|
2280
|
+
PepCheckboxModule,
|
|
2281
|
+
PepLayoutBuilderEditorModule,
|
|
2282
|
+
PepPaddingSettingsModule,
|
|
2283
|
+
TranslateModule.forChild()] });
|
|
2284
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionEditorModule, decorators: [{
|
|
2285
|
+
type: NgModule,
|
|
2286
|
+
args: [{
|
|
2287
|
+
declarations: [SectionEditorComponent],
|
|
2288
|
+
imports: [
|
|
2289
|
+
CommonModule,
|
|
2290
|
+
PepButtonModule,
|
|
2291
|
+
PepTextboxModule,
|
|
2292
|
+
PepSelectModule,
|
|
2293
|
+
PepCheckboxModule,
|
|
2294
|
+
PepLayoutBuilderEditorModule,
|
|
2295
|
+
PepPaddingSettingsModule,
|
|
2296
|
+
TranslateModule.forChild()
|
|
2297
|
+
],
|
|
2298
|
+
exports: [SectionEditorComponent]
|
|
2299
|
+
}]
|
|
2300
|
+
}] });
|
|
2301
|
+
|
|
2302
|
+
class PepLayoutBuilderService {
|
|
2303
|
+
constructor() {
|
|
2304
|
+
//
|
|
2201
2305
|
}
|
|
2202
2306
|
getIsHidden(hideIn, currentScreenType) {
|
|
2203
2307
|
return (hideIn && (hideIn === null || hideIn === void 0 ? void 0 : hideIn.length) > 0) ? hideIn.some(hi => hi === currentScreenType) : false;
|
|
2204
2308
|
}
|
|
2309
|
+
/**
|
|
2310
|
+
* Deprecated
|
|
2311
|
+
*/
|
|
2312
|
+
getCurrentScreenType() {
|
|
2313
|
+
return 'Landscape';
|
|
2314
|
+
// const layoutBuilderInternalService = this._layoutInternalServicesMap.get(layoutKey);
|
|
2315
|
+
// return layoutBuilderInternalService?.getCurrentScreenType() || 'Landscape';
|
|
2316
|
+
}
|
|
2317
|
+
/**
|
|
2318
|
+
* Deprecated
|
|
2319
|
+
*/
|
|
2320
|
+
getEditableState() {
|
|
2321
|
+
return false;
|
|
2322
|
+
// const layoutBuilderInternalService = this._layoutInternalServicesMap.get(layoutKey);
|
|
2323
|
+
// return layoutBuilderInternalService?.editableState || false;
|
|
2324
|
+
}
|
|
2325
|
+
/**
|
|
2326
|
+
* Deprecated
|
|
2327
|
+
*/
|
|
2205
2328
|
showSkeleton(show) {
|
|
2206
|
-
|
|
2329
|
+
// const layoutBuilderInternalService = this._layoutInternalServicesMap.get(layoutKey);
|
|
2330
|
+
// layoutBuilderInternalService?.showSkeleton(show);
|
|
2207
2331
|
}
|
|
2332
|
+
/**
|
|
2333
|
+
* Deprecated
|
|
2334
|
+
*/
|
|
2208
2335
|
lockScreen(lock) {
|
|
2209
|
-
|
|
2336
|
+
// const layoutBuilderInternalService = this._layoutInternalServicesMap.get(layoutKey);
|
|
2337
|
+
// layoutBuilderInternalService?.lockScreen(lock);
|
|
2210
2338
|
}
|
|
2211
2339
|
}
|
|
2212
|
-
PepLayoutBuilderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2213
|
-
PepLayoutBuilderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2340
|
+
PepLayoutBuilderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2341
|
+
PepLayoutBuilderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderService, providedIn: 'root' });
|
|
2342
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderService, decorators: [{
|
|
2215
2343
|
type: Injectable,
|
|
2216
2344
|
args: [{
|
|
2217
2345
|
providedIn: 'root',
|
|
2218
2346
|
}]
|
|
2219
|
-
}], ctorParameters: function () { return [
|
|
2347
|
+
}], ctorParameters: function () { return []; } });
|
|
2220
2348
|
|
|
2221
2349
|
class PepLayoutBuilderModule {
|
|
2222
2350
|
constructor(pepIconRegistry) {
|
|
@@ -2228,8 +2356,8 @@ class PepLayoutBuilderModule {
|
|
|
2228
2356
|
]);
|
|
2229
2357
|
}
|
|
2230
2358
|
}
|
|
2231
|
-
PepLayoutBuilderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2232
|
-
PepLayoutBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2359
|
+
PepLayoutBuilderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderModule, deps: [{ token: i1$1.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2360
|
+
PepLayoutBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderModule, declarations: [PepLayoutBuilderComponent], imports: [CommonModule,
|
|
2233
2361
|
DragDropModule,
|
|
2234
2362
|
// Material modules,
|
|
2235
2363
|
MatCommonModule,
|
|
@@ -2257,7 +2385,7 @@ PepLayoutBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
2257
2385
|
], exports: [PepLayoutBuilderComponent,
|
|
2258
2386
|
PepLayoutModule,
|
|
2259
2387
|
PepLayoutBuilderEditorModule] });
|
|
2260
|
-
PepLayoutBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2388
|
+
PepLayoutBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderModule, providers: [
|
|
2261
2389
|
LayoutBuilderInternalService,
|
|
2262
2390
|
PepLayoutBuilderService
|
|
2263
2391
|
], imports: [CommonModule,
|
|
@@ -2288,7 +2416,7 @@ PepLayoutBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
2288
2416
|
,
|
|
2289
2417
|
PepLayoutModule,
|
|
2290
2418
|
PepLayoutBuilderEditorModule] });
|
|
2291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepLayoutBuilderModule, decorators: [{
|
|
2292
2420
|
type: NgModule,
|
|
2293
2421
|
args: [{
|
|
2294
2422
|
declarations: [
|