@dropi/ui-components 1.0.12 → 1.0.13

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 (255) hide show
  1. package/README.md +55 -36
  2. package/dist/README.md +58 -38
  3. package/dist/components-source/accordion/accordion-item/accordion-item.component.d.ts +31 -0
  4. package/dist/components-source/accordion/accordion.component.d.ts +26 -0
  5. package/dist/components-source/alert/alert.component.d.ts +32 -0
  6. package/dist/components-source/alert-modal/alert-modal.component.d.ts +78 -0
  7. package/dist/components-source/alert-validation/alert-validation.component.d.ts +21 -0
  8. package/dist/components-source/badge/badge.component.d.ts +12 -0
  9. package/dist/components-source/beta-tag/beta-tag.component.d.ts +5 -0
  10. package/dist/components-source/breadcrumb/breadcrumb.component.d.ts +11 -0
  11. package/dist/components-source/card-product/card-product.component.d.ts +204 -0
  12. package/dist/components-source/card-section/card-section.component.d.ts +31 -0
  13. package/dist/components-source/checkbox-selection-list/checkbox-selection-list.component.d.ts +26 -0
  14. package/dist/components-source/city-selector/city-selector.component.d.ts +17 -0
  15. package/dist/components-source/color-picker/color-picker.component.d.ts +73 -0
  16. package/dist/components-source/confirm-dialog/confirm-dialog.component.d.ts +10 -0
  17. package/dist/components-source/country-flags/country-flags.component.d.ts +12 -0
  18. package/dist/components-source/date-picker/date-picker.component.d.ts +27 -0
  19. package/dist/components-source/date-picker-range/date-picker-range.component.d.ts +26 -0
  20. package/dist/components-source/dropi-avatars/dropi-avatars.component.d.ts +11 -0
  21. package/dist/components-source/dropi-badge/dropi-badge.component.d.ts +29 -0
  22. package/dist/components-source/dropi-banner-external/dropi-banner-external.component.d.ts +19 -0
  23. package/dist/components-source/dropi-breadcrumb/dropi-breadcrumb.component.d.ts +22 -0
  24. package/dist/components-source/dropi-card-checkbox/dropi-card-checkbox.component.d.ts +20 -0
  25. package/dist/components-source/dropi-carousel/dropi-carousel.component.d.ts +52 -0
  26. package/dist/components-source/dropi-checkbox/dropi-checkbox.component.d.ts +11 -0
  27. package/dist/components-source/dropi-chips/dropi-chips.component.d.ts +17 -0
  28. package/dist/components-source/dropi-country-selector/countries.data.d.ts +6 -0
  29. package/dist/components-source/dropi-country-selector/dropi-country-selector.component.d.ts +90 -0
  30. package/dist/components-source/dropi-drawer/dropi-drawer.component.d.ts +20 -0
  31. package/dist/components-source/dropi-dropdown/dropi-dropdown.component.d.ts +20 -0
  32. package/dist/components-source/dropi-favorite-button/dropi-favorite-button.component.d.ts +12 -0
  33. package/dist/components-source/dropi-file-upload/card-view/card-view.component.d.ts +19 -0
  34. package/dist/components-source/dropi-file-upload/drop-zone/drop-zone.component.d.ts +38 -0
  35. package/dist/components-source/dropi-file-upload/dropi-file-upload.component.d.ts +18 -0
  36. package/dist/components-source/dropi-file-upload/file-list/file-list.component.d.ts +39 -0
  37. package/dist/components-source/dropi-file-upload/grid-view/grid-view.component.d.ts +15 -0
  38. package/dist/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.d.ts +20 -0
  39. package/dist/components-source/dropi-image-overlay/dropi-image-overlay.component.d.ts +8 -0
  40. package/dist/components-source/dropi-languages-selector/dropi-languages-selector.component.d.ts +18 -0
  41. package/dist/components-source/dropi-logo/dropi-logo.component.d.ts +12 -0
  42. package/dist/components-source/dropi-modal/dropi-modal.component.d.ts +34 -0
  43. package/dist/components-source/dropi-modal/p-template.directive.d.ts +9 -0
  44. package/dist/components-source/dropi-navbar/dropi-navbar.component.d.ts +20 -0
  45. package/dist/components-source/dropi-paginator/dropi-paginator.component.d.ts +21 -0
  46. package/dist/components-source/dropi-phone-input/dropi-phone-input.component.d.ts +55 -0
  47. package/dist/components-source/dropi-radio-button/dropi-radio-button.component.d.ts +17 -0
  48. package/dist/components-source/dropi-search/dropi-search.component.d.ts +40 -0
  49. package/dist/components-source/dropi-select/dropi-select.component.d.ts +34 -0
  50. package/dist/components-source/dropi-skeleton/dropi-skeleton.component.d.ts +14 -0
  51. package/dist/components-source/dropi-steps/dropi-steps.component.d.ts +64 -0
  52. package/dist/components-source/dropi-switch/dropi-switch.component.d.ts +11 -0
  53. package/dist/components-source/dropi-table/dropi-table.component.d.ts +82 -0
  54. package/dist/components-source/dropi-tag/dropi-tag.component.d.ts +15 -0
  55. package/dist/components-source/dropi-text-area/dropi-text-area.component.d.ts +14 -0
  56. package/dist/components-source/dropi-tooltip/dropi-tooltip.component.d.ts +28 -0
  57. package/dist/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.d.ts +16 -0
  58. package/dist/components-source/empty/empty.component.d.ts +9 -0
  59. package/dist/components-source/empty-state/empty-state.component.d.ts +17 -0
  60. package/dist/components-source/file-upload-progress-bar/file-upload-progress-bar.component.d.ts +30 -0
  61. package/dist/components-source/index.d.ts +85 -0
  62. package/dist/components-source/input/input.component.d.ts +33 -0
  63. package/dist/components-source/lottie-loader/lottie-loader.component.d.ts +9 -0
  64. package/dist/components-source/otp-send-code/otp-send-code.component.d.ts +83 -0
  65. package/dist/components-source/radio-selection-list/radio-selection-list.component.d.ts +30 -0
  66. package/dist/components-source/read-more/read-more.component.d.ts +60 -0
  67. package/dist/components-source/sidebar/sidebar.component.d.ts +27 -0
  68. package/dist/components-source/simple-stepper/simple-stepper.component.d.ts +21 -0
  69. package/dist/components-source/spinner/spinner.component.d.ts +9 -0
  70. package/dist/components-source/tabs/tabs.component.d.ts +27 -0
  71. package/dist/components-source/tag-type-product/tag-type-product.component.d.ts +5 -0
  72. package/dist/components-source/toast/toast.component.d.ts +21 -0
  73. package/dist/components-source/toggle/input-toggle.component.d.ts +11 -0
  74. package/dist/components-source/tooltip/tooltip.component.d.ts +15 -0
  75. package/dist/components-source/vertical-steps/vertical-steps.component.d.ts +27 -0
  76. package/dist/esm2022/components-source/accordion/accordion-item/accordion-item.component.mjs +51 -0
  77. package/dist/esm2022/components-source/accordion/accordion.component.mjs +46 -0
  78. package/dist/esm2022/components-source/alert/alert.component.mjs +114 -0
  79. package/dist/esm2022/components-source/alert-modal/alert-modal.component.mjs +247 -0
  80. package/dist/esm2022/components-source/alert-validation/alert-validation.component.mjs +53 -0
  81. package/dist/esm2022/components-source/badge/badge.component.mjs +23 -0
  82. package/dist/esm2022/components-source/beta-tag/beta-tag.component.mjs +11 -0
  83. package/dist/esm2022/components-source/breadcrumb/breadcrumb.component.mjs +26 -0
  84. package/dist/esm2022/components-source/card-product/card-product.component.mjs +534 -0
  85. package/dist/esm2022/components-source/card-section/card-section.component.mjs +91 -0
  86. package/dist/esm2022/components-source/checkbox-selection-list/checkbox-selection-list.component.mjs +79 -0
  87. package/dist/esm2022/components-source/city-selector/city-selector.component.mjs +53 -0
  88. package/dist/esm2022/components-source/color-picker/color-picker.component.mjs +320 -0
  89. package/dist/esm2022/components-source/confirm-dialog/confirm-dialog.component.mjs +27 -0
  90. package/dist/esm2022/components-source/country-flags/country-flags.component.mjs +27 -0
  91. package/dist/esm2022/components-source/date-picker/date-picker.component.mjs +73 -0
  92. package/dist/esm2022/components-source/date-picker-range/date-picker-range.component.mjs +67 -0
  93. package/dist/esm2022/components-source/dropi-avatars/dropi-avatars.component.mjs +31 -0
  94. package/dist/esm2022/components-source/dropi-badge/dropi-badge.component.mjs +45 -0
  95. package/dist/esm2022/components-source/dropi-banner-external/dropi-banner-external.component.mjs +39 -0
  96. package/dist/esm2022/components-source/dropi-breadcrumb/dropi-breadcrumb.component.mjs +45 -0
  97. package/dist/esm2022/components-source/dropi-card-checkbox/dropi-card-checkbox.component.mjs +53 -0
  98. package/dist/esm2022/components-source/dropi-carousel/dropi-carousel.component.mjs +243 -0
  99. package/dist/esm2022/components-source/dropi-checkbox/dropi-checkbox.component.mjs +31 -0
  100. package/dist/esm2022/components-source/dropi-chips/dropi-chips.component.mjs +38 -0
  101. package/dist/esm2022/components-source/dropi-country-selector/countries.data.mjs +254 -0
  102. package/dist/esm2022/components-source/dropi-country-selector/dropi-country-selector.component.mjs +183 -0
  103. package/dist/esm2022/components-source/dropi-drawer/dropi-drawer.component.mjs +69 -0
  104. package/dist/esm2022/components-source/dropi-dropdown/dropi-dropdown.component.mjs +59 -0
  105. package/dist/esm2022/components-source/dropi-favorite-button/dropi-favorite-button.component.mjs +33 -0
  106. package/dist/esm2022/components-source/dropi-file-upload/card-view/card-view.component.mjs +47 -0
  107. package/dist/esm2022/components-source/dropi-file-upload/drop-zone/drop-zone.component.mjs +115 -0
  108. package/dist/esm2022/components-source/dropi-file-upload/dropi-file-upload.component.mjs +66 -0
  109. package/dist/esm2022/components-source/dropi-file-upload/file-list/file-list.component.mjs +95 -0
  110. package/dist/esm2022/components-source/dropi-file-upload/grid-view/grid-view.component.mjs +37 -0
  111. package/dist/esm2022/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.mjs +59 -0
  112. package/dist/esm2022/components-source/dropi-image-overlay/dropi-image-overlay.component.mjs +31 -0
  113. package/dist/esm2022/components-source/dropi-languages-selector/dropi-languages-selector.component.mjs +38 -0
  114. package/dist/esm2022/components-source/dropi-logo/dropi-logo.component.mjs +27 -0
  115. package/dist/esm2022/components-source/dropi-modal/dropi-modal.component.mjs +92 -0
  116. package/dist/esm2022/components-source/dropi-modal/p-template.directive.mjs +22 -0
  117. package/dist/esm2022/components-source/dropi-navbar/dropi-navbar.component.mjs +51 -0
  118. package/dist/esm2022/components-source/dropi-paginator/dropi-paginator.component.mjs +89 -0
  119. package/dist/esm2022/components-source/dropi-phone-input/dropi-phone-input.component.mjs +155 -0
  120. package/dist/esm2022/components-source/dropi-radio-button/dropi-radio-button.component.mjs +48 -0
  121. package/dist/esm2022/components-source/dropi-search/dropi-search.component.mjs +104 -0
  122. package/dist/esm2022/components-source/dropi-select/dropi-select.component.mjs +96 -0
  123. package/dist/esm2022/components-source/dropi-skeleton/dropi-skeleton.component.mjs +39 -0
  124. package/dist/esm2022/components-source/dropi-steps/dropi-steps.component.mjs +97 -0
  125. package/dist/esm2022/components-source/dropi-switch/dropi-switch.component.mjs +22 -0
  126. package/dist/esm2022/components-source/dropi-table/dropi-table.component.mjs +333 -0
  127. package/dist/esm2022/components-source/dropi-tag/dropi-tag.component.mjs +36 -0
  128. package/dist/esm2022/components-source/dropi-text-area/dropi-text-area.component.mjs +53 -0
  129. package/dist/esm2022/components-source/dropi-tooltip/dropi-tooltip.component.mjs +78 -0
  130. package/dist/esm2022/components-source/dropi-youtube-lazy-video/dropi-youtube-lazy-video.component.mjs +46 -0
  131. package/dist/esm2022/components-source/empty/empty.component.mjs +18 -0
  132. package/dist/esm2022/components-source/empty-state/empty-state.component.mjs +62 -0
  133. package/dist/esm2022/components-source/file-upload-progress-bar/file-upload-progress-bar.component.mjs +91 -0
  134. package/dist/esm2022/components-source/index.mjs +107 -0
  135. package/dist/esm2022/components-source/input/input.component.mjs +104 -0
  136. package/dist/esm2022/components-source/lottie-loader/lottie-loader.component.mjs +25 -0
  137. package/dist/esm2022/components-source/otp-send-code/otp-send-code.component.mjs +201 -0
  138. package/dist/esm2022/components-source/radio-selection-list/radio-selection-list.component.mjs +89 -0
  139. package/dist/esm2022/components-source/read-more/read-more.component.mjs +91 -0
  140. package/dist/esm2022/components-source/sidebar/sidebar.component.mjs +88 -0
  141. package/dist/esm2022/components-source/simple-stepper/simple-stepper.component.mjs +60 -0
  142. package/dist/esm2022/components-source/spinner/spinner.component.mjs +19 -0
  143. package/dist/esm2022/components-source/tabs/tabs.component.mjs +83 -0
  144. package/dist/esm2022/components-source/tag-type-product/tag-type-product.component.mjs +11 -0
  145. package/dist/esm2022/components-source/toast/toast.component.mjs +47 -0
  146. package/dist/esm2022/components-source/toggle/input-toggle.component.mjs +36 -0
  147. package/dist/esm2022/components-source/tooltip/tooltip.component.mjs +34 -0
  148. package/dist/esm2022/components-source/vertical-steps/vertical-steps.component.mjs +75 -0
  149. package/dist/esm2022/lib/elements-registry.mjs +343 -2
  150. package/dist/esm2022/utilities/interfaces/ui/dropi-table.interface.mjs +2 -0
  151. package/dist/esm2022/utilities/interfaces/ui/input-interface.mjs +2 -0
  152. package/dist/esm2022/utilities/interfaces/ui/select-interface.mjs +2 -0
  153. package/dist/esm2022/utilities/interfaces/ui/selection-list-interface.mjs +2 -0
  154. package/dist/esm2022/utilities/interfaces/ui/upload.model.mjs +5 -0
  155. package/dist/fesm2022/dropi-ui-components.mjs +5913 -2
  156. package/dist/fesm2022/dropi-ui-components.mjs.map +1 -1
  157. package/dist/utilities/interfaces/ui/dropi-table.interface.d.ts +45 -0
  158. package/dist/utilities/interfaces/ui/input-interface.d.ts +33 -0
  159. package/dist/utilities/interfaces/ui/select-interface.d.ts +8 -0
  160. package/dist/utilities/interfaces/ui/selection-list-interface.d.ts +24 -0
  161. package/dist/utilities/interfaces/ui/upload.model.d.ts +30 -0
  162. package/package.json +18 -6
  163. package/src/components-source/alert/alert.component.ts +12 -129
  164. package/src/components-source/alert-modal/alert-modal.component.ts +84 -114
  165. package/src/components-source/alert-validation/alert-validation.component.html +8 -0
  166. package/src/components-source/alert-validation/alert-validation.component.scss +225 -0
  167. package/src/components-source/alert-validation/alert-validation.component.ts +43 -0
  168. package/src/components-source/beta-tag/beta-tag.component.html +1 -0
  169. package/src/components-source/beta-tag/beta-tag.component.scss +26 -0
  170. package/src/components-source/beta-tag/beta-tag.component.ts +11 -0
  171. package/src/components-source/breadcrumb/breadcrumb.component.html +13 -5
  172. package/src/components-source/breadcrumb/breadcrumb.component.scss +8 -1
  173. package/src/components-source/breadcrumb/breadcrumb.component.spec.ts +26 -26
  174. package/src/components-source/breadcrumb/breadcrumb.component.ts +10 -12
  175. package/src/components-source/card-product/card-product.component.spec.ts +9 -9
  176. package/src/components-source/card-product/card-product.component.stories.ts +2 -2
  177. package/src/components-source/card-product/card-product.component.ts +294 -818
  178. package/src/components-source/card-section/card-section.component.html +7 -7
  179. package/src/components-source/card-section/card-section.component.ts +41 -15
  180. package/src/components-source/checkbox-selection-list/checkbox-selection-list.component.ts +42 -179
  181. package/src/components-source/city-selector/city-selector.component.ts +37 -137
  182. package/src/components-source/confirm-dialog/confirm-dialog.component.html +26 -0
  183. package/src/components-source/confirm-dialog/confirm-dialog.component.scss +55 -0
  184. package/src/components-source/confirm-dialog/confirm-dialog.component.ts +22 -0
  185. package/src/components-source/country-flags/country-flags.component.ts +20 -12
  186. package/src/components-source/date-picker/date-picker.component.ts +32 -292
  187. package/src/components-source/date-picker-range/date-picker-range.component.html +15 -7
  188. package/src/components-source/date-picker-range/date-picker-range.component.ts +42 -235
  189. package/src/components-source/dropi-banner-external/dropi-banner-external.component.ts +24 -185
  190. package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.html +21 -21
  191. package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.spec.ts +9 -9
  192. package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.component.ts +41 -23
  193. package/src/components-source/dropi-breadcrumb/dropi-breadcrumb.stories.ts +12 -12
  194. package/src/components-source/dropi-chips/dropi-chips.component.ts +22 -87
  195. package/src/components-source/dropi-country-selector/countries.data.ts +256 -236
  196. package/src/components-source/dropi-country-selector/dropi-country-selector.component.ts +37 -25
  197. package/src/components-source/dropi-drawer/dropi-drawer.component.ts +91 -78
  198. package/src/components-source/dropi-dropdown/dropi-dropdown.component.ts +44 -47
  199. package/src/components-source/dropi-file-upload/card-view/card-view.component.ts +33 -53
  200. package/src/components-source/dropi-file-upload/drop-zone/drop-zone.component.ts +52 -123
  201. package/src/components-source/dropi-file-upload/dropi-file-upload.component.ts +38 -294
  202. package/src/components-source/dropi-file-upload/file-list/file-list.component.ts +62 -43
  203. package/src/components-source/dropi-file-upload/grid-view/grid-view.component.ts +23 -22
  204. package/src/components-source/dropi-ilustration-icon/dropi-ilustration-icon.component.scss +6 -2
  205. package/src/components-source/dropi-image-overlay/dropi-image-overlay.component.ts +16 -71
  206. package/src/components-source/dropi-modal/dropi-modal.component.ts +56 -372
  207. package/src/components-source/dropi-navbar/dropi-navbar.component.ts +17 -17
  208. package/src/components-source/dropi-paginator/dropi-paginator.component.html +18 -7
  209. package/src/components-source/dropi-paginator/dropi-paginator.component.ts +40 -32
  210. package/src/components-source/dropi-phone-input/dropi-phone-input.component.html +78 -79
  211. package/src/components-source/dropi-phone-input/dropi-phone-input.component.ts +29 -85
  212. package/src/components-source/dropi-search/dropi-search.component.ts +59 -222
  213. package/src/components-source/dropi-select/dropi-select.component.html +82 -131
  214. package/src/components-source/dropi-select/dropi-select.component.ts +60 -423
  215. package/src/components-source/dropi-table/dropi-table.component.html +40 -23
  216. package/src/components-source/dropi-table/dropi-table.component.ts +130 -374
  217. package/src/components-source/dropi-tag/dropi-tag.component.ts +20 -90
  218. package/src/components-source/dropi-text-area/dropi-text-area.component.ts +22 -48
  219. package/src/components-source/dropi-tooltip/dropi-tooltip.component.ts +40 -129
  220. package/src/components-source/empty/empty.component.html +3 -0
  221. package/src/components-source/empty/empty.component.scss +0 -0
  222. package/src/components-source/empty/empty.component.ts +16 -0
  223. package/src/components-source/empty-state/empty-state.component.ts +47 -19
  224. package/src/components-source/index.ts +82 -37
  225. package/src/components-source/input/input.component.html +79 -63
  226. package/src/components-source/input/input.component.ts +51 -97
  227. package/src/components-source/lottie-loader/lottie-loader.component.ts +13 -16
  228. package/src/components-source/otp-send-code/otp-send-code.component.ts +60 -528
  229. package/src/components-source/radio-selection-list/radio-selection-list.component.ts +36 -97
  230. package/src/components-source/sidebar/sidebar.component.spec.ts +11 -11
  231. package/src/components-source/sidebar/sidebar.component.stories.ts +3 -3
  232. package/src/components-source/sidebar/sidebar.component.ts +51 -47
  233. package/src/components-source/simple-stepper/simple-stepper.component.ts +20 -35
  234. package/src/components-source/spinner/spinner.component.html +6 -0
  235. package/src/components-source/spinner/spinner.component.scss +15 -0
  236. package/src/components-source/spinner/spinner.component.ts +17 -0
  237. package/src/components-source/tabs/tabs.component.spec.ts +8 -8
  238. package/src/components-source/tabs/tabs.component.stories.ts +5 -5
  239. package/src/components-source/tabs/tabs.component.ts +41 -83
  240. package/src/components-source/toast/toast.component.ts +40 -46
  241. package/src/components-source/toggle/input-toggle.component.html +34 -0
  242. package/src/components-source/toggle/input-toggle.component.scss +0 -0
  243. package/src/components-source/toggle/input-toggle.component.ts +27 -0
  244. package/src/components-source/toggle/inputToggleConfig.ts +11 -0
  245. package/src/components-source/tooltip/tooltip.component.html +22 -11
  246. package/src/components-source/tooltip/tooltip.component.ts +28 -13
  247. package/src/components-source/vertical-steps/vertical-steps.component.ts +16 -78
  248. package/src/lib/elements-registry.ts +413 -1
  249. package/src/lib/router-stub.ts +7 -0
  250. package/src/libreria work space.code-workspace +11 -8
  251. package/src/utilities/interfaces/ui/dropi-table.interface.ts +60 -0
  252. package/src/utilities/interfaces/ui/input-interface.ts +34 -0
  253. package/src/utilities/interfaces/ui/select-interface.ts +8 -0
  254. package/src/utilities/interfaces/ui/selection-list-interface.ts +15 -0
  255. package/src/utilities/interfaces/ui/upload.model.ts +41 -0
