@pepperi-addons/ngx-lib 0.4.2-beta.137 → 0.4.2-beta.139

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 (577) hide show
  1. package/address/address.component.d.ts +30 -0
  2. package/address/address.module.d.ts +15 -0
  3. package/address/index.d.ts +5 -0
  4. package/address/public-api.d.ts +2 -0
  5. package/attachment/attachment.component.d.ts +94 -0
  6. package/attachment/attachment.module.d.ts +14 -0
  7. package/attachment/index.d.ts +5 -0
  8. package/attachment/public-api.d.ts +2 -0
  9. package/bread-crumbs/bread-crumbs.component.d.ts +27 -0
  10. package/bread-crumbs/bread-crumbs.model.d.ts +11 -0
  11. package/bread-crumbs/bread-crumbs.module.d.ts +15 -0
  12. package/bread-crumbs/index.d.ts +5 -0
  13. package/bread-crumbs/public-api.d.ts +3 -0
  14. package/carousel/carousel-item.directive.d.ts +12 -0
  15. package/carousel/carousel.component.d.ts +148 -0
  16. package/carousel/carousel.module.d.ts +8 -0
  17. package/carousel/index.d.ts +5 -0
  18. package/carousel/public-api.d.ts +3 -0
  19. package/checkbox/checkbox.component.d.ts +50 -0
  20. package/checkbox/checkbox.module.d.ts +19 -0
  21. package/checkbox/index.d.ts +5 -0
  22. package/checkbox/public-api.d.ts +2 -0
  23. package/color/color-picker.component.d.ts +57 -0
  24. package/color/color.component.d.ts +30 -0
  25. package/color/color.model.d.ts +1 -0
  26. package/color/color.module.d.ts +26 -0
  27. package/color/index.d.ts +5 -0
  28. package/color/public-api.d.ts +3 -0
  29. package/date/date.component.d.ts +70 -0
  30. package/date/date.model.d.ts +31 -0
  31. package/date/date.module.d.ts +23 -0
  32. package/date/index.d.ts +5 -0
  33. package/date/public-api.d.ts +2 -0
  34. package/draggable-items/draggable-item/draggable-item.component.d.ts +11 -0
  35. package/draggable-items/draggable-items.component.d.ts +36 -0
  36. package/draggable-items/draggable-items.model.d.ts +11 -0
  37. package/draggable-items/draggable-items.module.d.ts +18 -0
  38. package/draggable-items/index.d.ts +5 -0
  39. package/draggable-items/public-api.d.ts +4 -0
  40. package/esm2020/address/address.component.mjs +109 -0
  41. package/esm2020/address/address.module.mjs +54 -0
  42. package/esm2020/address/pepperi-addons-ngx-lib-address.mjs +5 -0
  43. package/esm2020/address/public-api.mjs +6 -0
  44. package/esm2020/attachment/attachment.component.mjs +240 -0
  45. package/esm2020/attachment/attachment.module.mjs +50 -0
  46. package/esm2020/attachment/pepperi-addons-ngx-lib-attachment.mjs +5 -0
  47. package/esm2020/attachment/public-api.mjs +6 -0
  48. package/esm2020/bread-crumbs/bread-crumbs.component.mjs +85 -0
  49. package/esm2020/bread-crumbs/bread-crumbs.model.mjs +7 -0
  50. package/esm2020/bread-crumbs/bread-crumbs.module.mjs +50 -0
  51. package/esm2020/bread-crumbs/pepperi-addons-ngx-lib-bread-crumbs.mjs +5 -0
  52. package/esm2020/bread-crumbs/public-api.mjs +7 -0
  53. package/esm2020/carousel/carousel-item.directive.mjs +33 -0
  54. package/esm2020/carousel/carousel.component.mjs +745 -0
  55. package/esm2020/carousel/carousel.module.mjs +17 -0
  56. package/esm2020/carousel/pepperi-addons-ngx-lib-carousel.mjs +5 -0
  57. package/esm2020/carousel/public-api.mjs +8 -0
  58. package/esm2020/checkbox/checkbox.component.mjs +168 -0
  59. package/esm2020/checkbox/checkbox.module.mjs +63 -0
  60. package/esm2020/checkbox/pepperi-addons-ngx-lib-checkbox.mjs +5 -0
  61. package/esm2020/checkbox/public-api.mjs +6 -0
  62. package/esm2020/color/color-picker.component.mjs +224 -0
  63. package/esm2020/color/color.component.mjs +90 -0
  64. package/esm2020/color/color.model.mjs +2 -0
  65. package/esm2020/color/color.module.mjs +93 -0
  66. package/esm2020/color/pepperi-addons-ngx-lib-color.mjs +5 -0
  67. package/esm2020/color/public-api.mjs +7 -0
  68. package/esm2020/date/date.component.mjs +312 -0
  69. package/esm2020/date/date.model.mjs +54 -0
  70. package/esm2020/date/date.module.mjs +88 -0
  71. package/esm2020/date/pepperi-addons-ngx-lib-date.mjs +5 -0
  72. package/esm2020/date/public-api.mjs +6 -0
  73. package/esm2020/draggable-items/draggable-item/draggable-item.component.mjs +27 -0
  74. package/esm2020/draggable-items/draggable-items.component.mjs +102 -0
  75. package/esm2020/draggable-items/draggable-items.model.mjs +2 -0
  76. package/esm2020/draggable-items/draggable-items.module.mjs +60 -0
  77. package/esm2020/draggable-items/pepperi-addons-ngx-lib-draggable-items.mjs +5 -0
  78. package/esm2020/draggable-items/public-api.mjs +8 -0
  79. package/esm2020/files-uploader/files-uploader.component.mjs +246 -0
  80. package/esm2020/files-uploader/files-uploader.module.mjs +79 -0
  81. package/esm2020/files-uploader/pepperi-addons-ngx-lib-files-uploader.mjs +5 -0
  82. package/esm2020/files-uploader/public-api.mjs +6 -0
  83. package/esm2020/form/field-generator.component.mjs +152 -0
  84. package/esm2020/form/form.component.mjs +1238 -0
  85. package/esm2020/form/form.model.mjs +2 -0
  86. package/esm2020/form/form.module.mjs +179 -0
  87. package/esm2020/form/indicators.component.mjs +23 -0
  88. package/esm2020/form/internal-button.component.mjs +184 -0
  89. package/esm2020/form/internal-carusel.component.mjs +117 -0
  90. package/esm2020/form/internal-carusel.service.mjs +32 -0
  91. package/esm2020/form/internal-field-generator.component.mjs +146 -0
  92. package/esm2020/form/internal-form.component.mjs +1216 -0
  93. package/esm2020/form/internal-list.component.mjs +513 -0
  94. package/esm2020/form/internal-menu.component.mjs +66 -0
  95. package/esm2020/form/internal-page.component.mjs +361 -0
  96. package/esm2020/form/internal-page.service.mjs +120 -0
  97. package/esm2020/form/pepperi-addons-ngx-lib-form.mjs +5 -0
  98. package/esm2020/form/public-api.mjs +7 -0
  99. package/esm2020/group-buttons/group-buttons.component.mjs +71 -0
  100. package/esm2020/group-buttons/group-buttons.module.mjs +59 -0
  101. package/esm2020/group-buttons/pepperi-addons-ngx-lib-group-buttons.mjs +5 -0
  102. package/esm2020/group-buttons/public-api.mjs +6 -0
  103. package/esm2020/image/image.component.mjs +263 -0
  104. package/esm2020/image/image.module.mjs +74 -0
  105. package/esm2020/image/image.service.mjs +50 -0
  106. package/esm2020/image/pepperi-addons-ngx-lib-image.mjs +5 -0
  107. package/esm2020/image/public-api.mjs +7 -0
  108. package/esm2020/images-filmstrip/images-filmstrip.component.mjs +337 -0
  109. package/esm2020/images-filmstrip/images-filmstrip.module.mjs +83 -0
  110. package/esm2020/images-filmstrip/pepperi-addons-ngx-lib-images-filmstrip.mjs +5 -0
  111. package/esm2020/images-filmstrip/public-api.mjs +6 -0
  112. package/esm2020/link/link.component.mjs +300 -0
  113. package/esm2020/link/link.module.mjs +80 -0
  114. package/esm2020/link/link.pipes.mjs +18 -0
  115. package/esm2020/link/pepperi-addons-ngx-lib-link.mjs +5 -0
  116. package/esm2020/link/public-api.mjs +7 -0
  117. package/esm2020/list/list-actions.component.mjs +44 -0
  118. package/esm2020/list/list-carousel.component.mjs +107 -0
  119. package/esm2020/list/list-chooser.component.mjs +64 -0
  120. package/esm2020/list/list-pager.component.mjs +120 -0
  121. package/esm2020/list/list-sorting.component.mjs +61 -0
  122. package/esm2020/list/list-total.component.mjs +30 -0
  123. package/esm2020/list/list-views.component.mjs +85 -0
  124. package/esm2020/list/list.component.mjs +1303 -0
  125. package/esm2020/list/list.model.mjs +4 -0
  126. package/esm2020/list/list.module.mjs +144 -0
  127. package/esm2020/list/list.pipes.mjs +47 -0
  128. package/esm2020/list/pepperi-addons-ngx-lib-list.mjs +5 -0
  129. package/esm2020/list/public-api.mjs +15 -0
  130. package/esm2020/list/virtual-scroller.mjs +1080 -0
  131. package/esm2020/menu/menu-item.component.mjs +115 -0
  132. package/esm2020/menu/menu.component.mjs +213 -0
  133. package/esm2020/menu/menu.model.mjs +19 -0
  134. package/esm2020/menu/menu.module.mjs +59 -0
  135. package/esm2020/menu/pepperi-addons-ngx-lib-menu.mjs +5 -0
  136. package/esm2020/menu/public-api.mjs +7 -0
  137. package/esm2020/page-layout/page-layout.component.mjs +35 -0
  138. package/esm2020/page-layout/page-layout.module.mjs +34 -0
  139. package/esm2020/page-layout/pepperi-addons-ngx-lib-page-layout.mjs +5 -0
  140. package/esm2020/page-layout/public-api.mjs +6 -0
  141. package/esm2020/profile-data-views-list/pepperi-addons-ngx-lib-profile-data-views-list.mjs +5 -0
  142. package/esm2020/profile-data-views-list/profile-data-view/profile-data-view.component.mjs +45 -0
  143. package/esm2020/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.mjs +81 -0
  144. package/esm2020/profile-data-views-list/profile-data-views-list.component.mjs +127 -0
  145. package/esm2020/profile-data-views-list/profile-data-views-list.model.mjs +2 -0
  146. package/esm2020/profile-data-views-list/profile-data-views-list.module.mjs +88 -0
  147. package/esm2020/profile-data-views-list/public-api.mjs +9 -0
  148. package/esm2020/quantity-selector/pepperi-addons-ngx-lib-quantity-selector.mjs +5 -0
  149. package/esm2020/quantity-selector/public-api.mjs +6 -0
  150. package/esm2020/quantity-selector/quantity-selector-validation.directive.mjs +49 -0
  151. package/esm2020/quantity-selector/quantity-selector.component.mjs +574 -0
  152. package/esm2020/quantity-selector/quantity-selector.module.mjs +82 -0
  153. package/esm2020/quantity-selector/quantity-selector.pipes.mjs +23 -0
  154. package/esm2020/query-builder/common/model/field.mjs +2 -0
  155. package/esm2020/query-builder/common/model/filter.mjs +2 -0
  156. package/esm2020/query-builder/common/model/legacy.mjs +2 -0
  157. package/esm2020/query-builder/common/model/operator-unit.mjs +42 -0
  158. package/esm2020/query-builder/common/model/operator.mjs +276 -0
  159. package/esm2020/query-builder/common/model/structure.mjs +2 -0
  160. package/esm2020/query-builder/common/model/type-map.mjs +27 -0
  161. package/esm2020/query-builder/common/model/type.mjs +6 -0
  162. package/esm2020/query-builder/common/services/output-query.service.mjs +116 -0
  163. package/esm2020/query-builder/common/services/query-structure.service.mjs +249 -0
  164. package/esm2020/query-builder/common/services/type-convertor.service.mjs +42 -0
  165. package/esm2020/query-builder/pepperi-addons-ngx-lib-query-builder.mjs +5 -0
  166. package/esm2020/query-builder/public-api.mjs +9 -0
  167. package/esm2020/query-builder/query-builder-item/query-builder-item.component.mjs +125 -0
  168. package/esm2020/query-builder/query-builder-section/query-builder-section.component.mjs +71 -0
  169. package/esm2020/query-builder/query-builder.component.mjs +110 -0
  170. package/esm2020/query-builder/query-builder.module.mjs +70 -0
  171. package/esm2020/query-builder/query-builder.service.mjs +102 -0
  172. package/esm2020/remote-loader/addon-block-loader.component.mjs +102 -0
  173. package/esm2020/remote-loader/addon-block-loader.service.mjs +62 -0
  174. package/esm2020/remote-loader/pepperi-addons-ngx-lib-remote-loader.mjs +5 -0
  175. package/esm2020/remote-loader/public-api.mjs +11 -0
  176. package/esm2020/remote-loader/remote-loader-element.component.mjs +116 -0
  177. package/esm2020/remote-loader/remote-loader.component.mjs +115 -0
  178. package/esm2020/remote-loader/remote-loader.model.mjs +2 -0
  179. package/esm2020/remote-loader/remote-loader.module.mjs +69 -0
  180. package/esm2020/remote-loader/remote-loader.service.mjs +81 -0
  181. package/esm2020/rich-html-textarea/pepperi-addons-ngx-lib-rich-html-textarea.mjs +5 -0
  182. package/esm2020/rich-html-textarea/public-api.mjs +6 -0
  183. package/esm2020/rich-html-textarea/rich-html-textarea.component.mjs +250 -0
  184. package/esm2020/rich-html-textarea/rich-html-textarea.module.mjs +95 -0
  185. package/esm2020/search/pepperi-addons-ngx-lib-search.mjs +5 -0
  186. package/esm2020/search/public-api.mjs +7 -0
  187. package/esm2020/search/search.component.mjs +317 -0
  188. package/esm2020/search/search.model.mjs +2 -0
  189. package/esm2020/search/search.module.mjs +70 -0
  190. package/esm2020/select/pepperi-addons-ngx-lib-select.mjs +5 -0
  191. package/esm2020/select/public-api.mjs +6 -0
  192. package/esm2020/select/select.component.mjs +290 -0
  193. package/esm2020/select/select.module.mjs +70 -0
  194. package/esm2020/select-panel/pepperi-addons-ngx-lib-select-panel.mjs +5 -0
  195. package/esm2020/select-panel/public-api.mjs +7 -0
  196. package/esm2020/select-panel/select-panel.component.mjs +159 -0
  197. package/esm2020/select-panel/select-panel.model.mjs +2 -0
  198. package/esm2020/select-panel/select-panel.module.mjs +70 -0
  199. package/esm2020/separator/pepperi-addons-ngx-lib-separator.mjs +5 -0
  200. package/esm2020/separator/public-api.mjs +6 -0
  201. package/esm2020/separator/separator.component.mjs +63 -0
  202. package/esm2020/separator/separator.module.mjs +18 -0
  203. package/esm2020/side-bar/pepperi-addons-ngx-lib-side-bar.mjs +5 -0
  204. package/esm2020/side-bar/public-api.mjs +7 -0
  205. package/esm2020/side-bar/side-bar.component.mjs +122 -0
  206. package/esm2020/side-bar/side-bar.model.mjs +2 -0
  207. package/esm2020/side-bar/side-bar.module.mjs +55 -0
  208. package/esm2020/signature/pepperi-addons-ngx-lib-signature.mjs +5 -0
  209. package/esm2020/signature/public-api.mjs +7 -0
  210. package/esm2020/signature/signature-dialog.component.mjs +79 -0
  211. package/esm2020/signature/signature.component.mjs +282 -0
  212. package/esm2020/signature/signature.module.mjs +91 -0
  213. package/esm2020/size-detector/pepperi-addons-ngx-lib-size-detector.mjs +5 -0
  214. package/esm2020/size-detector/public-api.mjs +6 -0
  215. package/esm2020/size-detector/size-detector.component.mjs +92 -0
  216. package/esm2020/size-detector/size-detector.module.mjs +35 -0
  217. package/esm2020/skeleton-loader/pepperi-addons-ngx-lib-skeleton-loader.mjs +5 -0
  218. package/esm2020/skeleton-loader/public-api.mjs +6 -0
  219. package/esm2020/skeleton-loader/skeleton-loader.component.mjs +44 -0
  220. package/esm2020/skeleton-loader/skeleton-loader.module.mjs +24 -0
  221. package/esm2020/smart-filters/boolean-filter/boolean-filter.component.mjs +75 -0
  222. package/esm2020/smart-filters/common/filter-actions.component.mjs +29 -0
  223. package/esm2020/smart-filters/common/model/base-filter-component.mjs +296 -0
  224. package/esm2020/smart-filters/common/model/creator.mjs +76 -0
  225. package/esm2020/smart-filters/common/model/field.mjs +117 -0
  226. package/esm2020/smart-filters/common/model/filter.mjs +2 -0
  227. package/esm2020/smart-filters/common/model/operator.mjs +278 -0
  228. package/esm2020/smart-filters/common/model/type.mjs +2 -0
  229. package/esm2020/smart-filters/date-filter/date-filter.component.mjs +182 -0
  230. package/esm2020/smart-filters/multi-select-filter/multi-select-filter.component.mjs +200 -0
  231. package/esm2020/smart-filters/number-filter/number-filter.component.mjs +136 -0
  232. package/esm2020/smart-filters/pepperi-addons-ngx-lib-smart-filters.mjs +5 -0
  233. package/esm2020/smart-filters/public-api.mjs +19 -0
  234. package/esm2020/smart-filters/smart-filters.component.mjs +141 -0
  235. package/esm2020/smart-filters/smart-filters.module.mjs +158 -0
  236. package/esm2020/smart-filters/text-filter/text-filter.component.mjs +93 -0
  237. package/esm2020/snack-bar/default-snack-bar.component.mjs +29 -0
  238. package/esm2020/snack-bar/pepperi-addons-ngx-lib-snack-bar.mjs +5 -0
  239. package/esm2020/snack-bar/public-api.mjs +8 -0
  240. package/esm2020/snack-bar/snack-bar.component.mjs +26 -0
  241. package/esm2020/snack-bar/snack-bar.model.mjs +7 -0
  242. package/esm2020/snack-bar/snack-bar.module.mjs +63 -0
  243. package/esm2020/snack-bar/snack-bar.service.mjs +60 -0
  244. package/esm2020/textarea/pepperi-addons-ngx-lib-textarea.mjs +5 -0
  245. package/esm2020/textarea/public-api.mjs +6 -0
  246. package/esm2020/textarea/textarea.component.mjs +188 -0
  247. package/esm2020/textarea/textarea.module.mjs +82 -0
  248. package/esm2020/textbox/pepperi-addons-ngx-lib-textbox.mjs +5 -0
  249. package/esm2020/textbox/public-api.mjs +6 -0
  250. package/esm2020/textbox/textbox-validation.directive.mjs +93 -0
  251. package/esm2020/textbox/textbox.component.mjs +582 -0
  252. package/esm2020/textbox/textbox.module.mjs +72 -0
  253. package/esm2020/top-bar/pepperi-addons-ngx-lib-top-bar.mjs +5 -0
  254. package/esm2020/top-bar/public-api.mjs +7 -0
  255. package/esm2020/top-bar/top-bar.component.mjs +112 -0
  256. package/esm2020/top-bar/top-bar.model.mjs +2 -0
  257. package/esm2020/top-bar/top-bar.module.mjs +62 -0
  258. package/fesm2015/pepperi-addons-ngx-lib-address.mjs +170 -0
  259. package/fesm2015/pepperi-addons-ngx-lib-address.mjs.map +1 -0
  260. package/fesm2015/pepperi-addons-ngx-lib-attachment.mjs +297 -0
  261. package/fesm2015/pepperi-addons-ngx-lib-attachment.mjs.map +1 -0
  262. package/fesm2015/pepperi-addons-ngx-lib-bread-crumbs.mjs +147 -0
  263. package/fesm2015/pepperi-addons-ngx-lib-bread-crumbs.mjs.map +1 -0
  264. package/fesm2015/pepperi-addons-ngx-lib-carousel.mjs +804 -0
  265. package/fesm2015/pepperi-addons-ngx-lib-carousel.mjs.map +1 -0
  266. package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs +237 -0
  267. package/fesm2015/pepperi-addons-ngx-lib-checkbox.mjs.map +1 -0
  268. package/fesm2015/pepperi-addons-ngx-lib-color.mjs +404 -0
  269. package/fesm2015/pepperi-addons-ngx-lib-color.mjs.map +1 -0
  270. package/fesm2015/pepperi-addons-ngx-lib-date.mjs +458 -0
  271. package/fesm2015/pepperi-addons-ngx-lib-date.mjs.map +1 -0
  272. package/fesm2015/pepperi-addons-ngx-lib-draggable-items.mjs +192 -0
  273. package/fesm2015/pepperi-addons-ngx-lib-draggable-items.mjs.map +1 -0
  274. package/fesm2015/pepperi-addons-ngx-lib-files-uploader.mjs +331 -0
  275. package/fesm2015/pepperi-addons-ngx-lib-files-uploader.mjs.map +1 -0
  276. package/fesm2015/pepperi-addons-ngx-lib-form.mjs +4226 -0
  277. package/fesm2015/pepperi-addons-ngx-lib-form.mjs.map +1 -0
  278. package/fesm2015/pepperi-addons-ngx-lib-group-buttons.mjs +136 -0
  279. package/fesm2015/pepperi-addons-ngx-lib-group-buttons.mjs.map +1 -0
  280. package/fesm2015/pepperi-addons-ngx-lib-image.mjs +388 -0
  281. package/fesm2015/pepperi-addons-ngx-lib-image.mjs.map +1 -0
  282. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs +425 -0
  283. package/fesm2015/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +1 -0
  284. package/fesm2015/pepperi-addons-ngx-lib-link.mjs +399 -0
  285. package/fesm2015/pepperi-addons-ngx-lib-link.mjs.map +1 -0
  286. package/fesm2015/pepperi-addons-ngx-lib-list.mjs +3047 -0
  287. package/fesm2015/pepperi-addons-ngx-lib-list.mjs.map +1 -0
  288. package/fesm2015/pepperi-addons-ngx-lib-menu.mjs +399 -0
  289. package/fesm2015/pepperi-addons-ngx-lib-menu.mjs.map +1 -0
  290. package/fesm2015/pepperi-addons-ngx-lib-page-layout.mjs +77 -0
  291. package/fesm2015/pepperi-addons-ngx-lib-page-layout.mjs.map +1 -0
  292. package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs +337 -0
  293. package/fesm2015/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -0
  294. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs +728 -0
  295. package/fesm2015/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -0
  296. package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs +1216 -0
  297. package/fesm2015/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -0
  298. package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs +555 -0
  299. package/fesm2015/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -0
  300. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs +349 -0
  301. package/fesm2015/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -0
  302. package/fesm2015/pepperi-addons-ngx-lib-search.mjs +393 -0
  303. package/fesm2015/pepperi-addons-ngx-lib-search.mjs.map +1 -0
  304. package/fesm2015/pepperi-addons-ngx-lib-select-panel.mjs +237 -0
  305. package/fesm2015/pepperi-addons-ngx-lib-select-panel.mjs.map +1 -0
  306. package/fesm2015/pepperi-addons-ngx-lib-select.mjs +366 -0
  307. package/fesm2015/pepperi-addons-ngx-lib-select.mjs.map +1 -0
  308. package/fesm2015/pepperi-addons-ngx-lib-separator.mjs +89 -0
  309. package/fesm2015/pepperi-addons-ngx-lib-separator.mjs.map +1 -0
  310. package/fesm2015/pepperi-addons-ngx-lib-side-bar.mjs +182 -0
  311. package/fesm2015/pepperi-addons-ngx-lib-side-bar.mjs.map +1 -0
  312. package/fesm2015/pepperi-addons-ngx-lib-signature.mjs +455 -0
  313. package/fesm2015/pepperi-addons-ngx-lib-signature.mjs.map +1 -0
  314. package/fesm2015/pepperi-addons-ngx-lib-size-detector.mjs +134 -0
  315. package/fesm2015/pepperi-addons-ngx-lib-size-detector.mjs.map +1 -0
  316. package/fesm2015/pepperi-addons-ngx-lib-skeleton-loader.mjs +78 -0
  317. package/fesm2015/pepperi-addons-ngx-lib-skeleton-loader.mjs.map +1 -0
  318. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs +1715 -0
  319. package/fesm2015/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -0
  320. package/fesm2015/pepperi-addons-ngx-lib-snack-bar.mjs +183 -0
  321. package/fesm2015/pepperi-addons-ngx-lib-snack-bar.mjs.map +1 -0
  322. package/fesm2015/pepperi-addons-ngx-lib-textarea.mjs +277 -0
  323. package/fesm2015/pepperi-addons-ngx-lib-textarea.mjs.map +1 -0
  324. package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs +748 -0
  325. package/fesm2015/pepperi-addons-ngx-lib-textbox.mjs.map +1 -0
  326. package/fesm2015/pepperi-addons-ngx-lib-top-bar.mjs +180 -0
  327. package/fesm2015/pepperi-addons-ngx-lib-top-bar.mjs.map +1 -0
  328. package/fesm2020/pepperi-addons-ngx-lib-address.mjs +170 -0
  329. package/fesm2020/pepperi-addons-ngx-lib-address.mjs.map +1 -0
  330. package/fesm2020/pepperi-addons-ngx-lib-attachment.mjs +297 -0
  331. package/fesm2020/pepperi-addons-ngx-lib-attachment.mjs.map +1 -0
  332. package/fesm2020/pepperi-addons-ngx-lib-bread-crumbs.mjs +147 -0
  333. package/fesm2020/pepperi-addons-ngx-lib-bread-crumbs.mjs.map +1 -0
  334. package/fesm2020/pepperi-addons-ngx-lib-carousel.mjs +800 -0
  335. package/fesm2020/pepperi-addons-ngx-lib-carousel.mjs.map +1 -0
  336. package/fesm2020/pepperi-addons-ngx-lib-checkbox.mjs +237 -0
  337. package/fesm2020/pepperi-addons-ngx-lib-checkbox.mjs.map +1 -0
  338. package/fesm2020/pepperi-addons-ngx-lib-color.mjs +401 -0
  339. package/fesm2020/pepperi-addons-ngx-lib-color.mjs.map +1 -0
  340. package/fesm2020/pepperi-addons-ngx-lib-date.mjs +454 -0
  341. package/fesm2020/pepperi-addons-ngx-lib-date.mjs.map +1 -0
  342. package/fesm2020/pepperi-addons-ngx-lib-draggable-items.mjs +191 -0
  343. package/fesm2020/pepperi-addons-ngx-lib-draggable-items.mjs.map +1 -0
  344. package/fesm2020/pepperi-addons-ngx-lib-files-uploader.mjs +328 -0
  345. package/fesm2020/pepperi-addons-ngx-lib-files-uploader.mjs.map +1 -0
  346. package/fesm2020/pepperi-addons-ngx-lib-form.mjs +4225 -0
  347. package/fesm2020/pepperi-addons-ngx-lib-form.mjs.map +1 -0
  348. package/fesm2020/pepperi-addons-ngx-lib-group-buttons.mjs +136 -0
  349. package/fesm2020/pepperi-addons-ngx-lib-group-buttons.mjs.map +1 -0
  350. package/fesm2020/pepperi-addons-ngx-lib-image.mjs +386 -0
  351. package/fesm2020/pepperi-addons-ngx-lib-image.mjs.map +1 -0
  352. package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs +422 -0
  353. package/fesm2020/pepperi-addons-ngx-lib-images-filmstrip.mjs.map +1 -0
  354. package/fesm2020/pepperi-addons-ngx-lib-link.mjs +399 -0
  355. package/fesm2020/pepperi-addons-ngx-lib-link.mjs.map +1 -0
  356. package/fesm2020/pepperi-addons-ngx-lib-list.mjs +3035 -0
  357. package/fesm2020/pepperi-addons-ngx-lib-list.mjs.map +1 -0
  358. package/fesm2020/pepperi-addons-ngx-lib-menu.mjs +399 -0
  359. package/fesm2020/pepperi-addons-ngx-lib-menu.mjs.map +1 -0
  360. package/fesm2020/pepperi-addons-ngx-lib-page-layout.mjs +77 -0
  361. package/fesm2020/pepperi-addons-ngx-lib-page-layout.mjs.map +1 -0
  362. package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs +336 -0
  363. package/fesm2020/pepperi-addons-ngx-lib-profile-data-views-list.mjs.map +1 -0
  364. package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs +726 -0
  365. package/fesm2020/pepperi-addons-ngx-lib-quantity-selector.mjs.map +1 -0
  366. package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs +1202 -0
  367. package/fesm2020/pepperi-addons-ngx-lib-query-builder.mjs.map +1 -0
  368. package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs +532 -0
  369. package/fesm2020/pepperi-addons-ngx-lib-remote-loader.mjs.map +1 -0
  370. package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs +349 -0
  371. package/fesm2020/pepperi-addons-ngx-lib-rich-html-textarea.mjs.map +1 -0
  372. package/fesm2020/pepperi-addons-ngx-lib-search.mjs +392 -0
  373. package/fesm2020/pepperi-addons-ngx-lib-search.mjs.map +1 -0
  374. package/fesm2020/pepperi-addons-ngx-lib-select-panel.mjs +236 -0
  375. package/fesm2020/pepperi-addons-ngx-lib-select-panel.mjs.map +1 -0
  376. package/fesm2020/pepperi-addons-ngx-lib-select.mjs +366 -0
  377. package/fesm2020/pepperi-addons-ngx-lib-select.mjs.map +1 -0
  378. package/fesm2020/pepperi-addons-ngx-lib-separator.mjs +89 -0
  379. package/fesm2020/pepperi-addons-ngx-lib-separator.mjs.map +1 -0
  380. package/fesm2020/pepperi-addons-ngx-lib-side-bar.mjs +182 -0
  381. package/fesm2020/pepperi-addons-ngx-lib-side-bar.mjs.map +1 -0
  382. package/fesm2020/pepperi-addons-ngx-lib-signature.mjs +450 -0
  383. package/fesm2020/pepperi-addons-ngx-lib-signature.mjs.map +1 -0
  384. package/fesm2020/pepperi-addons-ngx-lib-size-detector.mjs +134 -0
  385. package/fesm2020/pepperi-addons-ngx-lib-size-detector.mjs.map +1 -0
  386. package/fesm2020/pepperi-addons-ngx-lib-skeleton-loader.mjs +76 -0
  387. package/fesm2020/pepperi-addons-ngx-lib-skeleton-loader.mjs.map +1 -0
  388. package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs +1708 -0
  389. package/fesm2020/pepperi-addons-ngx-lib-smart-filters.mjs.map +1 -0
  390. package/fesm2020/pepperi-addons-ngx-lib-snack-bar.mjs +180 -0
  391. package/fesm2020/pepperi-addons-ngx-lib-snack-bar.mjs.map +1 -0
  392. package/fesm2020/pepperi-addons-ngx-lib-textarea.mjs +276 -0
  393. package/fesm2020/pepperi-addons-ngx-lib-textarea.mjs.map +1 -0
  394. package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs +748 -0
  395. package/fesm2020/pepperi-addons-ngx-lib-textbox.mjs.map +1 -0
  396. package/fesm2020/pepperi-addons-ngx-lib-top-bar.mjs +179 -0
  397. package/fesm2020/pepperi-addons-ngx-lib-top-bar.mjs.map +1 -0
  398. package/files-uploader/files-uploader.component.d.ts +60 -0
  399. package/files-uploader/files-uploader.module.d.ts +21 -0
  400. package/files-uploader/index.d.ts +5 -0
  401. package/files-uploader/public-api.d.ts +2 -0
  402. package/form/field-generator.component.d.ts +37 -0
  403. package/form/form.component.d.ts +93 -0
  404. package/form/form.model.d.ts +20 -0
  405. package/form/form.module.d.ts +50 -0
  406. package/form/index.d.ts +5 -0
  407. package/form/indicators.component.d.ts +10 -0
  408. package/form/internal-button.component.d.ts +42 -0
  409. package/form/internal-carusel.component.d.ts +39 -0
  410. package/form/internal-carusel.service.d.ts +10 -0
  411. package/form/internal-field-generator.component.d.ts +33 -0
  412. package/form/internal-form.component.d.ts +89 -0
  413. package/form/internal-list.component.d.ts +95 -0
  414. package/form/internal-menu.component.d.ts +19 -0
  415. package/form/internal-page.component.d.ts +73 -0
  416. package/form/internal-page.service.d.ts +22 -0
  417. package/form/public-api.d.ts +3 -0
  418. package/group-buttons/group-buttons.component.d.ts +24 -0
  419. package/group-buttons/group-buttons.module.d.ts +18 -0
  420. package/group-buttons/index.d.ts +5 -0
  421. package/group-buttons/public-api.d.ts +2 -0
  422. package/image/image.component.d.ts +74 -0
  423. package/image/image.module.d.ts +20 -0
  424. package/image/image.service.d.ts +14 -0
  425. package/image/index.d.ts +5 -0
  426. package/image/public-api.d.ts +3 -0
  427. package/images-filmstrip/images-filmstrip.component.d.ts +87 -0
  428. package/images-filmstrip/images-filmstrip.module.d.ts +22 -0
  429. package/images-filmstrip/index.d.ts +5 -0
  430. package/images-filmstrip/public-api.d.ts +2 -0
  431. package/link/index.d.ts +5 -0
  432. package/link/link.component.d.ts +121 -0
  433. package/link/link.module.d.ts +22 -0
  434. package/link/link.pipes.d.ts +7 -0
  435. package/link/public-api.d.ts +3 -0
  436. package/list/index.d.ts +5 -0
  437. package/list/list-actions.component.d.ts +18 -0
  438. package/list/list-carousel.component.d.ts +40 -0
  439. package/list/list-chooser.component.d.ts +29 -0
  440. package/list/list-pager.component.d.ts +39 -0
  441. package/list/list-sorting.component.d.ts +30 -0
  442. package/list/list-total.component.d.ts +11 -0
  443. package/list/list-views.component.d.ts +35 -0
  444. package/list/list.component.d.ts +177 -0
  445. package/list/list.model.d.ts +32 -0
  446. package/list/list.module.d.ts +34 -0
  447. package/list/list.pipes.d.ts +16 -0
  448. package/list/public-api.d.ts +10 -0
  449. package/list/virtual-scroller.d.ts +183 -0
  450. package/menu/index.d.ts +5 -0
  451. package/menu/menu-item.component.d.ts +28 -0
  452. package/menu/menu.component.d.ts +48 -0
  453. package/menu/menu.model.d.ts +25 -0
  454. package/menu/menu.module.d.ts +18 -0
  455. package/menu/public-api.d.ts +3 -0
  456. package/package.json +1 -1
  457. package/page-layout/index.d.ts +5 -0
  458. package/page-layout/page-layout.component.d.ts +19 -0
  459. package/page-layout/page-layout.module.d.ts +10 -0
  460. package/page-layout/public-api.d.ts +2 -0
  461. package/profile-data-views-list/index.d.ts +5 -0
  462. package/profile-data-views-list/profile-data-view/profile-data-view.component.d.ts +18 -0
  463. package/profile-data-views-list/profile-data-views-card/profile-data-views-card.component.d.ts +25 -0
  464. package/profile-data-views-list/profile-data-views-list.component.d.ts +38 -0
  465. package/profile-data-views-list/profile-data-views-list.model.d.ts +26 -0
  466. package/profile-data-views-list/profile-data-views-list.module.d.ts +23 -0
  467. package/profile-data-views-list/public-api.d.ts +5 -0
  468. package/quantity-selector/index.d.ts +5 -0
  469. package/quantity-selector/public-api.d.ts +2 -0
  470. package/quantity-selector/quantity-selector-validation.directive.d.ts +17 -0
  471. package/quantity-selector/quantity-selector.component.d.ts +110 -0
  472. package/quantity-selector/quantity-selector.module.d.ts +23 -0
  473. package/quantity-selector/quantity-selector.pipes.d.ts +7 -0
  474. package/query-builder/common/model/field.d.ts +8 -0
  475. package/query-builder/common/model/filter.d.ts +6 -0
  476. package/query-builder/common/model/legacy.d.ts +31 -0
  477. package/query-builder/common/model/operator-unit.d.ts +13 -0
  478. package/query-builder/common/model/operator.d.ts +31 -0
  479. package/query-builder/common/model/structure.d.ts +4 -0
  480. package/query-builder/common/model/type-map.d.ts +12 -0
  481. package/query-builder/common/model/type.d.ts +4 -0
  482. package/query-builder/common/services/output-query.service.d.ts +47 -0
  483. package/query-builder/common/services/query-structure.service.d.ts +83 -0
  484. package/query-builder/common/services/type-convertor.service.d.ts +13 -0
  485. package/query-builder/index.d.ts +5 -0
  486. package/query-builder/public-api.d.ts +5 -0
  487. package/query-builder/query-builder-item/query-builder-item.component.d.ts +41 -0
  488. package/query-builder/query-builder-section/query-builder-section.component.d.ts +30 -0
  489. package/query-builder/query-builder.component.d.ts +39 -0
  490. package/query-builder/query-builder.module.d.ts +20 -0
  491. package/query-builder/query-builder.service.d.ts +30 -0
  492. package/remote-loader/addon-block-loader.component.d.ts +36 -0
  493. package/remote-loader/addon-block-loader.service.d.ts +15 -0
  494. package/remote-loader/index.d.ts +5 -0
  495. package/remote-loader/public-api.d.ts +7 -0
  496. package/remote-loader/remote-loader-element.component.d.ts +32 -0
  497. package/remote-loader/remote-loader.component.d.ts +25 -0
  498. package/remote-loader/remote-loader.model.d.ts +41 -0
  499. package/remote-loader/remote-loader.module.d.ts +15 -0
  500. package/remote-loader/remote-loader.service.d.ts +15 -0
  501. package/rich-html-textarea/index.d.ts +5 -0
  502. package/rich-html-textarea/public-api.d.ts +2 -0
  503. package/rich-html-textarea/rich-html-textarea.component.d.ts +80 -0
  504. package/rich-html-textarea/rich-html-textarea.module.d.ts +25 -0
  505. package/search/index.d.ts +5 -0
  506. package/search/public-api.d.ts +3 -0
  507. package/search/search.component.d.ts +65 -0
  508. package/search/search.model.d.ts +14 -0
  509. package/search/search.module.d.ts +20 -0
  510. package/select/index.d.ts +5 -0
  511. package/select/public-api.d.ts +2 -0
  512. package/select/select.component.d.ts +67 -0
  513. package/select/select.module.d.ts +20 -0
  514. package/select-panel/index.d.ts +5 -0
  515. package/select-panel/public-api.d.ts +3 -0
  516. package/select-panel/select-panel.component.d.ts +51 -0
  517. package/select-panel/select-panel.model.d.ts +5 -0
  518. package/select-panel/select-panel.module.d.ts +19 -0
  519. package/separator/index.d.ts +5 -0
  520. package/separator/public-api.d.ts +2 -0
  521. package/separator/separator.component.d.ts +22 -0
  522. package/separator/separator.module.d.ts +8 -0
  523. package/side-bar/index.d.ts +5 -0
  524. package/side-bar/public-api.d.ts +3 -0
  525. package/side-bar/side-bar.component.d.ts +42 -0
  526. package/side-bar/side-bar.model.d.ts +4 -0
  527. package/side-bar/side-bar.module.d.ts +16 -0
  528. package/signature/index.d.ts +5 -0
  529. package/signature/public-api.d.ts +3 -0
  530. package/signature/signature-dialog.component.d.ts +29 -0
  531. package/signature/signature.component.d.ts +59 -0
  532. package/signature/signature.module.d.ts +25 -0
  533. package/size-detector/index.d.ts +5 -0
  534. package/size-detector/public-api.d.ts +2 -0
  535. package/size-detector/size-detector.component.d.ts +29 -0
  536. package/size-detector/size-detector.module.d.ts +11 -0
  537. package/skeleton-loader/index.d.ts +5 -0
  538. package/skeleton-loader/public-api.d.ts +2 -0
  539. package/skeleton-loader/skeleton-loader.component.d.ts +20 -0
  540. package/skeleton-loader/skeleton-loader.module.d.ts +9 -0
  541. package/smart-filters/boolean-filter/boolean-filter.component.d.ts +29 -0
  542. package/smart-filters/common/filter-actions.component.d.ts +12 -0
  543. package/smart-filters/common/model/base-filter-component.d.ts +74 -0
  544. package/smart-filters/common/model/creator.d.ts +6 -0
  545. package/smart-filters/common/model/field.d.ts +69 -0
  546. package/smart-filters/common/model/filter.d.ts +11 -0
  547. package/smart-filters/common/model/operator.d.ts +52 -0
  548. package/smart-filters/common/model/type.d.ts +4 -0
  549. package/smart-filters/date-filter/date-filter.component.d.ts +61 -0
  550. package/smart-filters/index.d.ts +5 -0
  551. package/smart-filters/multi-select-filter/multi-select-filter.component.d.ts +57 -0
  552. package/smart-filters/number-filter/number-filter.component.d.ts +53 -0
  553. package/smart-filters/public-api.d.ts +14 -0
  554. package/smart-filters/smart-filters.component.d.ts +35 -0
  555. package/smart-filters/smart-filters.module.d.ts +37 -0
  556. package/smart-filters/text-filter/text-filter.component.d.ts +29 -0
  557. package/snack-bar/default-snack-bar.component.d.ts +13 -0
  558. package/snack-bar/index.d.ts +5 -0
  559. package/snack-bar/public-api.d.ts +4 -0
  560. package/snack-bar/snack-bar.component.d.ts +12 -0
  561. package/snack-bar/snack-bar.model.d.ts +8 -0
  562. package/snack-bar/snack-bar.module.d.ts +19 -0
  563. package/snack-bar/snack-bar.service.d.ts +24 -0
  564. package/textarea/index.d.ts +5 -0
  565. package/textarea/public-api.d.ts +2 -0
  566. package/textarea/textarea.component.d.ts +56 -0
  567. package/textarea/textarea.module.d.ts +23 -0
  568. package/textbox/index.d.ts +5 -0
  569. package/textbox/public-api.d.ts +2 -0
  570. package/textbox/textbox-validation.directive.d.ts +22 -0
  571. package/textbox/textbox.component.d.ts +157 -0
  572. package/textbox/textbox.module.d.ts +22 -0
  573. package/top-bar/index.d.ts +5 -0
  574. package/top-bar/public-api.d.ts +3 -0
  575. package/top-bar/top-bar.component.d.ts +39 -0
  576. package/top-bar/top-bar.model.d.ts +4 -0
  577. package/top-bar/top-bar.module.d.ts +18 -0
