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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (749) hide show
  1. package/address/address.component.d.ts +1 -1
  2. package/attachment/attachment.component.d.ts +1 -1
  3. package/bread-crumbs/bread-crumbs.component.d.ts +1 -1
  4. package/button/button.component.d.ts +1 -1
  5. package/carousel/carousel-item.directive.d.ts +1 -1
  6. package/carousel/carousel.component.d.ts +1 -1
  7. package/checkbox/checkbox.component.d.ts +1 -1
  8. package/chips/chips.component.d.ts +1 -1
  9. package/color/color.component.d.ts +1 -1
  10. package/core/clipboard/clipboard.directive.d.ts +1 -1
  11. package/core/common/directives/auto-width.directive.d.ts +1 -1
  12. package/core/common/directives/button-loader.directive.d.ts +1 -1
  13. package/core/common/directives/data-qa.directive.d.ts +1 -1
  14. package/core/common/directives/div-loader.directive.d.ts +1 -1
  15. package/core/common/directives/prevent-multi-click.directive.d.ts +1 -1
  16. package/core/common/directives/print.directive.d.ts +1 -1
  17. package/core/portal/attach.directive.d.ts +1 -1
  18. package/core/portal/target.directive.d.ts +1 -1
  19. package/date/date.component.d.ts +1 -1
  20. package/dialog/dialog.component.d.ts +1 -1
  21. package/draggable-items/draggable-item/draggable-item.component.d.ts +1 -1
  22. package/draggable-items/draggable-items.component.d.ts +1 -1
  23. package/esm2022/address/address.component.mjs +112 -0
  24. package/{esm2020 → esm2022}/address/address.module.mjs +23 -23
  25. package/{esm2020 → esm2022}/attachment/attachment.component.mjs +65 -61
  26. package/{esm2020 → esm2022}/attachment/attachment.module.mjs +21 -21
  27. package/esm2022/bread-crumbs/bread-crumbs.component.mjs +87 -0
  28. package/esm2022/bread-crumbs/bread-crumbs.model.mjs +10 -0
  29. package/esm2022/bread-crumbs/bread-crumbs.module.mjs +51 -0
  30. package/{esm2020 → esm2022}/button/button.component.mjs +76 -53
  31. package/esm2022/button/button.model.mjs +13 -0
  32. package/{esm2020 → esm2022}/button/button.module.mjs +19 -19
  33. package/esm2022/carousel/carousel-item.directive.mjs +34 -0
  34. package/esm2022/carousel/carousel.component.mjs +765 -0
  35. package/{esm2020 → esm2022}/carousel/carousel.module.mjs +5 -5
  36. package/esm2022/checkbox/checkbox.component.mjs +182 -0
  37. package/esm2022/checkbox/checkbox.module.mjs +64 -0
  38. package/esm2022/chips/chips.component.mjs +187 -0
  39. package/esm2022/chips/chips.module.mjs +82 -0
  40. package/{esm2020 → esm2022}/chips/chips.service.mjs +5 -5
  41. package/esm2022/color/color-picker.component.mjs +229 -0
  42. package/esm2022/color/color.component.mjs +93 -0
  43. package/esm2022/color/color.module.mjs +93 -0
  44. package/{esm2020 → esm2022}/core/clipboard/clipboard.directive.mjs +4 -4
  45. package/{esm2020 → esm2022}/core/clipboard/clipboard.service.mjs +4 -4
  46. package/esm2022/core/common/directives/auto-width.directive.mjs +79 -0
  47. package/esm2022/core/common/directives/base-destroyer.directive.mjs +23 -0
  48. package/esm2022/core/common/directives/button-blur.directive.mjs +25 -0
  49. package/esm2022/core/common/directives/button-loader.directive.mjs +117 -0
  50. package/esm2022/core/common/directives/data-qa.directive.mjs +26 -0
  51. package/esm2022/core/common/directives/div-loader.directive.mjs +67 -0
  52. package/esm2022/core/common/directives/menu-blur.directive.mjs +33 -0
  53. package/esm2022/core/common/directives/prevent-multi-click.directive.mjs +25 -0
  54. package/esm2022/core/common/directives/print.directive.mjs +176 -0
  55. package/esm2022/core/common/model/wapi.model.mjs +247 -0
  56. package/esm2022/core/common/pipes/common-pipes.mjs +180 -0
  57. package/esm2022/core/common/pipes/date-ago.pipe.mjs +47 -0
  58. package/esm2022/core/common/services/addon.service.mjs +234 -0
  59. package/esm2022/core/common/services/color.service.mjs +383 -0
  60. package/esm2022/core/common/services/cookie.service.mjs +156 -0
  61. package/esm2022/core/common/services/data-convertor.service.mjs +139 -0
  62. package/esm2022/core/common/services/file.service.mjs +252 -0
  63. package/{esm2020 → esm2022}/core/common/services/jwt-helper.service.mjs +4 -4
  64. package/esm2022/core/common/services/session.service.mjs +73 -0
  65. package/esm2022/core/common/services/translate.service.mjs +47 -0
  66. package/esm2022/core/common/services/utilities.service.mjs +302 -0
  67. package/esm2022/core/common/services/validator.service.mjs +273 -0
  68. package/esm2022/core/common/services/window-scrolling.service.mjs +38 -0
  69. package/esm2022/core/customization/customization.model.mjs +377 -0
  70. package/esm2022/core/customization/customization.service.mjs +802 -0
  71. package/{esm2020 → esm2022}/core/http/interceptors/error.interceptor.mjs +4 -4
  72. package/esm2022/core/http/interceptors/loader.interceptor.mjs +33 -0
  73. package/{esm2020 → esm2022}/core/http/interceptors/profiler.interceptor.mjs +4 -4
  74. package/esm2022/core/http/services/http.service.mjs +158 -0
  75. package/{esm2020 → esm2022}/core/http/services/loader.service.mjs +6 -6
  76. package/esm2022/core/layout/layout.service.mjs +171 -0
  77. package/esm2022/core/layout/rtl.directive.mjs +50 -0
  78. package/esm2022/core/portal/attach.directive.mjs +30 -0
  79. package/esm2022/core/portal/portal.service.mjs +37 -0
  80. package/esm2022/core/portal/target.directive.mjs +27 -0
  81. package/{esm2020 → esm2022}/core/scroll-to/scroll-to.service.mjs +4 -4
  82. package/esm2022/date/date.component.mjs +345 -0
  83. package/{esm2020 → esm2022}/date/date.model.mjs +7 -7
  84. package/esm2022/date/date.module.mjs +89 -0
  85. package/esm2022/dialog/default-dialog.component.mjs +39 -0
  86. package/esm2022/dialog/dialog.component.mjs +37 -0
  87. package/esm2022/dialog/dialog.model.mjs +41 -0
  88. package/esm2022/dialog/dialog.module.mjs +59 -0
  89. package/esm2022/dialog/dialog.service.mjs +106 -0
  90. package/esm2022/draggable-items/draggable-item/draggable-item.component.mjs +68 -0
  91. package/esm2022/draggable-items/draggable-items.component.mjs +95 -0
  92. package/esm2022/draggable-items/draggable-items.module.mjs +65 -0
  93. package/esm2022/field-title/field-title.component.mjs +46 -0
  94. package/esm2022/field-title/field-title.module.mjs +48 -0
  95. package/{esm2020 → esm2022}/files-uploader/files-uploader.component.mjs +36 -27
  96. package/esm2022/files-uploader/files-uploader.module.mjs +80 -0
  97. package/esm2022/form/field-generator.component.mjs +152 -0
  98. package/esm2022/form/form.component.mjs +1258 -0
  99. package/esm2022/form/form.module.mjs +180 -0
  100. package/esm2022/form/indicators.component.mjs +23 -0
  101. package/esm2022/form/internal-button.component.mjs +188 -0
  102. package/esm2022/form/internal-carusel.component.mjs +126 -0
  103. package/esm2022/form/internal-carusel.service.mjs +34 -0
  104. package/esm2022/form/internal-field-generator.component.mjs +146 -0
  105. package/esm2022/form/internal-form.component.mjs +1236 -0
  106. package/esm2022/form/internal-list.component.mjs +524 -0
  107. package/esm2022/form/internal-menu.component.mjs +62 -0
  108. package/esm2022/form/internal-page.component.mjs +380 -0
  109. package/esm2022/form/internal-page.service.mjs +125 -0
  110. package/esm2022/group-buttons/group-buttons.component.mjs +73 -0
  111. package/esm2022/group-buttons/group-buttons.module.mjs +60 -0
  112. package/esm2022/icon/icon-registry.service.mjs +24 -0
  113. package/esm2022/icon/icon.component.mjs +95 -0
  114. package/{esm2020 → esm2022}/icon/icon.module.mjs +5 -5
  115. package/esm2022/icon/icon.service.mjs +34 -0
  116. package/{esm2020 → esm2022}/image/image.component.mjs +45 -39
  117. package/esm2022/image/image.module.mjs +74 -0
  118. package/esm2022/image/image.service.mjs +53 -0
  119. package/esm2022/images-filmstrip/images-filmstrip.component.mjs +360 -0
  120. package/esm2022/images-filmstrip/images-filmstrip.module.mjs +84 -0
  121. package/esm2022/link/link.component.mjs +324 -0
  122. package/esm2022/link/link.module.mjs +81 -0
  123. package/{esm2020 → esm2022}/link/link.pipes.mjs +4 -4
  124. package/esm2022/list/list-actions.component.mjs +42 -0
  125. package/esm2022/list/list-carousel.component.mjs +110 -0
  126. package/esm2022/list/list-chooser.component.mjs +64 -0
  127. package/esm2022/list/list-pager.component.mjs +126 -0
  128. package/{esm2020 → esm2022}/list/list-sorting.component.mjs +15 -13
  129. package/esm2022/list/list-total.component.mjs +31 -0
  130. package/esm2022/list/list-views.component.mjs +86 -0
  131. package/esm2022/list/list.component.mjs +1394 -0
  132. package/{esm2020 → esm2022}/list/list.model.mjs +4 -1
  133. package/esm2022/list/list.module.mjs +145 -0
  134. package/esm2022/list/list.pipes.mjs +45 -0
  135. package/esm2022/list/virtual-scroller.mjs +1124 -0
  136. package/esm2022/menu/menu-item.component.mjs +111 -0
  137. package/esm2022/menu/menu.component.mjs +218 -0
  138. package/esm2022/menu/menu.model.mjs +23 -0
  139. package/esm2022/menu/menu.module.mjs +60 -0
  140. package/{esm2020 → esm2022}/ngx-lib.module.mjs +65 -65
  141. package/esm2022/page-layout/page-layout.component.mjs +41 -0
  142. package/{esm2020 → esm2022}/page-layout/page-layout.module.mjs +13 -13
  143. package/esm2022/profile-data-views-list/profile-data-view/profile-data-view.component.mjs +48 -0
  144. package/esm2022/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.mjs +82 -0
  145. package/esm2022/profile-data-views-list/profile-data-views-list.component.mjs +131 -0
  146. package/esm2022/profile-data-views-list/profile-data-views-list.module.mjs +89 -0
  147. package/esm2022/quantity-selector/quantity-selector-validation.directive.mjs +53 -0
  148. package/{esm2020 → esm2022}/quantity-selector/quantity-selector.component.mjs +83 -73
  149. package/esm2022/quantity-selector/quantity-selector.module.mjs +83 -0
  150. package/{esm2020 → esm2022}/quantity-selector/quantity-selector.pipes.mjs +4 -4
  151. package/esm2022/query-builder/common/model/type-map.mjs +28 -0
  152. package/esm2022/query-builder/common/services/output-query.service.mjs +118 -0
  153. package/esm2022/query-builder/common/services/query-structure.service.mjs +263 -0
  154. package/esm2022/query-builder/common/services/type-convertor.service.mjs +42 -0
  155. package/esm2022/query-builder/query-builder-item/query-builder-item.component.mjs +134 -0
  156. package/esm2022/query-builder/query-builder-section/query-builder-section.component.mjs +76 -0
  157. package/esm2022/query-builder/query-builder.component.mjs +116 -0
  158. package/esm2022/query-builder/query-builder.module.mjs +71 -0
  159. package/{esm2020 → esm2022}/query-builder/query-builder.service.mjs +4 -4
  160. package/esm2022/remote-loader/addon-block-loader.component.mjs +115 -0
  161. package/esm2022/remote-loader/addon-block-loader.service.mjs +66 -0
  162. package/esm2022/remote-loader/remote-loader-element.component.mjs +179 -0
  163. package/esm2022/remote-loader/remote-loader.component.mjs +120 -0
  164. package/{esm2020 → esm2022}/remote-loader/remote-loader.module.mjs +26 -26
  165. package/esm2022/remote-loader/remote-loader.service.mjs +107 -0
  166. package/{esm2020 → esm2022}/rich-html-textarea/rich-html-textarea.component.mjs +38 -30
  167. package/esm2022/rich-html-textarea/rich-html-textarea.module.mjs +96 -0
  168. package/esm2022/search/search.component.mjs +322 -0
  169. package/esm2022/search/search.module.mjs +71 -0
  170. package/esm2022/select/select.component.mjs +341 -0
  171. package/esm2022/select/select.module.mjs +71 -0
  172. package/esm2022/select-panel/select-panel.component.mjs +161 -0
  173. package/{esm2020 → esm2022}/select-panel/select-panel.module.mjs +31 -31
  174. package/esm2022/separator/separator.component.mjs +65 -0
  175. package/{esm2020 → esm2022}/separator/separator.module.mjs +5 -5
  176. package/esm2022/side-bar/side-bar.component.mjs +141 -0
  177. package/esm2022/side-bar/side-bar.module.mjs +56 -0
  178. package/esm2022/signature/signature-dialog.component.mjs +82 -0
  179. package/{esm2020 → esm2022}/signature/signature.component.mjs +41 -31
  180. package/esm2022/signature/signature.module.mjs +92 -0
  181. package/esm2022/size-detector/size-detector.component.mjs +97 -0
  182. package/{esm2020 → esm2022}/size-detector/size-detector.module.mjs +13 -13
  183. package/esm2022/skeleton-loader/skeleton-loader.component.mjs +46 -0
  184. package/{esm2020 → esm2022}/skeleton-loader/skeleton-loader.module.mjs +7 -7
  185. package/esm2022/slider/slider.component.mjs +105 -0
  186. package/{esm2020 → esm2022}/slider/slider.module.mjs +17 -17
  187. package/esm2022/smart-filters/boolean-filter/boolean-filter.component.mjs +74 -0
  188. package/esm2022/smart-filters/common/filter-actions.component.mjs +28 -0
  189. package/esm2022/smart-filters/common/model/base-filter-component.mjs +307 -0
  190. package/esm2022/smart-filters/common/model/field.mjs +125 -0
  191. package/esm2022/smart-filters/common/model/operator.mjs +287 -0
  192. package/esm2022/smart-filters/date-filter/date-filter.component.mjs +181 -0
  193. package/esm2022/smart-filters/multi-select-filter/multi-select-filter.component.mjs +202 -0
  194. package/esm2022/smart-filters/number-filter/number-filter.component.mjs +133 -0
  195. package/esm2022/smart-filters/smart-filters.component.mjs +143 -0
  196. package/esm2022/smart-filters/smart-filters.module.mjs +159 -0
  197. package/esm2022/smart-filters/text-filter/text-filter.component.mjs +110 -0
  198. package/esm2022/snack-bar/default-snack-bar.component.mjs +31 -0
  199. package/esm2022/snack-bar/snack-bar.component.mjs +28 -0
  200. package/esm2022/snack-bar/snack-bar.model.mjs +9 -0
  201. package/esm2022/snack-bar/snack-bar.module.mjs +63 -0
  202. package/esm2022/snack-bar/snack-bar.service.mjs +62 -0
  203. package/{esm2020 → esm2022}/textarea/textarea.component.mjs +35 -27
  204. package/esm2022/textarea/textarea.module.mjs +83 -0
  205. package/esm2022/textbox/textbox-validation.directive.mjs +96 -0
  206. package/esm2022/textbox/textbox.component.mjs +646 -0
  207. package/esm2022/textbox/textbox.module.mjs +73 -0
  208. package/esm2022/textbox-icon/textbox-icon.component.mjs +50 -0
  209. package/esm2022/textbox-icon/textbox-icon.module.mjs +65 -0
  210. package/esm2022/top-bar/top-bar.component.mjs +127 -0
  211. package/esm2022/top-bar/top-bar.module.mjs +63 -0
  212. package/fesm2022/pepperi-addons-ngx-lib-address.mjs +173 -0
  213. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-address.mjs.map +1 -1
  214. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-attachment.mjs +84 -80
  215. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-attachment.mjs.map +1 -1
  216. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-bread-crumbs.mjs +34 -28
  217. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-bread-crumbs.mjs.map +1 -1
  218. package/fesm2022/pepperi-addons-ngx-lib-button.mjs +227 -0
  219. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-button.mjs.map +1 -1
  220. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-carousel.mjs +76 -55
  221. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-carousel.mjs.map +1 -1
  222. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-checkbox.mjs +54 -48
  223. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-checkbox.mjs.map +1 -1
  224. package/fesm2022/pepperi-addons-ngx-lib-chips.mjs +308 -0
  225. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-chips.mjs.map +1 -1
  226. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-color.mjs +92 -84
  227. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-color.mjs.map +1 -1
  228. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-date.mjs +116 -104
  229. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-date.mjs.map +1 -1
  230. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-dialog.mjs +50 -36
  231. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-dialog.mjs.map +1 -1
  232. package/fesm2022/pepperi-addons-ngx-lib-draggable-items.mjs +229 -0
  233. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-draggable-items.mjs.map +1 -1
  234. package/fesm2022/pepperi-addons-ngx-lib-field-title.mjs +101 -0
  235. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-field-title.mjs.map +1 -1
  236. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-files-uploader.mjs +66 -56
  237. package/fesm2022/pepperi-addons-ngx-lib-files-uploader.mjs.map +1 -0
  238. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-form.mjs +391 -310
  239. package/{fesm2015 → fesm2022}/pepperi-addons-ngx-lib-form.mjs.map +1 -1
  240. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-group-buttons.mjs +38 -35
  241. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-group-buttons.mjs.map +1 -1
  242. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-icon.mjs +23 -18
  243. package/{fesm2015 → fesm2022}/pepperi-addons-ngx-lib-icon.mjs.map +1 -1
  244. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-image.mjs +77 -68
  245. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-image.mjs.map +1 -1
  246. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-images-filmstrip.mjs +83 -60
  247. package/fesm2022/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +1 -0
  248. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-link.mjs +113 -103
  249. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-link.mjs.map +1 -1
  250. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-list.mjs +339 -273
  251. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-list.mjs.map +1 -1
  252. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-menu.mjs +89 -87
  253. package/{fesm2015 → fesm2022}/pepperi-addons-ngx-lib-menu.mjs.map +1 -1
  254. package/{fesm2015 → fesm2022}/pepperi-addons-ngx-lib-page-layout.mjs +23 -17
  255. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-page-layout.mjs.map +1 -1
  256. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-profile-data-views-list.mjs +72 -63
  257. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -1
  258. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-quantity-selector.mjs +125 -110
  259. package/{fesm2015 → fesm2022}/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -1
  260. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-query-builder.mjs +93 -66
  261. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -1
  262. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-remote-loader.mjs +84 -64
  263. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -1
  264. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-rich-html-textarea.mjs +76 -67
  265. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -1
  266. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-search.mjs +85 -79
  267. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-search.mjs.map +1 -1
  268. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-select-panel.mjs +53 -49
  269. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-select-panel.mjs.map +1 -1
  270. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-select.mjs +74 -66
  271. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-select.mjs.map +1 -1
  272. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-separator.mjs +18 -16
  273. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-separator.mjs.map +1 -1
  274. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-side-bar.mjs +44 -38
  275. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-side-bar.mjs.map +1 -1
  276. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-signature.mjs +95 -81
  277. package/fesm2022/pepperi-addons-ngx-lib-signature.mjs.map +1 -0
  278. package/fesm2022/pepperi-addons-ngx-lib-size-detector.mjs +139 -0
  279. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-size-detector.mjs.map +1 -1
  280. package/fesm2022/pepperi-addons-ngx-lib-skeleton-loader.mjs +78 -0
  281. package/{fesm2015 → fesm2022}/pepperi-addons-ngx-lib-skeleton-loader.mjs.map +1 -1
  282. package/fesm2022/pepperi-addons-ngx-lib-slider.mjs +154 -0
  283. package/fesm2022/pepperi-addons-ngx-lib-slider.mjs.map +1 -0
  284. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-smart-filters.mjs +186 -158
  285. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -1
  286. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-snack-bar.mjs +42 -34
  287. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-snack-bar.mjs.map +1 -1
  288. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-textarea.mjs +67 -58
  289. package/{fesm2015 → fesm2022}/pepperi-addons-ngx-lib-textarea.mjs.map +1 -1
  290. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-textbox-icon.mjs +28 -25
  291. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-textbox-icon.mjs.map +1 -1
  292. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-textbox.mjs +156 -144
  293. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-textbox.mjs.map +1 -1
  294. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-top-bar.mjs +48 -32
  295. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib-top-bar.mjs.map +1 -1
  296. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib.mjs +661 -449
  297. package/{fesm2020 → fesm2022}/pepperi-addons-ngx-lib.mjs.map +1 -1
  298. package/field-title/field-title.component.d.ts +1 -1
  299. package/files-uploader/files-uploader.component.d.ts +1 -1
  300. package/form/field-generator.component.d.ts +1 -1
  301. package/form/form.component.d.ts +1 -1
  302. package/form/form.module.d.ts +2 -2
  303. package/form/indicators.component.d.ts +1 -1
  304. package/form/internal-button.component.d.ts +1 -1
  305. package/form/internal-carusel.component.d.ts +1 -1
  306. package/form/internal-field-generator.component.d.ts +1 -1
  307. package/form/internal-form.component.d.ts +1 -1
  308. package/form/internal-list.component.d.ts +1 -1
  309. package/form/internal-menu.component.d.ts +1 -1
  310. package/form/internal-page.component.d.ts +1 -1
  311. package/group-buttons/group-buttons.component.d.ts +1 -1
  312. package/icon/icon.component.d.ts +1 -1
  313. package/image/image.component.d.ts +1 -1
  314. package/images-filmstrip/images-filmstrip.component.d.ts +1 -1
  315. package/link/link.component.d.ts +1 -1
  316. package/list/list-actions.component.d.ts +1 -1
  317. package/list/list-carousel.component.d.ts +1 -1
  318. package/list/list-chooser.component.d.ts +1 -1
  319. package/list/list-pager.component.d.ts +1 -1
  320. package/list/list-sorting.component.d.ts +1 -1
  321. package/list/list-total.component.d.ts +1 -1
  322. package/list/list-views.component.d.ts +1 -1
  323. package/list/list.component.d.ts +1 -1
  324. package/list/virtual-scroller.d.ts +1 -1
  325. package/menu/menu-item.component.d.ts +1 -1
  326. package/menu/menu.component.d.ts +1 -1
  327. package/package.json +145 -235
  328. package/page-layout/page-layout.component.d.ts +1 -1
  329. package/profile-data-views-list/profile-data-view/profile-data-view.component.d.ts +1 -1
  330. package/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.d.ts +1 -1
  331. package/profile-data-views-list/profile-data-views-list.component.d.ts +1 -1
  332. package/quantity-selector/quantity-selector-validation.directive.d.ts +1 -1
  333. package/quantity-selector/quantity-selector.component.d.ts +1 -1
  334. package/query-builder/query-builder-item/query-builder-item.component.d.ts +1 -1
  335. package/query-builder/query-builder-section/query-builder-section.component.d.ts +1 -1
  336. package/query-builder/query-builder.component.d.ts +1 -1
  337. package/remote-loader/addon-block-loader.component.d.ts +1 -1
  338. package/remote-loader/remote-loader-element.component.d.ts +1 -1
  339. package/remote-loader/remote-loader.component.d.ts +1 -1
  340. package/rich-html-textarea/rich-html-textarea.component.d.ts +1 -1
  341. package/search/search.component.d.ts +1 -1
  342. package/select/select.component.d.ts +1 -1
  343. package/select-panel/select-panel.component.d.ts +1 -1
  344. package/separator/separator.component.d.ts +1 -1
  345. package/side-bar/side-bar.component.d.ts +1 -1
  346. package/signature/signature-dialog.component.d.ts +2 -2
  347. package/signature/signature.component.d.ts +1 -1
  348. package/signature/signature.module.d.ts +2 -2
  349. package/size-detector/size-detector.component.d.ts +1 -1
  350. package/skeleton-loader/skeleton-loader.component.d.ts +1 -1
  351. package/slider/slider.component.d.ts +1 -1
  352. package/slider/slider.component.theme.scss +13 -6
  353. package/smart-filters/boolean-filter/boolean-filter.component.d.ts +1 -1
  354. package/smart-filters/common/filter-actions.component.d.ts +1 -1
  355. package/smart-filters/common/model/base-filter-component.d.ts +1 -1
  356. package/smart-filters/smart-filters.component.d.ts +1 -1
  357. package/snack-bar/snack-bar.component.d.ts +1 -1
  358. package/textarea/textarea.component.d.ts +1 -1
  359. package/textbox/textbox-validation.directive.d.ts +1 -1
  360. package/textbox/textbox.component.d.ts +1 -1
  361. package/textbox-icon/textbox-icon.component.d.ts +1 -1
  362. package/top-bar/top-bar.component.d.ts +1 -1
  363. package/esm2020/address/address.component.mjs +0 -109
  364. package/esm2020/bread-crumbs/bread-crumbs.component.mjs +0 -85
  365. package/esm2020/bread-crumbs/bread-crumbs.model.mjs +0 -7
  366. package/esm2020/bread-crumbs/bread-crumbs.module.mjs +0 -50
  367. package/esm2020/button/button.model.mjs +0 -6
  368. package/esm2020/carousel/carousel-item.directive.mjs +0 -33
  369. package/esm2020/carousel/carousel.component.mjs +0 -745
  370. package/esm2020/checkbox/checkbox.component.mjs +0 -177
  371. package/esm2020/checkbox/checkbox.module.mjs +0 -63
  372. package/esm2020/chips/chips.component.mjs +0 -185
  373. package/esm2020/chips/chips.module.mjs +0 -81
  374. package/esm2020/color/color-picker.component.mjs +0 -224
  375. package/esm2020/color/color.component.mjs +0 -90
  376. package/esm2020/color/color.module.mjs +0 -93
  377. package/esm2020/core/common/directives/auto-width.directive.mjs +0 -77
  378. package/esm2020/core/common/directives/base-destroyer.directive.mjs +0 -22
  379. package/esm2020/core/common/directives/button-blur.directive.mjs +0 -24
  380. package/esm2020/core/common/directives/button-loader.directive.mjs +0 -112
  381. package/esm2020/core/common/directives/data-qa.directive.mjs +0 -23
  382. package/esm2020/core/common/directives/div-loader.directive.mjs +0 -61
  383. package/esm2020/core/common/directives/menu-blur.directive.mjs +0 -32
  384. package/esm2020/core/common/directives/prevent-multi-click.directive.mjs +0 -27
  385. package/esm2020/core/common/directives/print.directive.mjs +0 -170
  386. package/esm2020/core/common/model/wapi.model.mjs +0 -157
  387. package/esm2020/core/common/pipes/common-pipes.mjs +0 -177
  388. package/esm2020/core/common/pipes/date-ago.pipe.mjs +0 -46
  389. package/esm2020/core/common/services/addon.service.mjs +0 -227
  390. package/esm2020/core/common/services/color.service.mjs +0 -385
  391. package/esm2020/core/common/services/cookie.service.mjs +0 -153
  392. package/esm2020/core/common/services/data-convertor.service.mjs +0 -122
  393. package/esm2020/core/common/services/file.service.mjs +0 -250
  394. package/esm2020/core/common/services/session.service.mjs +0 -72
  395. package/esm2020/core/common/services/translate.service.mjs +0 -46
  396. package/esm2020/core/common/services/utilities.service.mjs +0 -301
  397. package/esm2020/core/common/services/validator.service.mjs +0 -272
  398. package/esm2020/core/common/services/window-scrolling.service.mjs +0 -36
  399. package/esm2020/core/customization/customization.model.mjs +0 -338
  400. package/esm2020/core/customization/customization.service.mjs +0 -799
  401. package/esm2020/core/http/interceptors/loader.interceptor.mjs +0 -32
  402. package/esm2020/core/http/services/http.service.mjs +0 -155
  403. package/esm2020/core/layout/layout.service.mjs +0 -168
  404. package/esm2020/core/layout/rtl.directive.mjs +0 -44
  405. package/esm2020/core/portal/attach.directive.mjs +0 -27
  406. package/esm2020/core/portal/portal.service.mjs +0 -36
  407. package/esm2020/core/portal/target.directive.mjs +0 -24
  408. package/esm2020/date/date.component.mjs +0 -334
  409. package/esm2020/date/date.module.mjs +0 -88
  410. package/esm2020/dialog/default-dialog.component.mjs +0 -37
  411. package/esm2020/dialog/dialog.component.mjs +0 -36
  412. package/esm2020/dialog/dialog.model.mjs +0 -33
  413. package/esm2020/dialog/dialog.module.mjs +0 -59
  414. package/esm2020/dialog/dialog.service.mjs +0 -103
  415. package/esm2020/draggable-items/draggable-item/draggable-item.component.mjs +0 -67
  416. package/esm2020/draggable-items/draggable-items.component.mjs +0 -94
  417. package/esm2020/draggable-items/draggable-items.module.mjs +0 -64
  418. package/esm2020/field-title/field-title.component.mjs +0 -48
  419. package/esm2020/field-title/field-title.module.mjs +0 -47
  420. package/esm2020/files-uploader/files-uploader.module.mjs +0 -79
  421. package/esm2020/form/field-generator.component.mjs +0 -152
  422. package/esm2020/form/form.component.mjs +0 -1240
  423. package/esm2020/form/form.module.mjs +0 -179
  424. package/esm2020/form/indicators.component.mjs +0 -23
  425. package/esm2020/form/internal-button.component.mjs +0 -184
  426. package/esm2020/form/internal-carusel.component.mjs +0 -121
  427. package/esm2020/form/internal-carusel.service.mjs +0 -32
  428. package/esm2020/form/internal-field-generator.component.mjs +0 -146
  429. package/esm2020/form/internal-form.component.mjs +0 -1218
  430. package/esm2020/form/internal-list.component.mjs +0 -513
  431. package/esm2020/form/internal-menu.component.mjs +0 -64
  432. package/esm2020/form/internal-page.component.mjs +0 -361
  433. package/esm2020/form/internal-page.service.mjs +0 -120
  434. package/esm2020/group-buttons/group-buttons.component.mjs +0 -71
  435. package/esm2020/group-buttons/group-buttons.module.mjs +0 -59
  436. package/esm2020/icon/icon-registry.service.mjs +0 -26
  437. package/esm2020/icon/icon.component.mjs +0 -91
  438. package/esm2020/icon/icon.service.mjs +0 -31
  439. package/esm2020/image/image.module.mjs +0 -74
  440. package/esm2020/image/image.service.mjs +0 -50
  441. package/esm2020/images-filmstrip/images-filmstrip.component.mjs +0 -338
  442. package/esm2020/images-filmstrip/images-filmstrip.module.mjs +0 -83
  443. package/esm2020/link/link.component.mjs +0 -315
  444. package/esm2020/link/link.module.mjs +0 -80
  445. package/esm2020/list/list-actions.component.mjs +0 -44
  446. package/esm2020/list/list-carousel.component.mjs +0 -107
  447. package/esm2020/list/list-chooser.component.mjs +0 -64
  448. package/esm2020/list/list-pager.component.mjs +0 -120
  449. package/esm2020/list/list-total.component.mjs +0 -33
  450. package/esm2020/list/list-views.component.mjs +0 -85
  451. package/esm2020/list/list.component.mjs +0 -1382
  452. package/esm2020/list/list.module.mjs +0 -144
  453. package/esm2020/list/list.pipes.mjs +0 -47
  454. package/esm2020/list/virtual-scroller.mjs +0 -1080
  455. package/esm2020/menu/menu-item.component.mjs +0 -115
  456. package/esm2020/menu/menu.component.mjs +0 -216
  457. package/esm2020/menu/menu.model.mjs +0 -20
  458. package/esm2020/menu/menu.module.mjs +0 -59
  459. package/esm2020/page-layout/page-layout.component.mjs +0 -35
  460. package/esm2020/profile-data-views-list/profile-data-view/profile-data-view.component.mjs +0 -45
  461. package/esm2020/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.mjs +0 -81
  462. package/esm2020/profile-data-views-list/profile-data-views-list.component.mjs +0 -127
  463. package/esm2020/profile-data-views-list/profile-data-views-list.module.mjs +0 -88
  464. package/esm2020/quantity-selector/quantity-selector-validation.directive.mjs +0 -49
  465. package/esm2020/quantity-selector/quantity-selector.module.mjs +0 -82
  466. package/esm2020/query-builder/common/model/type-map.mjs +0 -27
  467. package/esm2020/query-builder/common/services/output-query.service.mjs +0 -116
  468. package/esm2020/query-builder/common/services/query-structure.service.mjs +0 -258
  469. package/esm2020/query-builder/common/services/type-convertor.service.mjs +0 -42
  470. package/esm2020/query-builder/query-builder-item/query-builder-item.component.mjs +0 -127
  471. package/esm2020/query-builder/query-builder-section/query-builder-section.component.mjs +0 -71
  472. package/esm2020/query-builder/query-builder.component.mjs +0 -110
  473. package/esm2020/query-builder/query-builder.module.mjs +0 -70
  474. package/esm2020/remote-loader/addon-block-loader.component.mjs +0 -112
  475. package/esm2020/remote-loader/addon-block-loader.service.mjs +0 -65
  476. package/esm2020/remote-loader/remote-loader-element.component.mjs +0 -171
  477. package/esm2020/remote-loader/remote-loader.component.mjs +0 -115
  478. package/esm2020/remote-loader/remote-loader.service.mjs +0 -104
  479. package/esm2020/rich-html-textarea/rich-html-textarea.module.mjs +0 -95
  480. package/esm2020/search/search.component.mjs +0 -317
  481. package/esm2020/search/search.module.mjs +0 -70
  482. package/esm2020/select/select.component.mjs +0 -334
  483. package/esm2020/select/select.module.mjs +0 -70
  484. package/esm2020/select-panel/select-panel.component.mjs +0 -157
  485. package/esm2020/separator/separator.component.mjs +0 -63
  486. package/esm2020/side-bar/side-bar.component.mjs +0 -136
  487. package/esm2020/side-bar/side-bar.module.mjs +0 -55
  488. package/esm2020/signature/signature-dialog.component.mjs +0 -79
  489. package/esm2020/signature/signature.module.mjs +0 -91
  490. package/esm2020/size-detector/size-detector.component.mjs +0 -94
  491. package/esm2020/skeleton-loader/skeleton-loader.component.mjs +0 -44
  492. package/esm2020/slider/slider.component.mjs +0 -101
  493. package/esm2020/smart-filters/boolean-filter/boolean-filter.component.mjs +0 -75
  494. package/esm2020/smart-filters/common/filter-actions.component.mjs +0 -29
  495. package/esm2020/smart-filters/common/model/base-filter-component.mjs +0 -290
  496. package/esm2020/smart-filters/common/model/field.mjs +0 -117
  497. package/esm2020/smart-filters/common/model/operator.mjs +0 -280
  498. package/esm2020/smart-filters/date-filter/date-filter.component.mjs +0 -182
  499. package/esm2020/smart-filters/multi-select-filter/multi-select-filter.component.mjs +0 -200
  500. package/esm2020/smart-filters/number-filter/number-filter.component.mjs +0 -136
  501. package/esm2020/smart-filters/smart-filters.component.mjs +0 -141
  502. package/esm2020/smart-filters/smart-filters.module.mjs +0 -158
  503. package/esm2020/smart-filters/text-filter/text-filter.component.mjs +0 -113
  504. package/esm2020/snack-bar/default-snack-bar.component.mjs +0 -29
  505. package/esm2020/snack-bar/snack-bar.component.mjs +0 -26
  506. package/esm2020/snack-bar/snack-bar.model.mjs +0 -7
  507. package/esm2020/snack-bar/snack-bar.module.mjs +0 -63
  508. package/esm2020/snack-bar/snack-bar.service.mjs +0 -60
  509. package/esm2020/textarea/textarea.module.mjs +0 -82
  510. package/esm2020/textbox/textbox-validation.directive.mjs +0 -93
  511. package/esm2020/textbox/textbox.component.mjs +0 -638
  512. package/esm2020/textbox/textbox.module.mjs +0 -72
  513. package/esm2020/textbox-icon/textbox-icon.component.mjs +0 -48
  514. package/esm2020/textbox-icon/textbox-icon.module.mjs +0 -64
  515. package/esm2020/top-bar/top-bar.component.mjs +0 -112
  516. package/esm2020/top-bar/top-bar.module.mjs +0 -62
  517. package/fesm2015/pepperi-addons-ngx-lib-address.mjs +0 -170
  518. package/fesm2015/pepperi-addons-ngx-lib-address.mjs.map +0 -1
  519. package/fesm2015/pepperi-addons-ngx-lib-attachment.mjs +0 -306
  520. package/fesm2015/pepperi-addons-ngx-lib-attachment.mjs.map +0 -1
  521. package/fesm2015/pepperi-addons-ngx-lib-bread-crumbs.mjs +0 -147
  522. package/fesm2015/pepperi-addons-ngx-lib-bread-crumbs.mjs.map +0 -1
  523. package/fesm2015/pepperi-addons-ngx-lib-button.mjs +0 -197
  524. package/fesm2015/pepperi-addons-ngx-lib-button.mjs.map +0 -1
  525. package/fesm2015/pepperi-addons-ngx-lib-carousel.mjs +0 -804
  526. package/fesm2015/pepperi-addons-ngx-lib-carousel.mjs.map +0 -1
  527. package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs +0 -246
  528. package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs.map +0 -1
  529. package/fesm2015/pepperi-addons-ngx-lib-chips.mjs +0 -306
  530. package/fesm2015/pepperi-addons-ngx-lib-chips.mjs.map +0 -1
  531. package/fesm2015/pepperi-addons-ngx-lib-color.mjs +0 -404
  532. package/fesm2015/pepperi-addons-ngx-lib-color.mjs.map +0 -1
  533. package/fesm2015/pepperi-addons-ngx-lib-date.mjs +0 -481
  534. package/fesm2015/pepperi-addons-ngx-lib-date.mjs.map +0 -1
  535. package/fesm2015/pepperi-addons-ngx-lib-dialog.mjs +0 -263
  536. package/fesm2015/pepperi-addons-ngx-lib-dialog.mjs.map +0 -1
  537. package/fesm2015/pepperi-addons-ngx-lib-draggable-items.mjs +0 -227
  538. package/fesm2015/pepperi-addons-ngx-lib-draggable-items.mjs.map +0 -1
  539. package/fesm2015/pepperi-addons-ngx-lib-field-title.mjs +0 -102
  540. package/fesm2015/pepperi-addons-ngx-lib-field-title.mjs.map +0 -1
  541. package/fesm2015/pepperi-addons-ngx-lib-files-uploader.mjs +0 -331
  542. package/fesm2015/pepperi-addons-ngx-lib-files-uploader.mjs.map +0 -1
  543. package/fesm2015/pepperi-addons-ngx-lib-form.mjs +0 -4232
  544. package/fesm2015/pepperi-addons-ngx-lib-group-buttons.mjs +0 -136
  545. package/fesm2015/pepperi-addons-ngx-lib-group-buttons.mjs.map +0 -1
  546. package/fesm2015/pepperi-addons-ngx-lib-icon.mjs +0 -741
  547. package/fesm2015/pepperi-addons-ngx-lib-image.mjs +0 -397
  548. package/fesm2015/pepperi-addons-ngx-lib-image.mjs.map +0 -1
  549. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs +0 -426
  550. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +0 -1
  551. package/fesm2015/pepperi-addons-ngx-lib-link.mjs +0 -414
  552. package/fesm2015/pepperi-addons-ngx-lib-link.mjs.map +0 -1
  553. package/fesm2015/pepperi-addons-ngx-lib-list.mjs +0 -3131
  554. package/fesm2015/pepperi-addons-ngx-lib-list.mjs.map +0 -1
  555. package/fesm2015/pepperi-addons-ngx-lib-menu.mjs +0 -403
  556. package/fesm2015/pepperi-addons-ngx-lib-page-layout.mjs.map +0 -1
  557. package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs +0 -337
  558. package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +0 -1
  559. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs +0 -741
  560. package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs +0 -1226
  561. package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs.map +0 -1
  562. package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs +0 -644
  563. package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs.map +0 -1
  564. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs +0 -363
  565. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +0 -1
  566. package/fesm2015/pepperi-addons-ngx-lib-search.mjs +0 -393
  567. package/fesm2015/pepperi-addons-ngx-lib-search.mjs.map +0 -1
  568. package/fesm2015/pepperi-addons-ngx-lib-select-panel.mjs +0 -235
  569. package/fesm2015/pepperi-addons-ngx-lib-select-panel.mjs.map +0 -1
  570. package/fesm2015/pepperi-addons-ngx-lib-select.mjs +0 -410
  571. package/fesm2015/pepperi-addons-ngx-lib-select.mjs.map +0 -1
  572. package/fesm2015/pepperi-addons-ngx-lib-separator.mjs +0 -89
  573. package/fesm2015/pepperi-addons-ngx-lib-separator.mjs.map +0 -1
  574. package/fesm2015/pepperi-addons-ngx-lib-side-bar.mjs +0 -196
  575. package/fesm2015/pepperi-addons-ngx-lib-side-bar.mjs.map +0 -1
  576. package/fesm2015/pepperi-addons-ngx-lib-signature.mjs +0 -464
  577. package/fesm2015/pepperi-addons-ngx-lib-signature.mjs.map +0 -1
  578. package/fesm2015/pepperi-addons-ngx-lib-size-detector.mjs +0 -136
  579. package/fesm2015/pepperi-addons-ngx-lib-size-detector.mjs.map +0 -1
  580. package/fesm2015/pepperi-addons-ngx-lib-skeleton-loader.mjs +0 -78
  581. package/fesm2015/pepperi-addons-ngx-lib-slider.mjs +0 -151
  582. package/fesm2015/pepperi-addons-ngx-lib-slider.mjs.map +0 -1
  583. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs +0 -1731
  584. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs.map +0 -1
  585. package/fesm2015/pepperi-addons-ngx-lib-snack-bar.mjs +0 -183
  586. package/fesm2015/pepperi-addons-ngx-lib-snack-bar.mjs.map +0 -1
  587. package/fesm2015/pepperi-addons-ngx-lib-textarea.mjs +0 -286
  588. package/fesm2015/pepperi-addons-ngx-lib-textbox-icon.mjs +0 -118
  589. package/fesm2015/pepperi-addons-ngx-lib-textbox-icon.mjs.map +0 -1
  590. package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs +0 -806
  591. package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs.map +0 -1
  592. package/fesm2015/pepperi-addons-ngx-lib-top-bar.mjs +0 -180
  593. package/fesm2015/pepperi-addons-ngx-lib-top-bar.mjs.map +0 -1
  594. package/fesm2015/pepperi-addons-ngx-lib.mjs +0 -4995
  595. package/fesm2015/pepperi-addons-ngx-lib.mjs.map +0 -1
  596. package/fesm2020/pepperi-addons-ngx-lib-address.mjs +0 -170
  597. package/fesm2020/pepperi-addons-ngx-lib-button.mjs +0 -197
  598. package/fesm2020/pepperi-addons-ngx-lib-chips.mjs +0 -305
  599. package/fesm2020/pepperi-addons-ngx-lib-draggable-items.mjs +0 -226
  600. package/fesm2020/pepperi-addons-ngx-lib-field-title.mjs +0 -102
  601. package/fesm2020/pepperi-addons-ngx-lib-files-uploader.mjs.map +0 -1
  602. package/fesm2020/pepperi-addons-ngx-lib-form.mjs.map +0 -1
  603. package/fesm2020/pepperi-addons-ngx-lib-icon.mjs.map +0 -1
  604. package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +0 -1
  605. package/fesm2020/pepperi-addons-ngx-lib-menu.mjs.map +0 -1
  606. package/fesm2020/pepperi-addons-ngx-lib-page-layout.mjs +0 -77
  607. package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs.map +0 -1
  608. package/fesm2020/pepperi-addons-ngx-lib-signature.mjs.map +0 -1
  609. package/fesm2020/pepperi-addons-ngx-lib-size-detector.mjs +0 -136
  610. package/fesm2020/pepperi-addons-ngx-lib-skeleton-loader.mjs +0 -76
  611. package/fesm2020/pepperi-addons-ngx-lib-skeleton-loader.mjs.map +0 -1
  612. package/fesm2020/pepperi-addons-ngx-lib-slider.mjs +0 -150
  613. package/fesm2020/pepperi-addons-ngx-lib-slider.mjs.map +0 -1
  614. package/fesm2020/pepperi-addons-ngx-lib-textarea.mjs.map +0 -1
  615. /package/{esm2020 → esm2022}/address/pepperi-addons-ngx-lib-address.mjs +0 -0
  616. /package/{esm2020 → esm2022}/address/public-api.mjs +0 -0
  617. /package/{esm2020 → esm2022}/attachment/pepperi-addons-ngx-lib-attachment.mjs +0 -0
  618. /package/{esm2020 → esm2022}/attachment/public-api.mjs +0 -0
  619. /package/{esm2020 → esm2022}/bread-crumbs/pepperi-addons-ngx-lib-bread-crumbs.mjs +0 -0
  620. /package/{esm2020 → esm2022}/bread-crumbs/public-api.mjs +0 -0
  621. /package/{esm2020 → esm2022}/button/pepperi-addons-ngx-lib-button.mjs +0 -0
  622. /package/{esm2020 → esm2022}/button/public-api.mjs +0 -0
  623. /package/{esm2020 → esm2022}/carousel/pepperi-addons-ngx-lib-carousel.mjs +0 -0
  624. /package/{esm2020 → esm2022}/carousel/public-api.mjs +0 -0
  625. /package/{esm2020 → esm2022}/checkbox/pepperi-addons-ngx-lib-checkbox.mjs +0 -0
  626. /package/{esm2020 → esm2022}/checkbox/public-api.mjs +0 -0
  627. /package/{esm2020 → esm2022}/chips/chips.model.mjs +0 -0
  628. /package/{esm2020 → esm2022}/chips/pepperi-addons-ngx-lib-chips.mjs +0 -0
  629. /package/{esm2020 → esm2022}/chips/public-api.mjs +0 -0
  630. /package/{esm2020 → esm2022}/color/color.model.mjs +0 -0
  631. /package/{esm2020 → esm2022}/color/pepperi-addons-ngx-lib-color.mjs +0 -0
  632. /package/{esm2020 → esm2022}/color/public-api.mjs +0 -0
  633. /package/{esm2020 → esm2022}/core/clipboard/index.mjs +0 -0
  634. /package/{esm2020 → esm2022}/core/clipboard/public-api.mjs +0 -0
  635. /package/{esm2020 → esm2022}/core/common/directives/index.mjs +0 -0
  636. /package/{esm2020 → esm2022}/core/common/directives/public-api.mjs +0 -0
  637. /package/{esm2020 → esm2022}/core/common/index.mjs +0 -0
  638. /package/{esm2020 → esm2022}/core/common/model/index.mjs +0 -0
  639. /package/{esm2020 → esm2022}/core/common/model/papi.model.mjs +0 -0
  640. /package/{esm2020 → esm2022}/core/common/model/public-api.mjs +0 -0
  641. /package/{esm2020 → esm2022}/core/common/model/utilities.model.mjs +0 -0
  642. /package/{esm2020 → esm2022}/core/common/pipes/index.mjs +0 -0
  643. /package/{esm2020 → esm2022}/core/common/pipes/public-api.mjs +0 -0
  644. /package/{esm2020 → esm2022}/core/common/public-api.mjs +0 -0
  645. /package/{esm2020 → esm2022}/core/common/services/index.mjs +0 -0
  646. /package/{esm2020 → esm2022}/core/common/services/public-api.mjs +0 -0
  647. /package/{esm2020 → esm2022}/core/customization/index.mjs +0 -0
  648. /package/{esm2020 → esm2022}/core/customization/public-api.mjs +0 -0
  649. /package/{esm2020 → esm2022}/core/http/index.mjs +0 -0
  650. /package/{esm2020 → esm2022}/core/http/interceptors/index.mjs +0 -0
  651. /package/{esm2020 → esm2022}/core/http/public-api.mjs +0 -0
  652. /package/{esm2020 → esm2022}/core/index.mjs +0 -0
  653. /package/{esm2020 → esm2022}/core/layout/index.mjs +0 -0
  654. /package/{esm2020 → esm2022}/core/layout/public-api.mjs +0 -0
  655. /package/{esm2020 → esm2022}/core/portal/index.mjs +0 -0
  656. /package/{esm2020 → esm2022}/core/portal/public-api.mjs +0 -0
  657. /package/{esm2020 → esm2022}/core/public-api.mjs +0 -0
  658. /package/{esm2020 → esm2022}/core/scroll-to/index.mjs +0 -0
  659. /package/{esm2020 → esm2022}/core/scroll-to/public-api.mjs +0 -0
  660. /package/{esm2020 → esm2022}/date/pepperi-addons-ngx-lib-date.mjs +0 -0
  661. /package/{esm2020 → esm2022}/date/public-api.mjs +0 -0
  662. /package/{esm2020 → esm2022}/dialog/pepperi-addons-ngx-lib-dialog.mjs +0 -0
  663. /package/{esm2020 → esm2022}/dialog/public-api.mjs +0 -0
  664. /package/{esm2020 → esm2022}/draggable-items/draggable-items.model.mjs +0 -0
  665. /package/{esm2020 → esm2022}/draggable-items/pepperi-addons-ngx-lib-draggable-items.mjs +0 -0
  666. /package/{esm2020 → esm2022}/draggable-items/public-api.mjs +0 -0
  667. /package/{esm2020 → esm2022}/field-title/pepperi-addons-ngx-lib-field-title.mjs +0 -0
  668. /package/{esm2020 → esm2022}/field-title/public-api.mjs +0 -0
  669. /package/{esm2020 → esm2022}/files-uploader/pepperi-addons-ngx-lib-files-uploader.mjs +0 -0
  670. /package/{esm2020 → esm2022}/files-uploader/public-api.mjs +0 -0
  671. /package/{esm2020 → esm2022}/form/form.model.mjs +0 -0
  672. /package/{esm2020 → esm2022}/form/pepperi-addons-ngx-lib-form.mjs +0 -0
  673. /package/{esm2020 → esm2022}/form/public-api.mjs +0 -0
  674. /package/{esm2020 → esm2022}/group-buttons/pepperi-addons-ngx-lib-group-buttons.mjs +0 -0
  675. /package/{esm2020 → esm2022}/group-buttons/public-api.mjs +0 -0
  676. /package/{esm2020 → esm2022}/icon/icon-generated-all.model.mjs +0 -0
  677. /package/{esm2020 → esm2022}/icon/icon-generated.model.mjs +0 -0
  678. /package/{esm2020 → esm2022}/icon/pepperi-addons-ngx-lib-icon.mjs +0 -0
  679. /package/{esm2020 → esm2022}/icon/public-api.mjs +0 -0
  680. /package/{esm2020 → esm2022}/image/pepperi-addons-ngx-lib-image.mjs +0 -0
  681. /package/{esm2020 → esm2022}/image/public-api.mjs +0 -0
  682. /package/{esm2020 → esm2022}/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.mjs +0 -0
  683. /package/{esm2020 → esm2022}/images-filmstrip/public-api.mjs +0 -0
  684. /package/{esm2020 → esm2022}/link/pepperi-addons-ngx-lib-link.mjs +0 -0
  685. /package/{esm2020 → esm2022}/link/public-api.mjs +0 -0
  686. /package/{esm2020 → esm2022}/list/pepperi-addons-ngx-lib-list.mjs +0 -0
  687. /package/{esm2020 → esm2022}/list/public-api.mjs +0 -0
  688. /package/{esm2020 → esm2022}/menu/pepperi-addons-ngx-lib-menu.mjs +0 -0
  689. /package/{esm2020 → esm2022}/menu/public-api.mjs +0 -0
  690. /package/{esm2020 → esm2022}/page-layout/pepperi-addons-ngx-lib-page-layout.mjs +0 -0
  691. /package/{esm2020 → esm2022}/page-layout/public-api.mjs +0 -0
  692. /package/{esm2020 → esm2022}/pepperi-addons-ngx-lib.mjs +0 -0
  693. /package/{esm2020 → esm2022}/profile-data-views-list/pepperi-addons-ngx-lib-profile-data-views-list.mjs +0 -0
  694. /package/{esm2020 → esm2022}/profile-data-views-list/profile-data-views-list.model.mjs +0 -0
  695. /package/{esm2020 → esm2022}/profile-data-views-list/public-api.mjs +0 -0
  696. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
  697. /package/{esm2020 → esm2022}/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.mjs +0 -0
  698. /package/{esm2020 → esm2022}/quantity-selector/public-api.mjs +0 -0
  699. /package/{esm2020 → esm2022}/query-builder/common/model/field.mjs +0 -0
  700. /package/{esm2020 → esm2022}/query-builder/common/model/filter.mjs +0 -0
  701. /package/{esm2020 → esm2022}/query-builder/common/model/legacy.mjs +0 -0
  702. /package/{esm2020 → esm2022}/query-builder/common/model/operator-unit.mjs +0 -0
  703. /package/{esm2020 → esm2022}/query-builder/common/model/operator.mjs +0 -0
  704. /package/{esm2020 → esm2022}/query-builder/common/model/structure.mjs +0 -0
  705. /package/{esm2020 → esm2022}/query-builder/common/model/type.mjs +0 -0
  706. /package/{esm2020 → esm2022}/query-builder/pepperi-addons-ngx-lib-query-builder.mjs +0 -0
  707. /package/{esm2020 → esm2022}/query-builder/public-api.mjs +0 -0
  708. /package/{esm2020 → esm2022}/remote-loader/pepperi-addons-ngx-lib-remote-loader.mjs +0 -0
  709. /package/{esm2020 → esm2022}/remote-loader/public-api.mjs +0 -0
  710. /package/{esm2020 → esm2022}/remote-loader/remote-loader.model.mjs +0 -0
  711. /package/{esm2020 → esm2022}/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.mjs +0 -0
  712. /package/{esm2020 → esm2022}/rich-html-textarea/public-api.mjs +0 -0
  713. /package/{esm2020 → esm2022}/search/pepperi-addons-ngx-lib-search.mjs +0 -0
  714. /package/{esm2020 → esm2022}/search/public-api.mjs +0 -0
  715. /package/{esm2020 → esm2022}/search/search.model.mjs +0 -0
  716. /package/{esm2020 → esm2022}/select/pepperi-addons-ngx-lib-select.mjs +0 -0
  717. /package/{esm2020 → esm2022}/select/public-api.mjs +0 -0
  718. /package/{esm2020 → esm2022}/select-panel/pepperi-addons-ngx-lib-select-panel.mjs +0 -0
  719. /package/{esm2020 → esm2022}/select-panel/public-api.mjs +0 -0
  720. /package/{esm2020 → esm2022}/select-panel/select-panel.model.mjs +0 -0
  721. /package/{esm2020 → esm2022}/separator/pepperi-addons-ngx-lib-separator.mjs +0 -0
  722. /package/{esm2020 → esm2022}/separator/public-api.mjs +0 -0
  723. /package/{esm2020 → esm2022}/side-bar/pepperi-addons-ngx-lib-side-bar.mjs +0 -0
  724. /package/{esm2020 → esm2022}/side-bar/public-api.mjs +0 -0
  725. /package/{esm2020 → esm2022}/side-bar/side-bar.model.mjs +0 -0
  726. /package/{esm2020 → esm2022}/signature/pepperi-addons-ngx-lib-signature.mjs +0 -0
  727. /package/{esm2020 → esm2022}/signature/public-api.mjs +0 -0
  728. /package/{esm2020 → esm2022}/size-detector/pepperi-addons-ngx-lib-size-detector.mjs +0 -0
  729. /package/{esm2020 → esm2022}/size-detector/public-api.mjs +0 -0
  730. /package/{esm2020 → esm2022}/skeleton-loader/pepperi-addons-ngx-lib-skeleton-loader.mjs +0 -0
  731. /package/{esm2020 → esm2022}/skeleton-loader/public-api.mjs +0 -0
  732. /package/{esm2020 → esm2022}/slider/pepperi-addons-ngx-lib-slider.mjs +0 -0
  733. /package/{esm2020 → esm2022}/slider/public-api.mjs +0 -0
  734. /package/{esm2020 → esm2022}/smart-filters/common/model/creator.mjs +0 -0
  735. /package/{esm2020 → esm2022}/smart-filters/common/model/filter.mjs +0 -0
  736. /package/{esm2020 → esm2022}/smart-filters/common/model/type.mjs +0 -0
  737. /package/{esm2020 → esm2022}/smart-filters/pepperi-addons-ngx-lib-smart-filters.mjs +0 -0
  738. /package/{esm2020 → esm2022}/smart-filters/public-api.mjs +0 -0
  739. /package/{esm2020 → esm2022}/snack-bar/pepperi-addons-ngx-lib-snack-bar.mjs +0 -0
  740. /package/{esm2020 → esm2022}/snack-bar/public-api.mjs +0 -0
  741. /package/{esm2020 → esm2022}/textarea/pepperi-addons-ngx-lib-textarea.mjs +0 -0
  742. /package/{esm2020 → esm2022}/textarea/public-api.mjs +0 -0
  743. /package/{esm2020 → esm2022}/textbox/pepperi-addons-ngx-lib-textbox.mjs +0 -0
  744. /package/{esm2020 → esm2022}/textbox/public-api.mjs +0 -0
  745. /package/{esm2020 → esm2022}/textbox-icon/pepperi-addons-ngx-lib-textbox-icon.mjs +0 -0
  746. /package/{esm2020 → esm2022}/textbox-icon/public-api.mjs +0 -0
  747. /package/{esm2020 → esm2022}/top-bar/pepperi-addons-ngx-lib-top-bar.mjs +0 -0
  748. /package/{esm2020 → esm2022}/top-bar/public-api.mjs +0 -0
  749. /package/{esm2020 → esm2022}/top-bar/top-bar.model.mjs +0 -0
@@ -1,4232 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Input, EventEmitter, Output, Injectable, ViewEncapsulation, ViewChild, ViewContainerRef, TemplateRef, NgModule } from '@angular/core';
3
- import * as i5 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i3$1 from '@angular/forms';
6
- import { Validators, ReactiveFormsModule, FormBuilder } from '@angular/forms';
7
- import { MatCommonModule } from '@angular/material/core';
8
- import { MatFormFieldModule } from '@angular/material/form-field';
9
- import * as i4 from '@angular/material/button';
10
- import { MatButtonModule } from '@angular/material/button';
11
- import * as i6$1 from '@angular/material/grid-list';
12
- import { MatGridListModule } from '@angular/material/grid-list';
13
- import * as i5$1 from '@angular/material/icon';
14
- import { MatIconModule } from '@angular/material/icon';
15
- import * as i4$2 from '@angular/material/menu';
16
- import { MatMenuModule } from '@angular/material/menu';
17
- import { SignaturePadModule } from 'ngx-signaturepad';
18
- import * as i1$1 from '@pepperi-addons/ngx-lib';
19
- import { DEFAULT_HORIZONTAL_ALIGNMENT, X_ALIGNMENT_TYPE, DEFAULT_VERTICAL_ALIGNMENT, Y_ALIGNMENT_TYPE, PepTextboxField, PepSelectField, PepInternalMenuField, FIELD_TYPE, PepQuantitySelectorField, PepSeparatorField, PepInternalButtonField, PepCheckboxField, PepDateField, PepRichHtmlTextareaField, PepTextareaField, PepLinkField, PepImagesField, PepImageField, PepSignatureField, PepAttachmentField, PepInternalCaruselField, PepInternalPageField, PepIndicatorsField, PepAddressField, PepCustomizationService, PepPlaceholderField, PepScreenSizeType, PepNgxLibModule } from '@pepperi-addons/ngx-lib';
20
- import * as i1 from '@pepperi-addons/ngx-lib/icon';
21
- import { pepIconSystemBin, pepIconSystemEdit, pepIconSystemMenu, pepIconNumberPlus, pepIconIndicatorDotPlaceholder, PepIconModule } from '@pepperi-addons/ngx-lib/icon';
22
- import * as i1$2 from '@pepperi-addons/ngx-lib/dialog';
23
- import { PepDialogData, PepDialogModule } from '@pepperi-addons/ngx-lib/dialog';
24
- import * as i3$2 from '@pepperi-addons/ngx-lib/address';
25
- import { PepAddressModule } from '@pepperi-addons/ngx-lib/address';
26
- import * as i4$3 from '@pepperi-addons/ngx-lib/attachment';
27
- import { PepAttachmentModule } from '@pepperi-addons/ngx-lib/attachment';
28
- import * as i4$4 from '@pepperi-addons/ngx-lib/button';
29
- import { PepButtonModule } from '@pepperi-addons/ngx-lib/button';
30
- import * as i5$3 from '@pepperi-addons/ngx-lib/carousel';
31
- import { PepCarouselComponent, PepCarouselModule } from '@pepperi-addons/ngx-lib/carousel';
32
- import * as i5$2 from '@pepperi-addons/ngx-lib/checkbox';
33
- import { PepCheckboxModule } from '@pepperi-addons/ngx-lib/checkbox';
34
- import * as i6 from '@pepperi-addons/ngx-lib/date';
35
- import { PepDateModule } from '@pepperi-addons/ngx-lib/date';
36
- import * as i7$1 from '@pepperi-addons/ngx-lib/image';
37
- import { PepImageModule } from '@pepperi-addons/ngx-lib/image';
38
- import * as i8$1 from '@pepperi-addons/ngx-lib/images-filmstrip';
39
- import { PepImagesFilmstripModule } from '@pepperi-addons/ngx-lib/images-filmstrip';
40
- import * as i9 from '@pepperi-addons/ngx-lib/quantity-selector';
41
- import { PepQuantitySelectorComponent, PepQuantitySelectorModule } from '@pepperi-addons/ngx-lib/quantity-selector';
42
- import * as i10 from '@pepperi-addons/ngx-lib/rich-html-textarea';
43
- import { PepRichHtmlTextareaModule } from '@pepperi-addons/ngx-lib/rich-html-textarea';
44
- import * as i11 from '@pepperi-addons/ngx-lib/select';
45
- import { PepSelectModule } from '@pepperi-addons/ngx-lib/select';
46
- import { PepSelectPanelModule } from '@pepperi-addons/ngx-lib/select-panel';
47
- import * as i12 from '@pepperi-addons/ngx-lib/separator';
48
- import { PepSeparatorModule } from '@pepperi-addons/ngx-lib/separator';
49
- import * as i13 from '@pepperi-addons/ngx-lib/signature';
50
- import { PepSignatureModule } from '@pepperi-addons/ngx-lib/signature';
51
- import * as i14 from '@pepperi-addons/ngx-lib/textarea';
52
- import { PepTextareaModule } from '@pepperi-addons/ngx-lib/textarea';
53
- import * as i15 from '@pepperi-addons/ngx-lib/textbox';
54
- import { PepTextboxModule } from '@pepperi-addons/ngx-lib/textbox';
55
- import * as i16 from '@pepperi-addons/ngx-lib/link';
56
- import { PepLinkModule } from '@pepperi-addons/ngx-lib/link';
57
- import * as i7 from '@pepperi-addons/ngx-lib/field-title';
58
- import { PepFieldTitleModule } from '@pepperi-addons/ngx-lib/field-title';
59
- import * as i8 from '@pepperi-addons/ngx-lib/group-buttons';
60
- import { PepGroupButtonsModule } from '@pepperi-addons/ngx-lib/group-buttons';
61
- import { BehaviorSubject, fromEvent } from 'rxjs';
62
- import * as i4$1 from '@ngx-translate/core';
63
- import * as i3 from '@angular/cdk/bidi';
64
- import { debounceTime } from 'rxjs/operators';
65
-
66
- class PepIndicatorsComponent {
67
- constructor() {
68
- this.controlType = 'indicators';
69
- this.layoutType = 'table';
70
- }
71
- }
72
- PepIndicatorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepIndicatorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
73
- PepIndicatorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepIndicatorsComponent, selector: "pep-indicators", inputs: { key: "key", value: "value", layoutType: "layoutType" }, ngImport: i0, template: "<div class=\"indicators-container\" [ngClass]=\"{ 'is-inside-table': layoutType === 'table' }\">\n <ng-container *ngFor=\"let value of value?.split(';')\">\n <pep-icon name=\"indicator_dot_placeholder\" class=\"pull-left flip\" [fill]=\"value\"></pep-icon>\n </ng-container>\n <ng-container *ngIf=\"key != 'ItemIndicatorsWithoutCampaign' && value?.split(';').length < 4\">\n <pep-icon name=\"indicator_dot_placeholder\" class=\"pull-left flip\"></pep-icon>\n </ng-container>\n</div>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.indicators-container{height:2.5rem}.indicators-container pep-icon{height:1rem;width:1rem;margin:.05rem}.indicators-container.is-inside-table{height:1rem;display:flex;justify-content:center;align-items:center}\n", ".indicators-container .svg-icon{fill:hsla(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%),.5)}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepIndicatorsComponent, decorators: [{
75
- type: Component,
76
- args: [{ selector: 'pep-indicators', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"indicators-container\" [ngClass]=\"{ 'is-inside-table': layoutType === 'table' }\">\n <ng-container *ngFor=\"let value of value?.split(';')\">\n <pep-icon name=\"indicator_dot_placeholder\" class=\"pull-left flip\" [fill]=\"value\"></pep-icon>\n </ng-container>\n <ng-container *ngIf=\"key != 'ItemIndicatorsWithoutCampaign' && value?.split(';').length < 4\">\n <pep-icon name=\"indicator_dot_placeholder\" class=\"pull-left flip\"></pep-icon>\n </ng-container>\n</div>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.indicators-container{height:2.5rem}.indicators-container pep-icon{height:1rem;width:1rem;margin:.05rem}.indicators-container.is-inside-table{height:1rem;display:flex;justify-content:center;align-items:center}\n", ".indicators-container .svg-icon{fill:hsla(var(--pep-color-system-primary-invert-h, 255),var(--pep-color-system-primary-invert-s, 100%),var(--pep-color-system-primary-invert-l, 100%),.5)}\n"] }]
77
- }], propDecorators: { key: [{
78
- type: Input
79
- }], value: [{
80
- type: Input
81
- }], layoutType: [{
82
- type: Input
83
- }] } });
84
-
85
- class PepInternalButtonComponent {
86
- set visible(visible) {
87
- this._visible = visible;
88
- if (visible) {
89
- this.renderer.removeClass(this.element.nativeElement, 'hidden-element');
90
- }
91
- else {
92
- this.renderer.addClass(this.element.nativeElement, 'hidden-element');
93
- }
94
- }
95
- get visible() {
96
- return this._visible;
97
- }
98
- constructor(customizationService, renderer, element) {
99
- this.customizationService = customizationService;
100
- this.renderer = renderer;
101
- this.element = element;
102
- this.key = '';
103
- this.value = '';
104
- this.formattedValue = '';
105
- this.label = '';
106
- this.type = 'button';
107
- this.mandatory = false;
108
- this.disabled = false;
109
- this.readonly = false;
110
- this.xAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;
111
- this.rowSpan = 1;
112
- this._visible = true;
113
- this.controlType = 'button';
114
- this.form = null;
115
- this.showTitle = true;
116
- this.layoutType = 'form';
117
- this.elementClick = new EventEmitter();
118
- this.valueChange = new EventEmitter();
119
- // standAlone = false;
120
- this.createNewReference = false;
121
- this.referenceButtons = [
122
- {
123
- key: 'action',
124
- callback: (action) => this.onButtonClicked(action.event),
125
- },
126
- {
127
- key: 'delete',
128
- callback: (action) => this.remove(),
129
- classNames: 'caution',
130
- iconName: pepIconSystemBin.name,
131
- },
132
- ];
133
- }
134
- ngOnInit() {
135
- // if (this.form === null) {
136
- // this.standAlone = true;
137
- // // this.form = this.customizationService.getDefaultFromGroup(this.key, this.value, this.mandatory, this.readonly, this.disabled);
138
- // const pepField = new PepInternalButtonField({
139
- // key: this.key,
140
- // value: this.value,
141
- // mandatory: this.mandatory,
142
- // readonly: this.readonly,
143
- // disabled: this.disabled,
144
- // });
145
- // this.form = this.customizationService.getDefaultFromGroup(pepField);
146
- // this.formattedValue = this.formattedValue || this.value;
147
- // this.renderer.addClass(
148
- // this.element.nativeElement,
149
- // PepCustomizationService.STAND_ALONE_FIELD_CLASS_NAME
150
- // );
151
- // }
152
- }
153
- ngOnChanges(changes) {
154
- if (this.type === 'reference') {
155
- this.createNewReference = this.value.length === 0;
156
- this.referenceButtons[0].value = this.formattedValue;
157
- }
158
- }
159
- ngOnDestroy() {
160
- //
161
- }
162
- // groupButtonClicked(action: IPepButtonClickEvent): void {
163
- // if (action.source.key === 'action') {
164
- // this.onButtonClicked(action.event);
165
- // } else if (action.source.key === 'delete') {
166
- // this.remove();
167
- // }
168
- // }
169
- onButtonClicked(event) {
170
- if (this.type === 'reference') {
171
- const valueArr = this.value.split('/');
172
- this.elementClick.emit({
173
- key: this.key,
174
- value: valueArr[valueArr.length - 1],
175
- controlType: this.controlType,
176
- eventWhich: event.which,
177
- otherData: this.referenceObjectInternalType,
178
- });
179
- }
180
- else if (this.type === 'button' && true) {
181
- this.elementClick.emit({
182
- key: this.key,
183
- value: this.value,
184
- controlType: this.controlType,
185
- eventWhich: event.which,
186
- });
187
- }
188
- else {
189
- this.elementClick.emit({
190
- key: this.key,
191
- controlType: this.controlType,
192
- eventWhich: event.which,
193
- });
194
- }
195
- }
196
- hrefFunction(event) {
197
- if (event.which === 1 /*|| event.which === 2*/) {
198
- this.onButtonClicked(event);
199
- }
200
- }
201
- openReferenceObjectInternal(event) {
202
- this.elementClick.emit({
203
- key: this.key,
204
- value: this.value,
205
- controlType: this.controlType,
206
- eventWhich: event.which,
207
- otherData: this.referenceObjectInternalType,
208
- });
209
- }
210
- remove() {
211
- this.value = '';
212
- this.valueChange.emit(this.value);
213
- }
214
- }
215
- PepInternalButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalButtonComponent, deps: [{ token: i1$1.PepCustomizationService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
216
- PepInternalButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: { key: "key", value: "value", formattedValue: "formattedValue", label: "label", referenceObjectInternalType: "referenceObjectInternalType", type: "type", mandatory: "mandatory", disabled: "disabled", readonly: "readonly", xAlignment: "xAlignment", rowSpan: "rowSpan", visible: "visible", form: "form", showTitle: "showTitle", layoutType: "layoutType" }, outputs: { elementClick: "elementClick", valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'reference'\">\n <ng-container *ngIf=\"layoutType === 'form'; then formBlock; else notFormBlock\"></ng-container>\n <ng-template #formBlock>\n <div class=\"pep-button-container reference-button\">\n <pep-field-title [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngIf=\"createNewReference; then newBlock; else existingBlock\"></ng-container>\n <ng-template #newBlock>\n <button mat-button [id]=\"key\" title=\"{{ formattedValue }}\" class=\"pep-button md regular\"\n (click)=\"onButtonClicked($event)\" [ngClass]=\"{\n disabled: disabled,\n 'pull-left': xAlignment == 'left',\n 'pull-right': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\">\n <span class=\"ellipsis pull-left flip button-title-with-icon\">{{ 'ACTIONS.CREATE_NEW' | translate\n }}</span>\n <mat-icon class=\"pull-right flip\" pepRtlClass>\n <pep-icon name=\"number_plus\" (click)=\"onButtonClicked($event)\">\n </pep-icon>\n </mat-icon>\n </button>\n </ng-template>\n <ng-template #existingBlock>\n <pep-group-buttons [buttons]=\"referenceButtons\" styleType=\"regular\" viewType=\"split\">\n </pep-group-buttons>\n </ng-template>\n </div>\n </ng-template>\n <ng-template #notFormBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'listofobjects'\">\n <ng-container *ngIf=\"layoutType === 'form'; then formBlock; else notFormBlock\"></ng-container>\n <ng-template #formBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: true}\"></ng-container>\n </ng-template>\n <ng-template #notFormBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <ng-container [ngSwitch]=\"key\">\n <ng-container *ngSwitchCase=\"'ObjectMenu'\">\n <span (click)=\"onButtonClicked($event)\" title=\"{{ key }}\">\n <mat-icon>\n <pep-icon *ngIf=\"key == 'ObjectMenu'\" name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </span>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Agents' || 'ContactPersons' || 'Buyers'\">\n <ng-container *ngIf=\"layoutType === 'table'; then tableBlock; else nonTableBlock\">\n </ng-container>\n <ng-template #nonTableBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: true}\"></ng-container>\n </ng-template>\n <ng-template #tableBlock>\n <span [id]=\"key\" title=\"{{ formattedValue }}\" class=\"pep-report-input readonly body-sm\">{{\n formattedValue }}</span>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"layoutType === 'form'; then buttonBlock; else linkBlock\">\n </ng-container>\n\n <ng-template #buttonBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: false}\"></ng-container>\n </ng-template>\n <ng-template #linkBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #buttonTemplate let-internal=\"internal\">\n <div class=\"pep-button-container\">\n <pep-field-title [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n </pep-field-title>\n\n <ng-container *ngIf=\"internal; then internalButtonTemplate; else regularButtonTemplate\"></ng-container>\n <ng-template #regularButtonTemplate>\n <button [id]=\"key\" title=\"{{ formattedValue }}\" mat-button class=\"pep-button md regular\"\n dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\" (click)=\"onButtonClicked($event)\"\n [disabled]=\"disabled\"\n [ngClass]=\"{disabled: disabled, 'pull-left': xAlignment == 'left', 'pull-right': xAlignment == 'right', 'center-alignment': xAlignment == 'center'}\">\n {{ formattedValue }}\n </button>\n </ng-template>\n\n <ng-template #internalButtonTemplate>\n <button [id]=\"key\" title=\"{{ formattedValue }}\" mat-button class=\"pep-button md regular\"\n dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\" (click)=\"openReferenceObjectInternal($event)\"\n [disabled]=\"disabled\"\n [ngClass]=\"{disabled: disabled, 'pull-left': xAlignment == 'left', 'pull-right': xAlignment == 'right', 'center-alignment': xAlignment == 'center'}\">\n <ng-container *ngIf=\"formattedValue == '0' || formattedValue == ''; then newBlock; else existingBlock\">\n </ng-container>\n <ng-template #newBlock>\n <span class=\"pull-left flip button-title-with-icon\">{{ 'LIST.SELECT' | translate }}&nbsp;</span>\n <mat-icon>\n <pep-icon name=\"number_plus\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n <ng-template #existingBlock>\n <span class=\"pull-left flip button-title-with-icon\">{{ formattedValue }}&nbsp;{{ 'LIST.SELECTED' |\n translate\n }}&nbsp;</span>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n </button>\n </ng-template>\n </div>\n</ng-template>\n\n<ng-template #linkTemplate>\n <ng-container *ngIf=\"formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <a href=\"{{ value }}\" (mousedown)=\"hrefFunction($event)\" class=\"color-link\">\n <span *ngIf=\"layoutType === 'table'\" [id]=\"key\" title=\"{{ formattedValue }}\"\n class=\"body-sm pep-report-input readonly\">\n {{ formattedValue }}\n </span>\n <span *ngIf=\"layoutType !== 'table'\" [id]=\"key\" title=\"{{ formattedValue }}\" class=\"body-sm pep-card-input\"\n style=\"display: block;\">\n {{ formattedValue }}\n </span>\n </a>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n</ng-template>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.pepperi-button-container,.pep-button-container{height:fit-content}.pepperi-button-container .center-alignment,.pep-button-container .center-alignment{position:absolute;left:50%;transform:translate(-50%)}.pepperi-button-container.reference-button ::ng-deep .split-buttons,.pepperi-button-container.reference-button .split-buttons,.pep-button-container.reference-button ::ng-deep .split-buttons,.pep-button-container.reference-button .split-buttons{float:left}.pepperi-button-container.reference-button ::ng-deep .split-buttons button:last-of-type,.pepperi-button-container.reference-button .split-buttons button:last-of-type,.pep-button-container.reference-button ::ng-deep .split-buttons button:last-of-type,.pep-button-container.reference-button .split-buttons button:last-of-type{width:1.5rem;padding:0}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3.Dir, selector: "[dir]", inputs: ["dir"], outputs: ["dirChange"], exportAs: ["dir"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1$1.PepRtlClassDirective, selector: "[pepRtlClass]" }, { kind: "component", type: i1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i7.PepFieldTitleComponent, selector: "pep-field-title", inputs: ["label", "mandatory", "disabled", "maxFieldCharacters", "hint", "xAlignment", "showTitle", "inputLength", "fontBodyType", "multiLine"] }, { kind: "component", type: i8.PepGroupButtonsComponent, selector: "pep-group-buttons", inputs: ["viewType", "styleType", "sizeType", "buttons", "buttonsDisabled", "supportUnselect", "selectedButtonKey", "stretch"], outputs: ["buttonClick"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalButtonComponent, decorators: [{
218
- type: Component,
219
- args: [{ selector: 'pep-internal-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'reference'\">\n <ng-container *ngIf=\"layoutType === 'form'; then formBlock; else notFormBlock\"></ng-container>\n <ng-template #formBlock>\n <div class=\"pep-button-container reference-button\">\n <pep-field-title [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n </pep-field-title>\n <ng-container *ngIf=\"createNewReference; then newBlock; else existingBlock\"></ng-container>\n <ng-template #newBlock>\n <button mat-button [id]=\"key\" title=\"{{ formattedValue }}\" class=\"pep-button md regular\"\n (click)=\"onButtonClicked($event)\" [ngClass]=\"{\n disabled: disabled,\n 'pull-left': xAlignment == 'left',\n 'pull-right': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\">\n <span class=\"ellipsis pull-left flip button-title-with-icon\">{{ 'ACTIONS.CREATE_NEW' | translate\n }}</span>\n <mat-icon class=\"pull-right flip\" pepRtlClass>\n <pep-icon name=\"number_plus\" (click)=\"onButtonClicked($event)\">\n </pep-icon>\n </mat-icon>\n </button>\n </ng-template>\n <ng-template #existingBlock>\n <pep-group-buttons [buttons]=\"referenceButtons\" styleType=\"regular\" viewType=\"split\">\n </pep-group-buttons>\n </ng-template>\n </div>\n </ng-template>\n <ng-template #notFormBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'listofobjects'\">\n <ng-container *ngIf=\"layoutType === 'form'; then formBlock; else notFormBlock\"></ng-container>\n <ng-template #formBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: true}\"></ng-container>\n </ng-template>\n <ng-template #notFormBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <ng-container [ngSwitch]=\"key\">\n <ng-container *ngSwitchCase=\"'ObjectMenu'\">\n <span (click)=\"onButtonClicked($event)\" title=\"{{ key }}\">\n <mat-icon>\n <pep-icon *ngIf=\"key == 'ObjectMenu'\" name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </span>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Agents' || 'ContactPersons' || 'Buyers'\">\n <ng-container *ngIf=\"layoutType === 'table'; then tableBlock; else nonTableBlock\">\n </ng-container>\n <ng-template #nonTableBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: true}\"></ng-container>\n </ng-template>\n <ng-template #tableBlock>\n <span [id]=\"key\" title=\"{{ formattedValue }}\" class=\"pep-report-input readonly body-sm\">{{\n formattedValue }}</span>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"layoutType === 'form'; then buttonBlock; else linkBlock\">\n </ng-container>\n\n <ng-template #buttonBlock>\n <ng-container *ngTemplateOutlet=\"buttonTemplate; context: {internal: false}\"></ng-container>\n </ng-template>\n <ng-template #linkBlock>\n <ng-container *ngTemplateOutlet=\"linkTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-container>\n\n<ng-template #buttonTemplate let-internal=\"internal\">\n <div class=\"pep-button-container\">\n <pep-field-title [label]=\"label\" [mandatory]=\"mandatory\" [disabled]=\"disabled\" [xAlignment]=\"xAlignment\"\n [showTitle]=\"showTitle\">\n </pep-field-title>\n\n <ng-container *ngIf=\"internal; then internalButtonTemplate; else regularButtonTemplate\"></ng-container>\n <ng-template #regularButtonTemplate>\n <button [id]=\"key\" title=\"{{ formattedValue }}\" mat-button class=\"pep-button md regular\"\n dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\" (click)=\"onButtonClicked($event)\"\n [disabled]=\"disabled\"\n [ngClass]=\"{disabled: disabled, 'pull-left': xAlignment == 'left', 'pull-right': xAlignment == 'right', 'center-alignment': xAlignment == 'center'}\">\n {{ formattedValue }}\n </button>\n </ng-template>\n\n <ng-template #internalButtonTemplate>\n <button [id]=\"key\" title=\"{{ formattedValue }}\" mat-button class=\"pep-button md regular\"\n dir=\"{{ xAlignment == 'right' ? 'rtl' : 'ltr' }}\" (click)=\"openReferenceObjectInternal($event)\"\n [disabled]=\"disabled\"\n [ngClass]=\"{disabled: disabled, 'pull-left': xAlignment == 'left', 'pull-right': xAlignment == 'right', 'center-alignment': xAlignment == 'center'}\">\n <ng-container *ngIf=\"formattedValue == '0' || formattedValue == ''; then newBlock; else existingBlock\">\n </ng-container>\n <ng-template #newBlock>\n <span class=\"pull-left flip button-title-with-icon\">{{ 'LIST.SELECT' | translate }}&nbsp;</span>\n <mat-icon>\n <pep-icon name=\"number_plus\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n <ng-template #existingBlock>\n <span class=\"pull-left flip button-title-with-icon\">{{ formattedValue }}&nbsp;{{ 'LIST.SELECTED' |\n translate\n }}&nbsp;</span>\n <mat-icon>\n <pep-icon name=\"system_edit\">\n </pep-icon>\n </mat-icon>\n </ng-template>\n </button>\n </ng-template>\n </div>\n</ng-template>\n\n<ng-template #linkTemplate>\n <ng-container *ngIf=\"formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\"></ng-container>\n <ng-template #notEmptyBlock>\n <a href=\"{{ value }}\" (mousedown)=\"hrefFunction($event)\" class=\"color-link\">\n <span *ngIf=\"layoutType === 'table'\" [id]=\"key\" title=\"{{ formattedValue }}\"\n class=\"body-sm pep-report-input readonly\">\n {{ formattedValue }}\n </span>\n <span *ngIf=\"layoutType !== 'table'\" [id]=\"key\" title=\"{{ formattedValue }}\" class=\"body-sm pep-card-input\"\n style=\"display: block;\">\n {{ formattedValue }}\n </span>\n </a>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n</ng-template>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.pepperi-button-container,.pep-button-container{height:fit-content}.pepperi-button-container .center-alignment,.pep-button-container .center-alignment{position:absolute;left:50%;transform:translate(-50%)}.pepperi-button-container.reference-button ::ng-deep .split-buttons,.pepperi-button-container.reference-button .split-buttons,.pep-button-container.reference-button ::ng-deep .split-buttons,.pep-button-container.reference-button .split-buttons{float:left}.pepperi-button-container.reference-button ::ng-deep .split-buttons button:last-of-type,.pepperi-button-container.reference-button .split-buttons button:last-of-type,.pep-button-container.reference-button ::ng-deep .split-buttons button:last-of-type,.pep-button-container.reference-button .split-buttons button:last-of-type{width:1.5rem;padding:0}\n"] }]
220
- }], ctorParameters: function () { return [{ type: i1$1.PepCustomizationService }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { key: [{
221
- type: Input
222
- }], value: [{
223
- type: Input
224
- }], formattedValue: [{
225
- type: Input
226
- }], label: [{
227
- type: Input
228
- }], referenceObjectInternalType: [{
229
- type: Input
230
- }], type: [{
231
- type: Input
232
- }], mandatory: [{
233
- type: Input
234
- }], disabled: [{
235
- type: Input
236
- }], readonly: [{
237
- type: Input
238
- }], xAlignment: [{
239
- type: Input
240
- }], rowSpan: [{
241
- type: Input
242
- }], visible: [{
243
- type: Input
244
- }], form: [{
245
- type: Input
246
- }], showTitle: [{
247
- type: Input
248
- }], layoutType: [{
249
- type: Input
250
- }], elementClick: [{
251
- type: Output
252
- }], valueChange: [{
253
- type: Output
254
- }] } });
255
-
256
- class PepInternalMenuComponent {
257
- constructor() {
258
- this.key = '';
259
- this.label = '';
260
- this.disabled = false;
261
- this.xAlignment = DEFAULT_HORIZONTAL_ALIGNMENT;
262
- // @Input() hasSubMenu = false;
263
- this.options = [];
264
- // @Input() invertClass = true;
265
- this.controlType = 'menu';
266
- this.layoutType = 'form';
267
- this.elementClick = new EventEmitter();
268
- }
269
- // @Output() menuItemClick: EventEmitter<IPepFieldClickEvent> = new EventEmitter<IPepFieldClickEvent>();
270
- ngOnDestroy() {
271
- // if (this.elementClick) {
272
- // this.elementClick.unsubscribe();
273
- // }
274
- // if (this.menuItemClick) {
275
- // this.menuItemClick.unsubscribe();
276
- // }
277
- }
278
- menuClicked(event) {
279
- this.elementClick.emit({
280
- key: this.key,
281
- controlType: this.controlType,
282
- eventWhich: event.which,
283
- });
284
- }
285
- menuItemClicked(itemKey) {
286
- // Not in use comment in version 16.55 for webapp.
287
- // this.menuItemClick.emit({ key: itemKey });
288
- }
289
- }
290
- PepInternalMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
291
- PepInternalMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepInternalMenuComponent, selector: "pep-internal-menu", inputs: { key: "key", label: "label", disabled: "disabled", xAlignment: "xAlignment", options: "options", layoutType: "layoutType" }, outputs: { elementClick: "elementClick" }, ngImport: i0, template: "<ng-container *ngIf=\"options?.length > 0; then subMenuBlock; else noSubMenuBlock\"></ng-container>\n<ng-template #noSubMenuBlock>\n <button (click)=\"menuClicked($event)\" title=\"{{ label }}\" mat-button\n class=\"pep-button icon-button weak special {{ layoutType === 'table' ? 'sm' : 'md' }}\" [ngClass]=\"{\n 'lock-events': disabled,\n 'left-alignment': xAlignment == 'left',\n 'right-alignment': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\">\n <mat-icon>\n <pep-icon name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </button>\n</ng-template>\n\n<ng-template #subMenuBlock>\n <button mat-button [matMenuTriggerFor]=\"menu\" menu-blur\n class=\"pep-button icon-button weak special {{ layoutType === 'table' ? 'sm' : 'md' }}\" [ngClass]=\"{\n 'left-alignment': xAlignment == 'left',\n 'right-alignment': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\" title=\"{{ label }}\">\n <mat-icon>\n <pep-icon name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\" xPosition=\"{{xAlignment == 'right' ? 'after' : 'before'}}\"\n [ngClass]=\"{ rtlMenu: xAlignment == 'right' }\">\n <button *ngFor=\"let option of options\" mat-menu-item (click)=\"menuItemClicked(option.key)\">\n <span>{{ option.value | translate }}</span>\n </button>\n </mat-menu>\n\n</ng-template>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.pepperi-button,.pep-button{cursor:pointer}.pepperi-button.left-alignment,.pep-button.left-alignment{justify-self:flex-start}.pepperi-button.center-alignment,.pep-button.center-alignment{justify-self:center}.pepperi-button.right-alignment,.pep-button.right-alignment{justify-self:flex-end}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
292
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalMenuComponent, decorators: [{
293
- type: Component,
294
- args: [{ selector: 'pep-internal-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"options?.length > 0; then subMenuBlock; else noSubMenuBlock\"></ng-container>\n<ng-template #noSubMenuBlock>\n <button (click)=\"menuClicked($event)\" title=\"{{ label }}\" mat-button\n class=\"pep-button icon-button weak special {{ layoutType === 'table' ? 'sm' : 'md' }}\" [ngClass]=\"{\n 'lock-events': disabled,\n 'left-alignment': xAlignment == 'left',\n 'right-alignment': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\">\n <mat-icon>\n <pep-icon name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </button>\n</ng-template>\n\n<ng-template #subMenuBlock>\n <button mat-button [matMenuTriggerFor]=\"menu\" menu-blur\n class=\"pep-button icon-button weak special {{ layoutType === 'table' ? 'sm' : 'md' }}\" [ngClass]=\"{\n 'left-alignment': xAlignment == 'left',\n 'right-alignment': xAlignment == 'right',\n 'center-alignment': xAlignment == 'center'\n }\" title=\"{{ label }}\">\n <mat-icon>\n <pep-icon name=\"system_menu\">\n </pep-icon>\n </mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\" xPosition=\"{{xAlignment == 'right' ? 'after' : 'before'}}\"\n [ngClass]=\"{ rtlMenu: xAlignment == 'right' }\">\n <button *ngFor=\"let option of options\" mat-menu-item (click)=\"menuItemClicked(option.key)\">\n <span>{{ option.value | translate }}</span>\n </button>\n </mat-menu>\n\n</ng-template>", styles: [":host{height:inherit;display:grid}:host>*{align-self:center}.pepperi-button,.pep-button{cursor:pointer}.pepperi-button.left-alignment,.pep-button.left-alignment{justify-self:flex-start}.pepperi-button.center-alignment,.pep-button.center-alignment{justify-self:center}.pepperi-button.right-alignment,.pep-button.right-alignment{justify-self:flex-end}\n"] }]
295
- }], propDecorators: { key: [{
296
- type: Input
297
- }], label: [{
298
- type: Input
299
- }], disabled: [{
300
- type: Input
301
- }], xAlignment: [{
302
- type: Input
303
- }], options: [{
304
- type: Input
305
- }], layoutType: [{
306
- type: Input
307
- }], elementClick: [{
308
- type: Output
309
- }] } });
310
-
311
- class PepInternalPageService {
312
- constructor(httpService) {
313
- this.httpService = httpService;
314
- this.parentId = '0';
315
- this.additionalApiName = '';
316
- this.transactionUrl = 'Service1.svc/v1/OrderCenter/Transaction/';
317
- }
318
- getBaseParentUrl() {
319
- const url = `${this.transactionUrl}${this.objectId}/ParentLine/${this.parentId}/`;
320
- return url;
321
- }
322
- getChildren(callbackFunc) {
323
- var _a;
324
- const body = JSON.stringify({
325
- TransactionUID: this.objectId,
326
- SearchCode: this.searchCode,
327
- AdditionalApiName: this.additionalApiName,
328
- ParentTransactionLineID: this.parentId,
329
- ViewType: this.viewType,
330
- });
331
- // Set the additional api name with view type string.
332
- const moreParams = ((_a = this.additionalApiName) === null || _a === void 0 ? void 0 : _a.length) > 0
333
- ? `${this.additionalApiName}/${this.viewType}`
334
- : `''/${this.viewType}`;
335
- const url = `${this.getBaseParentUrl()}Items/${moreParams}`;
336
- this.httpService.postWapiApiCall(url, body).subscribe((res) => {
337
- callbackFunc(res);
338
- }
339
- // (error) => {},
340
- // () => {}
341
- );
342
- }
343
- initDetails(objectId, parentId, searchCode, callbackFunc) {
344
- if (!objectId || !parentId) {
345
- return;
346
- }
347
- this.objectId = objectId;
348
- this.parentId = parentId;
349
- this.searchCode = searchCode;
350
- this.httpService
351
- .getWapiApiCall(`${this.getBaseParentUrl()}ViewTypes`)
352
- .subscribe((res) => {
353
- callbackFunc(res);
354
- }
355
- // (error) => {},
356
- // () => {}
357
- );
358
- }
359
- changeChildrenViewType(viewType, callbackFunc) {
360
- this.viewType = viewType;
361
- this.getChildren(callbackFunc);
362
- }
363
- changeAdditionalApiName(additionalApiName, callbackFunc) {
364
- this.additionalApiName = additionalApiName;
365
- this.getChildren(callbackFunc);
366
- }
367
- childPlusClick(itemId, fieldApiName, callbackFunc) {
368
- const body = JSON.stringify({
369
- TransactionUID: this.objectId,
370
- SearchCode: this.searchCode,
371
- ParentTransactionLineID: this.parentId,
372
- TransactionLineUID: itemId,
373
- FieldApiName: fieldApiName,
374
- ViewType: this.viewType,
375
- });
376
- this.httpService
377
- .postWapiApiCall(`${this.getBaseParentUrl()}IncrementValue`, body)
378
- .subscribe((res) => {
379
- callbackFunc(res);
380
- }
381
- // (error) => {},
382
- // () => {}
383
- );
384
- }
385
- childMinusClick(itemId, fieldApiName, callbackFunc) {
386
- const body = JSON.stringify({
387
- TransactionUID: this.objectId,
388
- SearchCode: this.searchCode,
389
- ParentTransactionLineID: this.parentId,
390
- TransactionLineUID: itemId,
391
- FieldApiName: fieldApiName,
392
- ViewType: this.viewType,
393
- });
394
- this.httpService
395
- .postWapiApiCall(`${this.getBaseParentUrl()}DecrementValue`, body)
396
- .subscribe((res) => {
397
- callbackFunc(res);
398
- }
399
- // (error) => {},
400
- // () => {}
401
- );
402
- }
403
- childValueChanged(itemId, fieldApiName, value, callbackFunc) {
404
- const body = JSON.stringify({
405
- TransactionUID: this.objectId,
406
- SearchCode: this.searchCode,
407
- ParentTransactionLineID: this.parentId,
408
- TransactionLineUID: itemId,
409
- FieldApiName: fieldApiName,
410
- FieldValue: value,
411
- ViewType: this.viewType,
412
- });
413
- this.httpService
414
- .postWapiApiCall(`${this.getBaseParentUrl()}SetFieldValue`, body)
415
- .subscribe((res) => {
416
- callbackFunc(res);
417
- }
418
- // (error) => {},
419
- // () => {}
420
- );
421
- }
422
- }
423
- PepInternalPageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalPageService, deps: [{ token: i1$1.PepHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
424
- PepInternalPageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalPageService });
425
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalPageService, decorators: [{
426
- type: Injectable
427
- }], ctorParameters: function () { return [{ type: i1$1.PepHttpService }]; } });
428
-
429
- class PepInternalFieldGeneratorComponent {
430
- constructor() {
431
- this.isActive = false;
432
- this.uid = null;
433
- this.layoutType = 'form';
434
- this.showTitle = true;
435
- this.checkForChanges = null;
436
- this.valueChange = new EventEmitter();
437
- // @Output()
438
- // formValidationChange: EventEmitter<boolean> = new EventEmitter<boolean>();
439
- this.elementClick = new EventEmitter();
440
- // @Output() internalFormFieldChange: EventEmitter<any> = new EventEmitter<any>();
441
- // @Output() internalFormFieldClick: EventEmitter<any> = new EventEmitter<any>();
442
- this.formValueChange = new EventEmitter();
443
- this.formFieldClick = new EventEmitter();
444
- }
445
- set field(value) {
446
- this._field = value;
447
- }
448
- get field() {
449
- return this._field;
450
- }
451
- get isValid() {
452
- if (this.field.readonly || this.field.disabled) {
453
- return true;
454
- }
455
- else {
456
- const formControl = this.form && this.form.get(this.field.key);
457
- if (formControl) {
458
- return formControl.valid;
459
- }
460
- else {
461
- return false;
462
- }
463
- }
464
- }
465
- get isTouched() {
466
- const formControl = this.form && this.form.get(this.field.key);
467
- return formControl ? formControl.touched : false;
468
- }
469
- get isDirty() {
470
- const formControl = this.form && this.form.get(this.field.key);
471
- return formControl ? formControl.dirty : false;
472
- }
473
- ngOnDestroy() {
474
- //
475
- }
476
- onFileChanged(fileData, field) {
477
- const value = fileData ? JSON.stringify(fileData) : '';
478
- const fieldValueChange = {
479
- key: field.key,
480
- value: value,
481
- controlType: field.controlType,
482
- };
483
- this.valueChange.emit(fieldValueChange);
484
- }
485
- onAddressValueChanged(valueChange, field) {
486
- const fieldValueChange = {
487
- key: valueChange.key,
488
- value: valueChange.value,
489
- controlType: field.controlType,
490
- };
491
- this.valueChange.emit(fieldValueChange);
492
- }
493
- onValueChanged(value, field) {
494
- const fieldValueChange = {
495
- key: field.key,
496
- value: value.toString(),
497
- controlType: field.controlType,
498
- };
499
- this.valueChange.emit(fieldValueChange);
500
- }
501
- // onInternalFormFieldChanged(internalFormFieldChange: any): void {
502
- // this.internalFormFieldChange.emit(internalFormFieldChange);
503
- // }
504
- // onFormValidationChanged(formValidationChange: any): void {
505
- // this.formValidationChange.emit(formValidationChange);
506
- // }
507
- onClick(fieldClicked) {
508
- this.elementClick.emit(fieldClicked);
509
- }
510
- // onInternalFormFieldClick(internalFormFieldClick: any): void {
511
- // this.internalFormFieldClick.emit(internalFormFieldClick);
512
- // }
513
- onFormValueChanged(event) {
514
- this.formValueChange.emit(event);
515
- }
516
- onFormFieldClick(event) {
517
- this.formFieldClick.emit(event);
518
- }
519
- ngOnChanges(changes) {
520
- // debugger;
521
- // For testing.
522
- // this.field.disabled = this.field.readonly = false;
523
- }
524
- }
525
- PepInternalFieldGeneratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalFieldGeneratorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
526
- PepInternalFieldGeneratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepInternalFieldGeneratorComponent, selector: "pep-internal-field-generator", inputs: { field: "field", isActive: "isActive", uid: "uid", form: "form", layoutType: "layoutType", showTitle: "showTitle", checkForChanges: "checkForChanges" }, outputs: { valueChange: "valueChange", elementClick: "elementClick", formValueChange: "formValueChange", formFieldClick: "formFieldClick" }, usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"field.controlType\" [formGroup]=\"form\">\n\n <pep-address *ngSwitchCase=\"'address'\" [form]=\"form\" [key]=\"field.key\" [formattedValue]=\"field.formattedValue\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [groupFields]=\"field.groupFields\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (addressValueChange)=\"onAddressValueChanged($event, field)\">\n </pep-address>\n\n <pep-attachment *ngSwitchCase=\"'attachment'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [isActive]=\"isActive\" [showTitle]=\"showTitle\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (fileChange)=\"onFileChanged($event, field)\">\n </pep-attachment>\n\n <pep-checkbox *ngSwitchCase=\"'checkbox'\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"(field.value | lowercase) == 'true' || field.value == '1' ? true : false\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [additionalValue]=\"field.additionalValue\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-checkbox>\n\n <pep-date *ngSwitchCase=\"'date'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [type]=\"field.type\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [minValue]=\"field.minValue\"\n [maxValue]=\"field.maxValue\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-date>\n\n <pep-images-filmstrip *ngSwitchCase=\"'images'\" [uid]=\"uid\" [form]=\"form\" [key]=\"field.key\" [label]=\"field.label\"\n [showTitle]=\"showTitle\" [rowSpan]=\"field.rowSpan\" [value]=\"field.value\" [layoutType]=\"layoutType\">\n </pep-images-filmstrip>\n\n <pep-image *ngSwitchCase=\"'image'\" [uid]=\"uid\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.formattedValue\"\n [srcLarge]=\"field.value\" [options]=\"field.options\" [label]=\"field.label\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [indicatorsField]=\"field.indicatorsField\" [menuField]=\"field.menuField\"\n [hasCampaignField]=\"field.hasCampaignField\" [sizeLimitMB]=\"field.sizeLimitMB\" [isActive]=\"isActive\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (fileChange)=\"onFileChanged($event, field)\">\n </pep-image>\n\n <pep-quantity-selector *ngSwitchCase=\"'qs'\" [form]=\"form\" [key]=\"field.key\" [allowDecimal]=\"field.allowDecimal\" [value]=\"field.value\"\n [label]=\"field.label\" [type]=\"field.type\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [additionalValue]=\"field.additionalValue\" [notificationInfo]=\"field.notificationInfo\" [isActive]=\"isActive\"\n [layoutType]=\"layoutType\" [showTitle]=\"showTitle\" [visible]=\"field.visible\"\n [minFractionDigits]=\"field.digitsNumberAfterDecimalPoint\"\n (valueChange)=\"onValueChanged($event, field)\" \n (elementClick)=\"onClick($event)\">\n </pep-quantity-selector>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-rich-html-textarea *ngSwitchCase=\"'richhtmltextarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-rich-html-textarea>\n\n <pep-select *ngSwitchCase=\"'select'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [autoSortOptions]=\"field.autoSortOptions\" [options]=\"field.options\" [showTitle]=\"showTitle\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (valueChange)=\"onValueChanged($event, field)\"\n [isActive]=\"isActive\">\n </pep-select>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-separator *ngSwitchCase=\"'separator'\" [form]=\"form\" [key]=\"field.key\" [label]=\"field.label\"\n [xAlignment]=\"field.xAlignment\" [layoutType]=\"layoutType\" [visible]=\"field.visible\">\n </pep-separator>\n\n <pep-signature *ngSwitchCase=\"'signature'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [isActive]=\"isActive\" [layoutType]=\"layoutType\"\n [visible]=\"field.visible\" (fileChange)=\"onFileChanged($event, field)\">\n </pep-signature>\n\n <pep-textarea *ngSwitchCase=\"'textarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-textarea>\n\n <pep-textbox *ngSwitchCase=\"'textbox'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [accessory]=\"field.accessory\" [label]=\"field.label\" [placeholder]=\"field.placeholder\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\"\n [minFractionDigits]=\"field.digitsNumberAfterDecimalPoint\"\n (valueChange)=\"onValueChanged($event, field)\" \n [isActive]=\"isActive\" [visible]=\"field.visible\">\n </pep-textbox>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-link *ngSwitchCase=\"'link'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [displayValue]=\"field.formattedValue\"\n [label]=\"field.label\" [placeholder]=\"field.placeholder\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\" [visible]=\"field.visible\"\n (elementClick)=\"onClick($event)\">\n </pep-link>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-indicators *ngSwitchCase=\"'indicators'\" [key]=\"field.key\" [value]=\"field.value\" [layoutType]=\"layoutType\">\n </pep-indicators>\n <pep-internal-button *ngSwitchCase=\"'button'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\"\n [referenceObjectInternalType]=\"field.referenceObjectInternalType\" [type]=\"field.type\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (valueChange)=\"onValueChanged($event, field)\">\n </pep-internal-button>\n <pep-internal-menu *ngSwitchCase=\"'menu'\" [key]=\"field.key\" [label]=\"field.label\" [disabled]=\"field.disabled\"\n [xAlignment]=\"field.xAlignment\" [options]=\"field.options\" [layoutType]=\"layoutType\"\n (elementClick)=\"onClick($event)\">\n </pep-internal-menu>\n <!-- \n comment for not cause a circular reference.\n <pep-internal-page *ngSwitchCase=\"'internalPage'\" [field]=\"field\" [layoutType]=\"layoutType\"\n (internalFormFieldClick)=\"onInternalFormFieldClick($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\">\n </pep-internal-page>\n\n <pep-internal-carusel *ngSwitchCase=\"'internalCarusel'\" [field]=\"field\"\n (internalFormFieldClick)=\"onInternalFormFieldClick($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\">\n </pep-internal-carusel> \n -->\n\n <ng-container *ngSwitchCase=\"'placeholder'\">\n </ng-container>\n</ng-container>", styles: [":host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$2.PepAddressComponent, selector: "pep-address", inputs: ["key", "formattedValue", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "groupFields", "form", "layoutType", "visible"], outputs: ["addressValueChange"] }, { kind: "component", type: i4$3.PepAttachmentComponent, selector: "pep-attachment", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "handleActions", "hint"], outputs: ["chooseFile", "fileChange", "elementClick", "validationChange"] }, { kind: "component", type: i5$2.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: i6.PepDateComponent, selector: "pep-date", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "chooseTime", "visible", "minValue", "maxValue", "minDateValue", "maxDateValue", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: i7$1.PepImageComponent, selector: "pep-image", inputs: ["key", "srcLarge", "src", "options", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "indicatorsField", "menuField", "hasCampaignField", "visible", "form", "uid", "showTitle", "renderTitle", "layoutType", "isActive", "sizeLimitMB", "acceptImagesType", "handleActions", "hint"], outputs: ["chooseFile", "fileChange", "elementClick", "validationChange"] }, { kind: "component", type: i8$1.PepImagesFilmstripComponent, selector: "pep-images-filmstrip", inputs: ["key", "value", "label", "xAlignment", "rowSpan", "form", "uid", "showTitle", "renderTitle", "layoutType", "currIndex", "showThumbnails"] }, { kind: "component", type: i9.PepQuantitySelectorComponent, selector: "pep-quantity-selector", inputs: ["key", "value", "minFractionDigits", "maxFractionDigits", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "allowDecimal", "additionalValue", "notificationInfo", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "styleType", "isInFocus"], outputs: ["valueChange", "elementClick", "validationChange"] }, { kind: "component", type: i10.PepRichHtmlTextareaComponent, selector: "pep-rich-html-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "xAlignment", "sanitize", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "renderEnlargeButton", "layoutType", "inlineMode", "toolbarOptions"], outputs: ["valueChange", "editorCreated", "validationChange"] }, { kind: "component", type: i11.PepSelectComponent, selector: "pep-select", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "placeholder", "placeholderWhenDisabled", "autoSortOptions", "options", "visible", "emptyOption", "form", "layoutType", "parentFieldKey", "isActive", "showTitle", "renderTitle", "typeaheadDebounceInterval", "addValueToOptionsIfNotExist"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: i12.PepSeparatorComponent, selector: "pep-separator", inputs: ["key", "label", "xAlignment", "form", "layoutType", "visible"] }, { kind: "component", type: i13.PepSignatureComponent, selector: "pep-signature", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "signatureURL", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "handleActions"], outputs: ["chooseFile", "fileChange", "elementClick", "validationChange"] }, { kind: "component", type: i14.PepTextareaComponent, selector: "pep-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType"], outputs: ["valueChange", "keyup", "validationChange"] }, { kind: "component", type: i15.PepTextboxComponent, selector: "pep-textbox", inputs: ["key", "value", "minFractionDigits", "maxFractionDigits", "accessory", "label", "placeholder", "type", "mandatory", "disabled", "readonly", "maxFieldCharacters", "hint", "textColor", "xAlignment", "rowSpan", "minValue", "maxValue", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType", "parentFieldKey", "regex", "regexError", "isInFocus"], outputs: ["valueChange", "keyup", "validationChange"] }, { kind: "component", type: i16.PepLinkComponent, selector: "pep-link", inputs: ["key", "value", "displayValue", "label", "placeholder", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange", "elementClick", "keyup", "validationChange"] }, { kind: "component", type: PepIndicatorsComponent, selector: "pep-indicators", inputs: ["key", "value", "layoutType"] }, { kind: "component", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: ["key", "value", "formattedValue", "label", "referenceObjectInternalType", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "layoutType"], outputs: ["elementClick", "valueChange"] }, { kind: "component", type: PepInternalMenuComponent, selector: "pep-internal-menu", inputs: ["key", "label", "disabled", "xAlignment", "options", "layoutType"], outputs: ["elementClick"] }, { kind: "pipe", type: i5.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
527
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalFieldGeneratorComponent, decorators: [{
528
- type: Component,
529
- args: [{ selector: 'pep-internal-field-generator', encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"field.controlType\" [formGroup]=\"form\">\n\n <pep-address *ngSwitchCase=\"'address'\" [form]=\"form\" [key]=\"field.key\" [formattedValue]=\"field.formattedValue\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [groupFields]=\"field.groupFields\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (addressValueChange)=\"onAddressValueChanged($event, field)\">\n </pep-address>\n\n <pep-attachment *ngSwitchCase=\"'attachment'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [isActive]=\"isActive\" [showTitle]=\"showTitle\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (fileChange)=\"onFileChanged($event, field)\">\n </pep-attachment>\n\n <pep-checkbox *ngSwitchCase=\"'checkbox'\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"(field.value | lowercase) == 'true' || field.value == '1' ? true : false\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [additionalValue]=\"field.additionalValue\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-checkbox>\n\n <pep-date *ngSwitchCase=\"'date'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [type]=\"field.type\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [minValue]=\"field.minValue\"\n [maxValue]=\"field.maxValue\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-date>\n\n <pep-images-filmstrip *ngSwitchCase=\"'images'\" [uid]=\"uid\" [form]=\"form\" [key]=\"field.key\" [label]=\"field.label\"\n [showTitle]=\"showTitle\" [rowSpan]=\"field.rowSpan\" [value]=\"field.value\" [layoutType]=\"layoutType\">\n </pep-images-filmstrip>\n\n <pep-image *ngSwitchCase=\"'image'\" [uid]=\"uid\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.formattedValue\"\n [srcLarge]=\"field.value\" [options]=\"field.options\" [label]=\"field.label\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [indicatorsField]=\"field.indicatorsField\" [menuField]=\"field.menuField\"\n [hasCampaignField]=\"field.hasCampaignField\" [sizeLimitMB]=\"field.sizeLimitMB\" [isActive]=\"isActive\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (fileChange)=\"onFileChanged($event, field)\">\n </pep-image>\n\n <pep-quantity-selector *ngSwitchCase=\"'qs'\" [form]=\"form\" [key]=\"field.key\" [allowDecimal]=\"field.allowDecimal\" [value]=\"field.value\"\n [label]=\"field.label\" [type]=\"field.type\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [additionalValue]=\"field.additionalValue\" [notificationInfo]=\"field.notificationInfo\" [isActive]=\"isActive\"\n [layoutType]=\"layoutType\" [showTitle]=\"showTitle\" [visible]=\"field.visible\"\n [minFractionDigits]=\"field.digitsNumberAfterDecimalPoint\"\n (valueChange)=\"onValueChanged($event, field)\" \n (elementClick)=\"onClick($event)\">\n </pep-quantity-selector>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-rich-html-textarea *ngSwitchCase=\"'richhtmltextarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-rich-html-textarea>\n\n <pep-select *ngSwitchCase=\"'select'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [autoSortOptions]=\"field.autoSortOptions\" [options]=\"field.options\" [showTitle]=\"showTitle\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (valueChange)=\"onValueChanged($event, field)\"\n [isActive]=\"isActive\">\n </pep-select>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-separator *ngSwitchCase=\"'separator'\" [form]=\"form\" [key]=\"field.key\" [label]=\"field.label\"\n [xAlignment]=\"field.xAlignment\" [layoutType]=\"layoutType\" [visible]=\"field.visible\">\n </pep-separator>\n\n <pep-signature *ngSwitchCase=\"'signature'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [isActive]=\"isActive\" [layoutType]=\"layoutType\"\n [visible]=\"field.visible\" (fileChange)=\"onFileChanged($event, field)\">\n </pep-signature>\n\n <pep-textarea *ngSwitchCase=\"'textarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-textarea>\n\n <pep-textbox *ngSwitchCase=\"'textbox'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [accessory]=\"field.accessory\" [label]=\"field.label\" [placeholder]=\"field.placeholder\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\"\n [minFractionDigits]=\"field.digitsNumberAfterDecimalPoint\"\n (valueChange)=\"onValueChanged($event, field)\" \n [isActive]=\"isActive\" [visible]=\"field.visible\">\n </pep-textbox>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-link *ngSwitchCase=\"'link'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [displayValue]=\"field.formattedValue\"\n [label]=\"field.label\" [placeholder]=\"field.placeholder\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\" [visible]=\"field.visible\"\n (elementClick)=\"onClick($event)\">\n </pep-link>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-indicators *ngSwitchCase=\"'indicators'\" [key]=\"field.key\" [value]=\"field.value\" [layoutType]=\"layoutType\">\n </pep-indicators>\n <pep-internal-button *ngSwitchCase=\"'button'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\"\n [referenceObjectInternalType]=\"field.referenceObjectInternalType\" [type]=\"field.type\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (valueChange)=\"onValueChanged($event, field)\">\n </pep-internal-button>\n <pep-internal-menu *ngSwitchCase=\"'menu'\" [key]=\"field.key\" [label]=\"field.label\" [disabled]=\"field.disabled\"\n [xAlignment]=\"field.xAlignment\" [options]=\"field.options\" [layoutType]=\"layoutType\"\n (elementClick)=\"onClick($event)\">\n </pep-internal-menu>\n <!-- \n comment for not cause a circular reference.\n <pep-internal-page *ngSwitchCase=\"'internalPage'\" [field]=\"field\" [layoutType]=\"layoutType\"\n (internalFormFieldClick)=\"onInternalFormFieldClick($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\">\n </pep-internal-page>\n\n <pep-internal-carusel *ngSwitchCase=\"'internalCarusel'\" [field]=\"field\"\n (internalFormFieldClick)=\"onInternalFormFieldClick($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\">\n </pep-internal-carusel> \n -->\n\n <ng-container *ngSwitchCase=\"'placeholder'\">\n </ng-container>\n</ng-container>", styles: [":host{display:block;width:100%;height:100%}\n"] }]
530
- }], propDecorators: { field: [{
531
- type: Input
532
- }], isActive: [{
533
- type: Input
534
- }], uid: [{
535
- type: Input
536
- }], form: [{
537
- type: Input
538
- }], layoutType: [{
539
- type: Input
540
- }], showTitle: [{
541
- type: Input
542
- }], checkForChanges: [{
543
- type: Input
544
- }], valueChange: [{
545
- type: Output
546
- }], elementClick: [{
547
- type: Output
548
- }], formValueChange: [{
549
- type: Output
550
- }], formFieldClick: [{
551
- type: Output
552
- }] } });
553
-
554
- class PepInternalFormComponent {
555
- set data(value) {
556
- const shouldReload = this.shouldReloadForm || !this._data;
557
- this._data = value;
558
- if (shouldReload) {
559
- this._shouldReloadForm = false;
560
- this.initForm();
561
- }
562
- else {
563
- this.updateForm();
564
- }
565
- }
566
- get data() {
567
- return this._data;
568
- }
569
- set lockFields(value) {
570
- this.isLocked = value;
571
- }
572
- get fields$() {
573
- return this._fieldsSubject.asObservable();
574
- }
575
- get shouldReloadForm() {
576
- return this._shouldReloadForm;
577
- }
578
- // eventServiceSub: Subscription;
579
- // public jsonLib = JSON;
580
- constructor(dialogService, customizationService, layoutService, fb, differs, translate) {
581
- this.dialogService = dialogService;
582
- this.customizationService = customizationService;
583
- this.layoutService = layoutService;
584
- this.fb = fb;
585
- this.translate = translate;
586
- this.isInternal = true;
587
- this.isReport = false;
588
- this.lockEvents = false;
589
- this.canEditObject = true;
590
- this._data = null;
591
- this.isActive = false;
592
- this.layoutType = 'card';
593
- // @Input() listType = '';
594
- this.objectId = '0';
595
- this.parentId = '0';
596
- this.searchCode = '0';
597
- this.showTitle = true;
598
- this.firstFieldAsLink = false;
599
- this.checkForChanges = null;
600
- this.valueChange = new EventEmitter();
601
- this.formValidationChange = new EventEmitter();
602
- this.fieldClick = new EventEmitter();
603
- // @Output() internalFormFieldClick: EventEmitter<any> = new EventEmitter<any>();
604
- // @Output() internalFormFieldChange: EventEmitter<any> = new EventEmitter<any>();
605
- this.isLocked = false;
606
- // payLoad = '';
607
- this.rows = [];
608
- this.fields = [];
609
- this._fieldsSubject = new BehaviorSubject([]);
610
- this.columns = 1;
611
- this.hasMenuFloatingOnOtherField = false;
612
- this.indicatorsDataField = null;
613
- this._shouldReloadForm = false;
614
- // store the initial value to compare with
615
- this.differ = differs.find({}).create();
616
- }
617
- convertXAlignToHorizontalAlign(xAlign) {
618
- let res = DEFAULT_HORIZONTAL_ALIGNMENT;
619
- if (xAlign === X_ALIGNMENT_TYPE.None ||
620
- xAlign === X_ALIGNMENT_TYPE.Left) {
621
- res = 'left';
622
- }
623
- else if (xAlign === X_ALIGNMENT_TYPE.Right) {
624
- res = 'right';
625
- }
626
- else {
627
- res = 'center';
628
- }
629
- return res;
630
- }
631
- convertYAlignToVerticalAlign(yAlign) {
632
- let res = DEFAULT_VERTICAL_ALIGNMENT;
633
- if (yAlign === Y_ALIGNMENT_TYPE.None ||
634
- yAlign === Y_ALIGNMENT_TYPE.Top) {
635
- res = 'top';
636
- }
637
- else if (yAlign === Y_ALIGNMENT_TYPE.Bottom) {
638
- res = 'bottom';
639
- }
640
- else {
641
- res = 'middle';
642
- }
643
- return res;
644
- }
645
- convertOptionalValues(optionalValues) {
646
- if (optionalValues && optionalValues.length > 0) {
647
- return optionalValues.map((ov) => {
648
- return { key: ov.Key, value: ov.Value };
649
- });
650
- }
651
- else {
652
- return [];
653
- }
654
- }
655
- convertAddressFields(controlField, addressFields, canEditObject) {
656
- const fields = [];
657
- addressFields.forEach((field) => {
658
- let customField;
659
- const placeholder = field.ApiName;
660
- if (field.ApiName.toLowerCase().indexOf('street') >= 0) {
661
- customField = new PepTextboxField({
662
- key: field.ApiName,
663
- label: field.ApiName,
664
- type: 'text',
665
- placeholder,
666
- readonly: !canEditObject,
667
- disabled: !field.Enabled || !canEditObject,
668
- hidden: false,
669
- mandatory: false,
670
- value: field.Value,
671
- formattedValue: field.FormattedValue,
672
- row: 0,
673
- rowSpan: 1,
674
- col: 0,
675
- colSpan: 2,
676
- xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
677
- yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
678
- order: 0,
679
- });
680
- }
681
- else if (field.ApiName.toLowerCase().indexOf('city') >= 0) {
682
- customField = new PepTextboxField({
683
- key: field.ApiName,
684
- label: field.ApiName,
685
- type: 'text',
686
- placeholder,
687
- readonly: !canEditObject,
688
- disabled: !field.Enabled || !canEditObject,
689
- hidden: false,
690
- mandatory: false,
691
- value: field.Value,
692
- formattedValue: field.FormattedValue,
693
- row: 0,
694
- rowSpan: 1,
695
- col: 2,
696
- colSpan: 1,
697
- xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
698
- yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
699
- order: 1,
700
- });
701
- }
702
- else if (field.ApiName.toLowerCase().indexOf('state') >= 0) {
703
- customField = new PepSelectField({
704
- key: field.ApiName,
705
- label: field.ApiName,
706
- placeholder,
707
- options: this.convertOptionalValues(field.OptionalValues),
708
- readonly: !canEditObject,
709
- disabled: !field.Enabled || !canEditObject,
710
- hidden: false,
711
- mandatory: false,
712
- value: field.Value,
713
- formattedValue: field.FormattedValue,
714
- row: 1,
715
- rowSpan: 1,
716
- col: 0,
717
- colSpan: 1,
718
- xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
719
- yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
720
- order: 2,
721
- });
722
- }
723
- else if (field.ApiName.toLowerCase().indexOf('zipcode') >= 0) {
724
- customField = new PepTextboxField({
725
- key: field.ApiName,
726
- label: field.ApiName,
727
- type: 'text',
728
- placeholder,
729
- readonly: !canEditObject,
730
- disabled: !field.Enabled || !canEditObject,
731
- hidden: false,
732
- mandatory: false,
733
- value: field.Value,
734
- formattedValue: field.FormattedValue,
735
- row: 1,
736
- rowSpan: 1,
737
- col: 1,
738
- colSpan: 1,
739
- xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
740
- yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
741
- order: 3,
742
- });
743
- }
744
- else if (field.ApiName.toLowerCase().indexOf('country') >= 0) {
745
- customField = new PepSelectField({
746
- key: field.ApiName,
747
- label: field.ApiName,
748
- placeholder,
749
- options: this.convertOptionalValues(field.OptionalValues),
750
- readonly: !canEditObject,
751
- disabled: !field.Enabled || !canEditObject,
752
- hidden: false,
753
- mandatory: false,
754
- value: field.Value,
755
- formattedValue: field.FormattedValue,
756
- row: 2,
757
- rowSpan: 1,
758
- col: 2,
759
- colSpan: 1,
760
- xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
761
- yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
762
- order: 4,
763
- });
764
- }
765
- fields.push(customField);
766
- });
767
- return fields.sort((n1, n2) => n1.order > n2.order ? 1 : n1.order < n2.order ? -1 : 0);
768
- }
769
- isMatrixField(apiNameToCheck) {
770
- return apiNameToCheck.indexOf('Matrix') >= 0;
771
- }
772
- doesFieldHavaFloatingField(controlField, floatingField) {
773
- let hasFloatingField = false;
774
- if (floatingField.Layout.Y >= controlField.Layout.Y &&
775
- floatingField.Layout.Y <
776
- controlField.Layout.Y + controlField.Layout.Height &&
777
- floatingField.Layout.X >= controlField.Layout.X &&
778
- floatingField.Layout.X <
779
- controlField.Layout.X + controlField.Layout.Width) {
780
- hasFloatingField = true;
781
- }
782
- return hasFloatingField;
783
- }
784
- getOptionsForCustomField(controlField, dataField, canEditObject) {
785
- if (!controlField || !dataField) {
786
- return;
787
- }
788
- const placeholder = controlField.ReadOnly || !canEditObject ? '' : controlField.Title;
789
- return {
790
- key: controlField.ApiName,
791
- label: controlField.Title,
792
- accessory: dataField.Accessory,
793
- placeholder,
794
- readonly: controlField.ReadOnly || !canEditObject,
795
- disabled: !dataField.Enabled || !canEditObject,
796
- hidden: controlField.Hidden,
797
- mandatory: controlField.Mandatory,
798
- value: dataField.Value,
799
- formattedValue: dataField.FormattedValue,
800
- additionalValue: dataField.AdditionalValue,
801
- row: controlField.Layout.Y,
802
- rowSpan: controlField.Layout.Height,
803
- col: controlField.Layout.X,
804
- colSpan: controlField.Layout.Width,
805
- xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
806
- yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
807
- options: this.convertOptionalValues(dataField.OptionalValues),
808
- groupFields: undefined,
809
- maxFieldCharacters: controlField.MaxFieldCharacters,
810
- minValue: controlField.MinValue,
811
- maxValue: controlField.MaxValue,
812
- // hasMenu: hasMenu,
813
- // hasCampaign: hasCampaign,
814
- // hasIndicators: hasIndicators,
815
- textColor: dataField.TextColor,
816
- visible: dataField.Visible,
817
- digitsNumberAfterDecimalPoint: dataField.DigitsNumberAfterDecimalPoint,
818
- };
819
- }
820
- convertToCustomField(controlField, dataField, canEditObject, menuField, hasCampaignField, indicatorsField, objectId, parentId, searchCode) {
821
- let customField;
822
- const options = this.getOptionsForCustomField(controlField, dataField, canEditObject);
823
- if (controlField.ApiName === 'ObjectMenu') {
824
- options.type = 'menu';
825
- customField = new PepInternalMenuField(options);
826
- }
827
- else if (controlField.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
828
- controlField.FieldType ===
829
- FIELD_TYPE.NumberIntegerQuantitySelector ||
830
- controlField.ApiName === 'QuantitySelector' ||
831
- controlField.ApiName === 'UnitsQuantity' ||
832
- controlField.ApiName.indexOf('size_') === 0) {
833
- if (dataField.FieldType === FIELD_TYPE.InternalLink) {
834
- options.type = 'button';
835
- }
836
- else if (dataField.FieldType === FIELD_TYPE.Package) {
837
- options.type = 'packageButton';
838
- }
839
- else if (dataField.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
840
- dataField.FieldType === FIELD_TYPE.NumberReal) {
841
- options.type = 'qs';
842
- options.allowDecimal = true;
843
- }
844
- else if (dataField.FieldType ===
845
- FIELD_TYPE.NumberIntegerQuantitySelector ||
846
- dataField.FieldType === FIELD_TYPE.NumberInteger) {
847
- options.type = 'qs';
848
- options.allowDecimal = false;
849
- }
850
- else if (dataField.FieldType === FIELD_TYPE.NumberIntegerForMatrix) {
851
- options.type = 'qsForMatrix';
852
- options.allowDecimal = false;
853
- }
854
- else if (dataField.FieldType === FIELD_TYPE.NumberRealForMatrix) {
855
- options.type = 'qsForMatrix';
856
- options.allowDecimal = true;
857
- }
858
- options.notificationInfo = dataField.NotificationInfo;
859
- customField = new PepQuantitySelectorField(options);
860
- }
861
- else {
862
- // HACK: need to remove this..
863
- if (dataField.FieldType === FIELD_TYPE.Indicators &&
864
- this.isMatrixField(dataField.ApiName)) {
865
- dataField.FieldType = FIELD_TYPE.InternalPage;
866
- }
867
- switch (dataField.FieldType) {
868
- case FIELD_TYPE.Address: {
869
- const canEditGroupObject = controlField.ReadOnly
870
- ? false
871
- : canEditObject;
872
- options.groupFields = this.convertAddressFields(controlField, dataField.GroupFields, canEditGroupObject);
873
- customField = new PepAddressField(options);
874
- break;
875
- }
876
- case FIELD_TYPE.Indicators: {
877
- // options['type'] = 'indicators'; // Not needed this is PepIndicatorsField.
878
- customField = new PepIndicatorsField(options);
879
- break;
880
- }
881
- case FIELD_TYPE.InternalPage: {
882
- if (this.isMatrixField(controlField.ApiName)) {
883
- options.rowSpan = controlField.Layout.Height;
884
- options.objectId = objectId;
885
- options.parentId = parentId;
886
- options.searchCode = searchCode;
887
- customField = new PepInternalPageField(options);
888
- }
889
- else {
890
- // Not supported
891
- }
892
- break;
893
- }
894
- case FIELD_TYPE.RelatedObjectsCards: {
895
- options.rowSpan = controlField.Layout.Height;
896
- options.searchCode = searchCode;
897
- options.pageInfo = dataField.UIPageInfo;
898
- customField = new PepInternalCaruselField(options);
899
- break;
900
- }
901
- case FIELD_TYPE.Link: {
902
- options.type = 'link';
903
- customField = new PepLinkField(options);
904
- break;
905
- }
906
- case FIELD_TYPE.InternalLink:
907
- case FIELD_TYPE.Button: {
908
- options.type = 'button';
909
- customField = new PepInternalButtonField(options);
910
- break;
911
- }
912
- case FIELD_TYPE.Attachment: {
913
- // options.type = 'attachment';
914
- customField = new PepAttachmentField(options);
915
- break;
916
- }
917
- case FIELD_TYPE.Signature: {
918
- // options.type = 'signature';
919
- customField = new PepSignatureField(options);
920
- break;
921
- }
922
- case FIELD_TYPE.Image:
923
- case FIELD_TYPE.ImageURL: {
924
- // options.type = 'image';
925
- options.menuField =
926
- menuField &&
927
- this.doesFieldHavaFloatingField(controlField, menuField)
928
- ? menuField
929
- : null;
930
- options.hasCampaignField =
931
- hasCampaignField &&
932
- this.doesFieldHavaFloatingField(controlField, hasCampaignField)
933
- ? hasCampaignField
934
- : null;
935
- options.indicatorsField =
936
- indicatorsField &&
937
- this.doesFieldHavaFloatingField(controlField, indicatorsField)
938
- ? indicatorsField
939
- : null;
940
- customField = new PepImageField(options);
941
- break;
942
- }
943
- case FIELD_TYPE.Images: {
944
- // options.type = 'images';
945
- customField = new PepImagesField(options);
946
- break;
947
- }
948
- case FIELD_TYPE.Email: {
949
- options.type = 'email';
950
- customField = new PepLinkField(options);
951
- break;
952
- }
953
- case FIELD_TYPE.Phone: {
954
- options.type = 'phone';
955
- customField = new PepLinkField(options);
956
- break;
957
- }
958
- case FIELD_TYPE.Duration: {
959
- options.type = 'duration';
960
- customField = new PepTextboxField(options);
961
- break;
962
- }
963
- case FIELD_TYPE.Default:
964
- case FIELD_TYPE.TextBox:
965
- case FIELD_TYPE.LimitedLengthTextBox:
966
- case FIELD_TYPE.TextHeader:
967
- case FIELD_TYPE.CalculatedString:
968
- case FIELD_TYPE.MapDataString: {
969
- customField = new PepTextboxField(options);
970
- break;
971
- }
972
- case FIELD_TYPE.TextArea: {
973
- customField = new PepTextareaField(options);
974
- break;
975
- }
976
- case FIELD_TYPE.RichTextHTML: {
977
- customField = new PepRichHtmlTextareaField(options);
978
- break;
979
- }
980
- case FIELD_TYPE.Date:
981
- case FIELD_TYPE.LimitedDate:
982
- case FIELD_TYPE.CalculatedDate:
983
- case FIELD_TYPE.DateAndTime: {
984
- options.type =
985
- dataField.FieldType === FIELD_TYPE.DateAndTime
986
- ? 'datetime'
987
- : 'date';
988
- customField = new PepDateField(options);
989
- break;
990
- }
991
- case FIELD_TYPE.NumberInteger:
992
- case FIELD_TYPE.CalculatedInt:
993
- case FIELD_TYPE.MapDataInt: {
994
- options.type = 'int';
995
- customField = new PepTextboxField(options);
996
- break;
997
- }
998
- case FIELD_TYPE.Percentage: {
999
- options.type = 'percentage';
1000
- customField = new PepTextboxField(options);
1001
- break;
1002
- }
1003
- case FIELD_TYPE.Currency: {
1004
- options.type = 'currency';
1005
- customField = new PepTextboxField(options);
1006
- break;
1007
- }
1008
- case FIELD_TYPE.NumberReal:
1009
- case FIELD_TYPE.CalculatedReal:
1010
- case FIELD_TYPE.MapDataReal:
1011
- case FIELD_TYPE.Sum:
1012
- case FIELD_TYPE.Totals: {
1013
- options.type = 'real';
1014
- customField = new PepTextboxField(options);
1015
- break;
1016
- }
1017
- case FIELD_TYPE.Boolean:
1018
- case FIELD_TYPE.CalculatedBool: {
1019
- customField = new PepCheckboxField(options);
1020
- break;
1021
- }
1022
- case FIELD_TYPE.BooleanText: {
1023
- options.type = 'booleanText';
1024
- customField = new PepCheckboxField(options);
1025
- break;
1026
- }
1027
- case FIELD_TYPE.ComboBox:
1028
- case FIELD_TYPE.EmptyComboBox:
1029
- case FIELD_TYPE.MapDataDropDown: {
1030
- // options.type = 'select';
1031
- options.autoSortOptions = false;
1032
- customField = new PepSelectField(options);
1033
- break;
1034
- }
1035
- case FIELD_TYPE.MultiTickBox:
1036
- case FIELD_TYPE.MultiTickBoxToComboBox:
1037
- case FIELD_TYPE.EmptyMultiTickBox: {
1038
- options.type = 'multi';
1039
- options.autoSortOptions = false;
1040
- customField = new PepSelectField(options);
1041
- break;
1042
- }
1043
- case FIELD_TYPE.GuidReferenceType: {
1044
- options.type = 'reference';
1045
- options.referenceObjectType = dataField.ReferenceObjectType;
1046
- options.referenceObjectSubType =
1047
- dataField.ReferenceObjectSubType;
1048
- options.referenceObjectInternalType =
1049
- dataField.ReferenceObjectInternalType;
1050
- customField = new PepInternalButtonField(options);
1051
- break;
1052
- }
1053
- case FIELD_TYPE.ListOfObjects: {
1054
- options.type = 'listofobjects';
1055
- customField = new PepInternalButtonField(options);
1056
- break;
1057
- }
1058
- case FIELD_TYPE.Separator: {
1059
- customField = new PepSeparatorField(options);
1060
- break;
1061
- }
1062
- /*
1063
- case FIELD_TYPE.Images: return that.field(value);
1064
- */
1065
- case FIELD_TYPE.NumberRealQuantitySelector:
1066
- case FIELD_TYPE.NumberIntegerQuantitySelector: {
1067
- options.type = 'qs';
1068
- options.allowDecimal =
1069
- dataField.FieldType ===
1070
- FIELD_TYPE.NumberRealQuantitySelector;
1071
- options.notificationInfo = dataField.NotificationInfo;
1072
- customField = new PepQuantitySelectorField(options);
1073
- break;
1074
- }
1075
- case FIELD_TYPE.Package: {
1076
- options.type = 'packageButton';
1077
- options.notificationInfo = dataField.NotificationInfo;
1078
- customField = new PepQuantitySelectorField(options);
1079
- break;
1080
- }
1081
- }
1082
- }
1083
- if (!customField) {
1084
- options.label = controlField.ApiName + ' is not supported!!!';
1085
- customField = new PepSeparatorField(options);
1086
- }
1087
- return customField;
1088
- }
1089
- getFieldFormattedValue(field) {
1090
- let fieldFormattedValue = field.formattedValue || field.value;
1091
- // Fix for the custom check box component.
1092
- if (field.controlType === 'checkbox') {
1093
- fieldFormattedValue = fieldFormattedValue === 'true';
1094
- }
1095
- // Fix for the custom button component.
1096
- if (field.controlType === 'button') {
1097
- fieldFormattedValue =
1098
- fieldFormattedValue === '0' ? '' : fieldFormattedValue;
1099
- }
1100
- return fieldFormattedValue;
1101
- }
1102
- toControlGroup(fields) {
1103
- const group = {};
1104
- if (fields && fields.length > 0) {
1105
- fields.forEach((field) => {
1106
- if (field.groupFields && field.groupFields.length > 0) {
1107
- const subGroup = {};
1108
- field.groupFields.forEach((groupField) => {
1109
- if (groupField.mandatory &&
1110
- !field.readonly &&
1111
- !field.disabled) {
1112
- subGroup[groupField.key] = [
1113
- {
1114
- value: groupField.formattedValue || '',
1115
- disabled: field.readonly ||
1116
- field.disabled ||
1117
- groupField.disabled,
1118
- },
1119
- [Validators.required],
1120
- ];
1121
- }
1122
- else {
1123
- subGroup[groupField.key] = [
1124
- {
1125
- value: groupField.formattedValue || '',
1126
- disabled: field.readonly ||
1127
- field.disabled ||
1128
- groupField.disabled,
1129
- },
1130
- [Validators.nullValidator],
1131
- ];
1132
- }
1133
- });
1134
- group[field.key] = this.fb.group(subGroup);
1135
- }
1136
- else {
1137
- const validators = field.getValidators();
1138
- const fieldFormattedValue = this.getFieldFormattedValue(field);
1139
- group[field.key] = [
1140
- {
1141
- value: fieldFormattedValue || '',
1142
- disabled: field.disabled,
1143
- },
1144
- validators,
1145
- ];
1146
- }
1147
- });
1148
- }
1149
- return this.fb.group(group);
1150
- }
1151
- createBaseField(uiControlField, dataField) {
1152
- const customField = this.convertToCustomField(uiControlField, dataField, this.canEditObject, this.menuDataField, this.hasCampaignDataField, this.indicatorsDataField, this.objectId, this.parentId, this.searchCode);
1153
- return customField;
1154
- }
1155
- showFormValidationMessage() {
1156
- const fields = this.fields;
1157
- let emptyMandatoryFieldsMsg = '';
1158
- let notValidFieldsMsg = '';
1159
- // for (let i: number = 0; i < fields.length; i++) {
1160
- // let field = fields[i];
1161
- for (const field of fields) {
1162
- const formControl = this.form && this.form.get(field.key);
1163
- if (formControl) {
1164
- // Mandatory is empty.
1165
- if (field.mandatory &&
1166
- formControl.value.toString().trim().length === 0) {
1167
- emptyMandatoryFieldsMsg +=
1168
- '<li><small>' + field.label + '</small></li>';
1169
- }
1170
- else if (!field.disabled && !formControl.valid) {
1171
- notValidFieldsMsg +=
1172
- '<li><small>' + field.label + '</small></li>';
1173
- }
1174
- }
1175
- }
1176
- // Add the header message of the empty mandatory fields
1177
- if (emptyMandatoryFieldsMsg.length > 0) {
1178
- emptyMandatoryFieldsMsg =
1179
- '<div>' +
1180
- this.translate.instant('MESSAGES.ERROR_MANDATORY_FIELDS') +
1181
- "</div><ul style='padding: 0 20px;'>" +
1182
- emptyMandatoryFieldsMsg +
1183
- '</ul><br/>';
1184
- }
1185
- // Add the header message of the empty mandatory fields
1186
- if (notValidFieldsMsg.length > 0) {
1187
- notValidFieldsMsg =
1188
- '<div>' +
1189
- this.translate.instant('MESSAGES.ERROR_INVALID_FIELDS') +
1190
- "</div><ul style='padding: 0 20px;'>" +
1191
- notValidFieldsMsg +
1192
- '</ul>';
1193
- }
1194
- const title = this.translate.instant('MESSAGES.TITLE_NOTICE');
1195
- const data = new PepDialogData({
1196
- title,
1197
- content: emptyMandatoryFieldsMsg + notValidFieldsMsg,
1198
- });
1199
- this.dialogService.openDefaultDialog(data);
1200
- }
1201
- ngOnInit() {
1202
- const themeVars = this.customizationService.getThemeVariables();
1203
- // convert rem to pixel
1204
- const RemToPixel = 16;
1205
- this.formGutterSize =
1206
- this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.FORM_SPACEING_KEY) * RemToPixel;
1207
- this.cardGutterSize =
1208
- this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.CARD_SPACEING_KEY) * RemToPixel;
1209
- }
1210
- ngDoCheck() {
1211
- const changes = this.differ.diff(this.data); // check for changes
1212
- if (changes) {
1213
- this.updateForm();
1214
- this.checkForChanges = new Date();
1215
- }
1216
- }
1217
- ngOnChanges(changes) {
1218
- // if (changes.data && changes.data.currentValue) {
1219
- // // Load changes
1220
- // if (!this.shouldReloadForm && changes.data.previousValue) {
1221
- // this.data = changes.data.currentValue;
1222
- // this.updateForm();
1223
- // } else {
1224
- // this._shouldReloadForm = false;
1225
- // this.initForm();
1226
- // }
1227
- // }
1228
- // if (this.shouldReloadForm || !changes?.data?.previousValue) {
1229
- // this._shouldReloadForm = false;
1230
- // this.initForm();
1231
- // this.checkForChanges = new Date();
1232
- // }
1233
- }
1234
- ngOnDestroy() {
1235
- //
1236
- }
1237
- getUiControlFields() {
1238
- return this.layout ? this.layout.ControlFields : [];
1239
- }
1240
- initFieldsStructure(fields, maxRow) {
1241
- const themeVars = this.customizationService.getThemeVariables();
1242
- // Set form row height.
1243
- if (this.layoutType === 'card') {
1244
- const cardFieldHeight = this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.CARD_FIELD_HEIGHT_KEY);
1245
- this.rowHeight = cardFieldHeight;
1246
- }
1247
- else {
1248
- const rowFieldHeight = this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.FORM_FIELD_HEIGHT_KEY);
1249
- const rowFieldTitleHeight = this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.FORM_FIELD_TITLE_HEIGHT_KEY);
1250
- this.rowHeight = rowFieldHeight + rowFieldTitleHeight;
1251
- }
1252
- // Create the fields structure (the fields must be sorted!!!).
1253
- if (fields.length > 0) {
1254
- // Init the layout.
1255
- if (
1256
- // this.layoutType === 'form' ||
1257
- this.layoutType === 'table') {
1258
- this.fields = fields;
1259
- this._fieldsSubject.next(fields);
1260
- this.rows = [];
1261
- for (let i = 0; i <= maxRow; i++) {
1262
- this.rows[i] = [];
1263
- }
1264
- // for (let i = 0; i < fields.length; i++) {
1265
- // const field = fields[i]
1266
- for (const field of fields) {
1267
- this.rows[field.row].push(field);
1268
- }
1269
- }
1270
- else {
1271
- const doesfieldExistIn = new Array(maxRow);
1272
- for (let i = 0; i < doesfieldExistIn.length; i++) {
1273
- doesfieldExistIn[i] = new Array(this.columns);
1274
- for (let j = 0; j < doesfieldExistIn[i].length; j++) {
1275
- doesfieldExistIn[i][j] = false;
1276
- }
1277
- }
1278
- // Run in squere (row - colspan, col - rowspan) and put true where it should.
1279
- // for (let index = 0; index < fields.length; index++) {
1280
- // const currentField = fields[index];
1281
- for (const currentField of fields) {
1282
- if (currentField.rowSpan > 1) {
1283
- for (let row = currentField.row; row < currentField.row + currentField.rowSpan; row++) {
1284
- if (currentField.colSpan > 1) {
1285
- for (let col = currentField.col; col <
1286
- currentField.col + currentField.colSpan; col++) {
1287
- if (doesfieldExistIn.length > row &&
1288
- doesfieldExistIn[0].length > col) {
1289
- doesfieldExistIn[row][col] = true;
1290
- }
1291
- }
1292
- }
1293
- else {
1294
- if (doesfieldExistIn.length > row &&
1295
- doesfieldExistIn[0].length >
1296
- currentField.col) {
1297
- doesfieldExistIn[row][currentField.col] = true;
1298
- }
1299
- }
1300
- }
1301
- }
1302
- else if (currentField.colSpan > 1) {
1303
- for (let col = currentField.col; col < currentField.col + currentField.colSpan; col++) {
1304
- if (doesfieldExistIn.length > currentField.row &&
1305
- doesfieldExistIn[0].length > col) {
1306
- doesfieldExistIn[currentField.row][col] = true;
1307
- }
1308
- }
1309
- }
1310
- else {
1311
- if (doesfieldExistIn.length > currentField.row &&
1312
- doesfieldExistIn[0].length > currentField.col) {
1313
- doesfieldExistIn[currentField.row][currentField.col] = true;
1314
- }
1315
- }
1316
- }
1317
- // Create empty fields where doesfieldExistIn is false (For the md-grid-list UI Component).
1318
- for (let i = 0; i < doesfieldExistIn.length; i++) {
1319
- for (let j = 0; j < doesfieldExistIn[i].length; j++) {
1320
- if (!doesfieldExistIn[i][j]) {
1321
- // Create empty field and add it to the fields list.
1322
- fields.push(new PepPlaceholderField({
1323
- key: i + '_' + j,
1324
- label: '',
1325
- placeholder: '',
1326
- readonly: false,
1327
- disabled: false,
1328
- hidden: false,
1329
- mandatory: false,
1330
- value: '',
1331
- formattedValue: '',
1332
- row: i,
1333
- rowSpan: 1,
1334
- col: j,
1335
- colSpan: 1,
1336
- order: 1,
1337
- }));
1338
- }
1339
- }
1340
- }
1341
- // Sort the fields again.
1342
- this.fields = fields.sort((f1, f2) => f1.row > f2.row
1343
- ? 1
1344
- : f1.row < f2.row
1345
- ? -1
1346
- : f1.col > f2.col
1347
- ? 1
1348
- : f1.col < f2.col
1349
- ? -1
1350
- : 0);
1351
- this._fieldsSubject.next(fields);
1352
- }
1353
- }
1354
- }
1355
- setForm(isForUpdate = false) {
1356
- var _a;
1357
- let allFieldsAreReadOnly = true;
1358
- if (!isForUpdate) {
1359
- const fields = [];
1360
- for (const currentField of this.fields) {
1361
- // Add all fields except 'internalPage' (for children).
1362
- if (currentField.controlType !== 'internalPage') {
1363
- fields.push(currentField);
1364
- }
1365
- if (!currentField.readonly) {
1366
- allFieldsAreReadOnly = false;
1367
- }
1368
- }
1369
- this.form = this.toControlGroup(fields);
1370
- }
1371
- else {
1372
- // Update form values if changed by calculated fields.
1373
- for (let i = 0; i < this.fields.length; i++) {
1374
- let currentField = this.fields[i];
1375
- if (currentField.controlType === 'internalCarusel') {
1376
- // Hack to override (update) the field.
1377
- const uiControlField = this.getUiControlFields().find(cf => cf.ApiName === currentField.key);
1378
- const dataField = this.data.Fields.find(df => df.ApiName === currentField.key);
1379
- currentField = this.createBaseField(uiControlField, dataField);
1380
- this._fieldsSubject.value[i] = currentField;
1381
- }
1382
- else if (currentField.controlType !== 'internalPage') {
1383
- if (currentField.groupFields &&
1384
- currentField.groupFields.length > 0) {
1385
- // for (let j = 0; j < currentField.groupFields.length; j++) {
1386
- // let currentGroupField = currentField.groupFields[j];
1387
- for (const currentGroupField of currentField.groupFields) {
1388
- const fieldFormattedValue = this.getFieldFormattedValue(currentGroupField);
1389
- this.customizationService.updateFormField(this.form, currentGroupField, fieldFormattedValue, currentField);
1390
- }
1391
- }
1392
- else {
1393
- const fieldFormattedValue = this.getFieldFormattedValue(currentField);
1394
- // this.form.controls[currentField.key].setValue(fieldFormattedValue);
1395
- this.customizationService.updateFormField(this.form, currentField, fieldFormattedValue);
1396
- }
1397
- }
1398
- if (!currentField.readonly) {
1399
- allFieldsAreReadOnly = false;
1400
- }
1401
- }
1402
- }
1403
- let isFormValid = (_a = this.form) === null || _a === void 0 ? void 0 : _a.valid;
1404
- // Change validation to true if all fields are read only.
1405
- if (!isFormValid && allFieldsAreReadOnly) {
1406
- isFormValid = true;
1407
- }
1408
- this.onFormValidationChanged(isFormValid);
1409
- // Set it to false to enable all fields.
1410
- if (this.isInternal && this.isLocked) {
1411
- this.isLocked = false;
1412
- }
1413
- }
1414
- initForm() {
1415
- if (this.data && this.data.Fields) {
1416
- const fields = this.convertCustomFields(this.getUiControlFields(), this.data.Fields);
1417
- const maxRow = Math.max(...fields.map((f) => {
1418
- return f.row + f.rowSpan;
1419
- }));
1420
- this.columns = Math.max(...fields.map((f) => {
1421
- return f.col + f.colSpan;
1422
- }));
1423
- this.initFieldsStructure(fields, maxRow);
1424
- this.setForm();
1425
- }
1426
- }
1427
- updateField(customField, updatedField) {
1428
- const options = {
1429
- disabled: !updatedField.Enabled || !this.canEditObject,
1430
- readonly: !updatedField.Enabled || !this.canEditObject,
1431
- visible: updatedField.Visible,
1432
- value: updatedField.Value,
1433
- additionalValue: updatedField.AdditionalValue,
1434
- formattedValue: updatedField.FormattedValue,
1435
- textColor: updatedField.TextColor,
1436
- digitsNumberAfterDecimalPoint: updatedField.DigitsNumberAfterDecimalPoint,
1437
- };
1438
- if (customField instanceof PepQuantitySelectorField) {
1439
- const notificationInfo = updatedField.NotificationInfo;
1440
- options.notificationInfo = notificationInfo;
1441
- // Change type if it's change (only for allowDecimal).
1442
- let allowDecimal = false;
1443
- if (updatedField.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
1444
- updatedField.FieldType === FIELD_TYPE.NumberReal ||
1445
- updatedField.FieldType === FIELD_TYPE.NumberRealForMatrix) {
1446
- allowDecimal = true;
1447
- }
1448
- options.allowDecimal = allowDecimal;
1449
- }
1450
- else if (customField instanceof PepSelectField) {
1451
- options.options = this.convertOptionalValues(updatedField.OptionalValues);
1452
- if (!options.options || options.options.length === 0) {
1453
- options.options.push({
1454
- key: options.value,
1455
- value: options.formattedValue,
1456
- });
1457
- }
1458
- }
1459
- else if (customField instanceof PepInternalCaruselField) {
1460
- options.pageInfo = updatedField.UIPageInfo;
1461
- }
1462
- customField.update(options);
1463
- }
1464
- updateForm() {
1465
- if (this.data && this.data.Fields) {
1466
- for (const currentField of this.data.Fields) {
1467
- const customField = this.fields.filter((f) => f.key === currentField.ApiName)[0];
1468
- // Update all fields except 'internalPage' type (for children).
1469
- if (customField && customField.controlType !== 'internalPage') {
1470
- this.updateField(customField, currentField);
1471
- // Update the group fields.
1472
- if (customField.controlType === 'address' &&
1473
- currentField.GroupFields) {
1474
- // for (let j = 0; j < currentField.GroupFields.length; j++) {
1475
- // let currentGroupField = currentField.GroupFields[j];
1476
- for (const currentGroupField of currentField.GroupFields) {
1477
- currentGroupField.Enabled = !currentField.Enabled
1478
- ? false
1479
- : currentGroupField.Enabled;
1480
- const customGroupField = customField.groupFields.filter((f) => f.key === currentGroupField.ApiName)[0];
1481
- this.updateField(customGroupField, currentGroupField);
1482
- }
1483
- }
1484
- }
1485
- }
1486
- this.setForm(true);
1487
- }
1488
- }
1489
- ReloadForm() {
1490
- this._shouldReloadForm = true;
1491
- }
1492
- // onSubmit() {
1493
- // if (this.form.valid) {
1494
- // this.payLoad = JSON.stringify(this.form.value);
1495
- // //this.submitted.emit(this.form.value);
1496
- // }
1497
- // }
1498
- getFormControlById(key) {
1499
- let formControl = null;
1500
- this.fields.forEach((field) => {
1501
- if (field.key === key) {
1502
- formControl = this.form.get(field.key);
1503
- return;
1504
- }
1505
- else if (field.groupFields && field.groupFields.length > 0) {
1506
- field.groupFields.forEach((groupField) => {
1507
- if (groupField.key === key) {
1508
- formControl = this.form.get(field.key + '.' + groupField.key);
1509
- return;
1510
- }
1511
- });
1512
- }
1513
- });
1514
- return formControl;
1515
- }
1516
- setSpecialFields(controlFields, dataFields) {
1517
- // let cf;
1518
- // for (let index = 0; index < controlFields.length; index++) {
1519
- // cf = controlFields[index];
1520
- for (const cf of controlFields) {
1521
- if (cf.ApiName === 'ObjectMenu') {
1522
- this.menuField = cf;
1523
- }
1524
- else if (cf.ApiName === 'ItemHasActiveCampaign') {
1525
- this.hasCampaignField = cf;
1526
- }
1527
- else if (cf.ApiName === 'ItemIndicatorsWithoutCampaign') {
1528
- this.indicatorsField = cf;
1529
- }
1530
- }
1531
- // let df;
1532
- // for (let index = 0; index < dataFields.length; index++) {
1533
- // df = dataFields[index];
1534
- for (const df of dataFields) {
1535
- if (df.ApiName === 'ObjectMenu') {
1536
- this.menuDataField = df;
1537
- }
1538
- else if (df.ApiName === 'ItemHasActiveCampaign') {
1539
- this.hasCampaignDataField = df;
1540
- }
1541
- else if (df.ApiName === 'ItemIndicatorsWithoutCampaign') {
1542
- this.indicatorsDataField = df;
1543
- }
1544
- }
1545
- if (this.menuField && this.menuDataField) {
1546
- this.menuDataField.Layout = this.menuField.Layout;
1547
- }
1548
- if (this.hasCampaignField && this.hasCampaignDataField) {
1549
- this.hasCampaignDataField.Layout = this.hasCampaignField.Layout;
1550
- }
1551
- if (this.indicatorsField && this.indicatorsDataField) {
1552
- this.indicatorsDataField.Layout = this.indicatorsField.Layout;
1553
- }
1554
- // Check if menu is floating on other field.
1555
- // for (let index = 0; index < controlFields.length; index++) {
1556
- // cf = controlFields[index];
1557
- for (const cf of controlFields) {
1558
- if (this.menuField && cf.ApiName !== 'ObjectMenu') {
1559
- this.hasMenuFloatingOnOtherField = this.doesFieldHavaFloatingField(cf, this.menuField);
1560
- if (this.hasMenuFloatingOnOtherField) {
1561
- break;
1562
- }
1563
- }
1564
- }
1565
- }
1566
- convertCustomFields(controlFields, dataFields) {
1567
- if (this.layoutType !== 'table') {
1568
- this.setSpecialFields(controlFields, dataFields);
1569
- }
1570
- else {
1571
- // HACK: convert to center alignment if table view & special fields)
1572
- controlFields.forEach((field, index) => {
1573
- if (field.ApiName === 'UnitsQuantity' ||
1574
- field.ApiName === 'QuantitySelector' ||
1575
- field.ApiName === 'ObjectMenu' ||
1576
- field.FieldType === FIELD_TYPE.Image ||
1577
- field.FieldType === FIELD_TYPE.ImageURL ||
1578
- field.FieldType === FIELD_TYPE.Indicators ||
1579
- field.FieldType === FIELD_TYPE.Boolean ||
1580
- field.FieldType === FIELD_TYPE.CalculatedBool ||
1581
- field.FieldType === FIELD_TYPE.Signature ||
1582
- field.FieldType ===
1583
- FIELD_TYPE.NumberIntegerQuantitySelector ||
1584
- field.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
1585
- field.FieldType === FIELD_TYPE.Package ||
1586
- field.FieldType === FIELD_TYPE.NumberIntegerForMatrix ||
1587
- field.FieldType === FIELD_TYPE.NumberRealForMatrix) {
1588
- field.Layout.XAlignment = X_ALIGNMENT_TYPE.Center;
1589
- }
1590
- else {
1591
- // HACK: align the rest of the fields by the culture.
1592
- // field.Layout.XAlignment = this.layoutService.isRtl() ? X_ALIGNMENT_TYPE.Right : X_ALIGNMENT_TYPE.Left;
1593
- }
1594
- });
1595
- }
1596
- const fields = [];
1597
- controlFields.forEach((field, index) => {
1598
- const dataField = dataFields.filter((df) => df.ApiName === field.ApiName)[0];
1599
- if (!dataField) {
1600
- return;
1601
- }
1602
- // If current view is not table view and those fields are special.
1603
- if (this.layoutType !== 'table' &&
1604
- ((this.hasMenuFloatingOnOtherField &&
1605
- this.menuField &&
1606
- this.menuField.ApiName === field.ApiName) ||
1607
- (this.indicatorsField &&
1608
- this.indicatorsField.ApiName === field.ApiName) ||
1609
- (this.hasCampaignField &&
1610
- this.hasCampaignField.ApiName === field.ApiName))) {
1611
- return;
1612
- }
1613
- // Set type to link
1614
- if (index === 0 && this.firstFieldAsLink) {
1615
- dataField.FieldType = FIELD_TYPE.InternalLink;
1616
- // dataField.Value = this.getInternalLinkHref();
1617
- }
1618
- if (field.ApiName === 'ObjectMenu') {
1619
- dataField.Enabled = true;
1620
- // HACK : Until "Enabled" returns from the server, we set PepMenu to be
1621
- // Disabled in cart on regular items and not campign items.
1622
- }
1623
- const customField = this.createBaseField(field, dataField);
1624
- fields.push(customField);
1625
- });
1626
- return fields.sort((f1, f2) => f1.row > f2.row
1627
- ? 1
1628
- : f1.row < f2.row
1629
- ? -1
1630
- : f1.col > f2.col
1631
- ? 1
1632
- : f1.col < f2.col
1633
- ? -1
1634
- : 0);
1635
- }
1636
- onFormValidationChanged(formValidationChange) {
1637
- this.formValidationChange.emit(formValidationChange);
1638
- }
1639
- onValueChanged(event) {
1640
- this.onFormValidationChanged(this.form.valid);
1641
- const formControl = this.getFormControlById(event.key);
1642
- const isValid = formControl ? formControl.valid : true;
1643
- // const isValid = true;
1644
- if (isValid) {
1645
- // Set it to false to disable all fields.
1646
- if (this.isInternal && this.layoutType === 'form') {
1647
- this.isLocked = true;
1648
- }
1649
- // Update the current field value.
1650
- const currentField = this.fields.find((f) => f.key === event.key);
1651
- if (currentField) {
1652
- currentField.formattedValue = currentField.value = event.value;
1653
- }
1654
- this.valueChange.emit({
1655
- id: this.data.UID.toString(),
1656
- uiObjectKey: this.data.Key,
1657
- key: event.key,
1658
- value: event.value,
1659
- controlType: event.controlType,
1660
- });
1661
- }
1662
- }
1663
- onClick(fieldClickEvent) {
1664
- const clickedUiControlField = this.data.Fields.filter((f) => f.ApiName === fieldClickEvent.key)[0];
1665
- const idType = this.data.Type ? this.data.Type.toString() : '';
1666
- if (clickedUiControlField) {
1667
- this.fieldClick.emit({
1668
- id: this.data.UID.toString(),
1669
- uiObjectKey: this.data.Key,
1670
- key: fieldClickEvent.key,
1671
- idType,
1672
- which: fieldClickEvent.eventWhich,
1673
- value: fieldClickEvent.value,
1674
- controlType: fieldClickEvent.controlType,
1675
- fieldType: clickedUiControlField.FieldType,
1676
- otherData: fieldClickEvent.otherData,
1677
- });
1678
- }
1679
- else {
1680
- // For other api names (like enter children etc).
1681
- this.fieldClick.emit({
1682
- id: this.data.UID.toString(),
1683
- uiObjectKey: this.data.Key,
1684
- key: fieldClickEvent.key,
1685
- idType,
1686
- which: fieldClickEvent.eventWhich,
1687
- value: fieldClickEvent.value,
1688
- controlType: fieldClickEvent.controlType,
1689
- otherData: fieldClickEvent.otherData,
1690
- });
1691
- }
1692
- }
1693
- // // This event is for handle the internal page events.
1694
- // onInternalFormFieldClicked(internalFormFieldClick: any): void {
1695
- // this.internalFormFieldClick.emit(internalFormFieldClick);
1696
- // }
1697
- // // This event is for handle the internal page events.
1698
- // onInternalFormFieldChanged(internalFormFieldChange: any): void {
1699
- // this.internalFormFieldChange.emit(internalFormFieldChange);
1700
- // }
1701
- // This event is for handle the related items change events.
1702
- onFormValueChanged(event) {
1703
- // this.valueChange.emit(event);
1704
- }
1705
- // This event is for handle the related items change events.
1706
- onFormFieldClick(event) {
1707
- this.fieldClick.emit(event);
1708
- }
1709
- }
1710
- PepInternalFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalFormComponent, deps: [{ token: i1$2.PepDialogService }, { token: i1$1.PepCustomizationService }, { token: i1$1.PepLayoutService }, { token: i3$1.FormBuilder }, { token: i0.KeyValueDiffers }, { token: i4$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
1711
- PepInternalFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepInternalFormComponent, selector: "pep-internal-form", inputs: { isInternal: "isInternal", isReport: "isReport", layout: "layout", lockEvents: "lockEvents", canEditObject: "canEditObject", data: "data", lockFields: "lockFields", isActive: "isActive", layoutType: "layoutType", objectId: "objectId", parentId: "parentId", searchCode: "searchCode", showTitle: "showTitle", firstFieldAsLink: "firstFieldAsLink", checkForChanges: "checkForChanges" }, outputs: { valueChange: "valueChange", formValidationChange: "formValidationChange", fieldClick: "fieldClick" }, usesOnChanges: true, ngImport: i0, template: "<fieldset *ngIf=\"form\" [formGroup]=\"form\" [disabled]=\"isLocked\" class=\"pep-form\"\n [ngStyle]=\"{ 'background-color': layoutType == 'card' && data?.BackgroundColor }\">\n <!-- New Form -->\n <mat-grid-list *ngIf=\"layoutType == 'form'\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"formGutterSize\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\">\n <pep-internal-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [checkForChanges]=\"checkForChanges\" [uid]=\"data?.UID\" [field]=\"field\" [showTitle]=\"showTitle\"\n (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n >\n </pep-internal-field-generator>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n </mat-grid-tile>\n </mat-grid-list>\n\n <!-- Thumbnails -->\n <mat-grid-list *ngIf=\"layoutType == 'card'\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"cardGutterSize\" class=\"card-spacing\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\"\n [ngStyle]=\"{ overflow: field.type == 'qs' ? 'unset' : 'hidden' }\">\n <pep-internal-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [ngClass]=\"{ 'lock-events': lockEvents }\" [isActive]=\"isActive\" [checkForChanges]=\"checkForChanges\"\n [uid]=\"data?.UID\" [field]=\"field\" [showTitle]=\"showTitle\" (valueChange)=\"onValueChanged($event)\"\n (elementClick)=\"onClick($event)\" (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\">\n </pep-internal-field-generator>\n </mat-grid-tile>\n </mat-grid-list>\n\n <ng-container *ngIf=\"layoutType == 'table'\">\n <ng-container *ngIf=\"isReport; then reportBlock; else notReportBlock\"></ng-container>\n <ng-template #reportBlock>\n <ng-container *ngTemplateOutlet=\"report\"></ng-container>\n </ng-template>\n <ng-template #notReportBlock>\n <div *ngFor=\"let field of fields$ | async; let j = index\" class=\"pull-left flip table-cell \"\n [ngClass]=\"['text-align-' + field.xAlignment]\" style=\"height: 100%\"\n [ngStyle]=\"{ width: (layout?.ControlFields)[j]?.calcColumnWidthString}\">\n <pep-internal-field-generator *ngIf=\"field.controlType != 'placeholder'\" [checkForChanges]=\"checkForChanges\"\n [uid]=\"data?.UID\" [field]=\"field\" [form]=\"form\" [layoutType]=\"layoutType\" [showTitle]=\"false\"\n (elementClick)=\"onClick($event)\" (valueChange)=\"onValueChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n [isActive]=\"isActive\">\n </pep-internal-field-generator>\n </div>\n </ng-template>\n </ng-container>\n\n <!------- For testing ------------\n {{ form.value | json }}\n {{ form.valid }}\n ---------------------------------->\n</fieldset>\n\n<ng-template #report>\n <div *ngFor=\"let field of fields$ | async; let j = index\" class=\"pull-left flip pep-report-fields\"\n [ngStyle]=\"{ width: (layout?.ControlFields)[j]?.calcColumnWidthString }\"\n [ngClass]=\"['text-align-' + field.xAlignment]\">\n <ng-container [ngSwitch]=\"field.controlType\">\n <pep-image *ngSwitchCase=\"'image'\" [uid]=\"data?.UID\" [form]=\"form\" [key]=\"field.key\"\n [src]=\"field.formattedValue\" [srcLarge]=\"field.value\" [options]=\"field.options\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [layoutType]=\"layoutType\"\n (elementClick)=\"onClick($event)\">\n </pep-image>\n\n <pep-signature *ngSwitchCase=\"'signature'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\">\n </pep-signature>\n\n <pep-checkbox *ngSwitchCase=\"'checkbox'\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"(field.value | lowercase) == 'true' || field.value == '1' ? true : false\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [additionalValue]=\"field.additionalValue\" [layoutType]=\"layoutType\">\n </pep-checkbox>\n\n <pep-date *ngSwitchCase=\"'date'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [type]=\"field.type\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [minValue]=\"field.minValue\" [maxValue]=\"field.maxValue\" [layoutType]=\"layoutType\">\n </pep-date>\n\n <pep-internal-button *ngSwitchCase=\"'button'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [layoutType]=\"layoutType\" (elementClick)=\"onClick($event)\">\n </pep-internal-button>\n\n <pep-textarea *ngSwitchCase=\"'textarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [maxFieldCharacters]=\"field.maxFieldCharacters\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\">\n </pep-textarea>\n\n <pep-quantity-selector *ngSwitchCase=\"'qs'\" [id]=\"field.key\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"field.value\" [label]=\"field.label\" [type]=\"field.type\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\" (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\">\n </pep-quantity-selector>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"field.formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\">\n </ng-container>\n <ng-template #notEmptyBlock>\n <ng-container\n *ngIf=\"field.controlType === 'attachment' || field.type === 'link'; then linkBlock; else notLinkBlock\">\n </ng-container>\n <ng-template #linkBlock>\n <a [id]=\"field.key\" class=\"color-link body-sm pep-report-input readonly {{field.value?.length > 0 ? '' : 'disable'}}\"\n *ngIf=\"field.formattedValue != null\" title=\"{{ field.formattedValue }}\" target=\"_blank\"\n href=\"{{ field.value }}\">{{ field.formattedValue }}</a>\n </ng-template>\n <ng-template #notLinkBlock>\n <span [id]=\"field.key\" class=\"body-sm pep-report-input readonly\"\n title=\"{{ field.formattedValue }}\" [ngStyle]=\"{ color: field.textColor }\">{{\n field.formattedValue }}</span>\n </ng-template>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>", styles: [":host{display:grid}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i6$1.MatGridList, selector: "mat-grid-list", inputs: ["cols", "gutterSize", "rowHeight"], exportAs: ["matGridList"] }, { kind: "component", type: i6$1.MatGridTile, selector: "mat-grid-tile", inputs: ["rowspan", "colspan"], exportAs: ["matGridTile"] }, { kind: "component", type: i5$2.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: i6.PepDateComponent, selector: "pep-date", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "chooseTime", "visible", "minValue", "maxValue", "minDateValue", "maxDateValue", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: i7$1.PepImageComponent, selector: "pep-image", inputs: ["key", "srcLarge", "src", "options", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "indicatorsField", "menuField", "hasCampaignField", "visible", "form", "uid", "showTitle", "renderTitle", "layoutType", "isActive", "sizeLimitMB", "acceptImagesType", "handleActions", "hint"], outputs: ["chooseFile", "fileChange", "elementClick", "validationChange"] }, { kind: "component", type: i9.PepQuantitySelectorComponent, selector: "pep-quantity-selector", inputs: ["key", "value", "minFractionDigits", "maxFractionDigits", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "allowDecimal", "additionalValue", "notificationInfo", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "styleType", "isInFocus"], outputs: ["valueChange", "elementClick", "validationChange"] }, { kind: "component", type: i13.PepSignatureComponent, selector: "pep-signature", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "signatureURL", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "handleActions"], outputs: ["chooseFile", "fileChange", "elementClick", "validationChange"] }, { kind: "component", type: i14.PepTextareaComponent, selector: "pep-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType"], outputs: ["valueChange", "keyup", "validationChange"] }, { kind: "component", type: PepInternalFieldGeneratorComponent, selector: "pep-internal-field-generator", inputs: ["field", "isActive", "uid", "form", "layoutType", "showTitle", "checkForChanges"], outputs: ["valueChange", "elementClick", "formValueChange", "formFieldClick"] }, { kind: "component", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: ["key", "value", "formattedValue", "label", "referenceObjectInternalType", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "layoutType"], outputs: ["elementClick", "valueChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1712
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalFormComponent, decorators: [{
1713
- type: Component,
1714
- args: [{ selector: 'pep-internal-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fieldset *ngIf=\"form\" [formGroup]=\"form\" [disabled]=\"isLocked\" class=\"pep-form\"\n [ngStyle]=\"{ 'background-color': layoutType == 'card' && data?.BackgroundColor }\">\n <!-- New Form -->\n <mat-grid-list *ngIf=\"layoutType == 'form'\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"formGutterSize\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\">\n <pep-internal-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [checkForChanges]=\"checkForChanges\" [uid]=\"data?.UID\" [field]=\"field\" [showTitle]=\"showTitle\"\n (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n >\n </pep-internal-field-generator>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n </mat-grid-tile>\n </mat-grid-list>\n\n <!-- Thumbnails -->\n <mat-grid-list *ngIf=\"layoutType == 'card'\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"cardGutterSize\" class=\"card-spacing\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\"\n [ngStyle]=\"{ overflow: field.type == 'qs' ? 'unset' : 'hidden' }\">\n <pep-internal-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [ngClass]=\"{ 'lock-events': lockEvents }\" [isActive]=\"isActive\" [checkForChanges]=\"checkForChanges\"\n [uid]=\"data?.UID\" [field]=\"field\" [showTitle]=\"showTitle\" (valueChange)=\"onValueChanged($event)\"\n (elementClick)=\"onClick($event)\" (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\">\n </pep-internal-field-generator>\n </mat-grid-tile>\n </mat-grid-list>\n\n <ng-container *ngIf=\"layoutType == 'table'\">\n <ng-container *ngIf=\"isReport; then reportBlock; else notReportBlock\"></ng-container>\n <ng-template #reportBlock>\n <ng-container *ngTemplateOutlet=\"report\"></ng-container>\n </ng-template>\n <ng-template #notReportBlock>\n <div *ngFor=\"let field of fields$ | async; let j = index\" class=\"pull-left flip table-cell \"\n [ngClass]=\"['text-align-' + field.xAlignment]\" style=\"height: 100%\"\n [ngStyle]=\"{ width: (layout?.ControlFields)[j]?.calcColumnWidthString}\">\n <pep-internal-field-generator *ngIf=\"field.controlType != 'placeholder'\" [checkForChanges]=\"checkForChanges\"\n [uid]=\"data?.UID\" [field]=\"field\" [form]=\"form\" [layoutType]=\"layoutType\" [showTitle]=\"false\"\n (elementClick)=\"onClick($event)\" (valueChange)=\"onValueChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n [isActive]=\"isActive\">\n </pep-internal-field-generator>\n </div>\n </ng-template>\n </ng-container>\n\n <!------- For testing ------------\n {{ form.value | json }}\n {{ form.valid }}\n ---------------------------------->\n</fieldset>\n\n<ng-template #report>\n <div *ngFor=\"let field of fields$ | async; let j = index\" class=\"pull-left flip pep-report-fields\"\n [ngStyle]=\"{ width: (layout?.ControlFields)[j]?.calcColumnWidthString }\"\n [ngClass]=\"['text-align-' + field.xAlignment]\">\n <ng-container [ngSwitch]=\"field.controlType\">\n <pep-image *ngSwitchCase=\"'image'\" [uid]=\"data?.UID\" [form]=\"form\" [key]=\"field.key\"\n [src]=\"field.formattedValue\" [srcLarge]=\"field.value\" [options]=\"field.options\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [layoutType]=\"layoutType\"\n (elementClick)=\"onClick($event)\">\n </pep-image>\n\n <pep-signature *ngSwitchCase=\"'signature'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\">\n </pep-signature>\n\n <pep-checkbox *ngSwitchCase=\"'checkbox'\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"(field.value | lowercase) == 'true' || field.value == '1' ? true : false\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [additionalValue]=\"field.additionalValue\" [layoutType]=\"layoutType\">\n </pep-checkbox>\n\n <pep-date *ngSwitchCase=\"'date'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [type]=\"field.type\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [minValue]=\"field.minValue\" [maxValue]=\"field.maxValue\" [layoutType]=\"layoutType\">\n </pep-date>\n\n <pep-internal-button *ngSwitchCase=\"'button'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [layoutType]=\"layoutType\" (elementClick)=\"onClick($event)\">\n </pep-internal-button>\n\n <pep-textarea *ngSwitchCase=\"'textarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [maxFieldCharacters]=\"field.maxFieldCharacters\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\">\n </pep-textarea>\n\n <pep-quantity-selector *ngSwitchCase=\"'qs'\" [id]=\"field.key\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"field.value\" [label]=\"field.label\" [type]=\"field.type\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\" (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\">\n </pep-quantity-selector>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"field.formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\">\n </ng-container>\n <ng-template #notEmptyBlock>\n <ng-container\n *ngIf=\"field.controlType === 'attachment' || field.type === 'link'; then linkBlock; else notLinkBlock\">\n </ng-container>\n <ng-template #linkBlock>\n <a [id]=\"field.key\" class=\"color-link body-sm pep-report-input readonly {{field.value?.length > 0 ? '' : 'disable'}}\"\n *ngIf=\"field.formattedValue != null\" title=\"{{ field.formattedValue }}\" target=\"_blank\"\n href=\"{{ field.value }}\">{{ field.formattedValue }}</a>\n </ng-template>\n <ng-template #notLinkBlock>\n <span [id]=\"field.key\" class=\"body-sm pep-report-input readonly\"\n title=\"{{ field.formattedValue }}\" [ngStyle]=\"{ color: field.textColor }\">{{\n field.formattedValue }}</span>\n </ng-template>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>", styles: [":host{display:grid}\n"] }]
1715
- }], ctorParameters: function () { return [{ type: i1$2.PepDialogService }, { type: i1$1.PepCustomizationService }, { type: i1$1.PepLayoutService }, { type: i3$1.FormBuilder }, { type: i0.KeyValueDiffers }, { type: i4$1.TranslateService }]; }, propDecorators: { isInternal: [{
1716
- type: Input
1717
- }], isReport: [{
1718
- type: Input
1719
- }], layout: [{
1720
- type: Input
1721
- }], lockEvents: [{
1722
- type: Input
1723
- }], canEditObject: [{
1724
- type: Input
1725
- }], data: [{
1726
- type: Input
1727
- }], lockFields: [{
1728
- type: Input
1729
- }], isActive: [{
1730
- type: Input
1731
- }], layoutType: [{
1732
- type: Input
1733
- }], objectId: [{
1734
- type: Input
1735
- }], parentId: [{
1736
- type: Input
1737
- }], searchCode: [{
1738
- type: Input
1739
- }], showTitle: [{
1740
- type: Input
1741
- }], firstFieldAsLink: [{
1742
- type: Input
1743
- }], checkForChanges: [{
1744
- type: Input
1745
- }], valueChange: [{
1746
- type: Output
1747
- }], formValidationChange: [{
1748
- type: Output
1749
- }], fieldClick: [{
1750
- type: Output
1751
- }] } });
1752
-
1753
- class PepInternalListComponent {
1754
- get items() {
1755
- return this._items;
1756
- }
1757
- constructor(element, layoutService, cd, renderer) {
1758
- this.element = element;
1759
- this.layoutService = layoutService;
1760
- this.cd = cd;
1761
- this.renderer = renderer;
1762
- this.noDataFoundMsg = 'Items not found';
1763
- this.hideAllSelectionInMulti = false;
1764
- this.top = -1;
1765
- this.objectId = '0';
1766
- this.parentId = '0';
1767
- this.searchCode = '0';
1768
- // @Input() showTopBorder = false;
1769
- this.supportResizing = true;
1770
- this.parentScroll = null;
1771
- this.disabled = false;
1772
- this.disableEvents = false;
1773
- this.disableSelectionItems = false;
1774
- this.totalsRow = [];
1775
- // @Output()
1776
- // itemClick: EventEmitter<IPepListItemClickEvent> = new EventEmitter<IPepListItemClickEvent>();
1777
- this.fieldClick = new EventEmitter();
1778
- this.valueChange = new EventEmitter();
1779
- this.uiControl = null;
1780
- this.totalRows = -1;
1781
- this.isTable = false;
1782
- this.hasColumnWidthOfTypePercentage = true;
1783
- this._items = null;
1784
- // isCardView = false;
1785
- this.itemsCounter = 0;
1786
- this.showItems = true;
1787
- this.SEPARATOR = ',';
1788
- this.nativeWindow = null;
1789
- this.selectedItemId = '';
1790
- this.hoveredItemId = '';
1791
- this.lockEvents = false;
1792
- this.containerWidth = 0;
1793
- this.deviceHasMouse = false;
1794
- // headerIsInFocus = false;
1795
- // For resize
1796
- this.pressedColumn = '';
1797
- this.startX = 0;
1798
- this.startWidth = 0;
1799
- this.tableStartWidth = 0;
1800
- this.isUserSelected = false;
1801
- this.checkForChanges = null;
1802
- this.useVirtualScroll = true;
1803
- this.nativeWindow = window;
1804
- this.deviceHasMouse = this.layoutService.getDeviceHasMouse();
1805
- this.layoutService.onMouseOver$.subscribe((deviceHasMouse) => {
1806
- this.deviceHasMouse = deviceHasMouse;
1807
- });
1808
- }
1809
- ngOnInit() {
1810
- this.containerWidth = 0;
1811
- }
1812
- ngOnChanges(changes) {
1813
- if (this.containerWidth <= 0) {
1814
- this.setContainerWidth();
1815
- }
1816
- }
1817
- ngOnDestroy() {
1818
- // if (this.valueChange) {
1819
- // this.valueChange.unsubscribe();
1820
- // }
1821
- // if (this.itemClick) {
1822
- // this.itemClick.unsubscribe();
1823
- // }
1824
- // if (this.fieldClick) {
1825
- // this.fieldClick.unsubscribe();
1826
- // }
1827
- }
1828
- setContainerWidth() {
1829
- if (!this.element.nativeElement.parentElement) {
1830
- return;
1831
- }
1832
- const selectionCheckBoxWidth = 0;
1833
- const rowHeight = 40; // the table row height (2.5rem * 16font-size).
1834
- const style = getComputedStyle(this.element.nativeElement.parentElement);
1835
- // The container-fluid class padding left + right + border
1836
- const containerFluidSpacing = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
1837
- const parentContainer = this.element.nativeElement.parentElement.parentElement > 0
1838
- ? this.element.nativeElement.parentElement.parentElement
1839
- : this.element.nativeElement.parentElement;
1840
- // Calculate if vertical scroll should appear, if so set the scroll width. (this.totalRows + 1) + 1 is for the header row.
1841
- const scrollWidth = parentContainer.clientHeight < rowHeight * (this.totalRows + 1)
1842
- ? 18
1843
- : 0; // 18 is the default scroll width.
1844
- // The selectionCheckBoxWidth width + containerFluidSpacing + scrollWidth.
1845
- const rowHeaderWidthToSub = containerFluidSpacing + selectionCheckBoxWidth + scrollWidth;
1846
- this.containerWidth = parentContainer.offsetWidth - rowHeaderWidthToSub;
1847
- }
1848
- clear() {
1849
- this.cleanItems();
1850
- this.uiControl = null;
1851
- }
1852
- toggleItems(isVisible) {
1853
- this.showItems = isVisible;
1854
- this.lockEvents = !isVisible;
1855
- }
1856
- updateScrollItems(startIndex, endIndex, loadInChunks = true) {
1857
- this.scrollItems = this.items.slice(startIndex, endIndex);
1858
- }
1859
- getUniqItemId(itemId, itemType = '') {
1860
- return itemId + this.SEPARATOR + itemType;
1861
- }
1862
- setLayout() {
1863
- if (this.totalRows === 0 ||
1864
- !this.uiControl ||
1865
- !this.uiControl.ControlFields ||
1866
- this.uiControl.ControlFields.length === 0) {
1867
- return;
1868
- }
1869
- this.uiControl.ControlFields.forEach((cf) => {
1870
- if (cf.ColumnWidth === 0) {
1871
- cf.ColumnWidth = 10;
1872
- }
1873
- if (this.isTable &&
1874
- (cf.FieldType === FIELD_TYPE.Image ||
1875
- // cf.FieldType === FIELD_TYPE.Indicators || ???
1876
- cf.FieldType === FIELD_TYPE.Signature ||
1877
- cf.FieldType === FIELD_TYPE.NumberIntegerQuantitySelector ||
1878
- cf.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
1879
- cf.FieldType === FIELD_TYPE.NumberIntegerForMatrix ||
1880
- cf.FieldType === FIELD_TYPE.NumberRealForMatrix ||
1881
- cf.FieldType === FIELD_TYPE.Package ||
1882
- cf.ApiName === 'UnitsQuantity' ||
1883
- cf.ApiName === 'QuantitySelector')) {
1884
- cf.Layout.XAlignment = 3;
1885
- }
1886
- });
1887
- if (!this.cd['destroyed']) {
1888
- this.cd.detectChanges();
1889
- }
1890
- // Set the columns width.
1891
- if (this.containerWidth <= 0) {
1892
- this.setContainerWidth();
1893
- }
1894
- this.calcColumnsWidth();
1895
- this.checkForChanges = new Date().getTime();
1896
- }
1897
- calcColumnsWidth() {
1898
- const fixedMultiple = 3.78; // for converting em to pixel.
1899
- const length = this.uiControl.ControlFields.length;
1900
- const selectionCheckBoxWidth = 0;
1901
- // Is table AND there is at least one column of width type of percentage.
1902
- if (this.isTable) {
1903
- if (this.uiControl && this.uiControl.ControlFields) {
1904
- this.hasColumnWidthOfTypePercentage =
1905
- this.uiControl.ControlFields.filter((cf) => cf.ColumnWidthType === 1).length === 0;
1906
- }
1907
- }
1908
- // If the columns size is fixed and the total is small then the container change it to percentage.
1909
- if (!this.hasColumnWidthOfTypePercentage) {
1910
- const totalFixedColsWidth = this.uiControl.ControlFields.map((cf) => cf.ColumnWidth * fixedMultiple).reduce((sum, current) => sum + current);
1911
- if (window.innerWidth > totalFixedColsWidth) {
1912
- this.hasColumnWidthOfTypePercentage = true;
1913
- }
1914
- }
1915
- let totalCalcColsWidth = 0;
1916
- // Calc by percentage
1917
- if (this.hasColumnWidthOfTypePercentage) {
1918
- const totalColsWidth = this.uiControl.ControlFields.map((cf) => cf.ColumnWidth).reduce((sum, current) => sum + current);
1919
- for (let index = 0; index < length; index++) {
1920
- const uiControlField = this.uiControl
1921
- .ControlFields[index];
1922
- const calcColumnWidthPercentage = (100 / totalColsWidth) * uiControlField.ColumnWidth;
1923
- uiControlField.calcColumnWidth = Math.floor((this.containerWidth * calcColumnWidthPercentage) / 100);
1924
- if (index === length - 1) {
1925
- uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString =
1926
- 'calc(100% - ' + totalCalcColsWidth + 'px)'; // For 100%
1927
- }
1928
- else {
1929
- uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString =
1930
- uiControlField.calcColumnWidth + 'px';
1931
- totalCalcColsWidth += uiControlField.calcColumnWidth;
1932
- }
1933
- }
1934
- this.renderer.setStyle(this.element.nativeElement, 'width', 'inherit');
1935
- }
1936
- else {
1937
- for (let index = 0; index < length; index++) {
1938
- const uiControlField = this.uiControl
1939
- .ControlFields[index];
1940
- const currentFixedWidth = Math.floor(uiControlField.ColumnWidth * fixedMultiple);
1941
- if (index === length - 1) {
1942
- uiControlField.calcTitleColumnWidthString =
1943
- currentFixedWidth + 'px';
1944
- uiControlField.calcColumnWidthString =
1945
- currentFixedWidth - 4 + 'px'; // -4 for the row padding.
1946
- }
1947
- else {
1948
- uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString =
1949
- currentFixedWidth + 'px';
1950
- }
1951
- totalCalcColsWidth += currentFixedWidth;
1952
- }
1953
- this.renderer.setStyle(this.element.nativeElement, 'width', totalCalcColsWidth + selectionCheckBoxWidth + 'px');
1954
- }
1955
- }
1956
- initResizeData() {
1957
- this.startX = 0;
1958
- this.startWidth = 0;
1959
- this.tableStartWidth = 0;
1960
- this.pressedColumn = '';
1961
- }
1962
- onListResizeStart(event, columnKey) {
1963
- this.pressedColumn = columnKey;
1964
- this.startX = event.x;
1965
- this.startWidth = event.target.closest('.header-column').offsetWidth;
1966
- // Set the tableStartWidth to the container offsetWidth
1967
- this.tableStartWidth = this.element.nativeElement.offsetWidth; // this.noVirtualScrollCont.nativeElement.offsetWidth;
1968
- }
1969
- onListResize(event) {
1970
- if (this.pressedColumn.length > 0) {
1971
- const widthToAdd = this.layoutService.isRtl()
1972
- ? this.startX - event.x
1973
- : event.x - this.startX;
1974
- // Set the width of the column and the container of the whole columns.
1975
- if (this.startWidth + widthToAdd >= 48 || widthToAdd > 0) {
1976
- const length = this.uiControl.ControlFields.length;
1977
- let totalCalcColsWidth = 0;
1978
- for (let index = 0; index < length; index++) {
1979
- const uiControlField = this.uiControl
1980
- .ControlFields[index];
1981
- if (index === length - 1) {
1982
- // Calc the last column only in percentage type.
1983
- if (this.hasColumnWidthOfTypePercentage) {
1984
- uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString =
1985
- 'calc(100% - ' + totalCalcColsWidth + 'px)'; // For 100%
1986
- }
1987
- else {
1988
- if (uiControlField.ApiName === this.pressedColumn) {
1989
- uiControlField.calcColumnWidth =
1990
- this.startWidth + widthToAdd;
1991
- uiControlField.calcTitleColumnWidthString =
1992
- uiControlField.calcColumnWidth + 'px';
1993
- uiControlField.calcColumnWidthString =
1994
- uiControlField.calcColumnWidth - 4 + 'px';
1995
- }
1996
- }
1997
- }
1998
- else if (uiControlField.ApiName === this.pressedColumn) {
1999
- uiControlField.calcColumnWidth =
2000
- this.startWidth + widthToAdd;
2001
- uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString =
2002
- uiControlField.calcColumnWidth + 'px';
2003
- }
2004
- totalCalcColsWidth += uiControlField.calcColumnWidth;
2005
- }
2006
- this.renderer.setStyle(this.element.nativeElement, 'width', this.tableStartWidth + widthToAdd + 'px');
2007
- }
2008
- this.checkForChanges = new Date().getTime();
2009
- }
2010
- }
2011
- getParent(el, parentSelector) {
2012
- // If no parentSelector defined will bubble up all the way to *document*
2013
- if (parentSelector === undefined) {
2014
- parentSelector = document;
2015
- }
2016
- const parent = [];
2017
- let p = el.parentNode;
2018
- while (p &&
2019
- p.className !== '' &&
2020
- p.className.indexOf(parentSelector) === -1 &&
2021
- parentSelector !== document) {
2022
- const o = p;
2023
- p = o.parentNode;
2024
- }
2025
- if (p.className.indexOf(parentSelector) > -1) {
2026
- parent.push(p); // Push that parentSelector you wanted to stop at
2027
- }
2028
- return parent;
2029
- }
2030
- onListResizeEnd(event) {
2031
- if (this.pressedColumn.length > 0) {
2032
- if (event &&
2033
- this.getParent(event.srcElement, 'resize-box').length > 0) {
2034
- this.initResizeData();
2035
- }
2036
- else {
2037
- setTimeout(() => {
2038
- this.initResizeData();
2039
- }, 0);
2040
- }
2041
- }
2042
- }
2043
- onListHeaderMouseEnter(event) {
2044
- // this.headerIsInFocus = true;
2045
- }
2046
- onListHeaderMouseLeave(event) {
2047
- // this.headerIsInFocus = false;
2048
- this.onListResizeEnd(event);
2049
- this.initResizeData();
2050
- }
2051
- onListChange(event) {
2052
- if (this.disableEvents) {
2053
- return;
2054
- }
2055
- // For other events do nothing.
2056
- if (typeof event.start === 'undefined' ||
2057
- typeof event.end === 'undefined') {
2058
- return;
2059
- }
2060
- this.calculatedObjectHeight = event.calculatedChildHeight + 'px';
2061
- if (!this.lockEvents) {
2062
- this.toggleItems(false);
2063
- this.updateScrollItems(event.start, event.end, false);
2064
- this.toggleItems(true);
2065
- }
2066
- }
2067
- getParentContainer() {
2068
- return this.parentScroll ? this.parentScroll : window;
2069
- }
2070
- onValueChanged(valueChange) {
2071
- if (this.disabled) {
2072
- return;
2073
- }
2074
- this.valueChange.emit(valueChange);
2075
- }
2076
- onCustomizeFieldClick(customizeFieldClickedData) {
2077
- if (this.disabled) {
2078
- return;
2079
- }
2080
- this.fieldClick.emit(customizeFieldClickedData);
2081
- }
2082
- getIsDisabled(item) {
2083
- if (this.disableSelectionItems) {
2084
- return true;
2085
- }
2086
- else {
2087
- const IsNotSelectableForActions = item && !item.IsSelectableForActions;
2088
- return IsNotSelectableForActions;
2089
- }
2090
- }
2091
- getIsItemSelected(itemId, itemType = '') {
2092
- let isSelected = false;
2093
- const uniqItemId = this.getUniqItemId(itemId, itemType);
2094
- isSelected = uniqItemId === this.selectedItemId;
2095
- return isSelected;
2096
- }
2097
- setItemClicked(itemId, isSelectableForActions, itemType, isChecked) {
2098
- const uniqItemId = this.getUniqItemId(itemId, itemType);
2099
- // select the selected item.
2100
- if (isChecked) {
2101
- // Set seleted item
2102
- this.selectedItemId = uniqItemId;
2103
- }
2104
- else {
2105
- if (this.selectedItemId === uniqItemId) {
2106
- this.selectedItemId = '';
2107
- }
2108
- }
2109
- }
2110
- itemClicked(e, item) {
2111
- // Set seleted item
2112
- const itemId = item.UID.toString();
2113
- const itemType = item.Type.toString();
2114
- let isChecked = false;
2115
- if (item && item.IsSelectableForActions) {
2116
- this.selectedItemId = this.getUniqItemId(itemId, itemType);
2117
- isChecked = true;
2118
- }
2119
- if (this.isTable) {
2120
- this.setItemClicked(itemId, item.IsSelectableForActions, itemType, true);
2121
- }
2122
- else {
2123
- if (this.disabled) {
2124
- return;
2125
- }
2126
- }
2127
- // this.itemClick.emit({ source: item, viewType: this.viewType });
2128
- }
2129
- onTableRowMouseEnter(event, itemId, itemType) {
2130
- if (!this.deviceHasMouse) {
2131
- return;
2132
- }
2133
- const uniqItemId = this.getUniqItemId(itemId, itemType);
2134
- this.hoveredItemId = uniqItemId;
2135
- }
2136
- onTableRowMouseLeave(event, itemId, itemType) {
2137
- this.hoveredItemId = '';
2138
- }
2139
- onCardMouseEnter(event, itemId, itemType) {
2140
- if (!this.deviceHasMouse) {
2141
- return;
2142
- }
2143
- const uniqItemId = this.getUniqItemId(itemId, itemType);
2144
- this.hoveredItemId = uniqItemId;
2145
- }
2146
- onCardMouseLeave(event, itemId, itemType) {
2147
- this.hoveredItemId = '';
2148
- }
2149
- // call this function after resize + animation end
2150
- winResize(e) {
2151
- this.containerWidth = 0;
2152
- this.setLayout();
2153
- }
2154
- trackByFunc(index, item) {
2155
- return item && item.UID ? item.UID : index;
2156
- }
2157
- cleanItems() {
2158
- this.itemsCounter = 0;
2159
- this._items =
2160
- this.totalRows > 0 ? Array(this.totalRows) : [];
2161
- this.scrollItems = [];
2162
- this.calculatedObjectHeight = '';
2163
- }
2164
- getUIControl() {
2165
- return this.uiControl;
2166
- }
2167
- initListData(uiControl, totalRows, items, viewType = 'table', itemClass = '') {
2168
- this.viewType = viewType;
2169
- this.isTable = viewType === 'table';
2170
- // this.isCardView = viewType === 'cards';
2171
- this.uiControl = uiControl;
2172
- this.itemClass = itemClass;
2173
- this.selectedItemId = '';
2174
- this.totalRows = totalRows;
2175
- // fix bug for the scrollTo that doesn't work on edge div , not window
2176
- // const scrollingElement = this.getParentContainer();
2177
- // scrollingElement.scrollTo(0, 0);
2178
- this.cleanItems();
2179
- this.updateItems(items);
2180
- this.setLayout();
2181
- }
2182
- updateItems(items) {
2183
- this.scrollItems = this._items = items;
2184
- this.itemsCounter = items.length;
2185
- }
2186
- updateItem(data) {
2187
- let index = 0;
2188
- // Update items list
2189
- index = this.items.findIndex((i) => i && i.UID === data.UID);
2190
- if (index >= 0 && index < this.items.length) {
2191
- this.items[index] = data;
2192
- }
2193
- // Update scrollItems list
2194
- index = this.scrollItems.findIndex((i) => i && i.UID === data.UID);
2195
- if (index >= 0 && index < this.scrollItems.length) {
2196
- this.scrollItems[index] = data;
2197
- this.checkForChanges = new Date().getTime();
2198
- }
2199
- }
2200
- getIsItemEditable(uid) {
2201
- const item = this.items.filter((x) => x.UID.toString() === uid);
2202
- if (item.length > 0) {
2203
- return item[0].IsEditable;
2204
- }
2205
- else {
2206
- return false;
2207
- }
2208
- }
2209
- getItemDataByID(uid) {
2210
- return this.items.find((item) => item.UID.toString() === uid);
2211
- }
2212
- }
2213
- PepInternalListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalListComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.PepLayoutService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
2214
- PepInternalListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepInternalListComponent, selector: "pep-internal-list", inputs: { noDataFoundMsg: "noDataFoundMsg", hideAllSelectionInMulti: "hideAllSelectionInMulti", top: "top", objectId: "objectId", parentId: "parentId", searchCode: "searchCode", supportResizing: "supportResizing", parentScroll: "parentScroll", disabled: "disabled", disableEvents: "disableEvents", disableSelectionItems: "disableSelectionItems", totalsRow: "totalsRow" }, outputs: { fieldClick: "fieldClick", valueChange: "valueChange" }, host: { listeners: { "window:resize": "winResize($event)" } }, viewQueries: [{ propertyName: "noVirtualScrollCont", first: true, predicate: ["noVirtualScrollCont"], descendants: true }, { propertyName: "tableHeader", first: true, predicate: ["tableHeader"], descendants: true }, { propertyName: "selectAllCB", first: true, predicate: ["selectAllCB"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"totalRows == 0\">\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ (noDataFoundMsg ? noDataFoundMsg : 'LIST.NO_DATA_FOUND') | translate}}\n </p>\n </div>\n <div class=\"no-data-suggestions\">\n <p class=\"suggestions-title title-lg\">\n {{ 'LIST.NO_DATA_FOUND_SUGGESTIONS_TITLE' | translate}}\n </p>\n <ul class=\"suggestions-list body-lg\" [innerHtml]=\"'LIST.NO_DATA_FOUND_SUGGESTIONS_LIST' | translate\"></ul>\n </div>\n</ng-container>\n<ng-container *ngIf=\"totalRows > 0\">\n <div *ngIf=\"isTable\" #tableHeader class=\"table-header\" (mouseup)=\"onListResizeEnd($event)\"\n (mouseenter)=\"onListHeaderMouseEnter($event)\" (mouseleave)=\"onListHeaderMouseLeave($event)\"\n (mousemove)=\"onListResize($event)\">\n\n <div class=\"table-header-padding-top\"></div>\n <fieldset class=\"table-header-fieldset\">\n <fieldset>\n <div *ngFor=\"let field of uiControl?.ControlFields; let j = index\" class=\"header-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\" [ngClass]=\"{\n 'is-resizing': field.ApiName === pressedColumn,\n 'is-first': j === 0,\n 'is-last': j === uiControl?.ControlFields?.length - 1\n }\">\n <label *ngIf=\"field.Title != ''\" id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip text-align-{{ field.Layout.XAlignment }}\"\n title=\"{{ field.Title }}\">\n {{ field.Title }}\n </label>\n <label *ngIf=\"field.Title == ''\" id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip\">&nbsp;</label>\n\n <div *ngIf=\"supportResizing\" class=\"resize-box pull-right flip\"\n (mousedown)=\"onListResizeStart($event, field.ApiName)\">\n <div class=\"splitter\"></div>\n </div>\n </div>\n </fieldset>\n </fieldset>\n </div>\n\n <div #noVirtualScrollCont [ngClass]=\"{ 'table-body': isTable, 'cards-body': !isTable }\">\n <ng-container *ngTemplateOutlet=\"listData\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"listTotals\"></ng-container>\n</ng-container>\n\n<ng-template #listData>\n <ng-container *ngFor=\"let item of scrollItems; let i = index; let isFirst = first; trackBy: trackByFunc\">\n <ng-container *ngIf=\"isTable\">\n <div class=\"table-row\" (mouseenter)=\"onTableRowMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onTableRowMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item?.UID, item?.Type),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId\n }\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: showItems || item ? 'visible' : 'hidden' }\">\n <fieldset class=\"table-row-fieldset\" [ngStyle]=\"{ 'background-color': item?.BackgroundColor }\">\n <!-- [canEditObject]=\"!disabled && item?.IsEditable\" -->\n <pep-internal-form [checkForChanges]=\"checkForChanges\" [layout]=\"uiControl\" [data]=\"item\"\n [canEditObject]=\"!disabled\" [objectId]=\"objectId\" [parentId]=\"parentId\"\n [searchCode]=\"searchCode\" [lockEvents]=\"disableSelectionItems\" [layoutType]=\"'table'\"\n [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-internal-form>\n </fieldset>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!isTable\">\n <div [class]=\"itemClass\" (mouseenter)=\"onCardMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onCardMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item?.UID, item?.Type),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId,\n 'card-view': viewType === 'cards',\n 'line-view': viewType === 'lines'\n }\" class=\"pull-left flip\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: showItems || item ? 'visible' : 'hidden' }\">\n <!-- [canEditObject]=\"!disabled && item?.IsEditable\" -->\n <pep-internal-form [checkForChanges]=\"checkForChanges\" [layout]=\"uiControl\" [data]=\"item\"\n [canEditObject]=\"!disabled\" [objectId]=\" objectId\" [parentId]=\"parentId\" [searchCode]=\"searchCode\"\n [lockEvents]=\"disableSelectionItems\" [layoutType]=\"'card'\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-internal-form>\n </div>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #listTotals>\n <div *ngIf=\"totalsRow?.length > 0 && totalsRow.length <= uiControl?.ControlFields.length\" class=\"table-total\">\n <fieldset class=\"table-header-fieldset\">\n <div *ngFor=\"let field of uiControl?.ControlFields; let j = index\" class=\"total-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\">\n <label class=\"total-label body-sm text-align-{{ field.Layout.XAlignment }}\">\n {{ totalsRow[j] }}\n </label>\n </div>\n </fieldset>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:grid}.no-data{margin:var(--pep-spacing-2xl, 2rem) 0}.no-data-suggestions .suggestions-title{margin:var(--pep-spacing-lg, 1rem) 0 var(--pep-spacing-sm, .5rem)}.no-data-suggestions .suggestions-list{margin:0;padding:0;padding-inline-start:var(--pep-spacing-2xl, 2rem)}.table-header{top:0}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PepInternalFormComponent, selector: "pep-internal-form", inputs: ["isInternal", "isReport", "layout", "lockEvents", "canEditObject", "data", "lockFields", "isActive", "layoutType", "objectId", "parentId", "searchCode", "showTitle", "firstFieldAsLink", "checkForChanges"], outputs: ["valueChange", "formValidationChange", "fieldClick"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] });
2215
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalListComponent, decorators: [{
2216
- type: Component,
2217
- args: [{ selector: 'pep-internal-list', host: {
2218
- '(window:resize)': 'winResize($event)',
2219
- }, template: "<ng-container *ngIf=\"totalRows == 0\">\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ (noDataFoundMsg ? noDataFoundMsg : 'LIST.NO_DATA_FOUND') | translate}}\n </p>\n </div>\n <div class=\"no-data-suggestions\">\n <p class=\"suggestions-title title-lg\">\n {{ 'LIST.NO_DATA_FOUND_SUGGESTIONS_TITLE' | translate}}\n </p>\n <ul class=\"suggestions-list body-lg\" [innerHtml]=\"'LIST.NO_DATA_FOUND_SUGGESTIONS_LIST' | translate\"></ul>\n </div>\n</ng-container>\n<ng-container *ngIf=\"totalRows > 0\">\n <div *ngIf=\"isTable\" #tableHeader class=\"table-header\" (mouseup)=\"onListResizeEnd($event)\"\n (mouseenter)=\"onListHeaderMouseEnter($event)\" (mouseleave)=\"onListHeaderMouseLeave($event)\"\n (mousemove)=\"onListResize($event)\">\n\n <div class=\"table-header-padding-top\"></div>\n <fieldset class=\"table-header-fieldset\">\n <fieldset>\n <div *ngFor=\"let field of uiControl?.ControlFields; let j = index\" class=\"header-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\" [ngClass]=\"{\n 'is-resizing': field.ApiName === pressedColumn,\n 'is-first': j === 0,\n 'is-last': j === uiControl?.ControlFields?.length - 1\n }\">\n <label *ngIf=\"field.Title != ''\" id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip text-align-{{ field.Layout.XAlignment }}\"\n title=\"{{ field.Title }}\">\n {{ field.Title }}\n </label>\n <label *ngIf=\"field.Title == ''\" id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip\">&nbsp;</label>\n\n <div *ngIf=\"supportResizing\" class=\"resize-box pull-right flip\"\n (mousedown)=\"onListResizeStart($event, field.ApiName)\">\n <div class=\"splitter\"></div>\n </div>\n </div>\n </fieldset>\n </fieldset>\n </div>\n\n <div #noVirtualScrollCont [ngClass]=\"{ 'table-body': isTable, 'cards-body': !isTable }\">\n <ng-container *ngTemplateOutlet=\"listData\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"listTotals\"></ng-container>\n</ng-container>\n\n<ng-template #listData>\n <ng-container *ngFor=\"let item of scrollItems; let i = index; let isFirst = first; trackBy: trackByFunc\">\n <ng-container *ngIf=\"isTable\">\n <div class=\"table-row\" (mouseenter)=\"onTableRowMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onTableRowMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item?.UID, item?.Type),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId\n }\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: showItems || item ? 'visible' : 'hidden' }\">\n <fieldset class=\"table-row-fieldset\" [ngStyle]=\"{ 'background-color': item?.BackgroundColor }\">\n <!-- [canEditObject]=\"!disabled && item?.IsEditable\" -->\n <pep-internal-form [checkForChanges]=\"checkForChanges\" [layout]=\"uiControl\" [data]=\"item\"\n [canEditObject]=\"!disabled\" [objectId]=\"objectId\" [parentId]=\"parentId\"\n [searchCode]=\"searchCode\" [lockEvents]=\"disableSelectionItems\" [layoutType]=\"'table'\"\n [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-internal-form>\n </fieldset>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!isTable\">\n <div [class]=\"itemClass\" (mouseenter)=\"onCardMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onCardMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item?.UID, item?.Type),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId,\n 'card-view': viewType === 'cards',\n 'line-view': viewType === 'lines'\n }\" class=\"pull-left flip\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: showItems || item ? 'visible' : 'hidden' }\">\n <!-- [canEditObject]=\"!disabled && item?.IsEditable\" -->\n <pep-internal-form [checkForChanges]=\"checkForChanges\" [layout]=\"uiControl\" [data]=\"item\"\n [canEditObject]=\"!disabled\" [objectId]=\" objectId\" [parentId]=\"parentId\" [searchCode]=\"searchCode\"\n [lockEvents]=\"disableSelectionItems\" [layoutType]=\"'card'\" [isActive]=\"\n (item?.UID + SEPARATOR + item?.Type === selectedItemId ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId) && deviceHasMouse\n \" (valueChange)=\"onValueChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\"\n (click)=\"itemClicked($event, item)\">\n </pep-internal-form>\n </div>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #listTotals>\n <div *ngIf=\"totalsRow?.length > 0 && totalsRow.length <= uiControl?.ControlFields.length\" class=\"table-total\">\n <fieldset class=\"table-header-fieldset\">\n <div *ngFor=\"let field of uiControl?.ControlFields; let j = index\" class=\"total-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\">\n <label class=\"total-label body-sm text-align-{{ field.Layout.XAlignment }}\">\n {{ totalsRow[j] }}\n </label>\n </div>\n </fieldset>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:grid}.no-data{margin:var(--pep-spacing-2xl, 2rem) 0}.no-data-suggestions .suggestions-title{margin:var(--pep-spacing-lg, 1rem) 0 var(--pep-spacing-sm, .5rem)}.no-data-suggestions .suggestions-list{margin:0;padding:0;padding-inline-start:var(--pep-spacing-2xl, 2rem)}.table-header{top:0}\n"] }]
2220
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.PepLayoutService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; }, propDecorators: { noDataFoundMsg: [{
2221
- type: Input
2222
- }], hideAllSelectionInMulti: [{
2223
- type: Input
2224
- }], top: [{
2225
- type: Input
2226
- }], objectId: [{
2227
- type: Input
2228
- }], parentId: [{
2229
- type: Input
2230
- }], searchCode: [{
2231
- type: Input
2232
- }], supportResizing: [{
2233
- type: Input
2234
- }], parentScroll: [{
2235
- type: Input
2236
- }], disabled: [{
2237
- type: Input
2238
- }], disableEvents: [{
2239
- type: Input
2240
- }], disableSelectionItems: [{
2241
- type: Input
2242
- }], totalsRow: [{
2243
- type: Input
2244
- }], fieldClick: [{
2245
- type: Output
2246
- }], valueChange: [{
2247
- type: Output
2248
- }], noVirtualScrollCont: [{
2249
- type: ViewChild,
2250
- args: ['noVirtualScrollCont']
2251
- }], tableHeader: [{
2252
- type: ViewChild,
2253
- args: ['tableHeader']
2254
- }], selectAllCB: [{
2255
- type: ViewChild,
2256
- args: ['selectAllCB']
2257
- }] } });
2258
-
2259
- class PepInternalPageComponent {
2260
- constructor(dialogService, internalPageService, customizationService, changeDetectorRef) {
2261
- this.dialogService = dialogService;
2262
- this.internalPageService = internalPageService;
2263
- this.customizationService = customizationService;
2264
- this.changeDetectorRef = changeDetectorRef;
2265
- this.controlType = 'internalPage';
2266
- this.layoutType = 'form';
2267
- this.internalFormFieldChange = new EventEmitter();
2268
- this.internalFormFieldClick = new EventEmitter();
2269
- this.checkForChanges = null;
2270
- this.childData = null;
2271
- this.totalsRow = [];
2272
- this.additionalApiNames = null;
2273
- this.currentAdditionalApiName = null;
2274
- this.focusedQS = false;
2275
- this.fieldIdWithFocus = '';
2276
- this.columnWidth = 100;
2277
- this.coverChildTable = false;
2278
- this.currentViewType = null;
2279
- this.sumOfMinColWidth = 0;
2280
- this.totalRowsWidth = 0;
2281
- this.viewWidth = '100%';
2282
- this.viewHeight = 'auto';
2283
- this.displayQSbtns = true;
2284
- this.selectedApiName = '';
2285
- this.showSort = false;
2286
- this.defaultRowSpan = -1;
2287
- }
2288
- fillData(isInDialog = false) {
2289
- var _a, _b, _c, _d, _e;
2290
- const view = this.matrixTemplate.createEmbeddedView(null);
2291
- (_a = this.customList) === null || _a === void 0 ? void 0 : _a.clear();
2292
- (_b = this.orgCont) === null || _b === void 0 ? void 0 : _b.clear();
2293
- if (isInDialog) {
2294
- (_c = this.dialogCont) === null || _c === void 0 ? void 0 : _c.clear();
2295
- (_d = this.dialogCont) === null || _d === void 0 ? void 0 : _d.insert(view);
2296
- }
2297
- else {
2298
- (_e = this.orgCont) === null || _e === void 0 ? void 0 : _e.insert(view);
2299
- }
2300
- setTimeout(() => {
2301
- const viewType = this.isTableView()
2302
- ? 'table'
2303
- : 'lines';
2304
- this.customList.initListData(this.uiControl, this.childData.TotalRows, this.childData.Rows, viewType);
2305
- this.setTotalsRow();
2306
- // if (!this.childModal.isShown) {
2307
- const childrenCount = this.childData.Rows
2308
- ? this.childData.Rows.length
2309
- : 0;
2310
- const isEven = childrenCount % 2 === 0;
2311
- // 3 for matrix & flat matrix because the header + total is 2 more rows.
2312
- const rowsToAdd = this.isMatrixView() || this.isFlatMatrixView()
2313
- ? isEven
2314
- ? 3
2315
- : 4
2316
- : 1;
2317
- const formRowHeight = this.customizationService.calculateFormFieldHeight() * 16; // convert rem to pixel
2318
- // Set the default only if not set yet.
2319
- if (this.defaultRowSpan === -1) {
2320
- this.defaultRowSpan = this.field.rowSpan;
2321
- }
2322
- this.sumOfMinColWidth = 0;
2323
- this.totalRowsWidth = 0;
2324
- this.childData.UIControl.ControlFields.forEach((uiControlField) => {
2325
- this.totalRowsWidth += uiControlField.ColumnWidth;
2326
- uiControlField.minFieldWidth = this.mmToPx(12); // NEED TO GET THIS PARAM FROM CUSTOMIZATION;
2327
- this.sumOfMinColWidth += 12;
2328
- });
2329
- this.setViewCover(this.childData.Rows);
2330
- if (this.coverChildTable) {
2331
- this.field.rowSpan = this.defaultRowSpan;
2332
- }
2333
- else {
2334
- // For line view Add the height of the line (form height).
2335
- if (this.currentViewType.Key === 'OrderCenterFlatMatrixLine') {
2336
- const maxRow = Math.max(...this.uiControl.ControlFields.map((f) => {
2337
- return f.Layout.Y + f.Layout.Height;
2338
- }));
2339
- // * 16 convert rem to pixel
2340
- const cardRowsHeight = this.customizationService.calculateCardRowsHeight(maxRow) * 16;
2341
- // maxRow * 24 + 60 - 24 for each row in card + 60 for the padding of each card.
2342
- // const rowSpanToAdd = childrenCount * ((cardRowsHeight + 24) / formRowHeight) + rowsToAdd;
2343
- const rowSpanToAdd = (childrenCount * (cardRowsHeight + 24)) /
2344
- formRowHeight +
2345
- rowsToAdd;
2346
- this.field.rowSpan = rowSpanToAdd;
2347
- }
2348
- else {
2349
- // const tableRowsHeight = this.customizationService.calculateTableRowsHeight(childrenCount) * 16;
2350
- // this.field.rowSpan = Math.ceil((tableRowsHeight + (rowsToAdd * 40)) / formRowHeight);
2351
- // * 16 convert rem to pixel
2352
- const rowsToAddHeight = this.customizationService.calculateTableRowsHeight(rowsToAdd, false) * 16;
2353
- const tableRowsHeight = this.customizationService.calculateTableRowsHeight(childrenCount) * 16;
2354
- this.field.rowSpan =
2355
- (rowsToAddHeight + tableRowsHeight) / formRowHeight;
2356
- }
2357
- }
2358
- }, 0);
2359
- this.changeDetectorRef.markForCheck();
2360
- }
2361
- fillChildData(res) {
2362
- this.childData = res;
2363
- this.uiControl = res.UIControl;
2364
- this.additionalApiNames = res.AdditionalApiNames;
2365
- this.fillData();
2366
- }
2367
- mmToPx(mm) {
2368
- const height = this.my1mm.nativeElement.clientHeight;
2369
- return Math.floor(mm * height); // returns sizes in PX
2370
- }
2371
- isMatrixView() {
2372
- return (this.currentViewType &&
2373
- this.currentViewType.Key === 'OrderCenterMatrix');
2374
- }
2375
- isFlatMatrixView() {
2376
- return (this.currentViewType &&
2377
- this.currentViewType.Key === 'OrderCenterFlatMatrixGrid');
2378
- }
2379
- isTableView() {
2380
- return this.isMatrixView() || this.isFlatMatrixView();
2381
- }
2382
- changeChildrenViewType(viewTypeKey) {
2383
- this.rows = [];
2384
- this.uiControl = null;
2385
- for (const vt of this.childViewTypes) {
2386
- if (vt.Key === viewTypeKey) {
2387
- this.currentViewType = vt;
2388
- break;
2389
- }
2390
- }
2391
- this.currentViewTypeTitle = this.currentViewType.Value;
2392
- this.internalPageService.changeChildrenViewType(this.currentViewType.Key, (res) => {
2393
- if (res.Rows) {
2394
- this.fillChildData(res);
2395
- }
2396
- });
2397
- }
2398
- setViewCover(rows) {
2399
- if (!rows) {
2400
- return;
2401
- }
2402
- const matrixCont = this.mainViewCont.nativeElement;
2403
- const viewWidth = matrixCont.clientWidth;
2404
- this.viewWidth = viewWidth ? viewWidth.toString() : '100%';
2405
- // if the matrix located on the bottom / there is nothing under the matrix we dont need to check the height
2406
- if (parseInt(viewWidth, 10) < this.mmToPx(this.sumOfMinColWidth)) {
2407
- this.coverChildTable = true;
2408
- }
2409
- else {
2410
- this.coverChildTable = false;
2411
- }
2412
- this.changeDetectorRef.markForCheck();
2413
- }
2414
- showMatrixDialog() {
2415
- const config = this.dialogService.getDialogConfig({
2416
- disableClose: false,
2417
- }, 'large');
2418
- const dialogRef = this.dialogService.openDialog(this.matrixDialogTemplate, {}, config);
2419
- dialogRef.afterOpened().subscribe(() => {
2420
- this.fillData(true);
2421
- });
2422
- dialogRef.afterClosed().subscribe((value) => {
2423
- this.fillData(false);
2424
- });
2425
- }
2426
- ngOnInit() {
2427
- // let field = this.field as PepInternalPageField;
2428
- this.internalPageService.initDetails(this.field.objectId, this.field.parentId, this.field.searchCode, (resViewTypes) => {
2429
- // my code DI-7134
2430
- resViewTypes.Rows = resViewTypes.Rows.filter((item) => item.Key !== 'OrderCenterView1');
2431
- if (resViewTypes.Rows && resViewTypes.Rows.length > 0) {
2432
- if (!resViewTypes.Default) {
2433
- resViewTypes.Default = resViewTypes.Rows[0].Key;
2434
- }
2435
- this.childViewTypes = resViewTypes.Rows;
2436
- this.currentViewType = resViewTypes.Rows[0];
2437
- // for (var i = 0; i < resViewTypes.Rows.length; i++) {
2438
- for (const viewTypeRow of resViewTypes.Rows) {
2439
- if (viewTypeRow.Value === resViewTypes.Default) {
2440
- this.currentViewType = viewTypeRow;
2441
- }
2442
- }
2443
- this.loadLastAdditionalApiName();
2444
- this.changeChildrenViewType(this.currentViewType.Key);
2445
- }
2446
- });
2447
- this.resize = fromEvent(window, 'resize')
2448
- .pipe(debounceTime(10))
2449
- .subscribe((event) => {
2450
- this.setViewCover(this.rows);
2451
- });
2452
- }
2453
- loadLastAdditionalApiName() {
2454
- const daa = sessionStorage.getItem(PepInternalPageComponent.CURRENT_ADDITIONAL_API_NAME);
2455
- if (daa && daa.length > 0) {
2456
- const additionalApiName = JSON.parse(daa);
2457
- this.currentAdditionalApiName = additionalApiName;
2458
- this.internalPageService.additionalApiName = additionalApiName === null || additionalApiName === void 0 ? void 0 : additionalApiName.Key;
2459
- }
2460
- }
2461
- ngOnDestroy() {
2462
- if (this.resize) {
2463
- this.resize.unsubscribe();
2464
- }
2465
- }
2466
- changeAdditionalApiName(additionalApiName) {
2467
- this.internalPageService.changeAdditionalApiName(additionalApiName ? additionalApiName.Key : '', (res) => {
2468
- // for (let index = 0; index < res.Rows.length; index++) {
2469
- for (const row of res.Rows) {
2470
- this.updateChanges(row);
2471
- }
2472
- this.changeDetectorRef.markForCheck();
2473
- });
2474
- sessionStorage.setItem(PepInternalPageComponent.CURRENT_ADDITIONAL_API_NAME, JSON.stringify(additionalApiName));
2475
- setTimeout(() => {
2476
- this.currentAdditionalApiName = additionalApiName;
2477
- }, 0);
2478
- }
2479
- setTotalsRow() {
2480
- this.totalsRow = [];
2481
- if (this.isMatrixView() || this.isFlatMatrixView()) {
2482
- let totalCol = 0;
2483
- const items = this.customList.items;
2484
- if (items) {
2485
- for (let col = 0; col < items[0].Fields.length; col++) {
2486
- const field = items[0].Fields[col];
2487
- if (field.FieldType === FIELD_TYPE.NumberIntegerForMatrix ||
2488
- field.FieldType ===
2489
- FIELD_TYPE.NumberIntegerQuantitySelector ||
2490
- field.FieldType === FIELD_TYPE.NumberRealForMatrix ||
2491
- field.FieldType ===
2492
- FIELD_TYPE.NumberRealQuantitySelector ||
2493
- field.FieldType === FIELD_TYPE.CalculatedInt ||
2494
- field.FieldType === FIELD_TYPE.NumberInteger ||
2495
- field.FieldType === FIELD_TYPE.CalculatedReal ||
2496
- field.FieldType === FIELD_TYPE.NumberReal) {
2497
- totalCol = 0;
2498
- for (const listItem of items) {
2499
- if (listItem.Fields[col] &&
2500
- listItem.Fields[col].Value) {
2501
- const num = parseFloat(listItem.Fields[col].Value);
2502
- totalCol += isNaN(num) ? 0 : num;
2503
- }
2504
- }
2505
- this.totalsRow.push(totalCol);
2506
- }
2507
- else {
2508
- this.totalsRow.push('');
2509
- }
2510
- }
2511
- }
2512
- }
2513
- }
2514
- updateChanges(elementToUpdate) {
2515
- this.customList.updateItem(elementToUpdate);
2516
- // Update memory data
2517
- for (let index = 0; index < this.childData.Rows.length; index++) {
2518
- if (this.childData.Rows[index].UID === elementToUpdate.UID) {
2519
- this.childData.Rows[index] = elementToUpdate;
2520
- }
2521
- }
2522
- }
2523
- setValueCallback(id, res) {
2524
- if (res.Rows.length === 1) {
2525
- const field = res.Rows[0].Fields.find((f) => f.ApiName === 'ObjectMenu');
2526
- if (field) {
2527
- // HACK : Until "Enabled" returns from the server, we set PepMenu to be
2528
- // Disabled in cart on regular items and not campign items.
2529
- field.Enabled = true;
2530
- }
2531
- this.updateChanges(res.Rows[0]);
2532
- }
2533
- this.setTotalsRow();
2534
- this.checkForChanges = new Date();
2535
- // DI-15985
2536
- this.internalFormFieldChange.emit(res);
2537
- this.changeDetectorRef.markForCheck();
2538
- }
2539
- onCustomizeObjectChanged(customizeObjectChangedData) {
2540
- this.internalPageService.childValueChanged(customizeObjectChangedData.id, customizeObjectChangedData.key, customizeObjectChangedData.value, (res) => {
2541
- this.setValueCallback(customizeObjectChangedData.id, res);
2542
- });
2543
- }
2544
- onCustomizeFieldClick(fieldClickEvent) {
2545
- let handledEvent = false;
2546
- // For the new custom form, the plus and minus events transform in the IPepFormFieldValueChangeEvent
2547
- if (fieldClickEvent.controlType === 'qs') {
2548
- if (fieldClickEvent.value === PepQuantitySelectorComponent.PLUS) {
2549
- handledEvent = true;
2550
- this.internalPageService.childPlusClick(fieldClickEvent.id, fieldClickEvent.key, (res) => {
2551
- this.setValueCallback(fieldClickEvent.id, res);
2552
- });
2553
- }
2554
- else if (fieldClickEvent.value === PepQuantitySelectorComponent.MINUS) {
2555
- handledEvent = true;
2556
- this.internalPageService.childMinusClick(fieldClickEvent.id, fieldClickEvent.key, (res) => {
2557
- this.setValueCallback(fieldClickEvent.id, res);
2558
- });
2559
- }
2560
- }
2561
- if (!handledEvent) {
2562
- this.internalFormFieldClick.emit(fieldClickEvent);
2563
- }
2564
- }
2565
- }
2566
- PepInternalPageComponent.CURRENT_ADDITIONAL_API_NAME = 'item_details_currentAdditionalApiName';
2567
- PepInternalPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalPageComponent, deps: [{ token: i1$2.PepDialogService }, { token: PepInternalPageService }, { token: i1$1.PepCustomizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2568
- PepInternalPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepInternalPageComponent, selector: "pep-internal-page", inputs: { field: "field", layoutType: "layoutType" }, outputs: { internalFormFieldChange: "internalFormFieldChange", internalFormFieldClick: "internalFormFieldClick" }, providers: [PepInternalPageService], viewQueries: [{ propertyName: "my1mm", first: true, predicate: ["my1mm"], descendants: true }, { propertyName: "mainViewCont", first: true, predicate: ["mainViewCont"], descendants: true }, { propertyName: "orgCont", first: true, predicate: ["orgCont"], descendants: true, read: ViewContainerRef }, { propertyName: "dialogCont", first: true, predicate: ["dialogCont"], descendants: true, read: ViewContainerRef }, { propertyName: "matrixTemplate", first: true, predicate: ["matrixTemplate"], descendants: true }, { propertyName: "matrixDialogTemplate", first: true, predicate: ["matrixDialogTemplate"], descendants: true, read: TemplateRef }, { propertyName: "customList", first: true, predicate: PepInternalListComponent, descendants: true }], ngImport: i0, template: "<ng-template #matrixHeaderTemplate>\n <div class=\"matrix-title-container pep-border-bottom align-{{\n field.xAlignment\n }}\" title=\"{{ field.label }}\">\n <span class=\"block-with-text body-md\">{{ field.label }}</span>\n\n <div class=\"buttons-container pep-spacing-element-negative pull-right flip\">\n <ng-container *ngIf=\"\n currentViewType?.Key == 'OrderCenterMatrix' &&\n additionalApiNames &&\n additionalApiNames.length > 0\n \">\n <button class=\"pep-spacing-element pep-button icon-button sm weak\" mat-button [matMenuTriggerFor]=\"menu\"\n menu-blur>\n <span class=\"pull-left flip\" *ngIf=\"currentAdditionalApiName\">&nbsp;{{\n currentAdditionalApiName?.Value }}&nbsp;</span>\n\n <mat-icon [ngClass]=\"{'pull-left flip': currentAdditionalApiName}\">\n <pep-icon name=\"system_info\"></pep-icon>\n </mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item [ngClass]=\"{\n selected: currentAdditionalApiName === null\n }\" (click)=\"changeAdditionalApiName(null)\">\n <span>{{ \"LIST.NONE\" | translate }}</span>\n </button>\n <button mat-menu-item [ngClass]=\"{\n selected:\n currentAdditionalApiName?.Key ==\n additionalApiName?.Key\n }\" *ngFor=\"let additionalApiName of additionalApiNames\"\n (click)=\"changeAdditionalApiName(additionalApiName)\">\n <span>{{ additionalApiName.Value }}</span>\n </button>\n </mat-menu>\n </ng-container>\n <ng-container *ngIf=\"childViewTypes && childViewTypes.length > 1\">\n <button class=\"pep-spacing-element pep-button icon-button sm weak\" mat-button\n [matMenuTriggerFor]=\"viewsMenu\" menu-blur>\n <mat-icon>\n <pep-icon name=\"view_card_md\"></pep-icon>\n </mat-icon>\n </button>\n\n <mat-menu #viewsMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item [ngClass]=\"{\n selected: currentViewType?.Key == viewType?.Key\n }\" *ngFor=\"let viewType of childViewTypes\" (click)=\"changeChildrenViewType(viewType?.Key)\">\n <mat-icon [ngSwitch]=\"viewType?.Key\">\n <pep-icon *ngSwitchCase=\"'OrderCenterMatrix'\" name=\"view_matrix\"></pep-icon>\n <pep-icon *ngSwitchCase=\"'OrderCenterFlatMatrixGrid'\" name=\"view_table\"></pep-icon>\n <pep-icon *ngSwitchCase=\"'OrderCenterFlatMatrixLine'\" name=\"view_line\"></pep-icon>\n </mat-icon>\n <span>{{ viewType?.Value }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n </div>\n\n</ng-template>\n\n<ng-template #matrixTemplate>\n <div #matrixContainer class=\"matrix-container\">\n <pep-internal-list (valueChange)=\"onCustomizeObjectChanged($event)\" [parentScroll]=\"matrixContainer\"\n (fieldClick)=\"onCustomizeFieldClick($event)\" [totalsRow]=\"totalsRow\"></pep-internal-list>\n </div>\n</ng-template>\n\n<div #mainViewCont id=\"mainViewCont\" [ngStyle]=\"{ 'max-width': viewWidth, 'max-height': viewHeight }\">\n <div #my1mm id=\"my1_mm\" style=\"height:1mm;width:1mm;visibility: hidden;\"></div>\n <ng-container *ngIf=\"coverChildTable && uiControl != null\">\n <div class=\"table-cover\"></div>\n <button (click)=\"showMatrixDialog()\" class=\"pep-button strong sm table-cover-button\"\n [ngClass]=\"{ 'lineview-btn': currentViewType?.Key == 'OrderCenterFlatMatrixLine'}\">\n {{ \"INTERNAL_PAGE.CLICK_TO_ORDER\" | translate }}\n </button>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"matrixHeaderTemplate\"></ng-container>\n <ng-container #orgCont></ng-container>\n</div>\n\n<ng-template #matrixDialogTemplate>\n\n <div mat-dialog-title>\n <ng-container *ngTemplateOutlet=\"matrixHeaderTemplate\"></ng-container>\n </div>\n\n <div mat-dialog-content>\n <ng-container #dialogCont></ng-container>\n </div>\n</ng-template>\n\n<!-- <div id=\"childGridModal\" bsModal (onShown)=\"onShown()\" (onHidden)=\"onHidden()\" #childModal=\"bs-modal\" class=\"modal\"\n tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"gridModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-body matrix-dialog-body\">\n <ng-container #modalCont></ng-container>\n </div>\n </div>\n </div>\n</div> -->", styles: [":host{display:grid;width:inherit;height:inherit}.matrix-title-container{padding:0;height:var(--pep-form-field-height, 2.5rem);display:flex;align-items:flex-end}.matrix-title-container .block-with-text{width:100%;max-height:inherit;font-weight:var(--pep-font-weight-bold, 600);display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.matrix-title-container .buttons-container{display:flex;align-self:center}.matrix-title-container .buttons-container .pepperi-button,.matrix-title-container .buttons-container .pep-button{width:max-content}#mainViewCont{width:100%;height:inherit;overflow:hidden;padding:0 var(--pep-spacing-xs, .25rem)}#mainViewCont .table-cover{background-color:#fff;z-index:98;position:absolute;top:0;width:100%;height:inherit;opacity:.5}#mainViewCont .table-cover-button{position:absolute;left:50%;transform:translate(-50%,-50%);top:calc(50% + var(--pep-form-field-height, 2.5rem));z-index:99}#mainViewCont .table-cover-button.lineview-btn{top:calc(2 * var(--pep-form-field-height, 2.5rem));transform:translate(-50%)}#mainViewCont .underCover{max-height:inherit;overflow:hidden}#mainViewCont ::ng-deep .table-header{top:unset!important}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: PepInternalListComponent, selector: "pep-internal-list", inputs: ["noDataFoundMsg", "hideAllSelectionInMulti", "top", "objectId", "parentId", "searchCode", "supportResizing", "parentScroll", "disabled", "disableEvents", "disableSelectionItems", "totalsRow"], outputs: ["fieldClick", "valueChange"] }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2569
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalPageComponent, decorators: [{
2570
- type: Component,
2571
- args: [{ selector: 'pep-internal-page', providers: [PepInternalPageService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #matrixHeaderTemplate>\n <div class=\"matrix-title-container pep-border-bottom align-{{\n field.xAlignment\n }}\" title=\"{{ field.label }}\">\n <span class=\"block-with-text body-md\">{{ field.label }}</span>\n\n <div class=\"buttons-container pep-spacing-element-negative pull-right flip\">\n <ng-container *ngIf=\"\n currentViewType?.Key == 'OrderCenterMatrix' &&\n additionalApiNames &&\n additionalApiNames.length > 0\n \">\n <button class=\"pep-spacing-element pep-button icon-button sm weak\" mat-button [matMenuTriggerFor]=\"menu\"\n menu-blur>\n <span class=\"pull-left flip\" *ngIf=\"currentAdditionalApiName\">&nbsp;{{\n currentAdditionalApiName?.Value }}&nbsp;</span>\n\n <mat-icon [ngClass]=\"{'pull-left flip': currentAdditionalApiName}\">\n <pep-icon name=\"system_info\"></pep-icon>\n </mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item [ngClass]=\"{\n selected: currentAdditionalApiName === null\n }\" (click)=\"changeAdditionalApiName(null)\">\n <span>{{ \"LIST.NONE\" | translate }}</span>\n </button>\n <button mat-menu-item [ngClass]=\"{\n selected:\n currentAdditionalApiName?.Key ==\n additionalApiName?.Key\n }\" *ngFor=\"let additionalApiName of additionalApiNames\"\n (click)=\"changeAdditionalApiName(additionalApiName)\">\n <span>{{ additionalApiName.Value }}</span>\n </button>\n </mat-menu>\n </ng-container>\n <ng-container *ngIf=\"childViewTypes && childViewTypes.length > 1\">\n <button class=\"pep-spacing-element pep-button icon-button sm weak\" mat-button\n [matMenuTriggerFor]=\"viewsMenu\" menu-blur>\n <mat-icon>\n <pep-icon name=\"view_card_md\"></pep-icon>\n </mat-icon>\n </button>\n\n <mat-menu #viewsMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item [ngClass]=\"{\n selected: currentViewType?.Key == viewType?.Key\n }\" *ngFor=\"let viewType of childViewTypes\" (click)=\"changeChildrenViewType(viewType?.Key)\">\n <mat-icon [ngSwitch]=\"viewType?.Key\">\n <pep-icon *ngSwitchCase=\"'OrderCenterMatrix'\" name=\"view_matrix\"></pep-icon>\n <pep-icon *ngSwitchCase=\"'OrderCenterFlatMatrixGrid'\" name=\"view_table\"></pep-icon>\n <pep-icon *ngSwitchCase=\"'OrderCenterFlatMatrixLine'\" name=\"view_line\"></pep-icon>\n </mat-icon>\n <span>{{ viewType?.Value }}</span>\n </button>\n </mat-menu>\n </ng-container>\n </div>\n </div>\n\n</ng-template>\n\n<ng-template #matrixTemplate>\n <div #matrixContainer class=\"matrix-container\">\n <pep-internal-list (valueChange)=\"onCustomizeObjectChanged($event)\" [parentScroll]=\"matrixContainer\"\n (fieldClick)=\"onCustomizeFieldClick($event)\" [totalsRow]=\"totalsRow\"></pep-internal-list>\n </div>\n</ng-template>\n\n<div #mainViewCont id=\"mainViewCont\" [ngStyle]=\"{ 'max-width': viewWidth, 'max-height': viewHeight }\">\n <div #my1mm id=\"my1_mm\" style=\"height:1mm;width:1mm;visibility: hidden;\"></div>\n <ng-container *ngIf=\"coverChildTable && uiControl != null\">\n <div class=\"table-cover\"></div>\n <button (click)=\"showMatrixDialog()\" class=\"pep-button strong sm table-cover-button\"\n [ngClass]=\"{ 'lineview-btn': currentViewType?.Key == 'OrderCenterFlatMatrixLine'}\">\n {{ \"INTERNAL_PAGE.CLICK_TO_ORDER\" | translate }}\n </button>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"matrixHeaderTemplate\"></ng-container>\n <ng-container #orgCont></ng-container>\n</div>\n\n<ng-template #matrixDialogTemplate>\n\n <div mat-dialog-title>\n <ng-container *ngTemplateOutlet=\"matrixHeaderTemplate\"></ng-container>\n </div>\n\n <div mat-dialog-content>\n <ng-container #dialogCont></ng-container>\n </div>\n</ng-template>\n\n<!-- <div id=\"childGridModal\" bsModal (onShown)=\"onShown()\" (onHidden)=\"onHidden()\" #childModal=\"bs-modal\" class=\"modal\"\n tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"gridModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-body matrix-dialog-body\">\n <ng-container #modalCont></ng-container>\n </div>\n </div>\n </div>\n</div> -->", styles: [":host{display:grid;width:inherit;height:inherit}.matrix-title-container{padding:0;height:var(--pep-form-field-height, 2.5rem);display:flex;align-items:flex-end}.matrix-title-container .block-with-text{width:100%;max-height:inherit;font-weight:var(--pep-font-weight-bold, 600);display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.matrix-title-container .buttons-container{display:flex;align-self:center}.matrix-title-container .buttons-container .pepperi-button,.matrix-title-container .buttons-container .pep-button{width:max-content}#mainViewCont{width:100%;height:inherit;overflow:hidden;padding:0 var(--pep-spacing-xs, .25rem)}#mainViewCont .table-cover{background-color:#fff;z-index:98;position:absolute;top:0;width:100%;height:inherit;opacity:.5}#mainViewCont .table-cover-button{position:absolute;left:50%;transform:translate(-50%,-50%);top:calc(50% + var(--pep-form-field-height, 2.5rem));z-index:99}#mainViewCont .table-cover-button.lineview-btn{top:calc(2 * var(--pep-form-field-height, 2.5rem));transform:translate(-50%)}#mainViewCont .underCover{max-height:inherit;overflow:hidden}#mainViewCont ::ng-deep .table-header{top:unset!important}\n"] }]
2572
- }], ctorParameters: function () { return [{ type: i1$2.PepDialogService }, { type: PepInternalPageService }, { type: i1$1.PepCustomizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { field: [{
2573
- type: Input
2574
- }], layoutType: [{
2575
- type: Input
2576
- }], internalFormFieldChange: [{
2577
- type: Output
2578
- }], internalFormFieldClick: [{
2579
- type: Output
2580
- }], my1mm: [{
2581
- type: ViewChild,
2582
- args: ['my1mm']
2583
- }], mainViewCont: [{
2584
- type: ViewChild,
2585
- args: ['mainViewCont']
2586
- }], orgCont: [{
2587
- type: ViewChild,
2588
- args: ['orgCont', { read: ViewContainerRef }]
2589
- }], dialogCont: [{
2590
- type: ViewChild,
2591
- args: ['dialogCont', { read: ViewContainerRef }]
2592
- }], matrixTemplate: [{
2593
- type: ViewChild,
2594
- args: ['matrixTemplate']
2595
- }], matrixDialogTemplate: [{
2596
- type: ViewChild,
2597
- args: ['matrixDialogTemplate', { read: TemplateRef }]
2598
- }], customList: [{
2599
- type: ViewChild,
2600
- args: [PepInternalListComponent]
2601
- }] } });
2602
-
2603
- class PepInternalCaruselService {
2604
- constructor(httpService) {
2605
- this.httpService = httpService;
2606
- this.eventUrl = 'Service1.svc/v1/EmitEvent';
2607
- }
2608
- emitEvent(uiObjectKey, fieldKey, fieldValue, eventName, callbackFunc) {
2609
- const body = {
2610
- 'EventKey': eventName,
2611
- 'EventData': JSON.stringify({
2612
- UIObjectKey: uiObjectKey,
2613
- FieldID: fieldKey,
2614
- Value: fieldValue
2615
- })
2616
- };
2617
- this.httpService.postWapiApiCall(`${this.eventUrl}`, body).subscribe((res) => {
2618
- console.log(res);
2619
- callbackFunc(res);
2620
- }
2621
- // (error) => {},
2622
- // () => {}
2623
- );
2624
- }
2625
- }
2626
- PepInternalCaruselService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalCaruselService, deps: [{ token: i1$1.PepHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2627
- PepInternalCaruselService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalCaruselService });
2628
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalCaruselService, decorators: [{
2629
- type: Injectable
2630
- }], ctorParameters: function () { return [{ type: i1$1.PepHttpService }]; } });
2631
-
2632
- class PepInternalCaruselComponent {
2633
- set field(value) {
2634
- this._field = value;
2635
- const caruselField = this._field;
2636
- if (caruselField && caruselField.pageInfo) {
2637
- this.layout = caruselField.pageInfo.UIControl;
2638
- this.items = caruselField.pageInfo.Rows;
2639
- }
2640
- }
2641
- get field() {
2642
- return this._field;
2643
- }
2644
- set items(value) {
2645
- this._items = value;
2646
- // this.moveTo(0);
2647
- }
2648
- get items() {
2649
- return this._items;
2650
- }
2651
- constructor(layoutService, internalCaruselService) {
2652
- this.layoutService = layoutService;
2653
- this.internalCaruselService = internalCaruselService;
2654
- this.layoutType = 'form';
2655
- this.internalFormFieldChange = new EventEmitter();
2656
- this.internalFormFieldClick = new EventEmitter();
2657
- this._items = null;
2658
- this.layout = null;
2659
- this.duration = 250;
2660
- this.itemsToMove = 3;
2661
- this.prevDisabled = true;
2662
- this.nextDisabled = false;
2663
- this.PepScreenSizeType = PepScreenSizeType;
2664
- }
2665
- ngOnInit() {
2666
- //
2667
- }
2668
- ngAfterViewInit() {
2669
- this.layoutService.onResize$.subscribe((size) => {
2670
- this.screenSize = size;
2671
- });
2672
- }
2673
- onCustomizeObjectChanged(customizeObjectChangedData) {
2674
- this.internalCaruselService.emitEvent(customizeObjectChangedData.uiObjectKey, customizeObjectChangedData.key, customizeObjectChangedData.value, 'SetFieldValue', () => {
2675
- this.internalFormFieldChange.emit(customizeObjectChangedData);
2676
- });
2677
- }
2678
- onCustomizeFieldClick(fieldClickEvent) {
2679
- let handledEvent = false;
2680
- // For the new custom form, the plus and minus events transform in the IPepFormFieldValueChangeEvent
2681
- if (fieldClickEvent.controlType === 'qs') {
2682
- if (fieldClickEvent.value === PepQuantitySelectorComponent.PLUS) {
2683
- handledEvent = true;
2684
- this.internalCaruselService.emitEvent(fieldClickEvent.uiObjectKey, fieldClickEvent.key, '', 'IncrementFieldValue', () => {
2685
- this.internalFormFieldChange.emit({});
2686
- });
2687
- }
2688
- else if (fieldClickEvent.value === PepQuantitySelectorComponent.MINUS) {
2689
- handledEvent = true;
2690
- this.internalCaruselService.emitEvent(fieldClickEvent.uiObjectKey, fieldClickEvent.key, '', 'DecrementFieldValue', () => {
2691
- this.internalFormFieldChange.emit({});
2692
- });
2693
- }
2694
- }
2695
- if (!handledEvent) {
2696
- this.internalFormFieldClick.emit(fieldClickEvent);
2697
- }
2698
- }
2699
- moveLeft() {
2700
- const indexToMove = Math.max(this.carousel.currIndex - this.itemsToMove, 0);
2701
- this.moveTo(indexToMove);
2702
- }
2703
- moveRight() {
2704
- const indexToMove = Math.min(this.carousel.currIndex + this.itemsToMove, this.items.length);
2705
- this.moveTo(indexToMove);
2706
- }
2707
- moveTo(index) {
2708
- if (this.carousel) {
2709
- this.carousel.moveTo(index);
2710
- }
2711
- }
2712
- onReachesLeftBound(event) {
2713
- // this.prevDisabled = event;
2714
- }
2715
- onReachesRightBound(event) {
2716
- this.nextDisabled = event;
2717
- }
2718
- onIndexChanged(event) {
2719
- this.prevDisabled = event === 0;
2720
- // this.nextDisabled = event === this.items.length - 1;
2721
- }
2722
- }
2723
- PepInternalCaruselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalCaruselComponent, deps: [{ token: i1$1.PepLayoutService }, { token: PepInternalCaruselService }], target: i0.ɵɵFactoryTarget.Component });
2724
- PepInternalCaruselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepInternalCaruselComponent, selector: "pep-internal-carusel", inputs: { field: "field", layoutType: "layoutType" }, outputs: { internalFormFieldChange: "internalFormFieldChange", internalFormFieldClick: "internalFormFieldClick" }, providers: [PepInternalCaruselService], viewQueries: [{ propertyName: "carousel", first: true, predicate: ["carousel"], descendants: true, read: PepCarouselComponent }], ngImport: i0, template: "<div class=\"carousel-container\">\n <ng-container *ngIf=\"items?.length > 0; then carouselBlock; else emptyBlock\"></ng-container>\n <ng-template #emptyBlock>\n <!-- No items -->\n </ng-template>\n <ng-template #carouselBlock>\n <pep-button *ngIf=\"screenSize <= PepScreenSizeType.SM\" [iconName]=\"'arrow_left_alt'\" [styleType]=\"'regular'\"\n [disabled]=\"prevDisabled\" (click)=\"moveLeft()\" class=\"carousel-arrow start-arrow\">\n </pep-button>\n <pep-carousel #carousel [xWheelEnabled]=\"false\" [snapDuration]=\"duration\"\n (reachesLeftBound)=\"onReachesLeftBound($event)\" (reachesRightBound)=\"onReachesRightBound($event)\" (indexChanged)=\"onIndexChanged($event)\">\n <ng-container *ngFor=\"let item of items\">\n <pep-internal-form pepCarouselItem [layout]=\"layout\" [data]=\"item\" [layoutType]=\"'card'\" class=\"card-view \"\n (valueChange)=\"onCustomizeObjectChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\">\n </pep-internal-form>\n </ng-container>\n </pep-carousel>\n <pep-button *ngIf=\"screenSize <= PepScreenSizeType.SM\" [iconName]=\"'arrow_right_alt'\" [styleType]=\"'regular'\"\n [disabled]=\"nextDisabled\" (click)=\"moveRight()\" class=\"carousel-arrow end-arrow\">\n </pep-button>\n </ng-template>\n</div>", styles: [".carousel-container{position:relative;margin:0;display:grid}.carousel-container .carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:1}.carousel-container .carousel-arrow.start-arrow{left:0}.carousel-container .carousel-arrow.end-arrow{right:0}.carousel-container ::ng-deep .carousel-content .card-view{padding:var(--pep-spacing-sm, .5rem) 0!important}.carousel-container ::ng-deep .carousel-content .card-view:first-child{padding-inline-start:var(--pep-spacing-sm, .5rem)!important}.carousel-container ::ng-deep .carousel-content .card-view:last-child{padding-inline-end:var(--pep-spacing-sm, .5rem)!important}\n"], dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$4.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i5$3.PepCarouselComponent, selector: "pep-carousel", inputs: ["scrollbarHidden", "disabled", "xDisabled", "yDisabled", "xWheelEnabled", "dragDisabled", "snapDisabled", "snapOffset", "snapDuration"], outputs: ["dsInitialized", "indexChanged", "reachesLeftBound", "reachesRightBound", "snapAnimationFinished", "dragStart", "dragEnd"] }, { kind: "directive", type: i5$3.PepCarouselItemDirective, selector: "[pepCarouselItem]", inputs: ["dragDisabled"] }, { kind: "component", type: PepInternalFormComponent, selector: "pep-internal-form", inputs: ["isInternal", "isReport", "layout", "lockEvents", "canEditObject", "data", "lockFields", "isActive", "layoutType", "objectId", "parentId", "searchCode", "showTitle", "firstFieldAsLink", "checkForChanges"], outputs: ["valueChange", "formValidationChange", "fieldClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2725
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepInternalCaruselComponent, decorators: [{
2726
- type: Component,
2727
- args: [{ selector: 'pep-internal-carusel', providers: [PepInternalCaruselService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"carousel-container\">\n <ng-container *ngIf=\"items?.length > 0; then carouselBlock; else emptyBlock\"></ng-container>\n <ng-template #emptyBlock>\n <!-- No items -->\n </ng-template>\n <ng-template #carouselBlock>\n <pep-button *ngIf=\"screenSize <= PepScreenSizeType.SM\" [iconName]=\"'arrow_left_alt'\" [styleType]=\"'regular'\"\n [disabled]=\"prevDisabled\" (click)=\"moveLeft()\" class=\"carousel-arrow start-arrow\">\n </pep-button>\n <pep-carousel #carousel [xWheelEnabled]=\"false\" [snapDuration]=\"duration\"\n (reachesLeftBound)=\"onReachesLeftBound($event)\" (reachesRightBound)=\"onReachesRightBound($event)\" (indexChanged)=\"onIndexChanged($event)\">\n <ng-container *ngFor=\"let item of items\">\n <pep-internal-form pepCarouselItem [layout]=\"layout\" [data]=\"item\" [layoutType]=\"'card'\" class=\"card-view \"\n (valueChange)=\"onCustomizeObjectChanged($event)\" (fieldClick)=\"onCustomizeFieldClick($event)\">\n </pep-internal-form>\n </ng-container>\n </pep-carousel>\n <pep-button *ngIf=\"screenSize <= PepScreenSizeType.SM\" [iconName]=\"'arrow_right_alt'\" [styleType]=\"'regular'\"\n [disabled]=\"nextDisabled\" (click)=\"moveRight()\" class=\"carousel-arrow end-arrow\">\n </pep-button>\n </ng-template>\n</div>", styles: [".carousel-container{position:relative;margin:0;display:grid}.carousel-container .carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:1}.carousel-container .carousel-arrow.start-arrow{left:0}.carousel-container .carousel-arrow.end-arrow{right:0}.carousel-container ::ng-deep .carousel-content .card-view{padding:var(--pep-spacing-sm, .5rem) 0!important}.carousel-container ::ng-deep .carousel-content .card-view:first-child{padding-inline-start:var(--pep-spacing-sm, .5rem)!important}.carousel-container ::ng-deep .carousel-content .card-view:last-child{padding-inline-end:var(--pep-spacing-sm, .5rem)!important}\n"] }]
2728
- }], ctorParameters: function () { return [{ type: i1$1.PepLayoutService }, { type: PepInternalCaruselService }]; }, propDecorators: { carousel: [{
2729
- type: ViewChild,
2730
- args: ['carousel', { read: PepCarouselComponent }]
2731
- }], field: [{
2732
- type: Input
2733
- }], layoutType: [{
2734
- type: Input
2735
- }], internalFormFieldChange: [{
2736
- type: Output
2737
- }], internalFormFieldClick: [{
2738
- type: Output
2739
- }] } });
2740
-
2741
- class PepFieldGeneratorComponent {
2742
- constructor() {
2743
- this.isActive = false;
2744
- this.uid = null;
2745
- this.layoutType = 'form';
2746
- this.showTitle = true;
2747
- this.checkForChanges = null;
2748
- this.valueChange = new EventEmitter();
2749
- // @Output()
2750
- // formValidationChange: EventEmitter<boolean> = new EventEmitter<boolean>();
2751
- this.elementClick = new EventEmitter();
2752
- this.internalFormFieldChange = new EventEmitter();
2753
- this.internalFormFieldClick = new EventEmitter();
2754
- this.formValueChange = new EventEmitter();
2755
- this.formFieldClick = new EventEmitter();
2756
- }
2757
- set field(value) {
2758
- this._field = value;
2759
- }
2760
- get field() {
2761
- return this._field;
2762
- }
2763
- get isValid() {
2764
- if (this.field.readonly || this.field.disabled) {
2765
- return true;
2766
- }
2767
- else {
2768
- const formControl = this.form && this.form.get(this.field.key);
2769
- if (formControl) {
2770
- return formControl.valid;
2771
- }
2772
- else {
2773
- return false;
2774
- }
2775
- }
2776
- }
2777
- get isTouched() {
2778
- const formControl = this.form && this.form.get(this.field.key);
2779
- return formControl ? formControl.touched : false;
2780
- }
2781
- get isDirty() {
2782
- const formControl = this.form && this.form.get(this.field.key);
2783
- return formControl ? formControl.dirty : false;
2784
- }
2785
- onFileChanged(fileData, field) {
2786
- const value = fileData ? JSON.stringify(fileData) : '';
2787
- const fieldValueChange = {
2788
- key: field.key,
2789
- value: value,
2790
- controlType: field.controlType,
2791
- };
2792
- this.valueChange.emit(fieldValueChange);
2793
- }
2794
- onAddressValueChanged(valueChange, field) {
2795
- const fieldValueChange = {
2796
- key: valueChange.key,
2797
- value: valueChange.value,
2798
- controlType: field.controlType,
2799
- };
2800
- this.valueChange.emit(fieldValueChange);
2801
- }
2802
- onValueChanged(value, field) {
2803
- const fieldValueChange = {
2804
- key: field.key,
2805
- value: value.toString(),
2806
- controlType: field.controlType,
2807
- };
2808
- this.valueChange.emit(fieldValueChange);
2809
- }
2810
- onInternalFormFieldChanged(internalFormFieldChange) {
2811
- this.internalFormFieldChange.emit(internalFormFieldChange);
2812
- }
2813
- // onFormValidationChanged(formValidationChange: any): void {
2814
- // this.formValidationChange.emit(formValidationChange);
2815
- // }
2816
- onClick(fieldClicked) {
2817
- this.elementClick.emit(fieldClicked);
2818
- }
2819
- onInternalFormFieldClick(internalFormFieldClick) {
2820
- this.internalFormFieldClick.emit(internalFormFieldClick);
2821
- }
2822
- onFormValueChanged(event) {
2823
- this.formValueChange.emit(event);
2824
- }
2825
- onFormFieldClick(event) {
2826
- this.formFieldClick.emit(event);
2827
- }
2828
- ngOnChanges(changes) {
2829
- // debugger;
2830
- // For testing.
2831
- // this.field.disabled = this.field.readonly = false;
2832
- }
2833
- ngOnDestroy() {
2834
- //
2835
- }
2836
- }
2837
- PepFieldGeneratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepFieldGeneratorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2838
- PepFieldGeneratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepFieldGeneratorComponent, selector: "pep-field-generator", inputs: { field: "field", isActive: "isActive", uid: "uid", form: "form", layoutType: "layoutType", showTitle: "showTitle", checkForChanges: "checkForChanges" }, outputs: { valueChange: "valueChange", elementClick: "elementClick", internalFormFieldChange: "internalFormFieldChange", internalFormFieldClick: "internalFormFieldClick", formValueChange: "formValueChange", formFieldClick: "formFieldClick" }, usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"field.controlType\" [formGroup]=\"form\">\n\n <pep-address *ngSwitchCase=\"'address'\" [form]=\"form\" [key]=\"field.key\" [formattedValue]=\"field.formattedValue\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [groupFields]=\"field.groupFields\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (addressValueChange)=\"onAddressValueChanged($event, field)\">\n </pep-address>\n\n <pep-attachment *ngSwitchCase=\"'attachment'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [isActive]=\"isActive\" [showTitle]=\"showTitle\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (fileChange)=\"onFileChanged($event, field)\">\n </pep-attachment>\n\n <pep-checkbox *ngSwitchCase=\"'checkbox'\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"(field.value?.toString() | lowercase) == 'true' || field.value == '1' ? true : false\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [additionalValue]=\"field.additionalValue\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-checkbox>\n\n <pep-date *ngSwitchCase=\"'date'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [type]=\"field.type\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [minValue]=\"field.minValue\"\n [maxValue]=\"field.maxValue\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-date>\n\n <pep-images-filmstrip *ngSwitchCase=\"'images'\" [uid]=\"uid\" [form]=\"form\" [key]=\"field.key\" [label]=\"field.label\"\n [showTitle]=\"showTitle\" [rowSpan]=\"field.rowSpan\" [value]=\"field.value\" [layoutType]=\"layoutType\">\n </pep-images-filmstrip>\n\n <pep-image *ngSwitchCase=\"'image'\" [uid]=\"uid\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.formattedValue\"\n [srcLarge]=\"field.value\" [options]=\"field.options\" [label]=\"field.label\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [indicatorsField]=\"field.indicatorsField\" [menuField]=\"field.menuField\"\n [hasCampaignField]=\"field.hasCampaignField\" [sizeLimitMB]=\"field.sizeLimitMB\" [isActive]=\"isActive\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (fileChange)=\"onFileChanged($event, field)\">\n </pep-image>\n\n <pep-quantity-selector *ngSwitchCase=\"'qs'\" [form]=\"form\" [key]=\"field.key\" [allowDecimal]=\"field.allowDecimal\" [value]=\"field.value\"\n [label]=\"field.label\" [type]=\"field.type\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [additionalValue]=\"field.additionalValue\" [notificationInfo]=\"field.notificationInfo\" [isActive]=\"isActive\"\n [layoutType]=\"layoutType\" [showTitle]=\"showTitle\" [visible]=\"field.visible\"\n [minFractionDigits]=\"field.digitsNumberAfterDecimalPoint\" (valueChange)=\"onValueChanged($event, field)\"\n (elementClick)=\"onClick($event)\">\n </pep-quantity-selector>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-rich-html-textarea *ngSwitchCase=\"'richhtmltextarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\" [renderTitle]=\"field.renderTitle\"\n [renderEnlargeButton]=\"field.renderEnlargeButton\" (valueChange)=\"onValueChanged($event, field)\"\n [isActive]=\"isActive\">\n </pep-rich-html-textarea>\n\n <pep-select *ngSwitchCase=\"'select'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [autoSortOptions]=\"field.autoSortOptions\" [options]=\"field.options\" [showTitle]=\"showTitle\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" [emptyOption]=\"field.emptyOption\"\n (valueChange)=\"onValueChanged($event, field)\" \n [isActive]=\"isActive\">\n </pep-select>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-separator *ngSwitchCase=\"'separator'\" [form]=\"form\" [key]=\"field.key\" [label]=\"field.label\"\n [xAlignment]=\"field.xAlignment\" [layoutType]=\"layoutType\" [visible]=\"field.visible\">\n </pep-separator>\n\n <pep-signature *ngSwitchCase=\"'signature'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [isActive]=\"isActive\" [layoutType]=\"layoutType\"\n [visible]=\"field.visible\" (fileChange)=\"onFileChanged($event, field)\">\n </pep-signature>\n\n <pep-textarea *ngSwitchCase=\"'textarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-textarea>\n\n <pep-textbox *ngSwitchCase=\"'textbox'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [accessory]=\"field.accessory\" [label]=\"field.label\"\n [placeholder]=\"field.placeholder\" [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [regex]=\"field.regex\" [regexError]=\"field.regexError\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [minFractionDigits]=\"field.digitsNumberAfterDecimalPoint\"\n (valueChange)=\"onValueChanged($event, field)\" \n [isActive]=\"isActive\" [visible]=\"field.visible\">\n </pep-textbox>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-link *ngSwitchCase=\"'link'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [displayValue]=\"field.formattedValue\"\n [label]=\"field.label\" [placeholder]=\"field.placeholder\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\" [visible]=\"field.visible\"\n (elementClick)=\"onClick($event)\">\n </pep-link>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-indicators *ngSwitchCase=\"'indicators'\" [key]=\"field.key\" [value]=\"field.value\" [layoutType]=\"layoutType\">\n </pep-indicators>\n <pep-internal-button *ngSwitchCase=\"'button'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\"\n [referenceObjectInternalType]=\"field.referenceObjectInternalType\" [type]=\"field.type\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (valueChange)=\"onValueChanged($event, field)\">\n </pep-internal-button>\n <pep-internal-menu *ngSwitchCase=\"'menu'\" [key]=\"field.key\" [label]=\"field.label\" [disabled]=\"field.disabled\"\n [xAlignment]=\"field.xAlignment\" [options]=\"field.options\" [layoutType]=\"layoutType\"\n (elementClick)=\"onClick($event)\">\n </pep-internal-menu>\n <pep-internal-page *ngSwitchCase=\"'internalPage'\" [field]=\"field\" [layoutType]=\"layoutType\"\n (internalFormFieldClick)=\"onInternalFormFieldClick($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\">\n </pep-internal-page>\n\n <pep-internal-carusel *ngSwitchCase=\"'internalCarusel'\" [field]=\"field\"\n (internalFormFieldClick)=\"onInternalFormFieldClick($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\">\n </pep-internal-carusel>\n\n <ng-container *ngSwitchCase=\"'placeholder'\">\n </ng-container>\n</ng-container>", styles: [":host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3$2.PepAddressComponent, selector: "pep-address", inputs: ["key", "formattedValue", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "groupFields", "form", "layoutType", "visible"], outputs: ["addressValueChange"] }, { kind: "component", type: i4$3.PepAttachmentComponent, selector: "pep-attachment", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "handleActions", "hint"], outputs: ["chooseFile", "fileChange", "elementClick", "validationChange"] }, { kind: "component", type: i5$2.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: i6.PepDateComponent, selector: "pep-date", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "chooseTime", "visible", "minValue", "maxValue", "minDateValue", "maxDateValue", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: i7$1.PepImageComponent, selector: "pep-image", inputs: ["key", "srcLarge", "src", "options", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "indicatorsField", "menuField", "hasCampaignField", "visible", "form", "uid", "showTitle", "renderTitle", "layoutType", "isActive", "sizeLimitMB", "acceptImagesType", "handleActions", "hint"], outputs: ["chooseFile", "fileChange", "elementClick", "validationChange"] }, { kind: "component", type: i8$1.PepImagesFilmstripComponent, selector: "pep-images-filmstrip", inputs: ["key", "value", "label", "xAlignment", "rowSpan", "form", "uid", "showTitle", "renderTitle", "layoutType", "currIndex", "showThumbnails"] }, { kind: "component", type: i9.PepQuantitySelectorComponent, selector: "pep-quantity-selector", inputs: ["key", "value", "minFractionDigits", "maxFractionDigits", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "allowDecimal", "additionalValue", "notificationInfo", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "styleType", "isInFocus"], outputs: ["valueChange", "elementClick", "validationChange"] }, { kind: "component", type: i10.PepRichHtmlTextareaComponent, selector: "pep-rich-html-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "xAlignment", "sanitize", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "renderEnlargeButton", "layoutType", "inlineMode", "toolbarOptions"], outputs: ["valueChange", "editorCreated", "validationChange"] }, { kind: "component", type: i11.PepSelectComponent, selector: "pep-select", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "placeholder", "placeholderWhenDisabled", "autoSortOptions", "options", "visible", "emptyOption", "form", "layoutType", "parentFieldKey", "isActive", "showTitle", "renderTitle", "typeaheadDebounceInterval", "addValueToOptionsIfNotExist"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: i12.PepSeparatorComponent, selector: "pep-separator", inputs: ["key", "label", "xAlignment", "form", "layoutType", "visible"] }, { kind: "component", type: i13.PepSignatureComponent, selector: "pep-signature", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "signatureURL", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "handleActions"], outputs: ["chooseFile", "fileChange", "elementClick", "validationChange"] }, { kind: "component", type: i14.PepTextareaComponent, selector: "pep-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType"], outputs: ["valueChange", "keyup", "validationChange"] }, { kind: "component", type: i15.PepTextboxComponent, selector: "pep-textbox", inputs: ["key", "value", "minFractionDigits", "maxFractionDigits", "accessory", "label", "placeholder", "type", "mandatory", "disabled", "readonly", "maxFieldCharacters", "hint", "textColor", "xAlignment", "rowSpan", "minValue", "maxValue", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType", "parentFieldKey", "regex", "regexError", "isInFocus"], outputs: ["valueChange", "keyup", "validationChange"] }, { kind: "component", type: i16.PepLinkComponent, selector: "pep-link", inputs: ["key", "value", "displayValue", "label", "placeholder", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange", "elementClick", "keyup", "validationChange"] }, { kind: "component", type: PepIndicatorsComponent, selector: "pep-indicators", inputs: ["key", "value", "layoutType"] }, { kind: "component", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: ["key", "value", "formattedValue", "label", "referenceObjectInternalType", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "layoutType"], outputs: ["elementClick", "valueChange"] }, { kind: "component", type: PepInternalMenuComponent, selector: "pep-internal-menu", inputs: ["key", "label", "disabled", "xAlignment", "options", "layoutType"], outputs: ["elementClick"] }, { kind: "component", type: PepInternalPageComponent, selector: "pep-internal-page", inputs: ["field", "layoutType"], outputs: ["internalFormFieldChange", "internalFormFieldClick"] }, { kind: "component", type: PepInternalCaruselComponent, selector: "pep-internal-carusel", inputs: ["field", "layoutType"], outputs: ["internalFormFieldChange", "internalFormFieldClick"] }, { kind: "pipe", type: i5.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2839
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepFieldGeneratorComponent, decorators: [{
2840
- type: Component,
2841
- args: [{ selector: 'pep-field-generator', encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"field.controlType\" [formGroup]=\"form\">\n\n <pep-address *ngSwitchCase=\"'address'\" [form]=\"form\" [key]=\"field.key\" [formattedValue]=\"field.formattedValue\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [groupFields]=\"field.groupFields\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (addressValueChange)=\"onAddressValueChanged($event, field)\">\n </pep-address>\n\n <pep-attachment *ngSwitchCase=\"'attachment'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [isActive]=\"isActive\" [showTitle]=\"showTitle\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (fileChange)=\"onFileChanged($event, field)\">\n </pep-attachment>\n\n <pep-checkbox *ngSwitchCase=\"'checkbox'\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"(field.value?.toString() | lowercase) == 'true' || field.value == '1' ? true : false\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [additionalValue]=\"field.additionalValue\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-checkbox>\n\n <pep-date *ngSwitchCase=\"'date'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [type]=\"field.type\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [minValue]=\"field.minValue\"\n [maxValue]=\"field.maxValue\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-date>\n\n <pep-images-filmstrip *ngSwitchCase=\"'images'\" [uid]=\"uid\" [form]=\"form\" [key]=\"field.key\" [label]=\"field.label\"\n [showTitle]=\"showTitle\" [rowSpan]=\"field.rowSpan\" [value]=\"field.value\" [layoutType]=\"layoutType\">\n </pep-images-filmstrip>\n\n <pep-image *ngSwitchCase=\"'image'\" [uid]=\"uid\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.formattedValue\"\n [srcLarge]=\"field.value\" [options]=\"field.options\" [label]=\"field.label\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [indicatorsField]=\"field.indicatorsField\" [menuField]=\"field.menuField\"\n [hasCampaignField]=\"field.hasCampaignField\" [sizeLimitMB]=\"field.sizeLimitMB\" [isActive]=\"isActive\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (fileChange)=\"onFileChanged($event, field)\">\n </pep-image>\n\n <pep-quantity-selector *ngSwitchCase=\"'qs'\" [form]=\"form\" [key]=\"field.key\" [allowDecimal]=\"field.allowDecimal\" [value]=\"field.value\"\n [label]=\"field.label\" [type]=\"field.type\" [mandatory]=\"field.mandatory\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [additionalValue]=\"field.additionalValue\" [notificationInfo]=\"field.notificationInfo\" [isActive]=\"isActive\"\n [layoutType]=\"layoutType\" [showTitle]=\"showTitle\" [visible]=\"field.visible\"\n [minFractionDigits]=\"field.digitsNumberAfterDecimalPoint\" (valueChange)=\"onValueChanged($event, field)\"\n (elementClick)=\"onClick($event)\">\n </pep-quantity-selector>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-rich-html-textarea *ngSwitchCase=\"'richhtmltextarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\" [renderTitle]=\"field.renderTitle\"\n [renderEnlargeButton]=\"field.renderEnlargeButton\" (valueChange)=\"onValueChanged($event, field)\"\n [isActive]=\"isActive\">\n </pep-rich-html-textarea>\n\n <pep-select *ngSwitchCase=\"'select'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [autoSortOptions]=\"field.autoSortOptions\" [options]=\"field.options\" [showTitle]=\"showTitle\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" [emptyOption]=\"field.emptyOption\"\n (valueChange)=\"onValueChanged($event, field)\" \n [isActive]=\"isActive\">\n </pep-select>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-separator *ngSwitchCase=\"'separator'\" [form]=\"form\" [key]=\"field.key\" [label]=\"field.label\"\n [xAlignment]=\"field.xAlignment\" [layoutType]=\"layoutType\" [visible]=\"field.visible\">\n </pep-separator>\n\n <pep-signature *ngSwitchCase=\"'signature'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [isActive]=\"isActive\" [layoutType]=\"layoutType\"\n [visible]=\"field.visible\" (fileChange)=\"onFileChanged($event, field)\">\n </pep-signature>\n\n <pep-textarea *ngSwitchCase=\"'textarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [visible]=\"field.visible\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\">\n </pep-textarea>\n\n <pep-textbox *ngSwitchCase=\"'textbox'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [accessory]=\"field.accessory\" [label]=\"field.label\"\n [placeholder]=\"field.placeholder\" [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [regex]=\"field.regex\" [regexError]=\"field.regexError\"\n [showTitle]=\"showTitle\" [layoutType]=\"layoutType\" [minFractionDigits]=\"field.digitsNumberAfterDecimalPoint\"\n (valueChange)=\"onValueChanged($event, field)\" \n [isActive]=\"isActive\" [visible]=\"field.visible\">\n </pep-textbox>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-link *ngSwitchCase=\"'link'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\" [displayValue]=\"field.formattedValue\"\n [label]=\"field.label\" [placeholder]=\"field.placeholder\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [maxFieldCharacters]=\"field.maxFieldCharacters\" [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\"\n [rowSpan]=\"field.rowSpan\" [showTitle]=\"showTitle\" [layoutType]=\"layoutType\"\n (valueChange)=\"onValueChanged($event, field)\" [isActive]=\"isActive\" [visible]=\"field.visible\"\n (elementClick)=\"onClick($event)\">\n </pep-link>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n\n <pep-indicators *ngSwitchCase=\"'indicators'\" [key]=\"field.key\" [value]=\"field.value\" [layoutType]=\"layoutType\">\n </pep-indicators>\n <pep-internal-button *ngSwitchCase=\"'button'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\"\n [referenceObjectInternalType]=\"field.referenceObjectInternalType\" [type]=\"field.type\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [layoutType]=\"layoutType\" [visible]=\"field.visible\" (elementClick)=\"onClick($event)\"\n (valueChange)=\"onValueChanged($event, field)\">\n </pep-internal-button>\n <pep-internal-menu *ngSwitchCase=\"'menu'\" [key]=\"field.key\" [label]=\"field.label\" [disabled]=\"field.disabled\"\n [xAlignment]=\"field.xAlignment\" [options]=\"field.options\" [layoutType]=\"layoutType\"\n (elementClick)=\"onClick($event)\">\n </pep-internal-menu>\n <pep-internal-page *ngSwitchCase=\"'internalPage'\" [field]=\"field\" [layoutType]=\"layoutType\"\n (internalFormFieldClick)=\"onInternalFormFieldClick($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\">\n </pep-internal-page>\n\n <pep-internal-carusel *ngSwitchCase=\"'internalCarusel'\" [field]=\"field\"\n (internalFormFieldClick)=\"onInternalFormFieldClick($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\">\n </pep-internal-carusel>\n\n <ng-container *ngSwitchCase=\"'placeholder'\">\n </ng-container>\n</ng-container>", styles: [":host{display:block;width:100%;height:100%}\n"] }]
2842
- }], propDecorators: { field: [{
2843
- type: Input
2844
- }], isActive: [{
2845
- type: Input
2846
- }], uid: [{
2847
- type: Input
2848
- }], form: [{
2849
- type: Input
2850
- }], layoutType: [{
2851
- type: Input
2852
- }], showTitle: [{
2853
- type: Input
2854
- }], checkForChanges: [{
2855
- type: Input
2856
- }], valueChange: [{
2857
- type: Output
2858
- }], elementClick: [{
2859
- type: Output
2860
- }], internalFormFieldChange: [{
2861
- type: Output
2862
- }], internalFormFieldClick: [{
2863
- type: Output
2864
- }], formValueChange: [{
2865
- type: Output
2866
- }], formFieldClick: [{
2867
- type: Output
2868
- }] } });
2869
-
2870
- class PepFormComponent {
2871
- set data(value) {
2872
- const shouldReload = this.shouldReloadForm || !this._data;
2873
- this._data = value;
2874
- if (shouldReload) {
2875
- this._shouldReloadForm = false;
2876
- this.initForm();
2877
- }
2878
- else {
2879
- this.updateForm();
2880
- }
2881
- }
2882
- get data() {
2883
- return this._data;
2884
- }
2885
- set lockFields(value) {
2886
- this.isLocked = value;
2887
- }
2888
- get fields$() {
2889
- return this._fieldsSubject.asObservable();
2890
- }
2891
- get shouldReloadForm() {
2892
- return this._shouldReloadForm;
2893
- }
2894
- // eventServiceSub: Subscription;
2895
- // public jsonLib = JSON;
2896
- constructor(dialogService, customizationService, layoutService, fb, differs, translate) {
2897
- this.dialogService = dialogService;
2898
- this.customizationService = customizationService;
2899
- this.layoutService = layoutService;
2900
- this.fb = fb;
2901
- this.translate = translate;
2902
- this.isInternal = true;
2903
- this.isReport = false;
2904
- this.lockEvents = false;
2905
- this.canEditObject = true;
2906
- this._data = null;
2907
- this.isActive = false;
2908
- this.layoutType = 'card';
2909
- // @Input() listType = '';
2910
- this.objectId = '0';
2911
- this.parentId = '0';
2912
- this.searchCode = '0';
2913
- this.showTitle = true;
2914
- this.firstFieldAsLink = false;
2915
- this.checkForChanges = null;
2916
- this.valueChange = new EventEmitter();
2917
- this.formValidationChange = new EventEmitter();
2918
- this.fieldClick = new EventEmitter();
2919
- this.internalFormFieldClick = new EventEmitter();
2920
- this.internalFormFieldChange = new EventEmitter();
2921
- this.isLocked = false;
2922
- // payLoad = '';
2923
- this.rows = [];
2924
- this.fields = [];
2925
- this._fieldsSubject = new BehaviorSubject([]);
2926
- this.columns = 1;
2927
- this.hasMenuFloatingOnOtherField = false;
2928
- this.indicatorsDataField = null;
2929
- this._shouldReloadForm = false;
2930
- // store the initial value to compare with
2931
- this.differ = differs.find({}).create();
2932
- }
2933
- convertXAlignToHorizontalAlign(xAlign) {
2934
- let res = DEFAULT_HORIZONTAL_ALIGNMENT;
2935
- if (xAlign === X_ALIGNMENT_TYPE.None ||
2936
- xAlign === X_ALIGNMENT_TYPE.Left) {
2937
- res = 'left';
2938
- }
2939
- else if (xAlign === X_ALIGNMENT_TYPE.Right) {
2940
- res = 'right';
2941
- }
2942
- else {
2943
- res = 'center';
2944
- }
2945
- return res;
2946
- }
2947
- convertYAlignToVerticalAlign(yAlign) {
2948
- let res = DEFAULT_VERTICAL_ALIGNMENT;
2949
- if (yAlign === Y_ALIGNMENT_TYPE.None ||
2950
- yAlign === Y_ALIGNMENT_TYPE.Top) {
2951
- res = 'top';
2952
- }
2953
- else if (yAlign === Y_ALIGNMENT_TYPE.Bottom) {
2954
- res = 'bottom';
2955
- }
2956
- else {
2957
- res = 'middle';
2958
- }
2959
- return res;
2960
- }
2961
- convertOptionalValues(optionalValues) {
2962
- if (optionalValues && optionalValues.length > 0) {
2963
- return optionalValues.map((ov) => {
2964
- return { key: ov.Key, value: ov.Value };
2965
- });
2966
- }
2967
- else {
2968
- return [];
2969
- }
2970
- }
2971
- convertAddressFields(controlField, addressFields, canEditObject) {
2972
- const fields = [];
2973
- addressFields.forEach((field) => {
2974
- let customField;
2975
- const placeholder = field.ApiName;
2976
- if (field.ApiName.toLowerCase().indexOf('street') >= 0) {
2977
- customField = new PepTextboxField({
2978
- key: field.ApiName,
2979
- label: field.ApiName,
2980
- type: 'text',
2981
- placeholder,
2982
- readonly: !canEditObject,
2983
- disabled: !field.Enabled || !canEditObject,
2984
- hidden: false,
2985
- mandatory: false,
2986
- value: field.Value,
2987
- formattedValue: field.FormattedValue,
2988
- row: 0,
2989
- rowSpan: 1,
2990
- col: 0,
2991
- colSpan: 2,
2992
- xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
2993
- yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
2994
- order: 0,
2995
- });
2996
- }
2997
- else if (field.ApiName.toLowerCase().indexOf('city') >= 0) {
2998
- customField = new PepTextboxField({
2999
- key: field.ApiName,
3000
- label: field.ApiName,
3001
- type: 'text',
3002
- placeholder,
3003
- readonly: !canEditObject,
3004
- disabled: !field.Enabled || !canEditObject,
3005
- hidden: false,
3006
- mandatory: false,
3007
- value: field.Value,
3008
- formattedValue: field.FormattedValue,
3009
- row: 0,
3010
- rowSpan: 1,
3011
- col: 2,
3012
- colSpan: 1,
3013
- xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
3014
- yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
3015
- order: 1,
3016
- });
3017
- }
3018
- else if (field.ApiName.toLowerCase().indexOf('state') >= 0) {
3019
- customField = new PepSelectField({
3020
- key: field.ApiName,
3021
- label: field.ApiName,
3022
- placeholder,
3023
- options: this.convertOptionalValues(field.OptionalValues),
3024
- readonly: !canEditObject,
3025
- disabled: !field.Enabled || !canEditObject,
3026
- hidden: false,
3027
- mandatory: false,
3028
- value: field.Value,
3029
- formattedValue: field.FormattedValue,
3030
- row: 1,
3031
- rowSpan: 1,
3032
- col: 0,
3033
- colSpan: 1,
3034
- xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
3035
- yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
3036
- order: 2,
3037
- });
3038
- }
3039
- else if (field.ApiName.toLowerCase().indexOf('zipcode') >= 0) {
3040
- customField = new PepTextboxField({
3041
- key: field.ApiName,
3042
- label: field.ApiName,
3043
- type: 'text',
3044
- placeholder,
3045
- readonly: !canEditObject,
3046
- disabled: !field.Enabled || !canEditObject,
3047
- hidden: false,
3048
- mandatory: false,
3049
- value: field.Value,
3050
- formattedValue: field.FormattedValue,
3051
- row: 1,
3052
- rowSpan: 1,
3053
- col: 1,
3054
- colSpan: 1,
3055
- xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
3056
- yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
3057
- order: 3,
3058
- });
3059
- }
3060
- else if (field.ApiName.toLowerCase().indexOf('country') >= 0) {
3061
- customField = new PepSelectField({
3062
- key: field.ApiName,
3063
- label: field.ApiName,
3064
- placeholder,
3065
- options: this.convertOptionalValues(field.OptionalValues),
3066
- readonly: !canEditObject,
3067
- disabled: !field.Enabled || !canEditObject,
3068
- hidden: false,
3069
- mandatory: false,
3070
- value: field.Value,
3071
- formattedValue: field.FormattedValue,
3072
- row: 2,
3073
- rowSpan: 1,
3074
- col: 2,
3075
- colSpan: 1,
3076
- xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
3077
- yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
3078
- order: 4,
3079
- });
3080
- }
3081
- fields.push(customField);
3082
- });
3083
- return fields.sort((n1, n2) => n1.order > n2.order ? 1 : n1.order < n2.order ? -1 : 0);
3084
- }
3085
- isMatrixField(apiNameToCheck) {
3086
- return apiNameToCheck.indexOf('Matrix') >= 0;
3087
- }
3088
- doesFieldHavaFloatingField(controlField, floatingField) {
3089
- let hasFloatingField = false;
3090
- if (floatingField.Layout.Y >= controlField.Layout.Y &&
3091
- floatingField.Layout.Y <
3092
- controlField.Layout.Y + controlField.Layout.Height &&
3093
- floatingField.Layout.X >= controlField.Layout.X &&
3094
- floatingField.Layout.X <
3095
- controlField.Layout.X + controlField.Layout.Width) {
3096
- hasFloatingField = true;
3097
- }
3098
- return hasFloatingField;
3099
- }
3100
- getOptionsForCustomField(controlField, dataField, canEditObject) {
3101
- if (!controlField || !dataField) {
3102
- return;
3103
- }
3104
- const placeholder = controlField.ReadOnly || !canEditObject ? '' : controlField.Title;
3105
- let fieldProperties = {
3106
- key: controlField.ApiName,
3107
- label: controlField.Title,
3108
- accessory: dataField.Accessory,
3109
- placeholder,
3110
- readonly: controlField.ReadOnly || !canEditObject,
3111
- disabled: !dataField.Enabled || !canEditObject,
3112
- hidden: controlField.Hidden,
3113
- mandatory: controlField.Mandatory,
3114
- value: dataField.Value,
3115
- formattedValue: dataField.FormattedValue,
3116
- additionalValue: dataField.AdditionalValue,
3117
- row: controlField.Layout.Y,
3118
- rowSpan: controlField.Layout.Height,
3119
- col: controlField.Layout.X,
3120
- colSpan: controlField.Layout.Width,
3121
- xAlignment: this.convertXAlignToHorizontalAlign(controlField.Layout.XAlignment),
3122
- yAlignment: this.convertYAlignToVerticalAlign(controlField.Layout.YAlignment),
3123
- options: this.convertOptionalValues(dataField.OptionalValues),
3124
- groupFields: undefined,
3125
- maxFieldCharacters: controlField.MaxFieldCharacters,
3126
- minValue: controlField.MinValue,
3127
- maxValue: controlField.MaxValue,
3128
- // hasMenu: hasMenu,
3129
- // hasCampaign: hasCampaign,
3130
- // hasIndicators: hasIndicators,
3131
- textColor: dataField.TextColor,
3132
- visible: dataField.Visible,
3133
- digitsNumberAfterDecimalPoint: dataField.DigitsNumberAfterDecimalPoint,
3134
- };
3135
- if (dataField.AdditionalProps) {
3136
- fieldProperties = Object.assign(Object.assign({}, fieldProperties), dataField.AdditionalProps);
3137
- }
3138
- return fieldProperties;
3139
- }
3140
- convertToCustomField(controlField, dataField, canEditObject, menuField, hasCampaignField, indicatorsField, objectId, parentId, searchCode) {
3141
- let customField;
3142
- const options = this.getOptionsForCustomField(controlField, dataField, canEditObject);
3143
- if (controlField.ApiName === 'ObjectMenu') {
3144
- options.type = 'menu';
3145
- customField = new PepInternalMenuField(options);
3146
- }
3147
- else if (controlField.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
3148
- controlField.FieldType ===
3149
- FIELD_TYPE.NumberIntegerQuantitySelector ||
3150
- controlField.ApiName === 'QuantitySelector' ||
3151
- controlField.ApiName === 'UnitsQuantity' ||
3152
- controlField.ApiName.indexOf('size_') === 0) {
3153
- if (dataField.FieldType === FIELD_TYPE.InternalLink) {
3154
- options.type = 'button';
3155
- }
3156
- else if (dataField.FieldType === FIELD_TYPE.Package) {
3157
- options.type = 'packageButton';
3158
- }
3159
- else if (dataField.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
3160
- dataField.FieldType === FIELD_TYPE.NumberReal) {
3161
- options.type = 'qs';
3162
- options.allowDecimal = true;
3163
- }
3164
- else if (dataField.FieldType ===
3165
- FIELD_TYPE.NumberIntegerQuantitySelector ||
3166
- dataField.FieldType === FIELD_TYPE.NumberInteger) {
3167
- options.type = 'qs';
3168
- options.allowDecimal = false;
3169
- }
3170
- else if (dataField.FieldType === FIELD_TYPE.NumberIntegerForMatrix) {
3171
- options.type = 'qsForMatrix';
3172
- options.allowDecimal = false;
3173
- }
3174
- else if (dataField.FieldType === FIELD_TYPE.NumberRealForMatrix) {
3175
- options.type = 'qsForMatrix';
3176
- options.allowDecimal = true;
3177
- }
3178
- options.notificationInfo = dataField.NotificationInfo;
3179
- customField = new PepQuantitySelectorField(options);
3180
- }
3181
- else {
3182
- // HACK: need to remove this..
3183
- if (dataField.FieldType === FIELD_TYPE.Indicators &&
3184
- this.isMatrixField(dataField.ApiName)) {
3185
- dataField.FieldType = FIELD_TYPE.InternalPage;
3186
- }
3187
- switch (dataField.FieldType) {
3188
- case FIELD_TYPE.Address: {
3189
- const canEditGroupObject = controlField.ReadOnly
3190
- ? false
3191
- : canEditObject;
3192
- options.groupFields = this.convertAddressFields(controlField, dataField.GroupFields, canEditGroupObject);
3193
- customField = new PepAddressField(options);
3194
- break;
3195
- }
3196
- case FIELD_TYPE.Indicators: {
3197
- // options['type'] = 'indicators'; // Not needed this is PepIndicatorsField.
3198
- customField = new PepIndicatorsField(options);
3199
- break;
3200
- }
3201
- case FIELD_TYPE.InternalPage: {
3202
- if (this.isMatrixField(controlField.ApiName)) {
3203
- options.rowSpan = controlField.Layout.Height;
3204
- options.objectId = objectId;
3205
- options.parentId = parentId;
3206
- options.searchCode = searchCode;
3207
- customField = new PepInternalPageField(options);
3208
- }
3209
- else {
3210
- // Not supported
3211
- }
3212
- break;
3213
- }
3214
- case FIELD_TYPE.RelatedObjectsCards: {
3215
- options.rowSpan = controlField.Layout.Height;
3216
- options.searchCode = searchCode;
3217
- options.pageInfo = dataField.UIPageInfo;
3218
- customField = new PepInternalCaruselField(options);
3219
- break;
3220
- }
3221
- case FIELD_TYPE.Link: {
3222
- options.type = 'link';
3223
- customField = new PepLinkField(options);
3224
- break;
3225
- }
3226
- case FIELD_TYPE.InternalLink:
3227
- case FIELD_TYPE.Button: {
3228
- options.type = 'button';
3229
- customField = new PepInternalButtonField(options);
3230
- break;
3231
- }
3232
- case FIELD_TYPE.Attachment: {
3233
- // options.type = 'attachment';
3234
- customField = new PepAttachmentField(options);
3235
- break;
3236
- }
3237
- case FIELD_TYPE.Signature: {
3238
- // options.type = 'signature';
3239
- customField = new PepSignatureField(options);
3240
- break;
3241
- }
3242
- case FIELD_TYPE.Image:
3243
- case FIELD_TYPE.ImageURL: {
3244
- // options.type = 'image';
3245
- options.menuField =
3246
- menuField &&
3247
- this.doesFieldHavaFloatingField(controlField, menuField)
3248
- ? menuField
3249
- : null;
3250
- options.hasCampaignField =
3251
- hasCampaignField &&
3252
- this.doesFieldHavaFloatingField(controlField, hasCampaignField)
3253
- ? hasCampaignField
3254
- : null;
3255
- options.indicatorsField =
3256
- indicatorsField &&
3257
- this.doesFieldHavaFloatingField(controlField, indicatorsField)
3258
- ? indicatorsField
3259
- : null;
3260
- customField = new PepImageField(options);
3261
- break;
3262
- }
3263
- case FIELD_TYPE.Images: {
3264
- // options.type = 'images';
3265
- customField = new PepImagesField(options);
3266
- break;
3267
- }
3268
- case FIELD_TYPE.Email: {
3269
- options.type = 'email';
3270
- customField = new PepTextboxField(options);
3271
- break;
3272
- }
3273
- case FIELD_TYPE.Phone: {
3274
- options.type = 'phone';
3275
- customField = new PepTextboxField(options);
3276
- break;
3277
- }
3278
- case FIELD_TYPE.Duration: {
3279
- options.type = 'duration';
3280
- customField = new PepTextboxField(options);
3281
- break;
3282
- }
3283
- case FIELD_TYPE.Default:
3284
- case FIELD_TYPE.TextBox:
3285
- case FIELD_TYPE.LimitedLengthTextBox:
3286
- case FIELD_TYPE.TextHeader:
3287
- case FIELD_TYPE.CalculatedString:
3288
- case FIELD_TYPE.MapDataString: {
3289
- customField = new PepTextboxField(options);
3290
- break;
3291
- }
3292
- case FIELD_TYPE.TextArea: {
3293
- customField = new PepTextareaField(options);
3294
- break;
3295
- }
3296
- case FIELD_TYPE.RichTextHTML: {
3297
- customField = new PepRichHtmlTextareaField(options);
3298
- break;
3299
- }
3300
- case FIELD_TYPE.Date:
3301
- case FIELD_TYPE.LimitedDate:
3302
- case FIELD_TYPE.CalculatedDate:
3303
- case FIELD_TYPE.DateAndTime: {
3304
- options.type =
3305
- dataField.FieldType === FIELD_TYPE.DateAndTime
3306
- ? 'datetime'
3307
- : 'date';
3308
- customField = new PepDateField(options);
3309
- break;
3310
- }
3311
- case FIELD_TYPE.NumberInteger:
3312
- case FIELD_TYPE.CalculatedInt:
3313
- case FIELD_TYPE.MapDataInt: {
3314
- options.type = 'int';
3315
- customField = new PepTextboxField(options);
3316
- break;
3317
- }
3318
- case FIELD_TYPE.Percentage: {
3319
- options.type = 'percentage';
3320
- customField = new PepTextboxField(options);
3321
- break;
3322
- }
3323
- case FIELD_TYPE.Currency: {
3324
- options.type = 'currency';
3325
- customField = new PepTextboxField(options);
3326
- break;
3327
- }
3328
- case FIELD_TYPE.NumberReal:
3329
- case FIELD_TYPE.CalculatedReal:
3330
- case FIELD_TYPE.MapDataReal:
3331
- case FIELD_TYPE.Sum:
3332
- case FIELD_TYPE.Totals: {
3333
- options.type = 'real';
3334
- customField = new PepTextboxField(options);
3335
- break;
3336
- }
3337
- case FIELD_TYPE.Boolean:
3338
- case FIELD_TYPE.CalculatedBool: {
3339
- customField = new PepCheckboxField(options);
3340
- break;
3341
- }
3342
- case FIELD_TYPE.BooleanText: {
3343
- options.type = 'booleanText';
3344
- customField = new PepCheckboxField(options);
3345
- break;
3346
- }
3347
- case FIELD_TYPE.ComboBox:
3348
- case FIELD_TYPE.EmptyComboBox:
3349
- case FIELD_TYPE.MapDataDropDown: {
3350
- // options.type = 'select';
3351
- options.autoSortOptions = false;
3352
- customField = new PepSelectField(options);
3353
- break;
3354
- }
3355
- case FIELD_TYPE.MultiTickBox:
3356
- case FIELD_TYPE.MultiTickBoxToComboBox:
3357
- case FIELD_TYPE.EmptyMultiTickBox: {
3358
- options.type = 'multi';
3359
- options.autoSortOptions = false;
3360
- customField = new PepSelectField(options);
3361
- break;
3362
- }
3363
- case FIELD_TYPE.GuidReferenceType: {
3364
- options.type = 'reference';
3365
- options.referenceObjectType = dataField.ReferenceObjectType;
3366
- options.referenceObjectSubType =
3367
- dataField.ReferenceObjectSubType;
3368
- options.referenceObjectInternalType =
3369
- dataField.ReferenceObjectInternalType;
3370
- customField = new PepInternalButtonField(options);
3371
- break;
3372
- }
3373
- case FIELD_TYPE.ListOfObjects: {
3374
- options.type = 'listofobjects';
3375
- customField = new PepInternalButtonField(options);
3376
- break;
3377
- }
3378
- case FIELD_TYPE.Separator: {
3379
- customField = new PepSeparatorField(options);
3380
- break;
3381
- }
3382
- /*
3383
- case FIELD_TYPE.Images: return that.field(value);
3384
- */
3385
- case FIELD_TYPE.NumberRealQuantitySelector:
3386
- case FIELD_TYPE.NumberIntegerQuantitySelector: {
3387
- options.type = 'qs';
3388
- options.allowDecimal =
3389
- dataField.FieldType ===
3390
- FIELD_TYPE.NumberRealQuantitySelector;
3391
- options.notificationInfo = dataField.NotificationInfo;
3392
- customField = new PepQuantitySelectorField(options);
3393
- break;
3394
- }
3395
- case FIELD_TYPE.Package: {
3396
- options.type = 'packageButton';
3397
- options.notificationInfo = dataField.NotificationInfo;
3398
- customField = new PepQuantitySelectorField(options);
3399
- break;
3400
- }
3401
- }
3402
- }
3403
- if (!customField) {
3404
- options.label = controlField.ApiName + ' is not supported!!!';
3405
- customField = new PepSeparatorField(options);
3406
- }
3407
- return customField;
3408
- }
3409
- getFieldFormattedValue(field) {
3410
- let fieldFormattedValue = field.formattedValue || field.value;
3411
- // Fix for the custom check box component.
3412
- if (field.controlType === 'checkbox') {
3413
- fieldFormattedValue = fieldFormattedValue === 'true';
3414
- }
3415
- // Fix for the custom button component.
3416
- if (field.controlType === 'button') {
3417
- fieldFormattedValue =
3418
- fieldFormattedValue === '0' ? '' : fieldFormattedValue;
3419
- }
3420
- // Fix for the custom date component.
3421
- if (field.controlType === 'date' || field.controlType === 'datetime') {
3422
- if (fieldFormattedValue === '' ||
3423
- fieldFormattedValue.indexOf('1900-1-1') >= 0 ||
3424
- fieldFormattedValue.indexOf('1900-01-01') >= 0 ||
3425
- fieldFormattedValue.indexOf('1970-1-1') >= 0 ||
3426
- fieldFormattedValue.indexOf('1970-01-01') >= 0) {
3427
- fieldFormattedValue = '';
3428
- }
3429
- }
3430
- return fieldFormattedValue;
3431
- }
3432
- toControlGroup(fields) {
3433
- const group = {};
3434
- if (fields && fields.length > 0) {
3435
- fields.forEach((field) => {
3436
- if (field.groupFields && field.groupFields.length > 0) {
3437
- const subGroup = {};
3438
- field.groupFields.forEach((groupField) => {
3439
- if (groupField.mandatory &&
3440
- !field.readonly &&
3441
- !field.disabled) {
3442
- subGroup[groupField.key] = [
3443
- {
3444
- value: groupField.formattedValue || '',
3445
- disabled: field.readonly ||
3446
- field.disabled ||
3447
- groupField.disabled,
3448
- },
3449
- [Validators.required],
3450
- ];
3451
- }
3452
- else {
3453
- subGroup[groupField.key] = [
3454
- {
3455
- value: groupField.formattedValue || '',
3456
- disabled: field.readonly ||
3457
- field.disabled ||
3458
- groupField.disabled,
3459
- },
3460
- [Validators.nullValidator],
3461
- ];
3462
- }
3463
- });
3464
- group[field.key] = this.fb.group(subGroup);
3465
- }
3466
- else {
3467
- const validators = field.getValidators();
3468
- const fieldFormattedValue = this.getFieldFormattedValue(field);
3469
- group[field.key] = [
3470
- {
3471
- value: fieldFormattedValue || '',
3472
- disabled: field.disabled,
3473
- },
3474
- validators,
3475
- ];
3476
- }
3477
- });
3478
- }
3479
- return this.fb.group(group);
3480
- }
3481
- createBaseField(uiControlField, dataField) {
3482
- const customField = this.convertToCustomField(uiControlField, dataField, this.canEditObject, this.menuDataField, this.hasCampaignDataField, this.indicatorsDataField, this.objectId, this.parentId, this.searchCode);
3483
- return customField;
3484
- }
3485
- showFormValidationMessage() {
3486
- const fields = this.fields;
3487
- let emptyMandatoryFieldsMsg = '';
3488
- let notValidFieldsMsg = '';
3489
- // for (let i: number = 0; i < fields.length; i++) {
3490
- // let field = fields[i];
3491
- for (const field of fields) {
3492
- const formControl = this.form && this.form.get(field.key);
3493
- if (formControl) {
3494
- // Mandatory is empty.
3495
- if (field.mandatory &&
3496
- formControl.value.toString().trim().length === 0) {
3497
- emptyMandatoryFieldsMsg +=
3498
- '<li><small>' + field.label + '</small></li>';
3499
- }
3500
- else if (!field.disabled && !formControl.valid) {
3501
- notValidFieldsMsg +=
3502
- '<li><small>' + field.label + '</small></li>';
3503
- }
3504
- }
3505
- }
3506
- // Add the header message of the empty mandatory fields
3507
- if (emptyMandatoryFieldsMsg.length > 0) {
3508
- emptyMandatoryFieldsMsg =
3509
- '<div>' +
3510
- this.translate.instant('MESSAGES.ERROR_MANDATORY_FIELDS') +
3511
- "</div><ul style='padding: 0 20px;'>" +
3512
- emptyMandatoryFieldsMsg +
3513
- '</ul><br/>';
3514
- }
3515
- // Add the header message of the empty mandatory fields
3516
- if (notValidFieldsMsg.length > 0) {
3517
- notValidFieldsMsg =
3518
- '<div>' +
3519
- this.translate.instant('MESSAGES.ERROR_INVALID_FIELDS') +
3520
- "</div><ul style='padding: 0 20px;'>" +
3521
- notValidFieldsMsg +
3522
- '</ul>';
3523
- }
3524
- const title = this.translate.instant('MESSAGES.TITLE_NOTICE');
3525
- const data = new PepDialogData({
3526
- title,
3527
- content: emptyMandatoryFieldsMsg + notValidFieldsMsg,
3528
- });
3529
- this.dialogService.openDefaultDialog(data);
3530
- }
3531
- ngOnInit() {
3532
- const themeVars = this.customizationService.getThemeVariables();
3533
- // convert rem to pixel
3534
- const RemToPixel = 16;
3535
- this.formGutterSize =
3536
- this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.FORM_SPACEING_KEY) * RemToPixel;
3537
- this.cardGutterSize =
3538
- this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.CARD_SPACEING_KEY) * RemToPixel;
3539
- }
3540
- ngDoCheck() {
3541
- const changes = this.differ.diff(this.data); // check for changes
3542
- if (changes) {
3543
- this.updateForm();
3544
- this.checkForChanges = new Date();
3545
- }
3546
- }
3547
- ngOnChanges(changes) {
3548
- // if (changes.data && changes.data.currentValue) {
3549
- // // Load changes
3550
- // if (!this.shouldReloadForm && changes.data.previousValue) {
3551
- // this.data = changes.data.currentValue;
3552
- // this.updateForm();
3553
- // } else {
3554
- // this._shouldReloadForm = false;
3555
- // this.initForm();
3556
- // }
3557
- // }
3558
- // if (this.shouldReloadForm || !changes?.data?.previousValue) {
3559
- // this._shouldReloadForm = false;
3560
- // this.initForm();
3561
- // this.checkForChanges = new Date();
3562
- // }
3563
- }
3564
- ngOnDestroy() {
3565
- //
3566
- }
3567
- getUiControlFields() {
3568
- return this.layout ? this.layout.ControlFields : [];
3569
- }
3570
- initFieldsStructure(fields, maxRow) {
3571
- const themeVars = this.customizationService.getThemeVariables();
3572
- // Set form row height.
3573
- if (this.layoutType === 'card') {
3574
- const cardFieldHeight = this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.CARD_FIELD_HEIGHT_KEY);
3575
- this.rowHeight = cardFieldHeight;
3576
- }
3577
- else {
3578
- const rowFieldHeight = this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.FORM_FIELD_HEIGHT_KEY);
3579
- const rowFieldTitleHeight = this.customizationService.getNumberThemeVariable(themeVars, PepCustomizationService.FORM_FIELD_TITLE_HEIGHT_KEY);
3580
- this.rowHeight = rowFieldHeight + rowFieldTitleHeight;
3581
- }
3582
- // Create the fields structure (the fields must be sorted!!!).
3583
- if (fields.length > 0) {
3584
- // Init the layout.
3585
- if (
3586
- // this.layoutType === 'form' ||
3587
- this.layoutType === 'table') {
3588
- this.fields = fields;
3589
- this._fieldsSubject.next(fields);
3590
- this.rows = [];
3591
- for (let i = 0; i <= maxRow; i++) {
3592
- this.rows[i] = [];
3593
- }
3594
- // for (let i = 0; i < fields.length; i++) {
3595
- // const field = fields[i]
3596
- for (const field of fields) {
3597
- this.rows[field.row].push(field);
3598
- }
3599
- }
3600
- else {
3601
- const doesfieldExistIn = new Array(maxRow);
3602
- for (let i = 0; i < doesfieldExistIn.length; i++) {
3603
- doesfieldExistIn[i] = new Array(this.columns);
3604
- for (let j = 0; j < doesfieldExistIn[i].length; j++) {
3605
- doesfieldExistIn[i][j] = false;
3606
- }
3607
- }
3608
- // Run in squere (row - colspan, col - rowspan) and put true where it should.
3609
- // for (let index = 0; index < fields.length; index++) {
3610
- // const currentField = fields[index];
3611
- for (const currentField of fields) {
3612
- if (currentField.rowSpan > 1) {
3613
- for (let row = currentField.row; row < currentField.row + currentField.rowSpan; row++) {
3614
- if (currentField.colSpan > 1) {
3615
- for (let col = currentField.col; col <
3616
- currentField.col + currentField.colSpan; col++) {
3617
- if (doesfieldExistIn.length > row &&
3618
- doesfieldExistIn[0].length > col) {
3619
- doesfieldExistIn[row][col] = true;
3620
- }
3621
- }
3622
- }
3623
- else {
3624
- if (doesfieldExistIn.length > row &&
3625
- doesfieldExistIn[0].length >
3626
- currentField.col) {
3627
- doesfieldExistIn[row][currentField.col] = true;
3628
- }
3629
- }
3630
- }
3631
- }
3632
- else if (currentField.colSpan > 1) {
3633
- for (let col = currentField.col; col < currentField.col + currentField.colSpan; col++) {
3634
- if (doesfieldExistIn.length > currentField.row &&
3635
- doesfieldExistIn[0].length > col) {
3636
- doesfieldExistIn[currentField.row][col] = true;
3637
- }
3638
- }
3639
- }
3640
- else {
3641
- if (doesfieldExistIn.length > currentField.row &&
3642
- doesfieldExistIn[0].length > currentField.col) {
3643
- doesfieldExistIn[currentField.row][currentField.col] = true;
3644
- }
3645
- }
3646
- }
3647
- // Create empty fields where doesfieldExistIn is false (For the md-grid-list UI Component).
3648
- for (let i = 0; i < doesfieldExistIn.length; i++) {
3649
- for (let j = 0; j < doesfieldExistIn[i].length; j++) {
3650
- if (!doesfieldExistIn[i][j]) {
3651
- // Create empty field and add it to the fields list.
3652
- fields.push(new PepPlaceholderField({
3653
- key: i + '_' + j,
3654
- label: '',
3655
- placeholder: '',
3656
- readonly: false,
3657
- disabled: false,
3658
- hidden: false,
3659
- mandatory: false,
3660
- value: '',
3661
- formattedValue: '',
3662
- row: i,
3663
- rowSpan: 1,
3664
- col: j,
3665
- colSpan: 1,
3666
- order: 1,
3667
- }));
3668
- }
3669
- }
3670
- }
3671
- // Sort the fields again.
3672
- this.fields = fields.sort((f1, f2) => f1.row > f2.row
3673
- ? 1
3674
- : f1.row < f2.row
3675
- ? -1
3676
- : f1.col > f2.col
3677
- ? 1
3678
- : f1.col < f2.col
3679
- ? -1
3680
- : 0);
3681
- this._fieldsSubject.next(fields);
3682
- }
3683
- }
3684
- }
3685
- setForm(isForUpdate = false) {
3686
- var _a;
3687
- let allFieldsAreReadOnly = true;
3688
- if (!isForUpdate) {
3689
- const fields = [];
3690
- for (const currentField of this.fields) {
3691
- // Add all fields except 'internalPage' (for children).
3692
- if (currentField.controlType !== 'internalPage') {
3693
- fields.push(currentField);
3694
- }
3695
- if (!currentField.readonly) {
3696
- allFieldsAreReadOnly = false;
3697
- }
3698
- }
3699
- this.form = this.toControlGroup(fields);
3700
- }
3701
- else {
3702
- // Update form values if changed by calculated fields.
3703
- for (let i = 0; i < this.fields.length; i++) {
3704
- let currentField = this.fields[i];
3705
- if (currentField.controlType === 'internalCarusel') {
3706
- // Hack to override (update) the field.
3707
- const uiControlField = this.getUiControlFields().find(cf => cf.ApiName === currentField.key);
3708
- const dataField = this.data.Fields.find(df => df.ApiName === currentField.key);
3709
- currentField = this.createBaseField(uiControlField, dataField);
3710
- this._fieldsSubject.value[i] = currentField;
3711
- }
3712
- else if (currentField.controlType !== 'internalPage') {
3713
- if (currentField.groupFields &&
3714
- currentField.groupFields.length > 0) {
3715
- // for (let j = 0; j < currentField.groupFields.length; j++) {
3716
- // let currentGroupField = currentField.groupFields[j];
3717
- for (const currentGroupField of currentField.groupFields) {
3718
- const fieldFormattedValue = this.getFieldFormattedValue(currentGroupField);
3719
- this.customizationService.updateFormField(this.form, currentGroupField, fieldFormattedValue, currentField);
3720
- }
3721
- }
3722
- else {
3723
- const fieldFormattedValue = this.getFieldFormattedValue(currentField);
3724
- // this.form.controls[currentField.key].setValue(fieldFormattedValue);
3725
- this.customizationService.updateFormField(this.form, currentField, fieldFormattedValue);
3726
- }
3727
- }
3728
- if (!currentField.readonly) {
3729
- allFieldsAreReadOnly = false;
3730
- }
3731
- }
3732
- }
3733
- let isFormValid = (_a = this.form) === null || _a === void 0 ? void 0 : _a.valid;
3734
- // Change validation to true if all fields are read only.
3735
- if (!isFormValid && allFieldsAreReadOnly) {
3736
- isFormValid = true;
3737
- }
3738
- this.onFormValidationChanged(isFormValid);
3739
- // Set it to false to enable all fields.
3740
- if (this.isInternal && this.isLocked) {
3741
- this.isLocked = false;
3742
- }
3743
- }
3744
- initForm() {
3745
- if (this.data && this.data.Fields) {
3746
- const fields = this.convertCustomFields(this.getUiControlFields(), this.data.Fields);
3747
- const maxRow = Math.max(...fields.map((f) => {
3748
- return f.row + f.rowSpan;
3749
- }));
3750
- this.columns = Math.max(...fields.map((f) => {
3751
- return f.col + f.colSpan;
3752
- }));
3753
- this.initFieldsStructure(fields, maxRow);
3754
- this.setForm();
3755
- }
3756
- }
3757
- updateField(customField, updatedField) {
3758
- const options = {
3759
- disabled: !updatedField.Enabled || !this.canEditObject,
3760
- readonly: !updatedField.Enabled || !this.canEditObject,
3761
- visible: updatedField.Visible,
3762
- value: updatedField.Value,
3763
- additionalValue: updatedField.AdditionalValue,
3764
- formattedValue: updatedField.FormattedValue,
3765
- textColor: updatedField.TextColor,
3766
- digitsNumberAfterDecimalPoint: updatedField.DigitsNumberAfterDecimalPoint
3767
- };
3768
- if (customField instanceof PepQuantitySelectorField) {
3769
- const notificationInfo = updatedField.NotificationInfo;
3770
- options.notificationInfo = notificationInfo;
3771
- // Change type if it's change (only for allowDecimal).
3772
- let allowDecimal = false;
3773
- if (updatedField.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
3774
- updatedField.FieldType === FIELD_TYPE.NumberReal ||
3775
- updatedField.FieldType === FIELD_TYPE.NumberRealForMatrix) {
3776
- allowDecimal = true;
3777
- }
3778
- options.allowDecimal = allowDecimal;
3779
- }
3780
- else if (customField instanceof PepSelectField) {
3781
- options.options = this.convertOptionalValues(updatedField.OptionalValues);
3782
- if (!options.options || options.options.length === 0) {
3783
- options.options.push({
3784
- key: options.value,
3785
- value: options.formattedValue,
3786
- });
3787
- }
3788
- }
3789
- else if (customField instanceof PepInternalCaruselField) {
3790
- options.pageInfo = updatedField.UIPageInfo;
3791
- }
3792
- customField.update(options);
3793
- }
3794
- updateForm() {
3795
- if (this.data && this.data.Fields) {
3796
- for (const currentField of this.data.Fields) {
3797
- const customField = this.fields.filter((f) => f.key === currentField.ApiName)[0];
3798
- // Update all fields except 'internalPage' type (for children).
3799
- if (customField && customField.controlType !== 'internalPage') {
3800
- this.updateField(customField, currentField);
3801
- // Update the group fields.
3802
- if (customField.controlType === 'address' &&
3803
- currentField.GroupFields) {
3804
- // for (let j = 0; j < currentField.GroupFields.length; j++) {
3805
- // let currentGroupField = currentField.GroupFields[j];
3806
- for (const currentGroupField of currentField.GroupFields) {
3807
- currentGroupField.Enabled = !currentField.Enabled
3808
- ? false
3809
- : currentGroupField.Enabled;
3810
- const customGroupField = customField.groupFields.filter((f) => f.key === currentGroupField.ApiName)[0];
3811
- this.updateField(customGroupField, currentGroupField);
3812
- }
3813
- }
3814
- }
3815
- }
3816
- this.setForm(true);
3817
- }
3818
- }
3819
- ReloadForm() {
3820
- this._shouldReloadForm = true;
3821
- }
3822
- // onSubmit() {
3823
- // if (this.form.valid) {
3824
- // this.payLoad = JSON.stringify(this.form.value);
3825
- // //this.submitted.emit(this.form.value);
3826
- // }
3827
- // }
3828
- getFormControlById(key) {
3829
- let formControl = null;
3830
- this.fields.forEach((field) => {
3831
- if (field.key === key) {
3832
- formControl = this.form.get(field.key);
3833
- return;
3834
- }
3835
- else if (field.groupFields && field.groupFields.length > 0) {
3836
- field.groupFields.forEach((groupField) => {
3837
- if (groupField.key === key) {
3838
- formControl = this.form.get(field.key + '.' + groupField.key);
3839
- return;
3840
- }
3841
- });
3842
- }
3843
- });
3844
- return formControl;
3845
- }
3846
- setSpecialFields(controlFields, dataFields) {
3847
- // let cf;
3848
- // for (let index = 0; index < controlFields.length; index++) {
3849
- // cf = controlFields[index];
3850
- for (const cf of controlFields) {
3851
- if (cf.ApiName === 'ObjectMenu') {
3852
- this.menuField = cf;
3853
- }
3854
- else if (cf.ApiName === 'ItemHasActiveCampaign') {
3855
- this.hasCampaignField = cf;
3856
- }
3857
- else if (cf.ApiName === 'ItemIndicatorsWithoutCampaign') {
3858
- this.indicatorsField = cf;
3859
- }
3860
- }
3861
- // let df;
3862
- // for (let index = 0; index < dataFields.length; index++) {
3863
- // df = dataFields[index];
3864
- for (const df of dataFields) {
3865
- if (df.ApiName === 'ObjectMenu') {
3866
- this.menuDataField = df;
3867
- }
3868
- else if (df.ApiName === 'ItemHasActiveCampaign') {
3869
- this.hasCampaignDataField = df;
3870
- }
3871
- else if (df.ApiName === 'ItemIndicatorsWithoutCampaign') {
3872
- this.indicatorsDataField = df;
3873
- }
3874
- }
3875
- if (this.menuField && this.menuDataField) {
3876
- this.menuDataField.Layout = this.menuField.Layout;
3877
- }
3878
- if (this.hasCampaignField && this.hasCampaignDataField) {
3879
- this.hasCampaignDataField.Layout = this.hasCampaignField.Layout;
3880
- }
3881
- if (this.indicatorsField && this.indicatorsDataField) {
3882
- this.indicatorsDataField.Layout = this.indicatorsField.Layout;
3883
- }
3884
- // Check if menu is floating on other field.
3885
- // for (let index = 0; index < controlFields.length; index++) {
3886
- // cf = controlFields[index];
3887
- for (const cf of controlFields) {
3888
- if (this.menuField && cf.ApiName !== 'ObjectMenu') {
3889
- this.hasMenuFloatingOnOtherField = this.doesFieldHavaFloatingField(cf, this.menuField);
3890
- if (this.hasMenuFloatingOnOtherField) {
3891
- break;
3892
- }
3893
- }
3894
- }
3895
- }
3896
- convertCustomFields(controlFields, dataFields) {
3897
- if (this.layoutType !== 'table') {
3898
- this.setSpecialFields(controlFields, dataFields);
3899
- }
3900
- else {
3901
- // HACK: convert to center alignment if table view & special fields)
3902
- controlFields.forEach((field, index) => {
3903
- if (field.ApiName === 'UnitsQuantity' ||
3904
- field.ApiName === 'QuantitySelector' ||
3905
- field.ApiName === 'ObjectMenu' ||
3906
- field.FieldType === FIELD_TYPE.Image ||
3907
- field.FieldType === FIELD_TYPE.ImageURL ||
3908
- field.FieldType === FIELD_TYPE.Indicators ||
3909
- field.FieldType === FIELD_TYPE.Boolean ||
3910
- field.FieldType === FIELD_TYPE.CalculatedBool ||
3911
- field.FieldType === FIELD_TYPE.Signature ||
3912
- field.FieldType ===
3913
- FIELD_TYPE.NumberIntegerQuantitySelector ||
3914
- field.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
3915
- field.FieldType === FIELD_TYPE.Package ||
3916
- field.FieldType === FIELD_TYPE.NumberIntegerForMatrix ||
3917
- field.FieldType === FIELD_TYPE.NumberRealForMatrix) {
3918
- field.Layout.XAlignment = X_ALIGNMENT_TYPE.Center;
3919
- }
3920
- else {
3921
- // HACK: align the rest of the fields by the culture.
3922
- // field.Layout.XAlignment = this.layoutService.isRtl() ? X_ALIGNMENT_TYPE.Right : X_ALIGNMENT_TYPE.Left;
3923
- }
3924
- });
3925
- }
3926
- const fields = [];
3927
- controlFields.forEach((field, index) => {
3928
- const dataField = dataFields.filter((df) => df.ApiName === field.ApiName)[0];
3929
- if (!dataField) {
3930
- return;
3931
- }
3932
- // If current view is not table view and those fields are special.
3933
- if (this.layoutType !== 'table' &&
3934
- ((this.hasMenuFloatingOnOtherField &&
3935
- this.menuField &&
3936
- this.menuField.ApiName === field.ApiName) ||
3937
- (this.indicatorsField &&
3938
- this.indicatorsField.ApiName === field.ApiName) ||
3939
- (this.hasCampaignField &&
3940
- this.hasCampaignField.ApiName === field.ApiName))) {
3941
- return;
3942
- }
3943
- // Set type to link
3944
- if (index === 0 && this.firstFieldAsLink) {
3945
- dataField.FieldType = FIELD_TYPE.InternalLink;
3946
- // dataField.Value = this.getInternalLinkHref();
3947
- }
3948
- if (field.ApiName === 'ObjectMenu') {
3949
- dataField.Enabled = true;
3950
- // HACK : Until "Enabled" returns from the server, we set PepMenu to be
3951
- // Disabled in cart on regular items and not campign items.
3952
- }
3953
- const customField = this.createBaseField(field, dataField);
3954
- fields.push(customField);
3955
- });
3956
- return fields.sort((f1, f2) => f1.row > f2.row
3957
- ? 1
3958
- : f1.row < f2.row
3959
- ? -1
3960
- : f1.col > f2.col
3961
- ? 1
3962
- : f1.col < f2.col
3963
- ? -1
3964
- : 0);
3965
- }
3966
- onFormValidationChanged(formValidationChange) {
3967
- this.formValidationChange.emit(formValidationChange);
3968
- }
3969
- onValueChanged(event) {
3970
- this.onFormValidationChanged(this.form.valid);
3971
- const formControl = this.getFormControlById(event.key);
3972
- const isValid = formControl ? formControl.valid : true;
3973
- // const isValid = true;
3974
- // If isValid || event.value === '' for init the field if the user want.
3975
- if (isValid || event.value === '') {
3976
- // Set it to false to disable all fields.
3977
- if (this.isInternal && this.layoutType === 'form') {
3978
- this.isLocked = true;
3979
- }
3980
- // Update the current field value.
3981
- const currentField = this.fields.find((f) => f.key === event.key);
3982
- if (currentField) {
3983
- currentField.formattedValue = currentField.value = event.value;
3984
- }
3985
- this.valueChange.emit({
3986
- id: this.data.UID.toString(),
3987
- uiObjectKey: this.data.Key,
3988
- key: event.key,
3989
- value: event.value,
3990
- controlType: event.controlType,
3991
- });
3992
- }
3993
- }
3994
- onClick(fieldClickEvent) {
3995
- const clickedUiControlField = this.data.Fields.filter((f) => f.ApiName === fieldClickEvent.key)[0];
3996
- const idType = this.data.Type ? this.data.Type.toString() : '';
3997
- if (clickedUiControlField) {
3998
- this.fieldClick.emit({
3999
- id: this.data.UID.toString(),
4000
- uiObjectKey: this.data.Key,
4001
- key: fieldClickEvent.key,
4002
- idType,
4003
- which: fieldClickEvent.eventWhich,
4004
- value: fieldClickEvent.value,
4005
- controlType: fieldClickEvent.controlType,
4006
- fieldType: clickedUiControlField.FieldType,
4007
- otherData: fieldClickEvent.otherData,
4008
- });
4009
- }
4010
- else {
4011
- // For other api names (like enter children etc).
4012
- this.fieldClick.emit({
4013
- id: this.data.UID.toString(),
4014
- uiObjectKey: this.data.Key,
4015
- key: fieldClickEvent.key,
4016
- idType,
4017
- which: fieldClickEvent.eventWhich,
4018
- value: fieldClickEvent.value,
4019
- controlType: fieldClickEvent.controlType,
4020
- otherData: fieldClickEvent.otherData,
4021
- });
4022
- }
4023
- }
4024
- // This event is for handle the internal page events.
4025
- onInternalFormFieldClicked(internalFormFieldClick) {
4026
- this.internalFormFieldClick.emit(internalFormFieldClick);
4027
- }
4028
- // This event is for handle the internal page events.
4029
- onInternalFormFieldChanged(internalFormFieldChange) {
4030
- this.internalFormFieldChange.emit(internalFormFieldChange);
4031
- }
4032
- // This event is for handle the related items change events.
4033
- onFormValueChanged(event) {
4034
- // this.valueChange.emit(event);
4035
- }
4036
- // This event is for handle the related items change events.
4037
- onFormFieldClick(event) {
4038
- this.fieldClick.emit(event);
4039
- }
4040
- }
4041
- PepFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepFormComponent, deps: [{ token: i1$2.PepDialogService }, { token: i1$1.PepCustomizationService }, { token: i1$1.PepLayoutService }, { token: i3$1.FormBuilder }, { token: i0.KeyValueDiffers }, { token: i4$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
4042
- PepFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PepFormComponent, selector: "pep-form", inputs: { isInternal: "isInternal", isReport: "isReport", layout: "layout", lockEvents: "lockEvents", canEditObject: "canEditObject", data: "data", lockFields: "lockFields", isActive: "isActive", layoutType: "layoutType", objectId: "objectId", parentId: "parentId", searchCode: "searchCode", showTitle: "showTitle", firstFieldAsLink: "firstFieldAsLink", checkForChanges: "checkForChanges" }, outputs: { valueChange: "valueChange", formValidationChange: "formValidationChange", fieldClick: "fieldClick", internalFormFieldClick: "internalFormFieldClick", internalFormFieldChange: "internalFormFieldChange" }, usesOnChanges: true, ngImport: i0, template: "<fieldset *ngIf=\"form\" [formGroup]=\"form\" [disabled]=\"isLocked\" class=\"pep-form\"\n [ngStyle]=\"{ 'background-color': layoutType == 'card' && data?.BackgroundColor }\">\n <!-- New Form -->\n <mat-grid-list *ngIf=\"layoutType == 'form'\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"formGutterSize\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\">\n <pep-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [checkForChanges]=\"checkForChanges\" [uid]=\"data?.UID\" [field]=\"field\" [showTitle]=\"showTitle\"\n (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\"\n (internalFormFieldClick)=\"onInternalFormFieldClicked($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n >\n </pep-field-generator>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n </mat-grid-tile>\n </mat-grid-list>\n\n <!-- Thumbnails -->\n <mat-grid-list *ngIf=\"layoutType == 'card'\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"cardGutterSize\" class=\"card-spacing\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\"\n [ngStyle]=\"{ overflow: field.type == 'qs' ? 'unset' : 'hidden' }\">\n <pep-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [ngClass]=\"{ 'lock-events': lockEvents }\" [isActive]=\"isActive\" [checkForChanges]=\"checkForChanges\"\n [uid]=\"data?.UID\" [field]=\"field\" [showTitle]=\"showTitle\" (valueChange)=\"onValueChanged($event)\"\n (elementClick)=\"onClick($event)\" (internalFormFieldClick)=\"onInternalFormFieldClicked($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\">\n </pep-field-generator>\n </mat-grid-tile>\n </mat-grid-list>\n\n <ng-container *ngIf=\"layoutType == 'table'\">\n <ng-container *ngIf=\"isReport; then reportBlock; else notReportBlock\"></ng-container>\n <ng-template #reportBlock>\n <ng-container *ngTemplateOutlet=\"report\"></ng-container>\n </ng-template>\n <ng-template #notReportBlock>\n <div *ngFor=\"let field of fields$ | async; let j = index\" class=\"pull-left flip table-cell \"\n [ngClass]=\"['text-align-' + field.xAlignment]\" style=\"height: 100%\"\n [ngStyle]=\"{ width: (layout?.ControlFields)[j]?.calcColumnWidthString}\">\n <pep-field-generator *ngIf=\"field.controlType != 'placeholder'\" [checkForChanges]=\"checkForChanges\"\n [uid]=\"data?.UID\" [field]=\"field\" [form]=\"form\" [layoutType]=\"layoutType\" [showTitle]=\"false\"\n (elementClick)=\"onClick($event)\" (valueChange)=\"onValueChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n [isActive]=\"isActive\">\n </pep-field-generator>\n </div>\n </ng-template>\n </ng-container>\n\n <!------- For testing ------------\n {{ form.value | json }}\n {{ form.valid }}\n ---------------------------------->\n</fieldset>\n\n<ng-template #report>\n <div *ngFor=\"let field of fields$ | async; let j = index\" class=\"pull-left flip pep-report-fields\"\n [ngStyle]=\"{ width: (layout?.ControlFields)[j]?.calcColumnWidthString }\"\n [ngClass]=\"['text-align-' + field.xAlignment]\">\n <ng-container [ngSwitch]=\"field.controlType\">\n <pep-image *ngSwitchCase=\"'image'\" [uid]=\"data?.UID\" [form]=\"form\" [key]=\"field.key\"\n [src]=\"field.formattedValue\" [srcLarge]=\"field.value\" [options]=\"field.options\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [layoutType]=\"layoutType\"\n (elementClick)=\"onClick($event)\">\n </pep-image>\n\n <pep-signature *ngSwitchCase=\"'signature'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\">\n </pep-signature>\n\n <pep-checkbox *ngSwitchCase=\"'checkbox'\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"(field.value?.toString() | lowercase) == 'true' || field.value == '1' ? true : false\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [additionalValue]=\"field.additionalValue\" [layoutType]=\"layoutType\">\n </pep-checkbox>\n\n <pep-date *ngSwitchCase=\"'date'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [type]=\"field.type\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [minValue]=\"field.minValue\" [maxValue]=\"field.maxValue\" [layoutType]=\"layoutType\">\n </pep-date>\n\n <pep-internal-button *ngSwitchCase=\"'button'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [layoutType]=\"layoutType\" (elementClick)=\"onClick($event)\">\n </pep-internal-button>\n\n <pep-textarea *ngSwitchCase=\"'textarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [maxFieldCharacters]=\"field.maxFieldCharacters\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\">\n </pep-textarea>\n\n <pep-quantity-selector *ngSwitchCase=\"'qs'\" [id]=\"field.key\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"field.value\" [label]=\"field.label\" [type]=\"field.type\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\" (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\">\n </pep-quantity-selector>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"field.formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\">\n </ng-container>\n <ng-template #notEmptyBlock>\n <ng-container\n *ngIf=\"field.controlType === 'attachment' || field.type === 'link'; then linkBlock; else notLinkBlock\">\n </ng-container>\n <ng-template #linkBlock>\n <a [id]=\"field.key\" class=\"color-link body-sm pep-report-input readonly {{field.value?.length > 0 ? '' : 'disable'}}\"\n *ngIf=\"field.formattedValue != null\" title=\"{{ field.formattedValue }}\" target=\"_blank\"\n href=\"{{ field.value }}\">{{ field.formattedValue }}</a>\n </ng-template>\n <ng-template #notLinkBlock>\n <span [id]=\"field.key\" class=\"body-sm pep-report-input readonly\"\n title=\"{{ field.formattedValue }}\" [ngStyle]=\"{ color: field.textColor }\">{{\n field.formattedValue }}</span>\n </ng-template>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>", styles: [":host{display:grid}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i6$1.MatGridList, selector: "mat-grid-list", inputs: ["cols", "gutterSize", "rowHeight"], exportAs: ["matGridList"] }, { kind: "component", type: i6$1.MatGridTile, selector: "mat-grid-tile", inputs: ["rowspan", "colspan"], exportAs: ["matGridTile"] }, { kind: "component", type: i5$2.PepCheckboxComponent, selector: "pep-checkbox", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "additionalValue", "form", "isActive", "showTitle", "renderTitle", "layoutType", "visible"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: i6.PepDateComponent, selector: "pep-date", inputs: ["key", "value", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "chooseTime", "visible", "minValue", "maxValue", "minDateValue", "maxDateValue", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType"], outputs: ["valueChange", "validationChange"] }, { kind: "component", type: i7$1.PepImageComponent, selector: "pep-image", inputs: ["key", "srcLarge", "src", "options", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "indicatorsField", "menuField", "hasCampaignField", "visible", "form", "uid", "showTitle", "renderTitle", "layoutType", "isActive", "sizeLimitMB", "acceptImagesType", "handleActions", "hint"], outputs: ["chooseFile", "fileChange", "elementClick", "validationChange"] }, { kind: "component", type: i9.PepQuantitySelectorComponent, selector: "pep-quantity-selector", inputs: ["key", "value", "minFractionDigits", "maxFractionDigits", "label", "type", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "allowDecimal", "additionalValue", "notificationInfo", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "styleType", "isInFocus"], outputs: ["valueChange", "elementClick", "validationChange"] }, { kind: "component", type: i13.PepSignatureComponent, selector: "pep-signature", inputs: ["key", "src", "label", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "signatureURL", "visible", "form", "showTitle", "renderTitle", "layoutType", "isActive", "handleActions"], outputs: ["chooseFile", "fileChange", "elementClick", "validationChange"] }, { kind: "component", type: i14.PepTextareaComponent, selector: "pep-textarea", inputs: ["key", "value", "label", "mandatory", "disabled", "readonly", "maxFieldCharacters", "textColor", "xAlignment", "rowSpan", "visible", "form", "isActive", "showTitle", "renderTitle", "layoutType"], outputs: ["valueChange", "keyup", "validationChange"] }, { kind: "component", type: PepFieldGeneratorComponent, selector: "pep-field-generator", inputs: ["field", "isActive", "uid", "form", "layoutType", "showTitle", "checkForChanges"], outputs: ["valueChange", "elementClick", "internalFormFieldChange", "internalFormFieldClick", "formValueChange", "formFieldClick"] }, { kind: "component", type: PepInternalButtonComponent, selector: "pep-internal-button", inputs: ["key", "value", "formattedValue", "label", "referenceObjectInternalType", "type", "mandatory", "disabled", "readonly", "xAlignment", "rowSpan", "visible", "form", "showTitle", "layoutType"], outputs: ["elementClick", "valueChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4043
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepFormComponent, decorators: [{
4044
- type: Component,
4045
- args: [{ selector: 'pep-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fieldset *ngIf=\"form\" [formGroup]=\"form\" [disabled]=\"isLocked\" class=\"pep-form\"\n [ngStyle]=\"{ 'background-color': layoutType == 'card' && data?.BackgroundColor }\">\n <!-- New Form -->\n <mat-grid-list *ngIf=\"layoutType == 'form'\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"formGutterSize\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\">\n <pep-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [checkForChanges]=\"checkForChanges\" [uid]=\"data?.UID\" [field]=\"field\" [showTitle]=\"showTitle\"\n (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\"\n (internalFormFieldClick)=\"onInternalFormFieldClicked($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n >\n </pep-field-generator>\n <!-- (formValidationChange)=\"onFormValidationChanged($event)\" -->\n </mat-grid-tile>\n </mat-grid-list>\n\n <!-- Thumbnails -->\n <mat-grid-list *ngIf=\"layoutType == 'card'\" [cols]=\"columns\" [rowHeight]=\"rowHeight + 'rem'\"\n [gutterSize]=\"cardGutterSize\" class=\"card-spacing\">\n <mat-grid-tile *ngFor=\"let field of fields$ | async\" [rowspan]=\"field.rowSpan\" [colspan]=\"field.colSpan\"\n [ngStyle]=\"{ overflow: field.type == 'qs' ? 'unset' : 'hidden' }\">\n <pep-field-generator *ngIf=\"field.controlType != 'placeholder'\" [form]=\"form\" [layoutType]=\"layoutType\"\n [ngClass]=\"{ 'lock-events': lockEvents }\" [isActive]=\"isActive\" [checkForChanges]=\"checkForChanges\"\n [uid]=\"data?.UID\" [field]=\"field\" [showTitle]=\"showTitle\" (valueChange)=\"onValueChanged($event)\"\n (elementClick)=\"onClick($event)\" (internalFormFieldClick)=\"onInternalFormFieldClicked($event)\"\n (internalFormFieldChange)=\"onInternalFormFieldChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\">\n </pep-field-generator>\n </mat-grid-tile>\n </mat-grid-list>\n\n <ng-container *ngIf=\"layoutType == 'table'\">\n <ng-container *ngIf=\"isReport; then reportBlock; else notReportBlock\"></ng-container>\n <ng-template #reportBlock>\n <ng-container *ngTemplateOutlet=\"report\"></ng-container>\n </ng-template>\n <ng-template #notReportBlock>\n <div *ngFor=\"let field of fields$ | async; let j = index\" class=\"pull-left flip table-cell \"\n [ngClass]=\"['text-align-' + field.xAlignment]\" style=\"height: 100%\"\n [ngStyle]=\"{ width: (layout?.ControlFields)[j]?.calcColumnWidthString}\">\n <pep-field-generator *ngIf=\"field.controlType != 'placeholder'\" [checkForChanges]=\"checkForChanges\"\n [uid]=\"data?.UID\" [field]=\"field\" [form]=\"form\" [layoutType]=\"layoutType\" [showTitle]=\"false\"\n (elementClick)=\"onClick($event)\" (valueChange)=\"onValueChanged($event)\"\n (formValueChange)=\"onFormValueChanged($event)\" (formFieldClick)=\"onFormFieldClick($event)\"\n [isActive]=\"isActive\">\n </pep-field-generator>\n </div>\n </ng-template>\n </ng-container>\n\n <!------- For testing ------------\n {{ form.value | json }}\n {{ form.valid }}\n ---------------------------------->\n</fieldset>\n\n<ng-template #report>\n <div *ngFor=\"let field of fields$ | async; let j = index\" class=\"pull-left flip pep-report-fields\"\n [ngStyle]=\"{ width: (layout?.ControlFields)[j]?.calcColumnWidthString }\"\n [ngClass]=\"['text-align-' + field.xAlignment]\">\n <ng-container [ngSwitch]=\"field.controlType\">\n <pep-image *ngSwitchCase=\"'image'\" [uid]=\"data?.UID\" [form]=\"form\" [key]=\"field.key\"\n [src]=\"field.formattedValue\" [srcLarge]=\"field.value\" [options]=\"field.options\" [label]=\"field.label\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\" [layoutType]=\"layoutType\"\n (elementClick)=\"onClick($event)\">\n </pep-image>\n\n <pep-signature *ngSwitchCase=\"'signature'\" [form]=\"form\" [key]=\"field.key\" [src]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\">\n </pep-signature>\n\n <pep-checkbox *ngSwitchCase=\"'checkbox'\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"(field.value?.toString() | lowercase) == 'true' || field.value == '1' ? true : false\" [label]=\"field.label\"\n [type]=\"field.type\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [additionalValue]=\"field.additionalValue\" [layoutType]=\"layoutType\">\n </pep-checkbox>\n\n <pep-date *ngSwitchCase=\"'date'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [type]=\"field.type\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [minValue]=\"field.minValue\" [maxValue]=\"field.maxValue\" [layoutType]=\"layoutType\">\n </pep-date>\n\n <pep-internal-button *ngSwitchCase=\"'button'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [formattedValue]=\"field.formattedValue\" [label]=\"field.label\" [type]=\"field.type\"\n [disabled]=\"field.disabled\" [readonly]=\"field.readonly\" [xAlignment]=\"field.xAlignment\"\n [layoutType]=\"layoutType\" (elementClick)=\"onClick($event)\">\n </pep-internal-button>\n\n <pep-textarea *ngSwitchCase=\"'textarea'\" [form]=\"form\" [key]=\"field.key\" [value]=\"field.value\"\n [label]=\"field.label\" [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\"\n [readonly]=\"field.readonly\" [maxFieldCharacters]=\"field.maxFieldCharacters\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\">\n </pep-textarea>\n\n <pep-quantity-selector *ngSwitchCase=\"'qs'\" [id]=\"field.key\" [form]=\"form\" [key]=\"field.key\"\n [value]=\"field.value\" [label]=\"field.label\" [type]=\"field.type\"\n [mandatory]=\"field.mandatory\" [disabled]=\"field.disabled\" [readonly]=\"field.readonly\"\n [textColor]=\"field.textColor\" [xAlignment]=\"field.xAlignment\" [rowSpan]=\"field.rowSpan\"\n [layoutType]=\"layoutType\" (valueChange)=\"onValueChanged($event)\" (elementClick)=\"onClick($event)\">\n </pep-quantity-selector>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"field.formattedValue?.length > 0; then notEmptyBlock; else emptyBlock\">\n </ng-container>\n <ng-template #notEmptyBlock>\n <ng-container\n *ngIf=\"field.controlType === 'attachment' || field.type === 'link'; then linkBlock; else notLinkBlock\">\n </ng-container>\n <ng-template #linkBlock>\n <a [id]=\"field.key\" class=\"color-link body-sm pep-report-input readonly {{field.value?.length > 0 ? '' : 'disable'}}\"\n *ngIf=\"field.formattedValue != null\" title=\"{{ field.formattedValue }}\" target=\"_blank\"\n href=\"{{ field.value }}\">{{ field.formattedValue }}</a>\n </ng-template>\n <ng-template #notLinkBlock>\n <span [id]=\"field.key\" class=\"body-sm pep-report-input readonly\"\n title=\"{{ field.formattedValue }}\" [ngStyle]=\"{ color: field.textColor }\">{{\n field.formattedValue }}</span>\n </ng-template>\n </ng-template>\n <ng-template #emptyBlock>\n <span>&nbsp;</span>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>", styles: [":host{display:grid}\n"] }]
4046
- }], ctorParameters: function () { return [{ type: i1$2.PepDialogService }, { type: i1$1.PepCustomizationService }, { type: i1$1.PepLayoutService }, { type: i3$1.FormBuilder }, { type: i0.KeyValueDiffers }, { type: i4$1.TranslateService }]; }, propDecorators: { isInternal: [{
4047
- type: Input
4048
- }], isReport: [{
4049
- type: Input
4050
- }], layout: [{
4051
- type: Input
4052
- }], lockEvents: [{
4053
- type: Input
4054
- }], canEditObject: [{
4055
- type: Input
4056
- }], data: [{
4057
- type: Input
4058
- }], lockFields: [{
4059
- type: Input
4060
- }], isActive: [{
4061
- type: Input
4062
- }], layoutType: [{
4063
- type: Input
4064
- }], objectId: [{
4065
- type: Input
4066
- }], parentId: [{
4067
- type: Input
4068
- }], searchCode: [{
4069
- type: Input
4070
- }], showTitle: [{
4071
- type: Input
4072
- }], firstFieldAsLink: [{
4073
- type: Input
4074
- }], checkForChanges: [{
4075
- type: Input
4076
- }], valueChange: [{
4077
- type: Output
4078
- }], formValidationChange: [{
4079
- type: Output
4080
- }], fieldClick: [{
4081
- type: Output
4082
- }], internalFormFieldClick: [{
4083
- type: Output
4084
- }], internalFormFieldChange: [{
4085
- type: Output
4086
- }] } });
4087
-
4088
- const pepComponentsModules = [
4089
- PepAddressModule,
4090
- PepAttachmentModule,
4091
- PepButtonModule,
4092
- PepCarouselModule,
4093
- PepCheckboxModule,
4094
- PepDateModule,
4095
- PepImageModule,
4096
- PepImagesFilmstripModule,
4097
- PepQuantitySelectorModule,
4098
- PepRichHtmlTextareaModule,
4099
- PepSelectModule,
4100
- PepSelectPanelModule,
4101
- PepSeparatorModule,
4102
- PepSignatureModule,
4103
- PepTextareaModule,
4104
- PepTextboxModule,
4105
- PepLinkModule
4106
- ];
4107
- class PepFormModule {
4108
- constructor(pepIconRegistry) {
4109
- this.pepIconRegistry = pepIconRegistry;
4110
- this.pepIconRegistry.registerIcons([
4111
- pepIconSystemEdit,
4112
- pepIconSystemMenu,
4113
- pepIconNumberPlus,
4114
- pepIconSystemBin,
4115
- pepIconIndicatorDotPlaceholder,
4116
- ]);
4117
- }
4118
- }
4119
- PepFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepFormModule, deps: [{ token: i1.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
4120
- PepFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PepFormModule, declarations: [PepFormComponent,
4121
- PepInternalFormComponent,
4122
- PepFieldGeneratorComponent,
4123
- PepInternalFieldGeneratorComponent,
4124
- PepIndicatorsComponent,
4125
- PepInternalButtonComponent,
4126
- PepInternalListComponent,
4127
- PepInternalMenuComponent,
4128
- PepInternalPageComponent,
4129
- PepInternalCaruselComponent], imports: [CommonModule,
4130
- ReactiveFormsModule,
4131
- // Material modules,
4132
- MatCommonModule,
4133
- MatFormFieldModule,
4134
- MatButtonModule,
4135
- MatGridListModule,
4136
- MatIconModule,
4137
- MatMenuModule,
4138
- // External modules
4139
- SignaturePadModule,
4140
- // ngx-lib modules
4141
- PepNgxLibModule,
4142
- PepDialogModule,
4143
- PepIconModule, PepAddressModule,
4144
- PepAttachmentModule,
4145
- PepButtonModule,
4146
- PepCarouselModule,
4147
- PepCheckboxModule,
4148
- PepDateModule,
4149
- PepImageModule,
4150
- PepImagesFilmstripModule,
4151
- PepQuantitySelectorModule,
4152
- PepRichHtmlTextareaModule,
4153
- PepSelectModule,
4154
- PepSelectPanelModule,
4155
- PepSeparatorModule,
4156
- PepSignatureModule,
4157
- PepTextareaModule,
4158
- PepTextboxModule,
4159
- PepLinkModule, PepFieldTitleModule,
4160
- PepGroupButtonsModule], exports: [PepFormComponent] });
4161
- PepFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepFormModule, providers: [
4162
- FormBuilder
4163
- ], imports: [CommonModule,
4164
- ReactiveFormsModule,
4165
- // Material modules,
4166
- MatCommonModule,
4167
- MatFormFieldModule,
4168
- MatButtonModule,
4169
- MatGridListModule,
4170
- MatIconModule,
4171
- MatMenuModule,
4172
- // External modules
4173
- SignaturePadModule,
4174
- // ngx-lib modules
4175
- PepNgxLibModule,
4176
- PepDialogModule,
4177
- PepIconModule,
4178
- pepComponentsModules,
4179
- PepFieldTitleModule,
4180
- PepGroupButtonsModule] });
4181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PepFormModule, decorators: [{
4182
- type: NgModule,
4183
- args: [{
4184
- imports: [
4185
- CommonModule,
4186
- ReactiveFormsModule,
4187
- // Material modules,
4188
- MatCommonModule,
4189
- MatFormFieldModule,
4190
- MatButtonModule,
4191
- MatGridListModule,
4192
- MatIconModule,
4193
- MatMenuModule,
4194
- // External modules
4195
- SignaturePadModule,
4196
- // ngx-lib modules
4197
- PepNgxLibModule,
4198
- PepDialogModule,
4199
- PepIconModule,
4200
- pepComponentsModules,
4201
- PepFieldTitleModule,
4202
- PepGroupButtonsModule,
4203
- ],
4204
- exports: [PepFormComponent],
4205
- declarations: [
4206
- PepFormComponent,
4207
- PepInternalFormComponent,
4208
- PepFieldGeneratorComponent,
4209
- PepInternalFieldGeneratorComponent,
4210
- PepIndicatorsComponent,
4211
- PepInternalButtonComponent,
4212
- PepInternalListComponent,
4213
- PepInternalMenuComponent,
4214
- PepInternalPageComponent,
4215
- PepInternalCaruselComponent
4216
- ],
4217
- providers: [
4218
- FormBuilder
4219
- ]
4220
- }]
4221
- }], ctorParameters: function () { return [{ type: i1.PepIconRegistry }]; } });
4222
-
4223
- /*
4224
- * Public API Surface of ngx-lib/form
4225
- */
4226
-
4227
- /**
4228
- * Generated bundle index. Do not edit.
4229
- */
4230
-
4231
- export { PepFormComponent, PepFormModule };
4232
- //# sourceMappingURL=pepperi-addons-ngx-lib-form.mjs.map