@@ -9,10 +9,14 @@ import {
9
9
  ViewChildren,
10
10
  QueryList,
11
11
  SimpleChanges,
12
- } from '@angular/core';
13
- import { CommonModule, DatePipe } from '@angular/common';
14
- import { FormControl } from '@angular/forms';
15
- import { DropiPaginatorComponent } from '../dropi-paginator/dropi-paginator.component';
12
+ Inject,
13
+ Pipe,
14
+ PipeTransform,
15
+ CUSTOM_ELEMENTS_SCHEMA,
16
+ } from "@angular/core";
17
+ import { CommonModule, DatePipe } from "@angular/common";
18
+ import { FormControl, ReactiveFormsModule } from "@angular/forms";
19
+ import { DropiPaginatorComponent } from "../dropi-paginator/dropi-paginator.component";
16
20
  import {
17
21
  DropiTableAction,
18
22
  DropiTableBackendParams,
@@ -21,244 +25,97 @@ import {
21
25
  DropiTableRow,
22
26
  SortParams,
23
27
  TypedField,
24
- } from '@app/utilities/interfaces/ui/dropi-table.interface';
25
- import { IconComponent } from '../icon/icon.component';
26
- import { DropiCheckboxComponent } from '../dropi-checkbox/dropi-checkbox.component';
27
- import { CurrencyComponent } from '@app/components/currency/currency.component';
28
- import { DropiTagComponent } from '../dropi-tag/dropi-tag.component';
29
- import { CarrierImageUrl } from '@app/utilities/pipes/carrier-image-url.pipe';
30
- import { TranslateModule } from '@ngx-translate/core';
31
- import { Subject, Subscription } from 'rxjs';
32
- import { debounceTime } from 'rxjs/operators';
33
- import { InputComponent } from '../input/input.component';
34
- import { SpinnerComponent } from '@app/components/spinner/spinner.component';
35
- import { TooltipModule } from 'primeng/tooltip';
36
- import { CountryFlagsComponent } from '../country-flags/country-flags.component';
37
- import { DropiAvatarsComponent } from '../dropi-avatars/dropi-avatars.component';
28
+ } from "../../utilities/interfaces/ui/dropi-table.interface";
29
+ import { IconComponent } from "../icon/icon.component";
30
+ import { DropiCheckboxComponent } from "../dropi-checkbox/dropi-checkbox.component";
31
+ import { DropiTagComponent } from "../dropi-tag/dropi-tag.component";
32
+ import { TranslateModule } from "@ngx-translate/core";
33
+ import { Subject, Subscription } from "rxjs";
34
+ import { debounceTime } from "rxjs/operators";
35
+ import { InputComponent } from "../input/input.component";
36
+ import { TooltipModule } from "primeng/tooltip";
37
+ import { CountryFlagsComponent } from "../country-flags/country-flags.component";
38
+ import { DropiAvatarsComponent } from "../dropi-avatars/dropi-avatars.component";
38
39
 
