@pepperi-addons/ngx-composite-lib 0.4.2-beta.7 → 0.4.2-beta.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/color-settings/color-settings.component.d.ts +3 -2
  2. package/core/common/services/dimx.service.d.ts +4 -0
  3. package/esm2020/color-settings/color-settings.component.mjs +6 -3
  4. package/esm2020/core/common/directives/reset-configuration-field.directive.mjs +5 -4
  5. package/esm2020/core/common/services/dimx.service.mjs +1 -1
  6. package/esm2020/file-status-panel/file-status-panel.module.mjs +23 -3
  7. package/esm2020/flow-picker-button/flow-picker-button.component.mjs +94 -0
  8. package/esm2020/flow-picker-button/flow-picker-button.module.mjs +36 -0
  9. package/esm2020/flow-picker-button/flow-picker-button.service.mjs +21 -0
  10. package/esm2020/flow-picker-button/pepperi-addons-ngx-composite-lib-flow-picker-button.mjs +5 -0
  11. package/esm2020/flow-picker-button/public-api.mjs +6 -0
  12. package/esm2020/generic-list/generic-list.component.mjs +64 -7
  13. package/esm2020/generic-list/generic-list.service.mjs +6 -2
  14. package/esm2020/group-buttons-settings/group-buttons-settings.component.mjs +17 -4
  15. package/esm2020/group-buttons-settings/group-buttons-settings.model.mjs +1 -1
  16. package/esm2020/icon-picker/icon-picker.component.mjs +79 -0
  17. package/esm2020/icon-picker/icon-picker.module.mjs +44 -0
  18. package/esm2020/icon-picker/icon-picker.service.mjs +17 -0
  19. package/esm2020/icon-picker/pepperi-addons-ngx-composite-lib-icon-picker.mjs +5 -0
  20. package/esm2020/icon-picker/public-api.mjs +6 -0
  21. package/esm2020/layout-builder/hide-in/hide-in.component.mjs +54 -0
  22. package/esm2020/layout-builder/hide-in/hide-in.module.mjs +81 -0
  23. package/esm2020/layout-builder/layout/layout.component.mjs +204 -0
  24. package/esm2020/layout-builder/layout/layout.module.mjs +58 -0
  25. package/esm2020/layout-builder/layout-builder-internal.service.mjs +655 -0
  26. package/esm2020/layout-builder/layout-builder.component.mjs +205 -0
  27. package/esm2020/layout-builder/layout-builder.model.mjs +6 -0
  28. package/esm2020/layout-builder/layout-builder.module.mjs +136 -0
  29. package/esm2020/layout-builder/layout-builder.service.mjs +33 -0
  30. package/esm2020/layout-builder/layout-editor/layout-editor.component.mjs +156 -0
  31. package/esm2020/layout-builder/layout-editor/layout-editor.module.mjs +109 -0
  32. package/esm2020/layout-builder/pepperi-addons-ngx-composite-lib-layout-builder.mjs +5 -0
  33. package/esm2020/layout-builder/public-api.mjs +10 -0
  34. package/esm2020/layout-builder/section/section.component.mjs +298 -0
  35. package/esm2020/layout-builder/section/section.module.mjs +45 -0
  36. package/esm2020/layout-builder/section-block/section-block.component.mjs +109 -0
  37. package/esm2020/layout-builder/section-block/section-block.module.mjs +48 -0
  38. package/esm2020/layout-builder/section-editor/section-editor.component.mjs +191 -0
  39. package/esm2020/layout-builder/section-editor/section-editor.module.mjs +40 -0
  40. package/esm2020/manage-parameters/manage-parameter/manage-parameter.component.mjs +82 -0
  41. package/esm2020/manage-parameters/manage-parameters.component.mjs +153 -0
  42. package/esm2020/manage-parameters/manage-parameters.model.mjs +24 -0
  43. package/esm2020/manage-parameters/manage-parameters.module.mjs +45 -0
  44. package/esm2020/manage-parameters/manage-parameters.service.mjs +142 -0
  45. package/esm2020/manage-parameters/pepperi-addons-ngx-composite-lib-manage-parameters.mjs +5 -0
  46. package/esm2020/manage-parameters/public-api.mjs +8 -0
  47. package/esm2020/rich-text/pepperi-addons-ngx-composite-lib-rich-text.mjs +5 -0
  48. package/esm2020/rich-text/public-api.mjs +6 -0
  49. package/esm2020/rich-text/rich-text.component.mjs +154 -0
  50. package/esm2020/rich-text/rich-text.module.mjs +52 -0
  51. package/esm2020/rich-text/rich-text.service.mjs +21 -0
  52. package/esm2020/shadow-settings/shadow-settings.component.mjs +7 -4
  53. package/esm2020/show-if-badge/pepperi-addons-ngx-composite-lib-show-if-badge.mjs +5 -0
  54. package/esm2020/show-if-badge/public-api.mjs +6 -0
  55. package/esm2020/show-if-badge/show-if-badge.component.mjs +44 -0
  56. package/esm2020/show-if-badge/show-if-badge.module.mjs +50 -0
  57. package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.mjs +5 -2
  58. package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.mjs.map +1 -1
  59. package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.mjs +22 -3
  60. package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.mjs.map +1 -1
  61. package/fesm2015/pepperi-addons-ngx-composite-lib-flow-picker-button.mjs +161 -0
  62. package/fesm2015/pepperi-addons-ngx-composite-lib-flow-picker-button.mjs.map +1 -0
  63. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.mjs +70 -7
  64. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.mjs.map +1 -1
  65. package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs +16 -3
  66. package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs.map +1 -1
  67. package/fesm2015/pepperi-addons-ngx-composite-lib-icon-picker.mjs +146 -0
  68. package/fesm2015/pepperi-addons-ngx-composite-lib-icon-picker.mjs.map +1 -0
  69. package/fesm2015/pepperi-addons-ngx-composite-lib-layout-builder.mjs +2307 -0
  70. package/fesm2015/pepperi-addons-ngx-composite-lib-layout-builder.mjs.map +1 -0
  71. package/fesm2015/pepperi-addons-ngx-composite-lib-manage-parameters.mjs +441 -0
  72. package/fesm2015/pepperi-addons-ngx-composite-lib-manage-parameters.mjs.map +1 -0
  73. package/fesm2015/pepperi-addons-ngx-composite-lib-rich-text.mjs +234 -0
  74. package/fesm2015/pepperi-addons-ngx-composite-lib-rich-text.mjs.map +1 -0
  75. package/fesm2015/pepperi-addons-ngx-composite-lib-shadow-settings.mjs +6 -3
  76. package/fesm2015/pepperi-addons-ngx-composite-lib-shadow-settings.mjs.map +1 -1
  77. package/fesm2015/pepperi-addons-ngx-composite-lib-show-if-badge.mjs +100 -0
  78. package/fesm2015/pepperi-addons-ngx-composite-lib-show-if-badge.mjs.map +1 -0
  79. package/fesm2015/pepperi-addons-ngx-composite-lib.mjs +4 -3
  80. package/fesm2015/pepperi-addons-ngx-composite-lib.mjs.map +1 -1
  81. package/fesm2020/pepperi-addons-ngx-composite-lib-color-settings.mjs +5 -2
  82. package/fesm2020/pepperi-addons-ngx-composite-lib-color-settings.mjs.map +1 -1
  83. package/fesm2020/pepperi-addons-ngx-composite-lib-file-status-panel.mjs +22 -3
  84. package/fesm2020/pepperi-addons-ngx-composite-lib-file-status-panel.mjs.map +1 -1
  85. package/fesm2020/pepperi-addons-ngx-composite-lib-flow-picker-button.mjs +155 -0
  86. package/fesm2020/pepperi-addons-ngx-composite-lib-flow-picker-button.mjs.map +1 -0
  87. package/fesm2020/pepperi-addons-ngx-composite-lib-generic-list.mjs +68 -7
  88. package/fesm2020/pepperi-addons-ngx-composite-lib-generic-list.mjs.map +1 -1
  89. package/fesm2020/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs +16 -3
  90. package/fesm2020/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs.map +1 -1
  91. package/fesm2020/pepperi-addons-ngx-composite-lib-icon-picker.mjs +145 -0
  92. package/fesm2020/pepperi-addons-ngx-composite-lib-icon-picker.mjs.map +1 -0
  93. package/fesm2020/pepperi-addons-ngx-composite-lib-layout-builder.mjs +2286 -0
  94. package/fesm2020/pepperi-addons-ngx-composite-lib-layout-builder.mjs.map +1 -0
  95. package/fesm2020/pepperi-addons-ngx-composite-lib-manage-parameters.mjs +438 -0
  96. package/fesm2020/pepperi-addons-ngx-composite-lib-manage-parameters.mjs.map +1 -0
  97. package/fesm2020/pepperi-addons-ngx-composite-lib-rich-text.mjs +230 -0
  98. package/fesm2020/pepperi-addons-ngx-composite-lib-rich-text.mjs.map +1 -0
  99. package/fesm2020/pepperi-addons-ngx-composite-lib-shadow-settings.mjs +6 -3
  100. package/fesm2020/pepperi-addons-ngx-composite-lib-shadow-settings.mjs.map +1 -1
  101. package/fesm2020/pepperi-addons-ngx-composite-lib-show-if-badge.mjs +100 -0
  102. package/fesm2020/pepperi-addons-ngx-composite-lib-show-if-badge.mjs.map +1 -0
  103. package/fesm2020/pepperi-addons-ngx-composite-lib.mjs +4 -3
  104. package/fesm2020/pepperi-addons-ngx-composite-lib.mjs.map +1 -1
  105. package/flow-picker-button/flow-picker-button.component.d.ts +27 -0
  106. package/flow-picker-button/flow-picker-button.module.d.ts +11 -0
  107. package/flow-picker-button/flow-picker-button.service.d.ts +9 -0
  108. package/flow-picker-button/index.d.ts +5 -0
  109. package/flow-picker-button/public-api.d.ts +2 -0
  110. package/generic-list/generic-list.component.d.ts +17 -5
  111. package/generic-list/generic-list.service.d.ts +2 -1
  112. package/group-buttons-settings/group-buttons-settings.component.d.ts +5 -2
  113. package/group-buttons-settings/group-buttons-settings.model.d.ts +1 -1
  114. package/icon-picker/icon-picker.component.d.ts +24 -0
  115. package/icon-picker/icon-picker.module.d.ts +13 -0
  116. package/icon-picker/icon-picker.service.d.ts +8 -0
  117. package/icon-picker/index.d.ts +5 -0
  118. package/icon-picker/public-api.d.ts +2 -0
  119. package/layout-builder/hide-in/hide-in.component.d.ts +25 -0
  120. package/layout-builder/hide-in/hide-in.component.theme.scss +9 -0
  121. package/layout-builder/hide-in/hide-in.module.d.ts +20 -0
  122. package/layout-builder/index.d.ts +5 -0
  123. package/layout-builder/layout/layout.component.d.ts +51 -0
  124. package/layout-builder/layout/layout.module.d.ts +17 -0
  125. package/layout-builder/layout-builder-internal.service.d.ts +107 -0
  126. package/layout-builder/layout-builder.component.d.ts +51 -0
  127. package/layout-builder/layout-builder.component.theme.scss +56 -0
  128. package/layout-builder/layout-builder.model.d.ts +51 -0
  129. package/layout-builder/layout-builder.module.d.ts +32 -0
  130. package/layout-builder/layout-builder.service.d.ts +14 -0
  131. package/layout-builder/layout-editor/layout-editor.component.d.ts +49 -0
  132. package/layout-builder/layout-editor/layout-editor.module.d.ts +28 -0
  133. package/layout-builder/public-api.d.ts +6 -0
  134. package/layout-builder/section/section.component.d.ts +76 -0
  135. package/layout-builder/section/section.component.theme.scss +115 -0
  136. package/layout-builder/section/section.module.d.ts +14 -0
  137. package/layout-builder/section-block/section-block.component.d.ts +39 -0
  138. package/layout-builder/section-block/section-block.component.theme.scss +13 -0
  139. package/layout-builder/section-block/section-block.module.d.ts +13 -0
  140. package/layout-builder/section-editor/section-editor.component.d.ts +53 -0
  141. package/layout-builder/section-editor/section-editor.module.d.ts +13 -0
  142. package/manage-parameters/index.d.ts +5 -0
  143. package/manage-parameters/manage-parameter/manage-parameter.component.d.ts +28 -0
  144. package/manage-parameters/manage-parameters.component.d.ts +33 -0
  145. package/manage-parameters/manage-parameters.model.d.ts +21 -0
  146. package/manage-parameters/manage-parameters.module.d.ts +14 -0
  147. package/manage-parameters/manage-parameters.service.d.ts +16 -0
  148. package/manage-parameters/public-api.d.ts +3 -0
  149. package/package.json +50 -2
  150. package/rich-text/index.d.ts +5 -0
  151. package/rich-text/public-api.d.ts +2 -0
  152. package/rich-text/rich-text.component.d.ts +43 -0
  153. package/rich-text/rich-text.module.d.ts +16 -0
  154. package/rich-text/rich-text.service.d.ts +9 -0
  155. package/shadow-settings/shadow-settings.component.d.ts +2 -1
  156. package/show-if-badge/index.d.ts +5 -0
  157. package/show-if-badge/public-api.d.ts +2 -0
  158. package/show-if-badge/show-if-badge.component.d.ts +20 -0
  159. package/show-if-badge/show-if-badge.module.d.ts +16 -0
  160. package/src/assets/i18n/en.ngx-composite-lib.json +77 -4
  161. package/src/assets/images/brand-leaf-full@1x.png +0 -0
  162. package/src/assets/images/brand-leaf-full@2x.png +0 -0
  163. package/src/assets/images/brand-leaf-round.png +0 -0
  164. package/src/assets/images/brand-leaf-round@2x.png +0 -0
  165. package/src/assets/images/brand-leaf-skiny@1x.png +0 -0
  166. package/src/assets/images/brand-leaf-skiny@2x.png +0 -0
