@envisiongroup/porygon 1.0.0-rc.9 → 1.0.0

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 (251) hide show
  1. package/README.md +50 -14
  2. package/dist/index.d.ts +9 -15
  3. package/dist/index.js +95 -55
  4. package/dist/react-components/buttons/EFWButton/EFWButton.d.ts +1 -1
  5. package/dist/react-components/buttons/EFWButton/EFWButton.hooks.js +32 -31
  6. package/dist/react-components/buttons/EFWButton/EFWButton.js +158 -90
  7. package/dist/react-components/buttons/EFWButton/EFWButton.types.d.ts +32 -6
  8. package/dist/react-components/buttons/EFWButton/index.d.ts +1 -1
  9. package/dist/react-components/buttons/EFWDrawerButton/EFWDrawerButton.d.ts +1 -1
  10. package/dist/react-components/buttons/EFWDrawerButton/EFWDrawerButton.types.d.ts +1 -1
  11. package/dist/react-components/buttons/EFWGroupButton/EFWGroupButton.d.ts +1 -63
  12. package/dist/react-components/buttons/EFWGroupButton/EFWGroupButton.js +120 -85
  13. package/dist/react-components/buttons/EFWGroupButton/EFWGroupButton.types.d.ts +7 -1
  14. package/dist/react-components/buttons/EFWGroupButton/index.d.ts +1 -1
  15. package/dist/react-components/commons/caretPositioning.d.ts +35 -0
  16. package/dist/react-components/commons/caretPositioning.js +28 -0
  17. package/dist/react-components/commons/utils.d.ts +1 -1
  18. package/dist/react-components/commons/utils.js +1 -1
  19. package/dist/react-components/commons/valueNormalization.d.ts +28 -0
  20. package/dist/react-components/commons/valueNormalization.js +6 -0
  21. package/dist/react-components/fields/Attachments/EFWAttachments.js +205 -0
  22. package/dist/react-components/fields/{EFWAttachments → Attachments}/EFWAttachments.types.d.ts +32 -2
  23. package/dist/react-components/fields/Attachments/EFWAttachments.utils.d.ts +8 -0
  24. package/dist/react-components/fields/Attachments/EFWAttachments.utils.js +4 -0
  25. package/dist/react-components/fields/{EFWAttachments/EFWAttachmentsCard → Attachments}/EFWAttachmentsCard.d.ts +2 -11
  26. package/dist/react-components/fields/Attachments/EFWAttachmentsCard.js +164 -0
  27. package/dist/react-components/fields/{EFWAttachments/EFWAttachmentsCard → Attachments}/EFWAttachmentsCard.types.d.ts +21 -1
  28. package/dist/react-components/fields/Attachments/EFWAttachmentsField.js +70 -0
  29. package/dist/react-components/fields/{EFWAttachmentsField → Attachments}/EFWAttachmentsField.types.d.ts +2 -2
  30. package/dist/react-components/fields/Attachments/index.d.ts +5 -0
  31. package/dist/react-components/fields/Attachments/index.js +8 -0
  32. package/dist/react-components/fields/{EFWDatePicker → DatePicker}/EFWDatePicker.d.ts +1 -3
  33. package/dist/react-components/fields/DatePicker/EFWDatePicker.js +134 -0
  34. package/dist/react-components/fields/{EFWDatePicker → DatePicker}/EFWDatePicker.types.d.ts +19 -7
  35. package/dist/react-components/fields/DatePicker/EFWDatePicker.utils.d.ts +19 -0
  36. package/dist/react-components/fields/DatePicker/EFWDatePicker.utils.js +179 -0
  37. package/dist/react-components/fields/DatePicker/EFWDatePickerField.js +251 -0
  38. package/dist/react-components/fields/DatePicker/EFWDatePickerField.types.d.ts +15 -0
  39. package/dist/react-components/fields/DatePicker/index.d.ts +6 -0
  40. package/dist/react-components/fields/DatePicker/index.js +11 -0
  41. package/dist/react-components/fields/Input/EFWInput.d.ts +10 -0
  42. package/dist/react-components/fields/Input/EFWInput.js +260 -0
  43. package/dist/react-components/fields/{EFWInput → Input}/EFWInput.types.d.ts +120 -25
  44. package/dist/react-components/fields/Input/EFWInput.utils.d.ts +101 -0
  45. package/dist/react-components/fields/Input/EFWInput.utils.js +222 -0
  46. package/dist/react-components/fields/Input/EFWInput.validation.d.ts +20 -0
  47. package/dist/react-components/fields/Input/EFWInput.validation.js +72 -0
  48. package/dist/react-components/fields/Input/EFWInputField.js +86 -0
  49. package/dist/react-components/fields/{EFWInputField → Input}/EFWInputField.types.d.ts +2 -2
  50. package/dist/react-components/fields/Input/index.d.ts +5 -0
  51. package/dist/react-components/fields/Input/index.js +8 -0
  52. package/dist/react-components/fields/NumberInput/EFWNumberInput.js +339 -0
  53. package/dist/react-components/fields/{EFWNumberInput → NumberInput}/EFWNumberInput.types.d.ts +33 -14
  54. package/dist/react-components/fields/{EFWNumberInput → NumberInput}/EFWNumberInput.utils.d.ts +20 -14
  55. package/dist/react-components/fields/NumberInput/EFWNumberInput.utils.js +86 -0
  56. package/dist/react-components/fields/NumberInput/EFWNumberInputField.js +84 -0
  57. package/dist/react-components/fields/{EFWNumberInputField → NumberInput}/EFWNumberInputField.types.d.ts +2 -2
  58. package/dist/react-components/fields/NumberInput/index.d.ts +5 -0
  59. package/dist/react-components/fields/NumberInput/index.js +8 -0
  60. package/dist/react-components/fields/Switch/EFWSwitch.js +75 -0
  61. package/dist/react-components/fields/{EFWSwitch → Switch}/EFWSwitch.types.d.ts +18 -10
  62. package/dist/react-components/fields/Switch/EFWSwitch.utils.d.ts +9 -0
  63. package/dist/react-components/fields/Switch/EFWSwitch.utils.js +4 -0
  64. package/dist/react-components/fields/Switch/EFWSwitchField.js +62 -0
  65. package/dist/react-components/fields/{EFWSwitchField → Switch}/EFWSwitchField.types.d.ts +6 -2
  66. package/dist/react-components/fields/Switch/index.d.ts +5 -0
  67. package/dist/react-components/fields/Switch/index.js +8 -0
  68. package/dist/react-components/fields/TagPicker/EFWTagPicker.js +384 -0
  69. package/dist/react-components/fields/{EFWTagPicker → TagPicker}/EFWTagPicker.types.d.ts +30 -17
  70. package/dist/react-components/fields/TagPicker/EFWTagPicker.utils.d.ts +6 -0
  71. package/dist/react-components/fields/TagPicker/EFWTagPicker.utils.js +4 -0
  72. package/dist/react-components/fields/TagPicker/EFWTagPickerField.js +83 -0
  73. package/dist/react-components/fields/{EFWTagPickerField → TagPicker}/EFWTagPickerField.types.d.ts +2 -2
  74. package/dist/react-components/fields/TagPicker/index.d.ts +5 -0
  75. package/dist/react-components/fields/TagPicker/index.js +8 -0
  76. package/dist/react-components/fields/TextArea/EFWTextArea.js +153 -0
  77. package/dist/react-components/fields/{EFWTextArea → TextArea}/EFWTextArea.types.d.ts +26 -8
  78. package/dist/react-components/fields/TextArea/EFWTextArea.utils.d.ts +6 -0
  79. package/dist/react-components/fields/TextArea/EFWTextArea.utils.js +4 -0
  80. package/dist/react-components/fields/TextArea/EFWTextAreaField.js +80 -0
  81. package/dist/react-components/fields/{EFWTextAreaField → TextArea}/EFWTextAreaField.types.d.ts +2 -2
  82. package/dist/react-components/fields/TextArea/index.d.ts +5 -0
  83. package/dist/react-components/fields/TextArea/index.js +8 -0
  84. package/dist/react-components/fields/_shared/EFWField/EFWField.js +119 -0
  85. package/dist/react-components/fields/{EFWField → _shared/EFWField}/EFWField.types.d.ts +24 -13
  86. package/dist/react-components/fields/_shared/EFWField/EFWField.utils.js +20 -0
  87. package/dist/react-components/fields/_shared/EFWField/useSyncedValidationState.d.ts +50 -0
  88. package/dist/react-components/fields/_shared/EFWField/useSyncedValidationState.js +41 -0
  89. package/dist/react-components/fields/test-utils/testUtils.js +10 -0
  90. package/dist/react-components/forms/EFWForm/EFWForm.converter.d.ts +16 -1
  91. package/dist/react-components/forms/EFWForm/EFWForm.converter.js +51 -20
  92. package/dist/react-components/forms/EFWForm/EFWForm.flatConverter.d.ts +130 -0
  93. package/dist/react-components/forms/EFWForm/EFWForm.flatConverter.js +279 -0
  94. package/dist/react-components/forms/EFWForm/EFWForm.hooks.js +21 -18
  95. package/dist/react-components/forms/EFWForm/EFWForm.js +866 -403
  96. package/dist/react-components/forms/EFWForm/EFWForm.types.d.ts +213 -89
  97. package/dist/react-components/forms/EFWForm/EFWForm.utils.d.ts +10 -5
  98. package/dist/react-components/forms/EFWForm/EFWForm.utils.js +356 -229
  99. package/dist/react-components/forms/EFWForm/index.d.ts +5 -2
  100. package/dist/react-components/forms/EFWForm/index.js +10 -6
  101. package/dist/react-components/forms/EFWFormMessageBarGroup/EFWFormMessageBarGroup.js +55 -55
  102. package/dist/react-components/forms/EFWMessageBarManager/EFWMessageBarManager.js +38 -29
  103. package/dist/react-components/hooks/useDrawer/component/EFWDrawer/EFWDrawer.js +49 -47
  104. package/dist/react-components/hooks/useDrawer/component/EFWDrawer/EFWDrawer.types.d.ts +1 -0
  105. package/dist/react-components/hooks/useDrawer/component/EFWDrawerLoader/EFWDrawerLoader.d.ts +5 -3
  106. package/dist/react-components/hooks/useDrawer/component/EFWDrawerLoader/EFWDrawerLoader.js +6 -6
  107. package/dist/react-components/hooks/useDrawer/index.d.ts +1 -1
  108. package/dist/react-components/hooks/useDrawer/useDrawer.d.ts +4 -2
  109. package/dist/react-components/hooks/useDrawer/useDrawer.js +216 -111
  110. package/dist/react-components/hooks/useDrawer/useDrawer.types.d.ts +15 -2
  111. package/dist/react-components/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +42 -0
  112. package/dist/react-components/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +5 -0
  113. package/dist/react-components/i18n/PorygonI18nProvider.d.ts +13 -0
  114. package/dist/react-components/i18n/PorygonI18nProvider.js +145 -0
  115. package/dist/react-components/i18n/defaultLocaleText.d.ts +6 -0
  116. package/dist/react-components/i18n/defaultLocaleText.js +176 -0
  117. package/dist/react-components/i18n/index.d.ts +4 -0
  118. package/dist/react-components/i18n/index.js +19 -0
  119. package/dist/react-components/i18n/localePresets.d.ts +10 -0
  120. package/dist/react-components/i18n/localePresets.js +366 -0
  121. package/dist/react-components/i18n/porygonI18n.types.d.ts +169 -0
  122. package/dist/react-components/layout/MainNavItems/MainNavItems.js +13 -13
  123. package/dist/react-components/tables/EFWTable/EFWTable.d.ts +2 -5
  124. package/dist/react-components/tables/EFWTable/EFWTable.js +916 -525
  125. package/dist/react-components/tables/EFWTable/EFWTable.types.d.ts +256 -62
  126. package/dist/react-components/tables/EFWTable/components/EFWTableBody/EFWTableBody.d.ts +5 -1
  127. package/dist/react-components/tables/EFWTable/components/EFWTableBody/EFWTableBody.js +97 -52
  128. package/dist/react-components/tables/EFWTable/components/EFWTableBody/EFWTableBody.types.d.ts +4 -1
  129. package/dist/react-components/tables/EFWTable/components/EFWTableCell/EFWTableCell.d.ts +1 -12
  130. package/dist/react-components/tables/EFWTable/components/EFWTableCell/EFWTableCell.js +47 -22
  131. package/dist/react-components/tables/EFWTable/components/EFWTableCell/EFWTableCell.types.d.ts +13 -0
  132. package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.d.ts +1 -1
  133. package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.js +94 -69
  134. package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/EFWTableCommandBar.types.d.ts +7 -16
  135. package/dist/react-components/tables/EFWTable/components/EFWTableCommandBar/index.d.ts +1 -1
  136. package/dist/react-components/tables/EFWTable/components/EFWTableHeader/EFWTableHeader.d.ts +1 -1
  137. package/dist/react-components/tables/EFWTable/components/EFWTableHeader/EFWTableHeader.js +218 -83
  138. package/dist/react-components/tables/EFWTable/components/EFWTableHeader/EFWTableHeader.types.d.ts +3 -0
  139. package/dist/react-components/tables/EFWTable/components/EFWTableOverlay/EFWTableOverlay.js +90 -88
  140. package/dist/react-components/tables/EFWTable/components/EFWTableOverlay/EFWTableOverlay.types.d.ts +5 -0
  141. package/dist/react-components/tables/EFWTable/components/EFWTableRow/EFWTableRow.d.ts +1 -18
  142. package/dist/react-components/tables/EFWTable/components/EFWTableRow/EFWTableRow.js +83 -45
  143. package/dist/react-components/tables/EFWTable/components/EFWTableRow/EFWTableRow.types.d.ts +23 -0
  144. package/dist/react-components/tables/EFWTable/hooks/useDefaultAddButton/useDefaultAddButton.d.ts +2 -1
  145. package/dist/react-components/tables/EFWTable/hooks/useDefaultAddButton/useDefaultAddButton.js +65 -48
  146. package/dist/react-components/tables/EFWTable/hooks/useDefaultDeleteButton/useDefaultDeleteButton.d.ts +2 -1
  147. package/dist/react-components/tables/EFWTable/hooks/useDefaultDeleteButton/useDefaultDeleteButton.js +71 -48
  148. package/dist/react-components/tables/EFWTable/hooks/useDefaultFilterButton/useDefaultFilterButton.d.ts +17 -0
  149. package/dist/react-components/tables/EFWTable/hooks/useDefaultFilterButton/useDefaultFilterButton.js +255 -0
  150. package/dist/react-components/tables/EFWTable/hooks/useDefaultUpdateButton/useDefaultUpdateButton.d.ts +2 -1
  151. package/dist/react-components/tables/EFWTable/hooks/useDefaultUpdateButton/useDefaultUpdateButton.js +72 -52
  152. package/dist/react-components/tables/EFWTable/hooks/useStableColumnRenderers/useStableColumnRenderers.d.ts +10 -0
  153. package/dist/react-components/tables/EFWTable/hooks/useStableColumnRenderers/useStableColumnRenderers.js +28 -0
  154. package/dist/react-components/tables/EFWTable/hooks/useTableController/useTableController.js +151 -115
  155. package/dist/react-components/tables/EFWTable/hooks/useTableSelection/useTableSelection.d.ts +1 -1
  156. package/dist/react-components/tables/EFWTable/hooks/useTableSelection/useTableSelection.js +100 -53
  157. package/dist/react-components/tables/EFWTable/hooks/useTableSelection/useTableSelection.types.d.ts +5 -1
  158. package/dist/react-components/tables/EFWTable/index.d.ts +4 -1
  159. package/dist/react-components/tables/EFWTable/index.js +7 -5
  160. package/dist/react-components/tables/EFWTable/utils/CellRenderer/CellRenderer.js +26 -23
  161. package/dist/react-components/tables/EFWTable/utils/cache.d.ts +1 -8
  162. package/dist/react-components/tables/EFWTable/utils/cache.js +40 -49
  163. package/dist/react-components/tables/EFWTable/utils/filterFunctions.d.ts +16 -0
  164. package/dist/react-components/tables/EFWTable/utils/filterFunctions.js +52 -0
  165. package/dist/react-components/tables/EFWTable/utils/hashing.d.ts +2 -2
  166. package/dist/react-components/tables/EFWTable/utils/hashing.js +2 -2
  167. package/package.json +49 -22
  168. package/dist/react-components/fields/EFWAttachments/EFWAttachments.js +0 -125
  169. package/dist/react-components/fields/EFWAttachments/EFWAttachmentsCard/EFWAttachmentsCard.js +0 -107
  170. package/dist/react-components/fields/EFWAttachments/EFWAttachmentsCard/index.d.ts +0 -1
  171. package/dist/react-components/fields/EFWAttachments/index.d.ts +0 -2
  172. package/dist/react-components/fields/EFWAttachments/index.js +0 -4
  173. package/dist/react-components/fields/EFWAttachmentsField/EFWAttachmentsField.js +0 -57
  174. package/dist/react-components/fields/EFWAttachmentsField/index.d.ts +0 -2
  175. package/dist/react-components/fields/EFWAttachmentsField/index.js +0 -4
  176. package/dist/react-components/fields/EFWDatePicker/EFWDatePicker.js +0 -114
  177. package/dist/react-components/fields/EFWDatePicker/EFWDatePicker.utils.d.ts +0 -24
  178. package/dist/react-components/fields/EFWDatePicker/EFWDatePicker.utils.js +0 -90
  179. package/dist/react-components/fields/EFWDatePicker/index.d.ts +0 -2
  180. package/dist/react-components/fields/EFWDatePicker/index.js +0 -4
  181. package/dist/react-components/fields/EFWDatePickerField/EFWDatePickerField.js +0 -65
  182. package/dist/react-components/fields/EFWDatePickerField/EFWDatePickerField.types.d.ts +0 -7
  183. package/dist/react-components/fields/EFWDatePickerField/index.d.ts +0 -2
  184. package/dist/react-components/fields/EFWDatePickerField/index.js +0 -4
  185. package/dist/react-components/fields/EFWField/EFWField.js +0 -96
  186. package/dist/react-components/fields/EFWField/EFWField.utils.js +0 -17
  187. package/dist/react-components/fields/EFWInput/EFWInput.d.ts +0 -26
  188. package/dist/react-components/fields/EFWInput/EFWInput.js +0 -119
  189. package/dist/react-components/fields/EFWInput/EFWInput.utils.d.ts +0 -20
  190. package/dist/react-components/fields/EFWInput/EFWInput.utils.js +0 -83
  191. package/dist/react-components/fields/EFWInput/index.d.ts +0 -2
  192. package/dist/react-components/fields/EFWInput/index.js +0 -4
  193. package/dist/react-components/fields/EFWInputField/EFWInputField.js +0 -73
  194. package/dist/react-components/fields/EFWInputField/EFWInputField.utils.d.ts +0 -1
  195. package/dist/react-components/fields/EFWInputField/EFWInputField.utils.js +0 -0
  196. package/dist/react-components/fields/EFWInputField/index.d.ts +0 -2
  197. package/dist/react-components/fields/EFWInputField/index.js +0 -4
  198. package/dist/react-components/fields/EFWNumberInput/EFWNumberInput.js +0 -198
  199. package/dist/react-components/fields/EFWNumberInput/EFWNumberInput.utils.js +0 -76
  200. package/dist/react-components/fields/EFWNumberInput/index.d.ts +0 -2
  201. package/dist/react-components/fields/EFWNumberInput/index.js +0 -4
  202. package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.js +0 -67
  203. package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.utils.d.ts +0 -1
  204. package/dist/react-components/fields/EFWNumberInputField/EFWNumberInputField.utils.js +0 -0
  205. package/dist/react-components/fields/EFWNumberInputField/index.d.ts +0 -2
  206. package/dist/react-components/fields/EFWNumberInputField/index.js +0 -4
  207. package/dist/react-components/fields/EFWSwitch/EFWSwitch.js +0 -55
  208. package/dist/react-components/fields/EFWSwitch/index.d.ts +0 -2
  209. package/dist/react-components/fields/EFWSwitch/index.js +0 -4
  210. package/dist/react-components/fields/EFWSwitchField/EFWSwitchField.js +0 -55
  211. package/dist/react-components/fields/EFWSwitchField/index.d.ts +0 -2
  212. package/dist/react-components/fields/EFWSwitchField/index.js +0 -4
  213. package/dist/react-components/fields/EFWTagPicker/EFWTagPicker.js +0 -244
  214. package/dist/react-components/fields/EFWTagPicker/index.d.ts +0 -2
  215. package/dist/react-components/fields/EFWTagPicker/index.js +0 -4
  216. package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.js +0 -74
  217. package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.utils.d.ts +0 -1
  218. package/dist/react-components/fields/EFWTagPickerField/EFWTagPickerField.utils.js +0 -0
  219. package/dist/react-components/fields/EFWTagPickerField/index.d.ts +0 -2
  220. package/dist/react-components/fields/EFWTagPickerField/index.js +0 -4
  221. package/dist/react-components/fields/EFWTextArea/EFWTextArea.js +0 -105
  222. package/dist/react-components/fields/EFWTextArea/EFWTextArea.utils.d.ts +0 -1
  223. package/dist/react-components/fields/EFWTextArea/EFWTextArea.utils.js +0 -0
  224. package/dist/react-components/fields/EFWTextArea/index.d.ts +0 -2
  225. package/dist/react-components/fields/EFWTextArea/index.js +0 -4
  226. package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.js +0 -71
  227. package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.utils.d.ts +0 -1
  228. package/dist/react-components/fields/EFWTextAreaField/EFWTextAreaField.utils.js +0 -0
  229. package/dist/react-components/fields/EFWTextAreaField/index.d.ts +0 -2
  230. package/dist/react-components/fields/EFWTextAreaField/index.js +0 -4
  231. package/dist/react-components/fields/types.d.ts +0 -1
  232. package/dist/react-components/fields/types.js +0 -0
  233. package/dist/utils/htmlConverter.d.ts +0 -15
  234. package/dist/utils/htmlConverter.js +0 -12
  235. /package/dist/react-components/fields/{EFWAttachments → Attachments}/EFWAttachments.d.ts +0 -0
  236. /package/dist/react-components/fields/{EFWAttachmentsField → Attachments}/EFWAttachmentsField.d.ts +0 -0
  237. /package/dist/react-components/fields/{EFWDatePickerField → DatePicker}/EFWDatePickerField.d.ts +0 -0
  238. /package/dist/react-components/fields/{EFWInputField → Input}/EFWInputField.d.ts +0 -0
  239. /package/dist/react-components/fields/{EFWNumberInput → NumberInput}/EFWNumberInput.d.ts +0 -0
  240. /package/dist/react-components/fields/{EFWNumberInputField → NumberInput}/EFWNumberInputField.d.ts +0 -0
  241. /package/dist/react-components/fields/{EFWSwitch → Switch}/EFWSwitch.d.ts +0 -0
  242. /package/dist/react-components/fields/{EFWSwitchField → Switch}/EFWSwitchField.d.ts +0 -0
  243. /package/dist/react-components/fields/{EFWTagPicker → TagPicker}/EFWTagPicker.d.ts +0 -0
  244. /package/dist/react-components/fields/{EFWTagPickerField → TagPicker}/EFWTagPickerField.d.ts +0 -0
  245. /package/dist/react-components/fields/{EFWTextArea → TextArea}/EFWTextArea.d.ts +0 -0
  246. /package/dist/react-components/fields/{EFWTextAreaField → TextArea}/EFWTextAreaField.d.ts +0 -0
  247. /package/dist/react-components/fields/{EFWField → _shared/EFWField}/EFWField.d.ts +0 -0
  248. /package/dist/react-components/fields/{EFWField → _shared/EFWField}/EFWField.utils.d.ts +0 -0
  249. /package/dist/react-components/fields/{EFWField → _shared/EFWField}/index.d.ts +0 -0
  250. /package/dist/react-components/fields/{EFWField → _shared/EFWField}/index.js +0 -0
  251. /package/dist/{react-components/fields/EFWAttachments/EFWAttachmentsCard/index.js → vite-raw.d.js} +0 -0