@@ -0,0 +1,3047 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, PLATFORM_ID, ElementRef, Component, Inject, Optional, Input, Output, ViewChild, ContentChild, NgModule, Injectable, Pipe } from '@angular/core';
3
+ import * as i2 from '@angular/common';
4
+ import { isPlatformServer, CommonModule } from '@angular/common';
5
+ import { MatCommonModule } from '@angular/material/core';
6
+ import * as i3 from '@angular/material/button';
7
+ import { MatButtonModule } from '@angular/material/button';
8
+ import * as i3$1 from '@angular/material/checkbox';
9
+ import { MatCheckboxModule } from '@angular/material/checkbox';
10
+ import * as i4$1 from '@angular/material/radio';
11
+ import { MatRadioModule } from '@angular/material/radio';
12
+ import * as i4 from '@angular/material/icon';
13
+ import { MatIconModule } from '@angular/material/icon';
14
+ import { MatMenuModule } from '@angular/material/menu';
15
+ import * as i1 from '@pepperi-addons/ngx-lib';
16
+ import { FIELD_TYPE, PepScreenSizeType, PepNgxLibModule } from '@pepperi-addons/ngx-lib';
17
+ import * as i2$2 from '@pepperi-addons/ngx-lib/bread-crumbs';
18
+ import { PepBreadCrumbItem, PepBreadCrumbsModule } from '@pepperi-addons/ngx-lib/bread-crumbs';
19
+ import * as i3$2 from '@pepperi-addons/ngx-lib/button';
20
+ import { PepButtonModule } from '@pepperi-addons/ngx-lib/button';
21
+ import * as i4$2 from '@pepperi-addons/ngx-lib/carousel';
22
+ import { PepCarouselComponent, PepCarouselModule } from '@pepperi-addons/ngx-lib/carousel';
23
+ import * as i5 from '@pepperi-addons/ngx-lib/icon';
24
+ import { pepIconArrowDown, pepIconArrowEither, pepIconArrowUp, pepIconSystemMust, pepIconArrowRight, pepIconArrowRightAlt, pepIconArrowLeft, pepIconArrowLeftAlt, PepIconModule } from '@pepperi-addons/ngx-lib/icon';
25
+ import * as i7 from '@pepperi-addons/ngx-lib/form';
26
+ import { PepFormModule } from '@pepperi-addons/ngx-lib/form';
27
+ import * as i1$1 from '@pepperi-addons/ngx-lib/menu';
28
+ import { PepMenuModule } from '@pepperi-addons/ngx-lib/menu';
29
+ import * as i6 from '@pepperi-addons/ngx-lib/textbox';
30
+ import { PepTextboxModule } from '@pepperi-addons/ngx-lib/textbox';
31
+ import * as tween from '@tweenjs/tween.js';
32
+ import { coerceNumberProperty } from '@angular/cdk/coercion';
33
+ import * as i2$1 from '@ngx-translate/core';
34
+
35
+ function VIRTUAL_SCROLLER_DEFAULT_OPTIONS_FACTORY() {
36
+ return {
37
+ checkResizeInterval: 1000,
38
+ modifyOverflowStyleOfParentScroll: true,
39
+ resizeBypassRefreshThreshold: 5,
40
+ scrollAnimationTime: 750,
41
+ scrollDebounceTime: 0,
42
+ scrollThrottlingTime: 0,
43
+ stripedTable: false
44
+ };
45
+ }
46
+ class VirtualScrollerComponent {
47
+ constructor(element, renderer, zone, changeDetectorRef, platformId, options) {
48
+ this.element = element;
49
+ this.renderer = renderer;
50
+ this.zone = zone;
51
+ this.changeDetectorRef = changeDetectorRef;
52
+ this.window = window;
53
+ this._disable = false;
54
+ this.executeRefreshOutsideAngularZone = false;
55
+ this._enableUnequalChildrenSizes = false;
56
+ this.RTL = false;
57
+ this.useMarginInsteadOfTranslate = false;
58
+ this.ssrViewportWidth = 1920;
59
+ this.ssrViewportHeight = 1080;
60
+ this._items = [];
61
+ this.compareItems = (item1, item2) => item1 === item2;
62
+ // private _lastChildRect: DOMRect = null;
63
+ this.vsChildRectChange = new EventEmitter();
64
+ this.vsUpdate = new EventEmitter();
65
+ this.vsChange = new EventEmitter();
66
+ this.vsStart = new EventEmitter();
67
+ this.vsEnd = new EventEmitter();
68
+ this.calculatedScrollbarWidth = 0;
69
+ this.calculatedScrollbarHeight = 0;
70
+ this.padding = 0;
71
+ this.previousViewPort = {};
72
+ this.cachedPageSize = 0;
73
+ this.previousScrollNumberElements = 0;
74
+ this.isAngularUniversalSSR = isPlatformServer(platformId);
75
+ const defaultOptions = VIRTUAL_SCROLLER_DEFAULT_OPTIONS_FACTORY();
76
+ this.checkResizeInterval = (options === null || options === void 0 ? void 0 : options.checkResizeInterval) || defaultOptions.checkResizeInterval;
77
+ this.modifyOverflowStyleOfParentScroll = (options === null || options === void 0 ? void 0 : options.modifyOverflowStyleOfParentScroll) || defaultOptions.modifyOverflowStyleOfParentScroll;
78
+ this.resizeBypassRefreshThreshold = (options === null || options === void 0 ? void 0 : options.resizeBypassRefreshThreshold) || defaultOptions.resizeBypassRefreshThreshold;
79
+ this.scrollAnimationTime = (options === null || options === void 0 ? void 0 : options.scrollAnimationTime) || defaultOptions.scrollAnimationTime;
80
+ this.scrollDebounceTime = (options === null || options === void 0 ? void 0 : options.scrollDebounceTime) || defaultOptions.scrollDebounceTime;
81
+ this.scrollThrottlingTime = (options === null || options === void 0 ? void 0 : options.scrollThrottlingTime) || defaultOptions.scrollThrottlingTime;
82
+ this.scrollbarHeight = (options === null || options === void 0 ? void 0 : options.scrollbarHeight) || defaultOptions.scrollbarHeight;
83
+ this.scrollbarWidth = (options === null || options === void 0 ? void 0 : options.scrollbarWidth) || defaultOptions.scrollbarWidth;
84
+ this.stripedTable = (options === null || options === void 0 ? void 0 : options.stripedTable) || defaultOptions.stripedTable;
85
+ this.horizontal = false;
86
+ this.resetWrapGroupDimensions();
87
+ }
88
+ get viewPortInfo() {
89
+ const pageInfo = this.previousViewPort || {};
90
+ return {
91
+ startIndex: pageInfo.startIndex || 0,
92
+ endIndex: pageInfo.endIndex || 0,
93
+ scrollStartPosition: pageInfo.scrollStartPosition || 0,
94
+ scrollEndPosition: pageInfo.scrollEndPosition || 0,
95
+ scrollDirection: pageInfo.scrollDirection || 'forward',
96
+ maxScrollPosition: pageInfo.maxScrollPosition || 0,
97
+ startIndexWithBuffer: pageInfo.startIndexWithBuffer || 0,
98
+ endIndexWithBuffer: pageInfo.endIndexWithBuffer || 0,
99
+ };
100
+ }
101
+ get disable() {
102
+ return this._disable;
103
+ }
104
+ set disable(value) {
105
+ if (this._disable === value) {
106
+ return;
107
+ }
108
+ this._disable = value;
109
+ if (this._disable) {
110
+ this.removeScrollEventHandlers();
111
+ }
112
+ else {
113
+ this.addScrollEventHandlers();
114
+ }
115
+ }
116
+ get enableUnequalChildrenSizes() {
117
+ return this._enableUnequalChildrenSizes;
118
+ }
119
+ set enableUnequalChildrenSizes(value) {
120
+ if (this._enableUnequalChildrenSizes === value) {
121
+ return;
122
+ }
123
+ this._enableUnequalChildrenSizes = value;
124
+ this.minMeasuredChildWidth = undefined;
125
+ this.minMeasuredChildHeight = undefined;
126
+ }
127
+ get bufferAmount() {
128
+ if (typeof (this._bufferAmount) === 'number' && this._bufferAmount > 0) {
129
+ return this._bufferAmount;
130
+ }
131
+ else {
132
+ return this.enableUnequalChildrenSizes ? 5 : 0;
133
+ }
134
+ }
135
+ set bufferAmount(value) {
136
+ this._bufferAmount = value;
137
+ }
138
+ get scrollThrottlingTime() {
139
+ return this._scrollThrottlingTime;
140
+ }
141
+ set scrollThrottlingTime(value) {
142
+ this._scrollThrottlingTime = value;
143
+ this.updateOnScrollFunction();
144
+ }
145
+ get scrollDebounceTime() {
146
+ return this._scrollDebounceTime;
147
+ }
148
+ set scrollDebounceTime(value) {
149
+ this._scrollDebounceTime = value;
150
+ this.updateOnScrollFunction();
151
+ }
152
+ updateOnScrollFunction() {
153
+ if (this.scrollDebounceTime) {
154
+ this.onScroll = this.debounce(() => {
155
+ this.refresh_internal(false);
156
+ }, this.scrollDebounceTime);
157
+ }
158
+ else if (this.scrollThrottlingTime) {
159
+ this.onScroll = this.throttleTrailing(() => {
160
+ this.refresh_internal(false);
161
+ }, this.scrollThrottlingTime);
162
+ }
163
+ else {
164
+ this.onScroll = () => {
165
+ this.refresh_internal(false);
166
+ };
167
+ }
168
+ }
169
+ get checkResizeInterval() {
170
+ return this._checkResizeInterval;
171
+ }
172
+ set checkResizeInterval(value) {
173
+ if (this._checkResizeInterval === value) {
174
+ return;
175
+ }
176
+ this._checkResizeInterval = value;
177
+ this.addScrollEventHandlers();
178
+ }
179
+ get items() {
180
+ return this._items;
181
+ }
182
+ set items(value) {
183
+ if (value === this._items) {
184
+ return;
185
+ }
186
+ this._items = value || [];
187
+ this.refresh_internal(true);
188
+ }
189
+ get horizontal() {
190
+ return this._horizontal;
191
+ }
192
+ set horizontal(value) {
193
+ this._horizontal = value;
194
+ this.updateDirection();
195
+ }
196
+ revertParentOverscroll() {
197
+ const scrollElement = this.getScrollElement();
198
+ if (scrollElement && this.oldParentScrollOverflow) {
199
+ scrollElement.style['overflow-y'] = this.oldParentScrollOverflow.y;
200
+ scrollElement.style['overflow-x'] = this.oldParentScrollOverflow.x;
201
+ }
202
+ this.oldParentScrollOverflow = undefined;
203
+ }
204
+ get parentScroll() {
205
+ return this._parentScroll;
206
+ }
207
+ set parentScroll(value) {
208
+ if (this._parentScroll === value) {
209
+ return;
210
+ }
211
+ this.revertParentOverscroll();
212
+ this._parentScroll = value;
213
+ this.addScrollEventHandlers();
214
+ const scrollElement = this.getScrollElement();
215
+ if (this.modifyOverflowStyleOfParentScroll && scrollElement !== this.element.nativeElement) {
216
+ this.oldParentScrollOverflow = { x: scrollElement.style['overflow-x'], y: scrollElement.style['overflow-y'] };
217
+ scrollElement.style['overflow-y'] = this.horizontal ? 'visible' : 'auto';
218
+ scrollElement.style['overflow-x'] = this.horizontal ? 'auto' : 'visible';
219
+ }
220
+ }
221
+ ngOnInit() {
222
+ this.addScrollEventHandlers();
223
+ }
224
+ ngOnDestroy() {
225
+ this.removeScrollEventHandlers();
226
+ this.revertParentOverscroll();
227
+ }
228
+ ngOnChanges(changes) {
229
+ const indexLengthChanged = this.cachedItemsLength !== this.items.length;
230
+ this.cachedItemsLength = this.items.length;
231
+ const firstRun = !changes.items || !changes.items.previousValue || changes.items.previousValue.length === 0;
232
+ this.refresh_internal(indexLengthChanged || firstRun);
233
+ }
234
+ ngDoCheck() {
235
+ if (this.cachedItemsLength !== this.items.length) {
236
+ this.cachedItemsLength = this.items.length;
237
+ this.refresh_internal(true);
238
+ return;
239
+ }
240
+ if (this.previousViewPort && this.viewPortItems && this.viewPortItems.length > 0) {
241
+ let itemsArrayChanged = false;
242
+ for (let i = 0; i < this.viewPortItems.length; ++i) {
243
+ if (!this.compareItems(this.items[this.previousViewPort.startIndexWithBuffer + i], this.viewPortItems[i])) {
244
+ itemsArrayChanged = true;
245
+ break;
246
+ }
247
+ }
248
+ if (itemsArrayChanged) {
249
+ this.refresh_internal(true);
250
+ }
251
+ }
252
+ }
253
+ refresh(refreshCompletedCallback = undefined) {
254
+ this.refresh_internal(true, refreshCompletedCallback);
255
+ }
256
+ invalidateAllCachedMeasurements() {
257
+ this.wrapGroupDimensions = {
258
+ maxChildSizePerWrapGroup: [],
259
+ numberOfKnownWrapGroupChildSizes: 0,
260
+ sumOfKnownWrapGroupChildWidths: 0,
261
+ sumOfKnownWrapGroupChildHeights: 0
262
+ };
263
+ this.minMeasuredChildWidth = undefined;
264
+ this.minMeasuredChildHeight = undefined;
265
+ this.refresh_internal(false);
266
+ }
267
+ invalidateCachedMeasurementForItem(item) {
268
+ if (this.enableUnequalChildrenSizes) {
269
+ const index = this.items && this.items.indexOf(item);
270
+ if (index >= 0) {
271
+ this.invalidateCachedMeasurementAtIndex(index);
272
+ }
273
+ }
274
+ else {
275
+ this.minMeasuredChildWidth = undefined;
276
+ this.minMeasuredChildHeight = undefined;
277
+ }
278
+ this.refresh_internal(false);
279
+ }
280
+ invalidateCachedMeasurementAtIndex(index) {
281
+ if (this.enableUnequalChildrenSizes) {
282
+ const cachedMeasurement = this.wrapGroupDimensions.maxChildSizePerWrapGroup[index];
283
+ if (cachedMeasurement) {
284
+ this.wrapGroupDimensions.maxChildSizePerWrapGroup[index] = undefined;
285
+ --this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;
286
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths -= cachedMeasurement.childWidth || 0;
287
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights -= cachedMeasurement.childHeight || 0;
288
+ }
289
+ }
290
+ else {
291
+ this.minMeasuredChildWidth = undefined;
292
+ this.minMeasuredChildHeight = undefined;
293
+ }
294
+ this.refresh_internal(false);
295
+ }
296
+ scrollInto(item, alignToBeginning = true, additionalOffset = 0, animationMilliseconds = undefined, animationCompletedCallback = undefined) {
297
+ const index = this.items.indexOf(item);
298
+ if (index === -1) {
299
+ return;
300
+ }
301
+ this.scrollToIndex(index, alignToBeginning, additionalOffset, animationMilliseconds, animationCompletedCallback);
302
+ }
303
+ scrollToIndex(index, alignToBeginning = true, additionalOffset = 0, animationMilliseconds = undefined, animationCompletedCallback = undefined) {
304
+ let maxRetries = 5;
305
+ const retryIfNeeded = () => {
306
+ --maxRetries;
307
+ if (maxRetries <= 0) {
308
+ if (animationCompletedCallback) {
309
+ animationCompletedCallback();
310
+ }
311
+ return;
312
+ }
313
+ const dimensions = this.calculateDimensions();
314
+ const desiredStartIndex = Math.min(Math.max(index, 0), dimensions.itemCount - 1);
315
+ if (this.previousViewPort.startIndex === desiredStartIndex) {
316
+ if (animationCompletedCallback) {
317
+ animationCompletedCallback();
318
+ }
319
+ return;
320
+ }
321
+ this.scrollToIndex_internal(index, alignToBeginning, additionalOffset, 0, retryIfNeeded);
322
+ };
323
+ this.scrollToIndex_internal(index, alignToBeginning, additionalOffset, animationMilliseconds, retryIfNeeded);
324
+ }
325
+ scrollToIndex_internal(index, alignToBeginning = true, additionalOffset = 0, animationMilliseconds = undefined, animationCompletedCallback = undefined) {
326
+ animationMilliseconds = animationMilliseconds === undefined ? this.scrollAnimationTime : animationMilliseconds;
327
+ const dimensions = this.calculateDimensions();
328
+ let scroll = this.calculatePadding(index, dimensions) + additionalOffset;
329
+ if (!alignToBeginning) {
330
+ scroll -= dimensions.wrapGroupsPerPage * dimensions[this._childScrollDim];
331
+ }
332
+ this.scrollToPosition(scroll, animationMilliseconds, animationCompletedCallback);
333
+ }
334
+ scrollToPosition(scrollPosition, animationMilliseconds = undefined, animationCompletedCallback = undefined) {
335
+ scrollPosition += this.getElementsOffset();
336
+ animationMilliseconds = animationMilliseconds === undefined ? this.scrollAnimationTime : animationMilliseconds;
337
+ const scrollElement = this.getScrollElement();
338
+ let animationRequest;
339
+ if (this.currentTween) {
340
+ this.currentTween.stop();
341
+ this.currentTween = undefined;
342
+ }
343
+ if (!animationMilliseconds) {
344
+ this.renderer.setProperty(scrollElement, this._scrollType, scrollPosition);
345
+ this.refresh_internal(false, animationCompletedCallback);
346
+ return;
347
+ }
348
+ const tweenConfigObj = { scrollPosition: scrollElement[this._scrollType] };
349
+ const newTween = new tween.Tween(tweenConfigObj)
350
+ .to({ scrollPosition }, animationMilliseconds)
351
+ .easing(tween.Easing.Quadratic.Out)
352
+ .onUpdate((data) => {
353
+ if (isNaN(data.scrollPosition)) {
354
+ return;
355
+ }
356
+ this.renderer.setProperty(scrollElement, this._scrollType, data.scrollPosition);
357
+ this.refresh_internal(false);
358
+ })
359
+ .onStop(() => {
360
+ cancelAnimationFrame(animationRequest);
361
+ })
362
+ .start();
363
+ const animate = (time) => {
364
+ if (!newTween["isPlaying"]()) {
365
+ return;
366
+ }
367
+ newTween.update(time);
368
+ if (tweenConfigObj.scrollPosition === scrollPosition) {
369
+ this.refresh_internal(false, animationCompletedCallback);
370
+ return;
371
+ }
372
+ this.zone.runOutsideAngular(() => {
373
+ animationRequest = requestAnimationFrame(animate);
374
+ });
375
+ };
376
+ animate();
377
+ this.currentTween = newTween;
378
+ }
379
+ getElementSize(element) {
380
+ const result = element.getBoundingClientRect();
381
+ const styles = getComputedStyle(element);
382
+ const marginTop = parseInt(styles['margin-top'], 10) || 0;
383
+ const marginBottom = parseInt(styles['margin-bottom'], 10) || 0;
384
+ const marginLeft = parseInt(styles['margin-left'], 10) || 0;
385
+ const marginRight = parseInt(styles['margin-right'], 10) || 0;
386
+ return {
387
+ top: result.top + marginTop,
388
+ bottom: result.bottom + marginBottom,
389
+ left: result.left + marginLeft,
390
+ right: result.right + marginRight,
391
+ width: parseFloat((result.width + marginLeft + marginRight).toFixed(3)),
392
+ height: parseFloat((result.height + marginTop + marginBottom).toFixed(3))
393
+ };
394
+ }
395
+ getContent() {
396
+ const content = (this.containerElementRef && this.containerElementRef.nativeElement) || this.contentElementRef.nativeElement;
397
+ return content;
398
+ }
399
+ checkScrollElementResized() {
400
+ const boundingRect = this.getElementSize(this.getScrollElement());
401
+ let sizeChanged;
402
+ if (!this.previousScrollBoundingRect) {
403
+ sizeChanged = true;
404
+ }
405
+ else {
406
+ const widthChange = Math.abs(boundingRect.width - this.previousScrollBoundingRect.width);
407
+ const heightChange = Math.abs(boundingRect.height - this.previousScrollBoundingRect.height);
408
+ sizeChanged = widthChange > this.resizeBypassRefreshThreshold || heightChange > this.resizeBypassRefreshThreshold;
409
+ }
410
+ if (sizeChanged) {
411
+ this.previousScrollBoundingRect = boundingRect;
412
+ if (boundingRect.width > 0 && boundingRect.height > 0) {
413
+ this.refresh_internal(false);
414
+ }
415
+ }
416
+ }
417
+ updateDirection() {
418
+ if (this.horizontal) {
419
+ this._childScrollDim = 'childWidth';
420
+ this._invisiblePaddingProperty = 'scaleX';
421
+ this._marginDir = 'margin-left';
422
+ this._offsetType = 'offsetLeft';
423
+ this._pageOffsetType = 'pageXOffset';
424
+ this._scrollType = 'scrollLeft';
425
+ this._translateDir = 'translateX';
426
+ }
427
+ else {
428
+ this._childScrollDim = 'childHeight';
429
+ this._invisiblePaddingProperty = 'scaleY';
430
+ this._marginDir = 'margin-top';
431
+ this._offsetType = 'offsetTop';
432
+ this._pageOffsetType = 'pageYOffset';
433
+ this._scrollType = 'scrollTop';
434
+ this._translateDir = 'translateY';
435
+ }
436
+ }
437
+ debounce(func, wait, ...args) {
438
+ const throttled = this.throttleTrailing(func, wait);
439
+ const result = function () {
440
+ throttled['cancel']();
441
+ throttled.apply(this, args);
442
+ };
443
+ result['cancel'] = function () {
444
+ throttled['cancel']();
445
+ };
446
+ return result;
447
+ }
448
+ throttleTrailing(func, wait, ...args) {
449
+ let timeout = undefined;
450
+ let _arguments = args;
451
+ const result = function () {
452
+ const _this = this;
453
+ _arguments = args;
454
+ if (timeout) {
455
+ return;
456
+ }
457
+ if (wait <= 0) {
458
+ func.apply(_this, _arguments);
459
+ }
460
+ else {
461
+ timeout = setTimeout(function () {
462
+ timeout = undefined;
463
+ func.apply(_this, _arguments);
464
+ }, wait);
465
+ }
466
+ };
467
+ result['cancel'] = function () {
468
+ if (timeout) {
469
+ clearTimeout(timeout);
470
+ timeout = undefined;
471
+ }
472
+ };
473
+ return result;
474
+ }
475
+ refresh_internal(itemsArrayModified, refreshCompletedCallback = undefined, maxRunTimes = 2) {
476
+ //note: maxRunTimes is to force it to keep recalculating if the previous iteration caused a re-render (different sliced items in viewport or scrollPosition changed).
477
+ //The default of 2x max will probably be accurate enough without causing too large a performance bottleneck
478
+ //The code would typically quit out on the 2nd iteration anyways. The main time it'd think more than 2 runs would be necessary would be for vastly different sized child items or if this is the 1st time the items array was initialized.
479
+ //Without maxRunTimes, If the user is actively scrolling this code would become an infinite loop until they stopped scrolling. This would be okay, except each scroll event would start an additional infinte loop. We want to short-circuit it to prevent this.
480
+ if (itemsArrayModified && this.previousViewPort && this.previousViewPort.scrollStartPosition > 0) {
481
+ //if items were prepended, scroll forward to keep same items visible
482
+ const oldViewPort = this.previousViewPort;
483
+ const oldViewPortItems = this.viewPortItems;
484
+ const oldRefreshCompletedCallback = refreshCompletedCallback;
485
+ refreshCompletedCallback = () => {
486
+ const scrollLengthDelta = this.previousViewPort.scrollLength - oldViewPort.scrollLength;
487
+ if (scrollLengthDelta > 0 && this.viewPortItems) {
488
+ const oldStartItem = oldViewPortItems[0];
489
+ const oldStartItemIndex = this.items.findIndex(x => this.compareItems(oldStartItem, x));
490
+ if (oldStartItemIndex > this.previousViewPort.startIndexWithBuffer) {
491
+ let itemOrderChanged = false;
492
+ for (let i = 1; i < this.viewPortItems.length; ++i) {
493
+ if (!this.compareItems(this.items[oldStartItemIndex + i], oldViewPortItems[i])) {
494
+ itemOrderChanged = true;
495
+ break;
496
+ }
497
+ }
498
+ if (!itemOrderChanged) {
499
+ this.scrollToPosition(this.previousViewPort.scrollStartPosition + scrollLengthDelta, 0, oldRefreshCompletedCallback);
500
+ return;
501
+ }
502
+ }
503
+ }
504
+ if (oldRefreshCompletedCallback) {
505
+ oldRefreshCompletedCallback();
506
+ }
507
+ };
508
+ }
509
+ this.zone.runOutsideAngular(() => {
510
+ requestAnimationFrame(() => {
511
+ if (itemsArrayModified) {
512
+ this.resetWrapGroupDimensions();
513
+ }
514
+ const viewport = this.calculateViewport();
515
+ const startChanged = itemsArrayModified || viewport.startIndex !== this.previousViewPort.startIndex;
516
+ const endChanged = itemsArrayModified || viewport.endIndex !== this.previousViewPort.endIndex;
517
+ const scrollLengthChanged = viewport.scrollLength !== this.previousViewPort.scrollLength;
518
+ const paddingChanged = viewport.padding !== this.previousViewPort.padding;
519
+ const scrollPositionChanged = viewport.scrollStartPosition !== this.previousViewPort.scrollStartPosition || viewport.scrollEndPosition !== this.previousViewPort.scrollEndPosition || viewport.maxScrollPosition !== this.previousViewPort.maxScrollPosition;
520
+ const scrollDirection = this.previousViewPort.endIndex <= viewport.endIndex ? 'forward' : 'backward';
521
+ this.previousViewPort = viewport;
522
+ if (scrollLengthChanged) {
523
+ this.renderer.setStyle(this.invisiblePaddingElementRef.nativeElement, 'transform', `${this._invisiblePaddingProperty}(${viewport.scrollLength})`);
524
+ this.renderer.setStyle(this.invisiblePaddingElementRef.nativeElement, 'webkitTransform', `${this._invisiblePaddingProperty}(${viewport.scrollLength})`);
525
+ }
526
+ if (paddingChanged) {
527
+ if (this.useMarginInsteadOfTranslate) {
528
+ this.renderer.setStyle(this.contentElementRef.nativeElement, this._marginDir, `${viewport.padding}px`);
529
+ }
530
+ else {
531
+ this.renderer.setStyle(this.contentElementRef.nativeElement, 'transform', `${this._translateDir}(${viewport.padding}px)`);
532
+ this.renderer.setStyle(this.contentElementRef.nativeElement, 'webkitTransform', `${this._translateDir}(${viewport.padding}px)`);
533
+ }
534
+ }
535
+ if (this.headerElementRef) {
536
+ const scrollPosition = this.getScrollElement()[this._scrollType];
537
+ const containerOffset = this.getElementsOffset();
538
+ const offset = Math.max(scrollPosition - viewport.padding - containerOffset + this.headerElementRef.nativeElement.clientHeight, 0);
539
+ this.renderer.setStyle(this.headerElementRef.nativeElement, 'transform', `${this._translateDir}(${offset}px)`);
540
+ this.renderer.setStyle(this.headerElementRef.nativeElement, 'webkitTransform', `${this._translateDir}(${offset}px)`);
541
+ }
542
+ const changeEventArg = (startChanged || endChanged) ? {
543
+ startIndex: viewport.startIndex,
544
+ endIndex: viewport.endIndex,
545
+ scrollStartPosition: viewport.scrollStartPosition,
546
+ scrollEndPosition: viewport.scrollEndPosition,
547
+ scrollDirection: scrollDirection,
548
+ startIndexWithBuffer: viewport.startIndexWithBuffer,
549
+ endIndexWithBuffer: viewport.endIndexWithBuffer,
550
+ maxScrollPosition: viewport.maxScrollPosition,
551
+ } : undefined;
552
+ if (startChanged || endChanged || scrollPositionChanged) {
553
+ const handleChanged = () => {
554
+ // update the scroll list to trigger re-render of components in viewport
555
+ this.viewPortItems = viewport.startIndexWithBuffer >= 0 && viewport.endIndexWithBuffer >= 0 ? this.items.slice(viewport.startIndexWithBuffer, viewport.endIndexWithBuffer + 1) : [];
556
+ this.vsUpdate.emit(this.viewPortItems);
557
+ if (startChanged) {
558
+ this.vsStart.emit(changeEventArg);
559
+ }
560
+ if (endChanged) {
561
+ this.vsEnd.emit(changeEventArg);
562
+ }
563
+ if (startChanged || endChanged) {
564
+ this.changeDetectorRef.markForCheck();
565
+ this.vsChange.emit(changeEventArg);
566
+ }
567
+ if (maxRunTimes > 0) {
568
+ this.refresh_internal(false, refreshCompletedCallback, maxRunTimes - 1);
569
+ return;
570
+ }
571
+ if (refreshCompletedCallback) {
572
+ refreshCompletedCallback();
573
+ }
574
+ };
575
+ if (this.executeRefreshOutsideAngularZone) {
576
+ handleChanged();
577
+ }
578
+ else {
579
+ this.zone.run(handleChanged);
580
+ }
581
+ }
582
+ else {
583
+ if (maxRunTimes > 0 && (scrollLengthChanged || paddingChanged)) {
584
+ this.refresh_internal(false, refreshCompletedCallback, maxRunTimes - 1);
585
+ return;
586
+ }
587
+ if (refreshCompletedCallback) {
588
+ refreshCompletedCallback();
589
+ }
590
+ }
591
+ });
592
+ });
593
+ }
594
+ getScrollElement() {
595
+ return this.parentScroll instanceof Window ? document.scrollingElement || document.documentElement || document.body : this.parentScroll || this.element.nativeElement;
596
+ }
597
+ addScrollEventHandlers() {
598
+ if (this.isAngularUniversalSSR) {
599
+ return;
600
+ }
601
+ const scrollElement = this.getScrollElement();
602
+ this.removeScrollEventHandlers();
603
+ this.zone.runOutsideAngular(() => {
604
+ if (this.parentScroll instanceof Window) {
605
+ this.disposeScrollHandler = this.renderer.listen('window', 'scroll', this.onScroll);
606
+ this.disposeResizeHandler = this.renderer.listen('window', 'resize', this.onScroll);
607
+ }
608
+ else {
609
+ this.disposeScrollHandler = this.renderer.listen(scrollElement, 'scroll', this.onScroll);
610
+ if (this._checkResizeInterval > 0) {
611
+ this.checkScrollElementResizedTimer = setInterval(() => { this.checkScrollElementResized(); }, this._checkResizeInterval);
612
+ }
613
+ }
614
+ });
615
+ }
616
+ removeScrollEventHandlers() {
617
+ if (this.checkScrollElementResizedTimer) {
618
+ clearInterval(this.checkScrollElementResizedTimer);
619
+ }
620
+ if (this.disposeScrollHandler) {
621
+ this.disposeScrollHandler();
622
+ this.disposeScrollHandler = undefined;
623
+ }
624
+ if (this.disposeResizeHandler) {
625
+ this.disposeResizeHandler();
626
+ this.disposeResizeHandler = undefined;
627
+ }
628
+ }
629
+ getElementsOffset() {
630
+ if (this.isAngularUniversalSSR) {
631
+ return 0;
632
+ }
633
+ let offset = 0;
634
+ if (this.containerElementRef && this.containerElementRef.nativeElement) {
635
+ offset += this.containerElementRef.nativeElement[this._offsetType];
636
+ }
637
+ if (this.parentScroll) {
638
+ const scrollElement = this.getScrollElement();
639
+ const elementClientRect = this.getElementSize(this.element.nativeElement);
640
+ const scrollClientRect = this.getElementSize(scrollElement);
641
+ if (this.horizontal) {
642
+ offset += elementClientRect.left - scrollClientRect.left;
643
+ }
644
+ else {
645
+ offset += elementClientRect.top - scrollClientRect.top;
646
+ }
647
+ if (!(this.parentScroll instanceof Window)) {
648
+ offset += scrollElement[this._scrollType];
649
+ }
650
+ }
651
+ return offset;
652
+ }
653
+ countItemsPerWrapGroup() {
654
+ if (this.isAngularUniversalSSR) {
655
+ return Math.round(this.horizontal ? this.ssrViewportHeight / this.ssrChildHeight : this.ssrViewportWidth / this.ssrChildWidth);
656
+ }
657
+ const propertyName = this.horizontal ? 'offsetLeft' : 'offsetTop';
658
+ const children = this.getContent().children;
659
+ const childrenLength = children ? children.length : 0;
660
+ if (childrenLength === 0) {
661
+ return 1;
662
+ }
663
+ const firstOffset = children[0][propertyName];
664
+ let result = 1;
665
+ while (result < childrenLength && firstOffset === children[result][propertyName]) {
666
+ ++result;
667
+ }
668
+ return result;
669
+ }
670
+ getScrollStartPosition() {
671
+ let windowScrollValue = undefined;
672
+ if (this.parentScroll instanceof Window) {
673
+ windowScrollValue = window[this._pageOffsetType];
674
+ }
675
+ return windowScrollValue || this.getScrollElement()[this._scrollType] || 0;
676
+ }
677
+ resetWrapGroupDimensions() {
678
+ const oldWrapGroupDimensions = this.wrapGroupDimensions;
679
+ this.invalidateAllCachedMeasurements();
680
+ if (!this.enableUnequalChildrenSizes || !oldWrapGroupDimensions || oldWrapGroupDimensions.numberOfKnownWrapGroupChildSizes === 0) {
681
+ return;
682
+ }
683
+ const itemsPerWrapGroup = this.countItemsPerWrapGroup();
684
+ for (let wrapGroupIndex = 0; wrapGroupIndex < oldWrapGroupDimensions.maxChildSizePerWrapGroup.length; ++wrapGroupIndex) {
685
+ const oldWrapGroupDimension = oldWrapGroupDimensions.maxChildSizePerWrapGroup[wrapGroupIndex];
686
+ if (!oldWrapGroupDimension || !oldWrapGroupDimension.items || !oldWrapGroupDimension.items.length) {
687
+ continue;
688
+ }
689
+ if (oldWrapGroupDimension.items.length !== itemsPerWrapGroup) {
690
+ return;
691
+ }
692
+ let itemsChanged = false;
693
+ const arrayStartIndex = itemsPerWrapGroup * wrapGroupIndex;
694
+ for (let i = 0; i < itemsPerWrapGroup; ++i) {
695
+ if (!this.compareItems(oldWrapGroupDimension.items[i], this.items[arrayStartIndex + i])) {
696
+ itemsChanged = true;
697
+ break;
698
+ }
699
+ }
700
+ if (!itemsChanged) {
701
+ ++this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;
702
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths += oldWrapGroupDimension.childWidth || 0;
703
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights += oldWrapGroupDimension.childHeight || 0;
704
+ this.wrapGroupDimensions.maxChildSizePerWrapGroup[wrapGroupIndex] = oldWrapGroupDimension;
705
+ }
706
+ }
707
+ }
708
+ calculateDimensions() {
709
+ const scrollElement = this.getScrollElement();
710
+ const maxCalculatedScrollBarSize = 25; // Note: Formula to auto-calculate doesn't work for ParentScroll, so we default to this if not set by consuming application
711
+ this.calculatedScrollbarHeight = Math.max(Math.min(scrollElement.offsetHeight - scrollElement.clientHeight, maxCalculatedScrollBarSize), this.calculatedScrollbarHeight);
712
+ this.calculatedScrollbarWidth = Math.max(Math.min(scrollElement.offsetWidth - scrollElement.clientWidth, maxCalculatedScrollBarSize), this.calculatedScrollbarWidth);
713
+ let viewportWidth = scrollElement.offsetWidth - (this.scrollbarWidth || this.calculatedScrollbarWidth || (this.horizontal ? 0 : maxCalculatedScrollBarSize));
714
+ let viewportHeight = scrollElement.offsetHeight - (this.scrollbarHeight || this.calculatedScrollbarHeight || (this.horizontal ? maxCalculatedScrollBarSize : 0));
715
+ const content = this.getContent();
716
+ const itemsPerWrapGroup = this.countItemsPerWrapGroup();
717
+ let wrapGroupsPerPage;
718
+ let defaultChildWidth;
719
+ let defaultChildHeight;
720
+ if (this.isAngularUniversalSSR) {
721
+ viewportWidth = this.ssrViewportWidth;
722
+ viewportHeight = this.ssrViewportHeight;
723
+ defaultChildWidth = this.ssrChildWidth;
724
+ defaultChildHeight = this.ssrChildHeight;
725
+ const itemsPerRow = Math.max(Math.ceil(viewportWidth / defaultChildWidth), 1);
726
+ const itemsPerCol = Math.max(Math.ceil(viewportHeight / defaultChildHeight), 1);
727
+ wrapGroupsPerPage = this.horizontal ? itemsPerRow : itemsPerCol;
728
+ }
729
+ else if (!this.enableUnequalChildrenSizes) {
730
+ if (content.children.length > 0) {
731
+ if (!this.childWidth || !this.childHeight) {
732
+ if (!this.minMeasuredChildWidth && viewportWidth > 0) {
733
+ this.minMeasuredChildWidth = viewportWidth;
734
+ }
735
+ if (!this.minMeasuredChildHeight && viewportHeight > 0) {
736
+ this.minMeasuredChildHeight = viewportHeight;
737
+ }
738
+ }
739
+ const child = content.children[0];
740
+ const clientRect = this.getElementSize(child);
741
+ this.minMeasuredChildWidth = Math.min(this.minMeasuredChildWidth, clientRect.width);
742
+ this.minMeasuredChildHeight = Math.min(this.minMeasuredChildHeight, clientRect.height);
743
+ // Added for getting the child height (for card view, return all the clientRect object).
744
+ // if (this._lastChildRect === null ||
745
+ // (clientRect?.height !== 0 && (
746
+ // Math.round(this._lastChildRect?.height) !== Math.round(clientRect?.height) ||
747
+ // Math.round(this._lastChildRect?.width) !== Math.round(clientRect?.width))
748
+ // )) {
749
+ // this._lastChildRect = clientRect;
750
+ // this.vsChildRectChange.emit(clientRect);
751
+ // }
752
+ }
753
+ defaultChildWidth = this.childWidth || this.minMeasuredChildWidth || viewportWidth;
754
+ defaultChildHeight = this.childHeight || this.minMeasuredChildHeight || viewportHeight;
755
+ const itemsPerRow = Math.max(Math.ceil(viewportWidth / defaultChildWidth), 1);
756
+ const itemsPerCol = Math.max(Math.ceil(viewportHeight / defaultChildHeight), 1);
757
+ wrapGroupsPerPage = this.horizontal ? itemsPerRow : itemsPerCol;
758
+ }
759
+ else {
760
+ let scrollOffset = scrollElement[this._scrollType] - (this.previousViewPort ? this.previousViewPort.padding : 0);
761
+ let arrayStartIndex = this.previousViewPort.startIndexWithBuffer || 0;
762
+ let wrapGroupIndex = Math.ceil(arrayStartIndex / itemsPerWrapGroup);
763
+ let maxWidthForWrapGroup = 0;
764
+ let maxHeightForWrapGroup = 0;
765
+ let sumOfVisibleMaxWidths = 0;
766
+ let sumOfVisibleMaxHeights = 0;
767
+ wrapGroupsPerPage = 0;
768
+ for (let i = 0; i < content.children.length; ++i) {
769
+ ++arrayStartIndex;
770
+ const child = content.children[i];
771
+ const clientRect = this.getElementSize(child);
772
+ maxWidthForWrapGroup = Math.max(maxWidthForWrapGroup, clientRect.width);
773
+ maxHeightForWrapGroup = Math.max(maxHeightForWrapGroup, clientRect.height);
774
+ if (arrayStartIndex % itemsPerWrapGroup === 0) {
775
+ const oldValue = this.wrapGroupDimensions.maxChildSizePerWrapGroup[wrapGroupIndex];
776
+ if (oldValue) {
777
+ --this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;
778
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths -= oldValue.childWidth || 0;
779
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights -= oldValue.childHeight || 0;
780
+ }
781
+ ++this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;
782
+ const items = this.items.slice(arrayStartIndex - itemsPerWrapGroup, arrayStartIndex);
783
+ this.wrapGroupDimensions.maxChildSizePerWrapGroup[wrapGroupIndex] = {
784
+ childWidth: maxWidthForWrapGroup,
785
+ childHeight: maxHeightForWrapGroup,
786
+ items: items
787
+ };
788
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths += maxWidthForWrapGroup;
789
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights += maxHeightForWrapGroup;
790
+ if (this.horizontal) {
791
+ let maxVisibleWidthForWrapGroup = Math.min(maxWidthForWrapGroup, Math.max(viewportWidth - sumOfVisibleMaxWidths, 0));
792
+ if (scrollOffset > 0) {
793
+ const scrollOffsetToRemove = Math.min(scrollOffset, maxVisibleWidthForWrapGroup);
794
+ maxVisibleWidthForWrapGroup -= scrollOffsetToRemove;
795
+ scrollOffset -= scrollOffsetToRemove;
796
+ }
797
+ sumOfVisibleMaxWidths += maxVisibleWidthForWrapGroup;
798
+ if (maxVisibleWidthForWrapGroup > 0 && viewportWidth >= sumOfVisibleMaxWidths) {
799
+ ++wrapGroupsPerPage;
800
+ }
801
+ }
802
+ else {
803
+ let maxVisibleHeightForWrapGroup = Math.min(maxHeightForWrapGroup, Math.max(viewportHeight - sumOfVisibleMaxHeights, 0));
804
+ if (scrollOffset > 0) {
805
+ const scrollOffsetToRemove = Math.min(scrollOffset, maxVisibleHeightForWrapGroup);
806
+ maxVisibleHeightForWrapGroup -= scrollOffsetToRemove;
807
+ scrollOffset -= scrollOffsetToRemove;
808
+ }
809
+ sumOfVisibleMaxHeights += maxVisibleHeightForWrapGroup;
810
+ if (maxVisibleHeightForWrapGroup > 0 && viewportHeight >= sumOfVisibleMaxHeights) {
811
+ ++wrapGroupsPerPage;
812
+ }
813
+ }
814
+ ++wrapGroupIndex;
815
+ maxWidthForWrapGroup = 0;
816
+ maxHeightForWrapGroup = 0;
817
+ }
818
+ }
819
+ const averageChildWidth = this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths / this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;
820
+ const averageChildHeight = this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights / this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;
821
+ defaultChildWidth = this.childWidth || averageChildWidth || viewportWidth;
822
+ defaultChildHeight = this.childHeight || averageChildHeight || viewportHeight;
823
+ if (this.horizontal) {
824
+ if (viewportWidth > sumOfVisibleMaxWidths) {
825
+ wrapGroupsPerPage += Math.ceil((viewportWidth - sumOfVisibleMaxWidths) / defaultChildWidth);
826
+ }
827
+ }
828
+ else {
829
+ if (viewportHeight > sumOfVisibleMaxHeights) {
830
+ wrapGroupsPerPage += Math.ceil((viewportHeight - sumOfVisibleMaxHeights) / defaultChildHeight);
831
+ }
832
+ }
833
+ }
834
+ const itemCount = this.items.length;
835
+ const itemsPerPage = itemsPerWrapGroup * wrapGroupsPerPage;
836
+ const pageCount_fractional = itemCount / itemsPerPage;
837
+ const numberOfWrapGroups = Math.ceil(itemCount / itemsPerWrapGroup);
838
+ let scrollLength = 0;
839
+ const defaultScrollLengthPerWrapGroup = this.horizontal ? defaultChildWidth : defaultChildHeight;
840
+ if (this.enableUnequalChildrenSizes) {
841
+ let numUnknownChildSizes = 0;
842
+ for (let i = 0; i < numberOfWrapGroups; ++i) {
843
+ const childSize = this.wrapGroupDimensions.maxChildSizePerWrapGroup[i] && this.wrapGroupDimensions.maxChildSizePerWrapGroup[i][this._childScrollDim];
844
+ if (childSize) {
845
+ scrollLength += childSize;
846
+ }
847
+ else {
848
+ ++numUnknownChildSizes;
849
+ }
850
+ }
851
+ scrollLength += Math.round(numUnknownChildSizes * defaultScrollLengthPerWrapGroup);
852
+ }
853
+ else {
854
+ scrollLength = numberOfWrapGroups * defaultScrollLengthPerWrapGroup;
855
+ }
856
+ if (this.headerElementRef) {
857
+ scrollLength += this.headerElementRef.nativeElement.clientHeight;
858
+ }
859
+ const viewportLength = this.horizontal ? viewportWidth : viewportHeight;
860
+ const maxScrollPosition = Math.max(scrollLength - viewportLength, 0);
861
+ return {
862
+ childHeight: defaultChildHeight,
863
+ childWidth: defaultChildWidth,
864
+ itemCount: itemCount,
865
+ itemsPerPage: itemsPerPage,
866
+ itemsPerWrapGroup: itemsPerWrapGroup,
867
+ maxScrollPosition: maxScrollPosition,
868
+ pageCount_fractional: pageCount_fractional,
869
+ scrollLength: scrollLength,
870
+ viewportLength: viewportLength,
871
+ wrapGroupsPerPage: wrapGroupsPerPage,
872
+ };
873
+ }
874
+ calculatePadding(arrayStartIndexWithBuffer, dimensions) {
875
+ if (dimensions.itemCount === 0) {
876
+ return 0;
877
+ }
878
+ const defaultScrollLengthPerWrapGroup = dimensions[this._childScrollDim];
879
+ const startingWrapGroupIndex = Math.floor(arrayStartIndexWithBuffer / dimensions.itemsPerWrapGroup) || 0;
880
+ if (!this.enableUnequalChildrenSizes) {
881
+ return defaultScrollLengthPerWrapGroup * startingWrapGroupIndex;
882
+ }
883
+ let numUnknownChildSizes = 0;
884
+ let result = 0;
885
+ for (let i = 0; i < startingWrapGroupIndex; ++i) {
886
+ const childSize = this.wrapGroupDimensions.maxChildSizePerWrapGroup[i] && this.wrapGroupDimensions.maxChildSizePerWrapGroup[i][this._childScrollDim];
887
+ if (childSize) {
888
+ result += childSize;
889
+ }
890
+ else {
891
+ ++numUnknownChildSizes;
892
+ }
893
+ }
894
+ result += Math.round(numUnknownChildSizes * defaultScrollLengthPerWrapGroup);
895
+ return result;
896
+ }
897
+ calculatePageInfo(scrollPosition, dimensions) {
898
+ let scrollPercentage = 0;
899
+ if (this.enableUnequalChildrenSizes) {
900
+ const numberOfWrapGroups = Math.ceil(dimensions.itemCount / dimensions.itemsPerWrapGroup);
901
+ let totalScrolledLength = 0;
902
+ const defaultScrollLengthPerWrapGroup = dimensions[this._childScrollDim];
903
+ for (let i = 0; i < numberOfWrapGroups; ++i) {
904
+ const childSize = this.wrapGroupDimensions.maxChildSizePerWrapGroup[i] && this.wrapGroupDimensions.maxChildSizePerWrapGroup[i][this._childScrollDim];
905
+ if (childSize) {
906
+ totalScrolledLength += childSize;
907
+ }
908
+ else {
909
+ totalScrolledLength += defaultScrollLengthPerWrapGroup;
910
+ }
911
+ if (scrollPosition < totalScrolledLength) {
912
+ scrollPercentage = i / numberOfWrapGroups;
913
+ break;
914
+ }
915
+ }
916
+ }
917
+ else {
918
+ scrollPercentage = scrollPosition / dimensions.scrollLength;
919
+ }
920
+ const startingArrayIndex_fractional = Math.min(Math.max(scrollPercentage * dimensions.pageCount_fractional, 0), dimensions.pageCount_fractional) * dimensions.itemsPerPage;
921
+ const maxStart = dimensions.itemCount - dimensions.itemsPerPage - 1;
922
+ let arrayStartIndex = Math.min(Math.floor(startingArrayIndex_fractional), maxStart);
923
+ arrayStartIndex -= arrayStartIndex % dimensions.itemsPerWrapGroup; // round down to start of wrapGroup
924
+ if (this.stripedTable) {
925
+ const bufferBoundary = 2 * dimensions.itemsPerWrapGroup;
926
+ if (arrayStartIndex % bufferBoundary !== 0) {
927
+ arrayStartIndex = Math.max(arrayStartIndex - arrayStartIndex % bufferBoundary, 0);
928
+ }
929
+ }
930
+ let arrayEndIndex = Math.ceil(startingArrayIndex_fractional) + dimensions.itemsPerPage - 1;
931
+ const endIndexWithinWrapGroup = (arrayEndIndex + 1) % dimensions.itemsPerWrapGroup;
932
+ if (endIndexWithinWrapGroup > 0) {
933
+ arrayEndIndex += dimensions.itemsPerWrapGroup - endIndexWithinWrapGroup; // round up to end of wrapGroup
934
+ }
935
+ if (isNaN(arrayStartIndex)) {
936
+ arrayStartIndex = 0;
937
+ }
938
+ if (isNaN(arrayEndIndex)) {
939
+ arrayEndIndex = 0;
940
+ }
941
+ arrayStartIndex = Math.min(Math.max(arrayStartIndex, 0), dimensions.itemCount - 1);
942
+ arrayEndIndex = Math.min(Math.max(arrayEndIndex, 0), dimensions.itemCount - 1);
943
+ const bufferSize = this.bufferAmount * dimensions.itemsPerWrapGroup;
944
+ const startIndexWithBuffer = Math.min(Math.max(arrayStartIndex - bufferSize, 0), dimensions.itemCount - 1);
945
+ const endIndexWithBuffer = Math.min(Math.max(arrayEndIndex + bufferSize, 0), dimensions.itemCount - 1);
946
+ return {
947
+ startIndex: arrayStartIndex,
948
+ endIndex: arrayEndIndex,
949
+ startIndexWithBuffer: startIndexWithBuffer,
950
+ endIndexWithBuffer: endIndexWithBuffer,
951
+ scrollStartPosition: scrollPosition,
952
+ scrollEndPosition: scrollPosition + dimensions.viewportLength,
953
+ maxScrollPosition: dimensions.maxScrollPosition
954
+ };
955
+ }
956
+ calculateViewport() {
957
+ const dimensions = this.calculateDimensions();
958
+ const offset = this.getElementsOffset();
959
+ let scrollStartPosition = this.getScrollStartPosition();
960
+ if (scrollStartPosition > (dimensions.scrollLength + offset) && !(this.parentScroll instanceof Window)) {
961
+ scrollStartPosition = dimensions.scrollLength;
962
+ }
963
+ else {
964
+ scrollStartPosition -= offset;
965
+ }
966
+ scrollStartPosition = Math.max(0, scrollStartPosition);
967
+ const pageInfo = this.calculatePageInfo(scrollStartPosition, dimensions);
968
+ const newPadding = this.calculatePadding(pageInfo.startIndexWithBuffer, dimensions);
969
+ const newScrollLength = dimensions.scrollLength;
970
+ return {
971
+ startIndex: pageInfo.startIndex,
972
+ endIndex: pageInfo.endIndex,
973
+ startIndexWithBuffer: pageInfo.startIndexWithBuffer,
974
+ endIndexWithBuffer: pageInfo.endIndexWithBuffer,
975
+ padding: Math.round(newPadding),
976
+ scrollLength: Math.round(newScrollLength),
977
+ scrollStartPosition: pageInfo.scrollStartPosition,
978
+ scrollEndPosition: pageInfo.scrollEndPosition,
979
+ maxScrollPosition: pageInfo.maxScrollPosition
980
+ };
981
+ }
982
+ }
983
+ VirtualScrollerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: VirtualScrollerComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: PLATFORM_ID }, { token: 'virtual-scroller-default-options', optional: true }], target: i0.ɵɵFactoryTarget.Component });
984
+ VirtualScrollerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: VirtualScrollerComponent, selector: "virtual-scroller,[virtualScroller]", inputs: { disable: "disable", executeRefreshOutsideAngularZone: "executeRefreshOutsideAngularZone", enableUnequalChildrenSizes: "enableUnequalChildrenSizes", RTL: "RTL", useMarginInsteadOfTranslate: "useMarginInsteadOfTranslate", modifyOverflowStyleOfParentScroll: "modifyOverflowStyleOfParentScroll", stripedTable: "stripedTable", scrollbarWidth: "scrollbarWidth", scrollbarHeight: "scrollbarHeight", childWidth: "childWidth", childHeight: "childHeight", ssrChildWidth: "ssrChildWidth", ssrChildHeight: "ssrChildHeight", ssrViewportWidth: "ssrViewportWidth", ssrViewportHeight: "ssrViewportHeight", bufferAmount: "bufferAmount", scrollAnimationTime: "scrollAnimationTime", resizeBypassRefreshThreshold: "resizeBypassRefreshThreshold", scrollThrottlingTime: "scrollThrottlingTime", scrollDebounceTime: "scrollDebounceTime", checkResizeInterval: "checkResizeInterval", items: "items", compareItems: "compareItems", horizontal: "horizontal", parentScroll: "parentScroll" }, outputs: { vsChildRectChange: "vsChildRectChange", vsUpdate: "vsUpdate", vsChange: "vsChange", vsStart: "vsStart", vsEnd: "vsEnd" }, host: { properties: { "class.horizontal": "horizontal", "class.vertical": "!horizontal", "class.selfScroll": "!parentScroll", "class.rtl": "RTL" } }, queries: [{ propertyName: "headerElementRef", first: true, predicate: ["header"], descendants: true, read: ElementRef }, { propertyName: "containerElementRef", first: true, predicate: ["container"], descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "contentElementRef", first: true, predicate: ["content"], descendants: true, read: ElementRef, static: true }, { propertyName: "invisiblePaddingElementRef", first: true, predicate: ["invisiblePadding"], descendants: true, read: ElementRef, static: true }], exportAs: ["virtualScroller"], usesOnChanges: true, ngImport: i0, template: `
985
+ <div class="total-padding" #invisiblePadding></div>
986
+ <div class="scrollable-content" #content>
987
+ <ng-content></ng-content>
988
+ </div>
989
+ `, isInline: true, styles: [":host{position:relative;display:block;-webkit-overflow-scrolling:touch}:host.horizontal.selfScroll{overflow-y:visible;overflow-x:auto}:host.horizontal.selfScroll.rtl{transform:scaleX(-1)}:host.vertical.selfScroll{overflow-y:auto;overflow-x:visible}.scrollable-content{top:0;left:0;width:100%;height:100%;max-width:100vw;max-height:100vh;position:absolute}.scrollable-content ::ng-deep>*{box-sizing:border-box}:host.horizontal{white-space:nowrap}:host.horizontal .scrollable-content{display:flex}:host.horizontal .scrollable-content ::ng-deep>*{flex-shrink:0;flex-grow:0;white-space:initial}:host.horizontal.rtl .scrollable-content ::ng-deep>*{transform:scaleX(-1)}.total-padding{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0;opacity:0}:host.horizontal .total-padding{height:100%}\n"] });
990
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: VirtualScrollerComponent, decorators: [{
991
+ type: Component,
992
+ args: [{ selector: 'virtual-scroller,[virtualScroller]', exportAs: 'virtualScroller', template: `
993
+ <div class="total-padding" #invisiblePadding></div>
994
+ <div class="scrollable-content" #content>
995
+ <ng-content></ng-content>
996
+ </div>
997
+ `, host: {
998
+ '[class.horizontal]': "horizontal",
999
+ '[class.vertical]': "!horizontal",
1000
+ '[class.selfScroll]': "!parentScroll",
1001
+ '[class.rtl]': "RTL"
1002
+ }, styles: [":host{position:relative;display:block;-webkit-overflow-scrolling:touch}:host.horizontal.selfScroll{overflow-y:visible;overflow-x:auto}:host.horizontal.selfScroll.rtl{transform:scaleX(-1)}:host.vertical.selfScroll{overflow-y:auto;overflow-x:visible}.scrollable-content{top:0;left:0;width:100%;height:100%;max-width:100vw;max-height:100vh;position:absolute}.scrollable-content ::ng-deep>*{box-sizing:border-box}:host.horizontal{white-space:nowrap}:host.horizontal .scrollable-content{display:flex}:host.horizontal .scrollable-content ::ng-deep>*{flex-shrink:0;flex-grow:0;white-space:initial}:host.horizontal.rtl .scrollable-content ::ng-deep>*{transform:scaleX(-1)}.total-padding{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0;opacity:0}:host.horizontal .total-padding{height:100%}\n"] }]
1003
+ }], ctorParameters: function () {
1004
+ return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
1005
+ type: Inject,
1006
+ args: [PLATFORM_ID]
1007
+ }] }, { type: undefined, decorators: [{
1008
+ type: Optional
1009
+ }, {
1010
+ type: Inject,
1011
+ args: ['virtual-scroller-default-options']
1012
+ }] }];
1013
+ }, propDecorators: { disable: [{
1014
+ type: Input
1015
+ }], executeRefreshOutsideAngularZone: [{
1016
+ type: Input
1017
+ }], enableUnequalChildrenSizes: [{
1018
+ type: Input
1019
+ }], RTL: [{
1020
+ type: Input
1021
+ }], useMarginInsteadOfTranslate: [{
1022
+ type: Input
1023
+ }], modifyOverflowStyleOfParentScroll: [{
1024
+ type: Input
1025
+ }], stripedTable: [{
1026
+ type: Input
1027
+ }], scrollbarWidth: [{
1028
+ type: Input
1029
+ }], scrollbarHeight: [{
1030
+ type: Input
1031
+ }], childWidth: [{
1032
+ type: Input
1033
+ }], childHeight: [{
1034
+ type: Input
1035
+ }], ssrChildWidth: [{
1036
+ type: Input
1037
+ }], ssrChildHeight: [{
1038
+ type: Input
1039
+ }], ssrViewportWidth: [{
1040
+ type: Input
1041
+ }], ssrViewportHeight: [{
1042
+ type: Input
1043
+ }], bufferAmount: [{
1044
+ type: Input
1045
+ }], scrollAnimationTime: [{
1046
+ type: Input
1047
+ }], resizeBypassRefreshThreshold: [{
1048
+ type: Input
1049
+ }], scrollThrottlingTime: [{
1050
+ type: Input
1051
+ }], scrollDebounceTime: [{
1052
+ type: Input
1053
+ }], checkResizeInterval: [{
1054
+ type: Input
1055
+ }], items: [{
1056
+ type: Input
1057
+ }], compareItems: [{
1058
+ type: Input
1059
+ }], horizontal: [{
1060
+ type: Input
1061
+ }], parentScroll: [{
1062
+ type: Input
1063
+ }], vsChildRectChange: [{
1064
+ type: Output
1065
+ }], vsUpdate: [{
1066
+ type: Output
1067
+ }], vsChange: [{
1068
+ type: Output
1069
+ }], vsStart: [{
1070
+ type: Output
1071
+ }], vsEnd: [{
1072
+ type: Output
1073
+ }], contentElementRef: [{
1074
+ type: ViewChild,
1075
+ args: ['content', { read: ElementRef, static: true }]
1076
+ }], invisiblePaddingElementRef: [{
1077
+ type: ViewChild,
1078
+ args: ['invisiblePadding', { read: ElementRef, static: true }]
1079
+ }], headerElementRef: [{
1080
+ type: ContentChild,
1081
+ args: ['header', { read: ElementRef, static: false }]
1082
+ }], containerElementRef: [{
1083
+ type: ContentChild,
1084
+ args: ['container', { read: ElementRef, static: false }]
1085
+ }] } });
1086
+ class VirtualScrollerModule {
1087
+ }
1088
+ VirtualScrollerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: VirtualScrollerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1089
+ VirtualScrollerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: VirtualScrollerModule, declarations: [VirtualScrollerComponent], imports: [CommonModule], exports: [VirtualScrollerComponent] });
1090
+ VirtualScrollerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: VirtualScrollerModule, providers: [
1091
+ {
1092
+ provide: 'virtual-scroller-default-options',
1093
+ useFactory: VIRTUAL_SCROLLER_DEFAULT_OPTIONS_FACTORY
1094
+ }
1095
+ ], imports: [CommonModule] });
1096
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: VirtualScrollerModule, decorators: [{
1097
+ type: NgModule,
1098
+ args: [{
1099
+ exports: [VirtualScrollerComponent],
1100
+ declarations: [VirtualScrollerComponent],
1101
+ imports: [CommonModule],
1102
+ providers: [
1103
+ {
1104
+ provide: 'virtual-scroller-default-options',
1105
+ useFactory: VIRTUAL_SCROLLER_DEFAULT_OPTIONS_FACTORY
1106
+ }
1107
+ ]
1108
+ }]
1109
+ }] });
1110
+
1111
+ class PepSelectionData {
1112
+ }
1113
+ const DEFAULT_PAGE_SIZE = 50;
1114
+
1115
+ class IPepListPagerChangeEvent {
1116
+ }
1117
+ class PepListPagerComponent {
1118
+ constructor(_changeDetectorRef, layoutService) {
1119
+ this._changeDetectorRef = _changeDetectorRef;
1120
+ this.layoutService = layoutService;
1121
+ this.disabled = false;
1122
+ this._pageIndex = 0;
1123
+ this.length = 0;
1124
+ this.pageSize = DEFAULT_PAGE_SIZE;
1125
+ this.pagerChange = new EventEmitter();
1126
+ }
1127
+ set pageIndex(value) {
1128
+ this.setPageIndex(value);
1129
+ }
1130
+ get pageIndex() {
1131
+ return this._pageIndex;
1132
+ }
1133
+ nextPage() {
1134
+ if (!this.hasNextPage()) {
1135
+ return;
1136
+ }
1137
+ this.setPageIndex(this.pageIndex + 1);
1138
+ }
1139
+ previousPage() {
1140
+ if (!this.hasPreviousPage()) {
1141
+ return;
1142
+ }
1143
+ this.setPageIndex(this.pageIndex - 1);
1144
+ }
1145
+ firstPage() {
1146
+ if (!this.hasPreviousPage()) {
1147
+ return;
1148
+ }
1149
+ this.setPageIndex(0);
1150
+ }
1151
+ lastPage() {
1152
+ if (!this.hasNextPage()) {
1153
+ return;
1154
+ }
1155
+ this.setPageIndex(this.getNumberOfPages() - 1);
1156
+ }
1157
+ hasPreviousPage() {
1158
+ return this.pageIndex >= 1 && this.pageSize != 0;
1159
+ }
1160
+ hasNextPage() {
1161
+ const maxPageIndex = this.getNumberOfPages() - 1;
1162
+ return this.pageIndex < maxPageIndex && this.pageSize != 0;
1163
+ }
1164
+ getNumberOfPages() {
1165
+ if (!this.pageSize) {
1166
+ return 0;
1167
+ }
1168
+ return Math.ceil(this.length / this.pageSize);
1169
+ }
1170
+ /** Checks whether the buttons for going forwards should be disabled. */
1171
+ _nextButtonsDisabled() {
1172
+ return this.disabled || !this.hasNextPage();
1173
+ }
1174
+ /** Checks whether the buttons for going backwards should be disabled. */
1175
+ _previousButtonsDisabled() {
1176
+ return this.disabled || !this.hasPreviousPage();
1177
+ }
1178
+ onValueChange(value) {
1179
+ const pageNumber = coerceNumberProperty(value);
1180
+ this.setPageIndex(pageNumber - 1); // - 1 to convert number into index.
1181
+ }
1182
+ setPageIndex(newIndex) {
1183
+ const previousPageIndex = this.pageIndex;
1184
+ if (newIndex >= 0 && newIndex < this.getNumberOfPages()) {
1185
+ this._pageIndex = newIndex;
1186
+ }
1187
+ else {
1188
+ this._pageIndex = 0;
1189
+ }
1190
+ if (this.pageIndex !== previousPageIndex) {
1191
+ this._emitChangeEvent(previousPageIndex);
1192
+ }
1193
+ }
1194
+ /** Emits an event notifying that a change of the paginator's properties has been triggered. */
1195
+ _emitChangeEvent(previousPageIndex) {
1196
+ this.pagerChange.emit({
1197
+ previousPageIndex,
1198
+ pageIndex: this.pageIndex,
1199
+ pageSize: this.pageSize,
1200
+ length: this.length,
1201
+ });
1202
+ }
1203
+ }
1204
+ PepListPagerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListPagerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.PepLayoutService }], target: i0.ɵɵFactoryTarget.Component });
1205
+ PepListPagerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepListPagerComponent, selector: "pep-list-pager", inputs: { disabled: "disabled", pageIndex: "pageIndex", length: "length", pageSize: "pageSize" }, outputs: { pagerChange: "pagerChange" }, ngImport: i0, template: "<div class=\"pager-container body-sm\">\n <span class=\"pep-spacing-element\">{{ 'LIST.PAGER_PAGE' | translate }}</span>\n <pep-textbox pepAutoWidth class=\"page-index pep-spacing-element\" [key]=\"'pageIndex'\" [type]=\"'int'\"\n [disabled]=\"disabled\" [xAlignment]=\"'center'\" [renderTitle]=\"false\" [renderError]=\"false\" [renderSymbol]=\"false\"\n [value]=\"pageIndex + 1\" [minValue]=\"1\" [maxValue]=\"this.getNumberOfPages()\"\n [maxFieldCharacters]=\"6\" [mandatory]=\"true\" (valueChange)=\"onValueChange($event)\">\n </pep-textbox>\n <span class=\"pep-spacing-element\">{{ 'LIST.PAGER_OUT_OF' | translate }}</span>\n <span class=\"pep-spacing-element\">{{ getNumberOfPages() }}</span>\n <button mat-button [disabled]=\"disabled || _previousButtonsDisabled()\"\n [ngClass]=\"{ disabled: disabled || _previousButtonsDisabled() }\"\n class=\"pep-button icon-button pep-spacing-element sm weak\" pepRtlDirection pepMenuBlur (click)=\"previousPage()\"\n [title]=\"('LIST.PAGER_PREVIOUS' | translate)\">\n <mat-icon>\n <pep-icon [name]=\"layoutService.isRtl() ? 'arrow_right' : 'arrow_left'\"></pep-icon>\n </mat-icon>\n </button>\n <button mat-button [disabled]=\"disabled || _nextButtonsDisabled()\"\n [ngClass]=\"{ disabled: disabled || _nextButtonsDisabled() }\"\n class=\"pep-button icon-button pep-spacing-element sm weak\" pepRtlDirection pepMenuBlur (click)=\"nextPage()\"\n [title]=\"('LIST.PAGER_NEXT' | translate)\">\n <mat-icon>\n <pep-icon [name]=\"layoutService.isRtl() ? 'arrow_left' : 'arrow_right'\"></pep-icon>\n </mat-icon>\n </button>\n</div>", styles: [".pager-container{display:flex;justify-content:center;align-items:center;height:calc(2rem + calc(var(--pep-spacing-sm, .5rem) * 2));padding:var(--pep-spacing-sm, .5rem)}.pager-container .page-index{min-height:unset;margin-bottom:0}.pager-container .page-index ::ng-deep .mat-form-field-flex{padding:0 .5rem;min-height:2rem}.pager-container .page-index ::ng-deep .mat-form-field-flex .mat-input-element{min-width:1.25rem}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1.PepInputAutoWidthDirective, selector: "[pepAutoWidth]", inputs: ["includePadding"] }, { kind: "directive", type: i1.PepMenuBlurDirective, selector: "[pepMenuBlur]" }, { kind: "directive", type: i1.PepRtlDirectionDirective, selector: "[pepRtlDirection]" }, { kind: "component", type: i5.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i6.PepTextboxComponent, selector: "pep-textbox", inputs: ["key", "value", "minFractionDigits", "maxFractionDigits", "accessory", "label", "placeholder", "type", "mandatory", "disabled", "readonly", "maxFieldCharacters", "hint", "textColor", "xAlignment", "rowSpan", "minValue", "maxValue", "visible", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType", "parentFieldKey", "regex", "regexError", "isInFocus"], outputs: ["valueChange", "keyup"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
1206
+ PepListPagerComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListPagerComponent });
1207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListPagerComponent, decorators: [{
1208
+ type: Component,
1209
+ args: [{ selector: 'pep-list-pager', template: "<div class=\"pager-container body-sm\">\n <span class=\"pep-spacing-element\">{{ 'LIST.PAGER_PAGE' | translate }}</span>\n <pep-textbox pepAutoWidth class=\"page-index pep-spacing-element\" [key]=\"'pageIndex'\" [type]=\"'int'\"\n [disabled]=\"disabled\" [xAlignment]=\"'center'\" [renderTitle]=\"false\" [renderError]=\"false\" [renderSymbol]=\"false\"\n [value]=\"pageIndex + 1\" [minValue]=\"1\" [maxValue]=\"this.getNumberOfPages()\"\n [maxFieldCharacters]=\"6\" [mandatory]=\"true\" (valueChange)=\"onValueChange($event)\">\n </pep-textbox>\n <span class=\"pep-spacing-element\">{{ 'LIST.PAGER_OUT_OF' | translate }}</span>\n <span class=\"pep-spacing-element\">{{ getNumberOfPages() }}</span>\n <button mat-button [disabled]=\"disabled || _previousButtonsDisabled()\"\n [ngClass]=\"{ disabled: disabled || _previousButtonsDisabled() }\"\n class=\"pep-button icon-button pep-spacing-element sm weak\" pepRtlDirection pepMenuBlur (click)=\"previousPage()\"\n [title]=\"('LIST.PAGER_PREVIOUS' | translate)\">\n <mat-icon>\n <pep-icon [name]=\"layoutService.isRtl() ? 'arrow_right' : 'arrow_left'\"></pep-icon>\n </mat-icon>\n </button>\n <button mat-button [disabled]=\"disabled || _nextButtonsDisabled()\"\n [ngClass]=\"{ disabled: disabled || _nextButtonsDisabled() }\"\n class=\"pep-button icon-button pep-spacing-element sm weak\" pepRtlDirection pepMenuBlur (click)=\"nextPage()\"\n [title]=\"('LIST.PAGER_NEXT' | translate)\">\n <mat-icon>\n <pep-icon [name]=\"layoutService.isRtl() ? 'arrow_left' : 'arrow_right'\"></pep-icon>\n </mat-icon>\n </button>\n</div>", styles: [".pager-container{display:flex;justify-content:center;align-items:center;height:calc(2rem + calc(var(--pep-spacing-sm, .5rem) * 2));padding:var(--pep-spacing-sm, .5rem)}.pager-container .page-index{min-height:unset;margin-bottom:0}.pager-container .page-index ::ng-deep .mat-form-field-flex{padding:0 .5rem;min-height:2rem}.pager-container .page-index ::ng-deep .mat-form-field-flex .mat-input-element{min-width:1.25rem}\n"] }]
1210
+ }, {
1211
+ type: Injectable
1212
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.PepLayoutService }]; }, propDecorators: { disabled: [{
1213
+ type: Input
1214
+ }], pageIndex: [{
1215
+ type: Input
1216
+ }], length: [{
1217
+ type: Input
1218
+ }], pageSize: [{
1219
+ type: Input
1220
+ }], pagerChange: [{
1221
+ type: Output
1222
+ }] } });
1223
+
1224
+ class PepListComponent {
1225
+ constructor(hostElement, layoutService, sessionService, cd, renderer, zone) {
1226
+ this.hostElement = hostElement;
1227
+ this.layoutService = layoutService;
1228
+ this.sessionService = sessionService;
1229
+ this.cd = cd;
1230
+ this.renderer = renderer;
1231
+ this.zone = zone;
1232
+ this.cacheSize = -1;
1233
+ this.noDataFoundMsg = null;
1234
+ this.selectionTypeForActions = 'multi';
1235
+ this.showCardSelection = false;
1236
+ this.hideAllSelectionInMulti = false;
1237
+ this.cardSize = 'md';
1238
+ this.tableViewType = 'regular';
1239
+ this._viewType = '';
1240
+ this.firstFieldAsLink = false;
1241
+ this.supportSorting = true;
1242
+ this.supportResizing = true;
1243
+ this._parentScroll = null;
1244
+ this.disabled = false;
1245
+ this._lockEvents = false;
1246
+ this.lockItemInnerEvents = false;
1247
+ this.printMode = false;
1248
+ this.isReport = false;
1249
+ this.zebraStripes = false;
1250
+ this.totalsRow = [];
1251
+ this.pagerType = 'scroll';
1252
+ this.pageSize = DEFAULT_PAGE_SIZE;
1253
+ this.pageIndex = 0;
1254
+ // @Input() startIndex = 0;
1255
+ this.bufferAmount = 0;
1256
+ this.scrollAnimationTime = 500;
1257
+ this.scrollDebounceTime = 0;
1258
+ this.scrollThrottlingTime = 0;
1259
+ this._useAsWebComponent = false;
1260
+ this.itemClick = new EventEmitter();
1261
+ this.fieldClick = new EventEmitter();
1262
+ this.valueChange = new EventEmitter();
1263
+ this.sortingChange = new EventEmitter();
1264
+ this.selectedItemsChange = new EventEmitter();
1265
+ this.selectedItemChange = new EventEmitter();
1266
+ this.selectAllClick = new EventEmitter();
1267
+ // @Output()
1268
+ // singleActionClick: EventEmitter<any> = new EventEmitter<any>();
1269
+ this.listLoad = new EventEmitter();
1270
+ this.loadItems = new EventEmitter();
1271
+ this.loadPage = new EventEmitter();
1272
+ this.startIndexChange = new EventEmitter();
1273
+ this._layout = null;
1274
+ this.totalRows = -1;
1275
+ this.isTable = false;
1276
+ this.hasColumnWidthOfTypePercentage = true;
1277
+ this._items = null;
1278
+ this.itemsCounter = 0;
1279
+ this.SEPARATOR = ',';
1280
+ this.isAllSelected = false;
1281
+ this.selectedItems = new Map();
1282
+ this.unSelectedItems = new Map();
1283
+ this.selectedItemId = '';
1284
+ this.hoveredItemId = '';
1285
+ this.containerWidth = 0;
1286
+ this.tableScrollWidth = 0;
1287
+ this._loadingItemsFromApi = false;
1288
+ this.deviceHasMouse = false;
1289
+ // For resize
1290
+ this.pressedColumn = '';
1291
+ this.pressedColumnIndex = -1;
1292
+ this.startX = 0;
1293
+ this.startWidth = 0;
1294
+ this.tableStartWidth = 0;
1295
+ this.lastColumnsWidth = [];
1296
+ // For sorting
1297
+ this.isAsc = true;
1298
+ this.sortBy = '';
1299
+ this.isUserSelected = false;
1300
+ this.checkForChanges = null;
1301
+ this.calculatedObjectHeight = 'auto';
1302
+ // this.nativeWindow = window;
1303
+ this.layoutService.onResize$.subscribe((size) => {
1304
+ this.screenSize = size;
1305
+ });
1306
+ this.layoutService.onMouseOver$.subscribe((deviceHasMouse) => {
1307
+ this.deviceHasMouse = deviceHasMouse;
1308
+ });
1309
+ }
1310
+ set sorting(value) {
1311
+ this.sortBy = (value === null || value === void 0 ? void 0 : value.sortBy) || '';
1312
+ this.isAsc = (value === null || value === void 0 ? void 0 : value.sortBy.length) > 0 ? value.isAsc : true;
1313
+ }
1314
+ get sorting() {
1315
+ return {
1316
+ sortBy: this.sortBy,
1317
+ isAsc: this.isAsc
1318
+ };
1319
+ }
1320
+ set viewType(value) {
1321
+ this._viewType = value;
1322
+ this.isTable = value === 'table';
1323
+ }
1324
+ get viewType() {
1325
+ return this._viewType;
1326
+ }
1327
+ set parentScroll(value) {
1328
+ this._parentScroll = value;
1329
+ }
1330
+ get parentScroll() {
1331
+ return this._parentScroll;
1332
+ }
1333
+ set lockEvents(value) {
1334
+ this._lockEvents = value;
1335
+ if (this._lockEvents) {
1336
+ this.renderer.addClass(this.hostElement.nativeElement, 'lock-events');
1337
+ }
1338
+ else {
1339
+ this.renderer.removeClass(this.hostElement.nativeElement, 'lock-events');
1340
+ }
1341
+ }
1342
+ get lockEvents() {
1343
+ return this._lockEvents;
1344
+ }
1345
+ set useAsWebComponent(value) {
1346
+ this._useAsWebComponent = value;
1347
+ if (value) {
1348
+ this.exportFunctionsOnHostElement();
1349
+ }
1350
+ }
1351
+ get useAsWebComponent() {
1352
+ return this._useAsWebComponent;
1353
+ }
1354
+ get layout() {
1355
+ return this._layout;
1356
+ }
1357
+ get items() {
1358
+ return this._items;
1359
+ }
1360
+ get loadingItemsFromApi() {
1361
+ return this._loadingItemsFromApi;
1362
+ }
1363
+ ngOnInit() {
1364
+ this.containerWidth = 0;
1365
+ this.deviceHasMouse = this.layoutService.getDeviceHasMouse();
1366
+ }
1367
+ ngOnChanges(changes) {
1368
+ if (this.containerWidth <= 0) {
1369
+ this.setContainerWidth();
1370
+ }
1371
+ }
1372
+ ngOnDestroy() {
1373
+ // if (this.valueChange) {
1374
+ // this.valueChange.unsubscribe();
1375
+ // }
1376
+ // if (this.loadItems) {
1377
+ // this.loadItems.unsubscribe();
1378
+ // }
1379
+ // if (this.loadPage) {
1380
+ // this.loadPage.unsubscribe();
1381
+ // }
1382
+ // if (this.sortingChange) {
1383
+ // this.sortingChange.unsubscribe();
1384
+ // }
1385
+ // if (this.fieldClick) {
1386
+ // this.fieldClick.unsubscribe();
1387
+ // }
1388
+ // if (this.itemClick) {
1389
+ // this.itemClick.unsubscribe();
1390
+ // }
1391
+ // if (this.listLoad) {
1392
+ // this.listLoad.unsubscribe();
1393
+ // }
1394
+ this.saveSortingToSession();
1395
+ }
1396
+ getCachedItemsNumber() {
1397
+ return this.cacheSize >= 0 ? this.cacheSize : PepListComponent.TOP_ITEMS_ARRAY;
1398
+ }
1399
+ getScrollingElement() {
1400
+ var _a;
1401
+ return this.parentScroll ? this.parentScroll : (_a = this.virtualScroller) === null || _a === void 0 ? void 0 : _a.contentElementRef.nativeElement.parentElement;
1402
+ }
1403
+ scrollToTop(animate = true) {
1404
+ const scrollingElement = this.getScrollingElement();
1405
+ if (scrollingElement) {
1406
+ const scrollTop = 0;
1407
+ // totally disable animate
1408
+ if (!animate || this.scrollAnimationTime === 0) {
1409
+ if (scrollingElement instanceof Window) {
1410
+ window.scrollTo(0, scrollTop);
1411
+ }
1412
+ else {
1413
+ scrollingElement.scrollTop = scrollTop;
1414
+ }
1415
+ }
1416
+ else {
1417
+ let animationRequest;
1418
+ const isWindow = scrollingElement instanceof Window;
1419
+ const currentScrollTop = scrollingElement instanceof Window
1420
+ ? window.pageYOffset
1421
+ : scrollingElement.scrollTop;
1422
+ if (this.currentTween !== undefined) {
1423
+ this.currentTween.stop();
1424
+ }
1425
+ this.currentTween = new tween.Tween({ scrollTop: currentScrollTop })
1426
+ .to({ scrollTop }, this.scrollAnimationTime)
1427
+ .easing(tween.Easing.Quadratic.Out)
1428
+ .onUpdate((data) => {
1429
+ if (isNaN(data.scrollTop)) {
1430
+ return;
1431
+ }
1432
+ if (isWindow) {
1433
+ window.scrollTo(0, data.scrollTop);
1434
+ }
1435
+ else {
1436
+ this.renderer.setProperty(scrollingElement, 'scrollTop', data.scrollTop);
1437
+ }
1438
+ })
1439
+ .onStop(() => {
1440
+ cancelAnimationFrame(animationRequest);
1441
+ })
1442
+ .start();
1443
+ const animate = (time) => {
1444
+ this.currentTween.update(time);
1445
+ if (this.currentTween._object.scrollTop !== scrollTop) {
1446
+ this.zone.runOutsideAngular(() => {
1447
+ animationRequest = requestAnimationFrame(animate);
1448
+ });
1449
+ }
1450
+ };
1451
+ animate();
1452
+ }
1453
+ }
1454
+ }
1455
+ getSelectionCheckBoxWidth() {
1456
+ return this.selectionTypeForActions === 'multi' ? 44 : (this.selectionTypeForActions === 'single' ? 44 : 0);
1457
+ }
1458
+ setContainerWidth() {
1459
+ if (!this.hostElement.nativeElement.parentElement) {
1460
+ return;
1461
+ }
1462
+ const rowHeight = 40; // the table row height (2.5rem * 16font-size).
1463
+ const style = getComputedStyle(this.hostElement.nativeElement.parentElement);
1464
+ // The container-fluid class padding left + right + border
1465
+ const containerFluidSpacing = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
1466
+ const parentContainer = this.hostElement.nativeElement.parentElement.parentElement > 0
1467
+ ? this.hostElement.nativeElement.parentElement.parentElement
1468
+ : this.hostElement.nativeElement.parentElement;
1469
+ // Calculate if vertical scroll should appear, if so set the scroll width. (this.totalRows + 1) + 1 is for the header row.
1470
+ this.tableScrollWidth = parentContainer.clientHeight < rowHeight * (this.totalRows + 1)
1471
+ ? this.layoutService.getScrollbarWidth()
1472
+ : 0;
1473
+ // The selectionCheckBoxWidth width + containerFluidSpacing + this.tableScrollWidth.
1474
+ const rowHeaderWidthToSub = containerFluidSpacing + this.getSelectionCheckBoxWidth() + this.tableScrollWidth;
1475
+ this.containerWidth = parentContainer.offsetWidth - rowHeaderWidthToSub;
1476
+ }
1477
+ saveSortingToSession() {
1478
+ this.sessionService.setObject(PepListComponent.SORT_BY_STATE_KEY, this.sortBy);
1479
+ this.sessionService.setObject(PepListComponent.ASCENDING_STATE_KEY, this.isAsc);
1480
+ }
1481
+ getTopItems() {
1482
+ return this.isTable
1483
+ ? PepListComponent.TOP_ITEMS_TABLE
1484
+ : PepListComponent.TOP_ITEMS_THUMBNAILS;
1485
+ }
1486
+ disableScroll(disable) {
1487
+ if (disable) {
1488
+ this.renderer.addClass(this.hostElement.nativeElement.parentElement, 'lock-events');
1489
+ }
1490
+ else {
1491
+ this.renderer.removeClass(this.hostElement.nativeElement.parentElement, 'lock-events');
1492
+ }
1493
+ }
1494
+ toggleLoadingItemsFropApi(loadingItemsFromApi) {
1495
+ this._loadingItemsFromApi = loadingItemsFromApi;
1496
+ // this.disableScroll(loadingItemsFromApi);
1497
+ }
1498
+ updateCurrentPageItems(startIndex, endIndex) {
1499
+ this.currentPageItems = this.items.slice(startIndex, endIndex);
1500
+ }
1501
+ setSelectionItems(itemId, uniqItemId, isChecked) {
1502
+ // Set selected item checkbox
1503
+ if (this.isAllSelected) {
1504
+ if (isChecked) {
1505
+ this.unSelectedItems.delete(itemId);
1506
+ this.selectedItems.set(itemId, uniqItemId);
1507
+ }
1508
+ else {
1509
+ this.selectedItems.delete(itemId);
1510
+ this.unSelectedItems.set(itemId, uniqItemId);
1511
+ }
1512
+ }
1513
+ else {
1514
+ if (isChecked) {
1515
+ this.unSelectedItems.delete(itemId);
1516
+ this.selectedItems.set(itemId, uniqItemId);
1517
+ }
1518
+ else {
1519
+ this.selectedItems.delete(itemId);
1520
+ this.unSelectedItems.set(itemId, uniqItemId);
1521
+ }
1522
+ }
1523
+ }
1524
+ getUniqItemId(itemId, itemType = '') {
1525
+ return itemId + this.SEPARATOR + itemType;
1526
+ }
1527
+ setLayout() {
1528
+ if (this.totalRows === 0 ||
1529
+ !this._layout ||
1530
+ !this._layout.ControlFields ||
1531
+ this._layout.ControlFields.length === 0) {
1532
+ return;
1533
+ }
1534
+ this._layout.ControlFields.forEach((cf) => {
1535
+ if (cf.ColumnWidth === 0) {
1536
+ cf.ColumnWidth = 10;
1537
+ }
1538
+ if (this.isTable &&
1539
+ (cf.FieldType === FIELD_TYPE.Image ||
1540
+ // cf.FieldType === FIELD_TYPE.Indicators || ???
1541
+ cf.FieldType === FIELD_TYPE.Signature ||
1542
+ cf.FieldType === FIELD_TYPE.NumberIntegerQuantitySelector ||
1543
+ cf.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
1544
+ cf.FieldType === FIELD_TYPE.NumberIntegerForMatrix ||
1545
+ cf.FieldType === FIELD_TYPE.NumberRealForMatrix ||
1546
+ cf.FieldType === FIELD_TYPE.Package ||
1547
+ cf.ApiName === 'UnitsQuantity' ||
1548
+ cf.ApiName === 'QuantitySelector')) {
1549
+ cf.Layout.XAlignment = 3;
1550
+ }
1551
+ });
1552
+ if (!this.cd['destroyed']) {
1553
+ this.cd.detectChanges();
1554
+ }
1555
+ // Set the container width.
1556
+ if (this.containerWidth <= 0) {
1557
+ this.setContainerWidth();
1558
+ }
1559
+ const isLastColumnsWidthSet = this.setLastColumnsWidth();
1560
+ // Set the layout only if the last columns width couldn't set.
1561
+ if (!isLastColumnsWidthSet) {
1562
+ this.calcColumnsWidth();
1563
+ }
1564
+ this.checkForChanges = new Date().getTime();
1565
+ }
1566
+ setLastColumnsWidth() {
1567
+ let res = false;
1568
+ let totalCalcColsWidth = 0;
1569
+ let widthToSet = 'inherit';
1570
+ if (this.lastColumnsWidth.length > 0) {
1571
+ // Check if this is the same UI control for table.
1572
+ if (this.lastColumnsWidth.length === this._layout.ControlFields.length) {
1573
+ let uiControlsAreTheSame = true;
1574
+ for (let index = 0; index < this._layout.ControlFields.length; index++) {
1575
+ const uiControlField = this._layout.ControlFields[index];
1576
+ if (uiControlField.ApiName !== this.lastColumnsWidth[index].columnAPIName) {
1577
+ uiControlsAreTheSame = false;
1578
+ break;
1579
+ }
1580
+ }
1581
+ if (uiControlsAreTheSame) {
1582
+ for (let index = 0; index < this._layout.ControlFields.length; index++) {
1583
+ const uiControlField = this._layout.ControlFields[index];
1584
+ uiControlField.calcColumnWidth = this.lastColumnsWidth[index].calcColumnWidth;
1585
+ uiControlField.calcTitleColumnWidthString = this.lastColumnsWidth[index].calcTitleColumnWidthString;
1586
+ uiControlField.calcColumnWidthString = this.lastColumnsWidth[index].calcColumnWidthString;
1587
+ totalCalcColsWidth += this.lastColumnsWidth[index].calcColumnWidth;
1588
+ }
1589
+ widthToSet = (totalCalcColsWidth + this.getSelectionCheckBoxWidth()) + 'px';
1590
+ console.log(`setLastColumnsWidth -> widthToSet: ${widthToSet} *** totalCalcColsWidth: ${totalCalcColsWidth}`);
1591
+ this.setColumnsWidth(widthToSet);
1592
+ res = true;
1593
+ }
1594
+ }
1595
+ }
1596
+ return res;
1597
+ }
1598
+ setVirtualScrollWidth(widthToSet) {
1599
+ if (this.virtualScroller) {
1600
+ this.renderer.setStyle(this.virtualScroller.contentElementRef.nativeElement, 'width', widthToSet === 'inherit' ? '100%' : widthToSet);
1601
+ }
1602
+ }
1603
+ setColumnsWidth(widthToSet) {
1604
+ this.renderer.setStyle(this.hostElement.nativeElement, 'width', widthToSet);
1605
+ if (this.isTable) {
1606
+ this.setVirtualScrollWidth(widthToSet);
1607
+ }
1608
+ else {
1609
+ // Do this only after UI is change cause the property isTable is Input and can refresh after this thread.
1610
+ setTimeout(() => {
1611
+ this.setVirtualScrollWidth(widthToSet);
1612
+ }, 0);
1613
+ }
1614
+ }
1615
+ calcColumnsWidth() {
1616
+ const fixedMultiple = 3.78; // for converting em to pixel.
1617
+ const length = this._layout.ControlFields.length;
1618
+ // Is table AND there is at least one column of width type of percentage.
1619
+ if (this.isTable) {
1620
+ if (this._layout && this._layout.ControlFields) {
1621
+ this.hasColumnWidthOfTypePercentage =
1622
+ this._layout.ControlFields.filter((cf) => cf.ColumnWidthType === 1).length === 0;
1623
+ }
1624
+ }
1625
+ // If the columns size is fixed and the total is small then the container change it to percentage.
1626
+ if (!this.hasColumnWidthOfTypePercentage) {
1627
+ const totalFixedColsWidth = this._layout.ControlFields.map((cf) => cf.ColumnWidth * fixedMultiple).reduce((sum, current) => sum + current);
1628
+ if (window.innerWidth > totalFixedColsWidth) {
1629
+ this.hasColumnWidthOfTypePercentage = true;
1630
+ }
1631
+ }
1632
+ let totalCalcColsWidth = 0;
1633
+ let widthToSet = 'inherit';
1634
+ // Calc by percentage
1635
+ if (this.hasColumnWidthOfTypePercentage) {
1636
+ const totalColsWidth = this._layout.ControlFields.map((cf) => cf.ColumnWidth).reduce((sum, current) => sum + current);
1637
+ for (let index = 0; index < length; index++) {
1638
+ const uiControlField = this._layout.ControlFields[index];
1639
+ const calcColumnWidthPercentage = (100 / totalColsWidth) * uiControlField.ColumnWidth;
1640
+ uiControlField.calcColumnWidth = Math.floor((this.containerWidth * calcColumnWidthPercentage) / 100);
1641
+ if (index === length - 1) {
1642
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString = 'calc(100% - ' + totalCalcColsWidth + 'px)'; // For 100%
1643
+ }
1644
+ else {
1645
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString = uiControlField.calcColumnWidth + 'px';
1646
+ totalCalcColsWidth += uiControlField.calcColumnWidth;
1647
+ }
1648
+ }
1649
+ }
1650
+ else {
1651
+ for (let index = 0; index < length; index++) {
1652
+ const uiControlField = this._layout
1653
+ .ControlFields[index];
1654
+ const currentFixedWidth = Math.floor(uiControlField.ColumnWidth * fixedMultiple);
1655
+ if (index === length - 1) {
1656
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString = currentFixedWidth + 'px';
1657
+ }
1658
+ else {
1659
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString = currentFixedWidth + 'px';
1660
+ }
1661
+ totalCalcColsWidth += currentFixedWidth;
1662
+ }
1663
+ widthToSet = (totalCalcColsWidth + this.getSelectionCheckBoxWidth()) + 'px';
1664
+ }
1665
+ console.log(`calcColumnsWidth -> widthToSet: ${widthToSet} *** totalCalcColsWidth: ${totalCalcColsWidth}`);
1666
+ this.setColumnsWidth(widthToSet);
1667
+ }
1668
+ calcObjectHeight() {
1669
+ setTimeout(() => {
1670
+ if (this.virtualScroller) {
1671
+ const content = this.virtualScroller.getContent();
1672
+ console.log(`content.children.length: ${content.children.length}`);
1673
+ if (content.children.length > 0) {
1674
+ const rect = this.virtualScroller.getElementSize(content.children[0]);
1675
+ this.calculatedObjectHeight = rect.height + 'px';
1676
+ console.log(`this.calculatedObjectHeight: ${this.calculatedObjectHeight}`);
1677
+ }
1678
+ }
1679
+ this.disableScroll(false);
1680
+ }, 1000);
1681
+ }
1682
+ initResizeData() {
1683
+ this.startX = 0;
1684
+ this.startWidth = 0;
1685
+ this.tableStartWidth = 0;
1686
+ this.pressedColumn = '';
1687
+ this.pressedColumnIndex = -1;
1688
+ }
1689
+ getParent(el, parentSelector) {
1690
+ // If no parentSelector defined will bubble up all the way to *document*
1691
+ if (parentSelector === undefined) {
1692
+ parentSelector = document;
1693
+ }
1694
+ const parent = [];
1695
+ let p = el.parentNode;
1696
+ while (p &&
1697
+ p.className !== '' &&
1698
+ p.className.indexOf(parentSelector) === -1 &&
1699
+ parentSelector !== document) {
1700
+ const o = p;
1701
+ p = o.parentNode;
1702
+ }
1703
+ if (p.className.indexOf(parentSelector) > -1) {
1704
+ parent.push(p); // Push that parentSelector you wanted to stop at
1705
+ }
1706
+ return parent;
1707
+ }
1708
+ cleanItems() {
1709
+ this.itemsCounter = 0;
1710
+ this._items =
1711
+ this.totalRows > 0 ? Array(this.totalRows) : [];
1712
+ this.currentPageItems = [];
1713
+ this.calculatedObjectHeight = 'auto';
1714
+ }
1715
+ initVariablesFromSession(items) {
1716
+ const selectedItemsObject = this.sessionService.getObject(PepListComponent.SELECTED_ITEMS_STATE_KEY);
1717
+ const selectedItemsFromMap = selectedItemsObject && selectedItemsObject.length > 0
1718
+ ? new Map(selectedItemsObject)
1719
+ : null;
1720
+ if (selectedItemsFromMap != null &&
1721
+ typeof selectedItemsFromMap.size !== 'undefined' &&
1722
+ selectedItemsFromMap.size > 0) {
1723
+ this.selectedItems = selectedItemsFromMap;
1724
+ this.sessionService.removeObject(PepListComponent.SELECTED_ITEMS_STATE_KEY);
1725
+ }
1726
+ else {
1727
+ this.selectedItems.clear();
1728
+ }
1729
+ const unSelectedItemsObject = this.sessionService.getObject(PepListComponent.UN_SELECTED_ITEMS_STATE_KEY);
1730
+ const unSelectedItemsMap = unSelectedItemsObject && unSelectedItemsObject.length > 0
1731
+ ? new Map(unSelectedItemsObject)
1732
+ : null;
1733
+ if (unSelectedItemsMap != null &&
1734
+ typeof unSelectedItemsMap.size !== 'undefined' &&
1735
+ unSelectedItemsMap.size > 0) {
1736
+ this.unSelectedItems = unSelectedItemsMap;
1737
+ this.sessionService.removeObject(PepListComponent.UN_SELECTED_ITEMS_STATE_KEY);
1738
+ }
1739
+ else {
1740
+ this.unSelectedItems.clear();
1741
+ }
1742
+ const isAllSelected = this.sessionService.getObject(PepListComponent.ALL_SELECTED_STATE_KEY);
1743
+ if (isAllSelected != null) {
1744
+ // Comment this in version 0.4.2-beta.103, I don't know why we need this (&& this.getIsAllSelected(items))
1745
+ // this.isAllSelected = isAllSelected && this.getIsAllSelected(items);
1746
+ this.isAllSelected = isAllSelected;
1747
+ this.sessionService.removeObject(PepListComponent.ALL_SELECTED_STATE_KEY);
1748
+ }
1749
+ else {
1750
+ this.isAllSelected = false;
1751
+ }
1752
+ const sortBy = this.sessionService.getObject(PepListComponent.SORT_BY_STATE_KEY);
1753
+ if (sortBy && sortBy !== '') {
1754
+ this.sortBy = sortBy;
1755
+ this.sessionService.removeObject(PepListComponent.SORT_BY_STATE_KEY);
1756
+ }
1757
+ else {
1758
+ this.sortBy = '';
1759
+ }
1760
+ const isAsc = this.sessionService.getObject(PepListComponent.ASCENDING_STATE_KEY);
1761
+ if (isAsc != null) {
1762
+ this.isAsc = isAsc;
1763
+ this.sessionService.removeObject(PepListComponent.ASCENDING_STATE_KEY);
1764
+ }
1765
+ else {
1766
+ this.isAsc = true;
1767
+ }
1768
+ }
1769
+ getIsAllSelected(items) {
1770
+ var _a;
1771
+ let result = true;
1772
+ if (((_a = this.selectedItems) === null || _a === void 0 ? void 0 : _a.size) > 0 && (items === null || items === void 0 ? void 0 : items.length) > 0) {
1773
+ for (const item of items) {
1774
+ if (!(item && this.selectedItems.has(item === null || item === void 0 ? void 0 : item.UID.toString()))) {
1775
+ result = false;
1776
+ break;
1777
+ }
1778
+ }
1779
+ }
1780
+ else {
1781
+ result = false;
1782
+ }
1783
+ return result;
1784
+ }
1785
+ getNumberOfStartItems() {
1786
+ let numberOfStartItems = 20;
1787
+ if (this.screenSize === PepScreenSizeType.XL ||
1788
+ this.screenSize === PepScreenSizeType.LG) {
1789
+ numberOfStartItems = this.isTable ? 50 : 40;
1790
+ }
1791
+ else if (this.screenSize === PepScreenSizeType.MD) {
1792
+ numberOfStartItems = this.isTable ? 30 : 20;
1793
+ }
1794
+ else if (this.screenSize === PepScreenSizeType.SM) {
1795
+ numberOfStartItems = this.isTable ? 20 : 10;
1796
+ }
1797
+ else if (this.screenSize === PepScreenSizeType.XS) {
1798
+ numberOfStartItems = this.isTable ? 15 : 5;
1799
+ }
1800
+ return numberOfStartItems;
1801
+ }
1802
+ setItemClicked(itemId, isSelectableForActions, itemType, isChecked) {
1803
+ const uniqItemId = this.getUniqItemId(itemId, itemType);
1804
+ // select the selected item.
1805
+ if (isChecked) {
1806
+ // Set seleted item
1807
+ this.selectedItemId = uniqItemId;
1808
+ }
1809
+ else {
1810
+ if (this.selectedItemId === uniqItemId) {
1811
+ this.selectedItemId = '';
1812
+ }
1813
+ }
1814
+ if (this.selectionTypeForActions === 'single') {
1815
+ this.selectedItemsChange.emit(this.selectedItemId.length === 0 ? 0 : 1);
1816
+ }
1817
+ else if (this.selectionTypeForActions === 'multi') {
1818
+ if (isSelectableForActions) {
1819
+ this.setSelectionItems(itemId, uniqItemId, isChecked);
1820
+ const currentList = this.isAllSelected
1821
+ ? this.unSelectedItems
1822
+ : this.selectedItems;
1823
+ const currentListCount = this.isAllSelected
1824
+ ? this.totalRows - currentList.size
1825
+ : currentList.size;
1826
+ this.selectedItemsChange.emit(currentListCount);
1827
+ }
1828
+ }
1829
+ // Raise selected item change event
1830
+ if (this.selectionTypeForActions !== 'none') {
1831
+ this.selectedItemChange.emit({
1832
+ id: itemId,
1833
+ selected: isChecked,
1834
+ });
1835
+ }
1836
+ }
1837
+ exportFunctionsOnHostElement() {
1838
+ // This is for web component usage for use those functions.
1839
+ this.hostElement.nativeElement.clear = this.clear.bind(this);
1840
+ this.hostElement.nativeElement.initListData = this.initListData.bind(this);
1841
+ this.hostElement.nativeElement.updateItems = this.updateItems.bind(this);
1842
+ this.hostElement.nativeElement.updatePage = this.updatePage.bind(this);
1843
+ this.hostElement.nativeElement.updateItem = this.updateItem.bind(this);
1844
+ }
1845
+ // For refresh the UI when change the is selectable for action on item.
1846
+ getisItemDisabled(item) {
1847
+ return this.printMode || this.lockItemInnerEvents || (item && !item.IsSelectableForActions);
1848
+ }
1849
+ getIsAllSelectedForActions() {
1850
+ var _a;
1851
+ let res = false;
1852
+ if (this.isAllSelected) {
1853
+ if (this.unSelectedItems.size === 0) {
1854
+ res = true;
1855
+ }
1856
+ }
1857
+ else {
1858
+ if ((_a = this.virtualScroller) === null || _a === void 0 ? void 0 : _a.viewPortItems) {
1859
+ if (this.selectedItems.size === this.totalRows) {
1860
+ res = this.getIsAllSelected(this.virtualScroller.viewPortItems);
1861
+ }
1862
+ else if (this.selectedItems.size < this.totalRows) {
1863
+ for (const item of this.virtualScroller.viewPortItems) {
1864
+ res =
1865
+ item && this.selectedItems.has(item === null || item === void 0 ? void 0 : item.UID.toString());
1866
+ if (!res) {
1867
+ break;
1868
+ }
1869
+ }
1870
+ }
1871
+ }
1872
+ }
1873
+ return res;
1874
+ }
1875
+ setIsAllSelected(isChecked) {
1876
+ if (this.selectionTypeForActions === 'multi') {
1877
+ this.selectAllCB.checked = isChecked;
1878
+ this.isAllSelected = isChecked;
1879
+ }
1880
+ }
1881
+ selectAllItemsForActions(e) {
1882
+ // For material checkbox || radio.
1883
+ const isChecked = e.source.checked;
1884
+ // Indeterminate mode
1885
+ let isIndeterminate = false;
1886
+ const currentList = this.isAllSelected
1887
+ ? this.unSelectedItems
1888
+ : this.selectedItems;
1889
+ if (currentList.size > 0) {
1890
+ isIndeterminate = true;
1891
+ this.isAllSelected = false;
1892
+ this.selectedItemsChange.emit(0);
1893
+ e.source.checked = false;
1894
+ }
1895
+ this.selectedItems.clear();
1896
+ this.unSelectedItems.clear();
1897
+ if (!isIndeterminate) {
1898
+ this.isAllSelected = isChecked;
1899
+ this.selectAllClick.emit(isChecked);
1900
+ if (this.selectionTypeForActions === 'multi') {
1901
+ if (!isChecked) {
1902
+ this.selectedItemsChange.emit(0);
1903
+ this.selectedItemId = '';
1904
+ }
1905
+ else {
1906
+ const filteredItems = this.items.filter((item) => item && item.IsSelectableForActions);
1907
+ this.selectedItemsChange.emit(filteredItems.length);
1908
+ }
1909
+ }
1910
+ }
1911
+ else {
1912
+ // Remove all
1913
+ if (this.selectionTypeForActions === 'multi') {
1914
+ this.selectAllClick.emit(false);
1915
+ }
1916
+ }
1917
+ }
1918
+ raiseStartIndexChange(startIndex = 0) {
1919
+ // this.startIndex = startIndex;
1920
+ this.startIndexChange.emit({ startIndex });
1921
+ }
1922
+ getIsItemSelected(item) {
1923
+ let isSelected = false;
1924
+ if (item) {
1925
+ if (this.selectionTypeForActions === 'single') {
1926
+ isSelected = this.selectedItemId === this.getUniqItemId(item.UID, item.Type.toString());
1927
+ }
1928
+ else if (this.selectionTypeForActions === 'multi') {
1929
+ if (item.IsSelectableForActions) {
1930
+ isSelected = (this.isAllSelected && !this.unSelectedItems.has(item.UID)) || this.selectedItems.has(item.UID);
1931
+ }
1932
+ }
1933
+ }
1934
+ return isSelected;
1935
+ }
1936
+ selectItemForActions(e, itemId, isSelectableForActions, itemType = '') {
1937
+ // For material checkbox || radio.
1938
+ const isChecked = e.source.checked;
1939
+ this.setItemClicked(itemId, isSelectableForActions, itemType, isChecked);
1940
+ }
1941
+ itemClicked(e, item) {
1942
+ // Set seleted item
1943
+ const itemId = item === null || item === void 0 ? void 0 : item.UID.toString();
1944
+ const itemType = item === null || item === void 0 ? void 0 : item.Type.toString();
1945
+ let isChecked = false;
1946
+ if (item && item.IsSelectableForActions) {
1947
+ this.selectedItemId = this.getUniqItemId(itemId, itemType);
1948
+ isChecked = true;
1949
+ }
1950
+ if (this.isTable) {
1951
+ if (this.selectionTypeForActions === 'single') {
1952
+ this.setItemClicked(itemId, item.IsSelectableForActions, itemType, isChecked);
1953
+ }
1954
+ else if (this.selectionTypeForActions === 'none') {
1955
+ // Just mark the row as highlighted
1956
+ this.setItemClicked(itemId, item.IsSelectableForActions, itemType, true);
1957
+ }
1958
+ }
1959
+ else {
1960
+ if (this.disabled) {
1961
+ return;
1962
+ }
1963
+ }
1964
+ this.itemClick.emit({ source: item, viewType: this.viewType });
1965
+ }
1966
+ onTableRowMouseEnter(event, itemId, itemType) {
1967
+ if (!this.deviceHasMouse) {
1968
+ return;
1969
+ }
1970
+ const uniqItemId = this.getUniqItemId(itemId, itemType);
1971
+ this.hoveredItemId = uniqItemId;
1972
+ }
1973
+ onTableRowMouseLeave(event, itemId, itemType) {
1974
+ this.hoveredItemId = '';
1975
+ }
1976
+ onCardMouseEnter(event, itemId, itemType) {
1977
+ if (!this.deviceHasMouse) {
1978
+ return;
1979
+ }
1980
+ const uniqItemId = this.getUniqItemId(itemId, itemType);
1981
+ this.hoveredItemId = uniqItemId;
1982
+ }
1983
+ onCardMouseLeave(event, itemId, itemType) {
1984
+ this.hoveredItemId = '';
1985
+ }
1986
+ // trackByFunc(index: number, item: ObjectsDataRow): any {
1987
+ // return item && item?.UID ? item?.UID : index;
1988
+ // // let res: string = "";
1989
+ // // if (item && item?.UID) {
1990
+ // // res = item?.UID + "_" + this.listType + "_" + (this.isTable ? "Table" : "Thumbnails");
1991
+ // // }
1992
+ // // else {
1993
+ // // res = index + "_" + this.listType + "_" + (this.isTable ? "Table" : "Thumbnails");
1994
+ // // }
1995
+ // // return res;
1996
+ // }
1997
+ clear() {
1998
+ this.cleanItems();
1999
+ this._layout = null;
2000
+ }
2001
+ setSelectedIds(selectedIds, items = null) {
2002
+ var _a;
2003
+ this.selectedItems.clear();
2004
+ this.isAllSelected = false;
2005
+ if (selectedIds) {
2006
+ // for (let i = 0; i < selected.length; i++) {
2007
+ for (const selectedId of selectedIds) {
2008
+ const tmp = selectedId.split(this.SEPARATOR);
2009
+ if (tmp && tmp.length > 0) {
2010
+ const itemId = tmp[0];
2011
+ const itemType = tmp.length > 1 ? tmp[1] : '';
2012
+ this.selectedItems.set(itemId, this.getUniqItemId(itemId, itemType));
2013
+ }
2014
+ }
2015
+ this.isAllSelected = this.getIsAllSelected(items ? items : (_a = this.virtualScroller) === null || _a === void 0 ? void 0 : _a.viewPortItems);
2016
+ this.setSelectionDataInSession();
2017
+ }
2018
+ this.refresh();
2019
+ }
2020
+ setSelectionDataInSession() {
2021
+ if (this.selectedItems.size > 0) {
2022
+ this.sessionService.setObject(PepListComponent.SELECTED_ITEMS_STATE_KEY, JSON.stringify([...this.selectedItems]));
2023
+ }
2024
+ if (this.unSelectedItems.size > 0) {
2025
+ this.sessionService.setObject(PepListComponent.UN_SELECTED_ITEMS_STATE_KEY, JSON.stringify([...this.unSelectedItems]));
2026
+ }
2027
+ this.sessionService.setObject(PepListComponent.ALL_SELECTED_STATE_KEY, this.isAllSelected);
2028
+ }
2029
+ initListData(layout, totalRows, items) {
2030
+ this.initVariablesFromSession(items);
2031
+ const selectedItemsList = this.isAllSelected
2032
+ ? this.unSelectedItems
2033
+ : this.selectedItems;
2034
+ const currentListCount = this.isAllSelected
2035
+ ? this.totalRows - selectedItemsList.size
2036
+ : selectedItemsList.size;
2037
+ this.selectedItemsChange.emit(currentListCount);
2038
+ this._layout = layout;
2039
+ this.selectedItemId = '';
2040
+ this.totalRows = totalRows;
2041
+ // If is all selected is false && the size of the selected items is 1 && selectionTypeForActions is 'single' then set it as the selected item id.
2042
+ // We need this in setTimeout cause the selectionTypeForActions is input that can set after this function.
2043
+ setTimeout(() => {
2044
+ if (!this.isAllSelected && this.selectedItems.size === 1 && this.selectionTypeForActions === 'single') {
2045
+ this.selectedItemId = this.selectedItems.values()[0];
2046
+ }
2047
+ }, 0);
2048
+ this.scrollToTop(false);
2049
+ this.cleanItems();
2050
+ this.disableScroll(true);
2051
+ if (items) {
2052
+ if (this.pagerType === 'pages') {
2053
+ // If page index out of bounds - init to 0.
2054
+ const numberOfPages = Math.ceil(totalRows / this.pageSize);
2055
+ if (this.pageIndex >= numberOfPages) {
2056
+ this.pageIndex = 0;
2057
+ }
2058
+ this.updatePage(items, {
2059
+ pageIndex: this.pageIndex,
2060
+ pageSize: this.pageSize,
2061
+ });
2062
+ this.disableScroll(false);
2063
+ }
2064
+ else {
2065
+ const numberOfStartItems = this.getNumberOfStartItems();
2066
+ const event = {
2067
+ fromIndex: 0,
2068
+ toIndex: numberOfStartItems,
2069
+ };
2070
+ this.updateItems(items, event);
2071
+ if (this.virtualScroller) {
2072
+ this.refresh(() => {
2073
+ this.calcObjectHeight();
2074
+ });
2075
+ }
2076
+ else {
2077
+ this.calcObjectHeight();
2078
+ }
2079
+ }
2080
+ }
2081
+ if (!this.isTable) {
2082
+ this.lastColumnsWidth = [];
2083
+ }
2084
+ this.setLayout();
2085
+ // setTimeout(() => {
2086
+ this.onListLoad();
2087
+ // }, 0);
2088
+ }
2089
+ updateItems(items, event = null) {
2090
+ var _a;
2091
+ if (!event) {
2092
+ return; // Event isn't supplied.
2093
+ }
2094
+ // Clean array
2095
+ if (this.itemsCounter + items.length > this.getCachedItemsNumber()) {
2096
+ this.cleanItems();
2097
+ }
2098
+ const startIndex = (_a = event.fromIndex) !== null && _a !== void 0 ? _a : 0;
2099
+ for (let i = 0; i < items.length; i++) {
2100
+ if (!this.items[i + startIndex]) {
2101
+ this.items[i + startIndex] = items[i];
2102
+ this.itemsCounter += 1;
2103
+ }
2104
+ }
2105
+ this.toggleLoadingItemsFropApi(false);
2106
+ }
2107
+ updatePage(items, event) {
2108
+ if (!event) {
2109
+ return; // Event isn't supplied.
2110
+ }
2111
+ // Clean array
2112
+ if (this.itemsCounter + items.length > this.getCachedItemsNumber()) {
2113
+ this.cleanItems();
2114
+ }
2115
+ // const loadInChunks = this.itemsCounter === 0;
2116
+ const startIndex = Math.min(event.pageIndex * event.pageSize, this.totalRows);
2117
+ const endIndex = Math.min(startIndex + event.pageSize, this.totalRows);
2118
+ for (let i = 0; i < items.length; i++) {
2119
+ if (!this.items[i + startIndex]) {
2120
+ this.items[i + startIndex] = items[i];
2121
+ this.itemsCounter += 1;
2122
+ }
2123
+ }
2124
+ this.updateCurrentPageItems(startIndex, endIndex);
2125
+ this.toggleLoadingItemsFropApi(false);
2126
+ }
2127
+ updateItem(data) {
2128
+ const index = this.items.findIndex((i) => i && (i === null || i === void 0 ? void 0 : i.UID) === (data === null || data === void 0 ? void 0 : data.UID));
2129
+ if (index >= 0 && index < this.items.length) {
2130
+ this.updateItemProperties(this.items[index], data);
2131
+ }
2132
+ }
2133
+ scrollToIndex(index, alignToBeginning = true, additionalOffset = 0, animationMilliseconds = undefined, animationCompletedCallback = undefined) {
2134
+ var _a;
2135
+ (_a = this.virtualScroller) === null || _a === void 0 ? void 0 : _a.scrollToIndex(index, alignToBeginning, additionalOffset, animationMilliseconds, animationCompletedCallback);
2136
+ }
2137
+ updateItemProperties(itemToUpdate, data) {
2138
+ Object.assign(itemToUpdate, data);
2139
+ }
2140
+ getSelectedItemsData(isForEdit = false) {
2141
+ const res = new PepSelectionData();
2142
+ let selectionType = 1;
2143
+ const items = [];
2144
+ const itemTypes = [];
2145
+ if (this.selectionTypeForActions === 'single') {
2146
+ if (this.selectedItemId.length > 0) {
2147
+ const tmp = this.selectedItemId.split(this.SEPARATOR);
2148
+ items.push(tmp[0]);
2149
+ itemTypes.push(tmp[1]);
2150
+ }
2151
+ }
2152
+ else if (this.selectionTypeForActions === 'multi') {
2153
+ let currentList = [];
2154
+ // For edit - only the selected items.
2155
+ if (isForEdit) {
2156
+ if (!this.isAllSelected) {
2157
+ currentList = Array.from(this.selectedItems.values());
2158
+ }
2159
+ else {
2160
+ // Get the id's of the items that not founded in unSelectedItems.
2161
+ this.items.forEach((item) => {
2162
+ if (item &&
2163
+ !this.unSelectedItems.has(item === null || item === void 0 ? void 0 : item.UID.toString())) {
2164
+ currentList.push(this.getUniqItemId(item === null || item === void 0 ? void 0 : item.UID.toString(), item === null || item === void 0 ? void 0 : item.Type.toString()));
2165
+ }
2166
+ });
2167
+ }
2168
+ }
2169
+ else {
2170
+ // For delete - can be the unselected with select_all functionality.
2171
+ currentList = Array.from(this.isAllSelected
2172
+ ? this.unSelectedItems.values()
2173
+ : this.selectedItems.values());
2174
+ selectionType = this.isAllSelected ? 0 : 1;
2175
+ }
2176
+ currentList.forEach((item) => {
2177
+ const tmp = item.split(this.SEPARATOR);
2178
+ if (tmp.length === 2) {
2179
+ items.push(tmp[0]);
2180
+ itemTypes.push(tmp[1]);
2181
+ }
2182
+ });
2183
+ }
2184
+ res.selectionType = selectionType;
2185
+ res.rows = items;
2186
+ res.rowTypes = itemTypes;
2187
+ return res;
2188
+ }
2189
+ getIsItemEditable(uid) {
2190
+ const item = this.items.filter((x) => (x === null || x === void 0 ? void 0 : x.UID.toString()) === uid);
2191
+ if (item.length > 0) {
2192
+ return item[0].IsEditable;
2193
+ }
2194
+ else {
2195
+ return false;
2196
+ }
2197
+ }
2198
+ getItemDataByID(uid) {
2199
+ return this.items.find((item) => (item === null || item === void 0 ? void 0 : item.UID.toString()) === uid);
2200
+ }
2201
+ refresh(refreshCompletedCallback = undefined) {
2202
+ var _a;
2203
+ (_a = this.virtualScroller) === null || _a === void 0 ? void 0 : _a.refresh(refreshCompletedCallback);
2204
+ }
2205
+ // ---------------------------------------------------------------
2206
+ // Events handlers.
2207
+ // ---------------------------------------------------------------
2208
+ onWinResize(e) {
2209
+ this.refresh();
2210
+ this.containerWidth = 0;
2211
+ this.lastColumnsWidth = [];
2212
+ this.setLayout();
2213
+ }
2214
+ onListResizeStart(event, columnKey, columnIndex) {
2215
+ this.pressedColumn = columnKey;
2216
+ this.pressedColumnIndex = columnIndex;
2217
+ this.startX = event.x;
2218
+ this.startWidth = event.target.closest('.header-column').offsetWidth;
2219
+ this.tableStartWidth = this.hostElement.nativeElement.offsetWidth; // this.virtualScroller?.contentElementRef.nativeElement.offsetWidth;
2220
+ console.log(`tableStartWidth - ${this.tableStartWidth}`);
2221
+ }
2222
+ onListResize(event) {
2223
+ // if (this.pressedColumn.length > 0) {
2224
+ if (this.pressedColumnIndex >= 0) {
2225
+ let widthToAdd = this.layoutService.isRtl() ? this.startX - event.x : event.x - this.startX;
2226
+ // Set the width of the column and the container of the whole columns.
2227
+ if (this.startWidth + widthToAdd >= PepListComponent.MINIMUM_COLUMN_WIDTH || widthToAdd > 0) {
2228
+ const length = this._layout.ControlFields.length;
2229
+ let totalCalcColsWidth = 0;
2230
+ for (let index = 0; index < length; index++) {
2231
+ const uiControlField = this._layout
2232
+ .ControlFields[index];
2233
+ if (index === length - 1) {
2234
+ // Calc the last column only in percentage type.
2235
+ if (this.hasColumnWidthOfTypePercentage) {
2236
+ const scrollWidth = this.layoutService.getScrollbarWidth();
2237
+ widthToAdd += scrollWidth;
2238
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString = 'calc(100% - ' + (totalCalcColsWidth + scrollWidth) + 'px)'; // For 100%
2239
+ }
2240
+ else {
2241
+ // if (uiControlField.ApiName === this.pressedColumn) {
2242
+ if (index === this.pressedColumnIndex) {
2243
+ uiControlField.calcColumnWidth = this.startWidth + widthToAdd;
2244
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidth + 'px';
2245
+ uiControlField.calcColumnWidthString = uiControlField.calcColumnWidth + 'px';
2246
+ }
2247
+ }
2248
+ // } else if (uiControlField.ApiName === this.pressedColumn) {
2249
+ }
2250
+ else if (index === this.pressedColumnIndex) {
2251
+ uiControlField.calcColumnWidth = this.startWidth + widthToAdd;
2252
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString = uiControlField.calcColumnWidth + 'px';
2253
+ }
2254
+ totalCalcColsWidth += uiControlField.calcColumnWidth;
2255
+ }
2256
+ const widthToSet = (this.tableStartWidth + widthToAdd) + 'px';
2257
+ console.log(`onListResize -> widthToSet: ${widthToSet} *** widthToAdd: ${widthToAdd}`);
2258
+ this.setColumnsWidth(widthToSet);
2259
+ this.checkForChanges = new Date().getTime();
2260
+ }
2261
+ }
2262
+ }
2263
+ onListResizeEnd(event) {
2264
+ // if (this.pressedColumn.length > 0) {
2265
+ if (this.pressedColumnIndex >= 0) {
2266
+ if (event &&
2267
+ this.getParent(event.srcElement, 'resize-box').length > 0) {
2268
+ this.initResizeData();
2269
+ }
2270
+ else {
2271
+ // Set timeout 0 for onListSortingChange will have the pressedColumn.
2272
+ setTimeout(() => {
2273
+ this.initResizeData();
2274
+ }, 0);
2275
+ }
2276
+ this.lastColumnsWidth = [];
2277
+ // Set the last columns width
2278
+ for (let index = 0; index < this._layout.ControlFields.length; index++) {
2279
+ const uiControlField = this._layout.ControlFields[index];
2280
+ this.lastColumnsWidth.push({
2281
+ columnAPIName: uiControlField.ApiName,
2282
+ calcColumnWidth: uiControlField.calcColumnWidth,
2283
+ calcTitleColumnWidthString: uiControlField.calcTitleColumnWidthString,
2284
+ calcColumnWidthString: uiControlField.calcColumnWidthString
2285
+ });
2286
+ }
2287
+ event.stopPropagation();
2288
+ }
2289
+ }
2290
+ onListSortingChange(sortBy, isAsc, event = null) {
2291
+ if (
2292
+ // this.pressedColumn.length > 0 ||
2293
+ this.pressedColumnIndex >= 0 ||
2294
+ (event && this.getParent(event.srcElement, 'resize-box').length > 0)) {
2295
+ return;
2296
+ }
2297
+ if (this.sortBy !== sortBy || this.isAsc !== isAsc) {
2298
+ this.sortBy = sortBy;
2299
+ this.isAsc = isAsc;
2300
+ this.saveSortingToSession();
2301
+ this.sortingChange.emit({ sortBy, isAsc });
2302
+ }
2303
+ }
2304
+ onListHeaderMouseEnter(event) {
2305
+ // this.headerIsInFocus = true;
2306
+ }
2307
+ onListHeaderMouseLeave(event) {
2308
+ // this.headerIsInFocus = false;
2309
+ this.onListResizeEnd(event);
2310
+ this.initResizeData();
2311
+ }
2312
+ onPagerChange(event) {
2313
+ this.pageIndex = event.pageIndex;
2314
+ // Scroll to top.
2315
+ this.scrollToTop();
2316
+ const startIndex = event.pageIndex * event.pageSize;
2317
+ const endIndex = Math.min(startIndex + event.pageSize, this.totalRows);
2318
+ let shouldGetItemsFromApi = false;
2319
+ let index = startIndex;
2320
+ while (!shouldGetItemsFromApi && index < endIndex) {
2321
+ if (!this.items[index]) {
2322
+ shouldGetItemsFromApi = true;
2323
+ }
2324
+ index++;
2325
+ }
2326
+ // Get bulk from api.
2327
+ if (shouldGetItemsFromApi) {
2328
+ if (!this.loadingItemsFromApi) {
2329
+ this.toggleLoadingItemsFropApi(true);
2330
+ this.loadPage.emit({
2331
+ pageIndex: event.pageIndex,
2332
+ pageSize: event.pageSize,
2333
+ });
2334
+ }
2335
+ }
2336
+ else {
2337
+ setTimeout(() => {
2338
+ this.updateCurrentPageItems(startIndex, endIndex);
2339
+ }, this.scrollAnimationTime);
2340
+ }
2341
+ }
2342
+ onVirtualScrollerChange(event) {
2343
+ this.raiseStartIndexChange(event.startIndex);
2344
+ if (this.pagerType === 'scroll') {
2345
+ // For other events do nothing.
2346
+ if (typeof event.startIndex === 'undefined' || event.startIndex < 0 ||
2347
+ typeof event.endIndex === 'undefined' || event.endIndex < 0) {
2348
+ return;
2349
+ }
2350
+ const addAtStart = event.scrollDirection === 'backward';
2351
+ let shouldGetItemsFromApi = false;
2352
+ let indexOfMissingItem;
2353
+ if (addAtStart) {
2354
+ indexOfMissingItem = event.endIndex;
2355
+ while (!shouldGetItemsFromApi && indexOfMissingItem >= event.startIndex) {
2356
+ if (!this.items[indexOfMissingItem]) {
2357
+ shouldGetItemsFromApi = true;
2358
+ }
2359
+ if (!shouldGetItemsFromApi) {
2360
+ indexOfMissingItem--;
2361
+ }
2362
+ }
2363
+ }
2364
+ else {
2365
+ indexOfMissingItem = event.startIndex;
2366
+ while (!shouldGetItemsFromApi && indexOfMissingItem <= event.endIndex) {
2367
+ if (!this.items[indexOfMissingItem]) {
2368
+ shouldGetItemsFromApi = true;
2369
+ }
2370
+ if (!shouldGetItemsFromApi) {
2371
+ indexOfMissingItem++;
2372
+ }
2373
+ }
2374
+ }
2375
+ // Get bulk from api.
2376
+ if (shouldGetItemsFromApi) {
2377
+ if (!this.loadingItemsFromApi) {
2378
+ this.toggleLoadingItemsFropApi(true);
2379
+ const top = this.getTopItems() - 1;
2380
+ const fromIndex = addAtStart ? Math.max(indexOfMissingItem - top, 0) : indexOfMissingItem;
2381
+ const toIndex = addAtStart ? indexOfMissingItem : Math.min(indexOfMissingItem + top, this.totalRows);
2382
+ this.loadItems.emit({
2383
+ fromIndex,
2384
+ toIndex,
2385
+ });
2386
+ }
2387
+ }
2388
+ }
2389
+ }
2390
+ onListLoad() {
2391
+ setTimeout(() => {
2392
+ this.listLoad.emit();
2393
+ }, 0);
2394
+ }
2395
+ // onChildRectChange(event: any) {
2396
+ // // Set the calculatedObjectHeight only if he's not set (this case is only for the initialize when virtual scroll is undefined).
2397
+ // // the other cases is handled in calcObjectHeight function.
2398
+ // if (this.calculatedObjectHeight === 'auto') {
2399
+ // this.calculatedObjectHeight = event?.height + 'px';
2400
+ // }
2401
+ // }
2402
+ onValueChanged(valueChange) {
2403
+ if (this.disabled) {
2404
+ return;
2405
+ }
2406
+ this.valueChange.emit(valueChange);
2407
+ }
2408
+ onCustomizeFieldClick(customizeFieldClickedData) {
2409
+ if (this.disabled) {
2410
+ return;
2411
+ }
2412
+ this.fieldClick.emit(customizeFieldClickedData);
2413
+ }
2414
+ }
2415
+ PepListComponent.TOP_ITEMS_DEFAULT = 100;
2416
+ PepListComponent.TOP_ITEMS_TABLE = 100;
2417
+ PepListComponent.TOP_ITEMS_THUMBNAILS = 100;
2418
+ PepListComponent.TOP_ITEMS_ARRAY = 2500;
2419
+ PepListComponent.SELECTED_ITEMS_STATE_KEY = 'SelectedItems';
2420
+ PepListComponent.UN_SELECTED_ITEMS_STATE_KEY = 'UnSelectedItems';
2421
+ PepListComponent.ALL_SELECTED_STATE_KEY = 'AllSelected';
2422
+ PepListComponent.SORT_BY_STATE_KEY = 'SortBy';
2423
+ PepListComponent.ASCENDING_STATE_KEY = 'IsAscending';
2424
+ PepListComponent.MINIMUM_COLUMN_WIDTH = 72;
2425
+ PepListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListComponent, deps: [{ token: i0.ElementRef }, { token: i1.PepLayoutService }, { token: i1.PepSessionService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
2426
+ PepListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepListComponent, selector: "pep-list", inputs: { sorting: "sorting", cacheSize: "cacheSize", noDataFoundMsg: "noDataFoundMsg", selectionTypeForActions: "selectionTypeForActions", showCardSelection: "showCardSelection", hideAllSelectionInMulti: "hideAllSelectionInMulti", cardSize: "cardSize", tableViewType: "tableViewType", viewType: "viewType", firstFieldAsLink: "firstFieldAsLink", supportSorting: "supportSorting", supportResizing: "supportResizing", parentScroll: "parentScroll", disabled: "disabled", lockEvents: "lockEvents", lockItemInnerEvents: "lockItemInnerEvents", printMode: "printMode", isReport: "isReport", zebraStripes: "zebraStripes", totalsRow: "totalsRow", pagerType: "pagerType", pageSize: "pageSize", pageIndex: "pageIndex", bufferAmount: "bufferAmount", scrollAnimationTime: "scrollAnimationTime", scrollDebounceTime: "scrollDebounceTime", scrollThrottlingTime: "scrollThrottlingTime", useAsWebComponent: "useAsWebComponent" }, outputs: { itemClick: "itemClick", fieldClick: "fieldClick", valueChange: "valueChange", sortingChange: "sortingChange", selectedItemsChange: "selectedItemsChange", selectedItemChange: "selectedItemChange", selectAllClick: "selectAllClick", listLoad: "listLoad", loadItems: "loadItems", loadPage: "loadPage", startIndexChange: "startIndexChange" }, host: { listeners: { "window:resize": "onWinResize($event)" } }, viewQueries: [{ propertyName: "virtualScroller", first: true, predicate: VirtualScrollerComponent, descendants: true }, { propertyName: "selectAllCB", first: true, predicate: ["selectAllCB"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"totalRows == 0\">\n <ng-container *ngIf=\"noDataFoundMsg; then noDataMsgInputBlock; else noDataMsgDefaultBlock\"></ng-container>\n <ng-template #noDataMsgInputBlock>\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ noDataFoundMsg }}\n </p>\n </div>\n </ng-template>\n <ng-template #noDataMsgDefaultBlock>\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ '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-template>\n</ng-container>\n<ng-container *ngIf=\"totalRows > 0\">\n <ng-container *ngTemplateOutlet=\"tableHeader\"></ng-container>\n\n <!-- (vsChildRectChange)=\"onChildRectChange($event)\" -->\n <virtual-scroller #scroller [items]=\"pagerType === 'pages' ? currentPageItems : items\"\n [scrollDebounceTime]=\"scrollDebounceTime\" [scrollThrottlingTime]=\"scrollThrottlingTime\"\n [bufferAmount]=\"printMode ? totalRows : bufferAmount\" [parentScroll]=\"parentScroll\" [disable]=\"loadingItemsFromApi\"\n class=\"virtual-scroller\" [ngClass]=\"{ 'table-body': isTable, 'cards-body': !isTable }\"\n (vsChange)=\"onVirtualScrollerChange($event)\" >\n <ng-container *ngFor=\"let item of scroller.viewPortItems; let index = index; let isFirst = first;\">\n <ng-container *ngTemplateOutlet=\"listData; context: {item: item, index:index}\"></ng-container>\n </ng-container>\n </virtual-scroller>\n\n <pep-list-pager *ngIf=\"pagerType === 'pages'\" class=\" list-pager\" [disabled]=\"loadingItemsFromApi\"\n [length]=\"totalRows\" [pageSize]=\"pageSize\" [pageIndex]=\"pageIndex\" (pagerChange)=\"onPagerChange($event)\">\n </pep-list-pager>\n\n <ng-container *ngTemplateOutlet=\"tableTotal\"></ng-container>\n</ng-container>\n\n<ng-template #listData let-item=\"item\" let-index=\"index\">\n <ng-container *ngIf=\"isTable\">\n <!-- getIsItemSelected(item) -> item | isItemSelected: selectionTypeForActions : selectedItemId : isAllSelected : selectedItems : unSelectedItems -->\n <div class=\"table-row\" (mouseenter)=\"onTableRowMouseEnter($event, item?.UID, item?.Type)\" \n (mouseleave)=\"onTableRowMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n 'compact-view': tableViewType === 'compact',\n even: zebraStripes && index % 2 !== 0,\n selected: getIsItemSelected(item),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId}\" [ngStyle]=\"{ visibility: !loadingItemsFromApi || item ? 'visible' : 'hidden' }\">\n <fieldset class=\"table-row-fieldset\" [ngStyle]=\"{ 'background-color': item?.BackgroundColor }\">\n <mat-checkbox *ngIf=\"selectionTypeForActions == 'multi'\" type=\"checkbox\"\n class=\"pull-left flip row-selection\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n [disabled]=\"getisItemDisabled(item)\" [ngStyle]=\"{\n visibility: !deviceHasMouse ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId || isAllSelected || selectedItems.size > 0 ? 'visible' : 'hidden'\n }\" [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-checkbox>\n <mat-radio-button *ngIf=\"selectionTypeForActions == 'single'\" name=\"selection\"\n class=\"pull-left flip row-selection pep-radio-button\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n [disabled]=\"getisItemDisabled(item)\"\n [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-radio-button>\n <pep-form [layoutType]=\"'table'\" [checkForChanges]=\"checkForChanges\" [layout]=\"layout\"\n [firstFieldAsLink]=\"firstFieldAsLink\" [data]=\"item\" [canEditObject]=\"!disabled\"\n [lockEvents]=\"lockItemInnerEvents || printMode\" [isReport]=\"isReport\" [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-form>\n </fieldset>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!isTable\">\n <div (mouseenter)=\"onCardMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onCardMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId,\n 'line-view': viewType === 'lines',\n 'card-view': viewType === 'cards',\n 'small-card': cardSize === 'sm'\n }\" class=\"pull-left flip\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: !loadingItemsFromApi || item ? 'visible' : 'hidden' }\">\n <mat-checkbox *ngIf=\"showCardSelection\" class=\"pull-left flip card-selection\"\n [disabled]=\"getisItemDisabled(item)\" [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-checkbox>\n <pep-form [layoutType]=\"'card'\" [firstFieldAsLink]=\"firstFieldAsLink\" [checkForChanges]=\"checkForChanges\"\n [layout]=\"layout\" [data]=\"item\" [canEditObject]=\"!disabled\"\n [lockEvents]=\"lockItemInnerEvents || printMode\" [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-form>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tableHeader>\n <div *ngIf=\"isTable\" 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 <mat-checkbox *ngIf=\"selectionTypeForActions !== 'none'\" #selectAllCB class=\"pull-left flip row-selection\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n type=\"checkbox\" [ngStyle]=\"{\n visibility:\n selectionTypeForActions == 'single' || \n (selectionTypeForActions == 'multi' && hideAllSelectionInMulti) ? 'hidden' : 'visible'\n }\"\n [indeterminate]=\"isAllSelected ? unSelectedItems.size > 0 && unSelectedItems.size < totalRows : (selectedItems.size > 0 && !getIsAllSelectedForActions())\"\n [disabled]=\"disabled || selectionTypeForActions === 'single'\" [checked]=\"getIsAllSelectedForActions()\"\n (change)=\"selectAllItemsForActions($event)\"></mat-checkbox>\n <fieldset>\n <div *ngFor=\"let field of layout?.ControlFields; let j = index\" class=\"header-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\" [ngClass]=\"{\n 'compact-view': tableViewType === 'compact',\n 'support-sorting': supportSorting,\n 'has-sorting': field.ApiName === sortBy,\n 'is-resizing': field.ApiName === pressedColumn,\n 'is-first': j === 0 && selectionTypeForActions !== 'multi',\n 'is-last': j === layout?.ControlFields?.length - 1\n }\"\n (click)=\"supportSorting ? (onListSortingChange(field.ApiName, sortBy !== null && sortBy != field.ApiName ? true : !isAsc, $event)) : false\">\n\n <label id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip text-align-{{ field.Layout.XAlignment }}\"\n title=\"{{ field.Title }}\">\n <span *ngIf=\"field.Mandatory\" class=\"mandatory\">\n <pep-icon name=\"system_must\"></pep-icon>\n </span>\n {{ field.Title != '' ? field.Title : ' '}}\n </label>\n\n <div *ngIf=\"supportResizing\" class=\"resize-box pull-right flip\"\n (mousedown)=\"onListResizeStart($event, field.ApiName, j)\">\n <div class=\"splitter\"></div>\n </div>\n\n <div *ngIf=\"supportSorting\" class=\"sorting-box pull-left flip\"\n [ngClass]=\"{ 'has-sorting': field.ApiName === sortBy }\">\n <mat-icon *ngIf=\"field.ApiName !== sortBy\">\n <pep-icon name=\"arrow_either\" class=\"asc\"></pep-icon>\n </mat-icon>\n <ng-container *ngIf=\"field.ApiName === sortBy\">\n <mat-icon *ngIf=\"!isAsc\" [ngClass]=\"{ 'sort-by': field.ApiName === sortBy && isAsc }\"\n title=\"{{ 'LIST.SORT_ASC' | translate }}\">\n <pep-icon name=\"arrow_up\" class=\"asc\"></pep-icon>\n </mat-icon>\n <mat-icon *ngIf=\"isAsc\" [ngClass]=\"{ 'sort-by': field.ApiName === sortBy && !isAsc }\"\n title=\"{{ 'LIST.SORT_DESC' | translate }}\">\n <pep-icon name=\"arrow_down\" class=\"desc\"></pep-icon>\n </mat-icon>\n </ng-container>\n </div>\n </div>\n </fieldset>\n </fieldset>\n </div>\n</ng-template>\n\n<ng-template #tableTotal>\n <div *ngIf=\"isTable && totalsRow?.length > 0 && totalsRow.length <= layout?.ControlFields.length\"\n class=\"table-total\">\n <fieldset class=\"table-header-fieldset\">\n <div *ngFor=\"let field of layout?.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:flex;flex-direction:column}.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)}.virtual-scroller{min-height:5rem;height:inherit}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i4$1.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i7.PepFormComponent, selector: "pep-form", inputs: ["isInternal", "isReport", "layout", "lockEvents", "canEditObject", "data", "lockFields", "isActive", "layoutType", "objectId", "parentId", "searchCode", "showTitle", "firstFieldAsLink", "checkForChanges"], outputs: ["valueChange", "formValidationChange", "fieldClick", "internalFormFieldClick", "internalFormFieldChange"] }, { kind: "component", type: VirtualScrollerComponent, selector: "virtual-scroller,[virtualScroller]", inputs: ["disable", "executeRefreshOutsideAngularZone", "enableUnequalChildrenSizes", "RTL", "useMarginInsteadOfTranslate", "modifyOverflowStyleOfParentScroll", "stripedTable", "scrollbarWidth", "scrollbarHeight", "childWidth", "childHeight", "ssrChildWidth", "ssrChildHeight", "ssrViewportWidth", "ssrViewportHeight", "bufferAmount", "scrollAnimationTime", "resizeBypassRefreshThreshold", "scrollThrottlingTime", "scrollDebounceTime", "checkResizeInterval", "items", "compareItems", "horizontal", "parentScroll"], outputs: ["vsChildRectChange", "vsUpdate", "vsChange", "vsStart", "vsEnd"], exportAs: ["virtualScroller"] }, { kind: "component", type: PepListPagerComponent, selector: "pep-list-pager", inputs: ["disabled", "pageIndex", "length", "pageSize"], outputs: ["pagerChange"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
2427
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListComponent, decorators: [{
2428
+ type: Component,
2429
+ args: [{ selector: 'pep-list', host: {
2430
+ '(window:resize)': 'onWinResize($event)',
2431
+ }, template: "<ng-container *ngIf=\"totalRows == 0\">\n <ng-container *ngIf=\"noDataFoundMsg; then noDataMsgInputBlock; else noDataMsgDefaultBlock\"></ng-container>\n <ng-template #noDataMsgInputBlock>\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ noDataFoundMsg }}\n </p>\n </div>\n </ng-template>\n <ng-template #noDataMsgDefaultBlock>\n <div class=\"pep-border-bottom\">\n <p class=\"title-xl no-data\">\n {{ '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-template>\n</ng-container>\n<ng-container *ngIf=\"totalRows > 0\">\n <ng-container *ngTemplateOutlet=\"tableHeader\"></ng-container>\n\n <!-- (vsChildRectChange)=\"onChildRectChange($event)\" -->\n <virtual-scroller #scroller [items]=\"pagerType === 'pages' ? currentPageItems : items\"\n [scrollDebounceTime]=\"scrollDebounceTime\" [scrollThrottlingTime]=\"scrollThrottlingTime\"\n [bufferAmount]=\"printMode ? totalRows : bufferAmount\" [parentScroll]=\"parentScroll\" [disable]=\"loadingItemsFromApi\"\n class=\"virtual-scroller\" [ngClass]=\"{ 'table-body': isTable, 'cards-body': !isTable }\"\n (vsChange)=\"onVirtualScrollerChange($event)\" >\n <ng-container *ngFor=\"let item of scroller.viewPortItems; let index = index; let isFirst = first;\">\n <ng-container *ngTemplateOutlet=\"listData; context: {item: item, index:index}\"></ng-container>\n </ng-container>\n </virtual-scroller>\n\n <pep-list-pager *ngIf=\"pagerType === 'pages'\" class=\" list-pager\" [disabled]=\"loadingItemsFromApi\"\n [length]=\"totalRows\" [pageSize]=\"pageSize\" [pageIndex]=\"pageIndex\" (pagerChange)=\"onPagerChange($event)\">\n </pep-list-pager>\n\n <ng-container *ngTemplateOutlet=\"tableTotal\"></ng-container>\n</ng-container>\n\n<ng-template #listData let-item=\"item\" let-index=\"index\">\n <ng-container *ngIf=\"isTable\">\n <!-- getIsItemSelected(item) -> item | isItemSelected: selectionTypeForActions : selectedItemId : isAllSelected : selectedItems : unSelectedItems -->\n <div class=\"table-row\" (mouseenter)=\"onTableRowMouseEnter($event, item?.UID, item?.Type)\" \n (mouseleave)=\"onTableRowMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n 'compact-view': tableViewType === 'compact',\n even: zebraStripes && index % 2 !== 0,\n selected: getIsItemSelected(item),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId}\" [ngStyle]=\"{ visibility: !loadingItemsFromApi || item ? 'visible' : 'hidden' }\">\n <fieldset class=\"table-row-fieldset\" [ngStyle]=\"{ 'background-color': item?.BackgroundColor }\">\n <mat-checkbox *ngIf=\"selectionTypeForActions == 'multi'\" type=\"checkbox\"\n class=\"pull-left flip row-selection\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n [disabled]=\"getisItemDisabled(item)\" [ngStyle]=\"{\n visibility: !deviceHasMouse ||\n item?.UID + SEPARATOR + item?.Type === hoveredItemId || isAllSelected || selectedItems.size > 0 ? 'visible' : 'hidden'\n }\" [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-checkbox>\n <mat-radio-button *ngIf=\"selectionTypeForActions == 'single'\" name=\"selection\"\n class=\"pull-left flip row-selection pep-radio-button\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n [disabled]=\"getisItemDisabled(item)\"\n [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-radio-button>\n <pep-form [layoutType]=\"'table'\" [checkForChanges]=\"checkForChanges\" [layout]=\"layout\"\n [firstFieldAsLink]=\"firstFieldAsLink\" [data]=\"item\" [canEditObject]=\"!disabled\"\n [lockEvents]=\"lockItemInnerEvents || printMode\" [isReport]=\"isReport\" [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-form>\n </fieldset>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!isTable\">\n <div (mouseenter)=\"onCardMouseEnter($event, item?.UID, item?.Type)\"\n (mouseleave)=\"onCardMouseLeave($event, item?.UID, item?.Type)\" [ngClass]=\"{\n selected: getIsItemSelected(item),\n highlighted: item?.UID + SEPARATOR + item?.Type === selectedItemId,\n 'line-view': viewType === 'lines',\n 'card-view': viewType === 'cards',\n 'small-card': cardSize === 'sm'\n }\" class=\"pull-left flip\"\n [ngStyle]=\"{ height: calculatedObjectHeight, visibility: !loadingItemsFromApi || item ? 'visible' : 'hidden' }\">\n <mat-checkbox *ngIf=\"showCardSelection\" class=\"pull-left flip card-selection\"\n [disabled]=\"getisItemDisabled(item)\" [checked]=\"getIsItemSelected(item)\"\n (change)=\"selectItemForActions($event, item?.UID, item?.IsSelectableForActions, item?.Type)\">\n </mat-checkbox>\n <pep-form [layoutType]=\"'card'\" [firstFieldAsLink]=\"firstFieldAsLink\" [checkForChanges]=\"checkForChanges\"\n [layout]=\"layout\" [data]=\"item\" [canEditObject]=\"!disabled\"\n [lockEvents]=\"lockItemInnerEvents || printMode\" [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-form>\n </div>\n </ng-container>\n</ng-template>\n\n<ng-template #tableHeader>\n <div *ngIf=\"isTable\" 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 <mat-checkbox *ngIf=\"selectionTypeForActions !== 'none'\" #selectAllCB class=\"pull-left flip row-selection\" [ngClass]=\"{ 'md': tableViewType === 'compact' }\"\n type=\"checkbox\" [ngStyle]=\"{\n visibility:\n selectionTypeForActions == 'single' || \n (selectionTypeForActions == 'multi' && hideAllSelectionInMulti) ? 'hidden' : 'visible'\n }\"\n [indeterminate]=\"isAllSelected ? unSelectedItems.size > 0 && unSelectedItems.size < totalRows : (selectedItems.size > 0 && !getIsAllSelectedForActions())\"\n [disabled]=\"disabled || selectionTypeForActions === 'single'\" [checked]=\"getIsAllSelectedForActions()\"\n (change)=\"selectAllItemsForActions($event)\"></mat-checkbox>\n <fieldset>\n <div *ngFor=\"let field of layout?.ControlFields; let j = index\" class=\"header-column pull-left flip\"\n [ngStyle]=\"{ width: field.calcTitleColumnWidthString }\" [ngClass]=\"{\n 'compact-view': tableViewType === 'compact',\n 'support-sorting': supportSorting,\n 'has-sorting': field.ApiName === sortBy,\n 'is-resizing': field.ApiName === pressedColumn,\n 'is-first': j === 0 && selectionTypeForActions !== 'multi',\n 'is-last': j === layout?.ControlFields?.length - 1\n }\"\n (click)=\"supportSorting ? (onListSortingChange(field.ApiName, sortBy !== null && sortBy != field.ApiName ? true : !isAsc, $event)) : false\">\n\n <label id=\"{{ field.ApiName }}\"\n class=\"header-label body-sm pull-left flip text-align-{{ field.Layout.XAlignment }}\"\n title=\"{{ field.Title }}\">\n <span *ngIf=\"field.Mandatory\" class=\"mandatory\">\n <pep-icon name=\"system_must\"></pep-icon>\n </span>\n {{ field.Title != '' ? field.Title : ' '}}\n </label>\n\n <div *ngIf=\"supportResizing\" class=\"resize-box pull-right flip\"\n (mousedown)=\"onListResizeStart($event, field.ApiName, j)\">\n <div class=\"splitter\"></div>\n </div>\n\n <div *ngIf=\"supportSorting\" class=\"sorting-box pull-left flip\"\n [ngClass]=\"{ 'has-sorting': field.ApiName === sortBy }\">\n <mat-icon *ngIf=\"field.ApiName !== sortBy\">\n <pep-icon name=\"arrow_either\" class=\"asc\"></pep-icon>\n </mat-icon>\n <ng-container *ngIf=\"field.ApiName === sortBy\">\n <mat-icon *ngIf=\"!isAsc\" [ngClass]=\"{ 'sort-by': field.ApiName === sortBy && isAsc }\"\n title=\"{{ 'LIST.SORT_ASC' | translate }}\">\n <pep-icon name=\"arrow_up\" class=\"asc\"></pep-icon>\n </mat-icon>\n <mat-icon *ngIf=\"isAsc\" [ngClass]=\"{ 'sort-by': field.ApiName === sortBy && !isAsc }\"\n title=\"{{ 'LIST.SORT_DESC' | translate }}\">\n <pep-icon name=\"arrow_down\" class=\"desc\"></pep-icon>\n </mat-icon>\n </ng-container>\n </div>\n </div>\n </fieldset>\n </fieldset>\n </div>\n</ng-template>\n\n<ng-template #tableTotal>\n <div *ngIf=\"isTable && totalsRow?.length > 0 && totalsRow.length <= layout?.ControlFields.length\"\n class=\"table-total\">\n <fieldset class=\"table-header-fieldset\">\n <div *ngFor=\"let field of layout?.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:flex;flex-direction:column}.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)}.virtual-scroller{min-height:5rem;height:inherit}\n"] }]
2432
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.PepLayoutService }, { type: i1.PepSessionService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { sorting: [{
2433
+ type: Input
2434
+ }], cacheSize: [{
2435
+ type: Input
2436
+ }], noDataFoundMsg: [{
2437
+ type: Input
2438
+ }], selectionTypeForActions: [{
2439
+ type: Input
2440
+ }], showCardSelection: [{
2441
+ type: Input
2442
+ }], hideAllSelectionInMulti: [{
2443
+ type: Input
2444
+ }], cardSize: [{
2445
+ type: Input
2446
+ }], tableViewType: [{
2447
+ type: Input
2448
+ }], viewType: [{
2449
+ type: Input
2450
+ }], firstFieldAsLink: [{
2451
+ type: Input
2452
+ }], supportSorting: [{
2453
+ type: Input
2454
+ }], supportResizing: [{
2455
+ type: Input
2456
+ }], parentScroll: [{
2457
+ type: Input
2458
+ }], disabled: [{
2459
+ type: Input
2460
+ }], lockEvents: [{
2461
+ type: Input
2462
+ }], lockItemInnerEvents: [{
2463
+ type: Input
2464
+ }], printMode: [{
2465
+ type: Input
2466
+ }], isReport: [{
2467
+ type: Input
2468
+ }], zebraStripes: [{
2469
+ type: Input
2470
+ }], totalsRow: [{
2471
+ type: Input
2472
+ }], pagerType: [{
2473
+ type: Input
2474
+ }], pageSize: [{
2475
+ type: Input
2476
+ }], pageIndex: [{
2477
+ type: Input
2478
+ }], bufferAmount: [{
2479
+ type: Input
2480
+ }], scrollAnimationTime: [{
2481
+ type: Input
2482
+ }], scrollDebounceTime: [{
2483
+ type: Input
2484
+ }], scrollThrottlingTime: [{
2485
+ type: Input
2486
+ }], useAsWebComponent: [{
2487
+ type: Input
2488
+ }], itemClick: [{
2489
+ type: Output
2490
+ }], fieldClick: [{
2491
+ type: Output
2492
+ }], valueChange: [{
2493
+ type: Output
2494
+ }], sortingChange: [{
2495
+ type: Output
2496
+ }], selectedItemsChange: [{
2497
+ type: Output
2498
+ }], selectedItemChange: [{
2499
+ type: Output
2500
+ }], selectAllClick: [{
2501
+ type: Output
2502
+ }], listLoad: [{
2503
+ type: Output
2504
+ }], loadItems: [{
2505
+ type: Output
2506
+ }], loadPage: [{
2507
+ type: Output
2508
+ }], startIndexChange: [{
2509
+ type: Output
2510
+ }], virtualScroller: [{
2511
+ type: ViewChild,
2512
+ args: [VirtualScrollerComponent]
2513
+ }], selectAllCB: [{
2514
+ type: ViewChild,
2515
+ args: ['selectAllCB']
2516
+ }] } });
2517
+
2518
+ class PepListActionsComponent {
2519
+ constructor() {
2520
+ this.actions = null;
2521
+ this.sizeType = 'md';
2522
+ this.xPosition = 'before';
2523
+ this.hidden = false;
2524
+ this.actionClick = new EventEmitter();
2525
+ this.stateChange = new EventEmitter();
2526
+ this.menuClick = new EventEmitter();
2527
+ }
2528
+ onActionClicked(action) {
2529
+ this.actionClick.emit(action);
2530
+ }
2531
+ onStateChanged(menuStateChangeEvent) {
2532
+ this.stateChange.emit(menuStateChangeEvent);
2533
+ }
2534
+ }
2535
+ PepListActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2536
+ PepListActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepListActionsComponent, selector: "pep-list-actions", inputs: { actions: "actions", sizeType: "sizeType", xPosition: "xPosition", hidden: "hidden" }, outputs: { actionClick: "actionClick", stateChange: "stateChange", menuClick: "menuClick" }, ngImport: i0, template: "<pep-menu [xPosition]=\"xPosition\" [styleType]=\"'strong'\" [sizeType]=\"sizeType\" [items]=\"!hidden ? actions : null\"\n [hideOnEmptyItems]=\"true\" [iconName]=\"'system_edit'\" (menuItemClick)=\"onActionClicked($event)\"\n (stateChange)=\"onStateChanged($event)\" (menuClick)=\"menuClick.emit();\">\n</pep-menu>\n", styles: [""], dependencies: [{ kind: "component", type: i1$1.PepMenuComponent, selector: "pep-menu", inputs: ["text", "iconName", "type", "styleType", "sizeType", "classNames", "xPosition", "hideOnEmptyItems", "items", "selectedItem", "disabled"], outputs: ["stateChange", "menuItemClick", "menuClick"] }] });
2537
+ PepListActionsComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListActionsComponent });
2538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListActionsComponent, decorators: [{
2539
+ type: Component,
2540
+ args: [{ selector: 'pep-list-actions', template: "<pep-menu [xPosition]=\"xPosition\" [styleType]=\"'strong'\" [sizeType]=\"sizeType\" [items]=\"!hidden ? actions : null\"\n [hideOnEmptyItems]=\"true\" [iconName]=\"'system_edit'\" (menuItemClick)=\"onActionClicked($event)\"\n (stateChange)=\"onStateChanged($event)\" (menuClick)=\"menuClick.emit();\">\n</pep-menu>\n" }]
2541
+ }, {
2542
+ type: Injectable
2543
+ }], propDecorators: { actions: [{
2544
+ type: Input
2545
+ }], sizeType: [{
2546
+ type: Input
2547
+ }], xPosition: [{
2548
+ type: Input
2549
+ }], hidden: [{
2550
+ type: Input
2551
+ }], actionClick: [{
2552
+ type: Output
2553
+ }], stateChange: [{
2554
+ type: Output
2555
+ }], menuClick: [{
2556
+ type: Output
2557
+ }] } });
2558
+
2559
+ class PepListCarouselComponent {
2560
+ // deviceHasMouse = false;
2561
+ constructor(layoutService) {
2562
+ this.layoutService = layoutService;
2563
+ this.duration = 1000;
2564
+ this.layout = null;
2565
+ this.itemsToMove = 3;
2566
+ this.lockItemInnerEvents = true;
2567
+ this.hideArrowsInSmallScreen = true;
2568
+ this._items = null;
2569
+ this._itemSize = 'xs';
2570
+ this.itemClick = new EventEmitter();
2571
+ this.prevDisabled = false;
2572
+ this.nextDisabled = false;
2573
+ this.PepScreenSizeType = PepScreenSizeType;
2574
+ // this.deviceHasMouse = this.layoutService.getDeviceHasMouse();
2575
+ }
2576
+ set items(value) {
2577
+ this._items = value;
2578
+ this.moveTo(0);
2579
+ }
2580
+ get items() {
2581
+ return this._items;
2582
+ }
2583
+ set itemSize(value) {
2584
+ this._itemSize = value;
2585
+ this.moveTo(0);
2586
+ }
2587
+ get itemSize() {
2588
+ return this._itemSize;
2589
+ }
2590
+ ngAfterViewInit() {
2591
+ this.layoutService.onResize$.subscribe((size) => {
2592
+ this.screenSize = size;
2593
+ });
2594
+ // this.layoutService.onMouseOver$.subscribe((deviceHasMouse: boolean) => {
2595
+ // this.deviceHasMouse = deviceHasMouse;
2596
+ // });
2597
+ }
2598
+ ngOnDestroy() {
2599
+ // if (this.itemClick) {
2600
+ // this.itemClick.unsubscribe();
2601
+ // }
2602
+ }
2603
+ itemClicked(item) {
2604
+ this.itemClick.emit({ source: item });
2605
+ }
2606
+ moveLeft() {
2607
+ // this.carousel.moveLeft();
2608
+ const indexToMove = Math.max(this.carousel.currIndex - this.itemsToMove, 0);
2609
+ this.moveTo(indexToMove);
2610
+ }
2611
+ moveRight() {
2612
+ // this.carousel.moveRight();
2613
+ const indexToMove = Math.min(this.carousel.currIndex + this.itemsToMove, this.items.length);
2614
+ this.moveTo(indexToMove);
2615
+ }
2616
+ moveTo(index) {
2617
+ if (this.carousel) {
2618
+ this.carousel.moveTo(index);
2619
+ }
2620
+ }
2621
+ onReachesLeftBound(event) {
2622
+ this.prevDisabled = event;
2623
+ }
2624
+ onReachesRightBound(event) {
2625
+ this.nextDisabled = event;
2626
+ }
2627
+ }
2628
+ PepListCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListCarouselComponent, deps: [{ token: i1.PepLayoutService }], target: i0.ɵɵFactoryTarget.Component });
2629
+ PepListCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepListCarouselComponent, selector: "pep-list-carousel", inputs: { duration: "duration", layout: "layout", itemsToMove: "itemsToMove", lockItemInnerEvents: "lockItemInnerEvents", hideArrowsInSmallScreen: "hideArrowsInSmallScreen", items: "items", itemSize: "itemSize" }, outputs: { itemClick: "itemClick" }, 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=\"!(hideArrowsInSmallScreen && screenSize > PepScreenSizeType.SM)\"\n [iconName]=\"'arrow_left_alt'\" [styleType]=\"'regular'\" [disabled]=\"prevDisabled\" (click)=\"moveLeft()\"\n class=\"carousel-arrow start-arrow\">\n </pep-button>\n <pep-carousel #carousel [xWheelEnabled]=\"false\" [snapDuration]=\"duration\"\n (reachesLeftBound)=\"onReachesLeftBound($event)\" (reachesRightBound)=\"onReachesRightBound($event)\">\n <ng-container *ngFor=\"let item of items\">\n <pep-form pepCarouselItem [layout]=\"layout\" [data]=\"item\" [layoutType]=\"'card'\"\n (click)=\"itemClicked(item)\" class=\"card-view \" [lockEvents]=\"lockItemInnerEvents\"\n [ngClass]=\"{ 'x-small-card': itemSize === 'xs', 'small-card': itemSize === 'sm'}\">\n </pep-form>\n </ng-container>\n </pep-carousel>\n <pep-button *ngIf=\"!(hideArrowsInSmallScreen && screenSize > PepScreenSizeType.SM)\"\n [iconName]=\"'arrow_right_alt'\" [styleType]=\"'regular'\" [disabled]=\"nextDisabled\" (click)=\"moveRight()\"\n class=\"carousel-arrow end-arrow\">\n </pep-button>\n </ng-template>\n</div>", styles: [".carousel-container{position:relative;margin:0 calc(var(--pep-spacing-sm, .5rem) * -1);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: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$2.PepButtonComponent, selector: "pep-button", inputs: ["key", "value", "styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconName", "iconPosition", "visible"], outputs: ["buttonClick"] }, { kind: "component", type: i4$2.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: i4$2.PepCarouselItemDirective, selector: "[pepCarouselItem]", inputs: ["dragDisabled"] }, { kind: "component", type: i7.PepFormComponent, selector: "pep-form", inputs: ["isInternal", "isReport", "layout", "lockEvents", "canEditObject", "data", "lockFields", "isActive", "layoutType", "objectId", "parentId", "searchCode", "showTitle", "firstFieldAsLink", "checkForChanges"], outputs: ["valueChange", "formValidationChange", "fieldClick", "internalFormFieldClick", "internalFormFieldChange"] }] });
2630
+ PepListCarouselComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListCarouselComponent });
2631
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListCarouselComponent, decorators: [{
2632
+ type: Component,
2633
+ args: [{ selector: 'pep-list-carousel', 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=\"!(hideArrowsInSmallScreen && screenSize > PepScreenSizeType.SM)\"\n [iconName]=\"'arrow_left_alt'\" [styleType]=\"'regular'\" [disabled]=\"prevDisabled\" (click)=\"moveLeft()\"\n class=\"carousel-arrow start-arrow\">\n </pep-button>\n <pep-carousel #carousel [xWheelEnabled]=\"false\" [snapDuration]=\"duration\"\n (reachesLeftBound)=\"onReachesLeftBound($event)\" (reachesRightBound)=\"onReachesRightBound($event)\">\n <ng-container *ngFor=\"let item of items\">\n <pep-form pepCarouselItem [layout]=\"layout\" [data]=\"item\" [layoutType]=\"'card'\"\n (click)=\"itemClicked(item)\" class=\"card-view \" [lockEvents]=\"lockItemInnerEvents\"\n [ngClass]=\"{ 'x-small-card': itemSize === 'xs', 'small-card': itemSize === 'sm'}\">\n </pep-form>\n </ng-container>\n </pep-carousel>\n <pep-button *ngIf=\"!(hideArrowsInSmallScreen && screenSize > PepScreenSizeType.SM)\"\n [iconName]=\"'arrow_right_alt'\" [styleType]=\"'regular'\" [disabled]=\"nextDisabled\" (click)=\"moveRight()\"\n class=\"carousel-arrow end-arrow\">\n </pep-button>\n </ng-template>\n</div>", styles: [".carousel-container{position:relative;margin:0 calc(var(--pep-spacing-sm, .5rem) * -1);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"] }]
2634
+ }, {
2635
+ type: Injectable
2636
+ }], ctorParameters: function () { return [{ type: i1.PepLayoutService }]; }, propDecorators: { duration: [{
2637
+ type: Input
2638
+ }], layout: [{
2639
+ type: Input
2640
+ }], itemsToMove: [{
2641
+ type: Input
2642
+ }], lockItemInnerEvents: [{
2643
+ type: Input
2644
+ }], hideArrowsInSmallScreen: [{
2645
+ type: Input
2646
+ }], items: [{
2647
+ type: Input
2648
+ }], itemSize: [{
2649
+ type: Input
2650
+ }], itemClick: [{
2651
+ type: Output
2652
+ }], carousel: [{
2653
+ type: ViewChild,
2654
+ args: ['carousel', { read: PepCarouselComponent }]
2655
+ }] } });
2656
+
2657
+ class IPepListChooserOption {
2658
+ }
2659
+ class PepListChooserComponent {
2660
+ constructor() {
2661
+ this._options = null;
2662
+ this._currentList = null;
2663
+ this.sizeType = 'md';
2664
+ this.change = new EventEmitter();
2665
+ this.breadCrumbsItems = null;
2666
+ this.menuItems = null;
2667
+ this.currentItem = null;
2668
+ }
2669
+ set options(value) {
2670
+ var _a;
2671
+ this._options = value;
2672
+ this.menuItems = value.map((opt) => {
2673
+ return { key: opt.key, text: opt.text };
2674
+ });
2675
+ if (((_a = this.menuItems) === null || _a === void 0 ? void 0 : _a.length) === 1) {
2676
+ this.breadCrumbsItems = [];
2677
+ this.breadCrumbsItems.push(new PepBreadCrumbItem({
2678
+ key: this.menuItems[0].key,
2679
+ text: this.menuItems[0].text,
2680
+ }));
2681
+ }
2682
+ }
2683
+ get options() {
2684
+ return this._options;
2685
+ }
2686
+ set currentList(value) {
2687
+ this._currentList = value;
2688
+ this.currentItem = this.menuItems.find((mi) => mi.key === value.key);
2689
+ }
2690
+ get currentList() {
2691
+ return this._currentList;
2692
+ }
2693
+ onMenuItemClicked(menuItemClickEvent) {
2694
+ this.currentList = this.options.find((list) => list.key === menuItemClickEvent.source.key);
2695
+ this.change.emit({ source: this.currentList });
2696
+ }
2697
+ }
2698
+ PepListChooserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListChooserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2699
+ PepListChooserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepListChooserComponent, selector: "pep-list-chooser", inputs: { options: "options", currentList: "currentList", sizeType: "sizeType" }, outputs: { change: "change" }, ngImport: i0, template: "<ng-container *ngIf=\"menuItems?.length > 1\">\n <pep-menu [type]=\"'select'\" [sizeType]=\"sizeType\" [items]=\"menuItems\" [selectedItem]=\"currentItem\"\n [iconName]=\"'arrow_down'\" (menuItemClick)=\"onMenuItemClicked($event)\"></pep-menu>\n</ng-container>\n<ng-container *ngIf=\"menuItems?.length == 1\">\n <pep-bread-crumbs [items]=\"breadCrumbsItems\" [addSpacing]=\"true\"></pep-bread-crumbs>\n</ng-container>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.PepBreadCrumbsComponent, selector: "pep-bread-crumbs", inputs: ["items", "displayType", "addSpacing"], outputs: ["itemClick"] }, { kind: "component", type: i1$1.PepMenuComponent, selector: "pep-menu", inputs: ["text", "iconName", "type", "styleType", "sizeType", "classNames", "xPosition", "hideOnEmptyItems", "items", "selectedItem", "disabled"], outputs: ["stateChange", "menuItemClick", "menuClick"] }] });
2700
+ PepListChooserComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListChooserComponent });
2701
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListChooserComponent, decorators: [{
2702
+ type: Component,
2703
+ args: [{ selector: 'pep-list-chooser', template: "<ng-container *ngIf=\"menuItems?.length > 1\">\n <pep-menu [type]=\"'select'\" [sizeType]=\"sizeType\" [items]=\"menuItems\" [selectedItem]=\"currentItem\"\n [iconName]=\"'arrow_down'\" (menuItemClick)=\"onMenuItemClicked($event)\"></pep-menu>\n</ng-container>\n<ng-container *ngIf=\"menuItems?.length == 1\">\n <pep-bread-crumbs [items]=\"breadCrumbsItems\" [addSpacing]=\"true\"></pep-bread-crumbs>\n</ng-container>" }]
2704
+ }, {
2705
+ type: Injectable
2706
+ }], propDecorators: { options: [{
2707
+ type: Input
2708
+ }], currentList: [{
2709
+ type: Input
2710
+ }], sizeType: [{
2711
+ type: Input
2712
+ }], change: [{
2713
+ type: Output
2714
+ }] } });
2715
+
2716
+ class IPepListSortingOption {
2717
+ }
2718
+ class PepListSortingComponent {
2719
+ constructor() {
2720
+ this._options = null;
2721
+ this._currentSorting = null;
2722
+ this.sizeType = 'md';
2723
+ this.change = new EventEmitter();
2724
+ this.menuItems = null;
2725
+ this.currentItem = null;
2726
+ }
2727
+ set options(value) {
2728
+ this._options = value;
2729
+ this.menuItems = value.map((opt) => {
2730
+ return { key: opt.sortBy, text: opt.title, iconName: opt.iconName };
2731
+ });
2732
+ }
2733
+ get options() {
2734
+ return this._options;
2735
+ }
2736
+ set currentSorting(value) {
2737
+ this._currentSorting = value;
2738
+ this.currentItem = this.menuItems.find((mi) => mi.key === value.sortBy);
2739
+ }
2740
+ get currentSorting() {
2741
+ return this._currentSorting;
2742
+ }
2743
+ ngOnInit() {
2744
+ if (this.currentSorting === null &&
2745
+ this.options &&
2746
+ this.options.length > 0) {
2747
+ this.currentSorting = this.options[0];
2748
+ }
2749
+ }
2750
+ onMenuItemClicked(menuItemClickEvent) {
2751
+ this.currentSorting = this.options.find((sorting) => sorting.sortBy === menuItemClickEvent.source.key);
2752
+ this.change.emit({ source: this.currentSorting });
2753
+ }
2754
+ }
2755
+ PepListSortingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListSortingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2756
+ PepListSortingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepListSortingComponent, selector: "pep-list-sorting", inputs: { options: "options", currentSorting: "currentSorting", sizeType: "sizeType" }, outputs: { change: "change" }, ngImport: i0, template: "<div class=\"sorting-container\">\n <div class=\"body-xs sort-by\">\n <span>{{ 'LIST.SORT_BY' | translate }}</span>\n </div>\n <pep-menu [type]=\"'select'\" [sizeType]=\"sizeType\" [items]=\"menuItems\" [selectedItem]=\"currentItem\"\n [iconName]=\"'arrow_down'\" (menuItemClick)=\"onMenuItemClicked($event)\"></pep-menu>\n</div>", styles: [".sorting-container{display:flex;align-items:center}.sorting-container .sort-by{margin-inline-end:var(--pep-spacing-sm, .5rem)}\n"], dependencies: [{ kind: "component", type: i1$1.PepMenuComponent, selector: "pep-menu", inputs: ["text", "iconName", "type", "styleType", "sizeType", "classNames", "xPosition", "hideOnEmptyItems", "items", "selectedItem", "disabled"], outputs: ["stateChange", "menuItemClick", "menuClick"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
2757
+ PepListSortingComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListSortingComponent });
2758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListSortingComponent, decorators: [{
2759
+ type: Component,
2760
+ args: [{ selector: 'pep-list-sorting', template: "<div class=\"sorting-container\">\n <div class=\"body-xs sort-by\">\n <span>{{ 'LIST.SORT_BY' | translate }}</span>\n </div>\n <pep-menu [type]=\"'select'\" [sizeType]=\"sizeType\" [items]=\"menuItems\" [selectedItem]=\"currentItem\"\n [iconName]=\"'arrow_down'\" (menuItemClick)=\"onMenuItemClicked($event)\"></pep-menu>\n</div>", styles: [".sorting-container{display:flex;align-items:center}.sorting-container .sort-by{margin-inline-end:var(--pep-spacing-sm, .5rem)}\n"] }]
2761
+ }, {
2762
+ type: Injectable
2763
+ }], propDecorators: { options: [{
2764
+ type: Input
2765
+ }], currentSorting: [{
2766
+ type: Input
2767
+ }], sizeType: [{
2768
+ type: Input
2769
+ }], change: [{
2770
+ type: Output
2771
+ }] } });
2772
+
2773
+ class PepListTotalComponent {
2774
+ constructor() {
2775
+ this.totalRows = -1;
2776
+ this.totalAmount = -1;
2777
+ this.isMapView = false;
2778
+ this.sizeType = 'md';
2779
+ }
2780
+ }
2781
+ PepListTotalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListTotalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2782
+ PepListTotalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepListTotalComponent, selector: "pep-list-total", inputs: { totalRows: "totalRows", totalAmount: "totalAmount", isMapView: "isMapView", sizeType: "sizeType" }, ngImport: i0, template: "<div class=\"total-items-container\">\n <ng-container *ngIf=\"isMapView; then mapTemplate; else notMapTemplate\"></ng-container>\n\n <ng-template #notMapTemplate>\n <ng-container *ngIf=\"totalRows >= 0\">\n <div class=\"body-{{sizeType}} total-items color-dimmed\"\n [innerHtml]=\"(totalRows === 1 ? 'LIST.TOTAL_RESULT' : 'LIST.TOTAL_RESULTS') | translate: { totalRows: totalRows }\">\n </div>\n </ng-container>\n <ng-container *ngIf=\"totalAmount > 0\"> {{ 'LIST.TOTAL_OF' | translate }} {{ totalAmount }} </ng-container>\n </ng-template>\n\n <ng-template #mapTemplate>\n <ng-container *ngIf=\"totalAmount >= 0\">\n </ng-container>\n <ng-container *ngIf=\"totalRows >= 0\">\n <div class=\"body-{{sizeType}} total-items color-dimmed\"\n [innerHtml]=\"(totalRows === 1 ? 'LIST.TOTAL_RESULT_OUT_OF_RESULT' : 'LIST.TOTAL_RESULTS_OUT_OF') | translate: { xRows: totalAmount, totalRows: totalRows }\">\n </div>\n </ng-container>\n </ng-template>\n</div>", styles: [":host{height:inherit}.total-items-container{height:100%;display:flex;align-items:center}\n", ""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
2783
+ PepListTotalComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListTotalComponent });
2784
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListTotalComponent, decorators: [{
2785
+ type: Component,
2786
+ args: [{ selector: 'pep-list-total', template: "<div class=\"total-items-container\">\n <ng-container *ngIf=\"isMapView; then mapTemplate; else notMapTemplate\"></ng-container>\n\n <ng-template #notMapTemplate>\n <ng-container *ngIf=\"totalRows >= 0\">\n <div class=\"body-{{sizeType}} total-items color-dimmed\"\n [innerHtml]=\"(totalRows === 1 ? 'LIST.TOTAL_RESULT' : 'LIST.TOTAL_RESULTS') | translate: { totalRows: totalRows }\">\n </div>\n </ng-container>\n <ng-container *ngIf=\"totalAmount > 0\"> {{ 'LIST.TOTAL_OF' | translate }} {{ totalAmount }} </ng-container>\n </ng-template>\n\n <ng-template #mapTemplate>\n <ng-container *ngIf=\"totalAmount >= 0\">\n </ng-container>\n <ng-container *ngIf=\"totalRows >= 0\">\n <div class=\"body-{{sizeType}} total-items color-dimmed\"\n [innerHtml]=\"(totalRows === 1 ? 'LIST.TOTAL_RESULT_OUT_OF_RESULT' : 'LIST.TOTAL_RESULTS_OUT_OF') | translate: { xRows: totalAmount, totalRows: totalRows }\">\n </div>\n </ng-container>\n </ng-template>\n</div>", styles: [":host{height:inherit}.total-items-container{height:100%;display:flex;align-items:center}\n"] }]
2787
+ }, {
2788
+ type: Injectable
2789
+ }], propDecorators: { totalRows: [{
2790
+ type: Input
2791
+ }], totalAmount: [{
2792
+ type: Input
2793
+ }], isMapView: [{
2794
+ type: Input
2795
+ }], sizeType: [{
2796
+ type: Input
2797
+ }] } });
2798
+
2799
+ class IPepListView {
2800
+ }
2801
+ class PepListViewsComponent {
2802
+ constructor() {
2803
+ this._views = null;
2804
+ this._currentView = null;
2805
+ this.displayType = 'menu';
2806
+ this.styleType = 'weak';
2807
+ this.sizeType = 'md';
2808
+ this.classNames = '';
2809
+ this.change = new EventEmitter();
2810
+ this.menuItems = null;
2811
+ this.currentItem = null;
2812
+ }
2813
+ set views(value) {
2814
+ this._views = value;
2815
+ this.menuItems = value.map((opt) => {
2816
+ return { key: opt.key, text: opt.title, iconName: opt.iconName };
2817
+ });
2818
+ }
2819
+ get views() {
2820
+ return this._views;
2821
+ }
2822
+ set currentView(value) {
2823
+ this._currentView = value;
2824
+ if (this.displayType === 'menu') {
2825
+ this.currentItem = this.menuItems.find((mi) => mi.key === value.key);
2826
+ }
2827
+ }
2828
+ get currentView() {
2829
+ return this._currentView;
2830
+ }
2831
+ ngOnInit() {
2832
+ if (this.displayType === 'buttons') {
2833
+ if (this.currentView === null &&
2834
+ this.views &&
2835
+ this.views.length > 0) {
2836
+ this.currentView = this.views[0];
2837
+ }
2838
+ }
2839
+ }
2840
+ onMenuItemClicked(menuItemClickEvent) {
2841
+ this.currentView = this.views.find((list) => list.key === menuItemClickEvent.source.key);
2842
+ this.raiseChangeEvent();
2843
+ }
2844
+ onViewChanged(view) {
2845
+ this.currentView = view;
2846
+ this.raiseChangeEvent();
2847
+ }
2848
+ raiseChangeEvent() {
2849
+ this.change.emit({ source: this.currentView });
2850
+ }
2851
+ }
2852
+ PepListViewsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListViewsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2853
+ PepListViewsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PepListViewsComponent, selector: "pep-list-views", inputs: { views: "views", currentView: "currentView", displayType: "displayType", styleType: "styleType", sizeType: "sizeType", classNames: "classNames" }, outputs: { change: "change" }, ngImport: i0, template: "<ng-container *ngIf=\"displayType === 'menu' then menuTemplate else buttonsTemplate\">\n</ng-container>\n<ng-template #menuTemplate>\n <pep-menu [type]=\"'select'\" [styleType]=\"styleType\" [sizeType]=\"sizeType\" [classNames]=\"classNames\"\n [items]=\"menuItems\" [selectedItem]=\"currentItem\"\n [iconName]=\"currentItem?.iconName ? currentItem?.iconName : 'arrow_down'\"\n (menuItemClick)=\"onMenuItemClicked($event)\"></pep-menu>\n</ng-template>\n<ng-template #buttonsTemplate>\n <div class=\"buttons-wrapper pep-spacing-element-negative\">\n <button *ngFor=\"let view of views\" mat-button [title]=\"view.title\" [disabled]=\"view.key === currentView?.key\"\n class=\"pep-button icon-button pep-spacing-element {{ sizeType }} {{ styleType }} {{ classNames }}\"\n pepRtlDirection pepMenuBlur (click)=\"onViewChanged(view)\">\n <mat-icon>\n <pep-icon name=\"{{ view?.iconName }}\"></pep-icon>\n </mat-icon>\n </button>\n </div>\n</ng-template>", styles: [".buttons-wrapper{display:flex}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1.PepMenuBlurDirective, selector: "[pepMenuBlur]" }, { kind: "directive", type: i1.PepRtlDirectionDirective, selector: "[pepRtlDirection]" }, { kind: "component", type: i5.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i1$1.PepMenuComponent, selector: "pep-menu", inputs: ["text", "iconName", "type", "styleType", "sizeType", "classNames", "xPosition", "hideOnEmptyItems", "items", "selectedItem", "disabled"], outputs: ["stateChange", "menuItemClick", "menuClick"] }] });
2854
+ PepListViewsComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListViewsComponent });
2855
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListViewsComponent, decorators: [{
2856
+ type: Component,
2857
+ args: [{ selector: 'pep-list-views', template: "<ng-container *ngIf=\"displayType === 'menu' then menuTemplate else buttonsTemplate\">\n</ng-container>\n<ng-template #menuTemplate>\n <pep-menu [type]=\"'select'\" [styleType]=\"styleType\" [sizeType]=\"sizeType\" [classNames]=\"classNames\"\n [items]=\"menuItems\" [selectedItem]=\"currentItem\"\n [iconName]=\"currentItem?.iconName ? currentItem?.iconName : 'arrow_down'\"\n (menuItemClick)=\"onMenuItemClicked($event)\"></pep-menu>\n</ng-template>\n<ng-template #buttonsTemplate>\n <div class=\"buttons-wrapper pep-spacing-element-negative\">\n <button *ngFor=\"let view of views\" mat-button [title]=\"view.title\" [disabled]=\"view.key === currentView?.key\"\n class=\"pep-button icon-button pep-spacing-element {{ sizeType }} {{ styleType }} {{ classNames }}\"\n pepRtlDirection pepMenuBlur (click)=\"onViewChanged(view)\">\n <mat-icon>\n <pep-icon name=\"{{ view?.iconName }}\"></pep-icon>\n </mat-icon>\n </button>\n </div>\n</ng-template>", styles: [".buttons-wrapper{display:flex}\n"] }]
2858
+ }, {
2859
+ type: Injectable
2860
+ }], propDecorators: { views: [{
2861
+ type: Input
2862
+ }], currentView: [{
2863
+ type: Input
2864
+ }], displayType: [{
2865
+ type: Input
2866
+ }], styleType: [{
2867
+ type: Input
2868
+ }], sizeType: [{
2869
+ type: Input
2870
+ }], classNames: [{
2871
+ type: Input
2872
+ }], change: [{
2873
+ type: Output
2874
+ }] } });
2875
+
2876
+ class IsItemSelectedPipe {
2877
+ constructor() {
2878
+ this.SEPARATOR = ',';
2879
+ }
2880
+ getUniqItemId(itemId, itemType = '') {
2881
+ return itemId + this.SEPARATOR + itemType;
2882
+ }
2883
+ transform(item, selectionTypeForActions, selectedItemId, isAllSelected, selectedItems, unSelectedItems) {
2884
+ let isSelected = false;
2885
+ if (selectionTypeForActions === 'single') {
2886
+ isSelected = selectedItemId === this.getUniqItemId(item === null || item === void 0 ? void 0 : item.UID, item === null || item === void 0 ? void 0 : item.Type.toString());
2887
+ }
2888
+ // else if (selectionTypeForActions === 'single-action') {
2889
+ // isSelected = (isAllSelected && !unSelectedItems.has(item?.UID)) || selectedItems.has(item?.UID);
2890
+ // }
2891
+ else if (selectionTypeForActions === 'multi') {
2892
+ if (item === null || item === void 0 ? void 0 : item.IsSelectableForActions) {
2893
+ isSelected = (isAllSelected && !unSelectedItems.has(item === null || item === void 0 ? void 0 : item.UID)) || selectedItems.has(item === null || item === void 0 ? void 0 : item.UID);
2894
+ }
2895
+ }
2896
+ return isSelected;
2897
+ }
2898
+ }
2899
+ IsItemSelectedPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemSelectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2900
+ IsItemSelectedPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: IsItemSelectedPipe, name: "isItemSelected" });
2901
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemSelectedPipe, decorators: [{
2902
+ type: Pipe,
2903
+ args: [{
2904
+ name: 'isItemSelected'
2905
+ }]
2906
+ }] });
2907
+ class IsItemDisabledPipe {
2908
+ transform(item, lockItemInnerEvents, printMode) {
2909
+ return (printMode || lockItemInnerEvents || (item && !item.IsSelectableForActions));
2910
+ }
2911
+ }
2912
+ IsItemDisabledPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemDisabledPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2913
+ IsItemDisabledPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: IsItemDisabledPipe, name: "isItemDisabled" });
2914
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemDisabledPipe, decorators: [{
2915
+ type: Pipe,
2916
+ args: [{
2917
+ name: 'isItemDisabled'
2918
+ }]
2919
+ }] });
2920
+
2921
+ const listComponents = [
2922
+ // PepListOldComponent,
2923
+ PepListComponent,
2924
+ PepListActionsComponent,
2925
+ PepListCarouselComponent,
2926
+ PepListChooserComponent,
2927
+ PepListPagerComponent,
2928
+ PepListSortingComponent,
2929
+ PepListTotalComponent,
2930
+ PepListViewsComponent,
2931
+ ];
2932
+ const listPipes = [
2933
+ IsItemSelectedPipe,
2934
+ IsItemDisabledPipe
2935
+ ];
2936
+ // import { PepVirtualScrollComponent } from './virtual-scroll.component';
2937
+ class PepListModule {
2938
+ constructor(pepIconRegistry) {
2939
+ this.pepIconRegistry = pepIconRegistry;
2940
+ this.pepIconRegistry.registerIcons([
2941
+ pepIconArrowDown,
2942
+ pepIconArrowEither,
2943
+ pepIconArrowUp,
2944
+ pepIconSystemMust,
2945
+ pepIconArrowRight,
2946
+ pepIconArrowRightAlt,
2947
+ pepIconArrowLeft,
2948
+ pepIconArrowLeftAlt,
2949
+ ]);
2950
+ }
2951
+ }
2952
+ PepListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListModule, deps: [{ token: i5.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
2953
+ PepListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepListModule, declarations: [
2954
+ // PepListOldComponent,
2955
+ PepListComponent,
2956
+ PepListActionsComponent,
2957
+ PepListCarouselComponent,
2958
+ PepListChooserComponent,
2959
+ PepListPagerComponent,
2960
+ PepListSortingComponent,
2961
+ PepListTotalComponent,
2962
+ PepListViewsComponent, IsItemSelectedPipe,
2963
+ IsItemDisabledPipe
2964
+ ], imports: [CommonModule,
2965
+ // Material modules,
2966
+ MatCommonModule,
2967
+ MatButtonModule,
2968
+ MatCheckboxModule,
2969
+ MatRadioModule,
2970
+ MatIconModule,
2971
+ MatMenuModule,
2972
+ // ngx-lib modules
2973
+ PepNgxLibModule,
2974
+ PepBreadCrumbsModule,
2975
+ PepButtonModule,
2976
+ PepCarouselModule,
2977
+ PepIconModule,
2978
+ PepFormModule,
2979
+ PepMenuModule,
2980
+ PepTextboxModule,
2981
+ VirtualScrollerModule], exports: [
2982
+ // PepListOldComponent,
2983
+ PepListComponent,
2984
+ PepListActionsComponent,
2985
+ PepListCarouselComponent,
2986
+ PepListChooserComponent,
2987
+ PepListPagerComponent,
2988
+ PepListSortingComponent,
2989
+ PepListTotalComponent,
2990
+ PepListViewsComponent
2991
+ ] });
2992
+ PepListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListModule, imports: [CommonModule,
2993
+ // Material modules,
2994
+ MatCommonModule,
2995
+ MatButtonModule,
2996
+ MatCheckboxModule,
2997
+ MatRadioModule,
2998
+ MatIconModule,
2999
+ MatMenuModule,
3000
+ // ngx-lib modules
3001
+ PepNgxLibModule,
3002
+ PepBreadCrumbsModule,
3003
+ PepButtonModule,
3004
+ PepCarouselModule,
3005
+ PepIconModule,
3006
+ PepFormModule,
3007
+ PepMenuModule,
3008
+ PepTextboxModule,
3009
+ VirtualScrollerModule] });
3010
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListModule, decorators: [{
3011
+ type: NgModule,
3012
+ args: [{
3013
+ imports: [
3014
+ CommonModule,
3015
+ // Material modules,
3016
+ MatCommonModule,
3017
+ MatButtonModule,
3018
+ MatCheckboxModule,
3019
+ MatRadioModule,
3020
+ MatIconModule,
3021
+ MatMenuModule,
3022
+ // ngx-lib modules
3023
+ PepNgxLibModule,
3024
+ PepBreadCrumbsModule,
3025
+ PepButtonModule,
3026
+ PepCarouselModule,
3027
+ PepIconModule,
3028
+ PepFormModule,
3029
+ PepMenuModule,
3030
+ PepTextboxModule,
3031
+ VirtualScrollerModule
3032
+ ],
3033
+ exports: [listComponents],
3034
+ declarations: [listComponents, listPipes],
3035
+ }]
3036
+ }], ctorParameters: function () { return [{ type: i5.PepIconRegistry }]; } });
3037
+
3038
+ /*
3039
+ * Public API Surface of ngx-lib/list
3040
+ */
3041
+
3042
+ /**
3043
+ * Generated bundle index. Do not edit.
3044
+ */
3045
+
3046
+ export { DEFAULT_PAGE_SIZE, IPepListChooserOption, IPepListPagerChangeEvent, IPepListSortingOption, IPepListView, PepListActionsComponent, PepListCarouselComponent, PepListChooserComponent, PepListComponent, PepListModule, PepListPagerComponent, PepListSortingComponent, PepListTotalComponent, PepListViewsComponent, PepSelectionData };
3047
+ //# sourceMappingURL=pepperi-addons-ngx-lib-list.mjs.map