@pepperi-addons/ngx-composite-lib 0.5.0-ng15.1 → 0.5.0-ng16.2

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