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