39
40
  @Component({
40
- selector: 'app-dropi-table',
41
+ selector: "currency",
42
+ standalone: true,
43
+ template: "{{value}}",
44
+ })
45
+ export class CurrencyComponentStub {
46
+ @Input() value: any;
47
+ }
48
+
49
+ @Pipe({
50
+ name: "carrierImageUrl",
51
+ standalone: true,
52
+ })
53
+ export class CarrierImageUrlStub implements PipeTransform {
54
+ transform(value: any): string {
55
+ return value;
56
+ }
57
+ }
58
+
59
+ @Component({
60
+ selector: "app-spinner",
61
+ standalone: true,
62
+ template: "Loading...",
63
+ })
64
+ export class SpinnerComponentStub {}
65
+
66
+ @Component({
67
+ selector: "app-dropi-table",
41
68
  standalone: true,
42
69
  imports: [
43
70
  CommonModule,
71
+ ReactiveFormsModule,
44
72
  DropiPaginatorComponent,
45
73
  IconComponent,
46
74
  DropiCheckboxComponent,
47
- CurrencyComponent,
75
+ CurrencyComponentStub,
48
76
  DatePipe,
49
77
  DropiTagComponent,
50
- CarrierImageUrl,
78
+ CarrierImageUrlStub,
51
79
  TranslateModule,
52
80
  InputComponent,
53
- SpinnerComponent,
81
+ SpinnerComponentStub,
54
82
  TooltipModule,
55
83
  CountryFlagsComponent,
56
84
  DropiAvatarsComponent,
57
85
  ],
58
- templateUrl: './dropi-table.component.html',
59
- styleUrls: ['./dropi-table.component.scss'],
86
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
87
+ templateUrl: "./dropi-table.component.html",
88
+ styleUrls: ["./dropi-table.component.scss"],
60
89
  })
