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