@@ -1,44 +1,85 @@
1
- import { jsx as E, jsxs as dt } from "react/jsx-runtime";
2
- import * as jt from "react";
3
- import { useRef as N, useState as $, useCallback as g, useEffect as B, useMemo as q } from "react";
4
- import { useReactTable as Ht, getSortedRowModel as Pt, getFilteredRowModel as Yt, getCoreRowModel as $t } from "@tanstack/react-table";
5
- import { makeStyles as qt, tokens as oe, mergeClasses as Gt, Card as Xt, Checkbox as gt } from "@fluentui/react-components";
6
- import { useTableSelection as Jt } from "./hooks/useTableSelection/useTableSelection.js";
7
- import { renderCellContent as Kt } from "./utils/index.js";
8
- import { useDefaultAddButton as Ut } from "./hooks/useDefaultAddButton/useDefaultAddButton.js";
9
- import { useDefaultUpdateButton as Vt } from "./hooks/useDefaultUpdateButton/useDefaultUpdateButton.js";
10
- import { useDefaultDeleteButton as Zt } from "./hooks/useDefaultDeleteButton/useDefaultDeleteButton.js";
11
- import { generateId as ft } from "./utils/general.js";
12
- import { EFWTableCommandBar as Qt } from "./components/EFWTableCommandBar/EFWTableCommandBar.js";
13
- import { EFWTableOverlay as mt } from "./components/EFWTableOverlay/EFWTableOverlay.js";
14
- import { addRowId as se, ensureItemRowId as ht } from "./utils/typeHelpers.js";
15
- import { EFWTableHeader as en } from "./components/EFWTableHeader/EFWTableHeader.js";
16
- import { EFWTableBody as tn } from "./components/EFWTableBody/EFWTableBody.js";
17
- const re = {}, nn = /* @__PURE__ */ new Set(), pt = [], ce = [], x = 120, F = 80, ie = 2500, G = 48, zn = 48, sn = ({
18
- table: W
19
- }) => /* @__PURE__ */ E(
20
- gt,
1
+ import { jsx as D, jsxs as ct } from "react/jsx-runtime";
2
+ import * as fr from "react";
3
+ import { useMemo as se, useRef as w, useState as te, useCallback as f, useEffect as oe, useLayoutEffect as kn } from "react";
4
+ import { useReactTable as mr, getSortedRowModel as hr, getFilteredRowModel as pr, getCoreRowModel as gr } from "@tanstack/react-table";
5
+ import { makeStyles as Sr, tokens as $, mergeClasses as wr, Card as xr, Checkbox as Hn, Spinner as Ir } from "@fluentui/react-components";
6
+ import { useTableSelection as br } from "./hooks/useTableSelection/useTableSelection.js";
7
+ import { renderCellContent as yr } from "./utils/index.js";
8
+ import { useDefaultAddButton as Rr } from "./hooks/useDefaultAddButton/useDefaultAddButton.js";
9
+ import { useDefaultUpdateButton as vr } from "./hooks/useDefaultUpdateButton/useDefaultUpdateButton.js";
10
+ import { useDefaultDeleteButton as Cr } from "./hooks/useDefaultDeleteButton/useDefaultDeleteButton.js";
11
+ import { useDefaultFilterButton as Tr } from "./hooks/useDefaultFilterButton/useDefaultFilterButton.js";
12
+ import { useStableColumnRenderers as Er } from "./hooks/useStableColumnRenderers/useStableColumnRenderers.js";
13
+ import { getFilterFn as zr, isEmptyFilterValue as Fr } from "./utils/filterFunctions.js";
14
+ import { useTableLocaleText as Mr, PorygonI18nProvider as Ar } from "../../i18n/PorygonI18nProvider.js";
15
+ import { generateId as it } from "./utils/general.js";
16
+ import { addRowId as We, ensureItemRowId as Ln } from "./utils/typeHelpers.js";
17
+ import { EFWTableCommandBar as Nr } from "./components/EFWTableCommandBar/EFWTableCommandBar.js";
18
+ import { EFWTableOverlay as _n } from "./components/EFWTableOverlay/EFWTableOverlay.js";
19
+ import { EFWTableHeader as kr } from "./components/EFWTableHeader/EFWTableHeader.js";
20
+ import { EFWTableBody as Lr } from "./components/EFWTableBody/EFWTableBody.js";
21
+ const de = {}, _r = /* @__PURE__ */ new Set(), Wn = [], Be = [], Wr = {}, De = (g) => g, Br = (g) => Object.entries(g).filter(([, p]) => !Fr(p)).map(([p, y]) => ({ id: p, value: y })), Oe = (g) => Object.fromEntries(g.map((p) => [p.id, p.value])), Bn = (g) => g.map(({ id: p, desc: y }) => ({ id: p, desc: y })), Me = (g) => g.map(({ id: p, desc: y }) => ({ id: p, desc: y })), O = 120, Ae = 40, he = 120, Pe = 2500, Dn = 500, Dr = 20, Or = (g) => {
22
+ switch (g) {
23
+ case "Date":
24
+ return (p, y, a) => {
25
+ const C = p.getValue(a), v = y.getValue(a), M = C?.[0] ? new Date(C[0]).getTime() : 0, z = v?.[0] ? new Date(v[0]).getTime() : 0;
26
+ return M < z ? -1 : M > z ? 1 : 0;
27
+ };
28
+ case "Choice":
29
+ return (p, y, a) => {
30
+ const C = p.getValue(a), v = y.getValue(a), M = C?.map((k) => k.text).join(", ") ?? "", z = v?.map((k) => k.text).join(", ") ?? "";
31
+ return M.localeCompare(z);
32
+ };
33
+ case "Number":
34
+ return "basic";
35
+ case "Boolean":
36
+ return (p, y, a) => {
37
+ const C = p.getValue(a), v = y.getValue(a);
38
+ return (C ? 1 : 0) - (v ? 1 : 0);
39
+ };
40
+ default:
41
+ return "alphanumeric";
42
+ }
43
+ };
44
+ function fe(g, p, y) {
45
+ return p.length === 0 ? g : y === "start" ? [...p, ...g] : [...g, ...p];
46
+ }
47
+ function me(g, p, y) {
48
+ const a = y === "start" ? 0 : p;
49
+ return g.map((C, v) => ({
50
+ index: a + v,
51
+ item: C
52
+ }));
53
+ }
54
+ const Pr = ({
55
+ table: g,
56
+ dense: p
57
+ }) => /* @__PURE__ */ D(
58
+ Hn,
21
59
  {
22
60
  shape: "circular",
23
- checked: W.getIsAllRowsSelected(),
24
- onChange: W.getToggleAllRowsSelectedHandler(),
61
+ checked: g.getIsAllRowsSelected(),
62
+ onChange: g.getToggleAllRowsSelectedHandler(),
63
+ style: p ? void 0 : { marginTop: "4px" },
25
64
  "data-checkbox": "true"
26
65
  }
27
- ), rn = ({
28
- row: W,
29
- toggleMultiple: ae
30
- }) => /* @__PURE__ */ E(
31
- gt,
66
+ ), Hr = ({
67
+ row: g,
68
+ toggleMultiple: p,
69
+ dense: y
70
+ }) => /* @__PURE__ */ D(
71
+ Hn,
32
72
  {
33
73
  shape: "circular",
34
- checked: W.getIsSelected(),
35
- onChange: (L) => {
36
- L.stopPropagation(), ae(W.index);
74
+ checked: g.getIsSelected(),
75
+ onChange: (a) => {
76
+ a.stopPropagation(), p(g.index);
37
77
  },
38
- onClick: (L) => L.stopPropagation(),
78
+ onClick: (a) => a.stopPropagation(),
79
+ style: y ? void 0 : { marginTop: "6px" },
39
80
  "data-checkbox": "true"
40
81
  }
41
- ), cn = qt({
82
+ ), jr = Sr({
42
83
  "efw-table": {},
43
84
  /* Transición suave para el box-shadow en las celdas y cabeceras fijas */
44
85
  "efw-table-scroll-container": {
@@ -48,7 +89,7 @@ const re = {}, nn = /* @__PURE__ */ new Set(), pt = [], ce = [], x = 120, F = 80
48
89
  transform: "translateZ(0)"
49
90
  },
50
91
  "& .table-header": {
51
- boxShadow: `0px 1px 0 0px ${oe.colorNeutralStroke2}`
92
+ boxShadow: `0px 1px 0 0px ${$.colorNeutralStroke2}`
52
93
  },
53
94
  "& .header-cell": {
54
95
  "&.sticky-column": {
@@ -65,12 +106,12 @@ const re = {}, nn = /* @__PURE__ */ new Set(), pt = [], ce = [], x = 120, F = 80
65
106
  "&.is-scrolling-x": {
66
107
  "& .header-cell": {
67
108
  "&.sticky-column": {
68
- boxShadow: "2px 0 4px -2px rgba(0, 0, 0, 0.2)"
109
+ boxShadow: `2px 0 4px -2px ${$.colorNeutralStroke1}`
69
110
  }
70
111
  },
71
112
  "& .table-cell": {
72
113
  "&.sticky-column": {
73
- boxShadow: "2px 0 4px -2px rgba(0, 0, 0, 0.2)"
114
+ boxShadow: `2px 0 4px -2px ${$.colorNeutralStroke1}`
74
115
  }
75
116
  }
76
117
  },
@@ -78,698 +119,1048 @@ const re = {}, nn = /* @__PURE__ */ new Set(), pt = [], ce = [], x = 120, F = 80
78
119
  /* Aplica una sombra debajo de TODAS las cabeceras cuando hay scroll en el eje Y */
79
120
  "&.is-scrolling-y": {
80
121
  "& .table-header": {
81
- boxShadow: "0 2px 4px -2px rgba(0, 0, 0, 0.2)"
122
+ boxShadow: `0 2px 4px -2px ${$.colorNeutralStroke1}`
82
123
  }
83
124
  }
84
125
  }
85
- }), En = ({
86
- appearance: W = "outline",
87
- style: ae = {},
88
- className: L = "",
89
- fields: f,
90
- items: pe,
91
- defaultItems: St,
92
- height: X,
93
- itemSize: wt = 32,
126
+ });
127
+ function On(g, p, y, a) {
128
+ let C = 0, v = 0;
129
+ const M = [];
130
+ if (p.forEach((I) => {
131
+ const G = y.find((T) => T.internalName === I.id)?.typeAsString === "Note" ? O * 2 : O, U = a[I.id] || (typeof I.size == "number" ? I.size : G);
132
+ I.id === "select" ? C += U : (v += U, M.push(I));
133
+ }), M.length === 0) return null;
134
+ const z = C + v;
135
+ if (Math.abs(z - g) < 1) return null;
136
+ const k = g - C, q = k / v, ne = { ...a };
137
+ let ce = 0;
138
+ return M.forEach((I, Y) => {
139
+ const G = a[I.id] || (typeof I.size == "number" ? I.size : O), U = I.minSize || he;
140
+ let T;
141
+ Y === M.length - 1 ? T = k - ce : T = Math.round(G * q), T = Math.max(U, T), ne[I.id] = T, ce += T;
142
+ }), ne;
143
+ }
144
+ function Pn(g, p, y, a, C) {
145
+ const v = g - C;
146
+ if (Math.abs(v) < 1) return null;
147
+ const M = p.filter((T) => T.id && T.id !== "select");
148
+ if (M.length === 0) return null;
149
+ const z = M[M.length - 1], k = z.id, ne = y.find((T) => T.internalName === k)?.typeAsString === "Note" ? O * 2 : O, I = (a[k] || (typeof z.size == "number" ? z.size : ne)) + v, Y = z.minSize || he, G = Math.max(Y, I), U = a[k];
150
+ return U !== void 0 && Math.abs(U - G) < 1 ? null : { [k]: G };
151
+ }
152
+ const ls = ({
153
+ appearance: g = "outline",
154
+ style: p = de,
155
+ className: y = "",
156
+ fields: a,
157
+ localeText: C,
158
+ items: v,
159
+ defaultItems: M,
160
+ height: z,
161
+ itemSize: k,
162
+ dense: q = !0,
163
+ rowAnimationConfig: ne = Wr,
164
+ cellLineClamp: ce,
94
165
  // tableStyle = 'row',
95
- enableSelection: R = !0,
96
- enableCommandBar: le = !0,
97
- defaultSelectedItems: xt = nn,
98
- onSelectionChange: It,
99
- onRowClick: ue,
100
- resizableColumns: de = !1,
101
- columnSizing: v = re,
102
- useVirtualization: ge = !1,
103
- autoSizeColumns: T = !1,
104
- tableRef: bt,
105
- onItemsChange: Se,
106
- onScroll: we,
107
- addButtonConfig: yt = re,
108
- updateButtonConfig: zt = re,
109
- deleteButtonConfig: Et = re,
110
- alwaysButtons: xe = ce,
111
- noSelectionButtons: Rt = ce,
112
- singleSelectionButtons: vt = ce,
113
- multiSelectionButtons: Ie = ce,
114
- beforeAddItems: J,
115
- beforeUpdateItems: K,
116
- beforeDeleteItems: U,
117
- columnRenderers: be,
118
- useDefaultRendererAsFallback: ye = !0,
166
+ enableSelection: I = !0,
167
+ enableCommandBar: Y = !0,
168
+ defaultSelectedItems: G = _r,
169
+ onSelectionChange: U,
170
+ onRowClick: T,
171
+ onRowDoubleClick: He,
172
+ resizableColumns: je = !1,
173
+ columnConfig: P = de,
174
+ useVirtualization: lt = !1,
175
+ autoSizeColumns: ie = !1,
176
+ tableRef: jn,
177
+ onItemsChange: at,
178
+ onScroll: ut,
179
+ onScrollEnd: dt,
180
+ scrollEndThreshold: ft = Dn,
181
+ loadingMore: pe = !1,
182
+ addButtonConfig: Un = de,
183
+ updateButtonConfig: Vn = de,
184
+ deleteButtonConfig: $n = de,
185
+ filterButtonConfig: qn = de,
186
+ alwaysButtons: mt = Be,
187
+ noSelectionButtons: Yn = Be,
188
+ singleSelectionButtons: ht = Be,
189
+ multiSelectionButtons: pt = Be,
190
+ beforeAddItems: gt,
191
+ beforeUpdateItems: St,
192
+ beforeDeleteItems: wt,
193
+ defaultSorting: Gn,
194
+ onSortChange: Ue,
195
+ onFilterChange: Ve,
196
+ columnRenderers: Kn,
197
+ useDefaultRendererAsFallback: xt = !0,
119
198
  // Overlay state props
120
- overlayState: ze,
121
- defaultOverlayState: Mt,
122
- onOverlayStateChange: b,
123
- overlayCustomization: D,
124
- overlayHeight: fe = 200
199
+ overlayState: It,
200
+ defaultOverlayState: Xn,
201
+ onOverlayStateChange: j,
202
+ overlayCustomization: le,
203
+ overlayHeight: $e = 200
125
204
  }) => {
126
- ge && X === void 0 && console.warn(
205
+ const bt = se(() => {
206
+ const {
207
+ form: e,
208
+ fields: t,
209
+ buttons: n,
210
+ ...r
211
+ } = C ?? {}, o = Object.keys(r).length > 0 ? r : void 0, c = e || t || n ? {
212
+ ...e ? { form: e } : {},
213
+ ...t ? { fields: t } : {},
214
+ ...n ? { buttons: n } : {}
215
+ } : void 0;
216
+ return {
217
+ tableOverrides: o,
218
+ i18nProviderLocale: c
219
+ };
220
+ }, [C]), W = Mr(bt.tableOverrides), yt = bt.i18nProviderLocale, Rt = Er(Kn);
221
+ lt && z === void 0 && console.warn(
127
222
  '[EFWTable] La prop "height" es requerida cuando "useVirtualization" está habilitado. La virtualización necesita una altura fija para calcular las filas visibles.'
128
223
  );
129
- const O = X !== void 0 ? le ? X - 40 : X : void 0, Ee = cn(), Nt = Gt(L, Ee["efw-table"]), _ = N(!1), j = N(null), H = N(null), Re = pe !== void 0, I = ze !== void 0, [Wt, P] = $(
130
- () => Mt || { state: "none" }
131
- ), V = I ? ze : Wt, [Ct, Tt] = $(() => (St || pt).map((t) => ({
224
+ const ge = z !== void 0 ? Y ? z - 40 : z : void 0, qe = k ?? (q ? 32 : 44), vt = jr(), Jn = wr(y, "efw-table", vt["efw-table"]), K = w(!1), Se = w(null), we = w(null), Ye = v !== void 0, H = It !== void 0, [Zn, xe] = te(
225
+ () => Xn || { state: "none" }
226
+ ), Ne = H ? It : Zn, [Qn, er] = te(() => (M || Wn).map((t) => ({
132
227
  ...t,
133
- _rowId: t._rowId || ft()
134
- }))), M = Re ? pe || pt : Ct, [S, Z] = $(() => {
228
+ _rowId: t._rowId || it()
229
+ }))), X = Ye ? v || Wn : Qn, Ct = w(/* @__PURE__ */ new WeakMap()), ke = f((e, t) => {
230
+ if (e._rowId)
231
+ return String(e._rowId);
232
+ const n = Ct.current.get(e);
233
+ if (n)
234
+ return n;
235
+ const r = it();
236
+ return Ct.current.set(e, r), r;
237
+ }, []), [L, Ie] = te(() => {
135
238
  const e = {};
136
- return f.forEach((t) => {
137
- const n = v[t.internalName];
239
+ return a.forEach((t) => {
240
+ const n = P[t.internalName];
138
241
  if (n?.width) {
139
- const s = n.minWidth ?? F, r = n.maxWidth ?? ie;
140
- e[t.internalName] = Math.min(Math.max(n.width ?? 0, s), r);
242
+ const r = n.minWidth ?? he, o = n.maxWidth ?? Pe;
243
+ e[t.internalName] = Math.min(Math.max(n.width ?? 0, r), o);
141
244
  }
142
245
  }), e;
143
- }), ve = N(v), [C, Me] = $(0), {
144
- rowSelection: k,
145
- setRowSelection: Ne,
246
+ }), Tt = w(P), [J, Ge] = te(() => Bn(Gn ?? [])), [Z, Ke] = te([]), Et = w(Z);
247
+ Et.current = Z;
248
+ const [Q, zt] = te(0), [tr, nr] = te({}), Xe = w(ne);
249
+ Xe.current = ne;
250
+ const {
251
+ rowSelection: ae,
252
+ setRowSelection: Ft,
146
253
  // selectedIndexes,
147
- deselectAll: We,
148
- selectSingle: Ce,
149
- toggleMultiple: Te,
254
+ deselectAll: Mt,
255
+ selectSingle: At,
256
+ toggleMultiple: Nt,
150
257
  // selectMultiple,
151
- getSelectedItems: _e,
152
- getSelectedRows: ke
153
- } = Jt({
154
- initialSelection: xt,
155
- onSelectionChange: It,
156
- enableSelection: R
157
- }), Ae = N(null), [Q, _t] = $(null), kt = g((e) => {
158
- Ae.current = e, _t(e);
159
- }, []), w = N(M), ee = N(/* @__PURE__ */ new Map());
160
- B(() => {
161
- w.current = M;
258
+ getSelectedItems: kt,
259
+ getSelectedRows: Lt
260
+ } = br({
261
+ initialSelection: G,
262
+ onSelectionChange: U,
263
+ enableSelection: I,
264
+ items: X,
265
+ getRowId: ke
266
+ }), re = w(null), ue = w(null), [Je, rr] = te(null), sr = f((e) => {
267
+ re.current = e, rr(e);
268
+ }, []), ee = f(() => {
269
+ if (Qe.current && !be.current) {
270
+ ue.current = null;
271
+ return;
272
+ }
273
+ const e = re.current;
274
+ if (!e) {
275
+ ue.current = null;
276
+ return;
277
+ }
278
+ ue.current = {
279
+ top: e.scrollTop,
280
+ left: e.scrollLeft
281
+ };
282
+ }, []), Ze = f((e, t) => {
283
+ e.scrollTop !== t.top && (e.scrollTop = t.top), e.scrollLeft !== t.left && (e.scrollLeft = t.left);
284
+ }, []), A = f((e, t, n) => {
285
+ !(n?.animateRows ?? (t === "add" ? Xe.current.addRows : Xe.current.updateRows)) || e.length === 0 || nr((o) => {
286
+ const c = { ...o };
287
+ return e.forEach(({ item: u }, s) => {
288
+ if (!u._rowId)
289
+ return;
290
+ const i = String(u._rowId);
291
+ c[i] = {
292
+ delay: s * Dr,
293
+ token: (c[i]?.token ?? 0) + 1
294
+ };
295
+ }), c;
296
+ });
297
+ }, []), R = w(X), Le = w(/* @__PURE__ */ new Map()), Qe = w(Ye);
298
+ Qe.current = Ye;
299
+ const be = w(at);
300
+ be.current = at;
301
+ const ye = w(gt);
302
+ ye.current = gt;
303
+ const Re = w(St);
304
+ Re.current = St;
305
+ const ve = w(wt);
306
+ ve.current = wt;
307
+ const _ = w(null), _t = w(pe);
308
+ _t.current = pe;
309
+ const Wt = w(ut);
310
+ Wt.current = ut;
311
+ const et = w(dt);
312
+ et.current = dt;
313
+ const tt = w(ft);
314
+ tt.current = ft, oe(() => {
315
+ R.current = X;
162
316
  const e = /* @__PURE__ */ new Map();
163
- M.forEach((t, n) => {
317
+ X.forEach((t, n) => {
164
318
  t._rowId && e.set(String(t._rowId), n);
165
- }), ee.current = e;
166
- }, [M]);
167
- const me = N(/* @__PURE__ */ new Set()), Be = q(() => {
319
+ }), Le.current = e;
320
+ }, [X]), kn(() => {
321
+ const e = ue.current;
322
+ if (!e)
323
+ return;
324
+ ue.current = null;
325
+ const t = re.current;
326
+ if (!t)
327
+ return;
328
+ Ze(t, e);
329
+ const n = requestAnimationFrame(() => {
330
+ const r = re.current;
331
+ r && Ze(r, e);
332
+ });
333
+ return () => {
334
+ cancelAnimationFrame(n);
335
+ };
336
+ }, [X, Ze]);
337
+ const nt = w(/* @__PURE__ */ new Set()), Ce = w(!1), Bt = w(0), Dt = w(0), Ot = w(!1);
338
+ oe(() => {
339
+ pe || (re.current?.scrollHeight ?? 0) > Dt.current && (Ce.current = !1);
340
+ }, [pe]);
341
+ const Pt = se(() => {
168
342
  const e = [], t = {};
169
343
  let n = 0;
170
- return R && (e.push("select"), t.select = n, n += G), f.forEach((s) => {
171
- const r = v[s.internalName] || {};
172
- if (!r.hidden && r.sticky) {
173
- e.push(s.internalName), t[s.internalName] = n;
174
- const c = S[s.internalName] || r.width || x;
344
+ return I && (e.push("select"), t.select = n, n += Ae), a.forEach((r) => {
345
+ const o = P[r.internalName] || {};
346
+ if (!o.hidden && o.sticky) {
347
+ e.push(r.internalName), t[r.internalName] = n;
348
+ const c = L[r.internalName] || o.width || O;
175
349
  n += c;
176
350
  }
177
351
  }), { stickyColumns: e, stickyPositions: t };
178
- }, [f, R, v, S]), y = q(() => {
352
+ }, [a, I, P, L]), B = se(() => {
179
353
  const e = [];
180
- return R && e.push({
354
+ return I && e.push({
181
355
  id: "select",
182
- header: ({ table: t }) => /* @__PURE__ */ E(sn, { table: t }),
183
- cell: ({ row: t }) => /* @__PURE__ */ E(rn, { row: t, toggleMultiple: Te }),
184
- size: G,
185
- minSize: G,
186
- maxSize: G,
356
+ header: ({ table: t }) => /* @__PURE__ */ D(Pr, { table: t, dense: q }),
357
+ cell: ({ row: t }) => /* @__PURE__ */ D(Hr, { row: t, toggleMultiple: Nt, dense: q }),
358
+ size: Ae,
359
+ minSize: Ae,
360
+ maxSize: Ae,
187
361
  enableResizing: !1
188
- }), f.forEach((t) => {
189
- const n = v[t.internalName] || {};
362
+ }), a.forEach((t) => {
363
+ const n = P[t.internalName] || {};
190
364
  if (n.hidden)
191
365
  return;
192
- const s = t.typeAsString === "Note" ? x * 2 : x, r = n.width || s, c = n.minWidth || F, a = n.maxWidth || ie;
366
+ const r = t.typeAsString === "Note" ? O * 2 : O, o = n.width || r, c = n.minWidth || he, u = n.maxWidth || Pe;
193
367
  e.push({
194
368
  id: t.internalName,
195
369
  accessorKey: t.internalName,
196
370
  header: t.title || t.internalName,
197
- cell: ({ row: i }) => Kt(
371
+ cell: ({ row: s }) => yr(
198
372
  t,
199
- i.original[t.internalName],
200
- i.original,
201
- i.index,
202
- be,
203
- ye
373
+ s.original[t.internalName],
374
+ s.original,
375
+ s.index,
376
+ Rt,
377
+ xt
204
378
  ),
205
- size: Math.min(Math.max(r, c), a),
379
+ size: Math.min(Math.max(o, c), u),
206
380
  minSize: c,
207
- maxSize: a,
208
- enableResizing: de
381
+ maxSize: u,
382
+ enableResizing: je,
383
+ enableSorting: n.sortable !== !1,
384
+ sortingFn: Or(t.typeAsString),
385
+ filterFn: zr(t.typeAsString),
386
+ meta: {
387
+ typeAsString: t.typeAsString,
388
+ cellLineClamp: n.cellLineClamp ?? ce
389
+ }
209
390
  });
210
391
  }), e;
211
392
  }, [
212
- f,
213
- R,
214
- de,
215
- v,
216
- be,
217
- ye,
218
- Te
393
+ a,
394
+ I,
395
+ je,
396
+ P,
397
+ ce,
398
+ Rt,
399
+ xt,
400
+ Nt
219
401
  ]);
220
- B(() => {
221
- const e = ve.current;
222
- Z((t) => {
402
+ oe(() => {
403
+ const e = Tt.current;
404
+ Ie((t) => {
223
405
  let n = !1;
224
- const s = { ...t }, r = new Set(f.map((c) => c.internalName));
225
- return Object.keys(s).forEach((c) => {
226
- r.has(c) || (delete s[c], n = !0);
227
- }), f.forEach((c) => {
228
- const a = c.internalName, i = v[a], o = e[a];
229
- if (i?.width !== void 0) {
230
- const u = i.minWidth ?? F, m = i.maxWidth ?? ie, d = Math.min(Math.max(i.width, u), m);
231
- s[a] !== d && (s[a] = d, n = !0);
232
- } else o?.width !== void 0 && s[a] !== void 0 && (delete s[a], n = !0);
233
- }), n ? s : t;
234
- }), ve.current = v;
235
- }, [v, f]);
236
- const te = q(() => y.reduce((e, t) => {
237
- const s = f.find((c) => c.internalName === t.id)?.typeAsString === "Note" ? x * 2 : x, r = S[t.id] || (typeof t.size == "number" ? t.size : s);
238
- return e + r;
239
- }, 0), [y, S, f]), Fe = Ht({
240
- data: M,
241
- columns: y,
406
+ const r = { ...t }, o = new Set(a.map((c) => c.internalName));
407
+ return Object.keys(r).forEach((c) => {
408
+ o.has(c) || (delete r[c], n = !0);
409
+ }), a.forEach((c) => {
410
+ const u = c.internalName, s = P[u], i = e[u];
411
+ if (s?.width !== void 0) {
412
+ const S = s.minWidth ?? he, x = s.maxWidth ?? Pe, l = Math.min(Math.max(s.width, S), x);
413
+ r[u] !== l && (r[u] = l, n = !0);
414
+ } else i?.width !== void 0 && r[u] !== void 0 && (delete r[u], n = !0);
415
+ }), n ? r : t;
416
+ }), Tt.current = P;
417
+ }, [P, a]);
418
+ const Te = se(() => B.reduce((e, t) => {
419
+ const r = a.find((c) => c.internalName === t.id)?.typeAsString === "Note" ? O * 2 : O, o = L[t.id] || (typeof t.size == "number" ? t.size : r);
420
+ return e + o;
421
+ }, 0), [B, L, a]), or = se(
422
+ () => Math.max(Te, Q || 0, 300),
423
+ [Te, Q]
424
+ ), Ee = w(Ue);
425
+ Ee.current = Ue;
426
+ const ze = w(Ve);
427
+ ze.current = Ve;
428
+ const rt = mr({
429
+ data: X,
430
+ columns: B,
242
431
  state: {
243
- rowSelection: k,
244
- columnSizing: S
432
+ rowSelection: ae,
433
+ columnSizing: L,
434
+ sorting: J,
435
+ columnFilters: Z
436
+ },
437
+ onRowSelectionChange: Ft,
438
+ onSortingChange: (e) => {
439
+ const t = typeof e == "function" ? e(J) : e;
440
+ Ge(t), Ee.current && Ee.current(Me(t), _.current);
441
+ },
442
+ onColumnFiltersChange: (e) => {
443
+ const t = typeof e == "function" ? e(Et.current) : e;
444
+ Ke(t), ze.current && ze.current(Oe(t), _.current);
245
445
  },
246
- onRowSelectionChange: Ne,
247
446
  onColumnSizingChange: (e) => {
248
- Z((t) => {
249
- const n = typeof e == "function" ? e(t) : e, s = {};
250
- return Object.keys(n).forEach((r) => {
251
- const c = y.find((a) => a.id === r);
447
+ Ie((t) => {
448
+ const n = typeof e == "function" ? e(t) : e, r = {};
449
+ return Object.keys(n).forEach((o) => {
450
+ const c = B.find((u) => u.id === o);
252
451
  if (c) {
253
- const a = c.minSize || F, i = c.maxSize || ie;
254
- _.current ? s[r] = Math.max(n[r], a) : s[r] = Math.min(Math.max(n[r], a), i);
452
+ const u = c.minSize || he, s = c.maxSize || Pe;
453
+ K.current ? r[o] = Math.max(n[o], u) : r[o] = Math.min(Math.max(n[o], u), s);
255
454
  }
256
- }), { ...t, ...s };
455
+ }), { ...t, ...r };
257
456
  });
258
457
  },
259
- //getRowId: row => row.id as string,
260
- getCoreRowModel: $t(),
261
- getFilteredRowModel: Yt(),
262
- getSortedRowModel: Pt(),
458
+ getRowId: (e, t) => ke(e, t),
459
+ getCoreRowModel: gr(),
460
+ getFilteredRowModel: pr(),
461
+ getSortedRowModel: hr(),
462
+ manualSorting: !!Ue,
463
+ manualFiltering: !!Ve,
263
464
  columnResizeMode: "onChange",
264
465
  enableRowSelection: !0,
265
- enableMultiRowSelection: R
466
+ enableMultiRowSelection: I
266
467
  });
267
- B(() => {
468
+ oe(() => {
268
469
  const e = /* @__PURE__ */ new Set();
269
- Object.keys(k).forEach((t) => {
270
- if (k[t]) {
271
- const n = parseInt(t), s = w.current[n];
272
- s?._rowId && e.add(s._rowId);
273
- }
274
- }), me.current = e;
275
- }, [k]);
276
- const At = g((e) => {
277
- we?.(e);
278
- }, [we]), Le = (e) => {
279
- const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
280
- return Object.keys(k).forEach((r) => {
281
- if (!k[r])
470
+ Object.keys(ae).forEach((t) => {
471
+ ae[t] && e.add(t);
472
+ }), nt.current = e;
473
+ }, [ae]);
474
+ const cr = f((e) => {
475
+ if (Wt.current?.(e), !et.current || _t.current)
476
+ return;
477
+ const t = e.currentTarget, n = Number.isFinite(tt.current) ? Math.max(0, tt.current) : Dn, { scrollTop: r, scrollHeight: o, clientHeight: c } = t, s = o - r - c <= n, i = Bt.current;
478
+ if (Bt.current = o, o > i && !s) {
479
+ Ce.current = !1;
480
+ return;
481
+ }
482
+ if (!s) {
483
+ Ce.current = !1;
484
+ return;
485
+ }
486
+ Ce.current || (Ce.current = !0, Dt.current = o, et.current());
487
+ }, []), Ht = (e) => {
488
+ const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), o = new Set(
489
+ Object.keys(ae).filter((s) => ae[s])
490
+ ), c = e.map(
491
+ (s, i) => s ? ke(s, i) : ""
492
+ ), u = new Set(c.filter(Boolean));
493
+ return e.forEach((s, i) => {
494
+ if (!s)
282
495
  return;
283
- const c = Number(r), a = e[c];
284
- a && (s.add(c), a._rowId && t.add(a._rowId), n.add(a));
496
+ const S = c[i], x = o.has(S), l = i.toString(), m = !u.has(l) && o.has(l);
497
+ !x && !m || (r.add(i), t.add(S), n.add(s));
285
498
  }), {
286
- hasSelection: t.size > 0 || n.size > 0 || s.size > 0,
499
+ hasSelection: t.size > 0 || n.size > 0 || r.size > 0,
287
500
  selectedIds: t,
288
501
  selectedRefs: n,
289
- selectedIndexes: s,
502
+ selectedIndexes: r,
290
503
  sourceLength: e.length
291
504
  };
292
- }, De = (e, t) => {
505
+ }, jt = (e, t) => {
293
506
  if (!t.hasSelection)
294
507
  return;
295
- const n = t.sourceLength !== e.length, s = {};
296
- e.forEach((r, c) => {
297
- if (!r)
508
+ const n = t.sourceLength !== e.length, r = {};
509
+ e.forEach((o, c) => {
510
+ if (!o)
298
511
  return;
299
- const a = r._rowId ? t.selectedIds.has(r._rowId) : !1, i = t.selectedRefs.has(r), o = !r._rowId && !n && t.selectedIndexes.has(c);
300
- (a || i || o) && (s[c.toString()] = !0);
301
- }), Ne(s);
302
- }, p = (e) => {
303
- if (Re) {
304
- const t = M, n = typeof e == "function" ? e(t) : e;
305
- w.current = n;
306
- const s = Le(t);
307
- me.current = s.selectedIds, De(n, s), Se?.(n);
308
- return;
512
+ const u = ke(o, c), s = t.selectedIds.has(u), i = t.selectedRefs.has(o), S = !n && t.selectedIndexes.has(c);
513
+ (s || i || S) && (r[u] = !0);
514
+ }), Ft(r);
515
+ }, b = f((e) => {
516
+ if (Qe.current) {
517
+ if (!be.current)
518
+ return ue.current = null, Ot.current || (console.warn("[EFWTable] Modo controlled detectado sin onItemsChange. Las operaciones CRUD locales no se aplicarán."), Ot.current = !0), !1;
519
+ const t = R.current, n = typeof e == "function" ? e(t) : e;
520
+ R.current = n;
521
+ const r = Ht(t);
522
+ return nt.current = r.selectedIds, jt(n, r), be.current(n), !0;
309
523
  }
310
- Tt((t) => {
524
+ return er((t) => {
311
525
  const n = typeof e == "function" ? e(t) : e;
312
- w.current = n;
313
- const s = Le(t);
314
- return me.current = s.selectedIds, De(n, s), Se?.(n), n;
315
- });
316
- }, Oe = g(() => f, [f]), je = async (e) => {
526
+ R.current = n;
527
+ const r = Ht(t);
528
+ return nt.current = r.selectedIds, jt(n, r), be.current?.(n), n;
529
+ }), !0;
530
+ }, []), Ut = f(() => a, [a]), Vt = f(() => Me(J), [J]), $t = f(() => Me(J)[0] ?? null, [J]), qt = f(() => J.length > 0, [J]), Yt = f((e) => {
531
+ const t = Bn(e);
532
+ Ge(t), Ee.current?.(Me(t), _.current);
533
+ }, []), Gt = f(() => {
534
+ const e = [];
535
+ Ge(e), Ee.current?.(Me(e), _.current);
536
+ }, []), Kt = f(() => a.filter(
537
+ (e) => e.typeAsString !== "Attachments" && P?.[e.internalName]?.filterable !== !1
538
+ ), [a, P]), Xt = f(() => Oe(Z), [Z]), Jt = f(() => Z.length > 0, [Z]), Zt = f((e) => {
539
+ const t = Br(e);
540
+ Ke(t), ze.current?.(Oe(t), _.current);
541
+ }, []), Qt = f(() => {
542
+ const e = [];
543
+ Ke(e), ze.current?.(Oe(e), _.current);
544
+ }, []), en = f(async (e, t = {}) => {
545
+ const { position: n = "end" } = t;
317
546
  try {
318
- if (J) {
319
- const t = se(e), n = await J([t], z);
320
- if (n) {
321
- if (n.successful.length > 0) {
322
- const s = n.successful.map(
323
- (r) => ht(r.item)
547
+ if (ye.current) {
548
+ const r = We(e), o = await ye.current([r], _.current);
549
+ if (o) {
550
+ if (o.successful.length > 0) {
551
+ const i = R.current.length, S = o.successful.map(
552
+ (m) => Ln(m.item)
324
553
  );
325
- p((r) => [...s, ...r]);
554
+ if (ee(), !b((m) => fe(m, S, n)))
555
+ return { successful: [], failed: S.map((m, h) => ({ index: h, item: m, error: "Controlled mode without onItemsChange" })) };
556
+ const l = me(S, i, n);
557
+ return A(l, "add", t), {
558
+ ...o,
559
+ successful: l
560
+ };
326
561
  }
327
- return n;
562
+ return { ...o, successful: [] };
328
563
  }
329
- return p((s) => [t, ...s]), {
330
- successful: [{ index: 0, item: t }],
564
+ const c = R.current.length;
565
+ if (ee(), !b((i) => fe(i, [r], n)))
566
+ return { successful: [], failed: [{ index: -1, item: r, error: "Controlled mode without onItemsChange" }] };
567
+ const s = me([r], c, n);
568
+ return A(s, "add", t), {
569
+ successful: s,
331
570
  failed: []
332
571
  };
333
572
  } else {
334
- const t = se(e);
335
- return p((n) => [t, ...n]), {
336
- successful: [{ index: 0, item: t }],
573
+ const r = We(e), o = R.current.length;
574
+ if (ee(), !b((s) => fe(s, [r], n)))
575
+ return { successful: [], failed: [{ index: -1, item: r, error: "Controlled mode without onItemsChange" }] };
576
+ const u = me([r], o, n);
577
+ return A(u, "add", t), {
578
+ successful: u,
337
579
  failed: []
338
580
  };
339
581
  }
340
- } catch (t) {
582
+ } catch (r) {
341
583
  return {
342
584
  successful: [],
343
- failed: [{ index: -1, item: e, error: String(t) }]
585
+ failed: [{ index: -1, item: e, error: String(r) }]
344
586
  };
345
587
  }
346
- }, He = async (e) => {
588
+ }, [b, ee, A]), tn = f(async (e, t = {}) => {
589
+ const { position: n = "end" } = t;
347
590
  if (e.length === 0)
348
591
  return {
349
592
  successful: [],
350
593
  failed: []
351
594
  };
352
595
  try {
353
- if (J) {
354
- const t = e.map((s) => se(s)), n = await J(t, z);
355
- if (n) {
356
- if (n.successful.length > 0) {
357
- const s = n.successful.map(
358
- (r) => ht(r.item)
596
+ if (ye.current) {
597
+ const r = e.map((i) => We(i)), o = await ye.current(r, _.current);
598
+ if (o) {
599
+ if (o.successful.length > 0) {
600
+ const i = R.current.length, S = o.successful.map(
601
+ (m) => Ln(m.item)
359
602
  );
360
- p((r) => [...s, ...r]);
603
+ if (ee(), !b((m) => fe(m, S, n)))
604
+ return { successful: [], failed: S.map((m, h) => ({ index: h, item: m, error: "Controlled mode without onItemsChange" })) };
605
+ const l = me(S, i, n);
606
+ return A(l, "add", t), {
607
+ ...o,
608
+ successful: l
609
+ };
361
610
  }
362
- return n;
611
+ return { ...o, successful: [] };
363
612
  }
364
- return p((s) => [...t, ...s]), {
365
- successful: t.map((s, r) => ({ index: r, item: s })),
613
+ const c = R.current.length;
614
+ if (ee(), !b((i) => fe(i, r, n)))
615
+ return { successful: [], failed: r.map((i, S) => ({ index: S, item: i, error: "Controlled mode without onItemsChange" })) };
616
+ const s = me(r, c, n);
617
+ return A(s, "add", t), {
618
+ successful: s,
366
619
  failed: []
367
620
  };
368
621
  } else {
369
- const t = e.map((n) => se(n));
370
- return p((n) => [...t, ...n]), {
371
- successful: t.map((n, s) => ({ index: s, item: n })),
622
+ const r = e.map((s) => We(s)), o = R.current.length;
623
+ if (ee(), !b((s) => fe(s, r, n)))
624
+ return { successful: [], failed: r.map((s, i) => ({ index: i, item: s, error: "Controlled mode without onItemsChange" })) };
625
+ const u = me(r, o, n);
626
+ return A(u, "add", t), {
627
+ successful: u,
372
628
  failed: []
373
629
  };
374
630
  }
375
- } catch (t) {
631
+ } catch (r) {
376
632
  return {
377
633
  successful: [],
378
- failed: e.map((n, s) => ({
379
- index: s,
380
- item: n,
381
- error: String(t)
634
+ failed: e.map((o, c) => ({
635
+ index: c,
636
+ item: o,
637
+ error: String(r)
382
638
  }))
383
639
  };
384
640
  }
385
- }, Pe = async (e, t) => {
386
- const n = w.current;
387
- if (e < 0 || e >= n.length)
641
+ }, [b, ee, A]), nn = f(async (e, t, n = {}) => {
642
+ const r = R.current;
643
+ if (e < 0 || e >= r.length)
388
644
  return {
389
645
  successful: [],
390
646
  failed: [{ index: e, item: t, error: "Invalid index" }]
391
647
  };
392
648
  try {
393
- if (K) {
394
- const r = await K([{ index: e, item: t }], z);
395
- if (r)
396
- return r.successful.length && p((c) => {
397
- const a = [...c];
398
- return r.successful.forEach(({ index: i, item: o }) => a[i] = o), a;
399
- }), r;
649
+ if (Re.current) {
650
+ const s = await Re.current([{ index: e, item: t }], _.current);
651
+ if (s) {
652
+ const S = s.successful.filter(
653
+ ({ index: h }) => h >= 0 && h < r.length
654
+ ).map(({ index: h, item: E }) => {
655
+ const V = sn(
656
+ r,
657
+ h,
658
+ E,
659
+ h === e ? t : void 0
660
+ );
661
+ return V ? { index: h, item: V } : null;
662
+ }).filter((h) => h !== null);
663
+ if (S.length) {
664
+ if (!b((E) => {
665
+ const V = [...E];
666
+ return S.forEach(({ index: d, item: N }) => {
667
+ V[d] = N;
668
+ }), V;
669
+ }))
670
+ return { successful: [], failed: S.map(({ index: E, item: V }) => ({ index: E, item: V, error: "Controlled mode without onItemsChange" })) };
671
+ A(S, "update", n);
672
+ }
673
+ const x = new Set(s.failed.map((h) => h.index)), l = [...s.failed];
674
+ return s.successful.filter(({ index: h }) => h < 0 || h >= r.length).map(({ index: h, item: E }) => ({
675
+ index: h,
676
+ item: E,
677
+ error: "Invalid index"
678
+ })).forEach((h) => {
679
+ x.has(h.index) || l.push(h);
680
+ }), { successful: S, failed: l };
681
+ }
400
682
  }
401
- let s;
402
- return p((r) => {
403
- s = { ...r[e], ...t };
404
- const c = [...r];
405
- return c[e] = s, c;
406
- }), { successful: [{ index: e, item: s }], failed: [] };
407
- } catch (s) {
683
+ let o;
684
+ if (!b((s) => {
685
+ o = { ...s[e], ...t };
686
+ const i = [...s];
687
+ return i[e] = o, i;
688
+ }))
689
+ return { successful: [], failed: [{ index: e, item: t, error: "Controlled mode without onItemsChange" }] };
690
+ const u = [{ index: e, item: o }];
691
+ return A(u, "update", n), { successful: u, failed: [] };
692
+ } catch (o) {
408
693
  return {
409
694
  successful: [],
410
- failed: [{ index: e, item: t, error: String(s) }]
695
+ failed: [{ index: e, item: t, error: String(o) }]
411
696
  };
412
697
  }
413
- }, Ye = async (e) => {
698
+ }, [b, A]), rn = f(async (e, t = {}) => {
414
699
  if (!e.length) return { successful: [], failed: [] };
415
- const t = w.current, n = (c) => c >= 0 && c < t.length, s = e.filter(({ index: c }) => !n(c)).map(({ index: c, item: a }) => ({ index: c, item: a, error: "Invalid index" })), r = e.filter(({ index: c }) => n(c));
700
+ const n = R.current, r = (s) => s >= 0 && s < n.length, o = e.filter(({ index: s }) => !r(s)).map(({ index: s, item: i }) => ({ index: s, item: i, error: "Invalid index" })), c = e.filter(({ index: s }) => r(s)), u = /* @__PURE__ */ new Map();
701
+ c.forEach(({ index: s, item: i }) => {
702
+ u.set(s, i);
703
+ });
416
704
  try {
417
- if (K) {
418
- const i = await K(e, z);
419
- if (i) {
420
- const o = i.successful.filter(({ index: l }) => n(l));
421
- o.length && p((l) => {
422
- const A = [...l];
423
- return o.forEach(({ index: h, item: Y }) => A[h] = Y), A;
424
- });
425
- const u = new Set(i.failed.map((l) => l.index)), m = [...i.failed];
426
- return s.forEach((l) => {
427
- u.has(l.index) || m.push(l);
428
- }), i.successful.filter(({ index: l }) => !n(l)).map(({ index: l, item: A }) => ({ index: l, item: A, error: "Invalid index" })).forEach((l) => {
429
- u.has(l.index) || m.push(l);
430
- }), { successful: o, failed: m };
705
+ if (Re.current) {
706
+ const x = await Re.current(e, _.current);
707
+ if (x) {
708
+ const m = x.successful.filter(({ index: d }) => r(d)).map(({ index: d, item: N }) => {
709
+ const F = sn(
710
+ n,
711
+ d,
712
+ N,
713
+ u.get(d)
714
+ );
715
+ return F ? { index: d, item: F } : null;
716
+ }).filter((d) => d !== null);
717
+ if (m.length) {
718
+ if (!b((N) => {
719
+ const F = [...N];
720
+ return m.forEach(({ index: Nn, item: ot }) => {
721
+ F[Nn] = ot;
722
+ }), F;
723
+ }))
724
+ return { successful: [], failed: m.map(({ index: N, item: F }) => ({ index: N, item: F, error: "Controlled mode without onItemsChange" })) };
725
+ A(m, "update", t);
726
+ }
727
+ const h = new Set(x.failed.map((d) => d.index)), E = [...x.failed];
728
+ return o.forEach((d) => {
729
+ h.has(d.index) || E.push(d);
730
+ }), x.successful.filter(({ index: d }) => !r(d)).map(({ index: d, item: N }) => ({ index: d, item: N, error: "Invalid index" })).forEach((d) => {
731
+ h.has(d.index) || E.push(d);
732
+ }), { successful: m, failed: E };
431
733
  }
432
734
  }
433
- const c = [], a = [...s];
434
- return p((i) => {
435
- const o = [...i];
436
- return r.forEach(({ index: u, item: m }) => {
437
- o[u] = { ...o[u], ...m }, c.push({ index: u, item: o[u] });
438
- }), o;
439
- }), { successful: c, failed: a };
440
- } catch (c) {
735
+ const s = [], i = [...o];
736
+ return b((x) => {
737
+ const l = [...x];
738
+ return c.forEach(({ index: m, item: h }) => {
739
+ l[m] = { ...l[m], ...h }, s.push({ index: m, item: l[m] });
740
+ }), l;
741
+ }) ? (A(s, "update", t), { successful: s, failed: i }) : { successful: [], failed: c.map(({ index: x, item: l }) => ({ index: x, item: l, error: "Controlled mode without onItemsChange" })) };
742
+ } catch (s) {
441
743
  return {
442
744
  successful: [],
443
- failed: e.map(({ index: a, item: i }) => ({
444
- index: a,
445
- item: i,
446
- error: String(c)
745
+ failed: e.map(({ index: i, item: S }) => ({
746
+ index: i,
747
+ item: S,
748
+ error: String(s)
447
749
  }))
448
750
  };
449
751
  }
450
- }, $e = async (e) => {
451
- const t = w.current;
752
+ }, [b, A]), sn = (e, t, n, r) => {
753
+ const o = e[t];
754
+ if (!o)
755
+ return null;
756
+ const c = n ?? r;
757
+ return c ? {
758
+ ...o,
759
+ ...c,
760
+ _rowId: c._rowId ?? o._rowId
761
+ } : o;
762
+ }, on = (e, t, n) => {
763
+ const r = e[t];
764
+ return r ? n ? {
765
+ ...r,
766
+ ...n,
767
+ _rowId: n._rowId ?? r._rowId
768
+ } : r : null;
769
+ }, cn = f(async (e) => {
770
+ const t = R.current;
452
771
  if (e < 0 || e >= t.length)
453
772
  return {
454
773
  successful: [],
455
774
  failed: [{ index: e, error: "Invalid index" }]
456
775
  };
457
776
  try {
458
- if (U) {
459
- const s = M[e], r = await U([{ index: e, item: s }], z);
460
- if (r)
461
- return r.successful.length && p((c) => c.filter((a, i) => i !== e)), r;
777
+ if (ve.current) {
778
+ const o = t[e], c = await ve.current([{ index: e, item: o }], _.current);
779
+ if (c) {
780
+ const s = c.successful.filter(
781
+ ({ index: l }) => l >= 0 && l < t.length
782
+ ).map(({ index: l, item: m }) => {
783
+ const h = on(t, l, m);
784
+ return h ? { index: l, item: h } : null;
785
+ }).filter((l) => l !== null);
786
+ if (s.length && !b((m) => m.filter((h, E) => E !== e)))
787
+ return { successful: [], failed: [{ index: e, error: "Controlled mode without onItemsChange" }] };
788
+ const i = new Set(c.failed.map((l) => l.index)), S = [...c.failed];
789
+ return c.successful.filter(({ index: l }) => l < 0 || l >= t.length).map(({ index: l, item: m }) => ({
790
+ index: l,
791
+ item: m,
792
+ error: "Invalid index"
793
+ })).forEach((l) => {
794
+ i.has(l.index) || S.push(l);
795
+ }), { successful: s, failed: S };
796
+ }
462
797
  }
463
798
  let n;
464
- return p((s) => (n = s[e], s.filter((r, c) => c !== e))), { successful: [{ index: e, item: n }], failed: [] };
799
+ return b((o) => (n = o[e], o.filter((c, u) => u !== e))) ? { successful: [{ index: e, item: n }], failed: [] } : { successful: [], failed: [{ index: e, error: "Controlled mode without onItemsChange" }] };
465
800
  } catch (n) {
466
801
  return {
467
802
  successful: [],
468
803
  failed: [{ index: e, error: String(n) }]
469
804
  };
470
805
  }
471
- }, qe = async (e) => {
806
+ }, [b]), ln = f(async (e) => {
472
807
  if (!e.length) return { successful: [], failed: [] };
473
- const t = w.current, n = Array.from(new Set(e)), { validIndexes: s, invalidFailures: r } = n.reduce(
474
- (i, o) => (o >= 0 && o < t.length ? i.validIndexes.push(o) : i.invalidFailures.push({ index: o, error: "Invalid index" }), i),
808
+ const t = R.current, n = Array.from(new Set(e)), { validIndexes: r, invalidFailures: o } = n.reduce(
809
+ (s, i) => (i >= 0 && i < t.length ? s.validIndexes.push(i) : s.invalidFailures.push({ index: i, error: "Invalid index" }), s),
475
810
  { validIndexes: [], invalidFailures: [] }
476
- ), c = n.map((i) => ({ index: i, item: M[i] })), a = new Set(s);
811
+ ), c = n.map((s) => ({ index: s, item: t[s] })), u = new Set(r);
477
812
  try {
478
- if (U) {
479
- const u = await U(c, z);
480
- if (u) {
481
- const m = u.successful.filter(({ index: h }) => a.has(h));
482
- if (m.length) {
483
- const h = new Set(m.map((Y) => Y.index));
484
- p((Y) => Y.filter((on, Ot) => !h.has(Ot)));
813
+ if (ve.current) {
814
+ const x = await ve.current(c, _.current);
815
+ if (x) {
816
+ const l = x.successful.filter(({ index: d }) => u.has(d)), m = l.map(({ index: d, item: N }) => {
817
+ const F = on(t, d, N);
818
+ return F ? { index: d, item: F } : null;
819
+ }).filter((d) => d !== null);
820
+ if (l.length) {
821
+ const d = new Set(m.map((F) => F.index));
822
+ if (!b((F) => F.filter((Nn, ot) => !d.has(ot))))
823
+ return { successful: [], failed: m.map(({ index: F }) => ({ index: F, error: "Controlled mode without onItemsChange" })) };
485
824
  }
486
- const d = new Set(u.failed.map((h) => h.index)), l = [...u.failed];
487
- return r.forEach((h) => {
488
- d.has(h.index) || l.push(h);
489
- }), u.successful.filter(({ index: h }) => !a.has(h)).map(({ index: h }) => ({ index: h, error: "Invalid index" })).forEach((h) => {
490
- d.has(h.index) || l.push(h);
491
- }), { successful: m, failed: l };
825
+ const h = new Set(x.failed.map((d) => d.index)), E = [...x.failed];
826
+ return o.forEach((d) => {
827
+ h.has(d.index) || E.push(d);
828
+ }), x.successful.filter(({ index: d }) => !u.has(d)).map(({ index: d, item: N }) => ({ index: d, item: N, error: "Invalid index" })).forEach((d) => {
829
+ h.has(d.index) || E.push(d);
830
+ }), { successful: m, failed: E };
492
831
  }
493
832
  }
494
- const i = new Set(s), o = [];
495
- return p((u) => {
496
- const m = [];
497
- return u.forEach((d, l) => {
498
- i.has(l) ? o.push({ index: l, item: d }) : m.push(d);
499
- }), m;
500
- }), { successful: o, failed: r };
501
- } catch (i) {
833
+ const s = new Set(r), i = [];
834
+ return b((x) => {
835
+ const l = [];
836
+ return x.forEach((m, h) => {
837
+ s.has(h) ? i.push({ index: h, item: m }) : l.push(m);
838
+ }), l;
839
+ }) ? { successful: i, failed: o } : { successful: [], failed: r.map((x) => ({ index: x, error: "Controlled mode without onItemsChange" })) };
840
+ } catch (s) {
502
841
  return {
503
842
  successful: [],
504
- failed: n.map((o) => ({ index: o, error: String(i) }))
843
+ failed: n.map((i) => ({ index: i, error: String(s) }))
505
844
  };
506
845
  }
507
- }, Ge = g((e) => {
508
- const t = ee.current.get(String(e));
509
- return t !== void 0 ? w.current[t] : void 0;
510
- }, []), Xe = (e) => w.current[e], Je = (e) => {
511
- p(
512
- e.map((t) => ({ ...t, _rowId: t._rowId ?? ft() }))
846
+ }, [b]), an = f((e) => {
847
+ const t = Le.current.get(String(e));
848
+ return t !== void 0 ? R.current[t] : void 0;
849
+ }, []), un = f((e) => R.current[e], []), dn = f((e) => {
850
+ b(
851
+ e.map((t) => ({ ...t, _rowId: t._rowId ?? it() }))
513
852
  );
514
- }, Ke = () => {
515
- p([]);
516
- }, Ue = g((e) => ee.current.get(String(e)) ?? -1, []), Ve = g((e) => ee.current.has(String(e)), []), Ze = () => w.current.length, Qe = () => [...w.current], et = g(() => _e(w.current), [_e]), tt = g(() => ke(w.current), [ke]), nt = g((e, t) => {
853
+ }, [b]), fn = f(() => {
854
+ b([]);
855
+ }, [b]), mn = f((e) => Le.current.get(String(e)) ?? -1, []), hn = f((e) => Le.current.has(String(e)), []), pn = f(() => R.current.length, []), gn = f(() => [...R.current], []), Sn = f(() => kt(R.current), [kt]), wn = f(() => Lt(R.current), [Lt]), xn = f((e, t) => {
517
856
  const n = e ? {
518
857
  state: "loading",
519
858
  message: t?.title,
520
859
  description: t?.description
521
860
  } : { state: "none" };
522
- I || P(n), b?.(n);
523
- }, [I, b]), st = g((e, t) => {
861
+ H || xe(n), j?.(n);
862
+ }, [H, j]), In = f((e, t) => {
524
863
  const n = e ? {
525
864
  state: "error",
526
865
  message: t?.title,
527
866
  description: t?.description,
528
- onRetry: t?.onRetry
867
+ onRetry: t?.onRetry,
868
+ retryButtonText: t?.retryButtonText
529
869
  } : { state: "none" };
530
- I || P(n), b?.(n);
531
- }, [I, b]), rt = g((e, t) => {
870
+ H || xe(n), j?.(n);
871
+ }, [H, j]), bn = f((e, t) => {
532
872
  const n = e ? {
533
873
  state: "partial-loading",
534
874
  message: t?.title,
535
875
  description: t?.description
536
876
  } : { state: "none" };
537
- I || P(n), b?.(n);
538
- }, [I, b]), ct = g((e, t) => {
877
+ H || xe(n), j?.(n);
878
+ }, [H, j]), yn = f((e, t) => {
539
879
  const n = e ? {
540
880
  state: "empty",
541
881
  message: t?.title,
542
882
  description: t?.description,
543
883
  imageUrl: t?.imageUrl
544
884
  } : { state: "none" };
545
- I || P(n), b?.(n);
546
- }, [I, b]), it = g(() => {
885
+ H || xe(n), j?.(n);
886
+ }, [H, j]), Rn = f(() => {
547
887
  const e = { state: "none" };
548
- I || P(e), b?.(e);
549
- }, [I, b]), ot = g(() => V.state, [V.state]), z = q(() => ({
550
- getFields: Oe,
551
- addItem: je,
552
- addItems: He,
553
- updateItem: Pe,
554
- updateItems: Ye,
555
- deleteItem: $e,
556
- deleteItems: qe,
557
- getItem: Ge,
558
- getItemByIndex: Xe,
559
- getItems: Qe,
560
- getItemsCount: Ze,
561
- itemExists: Ve,
562
- getItemIndex: Ue,
563
- replaceAllItems: Je,
564
- clearItems: Ke,
565
- deselectAllRows: We,
566
- getSelectedItems: et,
567
- getSelectedRows: tt,
888
+ H || xe(e), j?.(e);
889
+ }, [H, j]), vn = f(() => Ne.state, [Ne.state]), Fe = se(() => ({
890
+ getFields: Ut,
891
+ addItem: en,
892
+ addItems: tn,
893
+ updateItem: nn,
894
+ updateItems: rn,
895
+ deleteItem: cn,
896
+ deleteItems: ln,
897
+ getItem: an,
898
+ getItemByIndex: un,
899
+ getItems: gn,
900
+ getItemsCount: pn,
901
+ itemExists: hn,
902
+ getItemIndex: mn,
903
+ replaceAllItems: dn,
904
+ clearItems: fn,
905
+ deselectAllRows: Mt,
906
+ getSelectedItems: Sn,
907
+ getSelectedRows: wn,
568
908
  // Overlay methods
569
- setLoading: nt,
570
- setError: st,
571
- setPartialLoading: rt,
572
- setEmpty: ct,
573
- clearOverlay: it,
574
- getOverlayState: ot
909
+ setLoading: xn,
910
+ setError: In,
911
+ setPartialLoading: bn,
912
+ setEmpty: yn,
913
+ clearOverlay: Rn,
914
+ getOverlayState: vn,
915
+ // Sorting methods
916
+ getSortingState: Vt,
917
+ getPrimarySortedColumn: $t,
918
+ hasActiveSorting: qt,
919
+ setSortingState: Yt,
920
+ clearSorting: Gt,
921
+ // Filter methods
922
+ getFilterableFields: Kt,
923
+ getColumnFilters: Xt,
924
+ hasActiveFilters: Jt,
925
+ setColumnFilters: Zt,
926
+ clearColumnFilters: Qt
575
927
  }), [
576
- je,
577
- He,
578
- Ke,
579
- it,
580
- $e,
581
- qe,
582
- We,
583
- f,
584
- Oe,
585
- Ge,
586
- Xe,
587
- Ue,
588
- Qe,
589
- Ze,
590
- ot,
591
- et,
592
- tt,
593
- Ve,
594
- Je,
595
- ct,
596
- st,
597
- nt,
598
- rt,
599
- Pe,
600
- Ye
928
+ en,
929
+ tn,
930
+ fn,
931
+ Rn,
932
+ cn,
933
+ ln,
934
+ Mt,
935
+ a,
936
+ Ut,
937
+ an,
938
+ un,
939
+ mn,
940
+ gn,
941
+ pn,
942
+ vn,
943
+ Sn,
944
+ wn,
945
+ Vt,
946
+ $t,
947
+ qt,
948
+ hn,
949
+ dn,
950
+ Gt,
951
+ yn,
952
+ In,
953
+ xn,
954
+ Yt,
955
+ bn,
956
+ nn,
957
+ rn,
958
+ // Filter methods
959
+ Qt,
960
+ Xt,
961
+ Kt,
962
+ Jt,
963
+ Zt
601
964
  ]);
602
- jt.useImperativeHandle(bt, () => z, [z]);
603
- const Bt = g((e, t) => {
604
- t?.target && t.target.closest('[data-checkbox="true"]') || (R && Ce(e.index), ue && ue(e.original, e.index));
605
- }, [R, ue, Ce]), at = q(() => y.map((e) => {
606
- const n = f.find((r) => r.internalName === e.id)?.typeAsString === "Note" ? x * 2 : x, s = S[e.id] || (typeof e.size == "number" ? e.size : n);
607
- return e.id === "select" ? `${G}px` : `${s}px`;
608
- }).join(" "), [y, S, f]);
609
- B(() => {
610
- if (!Q) return;
965
+ _.current = Fe, fr.useImperativeHandle(jn, () => Fe, [Fe]);
966
+ const ir = f((e, t) => {
967
+ t?.target && t.target.closest('[data-checkbox="true"]') || (I && At(e.index), T && T(e.original, e.index));
968
+ }, [I, T, At]), lr = f((e, t) => {
969
+ t?.target && t.target.closest('[data-checkbox="true"]') || He && He(e.original, e.index);
970
+ }, [He]), Cn = se(() => B.map((e) => {
971
+ const n = a.find((o) => o.internalName === e.id)?.typeAsString === "Note" ? O * 2 : O, r = L[e.id] || (typeof e.size == "number" ? e.size : n);
972
+ return e.id === "select" ? `${Ae}px` : `${r}px`;
973
+ }).join(" "), [B, L, a]), Tn = w(!1);
974
+ kn(() => {
975
+ if (Tn.current) return;
976
+ const e = re.current;
977
+ if (!e) return;
978
+ const t = e.clientWidth;
979
+ if (t <= 0) return;
980
+ Tn.current = !0, zt(t);
981
+ const n = ie ? On(t, B, a, L) : Pn(t, B, a, L, Te);
982
+ n && (K.current = !0, Ie((r) => ie ? n : { ...r, ...n }), requestAnimationFrame(() => {
983
+ K.current = !1;
984
+ }));
985
+ }), oe(() => {
986
+ if (!Je) return;
611
987
  const e = new ResizeObserver((t) => {
612
988
  for (const n of t)
613
- Me(n.contentRect.width);
989
+ zt(n.contentRect.width);
614
990
  });
615
- return e.observe(Q), Me(Q.clientWidth), () => e.disconnect();
616
- }, [Q]), B(() => {
617
- if (!(!T || C <= 0) && !_.current)
618
- return j.current && clearTimeout(j.current), j.current = setTimeout(() => {
619
- let e = 0, t = 0;
620
- const n = [];
621
- if (y.forEach((o) => {
622
- const m = f.find((h) => h.internalName === o.id)?.typeAsString === "Note" ? x * 2 : x, d = S[o.id] || (typeof o.size == "number" ? o.size : m);
623
- !(o.id === "select") ? (t += d, n.push(o)) : e += d;
624
- }), n.length === 0)
625
- return;
626
- const s = e + t;
627
- if (Math.abs(s - C) < 1) return;
628
- const r = C - e, c = r / t, a = { ...S };
629
- let i = 0;
630
- n.forEach((o, u) => {
631
- const m = S[o.id] || (typeof o.size == "number" ? o.size : x), d = o.minSize || F;
632
- let l;
633
- u === n.length - 1 ? l = r - i : l = Math.round(m * c), l = Math.max(d, l), a[o.id] = l, i += l;
634
- }), _.current = !0, Z(a), requestAnimationFrame(() => {
635
- _.current = !1;
636
- });
991
+ return e.observe(Je), () => e.disconnect();
992
+ }, [Je]), oe(() => {
993
+ if (!(!ie || Q <= 0) && !K.current)
994
+ return Se.current && clearTimeout(Se.current), Se.current = setTimeout(() => {
995
+ const e = On(Q, B, a, L);
996
+ e && (K.current = !0, Ie(e), requestAnimationFrame(() => {
997
+ K.current = !1;
998
+ }));
637
999
  }, 50), () => {
638
- j.current && clearTimeout(j.current);
1000
+ Se.current && clearTimeout(Se.current);
639
1001
  };
640
- }, [T, C, y, f]), B(() => {
641
- if (!(T || C <= 0))
642
- return H.current && clearTimeout(H.current), H.current = setTimeout(() => {
643
- const e = C - te;
644
- if (Math.abs(e) < 1)
645
- return;
646
- const t = y.filter((d) => d.id && d.id !== "select");
647
- if (t.length === 0) return;
648
- const n = t[t.length - 1], s = n.id, c = f.find((d) => d.internalName === s)?.typeAsString === "Note" ? x * 2 : x, i = (S[s] || (typeof n.size == "number" ? n.size : c)) + e, o = n.minSize || F, u = Math.max(o, i), m = S[s];
649
- Math.abs(m - u) < 1 || (_.current = !0, Z((d) => ({
650
- ...d,
651
- [s]: u
652
- })), _.current = !1);
1002
+ }, [ie, Q, B, a]), oe(() => {
1003
+ if (!(ie || Q <= 0))
1004
+ return we.current && clearTimeout(we.current), we.current = setTimeout(() => {
1005
+ const e = Pn(Q, B, a, L, Te);
1006
+ e && (K.current = !0, Ie((t) => ({ ...t, ...e })), requestAnimationFrame(() => {
1007
+ K.current = !1;
1008
+ }));
653
1009
  }, 50), () => {
654
- H.current && clearTimeout(H.current);
1010
+ we.current && clearTimeout(we.current);
655
1011
  };
656
- }, [T, C, te, y, f]);
657
- const lt = Ut(yt), ut = Vt(zt), ne = Zt(Et), Ft = lt ? [lt, ...xe] : xe, he = [];
658
- ut && he.push(ut), ne && he.push(ne);
659
- const Lt = [...he, ...vt], Dt = ne ? [ne, ...Ie] : Ie;
660
- return /* @__PURE__ */ dt(
661
- Xt,
1012
+ }, [ie, Q, Te, B, a]);
1013
+ const En = Rr(Un, W), zn = vr(Vn, W), _e = Cr($n, W), Fn = Tr(qn, W), Mn = Fn ? [...mt, Fn] : mt, ar = En ? [...Mn, En] : Mn, st = [];
1014
+ zn && st.push(zn);
1015
+ const ur = _e ? [...st, ...ht, _e] : [...st, ...ht], dr = _e ? [...pt, _e] : pt, An = /* @__PURE__ */ ct(
1016
+ xr,
662
1017
  {
663
1018
  size: "small",
664
- appearance: W,
665
- className: Nt,
1019
+ appearance: g,
1020
+ className: Jn,
666
1021
  style: {
667
- backgroundColor: oe.colorNeutralBackground1,
1022
+ backgroundColor: $.colorNeutralBackground1,
668
1023
  maxWidth: "100%",
669
1024
  // margin: "20px 20px",
670
1025
  padding: "0px",
671
1026
  gap: "0px",
672
- ...ae
1027
+ ...p
673
1028
  },
674
1029
  children: [
675
- le && /* @__PURE__ */ E(
676
- Qt,
1030
+ Y && /* @__PURE__ */ D(
1031
+ Nr,
677
1032
  {
678
- tableMethods: z,
679
- alwaysButtons: Ft,
680
- noSelectionButtons: Rt,
681
- singleSelectionButtons: Lt,
682
- multiSelectionButtons: Dt,
683
- selectedRows: z.getSelectedRows()
1033
+ tableMethods: Fe,
1034
+ alwaysButtons: De(ar),
1035
+ noSelectionButtons: De(Yn),
1036
+ singleSelectionButtons: De(ur),
1037
+ multiSelectionButtons: De(dr),
1038
+ selectedRows: Fe.getSelectedRows(),
1039
+ localeText: W
684
1040
  }
685
1041
  ),
686
1042
  (() => {
687
- const e = V.state !== "none" ? V : M.length === 0 ? {
1043
+ const e = rt.getRowModel().rows.length, t = Z.length > 0, n = Ne.state !== "none" ? Ne : t && e === 0 ? {
1044
+ state: "empty",
1045
+ message: W.filteredEmptyTitle,
1046
+ description: W.filteredEmptyDescription,
1047
+ imageUrl: le?.empty?.imageUrl
1048
+ } : X.length === 0 ? {
688
1049
  state: "empty",
689
- message: D?.empty?.title,
690
- description: D?.empty?.description,
691
- imageUrl: D?.empty?.imageUrl
692
- } : { state: "none" }, t = /* @__PURE__ */ E(
1050
+ message: le?.empty?.title,
1051
+ description: le?.empty?.description,
1052
+ imageUrl: le?.empty?.imageUrl
1053
+ } : { state: "none" }, r = /* @__PURE__ */ ct(
693
1054
  "div",
694
1055
  {
695
- ref: kt,
696
- onScroll: At,
697
- className: Ee["efw-table-scroll-container"],
1056
+ ref: sr,
1057
+ onScroll: cr,
1058
+ className: vt["efw-table-scroll-container"],
698
1059
  style: {
699
- ...O !== void 0 && {
700
- maxHeight: O
1060
+ ...ge !== void 0 && {
1061
+ maxHeight: ge
701
1062
  },
702
- overflowY: O !== void 0 ? "auto" : "visible",
1063
+ overflowY: ge !== void 0 ? "auto" : "visible",
703
1064
  overflowX: "auto",
704
- border: `1px solid ${oe.colorNeutralStroke2}`,
705
- borderTop: le ? "none" : `1px solid ${oe.colorNeutralStroke2}`,
1065
+ border: `1px solid ${$.colorNeutralStroke2}`,
1066
+ borderTop: Y ? "none" : `1px solid ${$.colorNeutralStroke2}`,
706
1067
  position: "relative"
707
1068
  },
708
- children: /* @__PURE__ */ dt(
709
- "div",
710
- {
711
- className: "table-container",
712
- style: {
713
- minWidth: T ? "100%" : te,
714
- width: T ? "100%" : Math.max(te, 300)
715
- },
716
- children: [
717
- /* @__PURE__ */ E(
718
- en,
719
- {
720
- table: Fe,
721
- gridTemplateColumns: at,
722
- columnSizing: S,
723
- stickyColumnsInfo: Be,
724
- resizableColumns: de
725
- }
726
- ),
727
- /* @__PURE__ */ E(
728
- tn,
729
- {
730
- table: Fe,
731
- fields: f,
732
- tableContainerRef: Ae,
733
- useVirtualization: ge,
734
- enableSelection: R,
735
- itemSize: wt,
736
- gridTemplateColumns: at,
737
- columnSizing: S,
738
- stickyColumnsInfo: Be,
739
- onRowClick: Bt
740
- }
741
- )
742
- ]
743
- }
744
- )
1069
+ children: [
1070
+ /* @__PURE__ */ ct(
1071
+ "div",
1072
+ {
1073
+ className: "table-container",
1074
+ style: {
1075
+ minWidth: "100%",
1076
+ width: or
1077
+ },
1078
+ children: [
1079
+ /* @__PURE__ */ D(
1080
+ kr,
1081
+ {
1082
+ table: rt,
1083
+ gridTemplateColumns: Cn,
1084
+ columnSizing: L,
1085
+ dense: q,
1086
+ stickyColumnsInfo: Pt,
1087
+ resizableColumns: je,
1088
+ localeText: W
1089
+ }
1090
+ ),
1091
+ /* @__PURE__ */ D(
1092
+ Lr,
1093
+ {
1094
+ table: rt,
1095
+ fields: a,
1096
+ tableContainerRef: re,
1097
+ useVirtualization: lt,
1098
+ enableSelection: I,
1099
+ itemSize: qe,
1100
+ dense: q,
1101
+ rowAnimationSignals: tr,
1102
+ gridTemplateColumns: Cn,
1103
+ columnSizing: L,
1104
+ stickyColumnsInfo: Pt,
1105
+ onRowClick: ir,
1106
+ onRowDoubleClick: lr
1107
+ }
1108
+ )
1109
+ ]
1110
+ }
1111
+ ),
1112
+ pe && /* @__PURE__ */ D(
1113
+ "div",
1114
+ {
1115
+ style: {
1116
+ height: qe,
1117
+ minHeight: qe,
1118
+ display: "flex",
1119
+ alignItems: "center",
1120
+ justifyContent: "center",
1121
+ backgroundColor: $.colorNeutralBackground1,
1122
+ borderTop: `1px solid ${$.colorNeutralStroke1}`,
1123
+ position: "sticky",
1124
+ left: 0,
1125
+ width: "100%",
1126
+ minWidth: "100%",
1127
+ maxWidth: "100%",
1128
+ zIndex: 1
1129
+ },
1130
+ "aria-live": "polite",
1131
+ "aria-label": W.loadingMoreAriaLabel,
1132
+ children: /* @__PURE__ */ D(Ir, { size: "tiny", label: W.loadingMoreSpinnerLabel })
1133
+ }
1134
+ )
1135
+ ]
745
1136
  }
746
1137
  );
747
- return e.state === "partial-loading" ? /* @__PURE__ */ E(
748
- mt,
1138
+ return n.state === "partial-loading" ? /* @__PURE__ */ D(
1139
+ _n,
749
1140
  {
750
- config: e,
751
- customization: D,
752
- height: O !== void 0 ? Math.max(fe, O) : fe,
753
- children: t
1141
+ config: n,
1142
+ customization: le,
1143
+ height: ge !== void 0 ? Math.max($e, ge) : $e,
1144
+ localeText: W,
1145
+ children: r
754
1146
  }
755
- ) : e.state !== "none" ? /* @__PURE__ */ E(
756
- mt,
1147
+ ) : n.state !== "none" ? /* @__PURE__ */ D(
1148
+ _n,
757
1149
  {
758
- config: e,
759
- height: fe,
760
- customization: D
1150
+ config: n,
1151
+ height: $e,
1152
+ customization: le,
1153
+ localeText: W
761
1154
  }
762
- ) : t;
1155
+ ) : r;
763
1156
  })()
764
1157
  ]
765
1158
  }
766
1159
  );
1160
+ return yt ? /* @__PURE__ */ D(Ar, { localeText: yt, children: An }) : An;
767
1161
  };
768
1162
  export {
769
- x as COLS_DEF_WIDTH,
770
- ie as COLS_MAX_WIDTH,
771
- F as COLS_MIN_WIDTH,
772
- En as EFWTable,
773
- zn as SELECTOR_CELL_HEIGHT,
774
- G as SELECTOR_CELL_WIDTH
1163
+ Pe as COLS_MAX_WIDTH,
1164
+ he as COLS_MIN_WIDTH,
1165
+ ls as EFWTable
775
1166
  };