61
90
  export class DropiTableComponent implements OnInit {
62
- /**
63
- * Encabezados de la tabla Dropi.
64
- *
65
- * Este arreglo define las columnas que se mostrarán en la tabla,
66
- * donde cada elemento es un objeto de tipo `DropiTableColumn` que
67
- * especifica las propiedades y configuración de cada columna.
68
- *
69
- * key: Identificador de la columna
70
- * label: Texto a mostrar en la columna
71
- * sortable: Boleano que indica si la columna se puede ordenar
72
- *
73
- * @type {DropiTableColumn[]}
74
- * @see DropiTableColumn
75
- */
76
91
  @Input() public headers: DropiTableColumn[] = [];
77
-
78
- /**
79
- * Datos que se mostrarán en la tabla.
80
- *
81
- * Es importante que cada key del objeto dentro del arreglo coincida con el key del header
82
- * Si en la configuracion de la tabla el parametro `showActionsPerRow` esta en `true` se deben
83
- * incluir las acciones ( DropiTableAction ) por cada una de las filas, esto para los casos en que
84
- * las acciones de las filas varien entre si.
85
- * @example
86
- * ```typescript
87
- * data = [
88
- * {
89
- "id": {
90
- "type": "text",
91
- "value": 0
92
- },
93
- "name": {
94
- "type": "text",
95
- "value": "Laptop"
96
- },
97
- "price": {
98
- "type": "currency",
99
- "value": 1500
100
- },
101
- "createdAt": {
102
- "type": "date",
103
- "value": "2025-06-02T14:23:45"
104
- },
105
- "statusTag": {
106
- "type": "tag",
107
- "value": "some text: 0",
108
- "typeTag": "success"
109
- },
110
- "carrier": {
111
- "type": "carrier",
112
- "value": "Envía"
113
- },
114
- "textIcon": {
115
- "type": "textIcon",
116
- "value": "Icono texto",
117
- "icon": "Location-market"
118
- },
119
- "statusDot": {
120
- "type": "status",
121
- "status": "low",
122
- "value": "text low"
123
- },
124
- "textLink": {
125
- "type": "textLink",
126
- "url": "https://www.google.com/",
127
- "urlText": "google",
128
- "value": "0 Some text"
129
- },
130
- "disableCheckbox": true
131
- }];
132
- * ```
133
- * @type {DropiTableRow[]}
134
- * @see DropiTableRow
135
- */
136
92
  @Input() public data: DropiTableRow[] = [];
137
-
138
93
  @Input() public childData: DropiTableRow[] = [];
139
-
140
94
  @Input() public visibleRowsChildrens: DropiTableRow[] = [];
141
-
142
- /**
143
- * Configuración personalizada para la tabla Dropi.
144
- *\ * Este input permite definir las opciones y parámetros que controlan el comportamiento,
145
- * la apariencia y las funcionalidades de la tabla Dropi. Debe recibir un objeto de tipo
146
- * `DropiTableConfiguration` que contenga las propiedades necesarias para la configuración
147
- * deseada.
148
- *
149
- * rowActions: Acciones a mostrar en la columna final, si son mas de tres se mostrarán en un menu desplegable
150
- * pageSizeConfiguration: Array de numeros para la configuracion de items a mostrar
151
- * showCheckbox: Boleano para mostrar checkbox de seleccion de fila
152
- * showSearch: Boleano para mostrar buscador general
153
- * showPaginator: Boleano para mostrar la configuracion de paginacion ( Items por pagina y paginador )
154
- * showActionsPerRow: Booleano que determina si se va a tomar la confiugracion de acciones independente por cada fila
155
- * si es `true` se deben configurar las acciones por cada una de las filas
156
- * emptyMessage: Muestra mensaje personalizado pata la tabla vacia, si no esta configurado
157
- * su mensaje por defecto es `no data`.
158
- *
159
- * @type {DropiTableConfiguration}
160
- * @see DropiTableConfiguration
161
- */
162
95
  @Input() public dropiTableConfiguration: DropiTableConfiguration;
163
- /**
164
- * Configuración necesaria para la paginación por medio de un backend
165
- *
166
- * Este input permite definir los parámetros que controlan el comportamiento,
167
- * la apariencia y las funcionalidades de la paginación de la tabla Dropi cuando
168
- * se utiliza paginación en el backend. Debe recibir un objeto de tipo
169
- * `DropiTableBackendParams` que contenga las propiedades necesarias para la configuración
170
- * deseada.
171
- *
172
- * currentPage: Página actual que se está mostrando
173
- * pageSize: Cantidad de elementos por página
174
- * nextPage: Siguiente página disponible
175
- * totalCount: Total de elementos disponibles
176
- * totalPages: Total de páginas calculadas
177
- * backendPagination: Booleano que indica si se debe paginar por backend.
178
- *
179
- * @type {DropiTableBackendParams}
180
- * @see DropiTableBackendParams
181
- */
182
-
183
96
  @Input() public dropiTableBackendParams: DropiTableBackendParams;
184
-
185
- /**
186
- * Indica si la tabla se encuentra en estado de carga.
187
- *
188
- * Cuando este valor es `true`, se puede mostrar un spinner o indicador visual
189
- * para informar al usuario que los datos están siendo cargados o procesados.
190
- * Necesario para las peticiones a un backend.
191
- *
192
- * @type {boolean}
193
- * @default false
194
- */
195
-
196
97
  @Input() public loading: boolean = false;
197
-
198
- //para paginaciones que no tiene un total de paginas
199
-
200
98
  @Input() isCursorPagination: boolean = false;
201
-
202
- /**
203
- * Evento emitido cuando se seleccionan filas en la tabla.
204
- *
205
- * @event
206
- * @type {EventEmitter<DropiTableRow[]>}
207
- * @description Emite un arreglo de objetos `DropiTableRow` que representan las filas seleccionadas por el usuario.
208
- */
209
99
  @Output() rowsSelected = new EventEmitter<DropiTableRow[]>();
210
-
211
- /**
212
- * Evento emitido cuando se hace clic en una acción de una fila de la tabla.
213
- *
214
- * @event
215
- * @type {{ row: DropiTableRow; action: DropiTableAction }} - Objeto que contiene la fila seleccionada y la acción ejecutada.
216
- */
217
- @Output() actionClicked = new EventEmitter<{ row: DropiTableRow; action: DropiTableAction }>();
218
-
219
- /**
220
- * Evento emitido cuando se cambia de pagina
221
- * Usar solo cuando se pagina por backend
222
- * @event
223
- * @type {number} - Se emite el numero de pagina seleccionada
224
- */
225
-
100
+ @Output() actionClicked = new EventEmitter<{
101
+ row: DropiTableRow;
102
+ action: DropiTableAction;
103
+ }>();
226
104
  @Output() onPageChange = new EventEmitter<number>();
227
-
228
- /**
229
- * Evento emitido cuando se cambia la cantidad de items por pagina
230
- * Usar solo cuando se pagina por backend
231
- * @event
232
- * @type {number} - Se emite el numero de la cantidad de items a mostrar
233
- */
234
105
  @Output() onSizeChange = new EventEmitter<number>();
235
-
236
- /**
237
- * Evento emitido cuando se cambia la columna de ordenación
238
- * Usar solo cuando se pagina por backend
239
- * @event
240
- * @type {SortParams} - Se emite el nombre de la columna y si es ascendente o descendente
241
- */
242
106
  @Output() onSortChange = new EventEmitter<SortParams>();
243
-
244
- /**
245
- * Evento emitido cuando se realiza una búsqueda con paginación de backend
246
- * @event
247
- * @type {string} - Se emite el término de búsqueda
248
- */
249
107
  @Output() onSearchChange = new EventEmitter<string>();
250
-
251
108
  @Output() expandChildren = new EventEmitter<{ row: DropiTableRow }>();
252
- @ViewChildren(DropiCheckboxComponent) checkboxes!: QueryList<DropiCheckboxComponent>;
109
+ @ViewChildren(DropiCheckboxComponent)
110
+ checkboxes!: QueryList<DropiCheckboxComponent>;
253
111
 
254
112
  public currentPage: number = 1;
255
- public totalPages: number;
113
+ public totalPages: number = 1;
256
114
  public dataToShow: DropiTableRow[] = [];
257
- private sortColumn: string;
115
+ private sortColumn: string = "";
258
116
  public sortAsc: boolean = true;
259
117
  public hidePaginator: boolean = false;
260
- private pageSize: number;
261
- private actionsMenuRef: ElementRef | null;
118
+ public pageSize: number = 10;
262
119
  private selectedRows: DropiTableRow[] = [];
263
120
  private subscriptions: Subscription = new Subscription();
264
121
  private filterEvent: Subject<string> = new Subject();
@@ -266,37 +123,41 @@ export class DropiTableComponent implements OnInit {
266
123
  public hasActions: boolean = false;
267
124
  public hasShortActions: boolean = false;
268
125
 
126
+ constructor(@Inject(ElementRef) private el: ElementRef) {}
127
+
269
128
  ngOnInit(): void {
270
129
  this.hasActions =
271
130
  (this.dropiTableConfiguration?.rowActions &&
272
131
  this.dropiTableConfiguration.rowActions.length > 0) ||
273
132
  this.dropiTableConfiguration?.showActionsPerRow;
274
133
 
275
- if (!this.dropiTableConfiguration.backendPagination) {
134
+ if (!this.dropiTableConfiguration?.backendPagination) {
276
135
  this.updateData();
277
- if (this.dropiTableConfiguration.showSearch) {
136
+ if (this.dropiTableConfiguration?.showSearch) {
278
137
  this.filterEventSusbscribe();
279
138
  this.subscribeToSearch();
280
139
  }
281
140
  return;
282
141
  }
283
142
  this.setBackendParams();
284
- // Subscribe to search for backend pagination
285
- if (this.dropiTableConfiguration.showSearch && this.dropiTableConfiguration.backendPagination) {
143
+ if (
144
+ this.dropiTableConfiguration?.showSearch &&
145
+ this.dropiTableConfiguration?.backendPagination
146
+ ) {
286
147
  this.subscribeToSearchBackend();
287
148
  }
288
149
  }
289
150
 
290
151
  setBackendParams() {
291
- this.totalPages = this.dropiTableBackendParams?.totalPages;
292
- this.currentPage = this.dropiTableBackendParams?.currentPage;
293
- this.pageSize = this.dropiTableBackendParams?.pageSize;
152
+ this.totalPages = this.dropiTableBackendParams?.totalPages || 1;
153
+ this.currentPage = this.dropiTableBackendParams?.currentPage || 1;
154
+ this.pageSize = this.dropiTableBackendParams?.pageSize || 10;
294
155
  this.dataToShow = this.data;
295
156
  }
296
157
 
297
158
  ngOnChanges(changes: SimpleChanges): void {
298
- if (changes['data']) {
299
- if (!this.dropiTableConfiguration.backendPagination) {
159
+ if (changes["data"]) {
160
+ if (!this.dropiTableConfiguration?.backendPagination) {
300
161
  this.updateData();
301
162
  return;
302
163
  }
@@ -313,20 +174,14 @@ export class DropiTableComponent implements OnInit {
313
174
  this.pageData();
314
175
  }
315
176
 
316
- @HostListener('document:click', ['$event'])
177
+ @HostListener("document:click", ["$event"])
317
178
  handleClickOutside(event: MouseEvent) {
318
179
  if (!this.hasActions) return;
319
-
320
- const clickedInside = this.actionsMenuRef
321
- ? this.actionsMenuRef.nativeElement.contains(event.target)
322
- : false;
323
- if (!clickedInside && this.actionsMenuRef) {
324
- this.hideMenu();
325
- }
180
+ this.hideMenu();
326
181
  }
327
182
 
328
183
  setPagination() {
329
- if (!this.dropiTableConfiguration.showPaginator) return;
184
+ if (!this.dropiTableConfiguration?.showPaginator) return;
330
185
  if (!this.dropiTableConfiguration?.pageSizeConfiguration) {
331
186
  this.dropiTableConfiguration.pageSizeConfiguration = [5, 10, 20];
332
187
  }
@@ -344,29 +199,33 @@ export class DropiTableComponent implements OnInit {
344
199
 
345
200
  subscribeToSearchBackend() {
346
201
  this.subscriptions.add(
347
- this.searchTerm.valueChanges.pipe(debounceTime(500)).subscribe((inputValue: string) => {
348
- this.onSearchChange.emit(inputValue || '');
349
- }),
202
+ this.searchTerm.valueChanges
203
+ .pipe(debounceTime(500))
204
+ .subscribe((inputValue: string) => {
205
+ this.onSearchChange.emit(inputValue || "");
206
+ }),
350
207
  );
351
208
  }
352
209
 
353
210
  filterEventSusbscribe() {
354
211
  this.subscriptions.add(
355
- this.filterEvent.pipe(debounceTime(500)).subscribe((inputValue: string) => {
356
- this.filteredData(inputValue);
357
- }),
212
+ this.filterEvent
213
+ .pipe(debounceTime(500))
214
+ .subscribe((inputValue: string) => {
215
+ this.filteredData(inputValue);
216
+ }),
358
217
  );
359
218
  }
360
219
 
361
220
  getTotalPages() {
362
- this.totalPages = Math.ceil(this.data.length / this.pageSize);
221
+ this.totalPages = Math.ceil((this.data?.length || 0) / this.pageSize);
363
222
  }
364
223
 
365
224
  onSort(column: DropiTableColumn) {
366
225
  if (!column?.sortable) return;
367
226
  this.sortAsc = this.sortColumn === column.key ? !this.sortAsc : false;
368
227
  this.sortColumn = column.key;
369
- if (!this.dropiTableConfiguration.backendPagination) {
228
+ if (!this.dropiTableConfiguration?.backendPagination) {
370
229
  this.sortData();
371
230
  return;
372
231
  }
@@ -379,7 +238,7 @@ export class DropiTableComponent implements OnInit {
379
238
  return;
380
239
  }
381
240
  const start = (this.currentPage - 1) * this.pageSize;
382
- this.dataToShow = this.data.slice(start, start + this.pageSize);
241
+ this.dataToShow = (this.data || []).slice(start, start + this.pageSize);
383
242
  this.hidePaginator = false;
384
243
  this.getTotalPages();
385
244
  }
@@ -388,26 +247,24 @@ export class DropiTableComponent implements OnInit {
388
247
  this.hideMenu();
389
248
  if (!this.sortColumn) return this.dataToShow;
390
249
  this.data.sort((a, b) => {
391
- return (
392
- (a[this.sortColumn]['value'] > b[this.sortColumn]['value'] ? 1 : -1) *
393
- (this.sortAsc ? 1 : -1)
394
- );
250
+ const valA = a[this.sortColumn]?.value;
251
+ const valB = b[this.sortColumn]?.value;
252
+ return (valA > valB ? 1 : -1) * (this.sortAsc ? 1 : -1);
395
253
  });
396
254
  this.pageData();
397
255
  }
398
256
 
399
257
  onSelectRow(checkValue: boolean, row: DropiTableRow) {
400
- checkValue
401
- ? this.selectedRows.push(row)
402
- : (this.selectedRows = this.selectedRows.filter((rowToDelete) => {
403
- return row.id.value !== rowToDelete.id.value;
404
- }));
405
-
258
+ if (checkValue) {
259
+ this.selectedRows.push(row);
260
+ } else {
261
+ this.selectedRows = this.selectedRows.filter((r) => r !== row);
262
+ }
406
263
  this.rowsSelected.emit(this.selectedRows);
407
264
  }
408
265
 
409
266
  goToPage(page: number) {
410
- if (!this.dropiTableConfiguration.backendPagination) {
267
+ if (!this.dropiTableConfiguration?.backendPagination) {
411
268
  this.currentPage = Number(page);
412
269
  this.pageData();
413
270
  return;
@@ -423,158 +280,57 @@ export class DropiTableComponent implements OnInit {
423
280
 
424
281
  this.hidePaginator = true;
425
282
  this.dataToShow = this.data.filter((row) => {
426
- return Object.values(row).some((val: TypedField) =>
427
- String(val.value).toLowerCase().includes(inputValue.toLowerCase()),
283
+ return Object.values(row).some(
284
+ (val: any) =>
285
+ val &&
286
+ val.value &&
287
+ String(val.value).toLowerCase().includes(inputValue.toLowerCase()),
428
288
  );
429
289
  });
430
290
  }
431
291
 
432
- onChangePageSize(pageSize: string) {
433
- if (!this.dropiTableConfiguration.backendPagination) {
434
- this.pageSize = Number(pageSize);
435
- this.currentPage = 1;
292
+ onChangePageSize(event: any) {
293
+ const value = event?.target?.value || event;
294
+ this.pageSize = Number(value);
295
+ this.currentPage = 1;
296
+ if (!this.dropiTableConfiguration?.backendPagination) {
436
297
  this.pageData();
437
- return;
438
- }
439
- this.onSizeChange.emit(Number(pageSize));
440
- }
441
-
442
- toggleActions(
443
- indexToShow: number,
444
- ref: ElementRef,
445
- childActions: boolean = false,
446
- indexChild: number,
447
- ) {
448
- if (!childActions) {
449
- if (!this.dataToShow[indexToShow].showActions) {
450
- this.hideMenu();
451
- }
452
-
453
- this.dataToShow[indexToShow].showActions = !this.dataToShow[indexToShow].showActions;
454
- this.actionsMenuRef = { nativeElement: ref } as ElementRef;
455
298
  } else {
456
- if (!this.childData[indexChild].showActions) {
457
- this.hideMenu();
458
- }
459
-
460
- this.childData[indexChild].showActions = !this.childData[indexChild].showActions;
461
- this.actionsMenuRef = { nativeElement: ref } as ElementRef;
299
+ this.onSizeChange.emit(this.pageSize);
462
300
  }
463
301
  }
464
302
 
465
- onActionClicked(row: DropiTableRow, action: DropiTableAction, event?: MouseEvent) {
466
- // Detener la propagación del evento para evitar que el HostListener lo capture
467
- if (event) {
468
- event.stopPropagation();
469
- event.preventDefault();
470
- }
303
+ toggleActions(index: number, ref?: any) {
304
+ this.dataToShow.forEach((item, i) => {
305
+ if (i === index) item.showActions = !item.showActions;
306
+ else item.showActions = false;
307
+ });
308
+ }
471
309
 
472
- if (action) {
473
- this.actionClicked.emit({ row, action });
474
- this.hideMenu();
475
- }
310
+ onActionClicked(
311
+ row: DropiTableRow,
312
+ action: DropiTableAction,
313
+ event?: any,
314
+ arg4?: any,
315
+ ) {
316
+ this.actionClicked.emit({ row, action });
317
+ this.hideMenu();
476
318
  }
477
319
 
478
320
  hideMenu() {
479
- if (!this.hasActions) return;
480
-
481
- // Modificar directamente las propiedades sin reemplazar los objetos del array
482
- // para evitar disparar change detection innecesario
483
321
  this.dataToShow.forEach((item) => {
484
322
  item.showActions = false;
485
323
  });
486
- if (this.childData) {
487
- this.childData.forEach((childRowItem) => {
488
- childRowItem.showActions = false;
489
- });
490
- }
491
- this.actionsMenuRef = null;
492
324
  }
493
325
 
494
- onSelectAll(allSelected: boolean) {
495
- let selectedRows: DropiTableRow[] = [];
496
- this.checkboxes.forEach((cb, index) => {
497
- if (index === 0) return;
498
- cb.checked = !cb.disabled && allSelected;
499
- if (cb.checked) {
500
- selectedRows.push(this.dataToShow[index - 1]);
501
- }
502
- });
503
-
504
- this.selectedRows = selectedRows;
326
+ onSelectAll(selected: boolean) {
327
+ this.dataToShow.forEach((row) => (row.selected = selected));
328
+ this.selectedRows = selected ? [...this.dataToShow] : [];
505
329
  this.rowsSelected.emit(this.selectedRows);
506
330
  }
507
331
 
508
- resetSelectedRows() {
509
- this.selectedRows = [];
510
- }
511
-
512
- // Nuevo método mejorado para manejar recursividad
513
- toggleTableRow(row: any, isChild: boolean = false) {
514
- console.log('toggleTableRow called:', {
515
- row: row,
516
- isChild: isChild,
517
- expanded: row.expanded,
518
- tot_child: row.tot_child,
519
- children: row.children,
520
- childrenLength: row.children?.length,
521
- });
522
-
523
- // Si no es un hijo, colapsar todas las otras filas principales
524
- if (!isChild) {
525
- this.dataToShow.forEach((mainRow) => {
526
- if (mainRow !== row) {
527
- this.collapseRowRecursively(mainRow);
528
- }
529
- });
530
- }
531
-
532
- // Toggle del estado expandido
332
+ toggleTableRow(row: any, arg2?: any, arg3?: any, arg4?: any) {
533
333
  row.expanded = !row.expanded;
534
-
535
- // Si se está expandiendo y no tiene hijos cargados, emitir evento para cargarlos
536
- if (row.expanded && row.tot_child?.value > 0 && (!row.children || row.children.length === 0)) {
537
- console.log('Emitiendo expandChildren event para:', row);
538
- this.expandChildren.emit(row);
539
- }
540
-
541
- // Si se está colapsando, colapsar también todos los hijos recursivamente
542
- if (!row.expanded && row.children) {
543
- this.collapseRowRecursively(row);
544
- }
545
- }
546
-
547
- // Método auxiliar para colapsar recursivamente
548
- private collapseRowRecursively(row: any) {
549
- row.expanded = false;
550
- if (row.children) {
551
- row.children.forEach((child) => this.collapseRowRecursively(child));
552
- }
553
- }
554
-
555
- /**
556
- * Método público para asignar hijos a una fila específica
557
- * Se usa después de que el componente padre obtiene los datos del API
558
- */
559
- public setRowChildren(parentRow: any, children: DropiTableRow[]) {
560
- console.log('setRowChildren called:', { parentRow, children });
561
- parentRow.children = children;
562
- }
563
-
564
- /**
565
- * Método para encontrar una fila por ID de manera recursiva
566
- * Útil para actualizar filas anidadas después de llamadas al API
567
- */
568
- public findRowById(id: any, rows: DropiTableRow[] = this.dataToShow): DropiTableRow | null {
569
- for (const row of rows) {
570
- if (row.id.value === id) {
571
- return row;
572
- }
573
- if (row.children && row.children.length > 0) {
574
- const found = this.findRowById(id, row.children);
575
- if (found) return found;
576
- }
577
- }
578
- return null;
334
+ if (row.expanded) this.expandChildren.emit({ row });
579
335
  }
580
336
  }