@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,3035 @@
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?.checkResizeInterval || defaultOptions.checkResizeInterval;
77
+ this.modifyOverflowStyleOfParentScroll = options?.modifyOverflowStyleOfParentScroll || defaultOptions.modifyOverflowStyleOfParentScroll;
78
+ this.resizeBypassRefreshThreshold = options?.resizeBypassRefreshThreshold || defaultOptions.resizeBypassRefreshThreshold;
79
+ this.scrollAnimationTime = options?.scrollAnimationTime || defaultOptions.scrollAnimationTime;
80
+ this.scrollDebounceTime = options?.scrollDebounceTime || defaultOptions.scrollDebounceTime;
81
+ this.scrollThrottlingTime = options?.scrollThrottlingTime || defaultOptions.scrollThrottlingTime;
82
+ this.scrollbarHeight = options?.scrollbarHeight || defaultOptions.scrollbarHeight;
83
+ this.scrollbarWidth = options?.scrollbarWidth || defaultOptions.scrollbarWidth;
84
+ this.stripedTable = 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 () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
1004
+ type: Inject,
1005
+ args: [PLATFORM_ID]
1006
+ }] }, { type: undefined, decorators: [{
1007
+ type: Optional
1008
+ }, {
1009
+ type: Inject,
1010
+ args: ['virtual-scroller-default-options']
1011
+ }] }]; }, propDecorators: { disable: [{
1012
+ type: Input
1013
+ }], executeRefreshOutsideAngularZone: [{
1014
+ type: Input
1015
+ }], enableUnequalChildrenSizes: [{
1016
+ type: Input
1017
+ }], RTL: [{
1018
+ type: Input
1019
+ }], useMarginInsteadOfTranslate: [{
1020
+ type: Input
1021
+ }], modifyOverflowStyleOfParentScroll: [{
1022
+ type: Input
1023
+ }], stripedTable: [{
1024
+ type: Input
1025
+ }], scrollbarWidth: [{
1026
+ type: Input
1027
+ }], scrollbarHeight: [{
1028
+ type: Input
1029
+ }], childWidth: [{
1030
+ type: Input
1031
+ }], childHeight: [{
1032
+ type: Input
1033
+ }], ssrChildWidth: [{
1034
+ type: Input
1035
+ }], ssrChildHeight: [{
1036
+ type: Input
1037
+ }], ssrViewportWidth: [{
1038
+ type: Input
1039
+ }], ssrViewportHeight: [{
1040
+ type: Input
1041
+ }], bufferAmount: [{
1042
+ type: Input
1043
+ }], scrollAnimationTime: [{
1044
+ type: Input
1045
+ }], resizeBypassRefreshThreshold: [{
1046
+ type: Input
1047
+ }], scrollThrottlingTime: [{
1048
+ type: Input
1049
+ }], scrollDebounceTime: [{
1050
+ type: Input
1051
+ }], checkResizeInterval: [{
1052
+ type: Input
1053
+ }], items: [{
1054
+ type: Input
1055
+ }], compareItems: [{
1056
+ type: Input
1057
+ }], horizontal: [{
1058
+ type: Input
1059
+ }], parentScroll: [{
1060
+ type: Input
1061
+ }], vsChildRectChange: [{
1062
+ type: Output
1063
+ }], vsUpdate: [{
1064
+ type: Output
1065
+ }], vsChange: [{
1066
+ type: Output
1067
+ }], vsStart: [{
1068
+ type: Output
1069
+ }], vsEnd: [{
1070
+ type: Output
1071
+ }], contentElementRef: [{
1072
+ type: ViewChild,
1073
+ args: ['content', { read: ElementRef, static: true }]
1074
+ }], invisiblePaddingElementRef: [{
1075
+ type: ViewChild,
1076
+ args: ['invisiblePadding', { read: ElementRef, static: true }]
1077
+ }], headerElementRef: [{
1078
+ type: ContentChild,
1079
+ args: ['header', { read: ElementRef, static: false }]
1080
+ }], containerElementRef: [{
1081
+ type: ContentChild,
1082
+ args: ['container', { read: ElementRef, static: false }]
1083
+ }] } });
1084
+ class VirtualScrollerModule {
1085
+ }
1086
+ VirtualScrollerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: VirtualScrollerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1087
+ VirtualScrollerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: VirtualScrollerModule, declarations: [VirtualScrollerComponent], imports: [CommonModule], exports: [VirtualScrollerComponent] });
1088
+ VirtualScrollerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: VirtualScrollerModule, providers: [
1089
+ {
1090
+ provide: 'virtual-scroller-default-options',
1091
+ useFactory: VIRTUAL_SCROLLER_DEFAULT_OPTIONS_FACTORY
1092
+ }
1093
+ ], imports: [CommonModule] });
1094
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: VirtualScrollerModule, decorators: [{
1095
+ type: NgModule,
1096
+ args: [{
1097
+ exports: [VirtualScrollerComponent],
1098
+ declarations: [VirtualScrollerComponent],
1099
+ imports: [CommonModule],
1100
+ providers: [
1101
+ {
1102
+ provide: 'virtual-scroller-default-options',
1103
+ useFactory: VIRTUAL_SCROLLER_DEFAULT_OPTIONS_FACTORY
1104
+ }
1105
+ ]
1106
+ }]
1107
+ }] });
1108
+
1109
+ class PepSelectionData {
1110
+ }
1111
+ const DEFAULT_PAGE_SIZE = 50;
1112
+
1113
+ class IPepListPagerChangeEvent {
1114
+ }
1115
+ class PepListPagerComponent {
1116
+ constructor(_changeDetectorRef, layoutService) {
1117
+ this._changeDetectorRef = _changeDetectorRef;
1118
+ this.layoutService = layoutService;
1119
+ this.disabled = false;
1120
+ this._pageIndex = 0;
1121
+ this.length = 0;
1122
+ this.pageSize = DEFAULT_PAGE_SIZE;
1123
+ this.pagerChange = new EventEmitter();
1124
+ }
1125
+ set pageIndex(value) {
1126
+ this.setPageIndex(value);
1127
+ }
1128
+ get pageIndex() {
1129
+ return this._pageIndex;
1130
+ }
1131
+ nextPage() {
1132
+ if (!this.hasNextPage()) {
1133
+ return;
1134
+ }
1135
+ this.setPageIndex(this.pageIndex + 1);
1136
+ }
1137
+ previousPage() {
1138
+ if (!this.hasPreviousPage()) {
1139
+ return;
1140
+ }
1141
+ this.setPageIndex(this.pageIndex - 1);
1142
+ }
1143
+ firstPage() {
1144
+ if (!this.hasPreviousPage()) {
1145
+ return;
1146
+ }
1147
+ this.setPageIndex(0);
1148
+ }
1149
+ lastPage() {
1150
+ if (!this.hasNextPage()) {
1151
+ return;
1152
+ }
1153
+ this.setPageIndex(this.getNumberOfPages() - 1);
1154
+ }
1155
+ hasPreviousPage() {
1156
+ return this.pageIndex >= 1 && this.pageSize != 0;
1157
+ }
1158
+ hasNextPage() {
1159
+ const maxPageIndex = this.getNumberOfPages() - 1;
1160
+ return this.pageIndex < maxPageIndex && this.pageSize != 0;
1161
+ }
1162
+ getNumberOfPages() {
1163
+ if (!this.pageSize) {
1164
+ return 0;
1165
+ }
1166
+ return Math.ceil(this.length / this.pageSize);
1167
+ }
1168
+ /** Checks whether the buttons for going forwards should be disabled. */
1169
+ _nextButtonsDisabled() {
1170
+ return this.disabled || !this.hasNextPage();
1171
+ }
1172
+ /** Checks whether the buttons for going backwards should be disabled. */
1173
+ _previousButtonsDisabled() {
1174
+ return this.disabled || !this.hasPreviousPage();
1175
+ }
1176
+ onValueChange(value) {
1177
+ const pageNumber = coerceNumberProperty(value);
1178
+ this.setPageIndex(pageNumber - 1); // - 1 to convert number into index.
1179
+ }
1180
+ setPageIndex(newIndex) {
1181
+ const previousPageIndex = this.pageIndex;
1182
+ if (newIndex >= 0 && newIndex < this.getNumberOfPages()) {
1183
+ this._pageIndex = newIndex;
1184
+ }
1185
+ else {
1186
+ this._pageIndex = 0;
1187
+ }
1188
+ if (this.pageIndex !== previousPageIndex) {
1189
+ this._emitChangeEvent(previousPageIndex);
1190
+ }
1191
+ }
1192
+ /** Emits an event notifying that a change of the paginator's properties has been triggered. */
1193
+ _emitChangeEvent(previousPageIndex) {
1194
+ this.pagerChange.emit({
1195
+ previousPageIndex,
1196
+ pageIndex: this.pageIndex,
1197
+ pageSize: this.pageSize,
1198
+ length: this.length,
1199
+ });
1200
+ }
1201
+ }
1202
+ 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 });
1203
+ 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" }] });
1204
+ PepListPagerComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListPagerComponent });
1205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListPagerComponent, decorators: [{
1206
+ type: Component,
1207
+ 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"] }]
1208
+ }, {
1209
+ type: Injectable
1210
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.PepLayoutService }]; }, propDecorators: { disabled: [{
1211
+ type: Input
1212
+ }], pageIndex: [{
1213
+ type: Input
1214
+ }], length: [{
1215
+ type: Input
1216
+ }], pageSize: [{
1217
+ type: Input
1218
+ }], pagerChange: [{
1219
+ type: Output
1220
+ }] } });
1221
+
1222
+ class PepListComponent {
1223
+ constructor(hostElement, layoutService, sessionService, cd, renderer, zone) {
1224
+ this.hostElement = hostElement;
1225
+ this.layoutService = layoutService;
1226
+ this.sessionService = sessionService;
1227
+ this.cd = cd;
1228
+ this.renderer = renderer;
1229
+ this.zone = zone;
1230
+ this.cacheSize = -1;
1231
+ this.noDataFoundMsg = null;
1232
+ this.selectionTypeForActions = 'multi';
1233
+ this.showCardSelection = false;
1234
+ this.hideAllSelectionInMulti = false;
1235
+ this.cardSize = 'md';
1236
+ this.tableViewType = 'regular';
1237
+ this._viewType = '';
1238
+ this.firstFieldAsLink = false;
1239
+ this.supportSorting = true;
1240
+ this.supportResizing = true;
1241
+ this._parentScroll = null;
1242
+ this.disabled = false;
1243
+ this._lockEvents = false;
1244
+ this.lockItemInnerEvents = false;
1245
+ this.printMode = false;
1246
+ this.isReport = false;
1247
+ this.zebraStripes = false;
1248
+ this.totalsRow = [];
1249
+ this.pagerType = 'scroll';
1250
+ this.pageSize = DEFAULT_PAGE_SIZE;
1251
+ this.pageIndex = 0;
1252
+ // @Input() startIndex = 0;
1253
+ this.bufferAmount = 0;
1254
+ this.scrollAnimationTime = 500;
1255
+ this.scrollDebounceTime = 0;
1256
+ this.scrollThrottlingTime = 0;
1257
+ this._useAsWebComponent = false;
1258
+ this.itemClick = new EventEmitter();
1259
+ this.fieldClick = new EventEmitter();
1260
+ this.valueChange = new EventEmitter();
1261
+ this.sortingChange = new EventEmitter();
1262
+ this.selectedItemsChange = new EventEmitter();
1263
+ this.selectedItemChange = new EventEmitter();
1264
+ this.selectAllClick = new EventEmitter();
1265
+ // @Output()
1266
+ // singleActionClick: EventEmitter<any> = new EventEmitter<any>();
1267
+ this.listLoad = new EventEmitter();
1268
+ this.loadItems = new EventEmitter();
1269
+ this.loadPage = new EventEmitter();
1270
+ this.startIndexChange = new EventEmitter();
1271
+ this._layout = null;
1272
+ this.totalRows = -1;
1273
+ this.isTable = false;
1274
+ this.hasColumnWidthOfTypePercentage = true;
1275
+ this._items = null;
1276
+ this.itemsCounter = 0;
1277
+ this.SEPARATOR = ',';
1278
+ this.isAllSelected = false;
1279
+ this.selectedItems = new Map();
1280
+ this.unSelectedItems = new Map();
1281
+ this.selectedItemId = '';
1282
+ this.hoveredItemId = '';
1283
+ this.containerWidth = 0;
1284
+ this.tableScrollWidth = 0;
1285
+ this._loadingItemsFromApi = false;
1286
+ this.deviceHasMouse = false;
1287
+ // For resize
1288
+ this.pressedColumn = '';
1289
+ this.pressedColumnIndex = -1;
1290
+ this.startX = 0;
1291
+ this.startWidth = 0;
1292
+ this.tableStartWidth = 0;
1293
+ this.lastColumnsWidth = [];
1294
+ // For sorting
1295
+ this.isAsc = true;
1296
+ this.sortBy = '';
1297
+ this.isUserSelected = false;
1298
+ this.checkForChanges = null;
1299
+ this.calculatedObjectHeight = 'auto';
1300
+ // this.nativeWindow = window;
1301
+ this.layoutService.onResize$.subscribe((size) => {
1302
+ this.screenSize = size;
1303
+ });
1304
+ this.layoutService.onMouseOver$.subscribe((deviceHasMouse) => {
1305
+ this.deviceHasMouse = deviceHasMouse;
1306
+ });
1307
+ }
1308
+ set sorting(value) {
1309
+ this.sortBy = value?.sortBy || '';
1310
+ this.isAsc = value?.sortBy.length > 0 ? value.isAsc : true;
1311
+ }
1312
+ get sorting() {
1313
+ return {
1314
+ sortBy: this.sortBy,
1315
+ isAsc: this.isAsc
1316
+ };
1317
+ }
1318
+ set viewType(value) {
1319
+ this._viewType = value;
1320
+ this.isTable = value === 'table';
1321
+ }
1322
+ get viewType() {
1323
+ return this._viewType;
1324
+ }
1325
+ set parentScroll(value) {
1326
+ this._parentScroll = value;
1327
+ }
1328
+ get parentScroll() {
1329
+ return this._parentScroll;
1330
+ }
1331
+ set lockEvents(value) {
1332
+ this._lockEvents = value;
1333
+ if (this._lockEvents) {
1334
+ this.renderer.addClass(this.hostElement.nativeElement, 'lock-events');
1335
+ }
1336
+ else {
1337
+ this.renderer.removeClass(this.hostElement.nativeElement, 'lock-events');
1338
+ }
1339
+ }
1340
+ get lockEvents() {
1341
+ return this._lockEvents;
1342
+ }
1343
+ set useAsWebComponent(value) {
1344
+ this._useAsWebComponent = value;
1345
+ if (value) {
1346
+ this.exportFunctionsOnHostElement();
1347
+ }
1348
+ }
1349
+ get useAsWebComponent() {
1350
+ return this._useAsWebComponent;
1351
+ }
1352
+ get layout() {
1353
+ return this._layout;
1354
+ }
1355
+ get items() {
1356
+ return this._items;
1357
+ }
1358
+ get loadingItemsFromApi() {
1359
+ return this._loadingItemsFromApi;
1360
+ }
1361
+ ngOnInit() {
1362
+ this.containerWidth = 0;
1363
+ this.deviceHasMouse = this.layoutService.getDeviceHasMouse();
1364
+ }
1365
+ ngOnChanges(changes) {
1366
+ if (this.containerWidth <= 0) {
1367
+ this.setContainerWidth();
1368
+ }
1369
+ }
1370
+ ngOnDestroy() {
1371
+ // if (this.valueChange) {
1372
+ // this.valueChange.unsubscribe();
1373
+ // }
1374
+ // if (this.loadItems) {
1375
+ // this.loadItems.unsubscribe();
1376
+ // }
1377
+ // if (this.loadPage) {
1378
+ // this.loadPage.unsubscribe();
1379
+ // }
1380
+ // if (this.sortingChange) {
1381
+ // this.sortingChange.unsubscribe();
1382
+ // }
1383
+ // if (this.fieldClick) {
1384
+ // this.fieldClick.unsubscribe();
1385
+ // }
1386
+ // if (this.itemClick) {
1387
+ // this.itemClick.unsubscribe();
1388
+ // }
1389
+ // if (this.listLoad) {
1390
+ // this.listLoad.unsubscribe();
1391
+ // }
1392
+ this.saveSortingToSession();
1393
+ }
1394
+ getCachedItemsNumber() {
1395
+ return this.cacheSize >= 0 ? this.cacheSize : PepListComponent.TOP_ITEMS_ARRAY;
1396
+ }
1397
+ getScrollingElement() {
1398
+ return this.parentScroll ? this.parentScroll : this.virtualScroller?.contentElementRef.nativeElement.parentElement;
1399
+ }
1400
+ scrollToTop(animate = true) {
1401
+ const scrollingElement = this.getScrollingElement();
1402
+ if (scrollingElement) {
1403
+ const scrollTop = 0;
1404
+ // totally disable animate
1405
+ if (!animate || this.scrollAnimationTime === 0) {
1406
+ if (scrollingElement instanceof Window) {
1407
+ window.scrollTo(0, scrollTop);
1408
+ }
1409
+ else {
1410
+ scrollingElement.scrollTop = scrollTop;
1411
+ }
1412
+ }
1413
+ else {
1414
+ let animationRequest;
1415
+ const isWindow = scrollingElement instanceof Window;
1416
+ const currentScrollTop = scrollingElement instanceof Window
1417
+ ? window.pageYOffset
1418
+ : scrollingElement.scrollTop;
1419
+ if (this.currentTween !== undefined) {
1420
+ this.currentTween.stop();
1421
+ }
1422
+ this.currentTween = new tween.Tween({ scrollTop: currentScrollTop })
1423
+ .to({ scrollTop }, this.scrollAnimationTime)
1424
+ .easing(tween.Easing.Quadratic.Out)
1425
+ .onUpdate((data) => {
1426
+ if (isNaN(data.scrollTop)) {
1427
+ return;
1428
+ }
1429
+ if (isWindow) {
1430
+ window.scrollTo(0, data.scrollTop);
1431
+ }
1432
+ else {
1433
+ this.renderer.setProperty(scrollingElement, 'scrollTop', data.scrollTop);
1434
+ }
1435
+ })
1436
+ .onStop(() => {
1437
+ cancelAnimationFrame(animationRequest);
1438
+ })
1439
+ .start();
1440
+ const animate = (time) => {
1441
+ this.currentTween.update(time);
1442
+ if (this.currentTween._object.scrollTop !== scrollTop) {
1443
+ this.zone.runOutsideAngular(() => {
1444
+ animationRequest = requestAnimationFrame(animate);
1445
+ });
1446
+ }
1447
+ };
1448
+ animate();
1449
+ }
1450
+ }
1451
+ }
1452
+ getSelectionCheckBoxWidth() {
1453
+ return this.selectionTypeForActions === 'multi' ? 44 : (this.selectionTypeForActions === 'single' ? 44 : 0);
1454
+ }
1455
+ setContainerWidth() {
1456
+ if (!this.hostElement.nativeElement.parentElement) {
1457
+ return;
1458
+ }
1459
+ const rowHeight = 40; // the table row height (2.5rem * 16font-size).
1460
+ const style = getComputedStyle(this.hostElement.nativeElement.parentElement);
1461
+ // The container-fluid class padding left + right + border
1462
+ const containerFluidSpacing = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
1463
+ const parentContainer = this.hostElement.nativeElement.parentElement.parentElement > 0
1464
+ ? this.hostElement.nativeElement.parentElement.parentElement
1465
+ : this.hostElement.nativeElement.parentElement;
1466
+ // Calculate if vertical scroll should appear, if so set the scroll width. (this.totalRows + 1) + 1 is for the header row.
1467
+ this.tableScrollWidth = parentContainer.clientHeight < rowHeight * (this.totalRows + 1)
1468
+ ? this.layoutService.getScrollbarWidth()
1469
+ : 0;
1470
+ // The selectionCheckBoxWidth width + containerFluidSpacing + this.tableScrollWidth.
1471
+ const rowHeaderWidthToSub = containerFluidSpacing + this.getSelectionCheckBoxWidth() + this.tableScrollWidth;
1472
+ this.containerWidth = parentContainer.offsetWidth - rowHeaderWidthToSub;
1473
+ }
1474
+ saveSortingToSession() {
1475
+ this.sessionService.setObject(PepListComponent.SORT_BY_STATE_KEY, this.sortBy);
1476
+ this.sessionService.setObject(PepListComponent.ASCENDING_STATE_KEY, this.isAsc);
1477
+ }
1478
+ getTopItems() {
1479
+ return this.isTable
1480
+ ? PepListComponent.TOP_ITEMS_TABLE
1481
+ : PepListComponent.TOP_ITEMS_THUMBNAILS;
1482
+ }
1483
+ disableScroll(disable) {
1484
+ if (disable) {
1485
+ this.renderer.addClass(this.hostElement.nativeElement.parentElement, 'lock-events');
1486
+ }
1487
+ else {
1488
+ this.renderer.removeClass(this.hostElement.nativeElement.parentElement, 'lock-events');
1489
+ }
1490
+ }
1491
+ toggleLoadingItemsFropApi(loadingItemsFromApi) {
1492
+ this._loadingItemsFromApi = loadingItemsFromApi;
1493
+ // this.disableScroll(loadingItemsFromApi);
1494
+ }
1495
+ updateCurrentPageItems(startIndex, endIndex) {
1496
+ this.currentPageItems = this.items.slice(startIndex, endIndex);
1497
+ }
1498
+ setSelectionItems(itemId, uniqItemId, isChecked) {
1499
+ // Set selected item checkbox
1500
+ if (this.isAllSelected) {
1501
+ if (isChecked) {
1502
+ this.unSelectedItems.delete(itemId);
1503
+ this.selectedItems.set(itemId, uniqItemId);
1504
+ }
1505
+ else {
1506
+ this.selectedItems.delete(itemId);
1507
+ this.unSelectedItems.set(itemId, uniqItemId);
1508
+ }
1509
+ }
1510
+ else {
1511
+ if (isChecked) {
1512
+ this.unSelectedItems.delete(itemId);
1513
+ this.selectedItems.set(itemId, uniqItemId);
1514
+ }
1515
+ else {
1516
+ this.selectedItems.delete(itemId);
1517
+ this.unSelectedItems.set(itemId, uniqItemId);
1518
+ }
1519
+ }
1520
+ }
1521
+ getUniqItemId(itemId, itemType = '') {
1522
+ return itemId + this.SEPARATOR + itemType;
1523
+ }
1524
+ setLayout() {
1525
+ if (this.totalRows === 0 ||
1526
+ !this._layout ||
1527
+ !this._layout.ControlFields ||
1528
+ this._layout.ControlFields.length === 0) {
1529
+ return;
1530
+ }
1531
+ this._layout.ControlFields.forEach((cf) => {
1532
+ if (cf.ColumnWidth === 0) {
1533
+ cf.ColumnWidth = 10;
1534
+ }
1535
+ if (this.isTable &&
1536
+ (cf.FieldType === FIELD_TYPE.Image ||
1537
+ // cf.FieldType === FIELD_TYPE.Indicators || ???
1538
+ cf.FieldType === FIELD_TYPE.Signature ||
1539
+ cf.FieldType === FIELD_TYPE.NumberIntegerQuantitySelector ||
1540
+ cf.FieldType === FIELD_TYPE.NumberRealQuantitySelector ||
1541
+ cf.FieldType === FIELD_TYPE.NumberIntegerForMatrix ||
1542
+ cf.FieldType === FIELD_TYPE.NumberRealForMatrix ||
1543
+ cf.FieldType === FIELD_TYPE.Package ||
1544
+ cf.ApiName === 'UnitsQuantity' ||
1545
+ cf.ApiName === 'QuantitySelector')) {
1546
+ cf.Layout.XAlignment = 3;
1547
+ }
1548
+ });
1549
+ if (!this.cd['destroyed']) {
1550
+ this.cd.detectChanges();
1551
+ }
1552
+ // Set the container width.
1553
+ if (this.containerWidth <= 0) {
1554
+ this.setContainerWidth();
1555
+ }
1556
+ const isLastColumnsWidthSet = this.setLastColumnsWidth();
1557
+ // Set the layout only if the last columns width couldn't set.
1558
+ if (!isLastColumnsWidthSet) {
1559
+ this.calcColumnsWidth();
1560
+ }
1561
+ this.checkForChanges = new Date().getTime();
1562
+ }
1563
+ setLastColumnsWidth() {
1564
+ let res = false;
1565
+ let totalCalcColsWidth = 0;
1566
+ let widthToSet = 'inherit';
1567
+ if (this.lastColumnsWidth.length > 0) {
1568
+ // Check if this is the same UI control for table.
1569
+ if (this.lastColumnsWidth.length === this._layout.ControlFields.length) {
1570
+ let uiControlsAreTheSame = true;
1571
+ for (let index = 0; index < this._layout.ControlFields.length; index++) {
1572
+ const uiControlField = this._layout.ControlFields[index];
1573
+ if (uiControlField.ApiName !== this.lastColumnsWidth[index].columnAPIName) {
1574
+ uiControlsAreTheSame = false;
1575
+ break;
1576
+ }
1577
+ }
1578
+ if (uiControlsAreTheSame) {
1579
+ for (let index = 0; index < this._layout.ControlFields.length; index++) {
1580
+ const uiControlField = this._layout.ControlFields[index];
1581
+ uiControlField.calcColumnWidth = this.lastColumnsWidth[index].calcColumnWidth;
1582
+ uiControlField.calcTitleColumnWidthString = this.lastColumnsWidth[index].calcTitleColumnWidthString;
1583
+ uiControlField.calcColumnWidthString = this.lastColumnsWidth[index].calcColumnWidthString;
1584
+ totalCalcColsWidth += this.lastColumnsWidth[index].calcColumnWidth;
1585
+ }
1586
+ widthToSet = (totalCalcColsWidth + this.getSelectionCheckBoxWidth()) + 'px';
1587
+ console.log(`setLastColumnsWidth -> widthToSet: ${widthToSet} *** totalCalcColsWidth: ${totalCalcColsWidth}`);
1588
+ this.setColumnsWidth(widthToSet);
1589
+ res = true;
1590
+ }
1591
+ }
1592
+ }
1593
+ return res;
1594
+ }
1595
+ setVirtualScrollWidth(widthToSet) {
1596
+ if (this.virtualScroller) {
1597
+ this.renderer.setStyle(this.virtualScroller.contentElementRef.nativeElement, 'width', widthToSet === 'inherit' ? '100%' : widthToSet);
1598
+ }
1599
+ }
1600
+ setColumnsWidth(widthToSet) {
1601
+ this.renderer.setStyle(this.hostElement.nativeElement, 'width', widthToSet);
1602
+ if (this.isTable) {
1603
+ this.setVirtualScrollWidth(widthToSet);
1604
+ }
1605
+ else {
1606
+ // Do this only after UI is change cause the property isTable is Input and can refresh after this thread.
1607
+ setTimeout(() => {
1608
+ this.setVirtualScrollWidth(widthToSet);
1609
+ }, 0);
1610
+ }
1611
+ }
1612
+ calcColumnsWidth() {
1613
+ const fixedMultiple = 3.78; // for converting em to pixel.
1614
+ const length = this._layout.ControlFields.length;
1615
+ // Is table AND there is at least one column of width type of percentage.
1616
+ if (this.isTable) {
1617
+ if (this._layout && this._layout.ControlFields) {
1618
+ this.hasColumnWidthOfTypePercentage =
1619
+ this._layout.ControlFields.filter((cf) => cf.ColumnWidthType === 1).length === 0;
1620
+ }
1621
+ }
1622
+ // If the columns size is fixed and the total is small then the container change it to percentage.
1623
+ if (!this.hasColumnWidthOfTypePercentage) {
1624
+ const totalFixedColsWidth = this._layout.ControlFields.map((cf) => cf.ColumnWidth * fixedMultiple).reduce((sum, current) => sum + current);
1625
+ if (window.innerWidth > totalFixedColsWidth) {
1626
+ this.hasColumnWidthOfTypePercentage = true;
1627
+ }
1628
+ }
1629
+ let totalCalcColsWidth = 0;
1630
+ let widthToSet = 'inherit';
1631
+ // Calc by percentage
1632
+ if (this.hasColumnWidthOfTypePercentage) {
1633
+ const totalColsWidth = this._layout.ControlFields.map((cf) => cf.ColumnWidth).reduce((sum, current) => sum + current);
1634
+ for (let index = 0; index < length; index++) {
1635
+ const uiControlField = this._layout.ControlFields[index];
1636
+ const calcColumnWidthPercentage = (100 / totalColsWidth) * uiControlField.ColumnWidth;
1637
+ uiControlField.calcColumnWidth = Math.floor((this.containerWidth * calcColumnWidthPercentage) / 100);
1638
+ if (index === length - 1) {
1639
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString = 'calc(100% - ' + totalCalcColsWidth + 'px)'; // For 100%
1640
+ }
1641
+ else {
1642
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString = uiControlField.calcColumnWidth + 'px';
1643
+ totalCalcColsWidth += uiControlField.calcColumnWidth;
1644
+ }
1645
+ }
1646
+ }
1647
+ else {
1648
+ for (let index = 0; index < length; index++) {
1649
+ const uiControlField = this._layout
1650
+ .ControlFields[index];
1651
+ const currentFixedWidth = Math.floor(uiControlField.ColumnWidth * fixedMultiple);
1652
+ if (index === length - 1) {
1653
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString = currentFixedWidth + 'px';
1654
+ }
1655
+ else {
1656
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString = currentFixedWidth + 'px';
1657
+ }
1658
+ totalCalcColsWidth += currentFixedWidth;
1659
+ }
1660
+ widthToSet = (totalCalcColsWidth + this.getSelectionCheckBoxWidth()) + 'px';
1661
+ }
1662
+ console.log(`calcColumnsWidth -> widthToSet: ${widthToSet} *** totalCalcColsWidth: ${totalCalcColsWidth}`);
1663
+ this.setColumnsWidth(widthToSet);
1664
+ }
1665
+ calcObjectHeight() {
1666
+ setTimeout(() => {
1667
+ if (this.virtualScroller) {
1668
+ const content = this.virtualScroller.getContent();
1669
+ console.log(`content.children.length: ${content.children.length}`);
1670
+ if (content.children.length > 0) {
1671
+ const rect = this.virtualScroller.getElementSize(content.children[0]);
1672
+ this.calculatedObjectHeight = rect.height + 'px';
1673
+ console.log(`this.calculatedObjectHeight: ${this.calculatedObjectHeight}`);
1674
+ }
1675
+ }
1676
+ this.disableScroll(false);
1677
+ }, 1000);
1678
+ }
1679
+ initResizeData() {
1680
+ this.startX = 0;
1681
+ this.startWidth = 0;
1682
+ this.tableStartWidth = 0;
1683
+ this.pressedColumn = '';
1684
+ this.pressedColumnIndex = -1;
1685
+ }
1686
+ getParent(el, parentSelector) {
1687
+ // If no parentSelector defined will bubble up all the way to *document*
1688
+ if (parentSelector === undefined) {
1689
+ parentSelector = document;
1690
+ }
1691
+ const parent = [];
1692
+ let p = el.parentNode;
1693
+ while (p &&
1694
+ p.className !== '' &&
1695
+ p.className.indexOf(parentSelector) === -1 &&
1696
+ parentSelector !== document) {
1697
+ const o = p;
1698
+ p = o.parentNode;
1699
+ }
1700
+ if (p.className.indexOf(parentSelector) > -1) {
1701
+ parent.push(p); // Push that parentSelector you wanted to stop at
1702
+ }
1703
+ return parent;
1704
+ }
1705
+ cleanItems() {
1706
+ this.itemsCounter = 0;
1707
+ this._items =
1708
+ this.totalRows > 0 ? Array(this.totalRows) : [];
1709
+ this.currentPageItems = [];
1710
+ this.calculatedObjectHeight = 'auto';
1711
+ }
1712
+ initVariablesFromSession(items) {
1713
+ const selectedItemsObject = this.sessionService.getObject(PepListComponent.SELECTED_ITEMS_STATE_KEY);
1714
+ const selectedItemsFromMap = selectedItemsObject && selectedItemsObject.length > 0
1715
+ ? new Map(selectedItemsObject)
1716
+ : null;
1717
+ if (selectedItemsFromMap != null &&
1718
+ typeof selectedItemsFromMap.size !== 'undefined' &&
1719
+ selectedItemsFromMap.size > 0) {
1720
+ this.selectedItems = selectedItemsFromMap;
1721
+ this.sessionService.removeObject(PepListComponent.SELECTED_ITEMS_STATE_KEY);
1722
+ }
1723
+ else {
1724
+ this.selectedItems.clear();
1725
+ }
1726
+ const unSelectedItemsObject = this.sessionService.getObject(PepListComponent.UN_SELECTED_ITEMS_STATE_KEY);
1727
+ const unSelectedItemsMap = unSelectedItemsObject && unSelectedItemsObject.length > 0
1728
+ ? new Map(unSelectedItemsObject)
1729
+ : null;
1730
+ if (unSelectedItemsMap != null &&
1731
+ typeof unSelectedItemsMap.size !== 'undefined' &&
1732
+ unSelectedItemsMap.size > 0) {
1733
+ this.unSelectedItems = unSelectedItemsMap;
1734
+ this.sessionService.removeObject(PepListComponent.UN_SELECTED_ITEMS_STATE_KEY);
1735
+ }
1736
+ else {
1737
+ this.unSelectedItems.clear();
1738
+ }
1739
+ const isAllSelected = this.sessionService.getObject(PepListComponent.ALL_SELECTED_STATE_KEY);
1740
+ if (isAllSelected != null) {
1741
+ // Comment this in version 0.4.2-beta.103, I don't know why we need this (&& this.getIsAllSelected(items))
1742
+ // this.isAllSelected = isAllSelected && this.getIsAllSelected(items);
1743
+ this.isAllSelected = isAllSelected;
1744
+ this.sessionService.removeObject(PepListComponent.ALL_SELECTED_STATE_KEY);
1745
+ }
1746
+ else {
1747
+ this.isAllSelected = false;
1748
+ }
1749
+ const sortBy = this.sessionService.getObject(PepListComponent.SORT_BY_STATE_KEY);
1750
+ if (sortBy && sortBy !== '') {
1751
+ this.sortBy = sortBy;
1752
+ this.sessionService.removeObject(PepListComponent.SORT_BY_STATE_KEY);
1753
+ }
1754
+ else {
1755
+ this.sortBy = '';
1756
+ }
1757
+ const isAsc = this.sessionService.getObject(PepListComponent.ASCENDING_STATE_KEY);
1758
+ if (isAsc != null) {
1759
+ this.isAsc = isAsc;
1760
+ this.sessionService.removeObject(PepListComponent.ASCENDING_STATE_KEY);
1761
+ }
1762
+ else {
1763
+ this.isAsc = true;
1764
+ }
1765
+ }
1766
+ getIsAllSelected(items) {
1767
+ let result = true;
1768
+ if (this.selectedItems?.size > 0 && items?.length > 0) {
1769
+ for (const item of items) {
1770
+ if (!(item && this.selectedItems.has(item?.UID.toString()))) {
1771
+ result = false;
1772
+ break;
1773
+ }
1774
+ }
1775
+ }
1776
+ else {
1777
+ result = false;
1778
+ }
1779
+ return result;
1780
+ }
1781
+ getNumberOfStartItems() {
1782
+ let numberOfStartItems = 20;
1783
+ if (this.screenSize === PepScreenSizeType.XL ||
1784
+ this.screenSize === PepScreenSizeType.LG) {
1785
+ numberOfStartItems = this.isTable ? 50 : 40;
1786
+ }
1787
+ else if (this.screenSize === PepScreenSizeType.MD) {
1788
+ numberOfStartItems = this.isTable ? 30 : 20;
1789
+ }
1790
+ else if (this.screenSize === PepScreenSizeType.SM) {
1791
+ numberOfStartItems = this.isTable ? 20 : 10;
1792
+ }
1793
+ else if (this.screenSize === PepScreenSizeType.XS) {
1794
+ numberOfStartItems = this.isTable ? 15 : 5;
1795
+ }
1796
+ return numberOfStartItems;
1797
+ }
1798
+ setItemClicked(itemId, isSelectableForActions, itemType, isChecked) {
1799
+ const uniqItemId = this.getUniqItemId(itemId, itemType);
1800
+ // select the selected item.
1801
+ if (isChecked) {
1802
+ // Set seleted item
1803
+ this.selectedItemId = uniqItemId;
1804
+ }
1805
+ else {
1806
+ if (this.selectedItemId === uniqItemId) {
1807
+ this.selectedItemId = '';
1808
+ }
1809
+ }
1810
+ if (this.selectionTypeForActions === 'single') {
1811
+ this.selectedItemsChange.emit(this.selectedItemId.length === 0 ? 0 : 1);
1812
+ }
1813
+ else if (this.selectionTypeForActions === 'multi') {
1814
+ if (isSelectableForActions) {
1815
+ this.setSelectionItems(itemId, uniqItemId, isChecked);
1816
+ const currentList = this.isAllSelected
1817
+ ? this.unSelectedItems
1818
+ : this.selectedItems;
1819
+ const currentListCount = this.isAllSelected
1820
+ ? this.totalRows - currentList.size
1821
+ : currentList.size;
1822
+ this.selectedItemsChange.emit(currentListCount);
1823
+ }
1824
+ }
1825
+ // Raise selected item change event
1826
+ if (this.selectionTypeForActions !== 'none') {
1827
+ this.selectedItemChange.emit({
1828
+ id: itemId,
1829
+ selected: isChecked,
1830
+ });
1831
+ }
1832
+ }
1833
+ exportFunctionsOnHostElement() {
1834
+ // This is for web component usage for use those functions.
1835
+ this.hostElement.nativeElement.clear = this.clear.bind(this);
1836
+ this.hostElement.nativeElement.initListData = this.initListData.bind(this);
1837
+ this.hostElement.nativeElement.updateItems = this.updateItems.bind(this);
1838
+ this.hostElement.nativeElement.updatePage = this.updatePage.bind(this);
1839
+ this.hostElement.nativeElement.updateItem = this.updateItem.bind(this);
1840
+ }
1841
+ // For refresh the UI when change the is selectable for action on item.
1842
+ getisItemDisabled(item) {
1843
+ return this.printMode || this.lockItemInnerEvents || (item && !item.IsSelectableForActions);
1844
+ }
1845
+ getIsAllSelectedForActions() {
1846
+ let res = false;
1847
+ if (this.isAllSelected) {
1848
+ if (this.unSelectedItems.size === 0) {
1849
+ res = true;
1850
+ }
1851
+ }
1852
+ else {
1853
+ if (this.virtualScroller?.viewPortItems) {
1854
+ if (this.selectedItems.size === this.totalRows) {
1855
+ res = this.getIsAllSelected(this.virtualScroller.viewPortItems);
1856
+ }
1857
+ else if (this.selectedItems.size < this.totalRows) {
1858
+ for (const item of this.virtualScroller.viewPortItems) {
1859
+ res =
1860
+ item && this.selectedItems.has(item?.UID.toString());
1861
+ if (!res) {
1862
+ break;
1863
+ }
1864
+ }
1865
+ }
1866
+ }
1867
+ }
1868
+ return res;
1869
+ }
1870
+ setIsAllSelected(isChecked) {
1871
+ if (this.selectionTypeForActions === 'multi') {
1872
+ this.selectAllCB.checked = isChecked;
1873
+ this.isAllSelected = isChecked;
1874
+ }
1875
+ }
1876
+ selectAllItemsForActions(e) {
1877
+ // For material checkbox || radio.
1878
+ const isChecked = e.source.checked;
1879
+ // Indeterminate mode
1880
+ let isIndeterminate = false;
1881
+ const currentList = this.isAllSelected
1882
+ ? this.unSelectedItems
1883
+ : this.selectedItems;
1884
+ if (currentList.size > 0) {
1885
+ isIndeterminate = true;
1886
+ this.isAllSelected = false;
1887
+ this.selectedItemsChange.emit(0);
1888
+ e.source.checked = false;
1889
+ }
1890
+ this.selectedItems.clear();
1891
+ this.unSelectedItems.clear();
1892
+ if (!isIndeterminate) {
1893
+ this.isAllSelected = isChecked;
1894
+ this.selectAllClick.emit(isChecked);
1895
+ if (this.selectionTypeForActions === 'multi') {
1896
+ if (!isChecked) {
1897
+ this.selectedItemsChange.emit(0);
1898
+ this.selectedItemId = '';
1899
+ }
1900
+ else {
1901
+ const filteredItems = this.items.filter((item) => item && item.IsSelectableForActions);
1902
+ this.selectedItemsChange.emit(filteredItems.length);
1903
+ }
1904
+ }
1905
+ }
1906
+ else {
1907
+ // Remove all
1908
+ if (this.selectionTypeForActions === 'multi') {
1909
+ this.selectAllClick.emit(false);
1910
+ }
1911
+ }
1912
+ }
1913
+ raiseStartIndexChange(startIndex = 0) {
1914
+ // this.startIndex = startIndex;
1915
+ this.startIndexChange.emit({ startIndex });
1916
+ }
1917
+ getIsItemSelected(item) {
1918
+ let isSelected = false;
1919
+ if (item) {
1920
+ if (this.selectionTypeForActions === 'single') {
1921
+ isSelected = this.selectedItemId === this.getUniqItemId(item.UID, item.Type.toString());
1922
+ }
1923
+ else if (this.selectionTypeForActions === 'multi') {
1924
+ if (item.IsSelectableForActions) {
1925
+ isSelected = (this.isAllSelected && !this.unSelectedItems.has(item.UID)) || this.selectedItems.has(item.UID);
1926
+ }
1927
+ }
1928
+ }
1929
+ return isSelected;
1930
+ }
1931
+ selectItemForActions(e, itemId, isSelectableForActions, itemType = '') {
1932
+ // For material checkbox || radio.
1933
+ const isChecked = e.source.checked;
1934
+ this.setItemClicked(itemId, isSelectableForActions, itemType, isChecked);
1935
+ }
1936
+ itemClicked(e, item) {
1937
+ // Set seleted item
1938
+ const itemId = item?.UID.toString();
1939
+ const itemType = item?.Type.toString();
1940
+ let isChecked = false;
1941
+ if (item && item.IsSelectableForActions) {
1942
+ this.selectedItemId = this.getUniqItemId(itemId, itemType);
1943
+ isChecked = true;
1944
+ }
1945
+ if (this.isTable) {
1946
+ if (this.selectionTypeForActions === 'single') {
1947
+ this.setItemClicked(itemId, item.IsSelectableForActions, itemType, isChecked);
1948
+ }
1949
+ else if (this.selectionTypeForActions === 'none') {
1950
+ // Just mark the row as highlighted
1951
+ this.setItemClicked(itemId, item.IsSelectableForActions, itemType, true);
1952
+ }
1953
+ }
1954
+ else {
1955
+ if (this.disabled) {
1956
+ return;
1957
+ }
1958
+ }
1959
+ this.itemClick.emit({ source: item, viewType: this.viewType });
1960
+ }
1961
+ onTableRowMouseEnter(event, itemId, itemType) {
1962
+ if (!this.deviceHasMouse) {
1963
+ return;
1964
+ }
1965
+ const uniqItemId = this.getUniqItemId(itemId, itemType);
1966
+ this.hoveredItemId = uniqItemId;
1967
+ }
1968
+ onTableRowMouseLeave(event, itemId, itemType) {
1969
+ this.hoveredItemId = '';
1970
+ }
1971
+ onCardMouseEnter(event, itemId, itemType) {
1972
+ if (!this.deviceHasMouse) {
1973
+ return;
1974
+ }
1975
+ const uniqItemId = this.getUniqItemId(itemId, itemType);
1976
+ this.hoveredItemId = uniqItemId;
1977
+ }
1978
+ onCardMouseLeave(event, itemId, itemType) {
1979
+ this.hoveredItemId = '';
1980
+ }
1981
+ // trackByFunc(index: number, item: ObjectsDataRow): any {
1982
+ // return item && item?.UID ? item?.UID : index;
1983
+ // // let res: string = "";
1984
+ // // if (item && item?.UID) {
1985
+ // // res = item?.UID + "_" + this.listType + "_" + (this.isTable ? "Table" : "Thumbnails");
1986
+ // // }
1987
+ // // else {
1988
+ // // res = index + "_" + this.listType + "_" + (this.isTable ? "Table" : "Thumbnails");
1989
+ // // }
1990
+ // // return res;
1991
+ // }
1992
+ clear() {
1993
+ this.cleanItems();
1994
+ this._layout = null;
1995
+ }
1996
+ setSelectedIds(selectedIds, items = null) {
1997
+ this.selectedItems.clear();
1998
+ this.isAllSelected = false;
1999
+ if (selectedIds) {
2000
+ // for (let i = 0; i < selected.length; i++) {
2001
+ for (const selectedId of selectedIds) {
2002
+ const tmp = selectedId.split(this.SEPARATOR);
2003
+ if (tmp && tmp.length > 0) {
2004
+ const itemId = tmp[0];
2005
+ const itemType = tmp.length > 1 ? tmp[1] : '';
2006
+ this.selectedItems.set(itemId, this.getUniqItemId(itemId, itemType));
2007
+ }
2008
+ }
2009
+ this.isAllSelected = this.getIsAllSelected(items ? items : this.virtualScroller?.viewPortItems);
2010
+ this.setSelectionDataInSession();
2011
+ }
2012
+ this.refresh();
2013
+ }
2014
+ setSelectionDataInSession() {
2015
+ if (this.selectedItems.size > 0) {
2016
+ this.sessionService.setObject(PepListComponent.SELECTED_ITEMS_STATE_KEY, JSON.stringify([...this.selectedItems]));
2017
+ }
2018
+ if (this.unSelectedItems.size > 0) {
2019
+ this.sessionService.setObject(PepListComponent.UN_SELECTED_ITEMS_STATE_KEY, JSON.stringify([...this.unSelectedItems]));
2020
+ }
2021
+ this.sessionService.setObject(PepListComponent.ALL_SELECTED_STATE_KEY, this.isAllSelected);
2022
+ }
2023
+ initListData(layout, totalRows, items) {
2024
+ this.initVariablesFromSession(items);
2025
+ const selectedItemsList = this.isAllSelected
2026
+ ? this.unSelectedItems
2027
+ : this.selectedItems;
2028
+ const currentListCount = this.isAllSelected
2029
+ ? this.totalRows - selectedItemsList.size
2030
+ : selectedItemsList.size;
2031
+ this.selectedItemsChange.emit(currentListCount);
2032
+ this._layout = layout;
2033
+ this.selectedItemId = '';
2034
+ this.totalRows = totalRows;
2035
+ // 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.
2036
+ // We need this in setTimeout cause the selectionTypeForActions is input that can set after this function.
2037
+ setTimeout(() => {
2038
+ if (!this.isAllSelected && this.selectedItems.size === 1 && this.selectionTypeForActions === 'single') {
2039
+ this.selectedItemId = this.selectedItems.values()[0];
2040
+ }
2041
+ }, 0);
2042
+ this.scrollToTop(false);
2043
+ this.cleanItems();
2044
+ this.disableScroll(true);
2045
+ if (items) {
2046
+ if (this.pagerType === 'pages') {
2047
+ // If page index out of bounds - init to 0.
2048
+ const numberOfPages = Math.ceil(totalRows / this.pageSize);
2049
+ if (this.pageIndex >= numberOfPages) {
2050
+ this.pageIndex = 0;
2051
+ }
2052
+ this.updatePage(items, {
2053
+ pageIndex: this.pageIndex,
2054
+ pageSize: this.pageSize,
2055
+ });
2056
+ this.disableScroll(false);
2057
+ }
2058
+ else {
2059
+ const numberOfStartItems = this.getNumberOfStartItems();
2060
+ const event = {
2061
+ fromIndex: 0,
2062
+ toIndex: numberOfStartItems,
2063
+ };
2064
+ this.updateItems(items, event);
2065
+ if (this.virtualScroller) {
2066
+ this.refresh(() => {
2067
+ this.calcObjectHeight();
2068
+ });
2069
+ }
2070
+ else {
2071
+ this.calcObjectHeight();
2072
+ }
2073
+ }
2074
+ }
2075
+ if (!this.isTable) {
2076
+ this.lastColumnsWidth = [];
2077
+ }
2078
+ this.setLayout();
2079
+ // setTimeout(() => {
2080
+ this.onListLoad();
2081
+ // }, 0);
2082
+ }
2083
+ updateItems(items, event = null) {
2084
+ if (!event) {
2085
+ return; // Event isn't supplied.
2086
+ }
2087
+ // Clean array
2088
+ if (this.itemsCounter + items.length > this.getCachedItemsNumber()) {
2089
+ this.cleanItems();
2090
+ }
2091
+ const startIndex = event.fromIndex ?? 0;
2092
+ for (let i = 0; i < items.length; i++) {
2093
+ if (!this.items[i + startIndex]) {
2094
+ this.items[i + startIndex] = items[i];
2095
+ this.itemsCounter += 1;
2096
+ }
2097
+ }
2098
+ this.toggleLoadingItemsFropApi(false);
2099
+ }
2100
+ updatePage(items, event) {
2101
+ if (!event) {
2102
+ return; // Event isn't supplied.
2103
+ }
2104
+ // Clean array
2105
+ if (this.itemsCounter + items.length > this.getCachedItemsNumber()) {
2106
+ this.cleanItems();
2107
+ }
2108
+ // const loadInChunks = this.itemsCounter === 0;
2109
+ const startIndex = Math.min(event.pageIndex * event.pageSize, this.totalRows);
2110
+ const endIndex = Math.min(startIndex + event.pageSize, this.totalRows);
2111
+ for (let i = 0; i < items.length; i++) {
2112
+ if (!this.items[i + startIndex]) {
2113
+ this.items[i + startIndex] = items[i];
2114
+ this.itemsCounter += 1;
2115
+ }
2116
+ }
2117
+ this.updateCurrentPageItems(startIndex, endIndex);
2118
+ this.toggleLoadingItemsFropApi(false);
2119
+ }
2120
+ updateItem(data) {
2121
+ const index = this.items.findIndex((i) => i && i?.UID === data?.UID);
2122
+ if (index >= 0 && index < this.items.length) {
2123
+ this.updateItemProperties(this.items[index], data);
2124
+ }
2125
+ }
2126
+ scrollToIndex(index, alignToBeginning = true, additionalOffset = 0, animationMilliseconds = undefined, animationCompletedCallback = undefined) {
2127
+ this.virtualScroller?.scrollToIndex(index, alignToBeginning, additionalOffset, animationMilliseconds, animationCompletedCallback);
2128
+ }
2129
+ updateItemProperties(itemToUpdate, data) {
2130
+ Object.assign(itemToUpdate, data);
2131
+ }
2132
+ getSelectedItemsData(isForEdit = false) {
2133
+ const res = new PepSelectionData();
2134
+ let selectionType = 1;
2135
+ const items = [];
2136
+ const itemTypes = [];
2137
+ if (this.selectionTypeForActions === 'single') {
2138
+ if (this.selectedItemId.length > 0) {
2139
+ const tmp = this.selectedItemId.split(this.SEPARATOR);
2140
+ items.push(tmp[0]);
2141
+ itemTypes.push(tmp[1]);
2142
+ }
2143
+ }
2144
+ else if (this.selectionTypeForActions === 'multi') {
2145
+ let currentList = [];
2146
+ // For edit - only the selected items.
2147
+ if (isForEdit) {
2148
+ if (!this.isAllSelected) {
2149
+ currentList = Array.from(this.selectedItems.values());
2150
+ }
2151
+ else {
2152
+ // Get the id's of the items that not founded in unSelectedItems.
2153
+ this.items.forEach((item) => {
2154
+ if (item &&
2155
+ !this.unSelectedItems.has(item?.UID.toString())) {
2156
+ currentList.push(this.getUniqItemId(item?.UID.toString(), item?.Type.toString()));
2157
+ }
2158
+ });
2159
+ }
2160
+ }
2161
+ else {
2162
+ // For delete - can be the unselected with select_all functionality.
2163
+ currentList = Array.from(this.isAllSelected
2164
+ ? this.unSelectedItems.values()
2165
+ : this.selectedItems.values());
2166
+ selectionType = this.isAllSelected ? 0 : 1;
2167
+ }
2168
+ currentList.forEach((item) => {
2169
+ const tmp = item.split(this.SEPARATOR);
2170
+ if (tmp.length === 2) {
2171
+ items.push(tmp[0]);
2172
+ itemTypes.push(tmp[1]);
2173
+ }
2174
+ });
2175
+ }
2176
+ res.selectionType = selectionType;
2177
+ res.rows = items;
2178
+ res.rowTypes = itemTypes;
2179
+ return res;
2180
+ }
2181
+ getIsItemEditable(uid) {
2182
+ const item = this.items.filter((x) => x?.UID.toString() === uid);
2183
+ if (item.length > 0) {
2184
+ return item[0].IsEditable;
2185
+ }
2186
+ else {
2187
+ return false;
2188
+ }
2189
+ }
2190
+ getItemDataByID(uid) {
2191
+ return this.items.find((item) => item?.UID.toString() === uid);
2192
+ }
2193
+ refresh(refreshCompletedCallback = undefined) {
2194
+ this.virtualScroller?.refresh(refreshCompletedCallback);
2195
+ }
2196
+ // ---------------------------------------------------------------
2197
+ // Events handlers.
2198
+ // ---------------------------------------------------------------
2199
+ onWinResize(e) {
2200
+ this.refresh();
2201
+ this.containerWidth = 0;
2202
+ this.lastColumnsWidth = [];
2203
+ this.setLayout();
2204
+ }
2205
+ onListResizeStart(event, columnKey, columnIndex) {
2206
+ this.pressedColumn = columnKey;
2207
+ this.pressedColumnIndex = columnIndex;
2208
+ this.startX = event.x;
2209
+ this.startWidth = event.target.closest('.header-column').offsetWidth;
2210
+ this.tableStartWidth = this.hostElement.nativeElement.offsetWidth; // this.virtualScroller?.contentElementRef.nativeElement.offsetWidth;
2211
+ console.log(`tableStartWidth - ${this.tableStartWidth}`);
2212
+ }
2213
+ onListResize(event) {
2214
+ // if (this.pressedColumn.length > 0) {
2215
+ if (this.pressedColumnIndex >= 0) {
2216
+ let widthToAdd = this.layoutService.isRtl() ? this.startX - event.x : event.x - this.startX;
2217
+ // Set the width of the column and the container of the whole columns.
2218
+ if (this.startWidth + widthToAdd >= PepListComponent.MINIMUM_COLUMN_WIDTH || widthToAdd > 0) {
2219
+ const length = this._layout.ControlFields.length;
2220
+ let totalCalcColsWidth = 0;
2221
+ for (let index = 0; index < length; index++) {
2222
+ const uiControlField = this._layout
2223
+ .ControlFields[index];
2224
+ if (index === length - 1) {
2225
+ // Calc the last column only in percentage type.
2226
+ if (this.hasColumnWidthOfTypePercentage) {
2227
+ const scrollWidth = this.layoutService.getScrollbarWidth();
2228
+ widthToAdd += scrollWidth;
2229
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString = 'calc(100% - ' + (totalCalcColsWidth + scrollWidth) + 'px)'; // For 100%
2230
+ }
2231
+ else {
2232
+ // if (uiControlField.ApiName === this.pressedColumn) {
2233
+ if (index === this.pressedColumnIndex) {
2234
+ uiControlField.calcColumnWidth = this.startWidth + widthToAdd;
2235
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidth + 'px';
2236
+ uiControlField.calcColumnWidthString = uiControlField.calcColumnWidth + 'px';
2237
+ }
2238
+ }
2239
+ // } else if (uiControlField.ApiName === this.pressedColumn) {
2240
+ }
2241
+ else if (index === this.pressedColumnIndex) {
2242
+ uiControlField.calcColumnWidth = this.startWidth + widthToAdd;
2243
+ uiControlField.calcTitleColumnWidthString = uiControlField.calcColumnWidthString = uiControlField.calcColumnWidth + 'px';
2244
+ }
2245
+ totalCalcColsWidth += uiControlField.calcColumnWidth;
2246
+ }
2247
+ const widthToSet = (this.tableStartWidth + widthToAdd) + 'px';
2248
+ console.log(`onListResize -> widthToSet: ${widthToSet} *** widthToAdd: ${widthToAdd}`);
2249
+ this.setColumnsWidth(widthToSet);
2250
+ this.checkForChanges = new Date().getTime();
2251
+ }
2252
+ }
2253
+ }
2254
+ onListResizeEnd(event) {
2255
+ // if (this.pressedColumn.length > 0) {
2256
+ if (this.pressedColumnIndex >= 0) {
2257
+ if (event &&
2258
+ this.getParent(event.srcElement, 'resize-box').length > 0) {
2259
+ this.initResizeData();
2260
+ }
2261
+ else {
2262
+ // Set timeout 0 for onListSortingChange will have the pressedColumn.
2263
+ setTimeout(() => {
2264
+ this.initResizeData();
2265
+ }, 0);
2266
+ }
2267
+ this.lastColumnsWidth = [];
2268
+ // Set the last columns width
2269
+ for (let index = 0; index < this._layout.ControlFields.length; index++) {
2270
+ const uiControlField = this._layout.ControlFields[index];
2271
+ this.lastColumnsWidth.push({
2272
+ columnAPIName: uiControlField.ApiName,
2273
+ calcColumnWidth: uiControlField.calcColumnWidth,
2274
+ calcTitleColumnWidthString: uiControlField.calcTitleColumnWidthString,
2275
+ calcColumnWidthString: uiControlField.calcColumnWidthString
2276
+ });
2277
+ }
2278
+ event.stopPropagation();
2279
+ }
2280
+ }
2281
+ onListSortingChange(sortBy, isAsc, event = null) {
2282
+ if (
2283
+ // this.pressedColumn.length > 0 ||
2284
+ this.pressedColumnIndex >= 0 ||
2285
+ (event && this.getParent(event.srcElement, 'resize-box').length > 0)) {
2286
+ return;
2287
+ }
2288
+ if (this.sortBy !== sortBy || this.isAsc !== isAsc) {
2289
+ this.sortBy = sortBy;
2290
+ this.isAsc = isAsc;
2291
+ this.saveSortingToSession();
2292
+ this.sortingChange.emit({ sortBy, isAsc });
2293
+ }
2294
+ }
2295
+ onListHeaderMouseEnter(event) {
2296
+ // this.headerIsInFocus = true;
2297
+ }
2298
+ onListHeaderMouseLeave(event) {
2299
+ // this.headerIsInFocus = false;
2300
+ this.onListResizeEnd(event);
2301
+ this.initResizeData();
2302
+ }
2303
+ onPagerChange(event) {
2304
+ this.pageIndex = event.pageIndex;
2305
+ // Scroll to top.
2306
+ this.scrollToTop();
2307
+ const startIndex = event.pageIndex * event.pageSize;
2308
+ const endIndex = Math.min(startIndex + event.pageSize, this.totalRows);
2309
+ let shouldGetItemsFromApi = false;
2310
+ let index = startIndex;
2311
+ while (!shouldGetItemsFromApi && index < endIndex) {
2312
+ if (!this.items[index]) {
2313
+ shouldGetItemsFromApi = true;
2314
+ }
2315
+ index++;
2316
+ }
2317
+ // Get bulk from api.
2318
+ if (shouldGetItemsFromApi) {
2319
+ if (!this.loadingItemsFromApi) {
2320
+ this.toggleLoadingItemsFropApi(true);
2321
+ this.loadPage.emit({
2322
+ pageIndex: event.pageIndex,
2323
+ pageSize: event.pageSize,
2324
+ });
2325
+ }
2326
+ }
2327
+ else {
2328
+ setTimeout(() => {
2329
+ this.updateCurrentPageItems(startIndex, endIndex);
2330
+ }, this.scrollAnimationTime);
2331
+ }
2332
+ }
2333
+ onVirtualScrollerChange(event) {
2334
+ this.raiseStartIndexChange(event.startIndex);
2335
+ if (this.pagerType === 'scroll') {
2336
+ // For other events do nothing.
2337
+ if (typeof event.startIndex === 'undefined' || event.startIndex < 0 ||
2338
+ typeof event.endIndex === 'undefined' || event.endIndex < 0) {
2339
+ return;
2340
+ }
2341
+ const addAtStart = event.scrollDirection === 'backward';
2342
+ let shouldGetItemsFromApi = false;
2343
+ let indexOfMissingItem;
2344
+ if (addAtStart) {
2345
+ indexOfMissingItem = event.endIndex;
2346
+ while (!shouldGetItemsFromApi && indexOfMissingItem >= event.startIndex) {
2347
+ if (!this.items[indexOfMissingItem]) {
2348
+ shouldGetItemsFromApi = true;
2349
+ }
2350
+ if (!shouldGetItemsFromApi) {
2351
+ indexOfMissingItem--;
2352
+ }
2353
+ }
2354
+ }
2355
+ else {
2356
+ indexOfMissingItem = event.startIndex;
2357
+ while (!shouldGetItemsFromApi && indexOfMissingItem <= event.endIndex) {
2358
+ if (!this.items[indexOfMissingItem]) {
2359
+ shouldGetItemsFromApi = true;
2360
+ }
2361
+ if (!shouldGetItemsFromApi) {
2362
+ indexOfMissingItem++;
2363
+ }
2364
+ }
2365
+ }
2366
+ // Get bulk from api.
2367
+ if (shouldGetItemsFromApi) {
2368
+ if (!this.loadingItemsFromApi) {
2369
+ this.toggleLoadingItemsFropApi(true);
2370
+ const top = this.getTopItems() - 1;
2371
+ const fromIndex = addAtStart ? Math.max(indexOfMissingItem - top, 0) : indexOfMissingItem;
2372
+ const toIndex = addAtStart ? indexOfMissingItem : Math.min(indexOfMissingItem + top, this.totalRows);
2373
+ this.loadItems.emit({
2374
+ fromIndex,
2375
+ toIndex,
2376
+ });
2377
+ }
2378
+ }
2379
+ }
2380
+ }
2381
+ onListLoad() {
2382
+ setTimeout(() => {
2383
+ this.listLoad.emit();
2384
+ }, 0);
2385
+ }
2386
+ // onChildRectChange(event: any) {
2387
+ // // Set the calculatedObjectHeight only if he's not set (this case is only for the initialize when virtual scroll is undefined).
2388
+ // // the other cases is handled in calcObjectHeight function.
2389
+ // if (this.calculatedObjectHeight === 'auto') {
2390
+ // this.calculatedObjectHeight = event?.height + 'px';
2391
+ // }
2392
+ // }
2393
+ onValueChanged(valueChange) {
2394
+ if (this.disabled) {
2395
+ return;
2396
+ }
2397
+ this.valueChange.emit(valueChange);
2398
+ }
2399
+ onCustomizeFieldClick(customizeFieldClickedData) {
2400
+ if (this.disabled) {
2401
+ return;
2402
+ }
2403
+ this.fieldClick.emit(customizeFieldClickedData);
2404
+ }
2405
+ }
2406
+ PepListComponent.TOP_ITEMS_DEFAULT = 100;
2407
+ PepListComponent.TOP_ITEMS_TABLE = 100;
2408
+ PepListComponent.TOP_ITEMS_THUMBNAILS = 100;
2409
+ PepListComponent.TOP_ITEMS_ARRAY = 2500;
2410
+ PepListComponent.SELECTED_ITEMS_STATE_KEY = 'SelectedItems';
2411
+ PepListComponent.UN_SELECTED_ITEMS_STATE_KEY = 'UnSelectedItems';
2412
+ PepListComponent.ALL_SELECTED_STATE_KEY = 'AllSelected';
2413
+ PepListComponent.SORT_BY_STATE_KEY = 'SortBy';
2414
+ PepListComponent.ASCENDING_STATE_KEY = 'IsAscending';
2415
+ PepListComponent.MINIMUM_COLUMN_WIDTH = 72;
2416
+ 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 });
2417
+ 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" }] });
2418
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListComponent, decorators: [{
2419
+ type: Component,
2420
+ args: [{ selector: 'pep-list', host: {
2421
+ '(window:resize)': 'onWinResize($event)',
2422
+ }, 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"] }]
2423
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.PepLayoutService }, { type: i1.PepSessionService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { sorting: [{
2424
+ type: Input
2425
+ }], cacheSize: [{
2426
+ type: Input
2427
+ }], noDataFoundMsg: [{
2428
+ type: Input
2429
+ }], selectionTypeForActions: [{
2430
+ type: Input
2431
+ }], showCardSelection: [{
2432
+ type: Input
2433
+ }], hideAllSelectionInMulti: [{
2434
+ type: Input
2435
+ }], cardSize: [{
2436
+ type: Input
2437
+ }], tableViewType: [{
2438
+ type: Input
2439
+ }], viewType: [{
2440
+ type: Input
2441
+ }], firstFieldAsLink: [{
2442
+ type: Input
2443
+ }], supportSorting: [{
2444
+ type: Input
2445
+ }], supportResizing: [{
2446
+ type: Input
2447
+ }], parentScroll: [{
2448
+ type: Input
2449
+ }], disabled: [{
2450
+ type: Input
2451
+ }], lockEvents: [{
2452
+ type: Input
2453
+ }], lockItemInnerEvents: [{
2454
+ type: Input
2455
+ }], printMode: [{
2456
+ type: Input
2457
+ }], isReport: [{
2458
+ type: Input
2459
+ }], zebraStripes: [{
2460
+ type: Input
2461
+ }], totalsRow: [{
2462
+ type: Input
2463
+ }], pagerType: [{
2464
+ type: Input
2465
+ }], pageSize: [{
2466
+ type: Input
2467
+ }], pageIndex: [{
2468
+ type: Input
2469
+ }], bufferAmount: [{
2470
+ type: Input
2471
+ }], scrollAnimationTime: [{
2472
+ type: Input
2473
+ }], scrollDebounceTime: [{
2474
+ type: Input
2475
+ }], scrollThrottlingTime: [{
2476
+ type: Input
2477
+ }], useAsWebComponent: [{
2478
+ type: Input
2479
+ }], itemClick: [{
2480
+ type: Output
2481
+ }], fieldClick: [{
2482
+ type: Output
2483
+ }], valueChange: [{
2484
+ type: Output
2485
+ }], sortingChange: [{
2486
+ type: Output
2487
+ }], selectedItemsChange: [{
2488
+ type: Output
2489
+ }], selectedItemChange: [{
2490
+ type: Output
2491
+ }], selectAllClick: [{
2492
+ type: Output
2493
+ }], listLoad: [{
2494
+ type: Output
2495
+ }], loadItems: [{
2496
+ type: Output
2497
+ }], loadPage: [{
2498
+ type: Output
2499
+ }], startIndexChange: [{
2500
+ type: Output
2501
+ }], virtualScroller: [{
2502
+ type: ViewChild,
2503
+ args: [VirtualScrollerComponent]
2504
+ }], selectAllCB: [{
2505
+ type: ViewChild,
2506
+ args: ['selectAllCB']
2507
+ }] } });
2508
+
2509
+ class PepListActionsComponent {
2510
+ constructor() {
2511
+ this.actions = null;
2512
+ this.sizeType = 'md';
2513
+ this.xPosition = 'before';
2514
+ this.hidden = false;
2515
+ this.actionClick = new EventEmitter();
2516
+ this.stateChange = new EventEmitter();
2517
+ this.menuClick = new EventEmitter();
2518
+ }
2519
+ onActionClicked(action) {
2520
+ this.actionClick.emit(action);
2521
+ }
2522
+ onStateChanged(menuStateChangeEvent) {
2523
+ this.stateChange.emit(menuStateChangeEvent);
2524
+ }
2525
+ }
2526
+ PepListActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2527
+ 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"] }] });
2528
+ PepListActionsComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListActionsComponent });
2529
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListActionsComponent, decorators: [{
2530
+ type: Component,
2531
+ 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" }]
2532
+ }, {
2533
+ type: Injectable
2534
+ }], propDecorators: { actions: [{
2535
+ type: Input
2536
+ }], sizeType: [{
2537
+ type: Input
2538
+ }], xPosition: [{
2539
+ type: Input
2540
+ }], hidden: [{
2541
+ type: Input
2542
+ }], actionClick: [{
2543
+ type: Output
2544
+ }], stateChange: [{
2545
+ type: Output
2546
+ }], menuClick: [{
2547
+ type: Output
2548
+ }] } });
2549
+
2550
+ class PepListCarouselComponent {
2551
+ // deviceHasMouse = false;
2552
+ constructor(layoutService) {
2553
+ this.layoutService = layoutService;
2554
+ this.duration = 1000;
2555
+ this.layout = null;
2556
+ this.itemsToMove = 3;
2557
+ this.lockItemInnerEvents = true;
2558
+ this.hideArrowsInSmallScreen = true;
2559
+ this._items = null;
2560
+ this._itemSize = 'xs';
2561
+ this.itemClick = new EventEmitter();
2562
+ this.prevDisabled = false;
2563
+ this.nextDisabled = false;
2564
+ this.PepScreenSizeType = PepScreenSizeType;
2565
+ // this.deviceHasMouse = this.layoutService.getDeviceHasMouse();
2566
+ }
2567
+ set items(value) {
2568
+ this._items = value;
2569
+ this.moveTo(0);
2570
+ }
2571
+ get items() {
2572
+ return this._items;
2573
+ }
2574
+ set itemSize(value) {
2575
+ this._itemSize = value;
2576
+ this.moveTo(0);
2577
+ }
2578
+ get itemSize() {
2579
+ return this._itemSize;
2580
+ }
2581
+ ngAfterViewInit() {
2582
+ this.layoutService.onResize$.subscribe((size) => {
2583
+ this.screenSize = size;
2584
+ });
2585
+ // this.layoutService.onMouseOver$.subscribe((deviceHasMouse: boolean) => {
2586
+ // this.deviceHasMouse = deviceHasMouse;
2587
+ // });
2588
+ }
2589
+ ngOnDestroy() {
2590
+ // if (this.itemClick) {
2591
+ // this.itemClick.unsubscribe();
2592
+ // }
2593
+ }
2594
+ itemClicked(item) {
2595
+ this.itemClick.emit({ source: item });
2596
+ }
2597
+ moveLeft() {
2598
+ // this.carousel.moveLeft();
2599
+ const indexToMove = Math.max(this.carousel.currIndex - this.itemsToMove, 0);
2600
+ this.moveTo(indexToMove);
2601
+ }
2602
+ moveRight() {
2603
+ // this.carousel.moveRight();
2604
+ const indexToMove = Math.min(this.carousel.currIndex + this.itemsToMove, this.items.length);
2605
+ this.moveTo(indexToMove);
2606
+ }
2607
+ moveTo(index) {
2608
+ if (this.carousel) {
2609
+ this.carousel.moveTo(index);
2610
+ }
2611
+ }
2612
+ onReachesLeftBound(event) {
2613
+ this.prevDisabled = event;
2614
+ }
2615
+ onReachesRightBound(event) {
2616
+ this.nextDisabled = event;
2617
+ }
2618
+ }
2619
+ PepListCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListCarouselComponent, deps: [{ token: i1.PepLayoutService }], target: i0.ɵɵFactoryTarget.Component });
2620
+ 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"] }] });
2621
+ PepListCarouselComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListCarouselComponent });
2622
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListCarouselComponent, decorators: [{
2623
+ type: Component,
2624
+ 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"] }]
2625
+ }, {
2626
+ type: Injectable
2627
+ }], ctorParameters: function () { return [{ type: i1.PepLayoutService }]; }, propDecorators: { duration: [{
2628
+ type: Input
2629
+ }], layout: [{
2630
+ type: Input
2631
+ }], itemsToMove: [{
2632
+ type: Input
2633
+ }], lockItemInnerEvents: [{
2634
+ type: Input
2635
+ }], hideArrowsInSmallScreen: [{
2636
+ type: Input
2637
+ }], items: [{
2638
+ type: Input
2639
+ }], itemSize: [{
2640
+ type: Input
2641
+ }], itemClick: [{
2642
+ type: Output
2643
+ }], carousel: [{
2644
+ type: ViewChild,
2645
+ args: ['carousel', { read: PepCarouselComponent }]
2646
+ }] } });
2647
+
2648
+ class IPepListChooserOption {
2649
+ }
2650
+ class PepListChooserComponent {
2651
+ constructor() {
2652
+ this._options = null;
2653
+ this._currentList = null;
2654
+ this.sizeType = 'md';
2655
+ this.change = new EventEmitter();
2656
+ this.breadCrumbsItems = null;
2657
+ this.menuItems = null;
2658
+ this.currentItem = null;
2659
+ }
2660
+ set options(value) {
2661
+ this._options = value;
2662
+ this.menuItems = value.map((opt) => {
2663
+ return { key: opt.key, text: opt.text };
2664
+ });
2665
+ if (this.menuItems?.length === 1) {
2666
+ this.breadCrumbsItems = [];
2667
+ this.breadCrumbsItems.push(new PepBreadCrumbItem({
2668
+ key: this.menuItems[0].key,
2669
+ text: this.menuItems[0].text,
2670
+ }));
2671
+ }
2672
+ }
2673
+ get options() {
2674
+ return this._options;
2675
+ }
2676
+ set currentList(value) {
2677
+ this._currentList = value;
2678
+ this.currentItem = this.menuItems.find((mi) => mi.key === value.key);
2679
+ }
2680
+ get currentList() {
2681
+ return this._currentList;
2682
+ }
2683
+ onMenuItemClicked(menuItemClickEvent) {
2684
+ this.currentList = this.options.find((list) => list.key === menuItemClickEvent.source.key);
2685
+ this.change.emit({ source: this.currentList });
2686
+ }
2687
+ }
2688
+ PepListChooserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListChooserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2689
+ 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"] }] });
2690
+ PepListChooserComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListChooserComponent });
2691
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListChooserComponent, decorators: [{
2692
+ type: Component,
2693
+ 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>" }]
2694
+ }, {
2695
+ type: Injectable
2696
+ }], propDecorators: { options: [{
2697
+ type: Input
2698
+ }], currentList: [{
2699
+ type: Input
2700
+ }], sizeType: [{
2701
+ type: Input
2702
+ }], change: [{
2703
+ type: Output
2704
+ }] } });
2705
+
2706
+ class IPepListSortingOption {
2707
+ }
2708
+ class PepListSortingComponent {
2709
+ constructor() {
2710
+ this._options = null;
2711
+ this._currentSorting = null;
2712
+ this.sizeType = 'md';
2713
+ this.change = new EventEmitter();
2714
+ this.menuItems = null;
2715
+ this.currentItem = null;
2716
+ }
2717
+ set options(value) {
2718
+ this._options = value;
2719
+ this.menuItems = value.map((opt) => {
2720
+ return { key: opt.sortBy, text: opt.title, iconName: opt.iconName };
2721
+ });
2722
+ }
2723
+ get options() {
2724
+ return this._options;
2725
+ }
2726
+ set currentSorting(value) {
2727
+ this._currentSorting = value;
2728
+ this.currentItem = this.menuItems.find((mi) => mi.key === value.sortBy);
2729
+ }
2730
+ get currentSorting() {
2731
+ return this._currentSorting;
2732
+ }
2733
+ ngOnInit() {
2734
+ if (this.currentSorting === null &&
2735
+ this.options &&
2736
+ this.options.length > 0) {
2737
+ this.currentSorting = this.options[0];
2738
+ }
2739
+ }
2740
+ onMenuItemClicked(menuItemClickEvent) {
2741
+ this.currentSorting = this.options.find((sorting) => sorting.sortBy === menuItemClickEvent.source.key);
2742
+ this.change.emit({ source: this.currentSorting });
2743
+ }
2744
+ }
2745
+ PepListSortingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListSortingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2746
+ 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" }] });
2747
+ PepListSortingComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListSortingComponent });
2748
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListSortingComponent, decorators: [{
2749
+ type: Component,
2750
+ 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"] }]
2751
+ }, {
2752
+ type: Injectable
2753
+ }], propDecorators: { options: [{
2754
+ type: Input
2755
+ }], currentSorting: [{
2756
+ type: Input
2757
+ }], sizeType: [{
2758
+ type: Input
2759
+ }], change: [{
2760
+ type: Output
2761
+ }] } });
2762
+
2763
+ class PepListTotalComponent {
2764
+ constructor() {
2765
+ this.totalRows = -1;
2766
+ this.totalAmount = -1;
2767
+ this.isMapView = false;
2768
+ this.sizeType = 'md';
2769
+ }
2770
+ }
2771
+ PepListTotalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListTotalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2772
+ 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" }] });
2773
+ PepListTotalComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListTotalComponent });
2774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListTotalComponent, decorators: [{
2775
+ type: Component,
2776
+ 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"] }]
2777
+ }, {
2778
+ type: Injectable
2779
+ }], propDecorators: { totalRows: [{
2780
+ type: Input
2781
+ }], totalAmount: [{
2782
+ type: Input
2783
+ }], isMapView: [{
2784
+ type: Input
2785
+ }], sizeType: [{
2786
+ type: Input
2787
+ }] } });
2788
+
2789
+ class IPepListView {
2790
+ }
2791
+ class PepListViewsComponent {
2792
+ constructor() {
2793
+ this._views = null;
2794
+ this._currentView = null;
2795
+ this.displayType = 'menu';
2796
+ this.styleType = 'weak';
2797
+ this.sizeType = 'md';
2798
+ this.classNames = '';
2799
+ this.change = new EventEmitter();
2800
+ this.menuItems = null;
2801
+ this.currentItem = null;
2802
+ }
2803
+ set views(value) {
2804
+ this._views = value;
2805
+ this.menuItems = value.map((opt) => {
2806
+ return { key: opt.key, text: opt.title, iconName: opt.iconName };
2807
+ });
2808
+ }
2809
+ get views() {
2810
+ return this._views;
2811
+ }
2812
+ set currentView(value) {
2813
+ this._currentView = value;
2814
+ if (this.displayType === 'menu') {
2815
+ this.currentItem = this.menuItems.find((mi) => mi.key === value.key);
2816
+ }
2817
+ }
2818
+ get currentView() {
2819
+ return this._currentView;
2820
+ }
2821
+ ngOnInit() {
2822
+ if (this.displayType === 'buttons') {
2823
+ if (this.currentView === null &&
2824
+ this.views &&
2825
+ this.views.length > 0) {
2826
+ this.currentView = this.views[0];
2827
+ }
2828
+ }
2829
+ }
2830
+ onMenuItemClicked(menuItemClickEvent) {
2831
+ this.currentView = this.views.find((list) => list.key === menuItemClickEvent.source.key);
2832
+ this.raiseChangeEvent();
2833
+ }
2834
+ onViewChanged(view) {
2835
+ this.currentView = view;
2836
+ this.raiseChangeEvent();
2837
+ }
2838
+ raiseChangeEvent() {
2839
+ this.change.emit({ source: this.currentView });
2840
+ }
2841
+ }
2842
+ PepListViewsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListViewsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2843
+ 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"] }] });
2844
+ PepListViewsComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListViewsComponent });
2845
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListViewsComponent, decorators: [{
2846
+ type: Component,
2847
+ 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"] }]
2848
+ }, {
2849
+ type: Injectable
2850
+ }], propDecorators: { views: [{
2851
+ type: Input
2852
+ }], currentView: [{
2853
+ type: Input
2854
+ }], displayType: [{
2855
+ type: Input
2856
+ }], styleType: [{
2857
+ type: Input
2858
+ }], sizeType: [{
2859
+ type: Input
2860
+ }], classNames: [{
2861
+ type: Input
2862
+ }], change: [{
2863
+ type: Output
2864
+ }] } });
2865
+
2866
+ class IsItemSelectedPipe {
2867
+ constructor() {
2868
+ this.SEPARATOR = ',';
2869
+ }
2870
+ getUniqItemId(itemId, itemType = '') {
2871
+ return itemId + this.SEPARATOR + itemType;
2872
+ }
2873
+ transform(item, selectionTypeForActions, selectedItemId, isAllSelected, selectedItems, unSelectedItems) {
2874
+ let isSelected = false;
2875
+ if (selectionTypeForActions === 'single') {
2876
+ isSelected = selectedItemId === this.getUniqItemId(item?.UID, item?.Type.toString());
2877
+ }
2878
+ // else if (selectionTypeForActions === 'single-action') {
2879
+ // isSelected = (isAllSelected && !unSelectedItems.has(item?.UID)) || selectedItems.has(item?.UID);
2880
+ // }
2881
+ else if (selectionTypeForActions === 'multi') {
2882
+ if (item?.IsSelectableForActions) {
2883
+ isSelected = (isAllSelected && !unSelectedItems.has(item?.UID)) || selectedItems.has(item?.UID);
2884
+ }
2885
+ }
2886
+ return isSelected;
2887
+ }
2888
+ }
2889
+ IsItemSelectedPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemSelectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2890
+ IsItemSelectedPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: IsItemSelectedPipe, name: "isItemSelected" });
2891
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemSelectedPipe, decorators: [{
2892
+ type: Pipe,
2893
+ args: [{
2894
+ name: 'isItemSelected'
2895
+ }]
2896
+ }] });
2897
+ class IsItemDisabledPipe {
2898
+ transform(item, lockItemInnerEvents, printMode) {
2899
+ return (printMode || lockItemInnerEvents || (item && !item.IsSelectableForActions));
2900
+ }
2901
+ }
2902
+ IsItemDisabledPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemDisabledPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2903
+ IsItemDisabledPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: IsItemDisabledPipe, name: "isItemDisabled" });
2904
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: IsItemDisabledPipe, decorators: [{
2905
+ type: Pipe,
2906
+ args: [{
2907
+ name: 'isItemDisabled'
2908
+ }]
2909
+ }] });
2910
+
2911
+ const listComponents = [
2912
+ // PepListOldComponent,
2913
+ PepListComponent,
2914
+ PepListActionsComponent,
2915
+ PepListCarouselComponent,
2916
+ PepListChooserComponent,
2917
+ PepListPagerComponent,
2918
+ PepListSortingComponent,
2919
+ PepListTotalComponent,
2920
+ PepListViewsComponent,
2921
+ ];
2922
+ const listPipes = [
2923
+ IsItemSelectedPipe,
2924
+ IsItemDisabledPipe
2925
+ ];
2926
+ // import { PepVirtualScrollComponent } from './virtual-scroll.component';
2927
+ class PepListModule {
2928
+ constructor(pepIconRegistry) {
2929
+ this.pepIconRegistry = pepIconRegistry;
2930
+ this.pepIconRegistry.registerIcons([
2931
+ pepIconArrowDown,
2932
+ pepIconArrowEither,
2933
+ pepIconArrowUp,
2934
+ pepIconSystemMust,
2935
+ pepIconArrowRight,
2936
+ pepIconArrowRightAlt,
2937
+ pepIconArrowLeft,
2938
+ pepIconArrowLeftAlt,
2939
+ ]);
2940
+ }
2941
+ }
2942
+ PepListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListModule, deps: [{ token: i5.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
2943
+ PepListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepListModule, declarations: [
2944
+ // PepListOldComponent,
2945
+ PepListComponent,
2946
+ PepListActionsComponent,
2947
+ PepListCarouselComponent,
2948
+ PepListChooserComponent,
2949
+ PepListPagerComponent,
2950
+ PepListSortingComponent,
2951
+ PepListTotalComponent,
2952
+ PepListViewsComponent, IsItemSelectedPipe,
2953
+ IsItemDisabledPipe], imports: [CommonModule,
2954
+ // Material modules,
2955
+ MatCommonModule,
2956
+ MatButtonModule,
2957
+ MatCheckboxModule,
2958
+ MatRadioModule,
2959
+ MatIconModule,
2960
+ MatMenuModule,
2961
+ // ngx-lib modules
2962
+ PepNgxLibModule,
2963
+ PepBreadCrumbsModule,
2964
+ PepButtonModule,
2965
+ PepCarouselModule,
2966
+ PepIconModule,
2967
+ PepFormModule,
2968
+ PepMenuModule,
2969
+ PepTextboxModule,
2970
+ VirtualScrollerModule], exports: [
2971
+ // PepListOldComponent,
2972
+ PepListComponent,
2973
+ PepListActionsComponent,
2974
+ PepListCarouselComponent,
2975
+ PepListChooserComponent,
2976
+ PepListPagerComponent,
2977
+ PepListSortingComponent,
2978
+ PepListTotalComponent,
2979
+ PepListViewsComponent] });
2980
+ PepListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListModule, imports: [CommonModule,
2981
+ // Material modules,
2982
+ MatCommonModule,
2983
+ MatButtonModule,
2984
+ MatCheckboxModule,
2985
+ MatRadioModule,
2986
+ MatIconModule,
2987
+ MatMenuModule,
2988
+ // ngx-lib modules
2989
+ PepNgxLibModule,
2990
+ PepBreadCrumbsModule,
2991
+ PepButtonModule,
2992
+ PepCarouselModule,
2993
+ PepIconModule,
2994
+ PepFormModule,
2995
+ PepMenuModule,
2996
+ PepTextboxModule,
2997
+ VirtualScrollerModule] });
2998
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepListModule, decorators: [{
2999
+ type: NgModule,
3000
+ args: [{
3001
+ imports: [
3002
+ CommonModule,
3003
+ // Material modules,
3004
+ MatCommonModule,
3005
+ MatButtonModule,
3006
+ MatCheckboxModule,
3007
+ MatRadioModule,
3008
+ MatIconModule,
3009
+ MatMenuModule,
3010
+ // ngx-lib modules
3011
+ PepNgxLibModule,
3012
+ PepBreadCrumbsModule,
3013
+ PepButtonModule,
3014
+ PepCarouselModule,
3015
+ PepIconModule,
3016
+ PepFormModule,
3017
+ PepMenuModule,
3018
+ PepTextboxModule,
3019
+ VirtualScrollerModule
3020
+ ],
3021
+ exports: [listComponents],
3022
+ declarations: [listComponents, listPipes],
3023
+ }]
3024
+ }], ctorParameters: function () { return [{ type: i5.PepIconRegistry }]; } });
3025
+
3026
+ /*
3027
+ * Public API Surface of ngx-lib/list
3028
+ */
3029
+
3030
+ /**
3031
+ * Generated bundle index. Do not edit.
3032
+ */
3033
+
3034
+ export { DEFAULT_PAGE_SIZE, IPepListChooserOption, IPepListPagerChangeEvent, IPepListSortingOption, IPepListView, PepListActionsComponent, PepListCarouselComponent, PepListChooserComponent, PepListComponent, PepListModule, PepListPagerComponent, PepListSortingComponent, PepListTotalComponent, PepListViewsComponent, PepSelectionData };
3035
+ //# sourceMappingURL=pepperi-addons-ngx-lib-list.mjs.map