@@ -0,0 +1,2307 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Component, Input, Output, NgModule, Injectable, ViewChild, ViewChildren, HostBinding, ElementRef, HostListener } from '@angular/core';
3
+ import * as i3 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i4$1 from '@angular/cdk/drag-drop';
6
+ import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
7
+ import { MatCommonModule } from '@angular/material/core';
8
+ import * as i5$4 from '@angular/material/tabs';
9
+ import { MatTabsModule } from '@angular/material/tabs';
10
+ import * as i1$2 from '@pepperi-addons/ngx-lib';
11
+ import { PepScreenSizeType, PepGuid, BaseDestroyerDirective, PepNgxLibModule } from '@pepperi-addons/ngx-lib';
12
+ import * as i5$2 from '@pepperi-addons/ngx-lib/size-detector';
13
+ import { PepSizeDetectorModule } from '@pepperi-addons/ngx-lib/size-detector';
14
+ import * as i4$2 from '@pepperi-addons/ngx-lib/skeleton-loader';
15
+ import { PepSkeletonLoaderModule } from '@pepperi-addons/ngx-lib/skeleton-loader';
16
+ import * as i6 from '@pepperi-addons/ngx-lib/button';
17
+ import { PepButtonModule } from '@pepperi-addons/ngx-lib/button';
18
+ import * as i2 from '@pepperi-addons/ngx-lib/dialog';
19
+ import { PepDialogData, PepDialogModule, PepDialogActionButton } from '@pepperi-addons/ngx-lib/dialog';
20
+ import * as i8$1 from '@pepperi-addons/ngx-lib/group-buttons';
21
+ import { PepGroupButtonsModule } from '@pepperi-addons/ngx-lib/group-buttons';
22
+ import * as i5$5 from '@pepperi-addons/ngx-lib/page-layout';
23
+ import { PepPageLayoutModule } from '@pepperi-addons/ngx-lib/page-layout';
24
+ import * as i6$1 from '@pepperi-addons/ngx-lib/side-bar';
25
+ import { PepSideBarComponent, PepSideBarModule } from '@pepperi-addons/ngx-lib/side-bar';
26
+ import * as i5$1 from '@pepperi-addons/ngx-lib/draggable-items';
27
+ import { PepDraggableItemsModule } from '@pepperi-addons/ngx-lib/draggable-items';
28
+ import * as i5$3 from '@pepperi-addons/ngx-lib/checkbox';
29
+ import { PepCheckboxModule } from '@pepperi-addons/ngx-lib/checkbox';
30
+ import * as i4$3 from '@pepperi-addons/ngx-lib/select';
31
+ import { PepSelectModule } from '@pepperi-addons/ngx-lib/select';
32
+ import * as i3$2 from '@pepperi-addons/ngx-lib/textbox';
33
+ import { PepTextboxModule } from '@pepperi-addons/ngx-lib/textbox';
34
+ import * as i8 from '@pepperi-addons/ngx-composite-lib/group-buttons-settings';
35
+ import { PepGroupButtonsSettingsModule } from '@pepperi-addons/ngx-composite-lib/group-buttons-settings';
36
+ import { __awaiter } from 'tslib';
37
+ import * as i1 from '@ngx-translate/core';
38
+ import { TranslateModule } from '@ngx-translate/core';
39
+ import * as i3$1 from '@angular/material/menu';
40
+ import { MatMenuModule } from '@angular/material/menu';
41
+ import * as i4 from '@angular/material/badge';
42
+ import { MatBadgeModule } from '@angular/material/badge';
43
+ import * as i5 from '@angular/material/checkbox';
44
+ import { MatCheckboxModule } from '@angular/material/checkbox';
45
+ import { MatButtonModule } from '@angular/material/button';
46
+ import { MatIconModule } from '@angular/material/icon';
47
+ import * as i1$1 from '@pepperi-addons/ngx-lib/icon';
48
+ import { pepIconSystemView, PepIconModule, pepIconDeviceDesktop, pepIconDeviceTablet, pepIconDeviceMobile } from '@pepperi-addons/ngx-lib/icon';
49
+ import { HttpClientModule } from '@angular/common/http';
50
+ import { PepRemoteLoaderModule } from '@pepperi-addons/ngx-lib/remote-loader';
51
+ import { coerceNumberProperty } from '@angular/cdk/coercion';
52
+ import { BehaviorSubject } from 'rxjs';
53
+ import { distinctUntilChanged, filter } from 'rxjs/operators';
54
+ import { OverlayModule } from '@angular/cdk/overlay';
55
+ import { PepTextareaModule } from '@pepperi-addons/ngx-lib/textarea';
56
+ import { PepColorModule } from '@pepperi-addons/ngx-lib/color';
57
+ import { PepImageModule } from '@pepperi-addons/ngx-lib/image';
58
+ import { MatSliderModule } from '@angular/material/slider';
59
+
60
+ class PepHideInComponent {
61
+ constructor(translate) {
62
+ this.translate = translate;
63
+ this.hideIn = [];
64
+ this.hideInChange = new EventEmitter();
65
+ this.menuOpened = new EventEmitter();
66
+ this.menuClosed = new EventEmitter();
67
+ }
68
+ ngOnInit() {
69
+ var _a, _b, _c;
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ // Get the first translation for load all translations.
72
+ const desktopTitle = yield this.translate.get('LAYOUT_BUILDER.DESKTOP').toPromise();
73
+ this.menuItems = [
74
+ { key: 'Landscape', text: desktopTitle, selected: (_a = this.hideIn) === null || _a === void 0 ? void 0 : _a.some(hideIn => hideIn === 'Landscape') },
75
+ { key: 'Tablet', text: this.translate.instant('LAYOUT_BUILDER.TABLET'), selected: (_b = this.hideIn) === null || _b === void 0 ? void 0 : _b.some(hideIn => hideIn === 'Tablet') },
76
+ { key: 'Phablet', text: this.translate.instant('LAYOUT_BUILDER.MOBILE'), selected: (_c = this.hideIn) === null || _c === void 0 ? void 0 : _c.some(hideIn => hideIn === 'Phablet') }
77
+ ];
78
+ });
79
+ }
80
+ onItemClick(event, menuItem) {
81
+ menuItem.selected = !menuItem.selected;
82
+ const hideIn = this.menuItems.filter(item => item.selected).map(item => item.key);
83
+ this.hideInChange.emit(hideIn);
84
+ event.stopPropagation();
85
+ return false;
86
+ }
87
+ onMenuOpened() {
88
+ this.menuOpened.emit();
89
+ }
90
+ onMenuClosed() {
91
+ this.menuClosed.emit();
92
+ }
93
+ }
94
+ PepHideInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepHideInComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
95
+ PepHideInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepHideInComponent, 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>{{('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"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i3$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$1.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: i6.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: "14.0.2", ngImport: i0, type: PepHideInComponent, decorators: [{
97
+ type: Component,
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>{{('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"] }]
99
+ }], ctorParameters: function () { return [{ type: i1.TranslateService }]; }, propDecorators: { hideIn: [{
100
+ type: Input
101
+ }], hideInChange: [{
102
+ type: Output
103
+ }], menuOpened: [{
104
+ type: Output
105
+ }], menuClosed: [{
106
+ type: Output
107
+ }] } });
108
+
109
+ class PepHideInModule {
110
+ constructor(pepIconRegistry) {
111
+ this.pepIconRegistry = pepIconRegistry;
112
+ this.pepIconRegistry.registerIcons([
113
+ pepIconSystemView,
114
+ ]);
115
+ }
116
+ }
117
+ PepHideInModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepHideInModule, deps: [{ token: i1$1.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
118
+ PepHideInModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepHideInModule, declarations: [PepHideInComponent], imports: [CommonModule,
119
+ MatButtonModule,
120
+ MatMenuModule,
121
+ MatIconModule,
122
+ MatBadgeModule,
123
+ MatCheckboxModule,
124
+ PepButtonModule,
125
+ PepCheckboxModule,
126
+ PepIconModule, i1.TranslateModule], exports: [PepHideInComponent] });
127
+ PepHideInModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepHideInModule, imports: [CommonModule,
128
+ MatButtonModule,
129
+ MatMenuModule,
130
+ MatIconModule,
131
+ MatBadgeModule,
132
+ MatCheckboxModule,
133
+ PepButtonModule,
134
+ PepCheckboxModule,
135
+ PepIconModule,
136
+ TranslateModule.forChild()
137
+ // ({
138
+ // loader: {
139
+ // provide: TranslateLoader,
140
+ // useFactory: (addonService: PepAddonService) =>
141
+ // PepAddonService.createMultiTranslateLoader(addonService, ['ngx-lib', 'ngx-composite-lib']),
142
+ // deps: [PepAddonService]
143
+ // }, isolate: false
144
+ // }),
145
+ ] });
146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepHideInModule, decorators: [{
147
+ type: NgModule,
148
+ args: [{
149
+ declarations: [PepHideInComponent],
150
+ imports: [
151
+ CommonModule,
152
+ MatButtonModule,
153
+ MatMenuModule,
154
+ MatIconModule,
155
+ MatBadgeModule,
156
+ MatCheckboxModule,
157
+ PepButtonModule,
158
+ PepCheckboxModule,
159
+ PepIconModule,
160
+ TranslateModule.forChild()
161
+ // ({
162
+ // loader: {
163
+ // provide: TranslateLoader,
164
+ // useFactory: (addonService: PepAddonService) =>
165
+ // PepAddonService.createMultiTranslateLoader(addonService, ['ngx-lib', 'ngx-composite-lib']),
166
+ // deps: [PepAddonService]
167
+ // }, isolate: false
168
+ // }),
169
+ ],
170
+ exports: [PepHideInComponent]
171
+ }]
172
+ }], ctorParameters: function () { return [{ type: i1$1.PepIconRegistry }]; } });
173
+
174
+ class LayoutBuilderInternalService {
175
+ constructor(translate, dialogService) {
176
+ this.translate = translate;
177
+ this.dialogService = dialogService;
178
+ this._defaultSectionTitle = '';
179
+ this._blocksLimitNumber = 0;
180
+ this._editorsBreadCrumb = Array();
181
+ this._editMode = false;
182
+ this._editableState = false;
183
+ // This subject is for the screen size change events.
184
+ this._screenSizeSubject = new BehaviorSubject(PepScreenSizeType.XL);
185
+ // This subject is for demostrate the container size (Usage only in edit mode).
186
+ this._screenWidthSubject = new BehaviorSubject('100%');
187
+ // This subject is for load the current editor (Usage only in edit mode).
188
+ this._editorSubject = new BehaviorSubject(null);
189
+ // This is the sections columns drop list subject.
190
+ this._sectionsColumnsDropListSubject = new BehaviorSubject([]);
191
+ // This is the sections subject (a pare from the layout view object)
192
+ this._sectionsViewSubject = new BehaviorSubject([]);
193
+ // This subject is for layout view change.
194
+ this._layoutViewSubject = new BehaviorSubject(null);
195
+ // This subject is for edit mode when block is dragging now or not.
196
+ this._draggingBlockKey = new BehaviorSubject('');
197
+ // This subject is for edit mode when section is dragging now or not.
198
+ this._draggingSectionKey = new BehaviorSubject('');
199
+ // This subject is for lock or unlock the screen (Usage only in edit mode).
200
+ this._lockScreenSubject = new BehaviorSubject(false);
201
+ // This is for control the preview mode (for load the blocks with the CPI events)
202
+ this._previewModeSubject = new BehaviorSubject(false);
203
+ // This is for editor mode for block added.
204
+ this._blockAddedEventSubject = new BehaviorSubject(null);
205
+ // This is for editor mode for blocks removed.
206
+ this._blocksRemovedEventSubject = new BehaviorSubject([]);
207
+ // This subject is for skeleton.
208
+ this._showSkeletonSubject = new BehaviorSubject(true);
209
+ // This subjects is for load the available blocks to drag into map for better performance.
210
+ this._availableBlocksForDragMap = new Map();
211
+ this._availableBlocksForDragMapSubject = new BehaviorSubject(this.availableBlocksForDragMap);
212
+ //
213
+ this._defaultSectionTitle = this.translate.instant('LAYOUT_BUILDER.SECTION');
214
+ }
215
+ setBlocksLimitNumber(value) {
216
+ this._blocksLimitNumber = value;
217
+ }
218
+ get editMode() {
219
+ return this._editMode;
220
+ }
221
+ setEditMode(value) {
222
+ this._editMode = value;
223
+ this.setEditableState();
224
+ }
225
+ get editableState() {
226
+ return this._editableState;
227
+ }
228
+ get screenSizeChange$() {
229
+ return this._screenSizeSubject.asObservable().pipe(distinctUntilChanged());
230
+ }
231
+ get screenWidthChange$() {
232
+ return this._screenWidthSubject.asObservable().pipe(distinctUntilChanged());
233
+ }
234
+ get editorChange$() {
235
+ return this._editorSubject.asObservable().pipe(distinctUntilChanged());
236
+ }
237
+ get sectionsColumnsDropListChange$() {
238
+ return this._sectionsColumnsDropListSubject.asObservable();
239
+ }
240
+ get sectionsChange$() {
241
+ return this._sectionsViewSubject.asObservable();
242
+ // (prevSections, nextSections) => JSON.stringify(prevSections) === JSON.stringify(nextSections)));
243
+ }
244
+ get layoutViewChange$() {
245
+ return this._layoutViewSubject.asObservable().pipe(filter(layout => !!layout));
246
+ }
247
+ get draggingBlockKey() {
248
+ return this._draggingBlockKey.asObservable().pipe(distinctUntilChanged());
249
+ }
250
+ get draggingSectionKey() {
251
+ return this._draggingSectionKey.asObservable().pipe(distinctUntilChanged());
252
+ }
253
+ get lockScreenChange$() {
254
+ return this._lockScreenSubject.asObservable().pipe(distinctUntilChanged());
255
+ }
256
+ get previewModeChange$() {
257
+ return this._previewModeSubject.asObservable().pipe(distinctUntilChanged());
258
+ }
259
+ get blockAddedEventSubject$() {
260
+ return this._blockAddedEventSubject.asObservable();
261
+ }
262
+ get blocksRemovedEventSubject$() {
263
+ return this._blocksRemovedEventSubject.asObservable();
264
+ }
265
+ get showSkeletonChange$() {
266
+ return this._showSkeletonSubject.asObservable().pipe(distinctUntilChanged());
267
+ }
268
+ get availableBlocksForDragMap() {
269
+ return this._availableBlocksForDragMap;
270
+ }
271
+ get availableBlocksForDragMapChange$() {
272
+ return this._availableBlocksForDragMapSubject.asObservable();
273
+ }
274
+ setEditableState() {
275
+ this._editableState = this.editMode && !this._previewModeSubject.getValue();
276
+ }
277
+ notifyLayoutViewChange(layoutViewToUpdate) {
278
+ if (layoutViewToUpdate) {
279
+ if (this.editMode) {
280
+ this.updateLayoutEditorProperties(layoutViewToUpdate);
281
+ }
282
+ // Update the layout for the view.
283
+ this._layoutViewSubject.next(layoutViewToUpdate);
284
+ // Update the sections for the view.
285
+ this._sectionsViewSubject.next((layoutViewToUpdate === null || layoutViewToUpdate === void 0 ? void 0 : layoutViewToUpdate.Layout.Sections) || []);
286
+ }
287
+ }
288
+ notifyBlockAdded(blockAddedEventData) {
289
+ // Notify that the block is added (to raise the event for the client).
290
+ this._blockAddedEventSubject.next(blockAddedEventData);
291
+ }
292
+ notifyBlocksRemoved(keys) {
293
+ if (keys) {
294
+ // Notify that the blocks are removed (to raise the event for the client).
295
+ this._blocksRemovedEventSubject.next(keys);
296
+ }
297
+ }
298
+ notifyEditorChange(editor) {
299
+ this._editorSubject.next(editor);
300
+ }
301
+ notifyAvailableBlocksForDragMapChange() {
302
+ this._availableBlocksForDragMapSubject.next(this.availableBlocksForDragMap);
303
+ }
304
+ notifyPreviewModeChange(value) {
305
+ this._previewModeSubject.next(value);
306
+ this.setEditableState();
307
+ }
308
+ notifyLockScreen(value) {
309
+ this._lockScreenSubject.next(value);
310
+ }
311
+ notifySectionsColumnsDropListChange(sectionsColumnsDropList) {
312
+ this._sectionsColumnsDropListSubject.next(sectionsColumnsDropList);
313
+ }
314
+ updateLayoutEditorProperties(layoutView) {
315
+ if (this._editorsBreadCrumb[0]) {
316
+ const layoutEditor = {
317
+ maxWidth: (layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.MaxWidth) || 0,
318
+ verticalSpacing: layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.VerticalSpacing,
319
+ horizontalSpacing: layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.HorizontalSpacing,
320
+ sectionsGap: layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.SectionsGap,
321
+ columnsGap: layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.ColumnsGap,
322
+ // roundedCorners: layoutView?.layout.
323
+ };
324
+ this._editorsBreadCrumb[0].hostObject = layoutEditor;
325
+ }
326
+ }
327
+ loadDefaultEditor(layoutView) {
328
+ this._editorsBreadCrumb = new Array();
329
+ if (layoutView) {
330
+ this._editorsBreadCrumb.push({
331
+ id: LayoutBuilderInternalService.MAIN_EDITOR_ID,
332
+ type: 'layout-builder',
333
+ title: layoutView.Title || this.translate.instant('LAYOUT_BUILDER.DEFAULT_TITLE'),
334
+ // hostObject: {} // Updates in updateLayoutEditorProperties function above.
335
+ });
336
+ this.updateLayoutEditorProperties(layoutView);
337
+ this.notifyEditorChange(this._editorsBreadCrumb[0]);
338
+ }
339
+ else {
340
+ this.notifyEditorChange(null);
341
+ }
342
+ }
343
+ changeCurrentEditor() {
344
+ if (this._editorsBreadCrumb.length > 0) {
345
+ this.notifyEditorChange(this._editorsBreadCrumb[this._editorsBreadCrumb.length - 1]);
346
+ }
347
+ }
348
+ getEditorByType(editorType, id) {
349
+ // Build editor object.
350
+ let editor = null;
351
+ if (editorType === 'section') {
352
+ editor = this.getSectionEditor(id);
353
+ }
354
+ else if (editorType === 'block') {
355
+ editor = this.getBlockEditor(id);
356
+ }
357
+ return editor;
358
+ }
359
+ getBlockEditor(blockKey) {
360
+ var _a, _b;
361
+ const blockContainer = this.getBlockContainerByBlockKey(blockKey);
362
+ const defaultTitle = this.translate.instant('LAYOUT_BUILDER.NO_TITLE');
363
+ let blockTitle = defaultTitle;
364
+ if (blockContainer) {
365
+ blockTitle = ((_b = (_a = this.availableBlocksForDragMap) === null || _a === void 0 ? void 0 : _a.get(blockContainer === null || blockContainer === void 0 ? void 0 : blockContainer.DraggableItemKey)) === null || _b === void 0 ? void 0 : _b.title) || defaultTitle;
366
+ }
367
+ return {
368
+ id: blockKey,
369
+ type: 'block',
370
+ title: blockTitle,
371
+ // remoteModuleOptions: remoteLoaderOptions,
372
+ hostObject: {} // JSON.parse(JSON.stringify(hostObject))
373
+ };
374
+ }
375
+ getSectionEditorTitle(section, sectionIndex) {
376
+ return section.Name || `${this._defaultSectionTitle} ${sectionIndex + 1}`;
377
+ }
378
+ getSectionEditor(sectionId) {
379
+ var _a, _b;
380
+ const layoutView = this._layoutViewSubject.getValue();
381
+ const sections = (layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.Sections) || [];
382
+ const sectionIndex = sections.findIndex(section => section.Key === sectionId);
383
+ if (sectionIndex >= 0) {
384
+ let section = sections[sectionIndex];
385
+ const sectionEditor = {
386
+ id: section.Key,
387
+ sectionName: section.Name || '',
388
+ split: section.Split || undefined,
389
+ height: section.Height || 0,
390
+ collapseOnTablet: (_a = section.CollapseOnTablet) !== null && _a !== void 0 ? _a : false,
391
+ fillHeight: (_b = section.FillHeight) !== null && _b !== void 0 ? _b : false
392
+ };
393
+ return {
394
+ id: sectionId,
395
+ type: 'section',
396
+ title: this.getSectionEditorTitle(section, sectionIndex),
397
+ hostObject: sectionEditor
398
+ };
399
+ }
400
+ else {
401
+ return null;
402
+ }
403
+ }
404
+ getSectionColumnByIdForEditor(sectionColumnId) {
405
+ let currentColumn = null;
406
+ // Get the section and column array by the pattern of the section column key.
407
+ const sectionColumnPatternSeparator = this.getSectionColumnKey();
408
+ const sectionColumnArr = sectionColumnId.split(sectionColumnPatternSeparator);
409
+ if (sectionColumnArr.length === 2) {
410
+ const layoutView = this._layoutViewSubject.getValue();
411
+ const sections = (layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.Sections) || [];
412
+ // Get the section id to get the section index.
413
+ const sectionId = sectionColumnArr[0];
414
+ const sectionIndex = sections.findIndex(section => section.Key === sectionId);
415
+ // Get the column index.
416
+ const columnIndex = coerceNumberProperty(sectionColumnArr[1], -1);
417
+ if (sectionIndex >= 0 && columnIndex >= 0) {
418
+ currentColumn = sections[sectionIndex].Columns[columnIndex];
419
+ }
420
+ }
421
+ return currentColumn;
422
+ }
423
+ // private setSectionsColumnsGap(layoutView: IPepLayoutView) {
424
+ // if (layoutView?.Layout?.Sections) {
425
+ // for (let index = 0; index < layoutView.Layout.Sections.length; index++) {
426
+ // const section = layoutView.Layout.Sections[index];
427
+ // section.ColumnsGap = layoutView.Layout.ColumnsGap;
428
+ // }
429
+ // }
430
+ // }
431
+ getCssScreenWidh(screenType) {
432
+ let widthToSet = '100%';
433
+ if (screenType === 'Tablet') {
434
+ widthToSet = '720';
435
+ }
436
+ else if (screenType === 'Phablet') {
437
+ widthToSet = '360';
438
+ }
439
+ return widthToSet;
440
+ }
441
+ getBlockContainerByBlockKey(blockKey) {
442
+ let blockContainerToFind = undefined;
443
+ const layoutView = this._layoutViewSubject.getValue();
444
+ const sections = (layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.Sections) || [];
445
+ for (let sectionIndex = 0; sectionIndex < sections.length; sectionIndex++) {
446
+ const section = sections[sectionIndex];
447
+ // Get the block container.
448
+ const columnIndex = section.Columns.findIndex(column => { var _a; return ((_a = column.BlockContainer) === null || _a === void 0 ? void 0 : _a.BlockKey) === blockKey; });
449
+ if (columnIndex > -1) {
450
+ blockContainerToFind = section.Columns[columnIndex].BlockContainer;
451
+ break;
452
+ }
453
+ }
454
+ return blockContainerToFind;
455
+ }
456
+ getBlocksNumber() {
457
+ var _a, _b;
458
+ let blocksNumber = 0;
459
+ const sections = ((_a = this._layoutViewSubject.getValue()) === null || _a === void 0 ? void 0 : _a.Layout.Sections) || [];
460
+ for (let index = 0; index < sections.length; index++) {
461
+ const section = sections[index];
462
+ for (let columnIndex = 0; columnIndex < section.Columns.length; columnIndex++) {
463
+ const column = section.Columns[columnIndex];
464
+ if (column.BlockContainer && ((_b = column.BlockContainer.BlockKey) === null || _b === void 0 ? void 0 : _b.length) > 0) {
465
+ blocksNumber++;
466
+ }
467
+ }
468
+ }
469
+ return blocksNumber;
470
+ }
471
+ changeCursorOnDragStart() {
472
+ document.body.classList.add('inheritCursors');
473
+ document.body.style.cursor = 'grabbing';
474
+ }
475
+ changeCursorOnDragEnd() {
476
+ document.body.classList.remove('inheritCursors');
477
+ document.body.style.cursor = 'unset';
478
+ }
479
+ /***********************************************************************************************/
480
+ /* Public functions
481
+ /***********************************************************************************************/
482
+ setSectionsColumnsDropListChange(sectionsColumnsDropList) {
483
+ this.notifySectionsColumnsDropListChange(sectionsColumnsDropList);
484
+ }
485
+ setLockScreen(value) {
486
+ this.notifyLockScreen(value);
487
+ }
488
+ changePreviewMode(value) {
489
+ this.notifyPreviewModeChange(value);
490
+ }
491
+ setAvailableBlocksToDrag(availableBlocksForDrag) {
492
+ this._availableBlocksForDragMap.clear();
493
+ availableBlocksForDrag.forEach(block => {
494
+ this._availableBlocksForDragMap.set(block.data.key, block);
495
+ });
496
+ this.notifyAvailableBlocksForDragMapChange();
497
+ }
498
+ getCurrentScreenType() {
499
+ return this.getScreenType(this._screenSizeSubject.getValue());
500
+ }
501
+ getScreenType(size) {
502
+ const screenType = size < PepScreenSizeType.MD ? 'Landscape' :
503
+ (size === PepScreenSizeType.MD || size === PepScreenSizeType.SM ? 'Tablet' : 'Phablet');
504
+ return screenType;
505
+ }
506
+ getSectionColumnKey(sectionKey = '', index = '') {
507
+ return `${sectionKey}_column_${index}`;
508
+ }
509
+ getIsHidden(hideIn, currentScreenType) {
510
+ return (hideIn && (hideIn === null || hideIn === void 0 ? void 0 : hideIn.length) > 0) ? hideIn.some(hi => hi === currentScreenType) : false;
511
+ }
512
+ navigateToEditor(editorType, id) {
513
+ let success = false;
514
+ // Cannot navigate into 'layout-builder' because this is first and const in the editorsBreadCrumbs.
515
+ if (editorType !== 'layout-builder' && (id === null || id === void 0 ? void 0 : id.length) > 0) {
516
+ // Check which editor we have now
517
+ const currentEditor = this._editorsBreadCrumb[this._editorsBreadCrumb.length - 1];
518
+ // Only if it's another editor.
519
+ if (currentEditor.id !== id) {
520
+ if (currentEditor.type !== 'layout-builder') {
521
+ // Always pop the last and insert the current.
522
+ this._editorsBreadCrumb.pop();
523
+ }
524
+ let editor = this.getEditorByType(editorType, id);
525
+ if (editor) {
526
+ this._editorsBreadCrumb.push(editor);
527
+ this.changeCurrentEditor();
528
+ success = true;
529
+ }
530
+ else {
531
+ success = false;
532
+ }
533
+ }
534
+ }
535
+ return success;
536
+ }
537
+ navigateBackFromEditor() {
538
+ // Keep the layout builder editor.
539
+ if (this._editorsBreadCrumb.length > 1) {
540
+ // Maybe we want to compare the last editor for validation ?
541
+ const lastEditor = this._editorsBreadCrumb.pop();
542
+ this.changeCurrentEditor();
543
+ }
544
+ }
545
+ updateLayoutFromEditor(editorData) {
546
+ const layoutView = this._layoutViewSubject.getValue();
547
+ if (layoutView) {
548
+ layoutView.Layout.MaxWidth = editorData.maxWidth;
549
+ layoutView.Layout.HorizontalSpacing = editorData.horizontalSpacing;
550
+ layoutView.Layout.VerticalSpacing = editorData.verticalSpacing;
551
+ layoutView.Layout.SectionsGap = editorData.sectionsGap;
552
+ layoutView.Layout.ColumnsGap = editorData.columnsGap;
553
+ // layoutView.layout.RoundedCorners = editorData.roundedCorners;
554
+ // this.setSectionsColumnsGap(layoutView);
555
+ this.notifyLayoutViewChange(layoutView);
556
+ }
557
+ }
558
+ updateSectionFromEditor(sectionData) {
559
+ var _a;
560
+ const layoutView = this._layoutViewSubject.getValue();
561
+ const sections = (layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.Sections) || [];
562
+ const sectionIndex = sections.findIndex(section => section.Key === sectionData.id);
563
+ // Update section details.
564
+ if (sectionIndex >= 0) {
565
+ const blocksIdsToRemove = [];
566
+ const currentSection = sections[sectionIndex];
567
+ currentSection.Name = sectionData.sectionName;
568
+ currentSection.Split = sectionData.split;
569
+ currentSection.Height = sectionData.height;
570
+ currentSection.CollapseOnTablet = sectionData.collapseOnTablet;
571
+ currentSection.FillHeight = sectionData.fillHeight;
572
+ // Get the new columns number from currentSection.Split, if its undefined put a default 1.
573
+ const newColumnsLength = ((_a = currentSection.Split) === null || _a === void 0 ? void 0 : _a.split(' ').length) || 1;
574
+ if (newColumnsLength > currentSection.Columns.length) {
575
+ while (newColumnsLength > currentSection.Columns.length) {
576
+ currentSection.Columns.push({});
577
+ }
578
+ }
579
+ else if (newColumnsLength < currentSection.Columns.length) {
580
+ while (newColumnsLength < currentSection.Columns.length) {
581
+ const colunm = currentSection.Columns.pop();
582
+ // If there is block in this column delete it.
583
+ if (colunm && colunm.BlockContainer) {
584
+ blocksIdsToRemove.push(colunm.BlockContainer.BlockKey);
585
+ }
586
+ }
587
+ }
588
+ // Update editor title
589
+ const currentEditor = this._editorSubject.getValue();
590
+ if (currentEditor && currentEditor.type === 'section' && currentEditor.id === currentSection.Key) {
591
+ const title = this.getSectionEditorTitle(currentSection, sectionIndex);
592
+ currentEditor.title = title;
593
+ this.notifyEditorChange(currentEditor);
594
+ }
595
+ // Update sections change.
596
+ this.notifyLayoutViewChange(layoutView);
597
+ // If there are blocks to remove, notify the blocks removed.
598
+ if (blocksIdsToRemove.length > 0) {
599
+ this.notifyBlocksRemoved(blocksIdsToRemove);
600
+ }
601
+ }
602
+ }
603
+ addSection(section = null) {
604
+ // Create new section
605
+ if (!section) {
606
+ section = {
607
+ Key: PepGuid.newGuid(),
608
+ Columns: [{}],
609
+ Hide: []
610
+ };
611
+ }
612
+ // Add the new section to layout view.
613
+ const layoutView = this._layoutViewSubject.getValue();
614
+ const sections = (layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.Sections) || [];
615
+ sections.push(section);
616
+ this.notifyLayoutViewChange(layoutView);
617
+ }
618
+ removeSection(sectionId) {
619
+ const layoutView = this._layoutViewSubject.getValue();
620
+ const sections = (layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.Sections) || [];
621
+ const index = sections.findIndex(section => section.Key === sectionId);
622
+ if (index > -1) {
623
+ // Get the blocks id's to remove.
624
+ const blocksIdsToRemove = sections[index].Columns.map(column => { var _a; return (_a = column === null || column === void 0 ? void 0 : column.BlockContainer) === null || _a === void 0 ? void 0 : _a.BlockKey; });
625
+ // Remove section.
626
+ sections.splice(index, 1);
627
+ this.notifyLayoutViewChange(layoutView);
628
+ // If there are blocks to remove, notify the blocks removed.
629
+ if (blocksIdsToRemove.length > 0) {
630
+ this.notifyBlocksRemoved(blocksIdsToRemove);
631
+ }
632
+ }
633
+ }
634
+ hideSection(sectionId, hideIn) {
635
+ const layoutView = this._layoutViewSubject.getValue();
636
+ const sections = (layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.Sections) || [];
637
+ const index = sections.findIndex(section => section.Key === sectionId);
638
+ if (index > -1) {
639
+ sections[index].Hide = hideIn;
640
+ this.notifyLayoutViewChange(layoutView);
641
+ }
642
+ }
643
+ onSectionDropped(event) {
644
+ const layoutView = this._layoutViewSubject.getValue();
645
+ const sections = (layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.Sections) || [];
646
+ moveItemInArray(sections, event.previousIndex, event.currentIndex);
647
+ this.notifyLayoutViewChange(layoutView);
648
+ }
649
+ onSectionDragStart(event) {
650
+ this.changeCursorOnDragStart();
651
+ this._draggingSectionKey.next(event.source.data);
652
+ }
653
+ onSectionDragEnd(event) {
654
+ this.changeCursorOnDragEnd();
655
+ this._draggingSectionKey.next('');
656
+ }
657
+ removeBlockFromSection(blockId) {
658
+ let blockRemoved = false;
659
+ // Remove the block from section column.
660
+ const layoutView = this._layoutViewSubject.getValue();
661
+ const sections = (layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.Sections) || [];
662
+ for (let sectionIndex = 0; sectionIndex < sections.length; sectionIndex++) {
663
+ const section = sections[sectionIndex];
664
+ // Remove the block container.
665
+ const columnIndex = section.Columns.findIndex(column => { var _a; return ((_a = column.BlockContainer) === null || _a === void 0 ? void 0 : _a.BlockKey) === blockId; });
666
+ if (columnIndex > -1) {
667
+ delete section.Columns[columnIndex].BlockContainer;
668
+ this.notifyLayoutViewChange(layoutView);
669
+ blockRemoved = true;
670
+ break;
671
+ }
672
+ }
673
+ // If the block was removed, notify the block removed.
674
+ if (blockRemoved) {
675
+ this.notifyBlocksRemoved([blockId]);
676
+ }
677
+ }
678
+ hideBlock(sectionId, blockId, hideIn) {
679
+ const layoutView = this._layoutViewSubject.getValue();
680
+ const sections = (layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.Sections) || [];
681
+ const index = sections.findIndex(section => section.Key === sectionId);
682
+ if (index > -1) {
683
+ const columnIndex = sections[index].Columns.findIndex(column => { var _a; return ((_a = column.BlockContainer) === null || _a === void 0 ? void 0 : _a.BlockKey) === blockId; });
684
+ if (columnIndex > -1) {
685
+ const blockContainer = sections[index].Columns[columnIndex].BlockContainer;
686
+ if (blockContainer) {
687
+ blockContainer.Hide = hideIn;
688
+ this.notifyLayoutViewChange(layoutView);
689
+ }
690
+ }
691
+ }
692
+ }
693
+ onBlockDropped(event, sectionId) {
694
+ const layoutView = this._layoutViewSubject.getValue();
695
+ if (event.previousContainer.id === LayoutBuilderInternalService.AVAILABLE_BLOCKS_CONTAINER_ID) {
696
+ // Validate if blocks number allow.
697
+ if (this._blocksLimitNumber > 0 && this.getBlocksNumber() >= this._blocksLimitNumber) {
698
+ const data = new PepDialogData({
699
+ title: this.translate.instant('MESSAGES.DIALOG_NOTICE_TITLE'),
700
+ content: this.translate.instant('LAYOUT_BUILDER.BLOCKS_COUNT_LIMIT_MESSAGE'),
701
+ });
702
+ this.dialogService.openDefaultDialog(data);
703
+ }
704
+ else {
705
+ // Get the block relation (previousContainer.data is IPepDraggableItem and inside we have AvailableBlock object).
706
+ const draggableItem = event.previousContainer.data[event.previousIndex];
707
+ if (draggableItem) {
708
+ // lock the screen untill the editor will be loaded.
709
+ // this._lockScreenSubject.next(true);
710
+ // Get the column.
711
+ const currentColumn = this.getSectionColumnByIdForEditor(event.container.id);
712
+ // Set the block key in the section block only if there is a blank column.
713
+ if (currentColumn && !currentColumn.BlockContainer) {
714
+ // Generate the block uuid.
715
+ const blockKey = PepGuid.newGuid();
716
+ currentColumn.BlockContainer = {
717
+ BlockKey: blockKey,
718
+ DraggableItemKey: draggableItem.data.key,
719
+ };
720
+ // Here we update the layout view cause the layout is updated.
721
+ this.notifyLayoutViewChange(layoutView);
722
+ // Raise block added event.
723
+ const blockAddedEventData = {
724
+ BlockKey: blockKey,
725
+ DraggableItem: draggableItem,
726
+ };
727
+ this.notifyBlockAdded(blockAddedEventData);
728
+ // Navigate to the block editor.
729
+ this.navigateToEditor('block', blockKey);
730
+ }
731
+ }
732
+ else {
733
+ console.log("draggableItem is not a IPepDraggableItem type");
734
+ }
735
+ }
736
+ }
737
+ else {
738
+ // If the block moved between columns in the same section or between different sections but not in the same column.
739
+ if (event.container.id !== event.previousContainer.id) {
740
+ // Get the column.
741
+ const currentColumn = this.getSectionColumnByIdForEditor(event.container.id);
742
+ // Get the previous column.
743
+ const previuosColumn = this.getSectionColumnByIdForEditor(event.previousContainer.id);
744
+ if (currentColumn && previuosColumn) {
745
+ currentColumn.BlockContainer = previuosColumn.BlockContainer;
746
+ delete previuosColumn.BlockContainer;
747
+ this.notifyLayoutViewChange(layoutView);
748
+ }
749
+ }
750
+ }
751
+ }
752
+ onBlockDragStart(event) {
753
+ var _a, _b;
754
+ this.changeCursorOnDragStart();
755
+ // Take the block key if exist, else take the available block key (relation key).
756
+ const blockKey = ((_a = event.source.data) === null || _a === void 0 ? void 0 : _a.BlockKey) || ((_b = event.source.data) === null || _b === void 0 ? void 0 : _b.Key);
757
+ this._draggingBlockKey.next(blockKey);
758
+ }
759
+ onBlockDragEnd(event) {
760
+ this.changeCursorOnDragEnd();
761
+ this._draggingBlockKey.next('');
762
+ }
763
+ doesColumnContainBlock(sectionId, columnIndex) {
764
+ let res = false;
765
+ const layoutView = this._layoutViewSubject.getValue();
766
+ const section = layoutView === null || layoutView === void 0 ? void 0 : layoutView.Layout.Sections.find(section => section.Key === sectionId);
767
+ if (section && columnIndex >= 0 && section.Columns.length > columnIndex) {
768
+ res = !!section.Columns[columnIndex].BlockContainer;
769
+ }
770
+ return res;
771
+ }
772
+ setScreenWidth(screenType) {
773
+ const value = this.getCssScreenWidh(screenType);
774
+ let width = coerceNumberProperty(value, 0);
775
+ if (width === 0) {
776
+ this._screenWidthSubject.next('100%');
777
+ this._screenSizeSubject.next(PepScreenSizeType.XL);
778
+ }
779
+ else {
780
+ this._screenWidthSubject.next(`${width}px`);
781
+ // Change the size according the width.
782
+ if (width >= 1920) {
783
+ this._screenSizeSubject.next(PepScreenSizeType.XL);
784
+ }
785
+ else if (width >= 1280 && width < 1920) {
786
+ this._screenSizeSubject.next(PepScreenSizeType.LG);
787
+ }
788
+ else if (width >= 960 && width < 1280) {
789
+ this._screenSizeSubject.next(PepScreenSizeType.MD);
790
+ }
791
+ else if (width >= 600 && width < 960) {
792
+ this._screenSizeSubject.next(PepScreenSizeType.SM);
793
+ }
794
+ else if (width < 600) {
795
+ this._screenSizeSubject.next(PepScreenSizeType.XS);
796
+ }
797
+ }
798
+ }
799
+ showSkeleton(show) {
800
+ this._showSkeletonSubject.next(show);
801
+ }
802
+ loadLayoutBuilder(layoutView) {
803
+ if (this.editMode) {
804
+ // Load the layout editor.
805
+ this.loadDefaultEditor(layoutView);
806
+ // Set the columns gap of the sections.
807
+ // this.setSectionsColumnsGap(layoutView);
808
+ }
809
+ // Load only the layout view.
810
+ this.notifyLayoutViewChange(layoutView);
811
+ }
812
+ }
813
+ LayoutBuilderInternalService.AVAILABLE_BLOCKS_CONTAINER_ID = 'availableBlocks';
814
+ LayoutBuilderInternalService.MAIN_EDITOR_ID = 'main';
815
+ LayoutBuilderInternalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: LayoutBuilderInternalService, deps: [{ token: i1.TranslateService }, { token: i2.PepDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
816
+ LayoutBuilderInternalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: LayoutBuilderInternalService, providedIn: 'root' });
817
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: LayoutBuilderInternalService, decorators: [{
818
+ type: Injectable,
819
+ args: [{
820
+ providedIn: 'root',
821
+ }]
822
+ }], ctorParameters: function () { return [{ type: i1.TranslateService }, { type: i2.PepDialogService }]; } });
823
+
824
+ class SectionBlockComponent extends BaseDestroyerDirective {
825
+ constructor(layoutBuilderService) {
826
+ super();
827
+ this.layoutBuilderService = layoutBuilderService;
828
+ this.sectionKey = '';
829
+ this.sectionHeight = '';
830
+ this.isMainEditorState = false;
831
+ this.editable = false;
832
+ this.active = false;
833
+ this.dragExited = new EventEmitter();
834
+ this.dragEntered = new EventEmitter();
835
+ this.hideForCurrentScreenType = false;
836
+ }
837
+ set blockContainer(value) {
838
+ var _a, _b;
839
+ this._blockContainer = value;
840
+ if (this._blockContainer) {
841
+ this.availableBlock = (_a = this.layoutBuilderService.availableBlocksForDragMap) === null || _a === void 0 ? void 0 : _a.get((_b = this._blockContainer) === null || _b === void 0 ? void 0 : _b.DraggableItemKey);
842
+ }
843
+ this.setIfHideForCurrentScreenType();
844
+ }
845
+ get blockContainer() {
846
+ return this._blockContainer;
847
+ }
848
+ set screenType(value) {
849
+ this._screenType = value;
850
+ this.setIfHideForCurrentScreenType();
851
+ }
852
+ get screenType() {
853
+ return this._screenType;
854
+ }
855
+ setIfHideForCurrentScreenType() {
856
+ this.hideForCurrentScreenType = this.blockContainer ?
857
+ this.layoutBuilderService.getIsHidden(this.blockContainer.Hide, this.screenType) : false;
858
+ }
859
+ ngOnInit() {
860
+ //
861
+ this.layoutBuilderService.availableBlocksForDragMapChange$.pipe(this.getDestroyer()).subscribe((availableBlocksForDragMap) => {
862
+ if (availableBlocksForDragMap && this.blockContainer) {
863
+ this.availableBlock = availableBlocksForDragMap.get(this.blockContainer.DraggableItemKey);
864
+ }
865
+ });
866
+ }
867
+ onEditBlockClick() {
868
+ var _a;
869
+ if ((_a = this.blockContainer) === null || _a === void 0 ? void 0 : _a.BlockKey) {
870
+ this.layoutBuilderService.navigateToEditor('block', this.blockContainer.BlockKey);
871
+ }
872
+ }
873
+ onRemoveBlockClick() {
874
+ var _a;
875
+ if ((_a = this.blockContainer) === null || _a === void 0 ? void 0 : _a.BlockKey) {
876
+ this.layoutBuilderService.removeBlockFromSection(this.blockContainer.BlockKey);
877
+ }
878
+ }
879
+ onHideBlockChange(hideIn) {
880
+ var _a;
881
+ if ((_a = this.blockContainer) === null || _a === void 0 ? void 0 : _a.BlockKey) {
882
+ this.layoutBuilderService.hideBlock(this.sectionKey, this.blockContainer.BlockKey, hideIn);
883
+ this.setIfHideForCurrentScreenType();
884
+ }
885
+ }
886
+ // onBlockLoad(event: any) {
887
+ // this.layoutBuilderService.updateBlockLoaded(this.blockContainer.BlockKey);
888
+ // }
889
+ onDragStart(event) {
890
+ this.layoutBuilderService.onBlockDragStart(event);
891
+ }
892
+ onDragEnd(event) {
893
+ this.layoutBuilderService.onBlockDragEnd(event);
894
+ }
895
+ onDragExited(event) {
896
+ this.dragExited.emit(event);
897
+ }
898
+ onDragEntered(event) {
899
+ this.dragEntered.emit(event);
900
+ }
901
+ }
902
+ SectionBlockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionBlockComponent, deps: [{ token: LayoutBuilderInternalService }], target: i0.ɵɵFactoryTarget.Component });
903
+ SectionBlockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", 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]=\"availableBlock?.title || blockContainer?.BlockKey || ''\" >\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>f\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, draggableItemKey: blockContainer?.DraggableItemKey }\">\n </ng-container>\n </div>\n <!-- <pep-remote-loader-element *ngIf=\"remoteLoaderOptions\" class=\"remote-loader\"\n [options]=\"remoteLoaderOptions\"\n [props]=\"{ hostObject: hostObject }\"\n [events]=\"{ hostEvents: onBlockHostEventsCallback }\"\n (load)=\"onBlockLoad($event)\">\n </pep-remote-loader-element> -->\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: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4$1.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: i4$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i6.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"] }] });
904
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionBlockComponent, decorators: [{
905
+ type: Component,
906
+ 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]=\"availableBlock?.title || blockContainer?.BlockKey || ''\" >\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>f\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, draggableItemKey: blockContainer?.DraggableItemKey }\">\n </ng-container>\n </div>\n <!-- <pep-remote-loader-element *ngIf=\"remoteLoaderOptions\" class=\"remote-loader\"\n [options]=\"remoteLoaderOptions\"\n [props]=\"{ hostObject: hostObject }\"\n [events]=\"{ hostEvents: onBlockHostEventsCallback }\"\n (load)=\"onBlockLoad($event)\">\n </pep-remote-loader-element> -->\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"] }]
907
+ }], ctorParameters: function () { return [{ type: LayoutBuilderInternalService }]; }, propDecorators: { blockTemplate: [{
908
+ type: Input
909
+ }], sectionKey: [{
910
+ type: Input
911
+ }], sectionHeight: [{
912
+ type: Input
913
+ }], isMainEditorState: [{
914
+ type: Input
915
+ }], editable: [{
916
+ type: Input
917
+ }], active: [{
918
+ type: Input
919
+ }], blockContainer: [{
920
+ type: Input
921
+ }], screenType: [{
922
+ type: Input
923
+ }], dragExited: [{
924
+ type: Output
925
+ }], dragEntered: [{
926
+ type: Output
927
+ }] } });
928
+
929
+ class SectionComponent extends BaseDestroyerDirective {
930
+ constructor(renderer, layoutBuilderService, layoutService) {
931
+ super();
932
+ this.renderer = renderer;
933
+ this.layoutBuilderService = layoutBuilderService;
934
+ this.layoutService = layoutService;
935
+ this.key = '';
936
+ this.name = '';
937
+ this._split = undefined;
938
+ this._height = undefined;
939
+ this._collapseOnTablet = false;
940
+ this._columns = [];
941
+ this._hideIn = [];
942
+ this.styleMaxHeight = 'unset';
943
+ this.styleHeight = 'unset';
944
+ this.sectionsColumnsDropList = [];
945
+ // PepScreenSizeType = PepScreenSizeType;
946
+ this.sectionColumnKeyPrefix = '';
947
+ this.isMainEditorState = false;
948
+ this.isEditing = false;
949
+ this.selectedSectionKey = '';
950
+ this.selectedBlockKey = '';
951
+ this.containsBlocks = false;
952
+ this.shouldSetDefaultHeight = false;
953
+ this.pepScreenSizeToFlipToVertical = PepScreenSizeType.SM;
954
+ this.hideForCurrentScreenType = false;
955
+ this.draggingBlockKey = '';
956
+ this.draggingSectionKey = '';
957
+ this.hoverState = false;
958
+ }
959
+ set split(value) {
960
+ this._split = value;
961
+ this.refreshSplit();
962
+ }
963
+ get split() {
964
+ return this._split;
965
+ }
966
+ set height(value) {
967
+ this._height = value;
968
+ this.setStyleHeight();
969
+ }
970
+ get height() {
971
+ return this._height;
972
+ }
973
+ set collapseOnTablet(value) {
974
+ this._collapseOnTablet = value;
975
+ this.pepScreenSizeToFlipToVertical = value ? PepScreenSizeType.MD : PepScreenSizeType.SM;
976
+ this.refreshSplit();
977
+ }
978
+ get collapseOnTablet() {
979
+ return this._collapseOnTablet;
980
+ }
981
+ set columns(value) {
982
+ this._columns = value || [];
983
+ }
984
+ get columns() {
985
+ return this._columns;
986
+ }
987
+ set hideIn(value) {
988
+ this._hideIn = value;
989
+ this.setIfHideForCurrentScreenType();
990
+ }
991
+ get hideIn() {
992
+ return this._hideIn;
993
+ }
994
+ // private _editable = false;
995
+ // protected set editable(value: boolean) {
996
+ // this._editable = value;
997
+ // this.refreshSplit();
998
+ // }
999
+ get editable() {
1000
+ return this.layoutBuilderService.editableState;
1001
+ ;
1002
+ }
1003
+ set screenSize(value) {
1004
+ this._screenSize = value;
1005
+ this.refreshSplit();
1006
+ this.setScreenType();
1007
+ }
1008
+ get screenSize() {
1009
+ return this._screenSize;
1010
+ }
1011
+ calculateIfSectionContainsBlocks() {
1012
+ this.containsBlocks = this.columns.some(column => column.BlockContainer);
1013
+ if (this.editable) {
1014
+ this.shouldSetDefaultHeight = !this.containsBlocks;
1015
+ }
1016
+ }
1017
+ setScreenType() {
1018
+ this.screenType = this.layoutBuilderService.getScreenType(this.screenSize);
1019
+ this.setIfHideForCurrentScreenType();
1020
+ this.setStyleHeight();
1021
+ }
1022
+ setIfHideForCurrentScreenType() {
1023
+ this.hideForCurrentScreenType = this.layoutBuilderService.getIsHidden(this.hideIn, this.screenType);
1024
+ }
1025
+ getCssSplitString() {
1026
+ switch (this.split) {
1027
+ case '1/2 1/2':
1028
+ return '1fr 1fr';
1029
+ case '1/2 1/4 1/4':
1030
+ return '2fr 1fr 1fr';
1031
+ case '1/3 1/3 1/3':
1032
+ return '1fr 1fr 1fr';
1033
+ case '1/3 2/3':
1034
+ return '1fr 2fr';
1035
+ case '1/4 1/2 1/4':
1036
+ return '1fr 2fr 1fr';
1037
+ case '1/4 1/4 1/2':
1038
+ return '1fr 1fr 2fr';
1039
+ case '1/4 1/4 1/4 1/4':
1040
+ return '1fr 1fr 1fr 1fr';
1041
+ case '1/4 3/4':
1042
+ return '1fr 3fr';
1043
+ case '2/3 1/3':
1044
+ return '2fr 1fr';
1045
+ case '3/4 1/4':
1046
+ return '3fr 1fr';
1047
+ default: // For one column.
1048
+ return '1fr';
1049
+ }
1050
+ }
1051
+ refreshSplit() {
1052
+ setTimeout(() => {
1053
+ if (this.sectionContainerRef) {
1054
+ let cssSplitString = this.getCssSplitString();
1055
+ // Go for all the columns in the columnsWrapper
1056
+ this.columnsElementRef.toArray().map((section, sectionIndex) => {
1057
+ // Horizontal (true) for large screens, false for small screens.
1058
+ const isHorizontalView = this.screenSize <= this.pepScreenSizeToFlipToVertical;
1059
+ if (isHorizontalView) {
1060
+ this.renderer.setStyle(section.nativeElement, 'grid-auto-flow', 'column');
1061
+ this.renderer.setStyle(section.nativeElement, 'grid-template-rows', 'unset');
1062
+ this.renderer.setStyle(section.nativeElement, 'grid-template-columns', cssSplitString);
1063
+ }
1064
+ else {
1065
+ this.renderer.setStyle(section.nativeElement, 'grid-auto-flow', 'row');
1066
+ this.renderer.setStyle(section.nativeElement, 'grid-template-columns', 'unset');
1067
+ this.renderer.setStyle(section.nativeElement, 'grid-template-rows', cssSplitString);
1068
+ // In runtime (or preview mode).
1069
+ if (!this.editable) {
1070
+ const cssSplitArray = cssSplitString.split(' ');
1071
+ // If there are some hidden columns change the column width to 0 (for cut the spacing in the grid-template-rows).
1072
+ this.columns.forEach((column, index) => {
1073
+ if (!column.BlockContainer) {
1074
+ cssSplitArray[index] = '0';
1075
+ }
1076
+ });
1077
+ this.renderer.setStyle(section.nativeElement, 'grid-template-rows', 'auto');
1078
+ //this.renderer.setStyle(section.nativeElement, 'grid-template-rows', cssSplitArray.join(' '));
1079
+ }
1080
+ }
1081
+ });
1082
+ }
1083
+ }, 0);
1084
+ }
1085
+ setStyleHeight() {
1086
+ if (this.height && this.height > 0 && this.screenType !== 'Phablet') {
1087
+ this.styleHeight = this.styleMaxHeight = `${this.height}px`;
1088
+ }
1089
+ else {
1090
+ this.styleHeight = this.styleMaxHeight = 'unset';
1091
+ }
1092
+ }
1093
+ getIsDragging() {
1094
+ return this.draggingBlockKey.length > 0 && this.draggingSectionKey.length > 0;
1095
+ }
1096
+ getIsHidden(hideIn, currentScreenType) {
1097
+ return this.layoutBuilderService.getIsHidden(hideIn, currentScreenType);
1098
+ }
1099
+ ngOnInit() {
1100
+ this.layoutBuilderService.previewModeChange$.pipe(this.getDestroyer()).subscribe(previewMode => {
1101
+ this.refreshSplit();
1102
+ });
1103
+ // Just to calculate if sections contains blocks
1104
+ this.layoutBuilderService.sectionsChange$.pipe(this.getDestroyer()).subscribe(res => {
1105
+ this.calculateIfSectionContainsBlocks();
1106
+ });
1107
+ this.layoutService.onResize$.pipe(this.getDestroyer()).subscribe((size) => {
1108
+ this.screenSize = size;
1109
+ });
1110
+ this.layoutBuilderService.screenSizeChange$.pipe(this.getDestroyer()).subscribe((size) => {
1111
+ this.screenSize = size;
1112
+ });
1113
+ if (this.editable) {
1114
+ this.layoutBuilderService.sectionsColumnsDropListChange$.pipe(this.getDestroyer()).subscribe((sectionsColumnsDropList) => {
1115
+ this.sectionsColumnsDropList = sectionsColumnsDropList;
1116
+ });
1117
+ this.layoutBuilderService.editorChange$.pipe(this.getDestroyer()).subscribe((editor) => {
1118
+ this.isMainEditorState = editor && editor.type === 'layout-builder';
1119
+ this.isEditing = editor && editor.type === 'section' && editor.id === this.key;
1120
+ this.selectedSectionKey = editor && editor.type === 'section' ? editor.id : '';
1121
+ this.selectedBlockKey = editor && editor.type === 'block' ? editor.id : '';
1122
+ });
1123
+ this.layoutBuilderService.draggingBlockKey.pipe(this.getDestroyer()).subscribe((draggingBlockKey) => {
1124
+ this.draggingBlockKey = draggingBlockKey;
1125
+ if (draggingBlockKey === '') {
1126
+ this.calculateIfSectionContainsBlocks();
1127
+ }
1128
+ else {
1129
+ // If there is only one block in the section and now it's this block that the user is dragging.
1130
+ const blocksLength = this.columns.filter(column => column.BlockContainer).length;
1131
+ if (blocksLength === 1 && this.columns.find(c => { var _a; return ((_a = c.BlockContainer) === null || _a === void 0 ? void 0 : _a.BlockKey) === this.draggingBlockKey; })) {
1132
+ this.shouldSetDefaultHeight = true;
1133
+ }
1134
+ }
1135
+ });
1136
+ this.layoutBuilderService.draggingSectionKey.pipe(this.getDestroyer()).subscribe((draggingSectionKey) => {
1137
+ this.draggingSectionKey = draggingSectionKey;
1138
+ });
1139
+ }
1140
+ this.sectionColumnKeyPrefix = this.layoutBuilderService.getSectionColumnKey(this.key);
1141
+ }
1142
+ onEditSectionClick() {
1143
+ this.layoutBuilderService.navigateToEditor('section', this.key);
1144
+ }
1145
+ onRemoveSectionClick() {
1146
+ this.layoutBuilderService.removeSection(this.key);
1147
+ }
1148
+ onHideSectionChange(hideIn) {
1149
+ this.layoutBuilderService.hideSection(this.key, hideIn);
1150
+ }
1151
+ onHideInMenuOpened() {
1152
+ this.hoverState = true;
1153
+ }
1154
+ onHideInMenuClosed() {
1155
+ this.hoverState = false;
1156
+ }
1157
+ onBlockDropped(event) {
1158
+ this.layoutBuilderService.onBlockDropped(event, this.key);
1159
+ }
1160
+ canDropPredicate(columnIndex) {
1161
+ return (drag, drop) => {
1162
+ const res = !this.layoutBuilderService.doesColumnContainBlock(this.key, columnIndex);
1163
+ return res;
1164
+ };
1165
+ }
1166
+ onDragStart(event) {
1167
+ this.layoutBuilderService.onSectionDragStart(event);
1168
+ }
1169
+ onDragEnd(event) {
1170
+ this.layoutBuilderService.onSectionDragEnd(event);
1171
+ }
1172
+ onSectionBlockDragExited(event) {
1173
+ //
1174
+ }
1175
+ onSectionBlockDragEntered(event) {
1176
+ //
1177
+ }
1178
+ }
1179
+ SectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionComponent, deps: [{ token: i0.Renderer2 }, { token: LayoutBuilderInternalService }, { token: i1$2.PepLayoutService }], target: i0.ɵɵFactoryTarget.Component });
1180
+ 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 <div [id]=\"sectionColumnKeyPrefix + i\" \n *ngFor=\"let column of columns; let i=index;\"\n class=\"section-column {{screenSize <= pepScreenSizeToFlipToVertical ? '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]=\"screenSize <= pepScreenSizeToFlipToVertical ? 'horizontal' : 'vertical'\" \n [cdkDropListConnectedTo]=\"sectionsColumnsDropList\"\n (cdkDropListDropped)=\"onBlockDropped($event)\"\n [cdkDropListEnterPredicate]=\"canDropPredicate(i)\"\n >\n <section-block *ngIf=\"column.BlockContainer?.BlockKey\" 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 </div>\n</div>\n", styles: [".section-container{position:relative;display:grid;height:100%;max-height:inherit;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: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.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: i4$1.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: i4$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i6.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: PepHideInComponent, 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"] }] });
1181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionComponent, decorators: [{
1182
+ type: Component,
1183
+ 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 <div [id]=\"sectionColumnKeyPrefix + i\" \n *ngFor=\"let column of columns; let i=index;\"\n class=\"section-column {{screenSize <= pepScreenSizeToFlipToVertical ? '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]=\"screenSize <= pepScreenSizeToFlipToVertical ? 'horizontal' : 'vertical'\" \n [cdkDropListConnectedTo]=\"sectionsColumnsDropList\"\n (cdkDropListDropped)=\"onBlockDropped($event)\"\n [cdkDropListEnterPredicate]=\"canDropPredicate(i)\"\n >\n <section-block *ngIf=\"column.BlockContainer?.BlockKey\" 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 </div>\n</div>\n", styles: [".section-container{position:relative;display:grid;height:100%;max-height:inherit;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"] }]
1184
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: LayoutBuilderInternalService }, { type: i1$2.PepLayoutService }]; }, propDecorators: { sectionContainerRef: [{
1185
+ type: ViewChild,
1186
+ args: ['sectionContainer']
1187
+ }], columnsElementRef: [{
1188
+ type: ViewChildren,
1189
+ args: ['columnsWrapper']
1190
+ }], blockTemplate: [{
1191
+ type: Input
1192
+ }], key: [{
1193
+ type: Input
1194
+ }], name: [{
1195
+ type: Input
1196
+ }], split: [{
1197
+ type: Input
1198
+ }], height: [{
1199
+ type: Input
1200
+ }], collapseOnTablet: [{
1201
+ type: Input
1202
+ }], columns: [{
1203
+ type: Input
1204
+ }], hideIn: [{
1205
+ type: Input
1206
+ }], columnsGap: [{
1207
+ type: Input
1208
+ }], styleMaxHeight: [{
1209
+ type: HostBinding,
1210
+ args: ['style.max-height']
1211
+ }], styleHeight: [{
1212
+ type: HostBinding,
1213
+ args: ['style.height']
1214
+ }] } });
1215
+
1216
+ class SectionBlockModule {
1217
+ }
1218
+ SectionBlockModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionBlockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1219
+ SectionBlockModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: SectionBlockModule, declarations: [SectionBlockComponent], imports: [CommonModule,
1220
+ DragDropModule,
1221
+ PepButtonModule,
1222
+ PepSkeletonLoaderModule,
1223
+ PepRemoteLoaderModule,
1224
+ // PepHideInModule,
1225
+ PepDraggableItemsModule], exports: [SectionBlockComponent] });
1226
+ SectionBlockModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionBlockModule, imports: [CommonModule,
1227
+ DragDropModule,
1228
+ PepButtonModule,
1229
+ PepSkeletonLoaderModule,
1230
+ PepRemoteLoaderModule,
1231
+ // PepHideInModule,
1232
+ PepDraggableItemsModule] });
1233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionBlockModule, decorators: [{
1234
+ type: NgModule,
1235
+ args: [{
1236
+ declarations: [
1237
+ SectionBlockComponent,
1238
+ ],
1239
+ imports: [
1240
+ CommonModule,
1241
+ DragDropModule,
1242
+ PepButtonModule,
1243
+ PepSkeletonLoaderModule,
1244
+ PepRemoteLoaderModule,
1245
+ // PepHideInModule,
1246
+ PepDraggableItemsModule,
1247
+ // TranslateModule.forChild()
1248
+ ],
1249
+ exports: [SectionBlockComponent]
1250
+ }]
1251
+ }] });
1252
+
1253
+ class SectionModule {
1254
+ }
1255
+ SectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1256
+ SectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: SectionModule, declarations: [SectionComponent], imports: [CommonModule,
1257
+ DragDropModule,
1258
+ PepButtonModule,
1259
+ PepRemoteLoaderModule,
1260
+ SectionBlockModule,
1261
+ PepHideInModule,
1262
+ PepDraggableItemsModule], exports: [SectionComponent] });
1263
+ SectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionModule, imports: [CommonModule,
1264
+ DragDropModule,
1265
+ PepButtonModule,
1266
+ PepRemoteLoaderModule,
1267
+ SectionBlockModule,
1268
+ PepHideInModule,
1269
+ PepDraggableItemsModule] });
1270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionModule, decorators: [{
1271
+ type: NgModule,
1272
+ args: [{
1273
+ declarations: [SectionComponent],
1274
+ imports: [
1275
+ CommonModule,
1276
+ DragDropModule,
1277
+ PepButtonModule,
1278
+ PepRemoteLoaderModule,
1279
+ SectionBlockModule,
1280
+ PepHideInModule,
1281
+ PepDraggableItemsModule,
1282
+ // TranslateModule.forChild()
1283
+ ],
1284
+ exports: [SectionComponent]
1285
+ }]
1286
+ }] });
1287
+
1288
+ class PepLayoutComponent extends BaseDestroyerDirective {
1289
+ constructor(customizationService, layoutService, layoutBuilderService, hostElement, renderer) {
1290
+ super();
1291
+ this.customizationService = customizationService;
1292
+ this.layoutService = layoutService;
1293
+ this.layoutBuilderService = layoutBuilderService;
1294
+ this.hostElement = hostElement;
1295
+ this.renderer = renderer;
1296
+ this.blockTemplate = undefined;
1297
+ this._showSkeleton = false;
1298
+ this.layoutViewChange = new EventEmitter();
1299
+ this.screenTypeChange = new EventEmitter();
1300
+ this._horizontalSpacing = 'md';
1301
+ this._verticalSpacing = 'md';
1302
+ this.paddingInline = '1rem';
1303
+ this.previewMode = false;
1304
+ this._sectionsSubject = new BehaviorSubject([]);
1305
+ this.renderer.addClass(this.hostElement.nativeElement, 'pep-layout');
1306
+ }
1307
+ set layoutView(value) {
1308
+ this._layoutView = value;
1309
+ this.layoutBuilderService.loadLayoutBuilder(value);
1310
+ }
1311
+ get layoutView() {
1312
+ return this._layoutView;
1313
+ }
1314
+ set showSkeleton(value) {
1315
+ this._showSkeleton = value;
1316
+ this.layoutBuilderService.showSkeleton(value);
1317
+ }
1318
+ get showSkeleton() {
1319
+ return this._showSkeleton;
1320
+ }
1321
+ set horizontalSpacing(value) {
1322
+ this._horizontalSpacing = value;
1323
+ this.paddingInline = this.convertLayoutSizeType(value || 'md');
1324
+ }
1325
+ get horizontalSpacing() {
1326
+ return this._horizontalSpacing;
1327
+ }
1328
+ set verticalSpacing(value) {
1329
+ this._verticalSpacing = value;
1330
+ }
1331
+ get verticalSpacing() {
1332
+ return this._verticalSpacing;
1333
+ }
1334
+ get sections$() {
1335
+ return this._sectionsSubject.asObservable();
1336
+ }
1337
+ convertLayoutSizeType(size) {
1338
+ let res;
1339
+ if (size === 'lg') {
1340
+ res = '2rem';
1341
+ }
1342
+ else if (size === 'md') {
1343
+ res = '1rem';
1344
+ }
1345
+ else if (size === 'sm') {
1346
+ res = '0.5rem';
1347
+ }
1348
+ else {
1349
+ res = '0';
1350
+ }
1351
+ return res;
1352
+ }
1353
+ animateSkeleton() {
1354
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1355
+ if (this._showSkeleton) {
1356
+ // this.sectionsContainer?.nativeElement?.classList.add('out');
1357
+ (_b = (_a = this.sectionsContainer) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.classList.remove('in');
1358
+ (_d = (_c = this.skeletonContainer) === null || _c === void 0 ? void 0 : _c.nativeElement) === null || _d === void 0 ? void 0 : _d.classList.add('in');
1359
+ // this.skeletonContainer?.nativeElement?.classList.remove('out');
1360
+ }
1361
+ else {
1362
+ (_f = (_e = this.sectionsContainer) === null || _e === void 0 ? void 0 : _e.nativeElement) === null || _f === void 0 ? void 0 : _f.classList.add('in');
1363
+ // this.sectionsContainer?.nativeElement?.classList.remove('out');
1364
+ // this.skeletonContainer?.nativeElement?.classList.add('out');
1365
+ (_h = (_g = this.skeletonContainer) === null || _g === void 0 ? void 0 : _g.nativeElement) === null || _h === void 0 ? void 0 : _h.classList.remove('in');
1366
+ }
1367
+ }
1368
+ setLayoutDataProperties() {
1369
+ var _a;
1370
+ const layoutView = this._layoutView;
1371
+ if (layoutView) {
1372
+ if ((_a = this.sectionsContainer) === null || _a === void 0 ? void 0 : _a.nativeElement) {
1373
+ let maxWidth = coerceNumberProperty(layoutView.Layout.MaxWidth, 0);
1374
+ const maxWidthToSet = maxWidth === 0 ? 'unset' : `${maxWidth}px`;
1375
+ this.renderer.setStyle(this.sectionsContainer.nativeElement, 'max-width', maxWidthToSet);
1376
+ }
1377
+ this.sectionsGap = layoutView.Layout.SectionsGap || 'md';
1378
+ this.columnsGap = layoutView.Layout.ColumnsGap || 'md';
1379
+ this.horizontalSpacing = layoutView.Layout.HorizontalSpacing;
1380
+ this.verticalSpacing = layoutView.Layout.VerticalSpacing;
1381
+ }
1382
+ }
1383
+ setScreentType(screenSize) {
1384
+ const screenType = this.layoutBuilderService.getScreenType(screenSize);
1385
+ this.selectedScreenType = screenType;
1386
+ this.screenTypeChange.emit(screenType);
1387
+ }
1388
+ ngOnInit() {
1389
+ /***********************************************************************************************/
1390
+ /* Internal Events - for code usage
1391
+ /***********************************************************************************************/
1392
+ if (this.layoutBuilderService.editMode) {
1393
+ this.layoutBuilderService.previewModeChange$.pipe(this.getDestroyer()).subscribe((previewMode) => {
1394
+ this.previewMode = previewMode;
1395
+ });
1396
+ }
1397
+ this.layoutBuilderService.sectionsChange$.pipe(this.getDestroyer()).subscribe((sections) => {
1398
+ this._sectionsSubject.next(sections);
1399
+ });
1400
+ this.layoutBuilderService.showSkeletonChange$.pipe(this.getDestroyer()).subscribe((showSkeleton) => {
1401
+ if (showSkeleton !== undefined) {
1402
+ this._showSkeleton = showSkeleton;
1403
+ this.animateSkeleton();
1404
+ }
1405
+ });
1406
+ this.layoutService.onResize$.pipe(this.getDestroyer()).subscribe((size) => {
1407
+ this.setScreentType(size);
1408
+ });
1409
+ this.layoutBuilderService.screenSizeChange$.pipe(this.getDestroyer()).subscribe((size) => {
1410
+ this.setScreentType(size);
1411
+ });
1412
+ /***********************************************************************************************/
1413
+ /* External Events - for raise to the client
1414
+ /***********************************************************************************************/
1415
+ this.layoutBuilderService.layoutViewChange$.pipe(this.getDestroyer()).subscribe((layoutView) => {
1416
+ this._layoutView = layoutView;
1417
+ this.setLayoutDataProperties();
1418
+ this.layoutViewChange.emit(this._layoutView);
1419
+ });
1420
+ }
1421
+ getSectionsTemplateRows() {
1422
+ let gridAutoRows = '';
1423
+ // let fillHeightCount = 0;
1424
+ this.sections$.pipe(this.getDestroyer()).subscribe((sections) => {
1425
+ if (sections === null || sections === void 0 ? void 0 : sections.length) {
1426
+ sections.forEach((sec) => {
1427
+ if (sec.FillHeight === true) {
1428
+ // fillHeightCount++;
1429
+ gridAutoRows += ' auto';
1430
+ }
1431
+ else {
1432
+ gridAutoRows += ' min-content';
1433
+ }
1434
+ });
1435
+ //if all are fill height should return 1fr for all
1436
+ //if not should return auto for fill height and min content for none
1437
+ return gridAutoRows;
1438
+ }
1439
+ else {
1440
+ return '';
1441
+ }
1442
+ });
1443
+ return gridAutoRows;
1444
+ }
1445
+ onSectionDropped(event) {
1446
+ this.layoutBuilderService.onSectionDropped(event);
1447
+ }
1448
+ onDragStart(event) {
1449
+ this.layoutBuilderService.onSectionDragStart(event);
1450
+ }
1451
+ onDragEnd(event) {
1452
+ this.layoutBuilderService.onSectionDragEnd(event);
1453
+ }
1454
+ }
1455
+ PepLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutComponent, deps: [{ token: i1$2.PepCustomizationService }, { token: i1$2.PepLayoutService }, { token: LayoutBuilderInternalService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1456
+ 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: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4$2.PepSkeletonLoaderComponent, selector: "pep-skeleton-loader", inputs: ["rowHeightType", "rowsNumber", "lastRowOffset"] }, { kind: "component", type: i5$2.PepSizeDetectorComponent, selector: "pep-size-detector", inputs: ["showScreenSize", "useAsWebComponent"], outputs: ["sizeChange"] }, { kind: "directive", type: i4$1.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: i4$1.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: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
1457
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutComponent, decorators: [{
1458
+ type: Component,
1459
+ 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"] }]
1460
+ }], ctorParameters: function () { return [{ type: i1$2.PepCustomizationService }, { type: i1$2.PepLayoutService }, { type: LayoutBuilderInternalService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { skeletonContainer: [{
1461
+ type: ViewChild,
1462
+ args: ['skeletonCont', { static: true }]
1463
+ }], sectionsContainer: [{
1464
+ type: ViewChild,
1465
+ args: ['sectionsCont', { static: true }]
1466
+ }], layoutView: [{
1467
+ type: Input
1468
+ }], blockTemplate: [{
1469
+ type: Input
1470
+ }], showSkeleton: [{
1471
+ type: Input
1472
+ }], layoutViewChange: [{
1473
+ type: Output
1474
+ }], screenTypeChange: [{
1475
+ type: Output
1476
+ }], paddingInline: [{
1477
+ type: HostBinding,
1478
+ args: ['style.padding-inline']
1479
+ }] } });
1480
+
1481
+ class PepLayoutModule {
1482
+ }
1483
+ PepLayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1484
+ PepLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutModule, declarations: [PepLayoutComponent], imports: [CommonModule,
1485
+ HttpClientModule,
1486
+ PepNgxLibModule,
1487
+ PepSkeletonLoaderModule,
1488
+ PepRemoteLoaderModule,
1489
+ PepSizeDetectorModule,
1490
+ PepDialogModule,
1491
+ DragDropModule,
1492
+ SectionModule, i1.TranslateModule], exports: [PepLayoutComponent] });
1493
+ PepLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutModule, imports: [CommonModule,
1494
+ HttpClientModule,
1495
+ PepNgxLibModule,
1496
+ PepSkeletonLoaderModule,
1497
+ PepRemoteLoaderModule,
1498
+ PepSizeDetectorModule,
1499
+ PepDialogModule,
1500
+ DragDropModule,
1501
+ SectionModule,
1502
+ TranslateModule.forChild()] });
1503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutModule, decorators: [{
1504
+ type: NgModule,
1505
+ args: [{
1506
+ declarations: [
1507
+ PepLayoutComponent,
1508
+ ],
1509
+ imports: [
1510
+ CommonModule,
1511
+ HttpClientModule,
1512
+ PepNgxLibModule,
1513
+ PepSkeletonLoaderModule,
1514
+ PepRemoteLoaderModule,
1515
+ PepSizeDetectorModule,
1516
+ PepDialogModule,
1517
+ DragDropModule,
1518
+ SectionModule,
1519
+ TranslateModule.forChild()
1520
+ ],
1521
+ exports: [PepLayoutComponent],
1522
+ }]
1523
+ }] });
1524
+
1525
+ class SectionEditorComponent {
1526
+ constructor(translate, dialog) {
1527
+ this.translate = translate;
1528
+ this.dialog = dialog;
1529
+ this.MIN_HEIGHT = 40;
1530
+ this.sectionName = '';
1531
+ this.isAutoHeight = true;
1532
+ this.height = this.MIN_HEIGHT;
1533
+ this.hostObjectChange = new EventEmitter();
1534
+ this.collapseOnTablet = false;
1535
+ this.fillHeight = false;
1536
+ this.subSections = false;
1537
+ this.partsNumber = "2";
1538
+ this.partsNumberOptions = Array();
1539
+ this.splitOptions = Array();
1540
+ this.allSplitOptions = Array();
1541
+ this.initData();
1542
+ }
1543
+ set hostObject(value) {
1544
+ var _a, _b;
1545
+ this._hostObject = value;
1546
+ this.sectionName = value.sectionName;
1547
+ this.split = value.split;
1548
+ this.isAutoHeight = !value.height || value.height === 0;
1549
+ this.height = this.isAutoHeight ? this.MIN_HEIGHT : value.height;
1550
+ this.collapseOnTablet = (_a = value.collapseOnTablet) !== null && _a !== void 0 ? _a : false;
1551
+ this.fillHeight = (_b = value.fillHeight) !== null && _b !== void 0 ? _b : false;
1552
+ }
1553
+ get hostObject() {
1554
+ return this._hostObject;
1555
+ }
1556
+ set split(value) {
1557
+ this._split = value;
1558
+ this.subSections = (this._split && this._split.length > 0) ? true : false;
1559
+ // Check how many parts we have.
1560
+ const arr = value === null || value === void 0 ? void 0 : value.split(' ');
1561
+ if (arr && arr.length > 1 && arr.length <= 4) {
1562
+ this.partsNumber = arr.length.toString();
1563
+ }
1564
+ else {
1565
+ this.partsNumber = "2";
1566
+ }
1567
+ this.loadSplitOptions();
1568
+ }
1569
+ get split() {
1570
+ return this._split;
1571
+ }
1572
+ initData() {
1573
+ this.partsNumberOptions = [
1574
+ { 'key': '2', 'value': '2 Parts' },
1575
+ { 'key': '3', 'value': '3 Parts' },
1576
+ { 'key': '4', 'value': '4 Parts' }
1577
+ ];
1578
+ this.allSplitOptions = [
1579
+ { 'key': '2', 'value': [
1580
+ { 'key': '1/4 3/4', 'value': '1/4-3/4' },
1581
+ { 'key': '1/3 2/3', 'value': '1/3-2/3' },
1582
+ { 'key': '1/2 1/2', 'value': '1/2-1/2' },
1583
+ { 'key': '2/3 1/3', 'value': '2/3-1/3' },
1584
+ { 'key': '3/4 1/4', 'value': '3/4-1/4' },
1585
+ ] },
1586
+ { 'key': '3', 'value': [
1587
+ { 'key': '1/3 1/3 1/3', 'value': '1/3-1/3-1/3' },
1588
+ { 'key': '1/2 1/4 1/4', 'value': '1/2-1/4-1/4' },
1589
+ { 'key': '1/4 1/2 1/4', 'value': '1/4-1/2-1/4' },
1590
+ { 'key': '1/4 1/4 1/2', 'value': '1/4-1/4-1/2' },
1591
+ ] },
1592
+ { 'key': '4', 'value': [
1593
+ { 'key': '1/4 1/4 1/4 1/4', 'value': '1/4-1/4-1/4-1/4' },
1594
+ ] }
1595
+ ];
1596
+ }
1597
+ loadSplitOptions() {
1598
+ const splitOptions = this.allSplitOptions.find((option) => option.key === this.partsNumber);
1599
+ if (splitOptions) {
1600
+ this.splitOptions = splitOptions.value;
1601
+ }
1602
+ else {
1603
+ this.splitOptions = this.allSplitOptions[0].value;
1604
+ }
1605
+ if (!this._split) {
1606
+ this._split = this.splitOptions[0].key;
1607
+ }
1608
+ }
1609
+ updateHostObject() {
1610
+ this._hostObject.sectionName = this.sectionName;
1611
+ this._hostObject.split = this.subSections ? this.split : undefined;
1612
+ this._hostObject.height = this.isAutoHeight ? 0 : this.height;
1613
+ this._hostObject.collapseOnTablet = this.collapseOnTablet;
1614
+ this._hostObject.fillHeight = this.fillHeight;
1615
+ this.hostObjectChange.emit(this.hostObject);
1616
+ }
1617
+ ngOnInit() {
1618
+ this.loadSplitOptions();
1619
+ }
1620
+ isAutoHeightChange(isChecked) {
1621
+ this.isAutoHeight = isChecked;
1622
+ this.updateHostObject();
1623
+ }
1624
+ onHeightChange(height) {
1625
+ if (height >= this.MIN_HEIGHT) {
1626
+ this.height = coerceNumberProperty(height, this.height);
1627
+ this.updateHostObject();
1628
+ }
1629
+ }
1630
+ onSectionNameChange(value) {
1631
+ this.sectionName = value;
1632
+ this.updateHostObject();
1633
+ }
1634
+ onCollapseOnTabletChange(value) {
1635
+ this.collapseOnTablet = value;
1636
+ this.updateHostObject();
1637
+ }
1638
+ onFillHeightChange(value) {
1639
+ this.fillHeight = value;
1640
+ this.updateHostObject();
1641
+ }
1642
+ onSubSectionsChange(value) {
1643
+ const oldValue = this.subSections;
1644
+ // Check if cancel the sub sections ( change from any -> 1 section ), if true need to show confirm message
1645
+ if (value === false) {
1646
+ this.subSections = value;
1647
+ this.showDeleteSectionMsg(() => {
1648
+ this.updateHostObject();
1649
+ }, () => {
1650
+ this.subSections = oldValue;
1651
+ });
1652
+ }
1653
+ else {
1654
+ this.subSections = value;
1655
+ this.updateHostObject();
1656
+ }
1657
+ }
1658
+ onPartsNumberChange(key) {
1659
+ const oldKey = this.partsNumber;
1660
+ // Check if decrease on sub sections number, if true need to show confirm message
1661
+ if (key && parseInt(key) < parseInt(this.partsNumber)) {
1662
+ this.partsNumber = key;
1663
+ this.showDeleteSectionMsg(() => {
1664
+ this.loadSplitOptions();
1665
+ this._split = this.splitOptions[0].key;
1666
+ this.updateHostObject();
1667
+ }, () => {
1668
+ this.partsNumber = oldKey;
1669
+ });
1670
+ }
1671
+ else {
1672
+ this.partsNumber = key;
1673
+ this.loadSplitOptions();
1674
+ this._split = this.splitOptions[0].key;
1675
+ this.updateHostObject();
1676
+ }
1677
+ }
1678
+ showDeleteSectionMsg(continueCB, cancelCB) {
1679
+ const actionButtons = [
1680
+ new PepDialogActionButton(this.translate.instant('ACTIONS.CANCEL'), '', () => {
1681
+ cancelCB();
1682
+ }),
1683
+ new PepDialogActionButton(this.translate.instant('ACTIONS.CONTINUE'), 'strong caution', () => {
1684
+ continueCB();
1685
+ })
1686
+ ];
1687
+ const content = this.translate.instant('LAYOUT_BUILDER.DELETE_SECTION_MSG');
1688
+ const title = this.translate.instant('LAYOUT_BUILDER.DELETE_SECTION_TITLE');
1689
+ const dataMsg = new PepDialogData({ title, actionsType: 'custom', content, actionButtons });
1690
+ this.dialog.openDefaultDialog(dataMsg);
1691
+ }
1692
+ onSplitChange(key) {
1693
+ this._split = key;
1694
+ this.updateHostObject();
1695
+ }
1696
+ }
1697
+ SectionEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionEditorComponent, deps: [{ token: i1.TranslateService }, { token: i2.PepDialogService }], target: i0.ɵɵFactoryTarget.Component });
1698
+ SectionEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: SectionEditorComponent, selector: "section-editor", inputs: { hostObject: "hostObject" }, outputs: { hostObjectChange: "hostObjectChange" }, ngImport: i0, template: "<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\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 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: i3$2.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"] }, { kind: "component", type: i4$3.PepSelectComponent, selector: "pep-select", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "placeholder", "placeholderWhenDisabled", "options", "visible", "emptyOption", "form", "layoutType", "parentFieldKey", "isActive", "showTitle", "renderTitle", "typeaheadDebounceInterval", "addValueToOptionsIfNotExist"], outputs: ["valueChange"] }, { kind: "component", type: i5$3.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
1699
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionEditorComponent, decorators: [{
1700
+ type: Component,
1701
+ args: [{ selector: 'section-editor', template: "<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\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 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"] }]
1702
+ }], ctorParameters: function () { return [{ type: i1.TranslateService }, { type: i2.PepDialogService }]; }, propDecorators: { hostObject: [{
1703
+ type: Input
1704
+ }], hostObjectChange: [{
1705
+ type: Output
1706
+ }] } });
1707
+
1708
+ class SectionEditorModule {
1709
+ }
1710
+ SectionEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1711
+ SectionEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: SectionEditorModule, declarations: [SectionEditorComponent], imports: [CommonModule,
1712
+ PepButtonModule,
1713
+ PepTextboxModule,
1714
+ PepSelectModule,
1715
+ PepCheckboxModule, i1.TranslateModule], exports: [SectionEditorComponent] });
1716
+ SectionEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionEditorModule, imports: [CommonModule,
1717
+ PepButtonModule,
1718
+ PepTextboxModule,
1719
+ PepSelectModule,
1720
+ PepCheckboxModule,
1721
+ TranslateModule.forChild()] });
1722
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SectionEditorModule, decorators: [{
1723
+ type: NgModule,
1724
+ args: [{
1725
+ declarations: [SectionEditorComponent],
1726
+ imports: [
1727
+ CommonModule,
1728
+ PepButtonModule,
1729
+ PepTextboxModule,
1730
+ PepSelectModule,
1731
+ PepCheckboxModule,
1732
+ TranslateModule.forChild()
1733
+ ],
1734
+ exports: [SectionEditorComponent]
1735
+ }]
1736
+ }] });
1737
+
1738
+ class PepLayoutEditorComponent extends BaseDestroyerDirective {
1739
+ // onLoadFlowHostObject;
1740
+ // onChangeFlowHostObject;
1741
+ constructor(customizationService, layoutBuilderService, hostElement, renderer) {
1742
+ super();
1743
+ this.customizationService = customizationService;
1744
+ this.layoutBuilderService = layoutBuilderService;
1745
+ this.hostElement = hostElement;
1746
+ this.renderer = renderer;
1747
+ // @ViewChild('parametersDialogTemplate', { static: true, read: TemplateRef }) parametersDialogTemplate!: TemplateRef<any>;
1748
+ this.availableBlocksForDrag = [];
1749
+ this.hostObjectChange = new EventEmitter();
1750
+ this.horizontalSpacing = 'md';
1751
+ this.verticalSpacing = 'md';
1752
+ this.sectionsGap = 'md';
1753
+ this.columnsGap = 'md';
1754
+ this.roundedCorners = 'none';
1755
+ // protected sizesGroupButtons = Array<ISpacingOption>();
1756
+ this.availableBlocksContainerId = LayoutBuilderInternalService.AVAILABLE_BLOCKS_CONTAINER_ID;
1757
+ this.sectionsColumnsDropList = [];
1758
+ this.showTopContent = false;
1759
+ this.showBottomContent = false;
1760
+ this.renderer.addClass(this.hostElement.nativeElement, 'pep-layout-editor');
1761
+ }
1762
+ set hostObject(value) {
1763
+ this._hostObject = value;
1764
+ // this.onLoadFlow = value.onLoadFlow;
1765
+ // this.onChangeFlow = value.onChangeFlow;
1766
+ this.isFullWidth = !value.maxWidth || value.maxWidth === 0;
1767
+ this.maxWidth = value.maxWidth;
1768
+ this.horizontalSpacing = this._hostObject.horizontalSpacing || 'md';
1769
+ this.verticalSpacing = this._hostObject.verticalSpacing || 'md';
1770
+ this.sectionsGap = this._hostObject.sectionsGap || 'md';
1771
+ this.columnsGap = this._hostObject.columnsGap || 'md';
1772
+ this.roundedCorners = this._hostObject.roundedCorners || 'none';
1773
+ // this.prepareFlowHostObject('load');
1774
+ // this.prepareFlowHostObject('change');
1775
+ }
1776
+ get hostObject() {
1777
+ return this._hostObject;
1778
+ }
1779
+ // private prepareFlowHostObject(pageFlowType: 'load' | 'change') {
1780
+ // const fields = {};
1781
+ // if (pageFlowType === 'load') {
1782
+ // this.onLoadFlowHostObject = {};
1783
+ // this.onLoadFlowHostObject['runFlowData'] = this.onLoadFlow;
1784
+ // this.onLoadFlowHostObject['fields'] = fields;
1785
+ // } else if (pageFlowType === 'change') {
1786
+ // this.onChangeFlowHostObject = {};
1787
+ // this.onChangeFlowHostObject['runFlowData'] = this.onChangeFlow;
1788
+ // this.onChangeFlowHostObject['fields'] = fields;
1789
+ // }
1790
+ // }
1791
+ updateHostObject() {
1792
+ // this._hostObject.onLoadFlow = this.onLoadFlow;
1793
+ // this._hostObject.onChangeFlow = this.onChangeFlow;
1794
+ this._hostObject.maxWidth = this.isFullWidth ? 0 : this.maxWidth;
1795
+ this._hostObject.horizontalSpacing = this.horizontalSpacing;
1796
+ this._hostObject.verticalSpacing = this.verticalSpacing;
1797
+ this._hostObject.sectionsGap = this.sectionsGap;
1798
+ this._hostObject.columnsGap = this.columnsGap;
1799
+ this._hostObject.roundedCorners = this.roundedCorners === 'none' ? undefined : this.roundedCorners;
1800
+ // this.prepareFlowHostObject('load');
1801
+ // this.prepareFlowHostObject('change');
1802
+ this.hostObjectChange.emit(this.hostObject);
1803
+ }
1804
+ ngOnInit() {
1805
+ this.layoutBuilderService.sectionsColumnsDropListChange$.subscribe((sectionsColumnsDropList) => {
1806
+ this.sectionsColumnsDropList = sectionsColumnsDropList;
1807
+ });
1808
+ }
1809
+ ngAfterViewInit() {
1810
+ if (this._topContentRef.nativeElement.children.length > 0) {
1811
+ this.showTopContent = true;
1812
+ }
1813
+ if (this._bottomContentRef.nativeElement.children.length > 0) {
1814
+ this.showBottomContent = true;
1815
+ }
1816
+ }
1817
+ onAddSectionClick(event) {
1818
+ this.layoutBuilderService.addSection();
1819
+ }
1820
+ isFullWidthChange(isChecked) {
1821
+ this.isFullWidth = isChecked;
1822
+ this.maxWidth = isChecked ? 0 : 960;
1823
+ this.updateHostObject();
1824
+ }
1825
+ onMaxWidthChange(maxWidth) {
1826
+ this.maxWidth = coerceNumberProperty(maxWidth, this.maxWidth);
1827
+ this.updateHostObject();
1828
+ }
1829
+ setColumnsHorizntalGap(key) {
1830
+ this.horizontalSpacing = key;
1831
+ this.updateHostObject();
1832
+ }
1833
+ setColumnsVerticalGap(key) {
1834
+ this.verticalSpacing = key;
1835
+ this.updateHostObject();
1836
+ }
1837
+ setSectionGap(key) {
1838
+ this.sectionsGap = key;
1839
+ this.updateHostObject();
1840
+ }
1841
+ setColumnsGap(key) {
1842
+ this.columnsGap = key;
1843
+ this.updateHostObject();
1844
+ }
1845
+ setRoundedCorners(key) {
1846
+ this.roundedCorners = key;
1847
+ this.updateHostObject();
1848
+ }
1849
+ onDragStart(event) {
1850
+ this.layoutBuilderService.onBlockDragStart(event);
1851
+ }
1852
+ onDragEnd(event) {
1853
+ this.layoutBuilderService.onBlockDragEnd(event);
1854
+ }
1855
+ }
1856
+ PepLayoutEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutEditorComponent, deps: [{ token: i1$2.PepCustomizationService }, { token: LayoutBuilderInternalService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1857
+ PepLayoutEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepLayoutEditorComponent, selector: "pep-layout-editor", inputs: { availableBlocksForDrag: "availableBlocksForDrag", hostObject: "hostObject" }, outputs: { hostObjectChange: "hostObjectChange" }, viewQueries: [{ propertyName: "_topContentRef", first: true, predicate: ["topContentRef"], descendants: true, static: true }, { propertyName: "_bottomContentRef", first: true, predicate: ["bottomContentRef"], descendants: true, static: true }, { propertyName: "availableBlocksContainer", first: true, predicate: ["availableBlocksContainer"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<mat-tab-group #tabGroup class=\"layout-builder-editor-tabs\" animationDuration=\"0ms\">\n <mat-tab label=\"{{'LAYOUT_BUILDER.GENERAL' | translate}}\">\n <div class=\"layout-builder-editor-tab\">\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 </div>\n </mat-tab>\n <mat-tab label=\"{{'LAYOUT_BUILDER.DESIGN' | translate}}\">\n <div class=\"layout-builder-editor-tab\">\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 </div>\n </mat-tab>\n</mat-tab-group>\n\n\n\n", styles: [":host pep-draggable-items ::ng-deep .draggable-items-overflow{padding-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.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"] }, { kind: "component", type: i5$4.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i5$4.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i6.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i5$3.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange"] }, { kind: "component", type: i8.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: "pipe", type: i1.TranslatePipe, name: "translate" }] });
1858
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutEditorComponent, decorators: [{
1859
+ type: Component,
1860
+ args: [{ selector: 'pep-layout-editor', template: "<mat-tab-group #tabGroup class=\"layout-builder-editor-tabs\" animationDuration=\"0ms\">\n <mat-tab label=\"{{'LAYOUT_BUILDER.GENERAL' | translate}}\">\n <div class=\"layout-builder-editor-tab\">\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 </div>\n </mat-tab>\n <mat-tab label=\"{{'LAYOUT_BUILDER.DESIGN' | translate}}\">\n <div class=\"layout-builder-editor-tab\">\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 </div>\n </mat-tab>\n</mat-tab-group>\n\n\n\n", styles: [":host pep-draggable-items ::ng-deep .draggable-items-overflow{padding-bottom:0!important}\n"] }]
1861
+ }], ctorParameters: function () { return [{ type: i1$2.PepCustomizationService }, { type: LayoutBuilderInternalService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { _topContentRef: [{
1862
+ type: ViewChild,
1863
+ args: ['topContentRef', { static: true }]
1864
+ }], _bottomContentRef: [{
1865
+ type: ViewChild,
1866
+ args: ['bottomContentRef', { static: true }]
1867
+ }], availableBlocksContainer: [{
1868
+ type: ViewChild,
1869
+ args: ['availableBlocksContainer', { read: ElementRef }]
1870
+ }], availableBlocksForDrag: [{
1871
+ type: Input
1872
+ }], hostObject: [{
1873
+ type: Input
1874
+ }], hostObjectChange: [{
1875
+ type: Output
1876
+ }] } });
1877
+
1878
+ class PepLayoutEditorModule {
1879
+ constructor() {
1880
+ // this.pepIconRegistry.registerIcons(pepIcons);
1881
+ }
1882
+ }
1883
+ PepLayoutEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1884
+ PepLayoutEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutEditorModule, declarations: [PepLayoutEditorComponent], imports: [CommonModule,
1885
+ HttpClientModule,
1886
+ PepNgxLibModule,
1887
+ PepRemoteLoaderModule,
1888
+ PepSelectModule,
1889
+ PepTextboxModule,
1890
+ DragDropModule,
1891
+ OverlayModule,
1892
+ MatTabsModule,
1893
+ PepButtonModule,
1894
+ PepCheckboxModule,
1895
+ PepGroupButtonsModule,
1896
+ PepColorModule,
1897
+ PepImageModule,
1898
+ PepGroupButtonsSettingsModule,
1899
+ PepDraggableItemsModule,
1900
+ PepDialogModule,
1901
+ MatSliderModule,
1902
+ PepTextareaModule,
1903
+ // PepManageParametersModule,
1904
+ // PepFlowPickerButtonModule,
1905
+ SectionEditorModule], exports: [PepLayoutEditorComponent] });
1906
+ PepLayoutEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutEditorModule, imports: [CommonModule,
1907
+ HttpClientModule,
1908
+ PepNgxLibModule,
1909
+ PepRemoteLoaderModule,
1910
+ PepSelectModule,
1911
+ PepTextboxModule,
1912
+ DragDropModule,
1913
+ OverlayModule,
1914
+ MatTabsModule,
1915
+ PepButtonModule,
1916
+ PepCheckboxModule,
1917
+ PepGroupButtonsModule,
1918
+ PepColorModule,
1919
+ PepImageModule,
1920
+ PepGroupButtonsSettingsModule,
1921
+ PepDraggableItemsModule,
1922
+ PepDialogModule,
1923
+ MatSliderModule,
1924
+ PepTextareaModule,
1925
+ // PepManageParametersModule,
1926
+ // PepFlowPickerButtonModule,
1927
+ SectionEditorModule] });
1928
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutEditorModule, decorators: [{
1929
+ type: NgModule,
1930
+ args: [{
1931
+ declarations: [
1932
+ PepLayoutEditorComponent
1933
+ ],
1934
+ imports: [
1935
+ CommonModule,
1936
+ HttpClientModule,
1937
+ PepNgxLibModule,
1938
+ PepRemoteLoaderModule,
1939
+ PepSelectModule,
1940
+ PepTextboxModule,
1941
+ DragDropModule,
1942
+ OverlayModule,
1943
+ MatTabsModule,
1944
+ PepButtonModule,
1945
+ PepCheckboxModule,
1946
+ PepGroupButtonsModule,
1947
+ PepColorModule,
1948
+ PepImageModule,
1949
+ PepGroupButtonsSettingsModule,
1950
+ PepDraggableItemsModule,
1951
+ PepDialogModule,
1952
+ MatSliderModule,
1953
+ PepTextareaModule,
1954
+ // PepManageParametersModule,
1955
+ // PepFlowPickerButtonModule,
1956
+ SectionEditorModule,
1957
+ ],
1958
+ exports: [PepLayoutEditorComponent]
1959
+ }]
1960
+ }], ctorParameters: function () { return []; } });
1961
+
1962
+ class PepLayoutBuilderComponent extends BaseDestroyerDirective {
1963
+ constructor(renderer, hostElement, translate, layoutBuilderService, pepAddonService) {
1964
+ super();
1965
+ this.renderer = renderer;
1966
+ this.hostElement = hostElement;
1967
+ this.translate = translate;
1968
+ this.layoutBuilderService = layoutBuilderService;
1969
+ this.pepAddonService = pepAddonService;
1970
+ this._availableBlocksForDrag = [];
1971
+ this._blocksLimitNumber = 0;
1972
+ this._layoutEditorTitle = '';
1973
+ this.backClick = new EventEmitter();
1974
+ this.editorChange = new EventEmitter(); // blockKey
1975
+ this.blockAdded = new EventEmitter();
1976
+ this.blocksRemoved = new EventEmitter();
1977
+ this.lockScreen = false;
1978
+ this.previewMode = false;
1979
+ this.currentEditor = null;
1980
+ this.viewportWidth = 0;
1981
+ this.pepAddonService.setShellRouterData({ showSidebar: false, addPadding: false });
1982
+ this.renderer.addClass(this.hostElement.nativeElement, 'pep-layout-builder');
1983
+ this.layoutBuilderService.setEditMode(true);
1984
+ }
1985
+ set availableBlocksForDrag(value) {
1986
+ this._availableBlocksForDrag = value;
1987
+ this.layoutBuilderService.setAvailableBlocksToDrag(value);
1988
+ }
1989
+ get availableBlocksForDrag() {
1990
+ return this._availableBlocksForDrag;
1991
+ }
1992
+ set blocksLimitNumber(value) {
1993
+ this._blocksLimitNumber = coerceNumberProperty(value, 0);
1994
+ this.layoutBuilderService.setBlocksLimitNumber(this._blocksLimitNumber);
1995
+ }
1996
+ set layoutEditorTitle(value) {
1997
+ this._layoutEditorTitle = value;
1998
+ this.setLayoutEditorTitle();
1999
+ }
2000
+ get layoutEditorTitle() {
2001
+ return this._layoutEditorTitle;
2002
+ }
2003
+ setScreenWidth(screenType) {
2004
+ this.layoutBuilderService.setScreenWidth(screenType);
2005
+ }
2006
+ updateViewportWidth() {
2007
+ var _a;
2008
+ if ((_a = this.layoutBuilderWrapper) === null || _a === void 0 ? void 0 : _a.nativeElement) {
2009
+ setTimeout(() => {
2010
+ this.viewportWidth = this.layoutBuilderWrapper.nativeElement.clientWidth;
2011
+ });
2012
+ }
2013
+ }
2014
+ setLayoutEditorTitle() {
2015
+ var _a;
2016
+ if (((_a = this.currentEditor) === null || _a === void 0 ? void 0 : _a.type) === 'layout-builder' && this.layoutEditorTitle !== '') {
2017
+ this.currentEditor.title = this.layoutEditorTitle;
2018
+ }
2019
+ }
2020
+ subscribeEvents() {
2021
+ /***********************************************************************************************/
2022
+ /* Internal Events - for code usage
2023
+ /***********************************************************************************************/
2024
+ this.layoutBuilderService.previewModeChange$.pipe(this.getDestroyer()).subscribe((previewMode) => {
2025
+ this.previewMode = previewMode;
2026
+ });
2027
+ this.layoutBuilderService.lockScreenChange$.pipe(this.getDestroyer()).subscribe((lockScreen) => {
2028
+ this.lockScreen = lockScreen;
2029
+ });
2030
+ this.layoutBuilderService.screenSizeChange$.pipe(this.getDestroyer()).subscribe((size) => {
2031
+ const screenType = this.layoutBuilderService.getScreenType(size);
2032
+ this.selectedScreenType = screenType;
2033
+ });
2034
+ // For update the layout data
2035
+ this.layoutBuilderService.layoutViewChange$.pipe(this.getDestroyer()).subscribe((layoutView) => {
2036
+ var _a;
2037
+ if (layoutView) {
2038
+ if ((_a = this.layoutBuilderWrapper) === null || _a === void 0 ? void 0 : _a.nativeElement) {
2039
+ let maxWidth = coerceNumberProperty(layoutView.Layout.MaxWidth, 0);
2040
+ const maxWidthToSet = maxWidth === 0 ? '100%' : `${maxWidth}px`;
2041
+ this.renderer.setStyle(this.layoutBuilderWrapper.nativeElement, 'max-width', maxWidthToSet);
2042
+ this.updateViewportWidth();
2043
+ }
2044
+ }
2045
+ });
2046
+ this.layoutBuilderService.screenWidthChange$.pipe(this.getDestroyer()).subscribe((width) => {
2047
+ var _a;
2048
+ if ((_a = this.layoutBuilderWrapper) === null || _a === void 0 ? void 0 : _a.nativeElement) {
2049
+ this.renderer.setStyle(this.layoutBuilderWrapper.nativeElement, 'width', width);
2050
+ this.updateViewportWidth();
2051
+ }
2052
+ });
2053
+ // Get the sections id's into sectionsColumnsDropList for the drag & drop.
2054
+ this.layoutBuilderService.sectionsChange$.pipe(this.getDestroyer()).subscribe((sections) => {
2055
+ // Concat all results into one array.
2056
+ const sectionsColumnsDropList = [].concat(...sections.map((section) => {
2057
+ return section.Columns.map((column, index) => this.layoutBuilderService.getSectionColumnKey(section.Key, index.toString()));
2058
+ }));
2059
+ this.layoutBuilderService.setSectionsColumnsDropListChange(sectionsColumnsDropList);
2060
+ });
2061
+ /***********************************************************************************************/
2062
+ /* External Events - for raise to the client
2063
+ /***********************************************************************************************/
2064
+ // For update editor.
2065
+ this.layoutBuilderService.editorChange$.pipe(this.getDestroyer()).subscribe((editor) => {
2066
+ if (editor) {
2067
+ // Init the side bar scroll top to 0.
2068
+ if (this.sideBarComponent) {
2069
+ const sideLayout = this.sideBarComponent.nativeElement.querySelector('.side-layout');
2070
+ sideLayout === null || sideLayout === void 0 ? void 0 : sideLayout.scrollTo(0, 0);
2071
+ }
2072
+ this.currentEditor = editor;
2073
+ this.setLayoutEditorTitle();
2074
+ // Raise event to let the user set the block editor in the UI.
2075
+ this.editorChange.emit(editor);
2076
+ }
2077
+ });
2078
+ this.layoutBuilderService.blockAddedEventSubject$.pipe(this.getDestroyer()).subscribe((event) => {
2079
+ if (event) {
2080
+ this.blockAdded.emit(event);
2081
+ }
2082
+ });
2083
+ this.layoutBuilderService.blocksRemovedEventSubject$.pipe(this.getDestroyer()).subscribe((event) => {
2084
+ if ((event === null || event === void 0 ? void 0 : event.length) > 0) {
2085
+ this.blocksRemoved.emit(event);
2086
+ }
2087
+ });
2088
+ }
2089
+ ngOnInit() {
2090
+ // Get the first translation for load all translations.
2091
+ this.translate.get('LAYOUT_BUILDER.DESKTOP').subscribe((res) => {
2092
+ this.screenTypes = [
2093
+ { key: 'Landscape', value: this.translate.instant('LAYOUT_BUILDER.DESKTOP'), callback: () => this.setScreenWidth('Landscape'), iconName: pepIconDeviceDesktop.name, iconPosition: 'end' },
2094
+ { key: 'Tablet', value: this.translate.instant('LAYOUT_BUILDER.TABLET'), callback: () => this.setScreenWidth('Tablet'), iconName: pepIconDeviceTablet.name, iconPosition: 'end' },
2095
+ { key: 'Phablet', value: this.translate.instant('LAYOUT_BUILDER.MOBILE'), callback: () => this.setScreenWidth('Phablet'), iconName: pepIconDeviceMobile.name, iconPosition: 'end' }
2096
+ ];
2097
+ });
2098
+ this.subscribeEvents();
2099
+ }
2100
+ onResize(event) {
2101
+ this.updateViewportWidth();
2102
+ }
2103
+ togglePreviewMode() {
2104
+ this.layoutBuilderService.changePreviewMode(!this.previewMode);
2105
+ this.updateViewportWidth();
2106
+ }
2107
+ onSidebarStateChange(event) {
2108
+ this.updateViewportWidth();
2109
+ }
2110
+ onLayoutEditorObjectChange(pageEditor) {
2111
+ this.layoutBuilderService.updateLayoutFromEditor(pageEditor);
2112
+ }
2113
+ onSectionEditorObjectChange(sectionEditor) {
2114
+ this.layoutBuilderService.updateSectionFromEditor(sectionEditor);
2115
+ }
2116
+ onNavigateBackFromEditor() {
2117
+ var _a;
2118
+ if (!this.currentEditor || ((_a = this.currentEditor) === null || _a === void 0 ? void 0 : _a.type) === 'layout-builder') {
2119
+ this.backClick.emit();
2120
+ }
2121
+ else {
2122
+ this.layoutBuilderService.navigateBackFromEditor();
2123
+ }
2124
+ }
2125
+ }
2126
+ PepLayoutBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.TranslateService }, { token: LayoutBuilderInternalService }, { token: i1$2.PepAddonService }], target: i0.ɵɵFactoryTarget.Component });
2127
+ PepLayoutBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepLayoutBuilderComponent, selector: "pep-layout-builder", inputs: { availableBlocksForDrag: "availableBlocksForDrag", blocksLimitNumber: "blocksLimitNumber", 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 class=\"title title-lg ellipsis\" [title]=\"currentEditor.title\">\n <span>{{ currentEditor.title }}</span>\n </div>\n </div>\n <div class=\"layout-builder-editor-wrapper\">\n <pep-layout-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 </pep-layout-editor>\n \n <section-editor *ngIf=\"currentEditor.type === 'section'\" \n [hostObject]=\"currentEditor.hostObject\" (hostObjectChange)=\"onSectionEditorObjectChange($event)\"></section-editor>\n \n <div *ngIf=\"currentEditor.type === 'block'\" class=\"layout-builder-editor-container\">\n <ng-content select=\"[block-editor-content]\"></ng-content>\n </div>\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)}}:&nbsp;</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\" classNames=\"pep-spacing-element\" (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:flex;align-items:center}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs{height:100%}.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 .layout-builder-editor-tabs .mat-tab-header-pagination{display:none}.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 .layout-builder-editor-tabs .mat-tab-labels .mat-tab-label{padding:0 var(--pep-spacing-md, .75rem)!important}.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 .layout-builder-editor-tabs .mat-tab-body-wrapper .mat-tab-body.mat-tab-body-active{overflow:unset}.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 .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 .layout-builder-editor-tabs .layout-builder-editor-tab .group-buttons-container .toggle-buttons{width:100%}.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 .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%),.12)}.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: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5$5.PepPageLayoutComponent, selector: "pep-page-layout", inputs: ["addPadding", "showShadow"] }, { kind: "component", type: i6$1.PepSideBarComponent, selector: "pep-side-bar", inputs: ["position", "ignoreResize", "showHeader", "showFooter", "showToggle", "useAsWebComponent"], outputs: ["stateChange"] }, { kind: "component", type: i6.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i8$1.PepGroupButtonsComponent, selector: "pep-group-buttons", inputs: ["viewType", "styleType", "sizeType", "buttons", "buttonsDisabled", "supportUnselect", "selectedButtonKey", "stretch"], outputs: ["buttonClick"] }, { kind: "component", type: PepLayoutEditorComponent, selector: "pep-layout-editor", inputs: ["availableBlocksForDrag", "hostObject"], outputs: ["hostObjectChange"] }, { kind: "component", type: SectionEditorComponent, selector: "section-editor", inputs: ["hostObject"], outputs: ["hostObjectChange"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
2128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderComponent, decorators: [{
2129
+ type: Component,
2130
+ 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 class=\"title title-lg ellipsis\" [title]=\"currentEditor.title\">\n <span>{{ currentEditor.title }}</span>\n </div>\n </div>\n <div class=\"layout-builder-editor-wrapper\">\n <pep-layout-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 </pep-layout-editor>\n \n <section-editor *ngIf=\"currentEditor.type === 'section'\" \n [hostObject]=\"currentEditor.hostObject\" (hostObjectChange)=\"onSectionEditorObjectChange($event)\"></section-editor>\n \n <div *ngIf=\"currentEditor.type === 'block'\" class=\"layout-builder-editor-container\">\n <ng-content select=\"[block-editor-content]\"></ng-content>\n </div>\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)}}:&nbsp;</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\" classNames=\"pep-spacing-element\" (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:flex;align-items:center}.layout-builder-editor-wrapper ::ng-deep .layout-builder-editor-tabs{height:100%}.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 .layout-builder-editor-tabs .mat-tab-header-pagination{display:none}.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 .layout-builder-editor-tabs .mat-tab-labels .mat-tab-label{padding:0 var(--pep-spacing-md, .75rem)!important}.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 .layout-builder-editor-tabs .mat-tab-body-wrapper .mat-tab-body.mat-tab-body-active{overflow:unset}.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 .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 .layout-builder-editor-tabs .layout-builder-editor-tab .group-buttons-container .toggle-buttons{width:100%}.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 .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%),.12)}.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"] }]
2131
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.TranslateService }, { type: LayoutBuilderInternalService }, { type: i1$2.PepAddonService }]; }, propDecorators: { layoutBuilderWrapper: [{
2132
+ type: ViewChild,
2133
+ args: ['layoutBuilderWrapper', { static: true }]
2134
+ }], sideBarComponent: [{
2135
+ type: ViewChild,
2136
+ args: [PepSideBarComponent, { read: ElementRef }]
2137
+ }], availableBlocksForDrag: [{
2138
+ type: Input
2139
+ }], blocksLimitNumber: [{
2140
+ type: Input
2141
+ }], layoutEditorTitle: [{
2142
+ type: Input
2143
+ }], backClick: [{
2144
+ type: Output
2145
+ }], editorChange: [{
2146
+ type: Output
2147
+ }], blockAdded: [{
2148
+ type: Output
2149
+ }], blocksRemoved: [{
2150
+ type: Output
2151
+ }], onResize: [{
2152
+ type: HostListener,
2153
+ args: ['window:resize', ['$event']]
2154
+ }] } });
2155
+
2156
+ class PepLayoutBuilderService {
2157
+ constructor(layoutBuilderInternalService) {
2158
+ this.layoutBuilderInternalService = layoutBuilderInternalService;
2159
+ //
2160
+ }
2161
+ get editMode() {
2162
+ return this.layoutBuilderInternalService.editMode;
2163
+ }
2164
+ get editableState() {
2165
+ return this.layoutBuilderInternalService.editableState;
2166
+ }
2167
+ getCurrentScreenType() {
2168
+ return this.layoutBuilderInternalService.getCurrentScreenType();
2169
+ }
2170
+ getIsHidden(hideIn, currentScreenType) {
2171
+ return (hideIn && (hideIn === null || hideIn === void 0 ? void 0 : hideIn.length) > 0) ? hideIn.some(hi => hi === currentScreenType) : false;
2172
+ }
2173
+ showSkeleton(show) {
2174
+ return this.layoutBuilderInternalService.showSkeleton(show);
2175
+ }
2176
+ }
2177
+ PepLayoutBuilderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderService, deps: [{ token: LayoutBuilderInternalService }], target: i0.ɵɵFactoryTarget.Injectable });
2178
+ PepLayoutBuilderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderService, providedIn: 'root' });
2179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderService, decorators: [{
2180
+ type: Injectable,
2181
+ args: [{
2182
+ providedIn: 'root',
2183
+ }]
2184
+ }], ctorParameters: function () { return [{ type: LayoutBuilderInternalService }]; } });
2185
+
2186
+ class PepLayoutBuilderModule {
2187
+ constructor(pepIconRegistry) {
2188
+ this.pepIconRegistry = pepIconRegistry;
2189
+ this.pepIconRegistry.registerIcons([
2190
+ pepIconDeviceDesktop,
2191
+ pepIconDeviceTablet,
2192
+ pepIconDeviceMobile,
2193
+ ]);
2194
+ }
2195
+ }
2196
+ PepLayoutBuilderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderModule, deps: [{ token: i1$1.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
2197
+ PepLayoutBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderModule, declarations: [PepLayoutBuilderComponent], imports: [CommonModule,
2198
+ DragDropModule,
2199
+ // Material modules,
2200
+ MatCommonModule,
2201
+ MatTabsModule,
2202
+ // ngx-lib modules
2203
+ PepNgxLibModule,
2204
+ PepDialogModule,
2205
+ PepIconModule,
2206
+ PepPageLayoutModule,
2207
+ PepSideBarModule,
2208
+ PepButtonModule,
2209
+ PepCheckboxModule,
2210
+ PepTextboxModule,
2211
+ PepSelectModule,
2212
+ PepSizeDetectorModule,
2213
+ PepGroupButtonsModule,
2214
+ PepSkeletonLoaderModule,
2215
+ PepDraggableItemsModule,
2216
+ PepGroupButtonsSettingsModule,
2217
+ PepHideInModule,
2218
+ PepLayoutModule,
2219
+ PepLayoutEditorModule,
2220
+ SectionEditorModule], exports: [PepLayoutBuilderComponent,
2221
+ PepLayoutModule] });
2222
+ PepLayoutBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderModule, providers: [
2223
+ LayoutBuilderInternalService,
2224
+ PepLayoutBuilderService
2225
+ ], imports: [CommonModule,
2226
+ DragDropModule,
2227
+ // Material modules,
2228
+ MatCommonModule,
2229
+ MatTabsModule,
2230
+ // ngx-lib modules
2231
+ PepNgxLibModule,
2232
+ PepDialogModule,
2233
+ PepIconModule,
2234
+ PepPageLayoutModule,
2235
+ PepSideBarModule,
2236
+ PepButtonModule,
2237
+ PepCheckboxModule,
2238
+ PepTextboxModule,
2239
+ PepSelectModule,
2240
+ PepSizeDetectorModule,
2241
+ PepGroupButtonsModule,
2242
+ PepSkeletonLoaderModule,
2243
+ PepDraggableItemsModule,
2244
+ PepGroupButtonsSettingsModule,
2245
+ PepHideInModule,
2246
+ PepLayoutModule,
2247
+ PepLayoutEditorModule,
2248
+ SectionEditorModule, PepLayoutModule] });
2249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepLayoutBuilderModule, decorators: [{
2250
+ type: NgModule,
2251
+ args: [{
2252
+ declarations: [
2253
+ PepLayoutBuilderComponent,
2254
+ ],
2255
+ imports: [
2256
+ CommonModule,
2257
+ DragDropModule,
2258
+ // Material modules,
2259
+ MatCommonModule,
2260
+ MatTabsModule,
2261
+ // ngx-lib modules
2262
+ PepNgxLibModule,
2263
+ PepDialogModule,
2264
+ PepIconModule,
2265
+ PepPageLayoutModule,
2266
+ PepSideBarModule,
2267
+ PepButtonModule,
2268
+ PepCheckboxModule,
2269
+ PepTextboxModule,
2270
+ PepSelectModule,
2271
+ PepSizeDetectorModule,
2272
+ PepGroupButtonsModule,
2273
+ PepSkeletonLoaderModule,
2274
+ PepDraggableItemsModule,
2275
+ PepGroupButtonsSettingsModule,
2276
+ PepHideInModule,
2277
+ PepLayoutModule,
2278
+ PepLayoutEditorModule,
2279
+ SectionEditorModule,
2280
+ // SectionBlockModule
2281
+ ],
2282
+ exports: [
2283
+ PepLayoutBuilderComponent,
2284
+ PepLayoutModule,
2285
+ ],
2286
+ providers: [
2287
+ LayoutBuilderInternalService,
2288
+ PepLayoutBuilderService
2289
+ ]
2290
+ }]
2291
+ }], ctorParameters: function () { return [{ type: i1$1.PepIconRegistry }]; } });
2292
+
2293
+ // export interface IBlockEditor {
2294
+ // id: string,
2295
+ // [key: string]: any
2296
+ // }
2297
+
2298
+ /*
2299
+ * Public API Surface of ngx-composite-lib/layout-builder
2300
+ */
2301
+
2302
+ /**
2303
+ * Generated bundle index. Do not edit.
2304
+ */
2305
+
2306
+ export { PepLayoutBuilderComponent, PepLayoutBuilderModule, PepLayoutBuilderService, PepLayoutComponent, PepLayoutModule };
2307
+ //# sourceMappingURL=pepperi-addons-ngx-composite-lib-layout-builder.mjs.map