@economic/taco 2.26.0 → 2.26.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (582) hide show
  1. package/dist/components/Report/Report.d.ts +9 -0
  2. package/dist/components/Report/types.d.ts +5 -0
  3. package/dist/components/Report/useReport.d.ts +5 -0
  4. package/dist/components/Table3/Table3.d.ts +24 -0
  5. package/dist/{packages/taco/src/components → components}/Table3/features/useTableEditing.d.ts +2 -2
  6. package/dist/{packages/taco/src/components → components}/Table3/types.d.ts +15 -5
  7. package/dist/components/Table3/useTable3.d.ts +10 -0
  8. package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
  9. package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
  10. package/dist/esm/packages/taco/src/components/Table3/Table3.js +2 -0
  11. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  12. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  13. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +5 -0
  14. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  15. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  16. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -1
  17. package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
  18. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  19. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  20. package/dist/{packages/taco/src/primitives → primitives}/Table/Core/Table.d.ts +4 -4
  21. package/dist/primitives/Table/Core/components/Toolbar/Toolbar.d.ts +7 -0
  22. package/dist/{packages/taco/src/primitives → primitives}/Table/Core/types.d.ts +0 -3
  23. package/dist/primitives/Table/Core/useTable.d.ts +27 -0
  24. package/dist/{packages/taco/src/primitives → primitives}/Table/types.d.ts +2 -3
  25. package/dist/primitives/Table/useTableManager/features/useTableSettings.d.ts +3 -0
  26. package/dist/taco.cjs.development.js +7 -0
  27. package/dist/taco.cjs.development.js.map +1 -1
  28. package/dist/taco.cjs.production.min.js +1 -1
  29. package/dist/taco.cjs.production.min.js.map +1 -1
  30. package/package.json +2 -5
  31. package/dist/packages/taco/src/components/Report/Report.d.ts +0 -10
  32. package/dist/packages/taco/src/components/Report/__stories__/util.d.ts +0 -19
  33. package/dist/packages/taco/src/components/Report/useReport.d.ts +0 -23
  34. package/dist/packages/taco/src/components/Table3/Table3.d.ts +0 -20
  35. package/dist/packages/taco/src/components/Table3/__stories__/util.d.ts +0 -35
  36. package/dist/packages/taco/src/components/Table3/useTable3.d.ts +0 -30
  37. package/dist/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.d.ts +0 -7
  38. package/dist/packages/taco/src/primitives/Table/Core/useTable.d.ts +0 -25
  39. package/dist/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.d.ts +0 -3
  40. package/types.json +0 -557898
  41. /package/dist/{packages/taco/src/components → components}/Accordion/Accordion.d.ts +0 -0
  42. /package/dist/{packages/taco/src/components → components}/Alert/Alert.d.ts +0 -0
  43. /package/dist/{packages/taco/src/components → components}/AlertDialog/AlertDialog.d.ts +0 -0
  44. /package/dist/{packages/taco/src/components → components}/AlertDialog/Context.d.ts +0 -0
  45. /package/dist/{packages/taco/src/components → components}/AlertDialog/components/Content.d.ts +0 -0
  46. /package/dist/{packages/taco/src/components → components}/AlertDialog/components/Footer.d.ts +0 -0
  47. /package/dist/{packages/taco/src/components → components}/AlertDialog/components/Trigger.d.ts +0 -0
  48. /package/dist/{packages/taco/src/components → components}/Backdrop/Backdrop.d.ts +0 -0
  49. /package/dist/{packages/taco/src/components → components}/Badge/Badge.d.ts +0 -0
  50. /package/dist/{packages/taco/src/components → components}/BadgeIcon/BadgeIcon.d.ts +0 -0
  51. /package/dist/{packages/taco/src/components → components}/Banner/Banner.d.ts +0 -0
  52. /package/dist/{packages/taco/src/components → components}/Banner/util.d.ts +0 -0
  53. /package/dist/{packages/taco/src/components → components}/Button/Button.d.ts +0 -0
  54. /package/dist/{packages/taco/src/components → components}/Button/util.d.ts +0 -0
  55. /package/dist/{packages/taco/src/components → components}/Calendar/Calendar.d.ts +0 -0
  56. /package/dist/{packages/taco/src/components → components}/Card/Card.d.ts +0 -0
  57. /package/dist/{packages/taco/src/components → components}/Checkbox/Checkbox.d.ts +0 -0
  58. /package/dist/{packages/taco/src/components → components}/Combobox/Combobox.d.ts +0 -0
  59. /package/dist/{packages/taco/src/components → components}/Combobox/useCombobox.d.ts +0 -0
  60. /package/dist/{packages/taco/src/components → components}/Datepicker/Datepicker.d.ts +0 -0
  61. /package/dist/{packages/taco/src/components → components}/Datepicker/useDatepicker.d.ts +0 -0
  62. /package/dist/{packages/taco/src/components → components}/Dialog/Context.d.ts +0 -0
  63. /package/dist/{packages/taco/src/components → components}/Dialog/Dialog.d.ts +0 -0
  64. /package/dist/{packages/taco/src/components → components}/Dialog/components/Content.d.ts +0 -0
  65. /package/dist/{packages/taco/src/components → components}/Dialog/components/DialogDrawer.d.ts +0 -0
  66. /package/dist/{packages/taco/src/components → components}/Dialog/components/Extra.d.ts +0 -0
  67. /package/dist/{packages/taco/src/components → components}/Dialog/components/Trigger.d.ts +0 -0
  68. /package/dist/{packages/taco/src/components → components}/Dialog/types.d.ts +0 -0
  69. /package/dist/{packages/taco/src/components → components}/Dialog/util.d.ts +0 -0
  70. /package/dist/{packages/taco/src/components → components}/Drawer/Context.d.ts +0 -0
  71. /package/dist/{packages/taco/src/components → components}/Drawer/Drawer.d.ts +0 -0
  72. /package/dist/{packages/taco/src/components → components}/Drawer/components/Content.d.ts +0 -0
  73. /package/dist/{packages/taco/src/components → components}/Drawer/components/Trigger.d.ts +0 -0
  74. /package/dist/{packages/taco/src/components → components}/Drawer/images.d.ts +0 -0
  75. /package/dist/{packages/taco/src/components → components}/Drawer/types.d.ts +0 -0
  76. /package/dist/{packages/taco/src/components → components}/Drawer/util.d.ts +0 -0
  77. /package/dist/{packages/taco/src/components → components}/Field/Field.d.ts +0 -0
  78. /package/dist/{packages/taco/src/components → components}/Form/Form.d.ts +0 -0
  79. /package/dist/{packages/taco/src/components → components}/Group/Group.d.ts +0 -0
  80. /package/dist/{packages/taco/src/components → components}/Hanger/Hanger.d.ts +0 -0
  81. /package/dist/{packages/taco/src/components → components}/Header/Header.d.ts +0 -0
  82. /package/dist/{packages/taco/src/components → components}/Header/components/Agreement/Avatar.d.ts +0 -0
  83. /package/dist/{packages/taco/src/components → components}/Header/components/Agreement/Badge.d.ts +0 -0
  84. /package/dist/{packages/taco/src/components → components}/Header/components/Agreement/Display.d.ts +0 -0
  85. /package/dist/{packages/taco/src/components → components}/Header/components/Agreement/Item.d.ts +0 -0
  86. /package/dist/{packages/taco/src/components → components}/Header/components/Agreement/types.d.ts +0 -0
  87. /package/dist/{packages/taco/src/components → components}/Header/components/AgreementSelector.d.ts +0 -0
  88. /package/dist/{packages/taco/src/components → components}/Header/components/Button.d.ts +0 -0
  89. /package/dist/{packages/taco/src/components → components}/Header/components/Link.d.ts +0 -0
  90. /package/dist/{packages/taco/src/components → components}/Header/components/Logo.d.ts +0 -0
  91. /package/dist/{packages/taco/src/components → components}/Header/components/MenuButton.d.ts +0 -0
  92. /package/dist/{packages/taco/src/components → components}/Header/components/PrimaryNavigation.d.ts +0 -0
  93. /package/dist/{packages/taco/src/components → components}/Header/components/SecondaryNavigation.d.ts +0 -0
  94. /package/dist/{packages/taco/src/components → components}/HoverCard/HoverCard.d.ts +0 -0
  95. /package/dist/{packages/taco/src/components → components}/HoverCard/Primitives.d.ts +0 -0
  96. /package/dist/{packages/taco/src/components → components}/Icon/Icon.d.ts +0 -0
  97. /package/dist/{packages/taco/src/components → components}/Icon/components/AccountPreview.d.ts +0 -0
  98. /package/dist/{packages/taco/src/components → components}/Icon/components/Accounting.d.ts +0 -0
  99. /package/dist/{packages/taco/src/components → components}/Icon/components/AccountingYear.d.ts +0 -0
  100. /package/dist/{packages/taco/src/components → components}/Icon/components/AccountingYearCancel.d.ts +0 -0
  101. /package/dist/{packages/taco/src/components → components}/Icon/components/AiChatSolid.d.ts +0 -0
  102. /package/dist/{packages/taco/src/components → components}/Icon/components/AiStars.d.ts +0 -0
  103. /package/dist/{packages/taco/src/components → components}/Icon/components/ArrowBottom.d.ts +0 -0
  104. /package/dist/{packages/taco/src/components → components}/Icon/components/ArrowDown.d.ts +0 -0
  105. /package/dist/{packages/taco/src/components → components}/Icon/components/ArrowEnd.d.ts +0 -0
  106. /package/dist/{packages/taco/src/components → components}/Icon/components/ArrowLeft.d.ts +0 -0
  107. /package/dist/{packages/taco/src/components → components}/Icon/components/ArrowRight.d.ts +0 -0
  108. /package/dist/{packages/taco/src/components → components}/Icon/components/ArrowStart.d.ts +0 -0
  109. /package/dist/{packages/taco/src/components → components}/Icon/components/ArrowTop.d.ts +0 -0
  110. /package/dist/{packages/taco/src/components → components}/Icon/components/ArrowUp.d.ts +0 -0
  111. /package/dist/{packages/taco/src/components → components}/Icon/components/Attach.d.ts +0 -0
  112. /package/dist/{packages/taco/src/components → components}/Icon/components/AttachAuto.d.ts +0 -0
  113. /package/dist/{packages/taco/src/components → components}/Icon/components/AttachCancel.d.ts +0 -0
  114. /package/dist/{packages/taco/src/components → components}/Icon/components/AttachWarning.d.ts +0 -0
  115. /package/dist/{packages/taco/src/components → components}/Icon/components/Autotext.d.ts +0 -0
  116. /package/dist/{packages/taco/src/components → components}/Icon/components/AutotextInsert.d.ts +0 -0
  117. /package/dist/{packages/taco/src/components → components}/Icon/components/Basic.d.ts +0 -0
  118. /package/dist/{packages/taco/src/components → components}/Icon/components/BasicTabs.d.ts +0 -0
  119. /package/dist/{packages/taco/src/components → components}/Icon/components/BellSolid.d.ts +0 -0
  120. /package/dist/{packages/taco/src/components → components}/Icon/components/Book.d.ts +0 -0
  121. /package/dist/{packages/taco/src/components → components}/Icon/components/Booking.d.ts +0 -0
  122. /package/dist/{packages/taco/src/components → components}/Icon/components/Budget.d.ts +0 -0
  123. /package/dist/{packages/taco/src/components → components}/Icon/components/Calendar.d.ts +0 -0
  124. /package/dist/{packages/taco/src/components → components}/Icon/components/CashAccount.d.ts +0 -0
  125. /package/dist/{packages/taco/src/components → components}/Icon/components/CashReports.d.ts +0 -0
  126. /package/dist/{packages/taco/src/components → components}/Icon/components/ChartArea.d.ts +0 -0
  127. /package/dist/{packages/taco/src/components → components}/Icon/components/ChartBar.d.ts +0 -0
  128. /package/dist/{packages/taco/src/components → components}/Icon/components/ChartLine.d.ts +0 -0
  129. /package/dist/{packages/taco/src/components → components}/Icon/components/ChartPie.d.ts +0 -0
  130. /package/dist/{packages/taco/src/components → components}/Icon/components/ChartTable.d.ts +0 -0
  131. /package/dist/{packages/taco/src/components → components}/Icon/components/Chat.d.ts +0 -0
  132. /package/dist/{packages/taco/src/components → components}/Icon/components/ChatSolid.d.ts +0 -0
  133. /package/dist/{packages/taco/src/components → components}/Icon/components/ChevronDown.d.ts +0 -0
  134. /package/dist/{packages/taco/src/components → components}/Icon/components/ChevronDownDouble.d.ts +0 -0
  135. /package/dist/{packages/taco/src/components → components}/Icon/components/ChevronDownSolid.d.ts +0 -0
  136. /package/dist/{packages/taco/src/components → components}/Icon/components/ChevronLeft.d.ts +0 -0
  137. /package/dist/{packages/taco/src/components → components}/Icon/components/ChevronLeftDouble.d.ts +0 -0
  138. /package/dist/{packages/taco/src/components → components}/Icon/components/ChevronLeftSolid.d.ts +0 -0
  139. /package/dist/{packages/taco/src/components → components}/Icon/components/ChevronRight.d.ts +0 -0
  140. /package/dist/{packages/taco/src/components → components}/Icon/components/ChevronRightDouble.d.ts +0 -0
  141. /package/dist/{packages/taco/src/components → components}/Icon/components/ChevronRightSolid.d.ts +0 -0
  142. /package/dist/{packages/taco/src/components → components}/Icon/components/ChevronUp.d.ts +0 -0
  143. /package/dist/{packages/taco/src/components → components}/Icon/components/ChevronUpDouble.d.ts +0 -0
  144. /package/dist/{packages/taco/src/components → components}/Icon/components/ChevronUpSolid.d.ts +0 -0
  145. /package/dist/{packages/taco/src/components → components}/Icon/components/CircleClose.d.ts +0 -0
  146. /package/dist/{packages/taco/src/components → components}/Icon/components/CircleInformation.d.ts +0 -0
  147. /package/dist/{packages/taco/src/components → components}/Icon/components/CircleMinus.d.ts +0 -0
  148. /package/dist/{packages/taco/src/components → components}/Icon/components/CirclePlus.d.ts +0 -0
  149. /package/dist/{packages/taco/src/components → components}/Icon/components/CircleQuestionmark.d.ts +0 -0
  150. /package/dist/{packages/taco/src/components → components}/Icon/components/CircleTick.d.ts +0 -0
  151. /package/dist/{packages/taco/src/components → components}/Icon/components/CircleWarning.d.ts +0 -0
  152. /package/dist/{packages/taco/src/components → components}/Icon/components/Clamp.d.ts +0 -0
  153. /package/dist/{packages/taco/src/components → components}/Icon/components/ClampOpen.d.ts +0 -0
  154. /package/dist/{packages/taco/src/components → components}/Icon/components/Close.d.ts +0 -0
  155. /package/dist/{packages/taco/src/components → components}/Icon/components/ColumnFreeze.d.ts +0 -0
  156. /package/dist/{packages/taco/src/components → components}/Icon/components/ColumnUnfreeze.d.ts +0 -0
  157. /package/dist/{packages/taco/src/components → components}/Icon/components/Columns.d.ts +0 -0
  158. /package/dist/{packages/taco/src/components → components}/Icon/components/ConnectionEnable.d.ts +0 -0
  159. /package/dist/{packages/taco/src/components → components}/Icon/components/ConnectionRevoke.d.ts +0 -0
  160. /package/dist/{packages/taco/src/components → components}/Icon/components/Contacts.d.ts +0 -0
  161. /package/dist/{packages/taco/src/components → components}/Icon/components/Copy.d.ts +0 -0
  162. /package/dist/{packages/taco/src/components → components}/Icon/components/Courses.d.ts +0 -0
  163. /package/dist/{packages/taco/src/components → components}/Icon/components/Credit.d.ts +0 -0
  164. /package/dist/{packages/taco/src/components → components}/Icon/components/Delete.d.ts +0 -0
  165. /package/dist/{packages/taco/src/components → components}/Icon/components/DeletePermanently.d.ts +0 -0
  166. /package/dist/{packages/taco/src/components → components}/Icon/components/Depecriate.d.ts +0 -0
  167. /package/dist/{packages/taco/src/components → components}/Icon/components/Developer.d.ts +0 -0
  168. /package/dist/{packages/taco/src/components → components}/Icon/components/DistributionTemplate.d.ts +0 -0
  169. /package/dist/{packages/taco/src/components → components}/Icon/components/Document.d.ts +0 -0
  170. /package/dist/{packages/taco/src/components → components}/Icon/components/DocumentApprove.d.ts +0 -0
  171. /package/dist/{packages/taco/src/components → components}/Icon/components/DocumentCreateEntry.d.ts +0 -0
  172. /package/dist/{packages/taco/src/components → components}/Icon/components/DocumentCut.d.ts +0 -0
  173. /package/dist/{packages/taco/src/components → components}/Icon/components/DocumentError.d.ts +0 -0
  174. /package/dist/{packages/taco/src/components → components}/Icon/components/DocumentIsolatePage.d.ts +0 -0
  175. /package/dist/{packages/taco/src/components → components}/Icon/components/DocumentMerge.d.ts +0 -0
  176. /package/dist/{packages/taco/src/components → components}/Icon/components/DocumentMove.d.ts +0 -0
  177. /package/dist/{packages/taco/src/components → components}/Icon/components/DocumentPreview.d.ts +0 -0
  178. /package/dist/{packages/taco/src/components → components}/Icon/components/DocumentReceived.d.ts +0 -0
  179. /package/dist/{packages/taco/src/components → components}/Icon/components/DocumentRejectedRequest.d.ts +0 -0
  180. /package/dist/{packages/taco/src/components → components}/Icon/components/DocumentSplit.d.ts +0 -0
  181. /package/dist/{packages/taco/src/components → components}/Icon/components/DocumentTime.d.ts +0 -0
  182. /package/dist/{packages/taco/src/components → components}/Icon/components/Download.d.ts +0 -0
  183. /package/dist/{packages/taco/src/components → components}/Icon/components/Drag.d.ts +0 -0
  184. /package/dist/{packages/taco/src/components → components}/Icon/components/ECopedia.d.ts +0 -0
  185. /package/dist/{packages/taco/src/components → components}/Icon/components/ESignature.d.ts +0 -0
  186. /package/dist/{packages/taco/src/components → components}/Icon/components/Edit.d.ts +0 -0
  187. /package/dist/{packages/taco/src/components → components}/Icon/components/EditSimple.d.ts +0 -0
  188. /package/dist/{packages/taco/src/components → components}/Icon/components/EllipsisHorizontal.d.ts +0 -0
  189. /package/dist/{packages/taco/src/components → components}/Icon/components/EllipsisVertical.d.ts +0 -0
  190. /package/dist/{packages/taco/src/components → components}/Icon/components/EntriesOnAccount.d.ts +0 -0
  191. /package/dist/{packages/taco/src/components → components}/Icon/components/EntriesOpen.d.ts +0 -0
  192. /package/dist/{packages/taco/src/components → components}/Icon/components/EntriesWarning.d.ts +0 -0
  193. /package/dist/{packages/taco/src/components → components}/Icon/components/EntryTypeCustomerInvoice.d.ts +0 -0
  194. /package/dist/{packages/taco/src/components → components}/Icon/components/EntryTypeCustomerPayment.d.ts +0 -0
  195. /package/dist/{packages/taco/src/components → components}/Icon/components/EntryTypeJournalEntry.d.ts +0 -0
  196. /package/dist/{packages/taco/src/components → components}/Icon/components/EntryTypeManualCustomerInvoice.d.ts +0 -0
  197. /package/dist/{packages/taco/src/components → components}/Icon/components/EntryTypeSupplierInvoice.d.ts +0 -0
  198. /package/dist/{packages/taco/src/components → components}/Icon/components/EntryTypeSupplierPayment.d.ts +0 -0
  199. /package/dist/{packages/taco/src/components → components}/Icon/components/Envelope.d.ts +0 -0
  200. /package/dist/{packages/taco/src/components → components}/Icon/components/EnvelopeApproved.d.ts +0 -0
  201. /package/dist/{packages/taco/src/components → components}/Icon/components/EnvelopeSolid.d.ts +0 -0
  202. /package/dist/{packages/taco/src/components → components}/Icon/components/ExpandView.d.ts +0 -0
  203. /package/dist/{packages/taco/src/components → components}/Icon/components/Expenses.d.ts +0 -0
  204. /package/dist/{packages/taco/src/components → components}/Icon/components/Export.d.ts +0 -0
  205. /package/dist/{packages/taco/src/components → components}/Icon/components/ExportToExcel.d.ts +0 -0
  206. /package/dist/{packages/taco/src/components → components}/Icon/components/ExportToPdf.d.ts +0 -0
  207. /package/dist/{packages/taco/src/components → components}/Icon/components/EyeOff.d.ts +0 -0
  208. /package/dist/{packages/taco/src/components → components}/Icon/components/EyeOn.d.ts +0 -0
  209. /package/dist/{packages/taco/src/components → components}/Icon/components/Filter.d.ts +0 -0
  210. /package/dist/{packages/taco/src/components → components}/Icon/components/FilterSolid.d.ts +0 -0
  211. /package/dist/{packages/taco/src/components → components}/Icon/components/FontSize.d.ts +0 -0
  212. /package/dist/{packages/taco/src/components → components}/Icon/components/GraphSolid.d.ts +0 -0
  213. /package/dist/{packages/taco/src/components → components}/Icon/components/Hash.d.ts +0 -0
  214. /package/dist/{packages/taco/src/components → components}/Icon/components/HeightExtraTall.d.ts +0 -0
  215. /package/dist/{packages/taco/src/components → components}/Icon/components/HeightMedium.d.ts +0 -0
  216. /package/dist/{packages/taco/src/components → components}/Icon/components/HeightShort.d.ts +0 -0
  217. /package/dist/{packages/taco/src/components → components}/Icon/components/HeightTall.d.ts +0 -0
  218. /package/dist/{packages/taco/src/components → components}/Icon/components/Home.d.ts +0 -0
  219. /package/dist/{packages/taco/src/components → components}/Icon/components/Images.d.ts +0 -0
  220. /package/dist/{packages/taco/src/components → components}/Icon/components/Import.d.ts +0 -0
  221. /package/dist/{packages/taco/src/components → components}/Icon/components/Inbox.d.ts +0 -0
  222. /package/dist/{packages/taco/src/components → components}/Icon/components/InboxEinvoicing.d.ts +0 -0
  223. /package/dist/{packages/taco/src/components → components}/Icon/components/InboxScanning.d.ts +0 -0
  224. /package/dist/{packages/taco/src/components → components}/Icon/components/InboxSmart.d.ts +0 -0
  225. /package/dist/{packages/taco/src/components → components}/Icon/components/Info.d.ts +0 -0
  226. /package/dist/{packages/taco/src/components → components}/Icon/components/Inventory.d.ts +0 -0
  227. /package/dist/{packages/taco/src/components → components}/Icon/components/InventoryMatrix.d.ts +0 -0
  228. /package/dist/{packages/taco/src/components → components}/Icon/components/JournalPro.d.ts +0 -0
  229. /package/dist/{packages/taco/src/components → components}/Icon/components/Layout.d.ts +0 -0
  230. /package/dist/{packages/taco/src/components → components}/Icon/components/LayoutBoth.d.ts +0 -0
  231. /package/dist/{packages/taco/src/components → components}/Icon/components/LayoutFirst.d.ts +0 -0
  232. /package/dist/{packages/taco/src/components → components}/Icon/components/LayoutLast.d.ts +0 -0
  233. /package/dist/{packages/taco/src/components → components}/Icon/components/LayoutNone.d.ts +0 -0
  234. /package/dist/{packages/taco/src/components → components}/Icon/components/LedgerCard.d.ts +0 -0
  235. /package/dist/{packages/taco/src/components → components}/Icon/components/LedgerCardCustomerReminder.d.ts +0 -0
  236. /package/dist/{packages/taco/src/components → components}/Icon/components/LedgerCardManualCustomerInvoice.d.ts +0 -0
  237. /package/dist/{packages/taco/src/components → components}/Icon/components/LedgerCardObsoleteStock.d.ts +0 -0
  238. /package/dist/{packages/taco/src/components → components}/Icon/components/LedgerCardOpeningEntry.d.ts +0 -0
  239. /package/dist/{packages/taco/src/components → components}/Icon/components/LedgerCardReservedEntry.d.ts +0 -0
  240. /package/dist/{packages/taco/src/components → components}/Icon/components/LedgerCardShrinkagePilferage.d.ts +0 -0
  241. /package/dist/{packages/taco/src/components → components}/Icon/components/LedgerCardStockAdjustment.d.ts +0 -0
  242. /package/dist/{packages/taco/src/components → components}/Icon/components/LedgerCardTransferredOpeningEntry.d.ts +0 -0
  243. /package/dist/{packages/taco/src/components → components}/Icon/components/Lightbulb.d.ts +0 -0
  244. /package/dist/{packages/taco/src/components → components}/Icon/components/Line.d.ts +0 -0
  245. /package/dist/{packages/taco/src/components → components}/Icon/components/List.d.ts +0 -0
  246. /package/dist/{packages/taco/src/components → components}/Icon/components/ListBulleted.d.ts +0 -0
  247. /package/dist/{packages/taco/src/components → components}/Icon/components/ListSearch.d.ts +0 -0
  248. /package/dist/{packages/taco/src/components → components}/Icon/components/Location.d.ts +0 -0
  249. /package/dist/{packages/taco/src/components → components}/Icon/components/Lock.d.ts +0 -0
  250. /package/dist/{packages/taco/src/components → components}/Icon/components/LockOpen.d.ts +0 -0
  251. /package/dist/{packages/taco/src/components → components}/Icon/components/Log.d.ts +0 -0
  252. /package/dist/{packages/taco/src/components → components}/Icon/components/LogOut.d.ts +0 -0
  253. /package/dist/{packages/taco/src/components → components}/Icon/components/Market.d.ts +0 -0
  254. /package/dist/{packages/taco/src/components → components}/Icon/components/MatchAmount.d.ts +0 -0
  255. /package/dist/{packages/taco/src/components → components}/Icon/components/MatchEntries.d.ts +0 -0
  256. /package/dist/{packages/taco/src/components → components}/Icon/components/Menu.d.ts +0 -0
  257. /package/dist/{packages/taco/src/components → components}/Icon/components/Mileage.d.ts +0 -0
  258. /package/dist/{packages/taco/src/components → components}/Icon/components/ModalResize.d.ts +0 -0
  259. /package/dist/{packages/taco/src/components → components}/Icon/components/ModalShrink.d.ts +0 -0
  260. /package/dist/{packages/taco/src/components → components}/Icon/components/More.d.ts +0 -0
  261. /package/dist/{packages/taco/src/components → components}/Icon/components/MoreSolid.d.ts +0 -0
  262. /package/dist/{packages/taco/src/components → components}/Icon/components/Move.d.ts +0 -0
  263. /package/dist/{packages/taco/src/components → components}/Icon/components/NavigationList.d.ts +0 -0
  264. /package/dist/{packages/taco/src/components → components}/Icon/components/Note.d.ts +0 -0
  265. /package/dist/{packages/taco/src/components → components}/Icon/components/NoteFollowUp.d.ts +0 -0
  266. /package/dist/{packages/taco/src/components → components}/Icon/components/NoteRead.d.ts +0 -0
  267. /package/dist/{packages/taco/src/components → components}/Icon/components/Numbers.d.ts +0 -0
  268. /package/dist/{packages/taco/src/components → components}/Icon/components/PartnerApi.d.ts +0 -0
  269. /package/dist/{packages/taco/src/components → components}/Icon/components/PaymentPaid.d.ts +0 -0
  270. /package/dist/{packages/taco/src/components → components}/Icon/components/PaymentUnpaid.d.ts +0 -0
  271. /package/dist/{packages/taco/src/components → components}/Icon/components/Period.d.ts +0 -0
  272. /package/dist/{packages/taco/src/components → components}/Icon/components/PersonChange.d.ts +0 -0
  273. /package/dist/{packages/taco/src/components → components}/Icon/components/PersonMinus.d.ts +0 -0
  274. /package/dist/{packages/taco/src/components → components}/Icon/components/PersonPlus.d.ts +0 -0
  275. /package/dist/{packages/taco/src/components → components}/Icon/components/PersonTick.d.ts +0 -0
  276. /package/dist/{packages/taco/src/components → components}/Icon/components/PhoneSolid.d.ts +0 -0
  277. /package/dist/{packages/taco/src/components → components}/Icon/components/Play.d.ts +0 -0
  278. /package/dist/{packages/taco/src/components → components}/Icon/components/PlusMinus.d.ts +0 -0
  279. /package/dist/{packages/taco/src/components → components}/Icon/components/Print.d.ts +0 -0
  280. /package/dist/{packages/taco/src/components → components}/Icon/components/ProcessPayment.d.ts +0 -0
  281. /package/dist/{packages/taco/src/components → components}/Icon/components/ProductLedgerCard.d.ts +0 -0
  282. /package/dist/{packages/taco/src/components → components}/Icon/components/Profile.d.ts +0 -0
  283. /package/dist/{packages/taco/src/components → components}/Icon/components/ProjectCards.d.ts +0 -0
  284. /package/dist/{packages/taco/src/components → components}/Icon/components/Projects.d.ts +0 -0
  285. /package/dist/{packages/taco/src/components → components}/Icon/components/QuestionMark.d.ts +0 -0
  286. /package/dist/{packages/taco/src/components → components}/Icon/components/QuestionMarkBold.d.ts +0 -0
  287. /package/dist/{packages/taco/src/components → components}/Icon/components/Quicklinks.d.ts +0 -0
  288. /package/dist/{packages/taco/src/components → components}/Icon/components/RatingBankruptcy.d.ts +0 -0
  289. /package/dist/{packages/taco/src/components → components}/Icon/components/RatingPaymentProblems.d.ts +0 -0
  290. /package/dist/{packages/taco/src/components → components}/Icon/components/Reconciled.d.ts +0 -0
  291. /package/dist/{packages/taco/src/components → components}/Icon/components/Refresh.d.ts +0 -0
  292. /package/dist/{packages/taco/src/components → components}/Icon/components/Report.d.ts +0 -0
  293. /package/dist/{packages/taco/src/components → components}/Icon/components/ReportSolid.d.ts +0 -0
  294. /package/dist/{packages/taco/src/components → components}/Icon/components/Restore.d.ts +0 -0
  295. /package/dist/{packages/taco/src/components → components}/Icon/components/RotateLeft.d.ts +0 -0
  296. /package/dist/{packages/taco/src/components → components}/Icon/components/RotateRight.d.ts +0 -0
  297. /package/dist/{packages/taco/src/components → components}/Icon/components/Sales.d.ts +0 -0
  298. /package/dist/{packages/taco/src/components → components}/Icon/components/Search.d.ts +0 -0
  299. /package/dist/{packages/taco/src/components → components}/Icon/components/SearchBold.d.ts +0 -0
  300. /package/dist/{packages/taco/src/components → components}/Icon/components/Secure.d.ts +0 -0
  301. /package/dist/{packages/taco/src/components → components}/Icon/components/SecureTick.d.ts +0 -0
  302. /package/dist/{packages/taco/src/components → components}/Icon/components/Settings.d.ts +0 -0
  303. /package/dist/{packages/taco/src/components → components}/Icon/components/SettingsSolid.d.ts +0 -0
  304. /package/dist/{packages/taco/src/components → components}/Icon/components/Shortcuts.d.ts +0 -0
  305. /package/dist/{packages/taco/src/components → components}/Icon/components/ShowAll.d.ts +0 -0
  306. /package/dist/{packages/taco/src/components → components}/Icon/components/ShowLess.d.ts +0 -0
  307. /package/dist/{packages/taco/src/components → components}/Icon/components/ShowMore.d.ts +0 -0
  308. /package/dist/{packages/taco/src/components → components}/Icon/components/ShowTemplate.d.ts +0 -0
  309. /package/dist/{packages/taco/src/components → components}/Icon/components/Sliders.d.ts +0 -0
  310. /package/dist/{packages/taco/src/components → components}/Icon/components/Smartpay.d.ts +0 -0
  311. /package/dist/{packages/taco/src/components → components}/Icon/components/SortBy.d.ts +0 -0
  312. /package/dist/{packages/taco/src/components → components}/Icon/components/Star.d.ts +0 -0
  313. /package/dist/{packages/taco/src/components → components}/Icon/components/StarSolid.d.ts +0 -0
  314. /package/dist/{packages/taco/src/components → components}/Icon/components/Subscriptions.d.ts +0 -0
  315. /package/dist/{packages/taco/src/components → components}/Icon/components/SystemEntries.d.ts +0 -0
  316. /package/dist/{packages/taco/src/components → components}/Icon/components/Tag.d.ts +0 -0
  317. /package/dist/{packages/taco/src/components → components}/Icon/components/TemplateOverride.d.ts +0 -0
  318. /package/dist/{packages/taco/src/components → components}/Icon/components/Templates.d.ts +0 -0
  319. /package/dist/{packages/taco/src/components → components}/Icon/components/ThumbBoth.d.ts +0 -0
  320. /package/dist/{packages/taco/src/components → components}/Icon/components/ThumbDown.d.ts +0 -0
  321. /package/dist/{packages/taco/src/components → components}/Icon/components/ThumbDownSolid.d.ts +0 -0
  322. /package/dist/{packages/taco/src/components → components}/Icon/components/ThumbUp.d.ts +0 -0
  323. /package/dist/{packages/taco/src/components → components}/Icon/components/ThumbUpSolid.d.ts +0 -0
  324. /package/dist/{packages/taco/src/components → components}/Icon/components/Tick.d.ts +0 -0
  325. /package/dist/{packages/taco/src/components → components}/Icon/components/TickBold.d.ts +0 -0
  326. /package/dist/{packages/taco/src/components → components}/Icon/components/Time.d.ts +0 -0
  327. /package/dist/{packages/taco/src/components → components}/Icon/components/Transfer.d.ts +0 -0
  328. /package/dist/{packages/taco/src/components → components}/Icon/components/TransferCancel.d.ts +0 -0
  329. /package/dist/{packages/taco/src/components → components}/Icon/components/TransferLocked.d.ts +0 -0
  330. /package/dist/{packages/taco/src/components → components}/Icon/components/Undo.d.ts +0 -0
  331. /package/dist/{packages/taco/src/components → components}/Icon/components/Undock.d.ts +0 -0
  332. /package/dist/{packages/taco/src/components → components}/Icon/components/Unreconciled.d.ts +0 -0
  333. /package/dist/{packages/taco/src/components → components}/Icon/components/Warning.d.ts +0 -0
  334. /package/dist/{packages/taco/src/components → components}/Icon/components/Webshop.d.ts +0 -0
  335. /package/dist/{packages/taco/src/components → components}/Icon/components/Website.d.ts +0 -0
  336. /package/dist/{packages/taco/src/components → components}/Icon/components/Workflow.d.ts +0 -0
  337. /package/dist/{packages/taco/src/components → components}/Icon/components/WorkflowTemplateBasic.d.ts +0 -0
  338. /package/dist/{packages/taco/src/components → components}/Icon/components/Zoom.d.ts +0 -0
  339. /package/dist/{packages/taco/src/components → components}/Icon/components/index.d.ts +0 -0
  340. /package/dist/{packages/taco/src/components → components}/IconButton/IconButton.d.ts +0 -0
  341. /package/dist/{packages/taco/src/components → components}/Input/Input.d.ts +0 -0
  342. /package/dist/{packages/taco/src/components → components}/Input/util.d.ts +0 -0
  343. /package/dist/{packages/taco/src/components → components}/Layout/Layout.d.ts +0 -0
  344. /package/dist/{packages/taco/src/components → components}/Layout/components/Content.d.ts +0 -0
  345. /package/dist/{packages/taco/src/components → components}/Layout/components/Context.d.ts +0 -0
  346. /package/dist/{packages/taco/src/components → components}/Layout/components/Page.d.ts +0 -0
  347. /package/dist/{packages/taco/src/components → components}/Layout/components/Sidebar.d.ts +0 -0
  348. /package/dist/{packages/taco/src/components → components}/Layout/components/Top.d.ts +0 -0
  349. /package/dist/{packages/taco/src/components → components}/Listbox/Listbox.d.ts +0 -0
  350. /package/dist/{packages/taco/src/components → components}/Listbox/ScrollableList.d.ts +0 -0
  351. /package/dist/{packages/taco/src/components → components}/Listbox/useListbox.d.ts +0 -0
  352. /package/dist/{packages/taco/src/components → components}/Listbox/useMultiListbox.d.ts +0 -0
  353. /package/dist/{packages/taco/src/components → components}/Listbox/useTypeahead.d.ts +0 -0
  354. /package/dist/{packages/taco/src/components → components}/Listbox/util.d.ts +0 -0
  355. /package/dist/{packages/taco/src/components → components}/Menu/Context.d.ts +0 -0
  356. /package/dist/{packages/taco/src/components → components}/Menu/Menu.d.ts +0 -0
  357. /package/dist/{packages/taco/src/components → components}/Menu/components/Checkbox.d.ts +0 -0
  358. /package/dist/{packages/taco/src/components → components}/Menu/components/Content.d.ts +0 -0
  359. /package/dist/{packages/taco/src/components → components}/Menu/components/Header.d.ts +0 -0
  360. /package/dist/{packages/taco/src/components → components}/Menu/components/Item.d.ts +0 -0
  361. /package/dist/{packages/taco/src/components → components}/Menu/components/Link.d.ts +0 -0
  362. /package/dist/{packages/taco/src/components → components}/Menu/components/RadioGroup.d.ts +0 -0
  363. /package/dist/{packages/taco/src/components → components}/Menu/components/Separator.d.ts +0 -0
  364. /package/dist/{packages/taco/src/components → components}/Menu/components/SubMenu.d.ts +0 -0
  365. /package/dist/{packages/taco/src/components → components}/Menu/components/Trigger.d.ts +0 -0
  366. /package/dist/{packages/taco/src/components → components}/ModeSwitch/ModeSwitch.d.ts +0 -0
  367. /package/dist/{packages/taco/src/components → components}/Navigation/Navigation.d.ts +0 -0
  368. /package/dist/{packages/taco/src/components → components}/Navigation2/Navigation2.d.ts +0 -0
  369. /package/dist/{packages/taco/src/components → components}/Navigation2/components/Content.d.ts +0 -0
  370. /package/dist/{packages/taco/src/components → components}/Navigation2/components/Group.d.ts +0 -0
  371. /package/dist/{packages/taco/src/components → components}/Navigation2/components/Link.d.ts +0 -0
  372. /package/dist/{packages/taco/src/components → components}/Navigation2/components/Section.d.ts +0 -0
  373. /package/dist/{packages/taco/src/components → components}/Navigation2/components/util.d.ts +0 -0
  374. /package/dist/{packages/taco/src/components → components}/OverflowGroup/OverflowGroup.d.ts +0 -0
  375. /package/dist/{packages/taco/src/components → components}/Pagination/PageNumbers.d.ts +0 -0
  376. /package/dist/{packages/taco/src/components → components}/Pagination/Pagination.d.ts +0 -0
  377. /package/dist/{packages/taco/src/components → components}/Pagination/usePagination.d.ts +0 -0
  378. /package/dist/{packages/taco/src/components → components}/Pagination/usePaginationShortcuts.d.ts +0 -0
  379. /package/dist/{packages/taco/src/components → components}/Popover/Popover.d.ts +0 -0
  380. /package/dist/{packages/taco/src/components → components}/Popover/Primitives.d.ts +0 -0
  381. /package/dist/{packages/taco/src/components → components}/Popover/util.d.ts +0 -0
  382. /package/dist/{packages/taco/src/components → components}/Progress/Progress.d.ts +0 -0
  383. /package/dist/{packages/taco/src/components → components}/Provider/Localization.d.ts +0 -0
  384. /package/dist/{packages/taco/src/components → components}/Provider/Provider.d.ts +0 -0
  385. /package/dist/{packages/taco/src/components → components}/RadioGroup/RadioGroup.d.ts +0 -0
  386. /package/dist/{packages/taco/src/components → components}/RadioGroup/util.d.ts +0 -0
  387. /package/dist/{packages/taco/src/components → components}/ScrollArea/ScrollArea.d.ts +0 -0
  388. /package/dist/{packages/taco/src/components → components}/SearchInput/SearchInput.d.ts +0 -0
  389. /package/dist/{packages/taco/src/components → components}/SearchInput2/SearchInput2.d.ts +0 -0
  390. /package/dist/{packages/taco/src/components → components}/Select/Select.d.ts +0 -0
  391. /package/dist/{packages/taco/src/components → components}/Select/useSelect.d.ts +0 -0
  392. /package/dist/{packages/taco/src/components → components}/Select2/Select2.d.ts +0 -0
  393. /package/dist/{packages/taco/src/components → components}/Select2/components/All.d.ts +0 -0
  394. /package/dist/{packages/taco/src/components → components}/Select2/components/Collection.d.ts +0 -0
  395. /package/dist/{packages/taco/src/components → components}/Select2/components/Context.d.ts +0 -0
  396. /package/dist/{packages/taco/src/components → components}/Select2/components/Create.d.ts +0 -0
  397. /package/dist/{packages/taco/src/components → components}/Select2/components/Edit.d.ts +0 -0
  398. /package/dist/{packages/taco/src/components → components}/Select2/components/Group.d.ts +0 -0
  399. /package/dist/{packages/taco/src/components → components}/Select2/components/Option.d.ts +0 -0
  400. /package/dist/{packages/taco/src/components → components}/Select2/components/Search.d.ts +0 -0
  401. /package/dist/{packages/taco/src/components → components}/Select2/components/Title.d.ts +0 -0
  402. /package/dist/{packages/taco/src/components → components}/Select2/components/Trigger.d.ts +0 -0
  403. /package/dist/{packages/taco/src/components → components}/Select2/hooks/useChildren.d.ts +0 -0
  404. /package/dist/{packages/taco/src/components → components}/Select2/types.d.ts +0 -0
  405. /package/dist/{packages/taco/src/components → components}/Select2/utilities.d.ts +0 -0
  406. /package/dist/{packages/taco/src/components → components}/Shortcut/Shortcut.d.ts +0 -0
  407. /package/dist/{packages/taco/src/components → components}/Spinner/Spinner.d.ts +0 -0
  408. /package/dist/{packages/taco/src/components → components}/Switch/Switch.d.ts +0 -0
  409. /package/dist/{packages/taco/src/components → components}/Table/Table.d.ts +0 -0
  410. /package/dist/{packages/taco/src/components → components}/Table/Table.storyexample.d.ts +0 -0
  411. /package/dist/{packages/taco/src/components → components}/Table/components/BaseTable.d.ts +0 -0
  412. /package/dist/{packages/taco/src/components → components}/Table/components/PaginatedTable.d.ts +0 -0
  413. /package/dist/{packages/taco/src/components → components}/Table/components/Table.d.ts +0 -0
  414. /package/dist/{packages/taco/src/components → components}/Table/components/WindowedTable.d.ts +0 -0
  415. /package/dist/{packages/taco/src/components → components}/Table/hooks/plugins/useRowActions.d.ts +0 -0
  416. /package/dist/{packages/taco/src/components → components}/Table/hooks/plugins/useRowDraggable.d.ts +0 -0
  417. /package/dist/{packages/taco/src/components → components}/Table/hooks/plugins/useRowEditing.d.ts +0 -0
  418. /package/dist/{packages/taco/src/components → components}/Table/hooks/plugins/useRowSelect.d.ts +0 -0
  419. /package/dist/{packages/taco/src/components → components}/Table/hooks/useRowCreation.d.ts +0 -0
  420. /package/dist/{packages/taco/src/components → components}/Table/hooks/useTable.d.ts +0 -0
  421. /package/dist/{packages/taco/src/components → components}/Table/hooks/useTableKeyboardNavigation.d.ts +0 -0
  422. /package/dist/{packages/taco/src/components → components}/Table/types.d.ts +0 -0
  423. /package/dist/{packages/taco/src/components → components}/Table/util/renderColumn.d.ts +0 -0
  424. /package/dist/{packages/taco/src/components → components}/Table/util/renderRow.d.ts +0 -0
  425. /package/dist/{packages/taco/src/components → components}/Table/util/rowIndexPath.d.ts +0 -0
  426. /package/dist/{packages/taco/src/components → components}/Table/util/sortTypes.d.ts +0 -0
  427. /package/dist/{packages/taco/src/components → components}/Table/util.d.ts +0 -0
  428. /package/dist/{packages/taco/src/components → components}/Table3/components/Columns/Cell/Cell.d.ts +0 -0
  429. /package/dist/{packages/taco/src/components → components}/Table3/components/Columns/Cell/Editing/RowMoveIndicator.d.ts +0 -0
  430. /package/dist/{packages/taco/src/components → components}/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.d.ts +0 -0
  431. /package/dist/{packages/taco/src/components → components}/Table3/components/Columns/Cell/EditingControlCell.d.ts +0 -0
  432. /package/dist/{packages/taco/src/components → components}/Table3/components/Columns/Cell/EditingDisplayCell.d.ts +0 -0
  433. /package/dist/{packages/taco/src/components → components}/Table3/components/Columns/Cell/util.d.ts +0 -0
  434. /package/dist/{packages/taco/src/components → components}/Table3/components/Columns/Internal/EditingActionsMenu.d.ts +0 -0
  435. /package/dist/{packages/taco/src/components → components}/Table3/components/Editing/Alert.d.ts +0 -0
  436. /package/dist/{packages/taco/src/components → components}/Table3/components/Row/Editing/SaveStatus.d.ts +0 -0
  437. /package/dist/{packages/taco/src/components → components}/Table3/components/Row/Row.d.ts +0 -0
  438. /package/dist/{packages/taco/src/components → components}/Table3/components/Toolbar/Editing/Editing.d.ts +0 -0
  439. /package/dist/{packages/taco/src/components → components}/Table3/listeners/useTableEditingListener.d.ts +0 -0
  440. /package/dist/{packages/taco/src/components → components}/Table3/util/editing.d.ts +0 -0
  441. /package/dist/{packages/taco/src/components → components}/Tabs/Tabs.d.ts +0 -0
  442. /package/dist/{packages/taco/src/components → components}/Tag/Tag.d.ts +0 -0
  443. /package/dist/{packages/taco/src/components → components}/Textarea/Textarea.d.ts +0 -0
  444. /package/dist/{packages/taco/src/components → components}/Toast/Toast.d.ts +0 -0
  445. /package/dist/{packages/taco/src/components → components}/Toast/Toaster.d.ts +0 -0
  446. /package/dist/{packages/taco/src/components → components}/Toast/util.d.ts +0 -0
  447. /package/dist/{packages/taco/src/components → components}/Tooltip/Tooltip.d.ts +0 -0
  448. /package/dist/{packages/taco/src/components → components}/Tour/Tour.d.ts +0 -0
  449. /package/dist/{packages/taco/src/components → components}/Treeview/Treeview.d.ts +0 -0
  450. /package/dist/{packages/taco/src/components → components}/Truncate/Truncate.d.ts +0 -0
  451. /package/dist/{packages/taco/src/components → components}/VisuallyHidden/VisuallyHidden.d.ts +0 -0
  452. /package/dist/{packages/taco/src/hooks → hooks}/useBoundaryOverflowDetection.d.ts +0 -0
  453. /package/dist/{packages/taco/src/hooks → hooks}/useBoundingClientRectListener.d.ts +0 -0
  454. /package/dist/{packages/taco/src/hooks → hooks}/useDebouncedEffect.d.ts +0 -0
  455. /package/dist/{packages/taco/src/hooks → hooks}/useGlobalKeyDown.d.ts +0 -0
  456. /package/dist/{packages/taco/src/hooks → hooks}/useId.d.ts +0 -0
  457. /package/dist/{packages/taco/src/hooks → hooks}/useIntersectionObserver.d.ts +0 -0
  458. /package/dist/{packages/taco/src/hooks → hooks}/useIsFormControl.d.ts +0 -0
  459. /package/dist/{packages/taco/src/hooks → hooks}/useIsHoverStatePaused.d.ts +0 -0
  460. /package/dist/{packages/taco/src/hooks → hooks}/useIsLargeScreen.d.ts +0 -0
  461. /package/dist/{packages/taco/src/hooks → hooks}/useLazyEffect.d.ts +0 -0
  462. /package/dist/{packages/taco/src/hooks → hooks}/useLocalStorage.d.ts +0 -0
  463. /package/dist/{packages/taco/src/hooks → hooks}/useMatchMedia.d.ts +0 -0
  464. /package/dist/{packages/taco/src/hooks → hooks}/useMergedRef.d.ts +0 -0
  465. /package/dist/{packages/taco/src/hooks → hooks}/usePrevious.d.ts +0 -0
  466. /package/dist/{packages/taco/src/hooks → hooks}/useTacoSettings.d.ts +0 -0
  467. /package/dist/{packages/taco/src/index.d.ts → index.d.ts} +0 -0
  468. /package/dist/{packages/taco/src/primitives → primitives}/BubbleSelect.d.ts +0 -0
  469. /package/dist/{packages/taco/src/primitives → primitives}/Button.d.ts +0 -0
  470. /package/dist/{packages/taco/src/primitives → primitives}/Collection/Collection.d.ts +0 -0
  471. /package/dist/{packages/taco/src/primitives → primitives}/Collection/components/Root.d.ts +0 -0
  472. /package/dist/{packages/taco/src/primitives → primitives}/Listbox2/Listbox2.d.ts +0 -0
  473. /package/dist/{packages/taco/src/primitives → primitives}/Listbox2/components/Context.d.ts +0 -0
  474. /package/dist/{packages/taco/src/primitives → primitives}/Listbox2/components/Group.d.ts +0 -0
  475. /package/dist/{packages/taco/src/primitives → primitives}/Listbox2/components/Option.d.ts +0 -0
  476. /package/dist/{packages/taco/src/primitives → primitives}/Listbox2/components/Root.d.ts +0 -0
  477. /package/dist/{packages/taco/src/primitives → primitives}/Listbox2/components/Title.d.ts +0 -0
  478. /package/dist/{packages/taco/src/primitives → primitives}/Listbox2/types.d.ts +0 -0
  479. /package/dist/{packages/taco/src/primitives → primitives}/Sortable/Sortable.d.ts +0 -0
  480. /package/dist/{packages/taco/src/primitives → primitives}/Sortable/components/Container.d.ts +0 -0
  481. /package/dist/{packages/taco/src/primitives → primitives}/Sortable/components/Item.d.ts +0 -0
  482. /package/dist/{packages/taco/src/primitives → primitives}/Sortable/components/List.d.ts +0 -0
  483. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Body/Body.d.ts +0 -0
  484. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Body/EmptyStateBody.d.ts +0 -0
  485. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Body/util.d.ts +0 -0
  486. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.d.ts +0 -0
  487. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.d.ts +0 -0
  488. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Columns/Cell/Cell.d.ts +0 -0
  489. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Columns/Cell/util.d.ts +0 -0
  490. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Columns/Internal/Actions.d.ts +0 -0
  491. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Columns/Internal/Drag.d.ts +0 -0
  492. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Columns/Internal/Expansion.d.ts +0 -0
  493. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Columns/Internal/Selection.d.ts +0 -0
  494. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Footer/Footer.d.ts +0 -0
  495. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Footer/Summary.d.ts +0 -0
  496. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Header/Header.d.ts +0 -0
  497. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Header/components/Goto.d.ts +0 -0
  498. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Header/components/Menu.d.ts +0 -0
  499. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Header/components/Resizer.d.ts +0 -0
  500. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Header/components/SortIndicator.d.ts +0 -0
  501. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Header/util.d.ts +0 -0
  502. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Row/BuiltIns/DisplayRow.d.ts +0 -0
  503. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Row/BuiltIns/SkeletonRow.d.ts +0 -0
  504. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Row/Row.d.ts +0 -0
  505. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Row/RowContext.d.ts +0 -0
  506. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Toolbar/components/Filters/Filters.d.ts +0 -0
  507. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.d.ts +0 -0
  508. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +0 -0
  509. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +0 -0
  510. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.d.ts +0 -0
  511. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Toolbar/components/Filters/components/FilterValue.d.ts +0 -0
  512. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Toolbar/components/Filters/util.d.ts +0 -0
  513. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Toolbar/components/Print/Print.d.ts +0 -0
  514. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Toolbar/components/Print/PrintDialog.d.ts +0 -0
  515. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Toolbar/components/Search/Search.d.ts +0 -0
  516. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.d.ts +0 -0
  517. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/components/Toolbar/components/Settings/Settings.d.ts +0 -0
  518. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/features/useStylesheet.d.ts +0 -0
  519. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/features/useStylesheetColumnFreezing.d.ts +0 -0
  520. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/features/useStylesheetCssGrid.d.ts +0 -0
  521. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/features/useTableGlobalShortcuts.d.ts +0 -0
  522. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/features/useTableRef.d.ts +0 -0
  523. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/features/useTableRenderer.d.ts +0 -0
  524. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/listeners/useTableRowActiveListener.d.ts +0 -0
  525. /package/dist/{packages/taco/src/primitives → primitives}/Table/Core/util/rows.d.ts +0 -0
  526. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableDataLoader.d.ts +0 -0
  527. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableColumnFreezing.d.ts +0 -0
  528. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableColumnOrdering.d.ts +0 -0
  529. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableFontSize.d.ts +0 -0
  530. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableFooter.d.ts +0 -0
  531. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTablePrinting.d.ts +0 -0
  532. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableRowActions.d.ts +0 -0
  533. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableRowActive.d.ts +0 -0
  534. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableRowClick.d.ts +0 -0
  535. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableRowDrag.d.ts +0 -0
  536. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableRowDrop.d.ts +0 -0
  537. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableRowExpansion.d.ts +0 -0
  538. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableRowGoto.d.ts +0 -0
  539. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableRowGroups.d.ts +0 -0
  540. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableRowHeight.d.ts +0 -0
  541. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableRowSelection.d.ts +0 -0
  542. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableSearch.d.ts +0 -0
  543. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/features/useTableServerLoading.d.ts +0 -0
  544. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/listeners/useTableDataListener.d.ts +0 -0
  545. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/listeners/useTableFilterListener.d.ts +0 -0
  546. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/listeners/useTableFontSizeListener.d.ts +0 -0
  547. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/listeners/useTableRowHeightListener.d.ts +0 -0
  548. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/listeners/useTableRowSelectionListener.d.ts +0 -0
  549. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/listeners/useTableSearchListener.d.ts +0 -0
  550. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/listeners/useTableServerLoadingListener.d.ts +0 -0
  551. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/listeners/useTableSettingsListener.d.ts +0 -0
  552. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/listeners/useTableShortcutsListener.d.ts +0 -0
  553. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/listeners/useTableSortingListener.d.ts +0 -0
  554. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/types.d.ts +0 -0
  555. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/useTableManager.d.ts +0 -0
  556. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/util/columns.d.ts +0 -0
  557. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/util/columns.spec.d.ts +0 -0
  558. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/util/filtering.d.ts +0 -0
  559. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/util/presets.d.ts +0 -0
  560. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/util/search.d.ts +0 -0
  561. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/util/settings.d.ts +0 -0
  562. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/util/setup.d.ts +0 -0
  563. /package/dist/{packages/taco/src/primitives → primitives}/Table/useTableManager/util/sorting.d.ts +0 -0
  564. /package/dist/{packages/taco/src/types.d.ts → types.d.ts} +0 -0
  565. /package/dist/{packages/taco/src/utils → utils}/aria.d.ts +0 -0
  566. /package/dist/{packages/taco/src/utils → utils}/date.d.ts +0 -0
  567. /package/dist/{packages/taco/src/utils → utils}/debounce.d.ts +0 -0
  568. /package/dist/{packages/taco/src/utils → utils}/device.d.ts +0 -0
  569. /package/dist/{packages/taco/src/utils → utils}/dom.d.ts +0 -0
  570. /package/dist/{packages/taco/src/utils → utils}/hooks/useDraggable.d.ts +0 -0
  571. /package/dist/{packages/taco/src/utils → utils}/hooks/useDropTarget.d.ts +0 -0
  572. /package/dist/{packages/taco/src/utils → utils}/hooks/useListKeyboardNavigation.d.ts +0 -0
  573. /package/dist/{packages/taco/src/utils → utils}/hooks/useListScrollTo.d.ts +0 -0
  574. /package/dist/{packages/taco/src/utils → utils}/hooks/useOnClickOutside.d.ts +0 -0
  575. /package/dist/{packages/taco/src/utils → utils}/hooks/useRefState.d.ts +0 -0
  576. /package/dist/{packages/taco/src/utils → utils}/hooks/useTimer.d.ts +0 -0
  577. /package/dist/{packages/taco/src/utils → utils}/hooks/useTruncated.d.ts +0 -0
  578. /package/dist/{packages/taco/src/utils → utils}/input.d.ts +0 -0
  579. /package/dist/{packages/taco/src/utils → utils}/keyboard.d.ts +0 -0
  580. /package/dist/{packages/taco/src/utils → utils}/mergeRefs.d.ts +0 -0
  581. /package/dist/{packages/taco/src/utils → utils}/storyutils.d.ts +0 -0
  582. /package/dist/{packages/taco/src/utils → utils}/tailwind.d.ts +0 -0
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ReportRef, ReportProps, ReportColumnProps, ReportGroupProps } from './types';
3
+ declare function Column<TType = unknown>(_: ReportColumnProps<TType>): null;
4
+ declare function Group(_: ReportGroupProps): null;
5
+ export declare const Report: (<TType = unknown>(props: (import("../..").TableClientProps<TType> & React.RefAttributes<import("../..").TableRef>) | (import("../..").TableServerProps<TType> & React.RefAttributes<import("../..").TableRef>)) => JSX.Element) & {
6
+ Column: typeof Column;
7
+ Group: typeof Group;
8
+ };
9
+ export type { ReportRef, ReportProps, ReportColumnProps, ReportGroupProps } from './types';
@@ -0,0 +1,5 @@
1
+ import { TableProps, TableRef, TableColumnProps, TableGroupProps } from '../../primitives/Table/types';
2
+ export declare type ReportRef = TableRef;
3
+ export declare type ReportProps<TType = unknown> = TableProps<TType>;
4
+ export declare type ReportColumnProps<TType = unknown> = TableColumnProps<TType>;
5
+ export declare type ReportGroupProps = TableGroupProps;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { TableRef } from '../../primitives/Table/types';
3
+ import { useTableReturnValue } from '../../primitives/Table/Core/useTable';
4
+ import { TableProps } from '../../primitives/Table/types';
5
+ export declare function useReport<TType>(props: TableProps<TType>, ref: React.Ref<TableRef>): useTableReturnValue<TType>;
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { Table3Props, Table3Ref, Table3ColumnProps, Table3GroupProps } from './types';
3
+ import './style.css';
4
+ declare function Column<TType = unknown>(_: Table3ColumnProps<TType>): null;
5
+ declare namespace Column {
6
+ var displayName: string;
7
+ }
8
+ declare function Group(_: Table3GroupProps): null;
9
+ declare namespace Group {
10
+ var displayName: string;
11
+ }
12
+ export declare const Table3: (<TType = unknown>(props: (import("../..").TableClientProps<TType> & {
13
+ enableEditing?: boolean | undefined;
14
+ onSave?: import("./types").Table3EditingSaveHandler<TType> | undefined;
15
+ validator?: import("./types").Table3EditingValidatorFn<TType> | undefined;
16
+ } & React.RefAttributes<Table3Ref>) | (import("../..").TableServerProps<TType> & {
17
+ enableEditing?: boolean | undefined;
18
+ onSave?: import("./types").Table3EditingSaveHandler<TType> | undefined;
19
+ validator?: import("./types").Table3EditingValidatorFn<TType> | undefined;
20
+ } & React.RefAttributes<Table3Ref>)) => JSX.Element) & {
21
+ Column: typeof Column;
22
+ Group: typeof Group;
23
+ };
24
+ export type { Table3Props, Table3Ref, Table3ColumnProps, Table3GroupProps, Table3EditingSaveHandler, Table3EditingValidatorFn, Table3FeatureProps, Table3Texts, } from './types';
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { Cell as ReactTableCell, Table as ReactTable } from '@tanstack/react-table';
3
- import { TableEditingSaveHandler, TableEditingValidatorFn } from '../types';
3
+ import { Table3EditingSaveHandler, Table3EditingValidatorFn } from '../types';
4
4
  import { TableRef } from '../../../primitives/Table/types';
5
- export declare function useTableEditing<TType = unknown>(isEnabled: boolean | undefined, handleSave: TableEditingSaveHandler<TType> | undefined, validator: TableEditingValidatorFn<TType> | undefined): {
5
+ export declare function useTableEditing<TType = unknown>(isEnabled: boolean | undefined, handleSave: Table3EditingSaveHandler<TType> | undefined, validator: Table3EditingValidatorFn<TType> | undefined): {
6
6
  handleBlur: (event: React.FocusEvent<HTMLTableElement>) => void;
7
7
  getCellValue: <T extends TType>(cell: ReactTableCell<T, unknown>) => unknown;
8
8
  getCellError: <T_1 extends TType>(cell: ReactTableCell<T_1, unknown>) => string | undefined;
@@ -1,11 +1,21 @@
1
- import { TableProps } from '../../primitives/Table/types';
2
- export declare type TableEditingSaveHandler<TType = unknown> = (row: TType) => Promise<void>;
3
- export declare type TableEditingValidatorFn<TType = unknown> = (row: TType) => Promise<Partial<Record<keyof TType, string>> | undefined> | Partial<Record<keyof TType, string>> | undefined;
1
+ import { TableFeatureProps, TableProps, TableRef, TableColumnProps, TableGroupProps } from '../../primitives/Table/types';
2
+ export declare type Table3Ref = TableRef & {
3
+ instance: {
4
+ toggleEditing: (enabled: boolean | undefined) => void;
5
+ };
6
+ };
7
+ export declare type Table3EditingSaveHandler<TType = unknown> = (row: TType) => Promise<void>;
8
+ export declare type Table3EditingValidatorFn<TType = unknown> = (row: TType) => Promise<Partial<Record<keyof TType, string>> | undefined> | Partial<Record<keyof TType, string>> | undefined;
9
+ export declare type Table3FeatureProps = TableFeatureProps & {
10
+ enableEditing?: boolean;
11
+ };
4
12
  export declare type Table3Props<TType = unknown> = TableProps<TType> & {
5
13
  enableEditing?: boolean;
6
- onSave?: TableEditingSaveHandler<TType>;
7
- validator?: TableEditingValidatorFn<TType>;
14
+ onSave?: Table3EditingSaveHandler<TType>;
15
+ validator?: Table3EditingValidatorFn<TType>;
8
16
  };
17
+ export declare type Table3ColumnProps<TType = unknown> = TableColumnProps<TType>;
18
+ export declare type Table3GroupProps = TableGroupProps;
9
19
  export declare type Table3Texts = {
10
20
  editing: {
11
21
  actions: {
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { RowData } from '@tanstack/react-table';
3
+ import { useTableEditing } from './features/useTableEditing';
4
+ import { Table3Props, Table3Ref } from './types';
5
+ declare module '@tanstack/table-core' {
6
+ interface TableMeta<TData extends RowData> {
7
+ editing: ReturnType<typeof useTableEditing>;
8
+ }
9
+ }
10
+ export declare function useTable3<TType>(props: Table3Props<TType>, ref: React.Ref<Table3Ref>): import("../../primitives/Table/Core/useTable").useTableReturnValue<TType>;
@@ -1 +1 @@
1
- {"version":3,"file":"Report.js","sources":["../../../../../../../src/components/Report/Report.tsx"],"sourcesContent":["import React from 'react';\nimport { fixedForwardRef } from '../../types';\nimport { useReport } from './useReport';\nimport { TableRef } from '../../primitives/Table/types';\nimport { Table } from '../../primitives/Table/Core/Table';\nimport { TableColumnProps, TableGroupProps, TableProps } from '../../primitives/Table/types';\n\nfunction Column<TType = unknown>(_: TableColumnProps<TType>) {\n return null;\n}\n\nfunction Group(_: TableGroupProps) {\n return null;\n}\n\nexport const Report = fixedForwardRef<TableRef, TableProps>(function Report<TType = unknown>(\n props: TableProps<TType>,\n ref: React.Ref<TableRef>\n) {\n const report = useReport<TType>(props, ref);\n\n return (\n <Table>\n <Table.Toolbar table={report as any} />\n <Table.Grid data-taco=\"table-report\" table={report as any} />\n </Table>\n );\n}) as (<TType = unknown>(props: TableProps<TType> & React.RefAttributes<TableRef>) => JSX.Element) & {\n Column: typeof Column;\n Group: typeof Group;\n};\nReport.Column = Column;\nReport.Group = Group;\n"],"names":["Column","_","Group","Report","fixedForwardRef","props","ref","report","useReport","React","Table","Toolbar","table","Grid"],"mappings":";;;;;AAOA,SAASA,MAAMA,CAAkBC,CAA0B;EACvD,OAAO,IAAI;AACf;AAEA,SAASC,KAAKA,CAACD,CAAkB;EAC7B,OAAO,IAAI;AACf;MAEaE,MAAM,gBAAGC,eAAe,CAAuB,SAASD,MAAMA,CACvEE,KAAwB,EACxBC,GAAwB;EAExB,MAAMC,MAAM,GAAGC,SAAS,CAAQH,KAAK,EAAEC,GAAG,CAAC;EAE3C,oBACIG,6BAACC,KAAK,qBACFD,6BAACC,KAAK,CAACC,OAAO;IAACC,KAAK,EAAEL;IAAiB,eACvCE,6BAACC,KAAK,CAACG,IAAI;iBAAW,cAAc;IAACD,KAAK,EAAEL;IAAiB,CACzD;AAEhB,CAAC;AAIDJ,MAAM,CAACH,MAAM,GAAGA,MAAM;AACtBG,MAAM,CAACD,KAAK,GAAGA,KAAK;;;;"}
1
+ {"version":3,"file":"Report.js","sources":["../../../../../../../src/components/Report/Report.tsx"],"sourcesContent":["import React from 'react';\nimport { fixedForwardRef } from '../../types';\nimport { useReport } from './useReport';\nimport { Table } from '../../primitives/Table/Core/Table';\nimport { ReportRef, ReportProps, ReportColumnProps, ReportGroupProps } from './types';\n\nfunction Column<TType = unknown>(_: ReportColumnProps<TType>) {\n return null;\n}\n\nfunction Group(_: ReportGroupProps) {\n return null;\n}\n\nexport const Report = fixedForwardRef<ReportRef, ReportProps>(function Report<TType = unknown>(props, ref) {\n const report = useReport<TType>(props, ref);\n\n return (\n <Table>\n <Table.Toolbar<TType> table={report} />\n <Table.Grid<TType> data-taco=\"table-report\" table={report} />\n </Table>\n );\n}) as (<TType = unknown>(props: ReportProps<TType> & React.RefAttributes<ReportRef>) => JSX.Element) & {\n Column: typeof Column;\n Group: typeof Group;\n};\nReport.Column = Column;\nReport.Group = Group;\n\nexport type { ReportRef, ReportProps, ReportColumnProps, ReportGroupProps } from './types';\n"],"names":["Column","_","Group","Report","fixedForwardRef","props","ref","report","useReport","React","Table","Toolbar","table","Grid"],"mappings":";;;;;AAMA,SAASA,MAAMA,CAAkBC,CAA2B;EACxD,OAAO,IAAI;AACf;AAEA,SAASC,KAAKA,CAACD,CAAmB;EAC9B,OAAO,IAAI;AACf;MAEaE,MAAM,gBAAGC,eAAe,CAAyB,SAASD,MAAMA,CAAkBE,KAAK,EAAEC,GAAG;EACrG,MAAMC,MAAM,GAAGC,SAAS,CAAQH,KAAK,EAAEC,GAAG,CAAC;EAE3C,oBACIG,6BAACC,KAAK,qBACFD,6BAACC,KAAK,CAACC,OAAO;IAAQC,KAAK,EAAEL;IAAU,eACvCE,6BAACC,KAAK,CAACG,IAAI;iBAAkB,cAAc;IAACD,KAAK,EAAEL;IAAU,CACzD;AAEhB,CAAC;AAIDJ,MAAM,CAACH,MAAM,GAAGA,MAAM;AACtBG,MAAM,CAACD,KAAK,GAAGA,KAAK;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useReport.js","sources":["../../../../../../../src/components/Report/useReport.tsx"],"sourcesContent":["import React from 'react';\nimport { TableRef } from '../../primitives/Table/types';\nimport { useTable } from '../../primitives/Table/Core/useTable';\nimport { DisplayRow } from '../../primitives/Table/Core/components/Row/BuiltIns/DisplayRow';\nimport { DisplayCell } from '../../primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell';\nimport { TableProps } from '../../primitives/Table/types';\n\nconst RENDERERS = {\n row: DisplayRow,\n cell: DisplayCell,\n};\n\nexport function useReport<TType>(props: TableProps<TType>, ref: React.Ref<TableRef>) {\n return useTable<TType>(props, ref, RENDERERS);\n}\n"],"names":["RENDERERS","row","DisplayRow","cell","DisplayCell","useReport","props","ref","useTable"],"mappings":";;;;AAOA,MAAMA,SAAS,GAAG;EACdC,GAAG,EAAEC,UAAU;EACfC,IAAI,EAAEC;CACT;SAEeC,SAASA,CAAQC,KAAwB,EAAEC,GAAwB;EAC/E,OAAOC,QAAQ,CAAQF,KAAK,EAAEC,GAAG,EAAEP,SAAS,CAAC;AACjD;;;;"}
1
+ {"version":3,"file":"useReport.js","sources":["../../../../../../../src/components/Report/useReport.tsx"],"sourcesContent":["import React from 'react';\nimport { TableRef } from '../../primitives/Table/types';\nimport { useTable, useTableReturnValue } from '../../primitives/Table/Core/useTable';\nimport { DisplayRow } from '../../primitives/Table/Core/components/Row/BuiltIns/DisplayRow';\nimport { DisplayCell } from '../../primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell';\nimport { TableProps } from '../../primitives/Table/types';\n\nconst RENDERERS = {\n row: DisplayRow,\n cell: DisplayCell,\n};\n\nexport function useReport<TType>(props: TableProps<TType>, ref: React.Ref<TableRef>): useTableReturnValue<TType> {\n return useTable<TType>(props, ref, RENDERERS);\n}\n"],"names":["RENDERERS","row","DisplayRow","cell","DisplayCell","useReport","props","ref","useTable"],"mappings":";;;;AAOA,MAAMA,SAAS,GAAG;EACdC,GAAG,EAAEC,UAAU;EACfC,IAAI,EAAEC;CACT;SAEeC,SAASA,CAAQC,KAAwB,EAAEC,GAAwB;EAC/E,OAAOC,QAAQ,CAAQF,KAAK,EAAEC,GAAG,EAAEP,SAAS,CAAC;AACjD;;;;"}
@@ -8,9 +8,11 @@ import { Editing } from './components/Toolbar/Editing/Editing.js';
8
8
  function Column(_) {
9
9
  return null;
10
10
  }
11
+ Column.displayName = 'Table3Column';
11
12
  function Group(_) {
12
13
  return null;
13
14
  }
15
+ Group.displayName = 'Table3Group';
14
16
  const Table3 = /*#__PURE__*/fixedForwardRef(function Table3(props, ref) {
15
17
  var _table3$meta$editing, _table3$meta$editing2;
16
18
  const table3 = useTable3(props, ref);
@@ -1 +1 @@
1
- {"version":3,"file":"Table3.js","sources":["../../../../../../../src/components/Table3/Table3.tsx"],"sourcesContent":["import React from 'react';\nimport { fixedForwardRef } from '../../types';\nimport { useTable3 } from './useTable3';\nimport { TableRef } from '../../primitives/Table/types';\nimport { Table } from '../../primitives/Table/Core/Table';\nimport { TableColumnProps, TableGroupProps } from '../../primitives/Table/types';\nimport { Alert } from './components/Editing/Alert';\nimport { Table3Props } from './types';\nimport { Editing } from './components/Toolbar/Editing/Editing';\nimport './style.css';\n\nfunction Column<TType = unknown>(_: TableColumnProps<TType>) {\n return null;\n}\n\nfunction Group(_: TableGroupProps) {\n return null;\n}\n\nexport const Table3 = fixedForwardRef<TableRef, Table3Props>(function Table3<TType = unknown>(\n props: Table3Props<TType>,\n ref: React.Ref<TableRef>\n) {\n const table3 = useTable3<TType>(props, ref);\n\n const handleBlur = (event: React.FocusEvent<HTMLTableElement>) => {\n if (table3.meta.editing.isEditing) {\n table3.meta.editing.handleBlur(event);\n }\n };\n\n const gridAttributes = {\n 'data-table-editing-mode': table3.meta.editing?.isEditing\n ? table3.meta.editing?.isDetailedMode\n ? 'detailed'\n : 'normal'\n : undefined,\n enableHorizontalArrowKeyNavigation: table3.meta.editing.isEditing,\n onBlur: handleBlur,\n };\n\n const hasValidationErrors = table3.meta.editing.hasErrors(table3.instance, table3.ref);\n\n return (\n <Table>\n <Table.Toolbar table={table3 as any}>\n {table3.meta.editing.isEnabled ? (\n <Editing scrollToIndex={table3.renderer.scrollToIndex} table={table3.instance} />\n ) : null}\n </Table.Toolbar>\n {hasValidationErrors ? (\n <Alert\n className=\"mb-4\"\n scrollToIndex={table3.renderer.scrollToIndex}\n table={table3.instance}\n tableRef={table3.ref}\n />\n ) : null}\n <Table.Grid {...gridAttributes} data-taco=\"table3\" table={table3 as any} />\n </Table>\n );\n}) as (<TType = unknown>(props: Table3Props<TType> & React.RefAttributes<TableRef>) => JSX.Element) & {\n Column: typeof Column;\n Group: typeof Group;\n};\nTable3.Column = Column;\nTable3.Group = Group;\n"],"names":["Column","_","Group","Table3","fixedForwardRef","props","ref","table3","useTable3","handleBlur","event","meta","editing","isEditing","gridAttributes","_table3$meta$editing","_table3$meta$editing2","isDetailedMode","undefined","enableHorizontalArrowKeyNavigation","onBlur","hasValidationErrors","hasErrors","instance","React","Table","Toolbar","table","isEnabled","Editing","scrollToIndex","renderer","Alert","className","tableRef","Grid"],"mappings":";;;;;;;AAWA,SAASA,MAAMA,CAAkBC,CAA0B;EACvD,OAAO,IAAI;AACf;AAEA,SAASC,KAAKA,CAACD,CAAkB;EAC7B,OAAO,IAAI;AACf;MAEaE,MAAM,gBAAGC,eAAe,CAAwB,SAASD,MAAMA,CACxEE,KAAyB,EACzBC,GAAwB;;EAExB,MAAMC,MAAM,GAAGC,SAAS,CAAQH,KAAK,EAAEC,GAAG,CAAC;EAE3C,MAAMG,UAAU,GAAIC,KAAyC;IACzD,IAAIH,MAAM,CAACI,IAAI,CAACC,OAAO,CAACC,SAAS,EAAE;MAC/BN,MAAM,CAACI,IAAI,CAACC,OAAO,CAACH,UAAU,CAACC,KAAK,CAAC;;GAE5C;EAED,MAAMI,cAAc,GAAG;IACnB,yBAAyB,EAAE,CAAAC,oBAAA,GAAAR,MAAM,CAACI,IAAI,CAACC,OAAO,cAAAG,oBAAA,eAAnBA,oBAAA,CAAqBF,SAAS,GACnD,CAAAG,qBAAA,GAAAT,MAAM,CAACI,IAAI,CAACC,OAAO,cAAAI,qBAAA,eAAnBA,qBAAA,CAAqBC,cAAc,GAC/B,UAAU,GACV,QAAQ,GACZC,SAAS;IACfC,kCAAkC,EAAEZ,MAAM,CAACI,IAAI,CAACC,OAAO,CAACC,SAAS;IACjEO,MAAM,EAAEX;GACX;EAED,MAAMY,mBAAmB,GAAGd,MAAM,CAACI,IAAI,CAACC,OAAO,CAACU,SAAS,CAACf,MAAM,CAACgB,QAAQ,EAAEhB,MAAM,CAACD,GAAG,CAAC;EAEtF,oBACIkB,6BAACC,KAAK,qBACFD,6BAACC,KAAK,CAACC,OAAO;IAACC,KAAK,EAAEpB;KACjBA,MAAM,CAACI,IAAI,CAACC,OAAO,CAACgB,SAAS,kBAC1BJ,6BAACK,OAAO;IAACC,aAAa,EAAEvB,MAAM,CAACwB,QAAQ,CAACD,aAAa;IAAEH,KAAK,EAAEpB,MAAM,CAACgB;IAAY,IACjF,IAAI,CACI,EACfF,mBAAmB,kBAChBG,6BAACQ,KAAK;IACFC,SAAS,EAAC,MAAM;IAChBH,aAAa,EAAEvB,MAAM,CAACwB,QAAQ,CAACD,aAAa;IAC5CH,KAAK,EAAEpB,MAAM,CAACgB,QAAQ;IACtBW,QAAQ,EAAE3B,MAAM,CAACD;IACnB,IACF,IAAI,eACRkB,6BAACC,KAAK,CAACU,IAAI,oBAAKrB,cAAc;iBAAY,QAAQ;IAACa,KAAK,EAAEpB;KAAiB,CACvE;AAEhB,CAAC;AAIDJ,MAAM,CAACH,MAAM,GAAGA,MAAM;AACtBG,MAAM,CAACD,KAAK,GAAGA,KAAK;;;;"}
1
+ {"version":3,"file":"Table3.js","sources":["../../../../../../../src/components/Table3/Table3.tsx"],"sourcesContent":["import React from 'react';\nimport { fixedForwardRef } from '../../types';\nimport { useTable3 } from './useTable3';\nimport { Table } from '../../primitives/Table/Core/Table';\nimport { Alert } from './components/Editing/Alert';\nimport { Table3Props, Table3Ref, Table3ColumnProps, Table3GroupProps } from './types';\nimport { Editing } from './components/Toolbar/Editing/Editing';\nimport './style.css';\n\nfunction Column<TType = unknown>(_: Table3ColumnProps<TType>) {\n return null;\n}\nColumn.displayName = 'Table3Column';\n\nfunction Group(_: Table3GroupProps) {\n return null;\n}\nGroup.displayName = 'Table3Group';\n\nexport const Table3 = fixedForwardRef<Table3Ref, Table3Props>(function Table3<TType = unknown>(props, ref) {\n const table3 = useTable3<TType>(props, ref);\n\n const handleBlur = (event: React.FocusEvent<HTMLTableElement>) => {\n if (table3.meta.editing.isEditing) {\n table3.meta.editing.handleBlur(event);\n }\n };\n\n const gridAttributes = {\n 'data-table-editing-mode': table3.meta.editing?.isEditing\n ? table3.meta.editing?.isDetailedMode\n ? 'detailed'\n : 'normal'\n : undefined,\n enableHorizontalArrowKeyNavigation: table3.meta.editing.isEditing,\n onBlur: handleBlur,\n };\n\n const hasValidationErrors = table3.meta.editing.hasErrors(table3.instance, table3.ref);\n\n return (\n <Table>\n <Table.Toolbar<TType> table={table3}>\n {table3.meta.editing.isEnabled ? (\n <Editing scrollToIndex={table3.renderer.scrollToIndex} table={table3.instance} />\n ) : null}\n </Table.Toolbar>\n {hasValidationErrors ? (\n <Alert\n className=\"mb-4\"\n scrollToIndex={table3.renderer.scrollToIndex}\n table={table3.instance}\n tableRef={table3.ref}\n />\n ) : null}\n <Table.Grid<TType> {...gridAttributes} data-taco=\"table3\" table={table3} />\n </Table>\n );\n}) as (<TType = unknown>(props: Table3Props<TType> & React.RefAttributes<Table3Ref>) => JSX.Element) & {\n Column: typeof Column;\n Group: typeof Group;\n};\nTable3.Column = Column;\nTable3.Group = Group;\n\nexport type {\n Table3Props,\n Table3Ref,\n Table3ColumnProps,\n Table3GroupProps,\n Table3EditingSaveHandler,\n Table3EditingValidatorFn,\n Table3FeatureProps,\n Table3Texts,\n} from './types';\n"],"names":["Column","_","displayName","Group","Table3","fixedForwardRef","props","ref","table3","useTable3","handleBlur","event","meta","editing","isEditing","gridAttributes","_table3$meta$editing","_table3$meta$editing2","isDetailedMode","undefined","enableHorizontalArrowKeyNavigation","onBlur","hasValidationErrors","hasErrors","instance","React","Table","Toolbar","table","isEnabled","Editing","scrollToIndex","renderer","Alert","className","tableRef","Grid"],"mappings":";;;;;;;AASA,SAASA,MAAMA,CAAkBC,CAA2B;EACxD,OAAO,IAAI;AACf;AACAD,MAAM,CAACE,WAAW,GAAG,cAAc;AAEnC,SAASC,KAAKA,CAACF,CAAmB;EAC9B,OAAO,IAAI;AACf;AACAE,KAAK,CAACD,WAAW,GAAG,aAAa;MAEpBE,MAAM,gBAAGC,eAAe,CAAyB,SAASD,MAAMA,CAAkBE,KAAK,EAAEC,GAAG;;EACrG,MAAMC,MAAM,GAAGC,SAAS,CAAQH,KAAK,EAAEC,GAAG,CAAC;EAE3C,MAAMG,UAAU,GAAIC,KAAyC;IACzD,IAAIH,MAAM,CAACI,IAAI,CAACC,OAAO,CAACC,SAAS,EAAE;MAC/BN,MAAM,CAACI,IAAI,CAACC,OAAO,CAACH,UAAU,CAACC,KAAK,CAAC;;GAE5C;EAED,MAAMI,cAAc,GAAG;IACnB,yBAAyB,EAAE,CAAAC,oBAAA,GAAAR,MAAM,CAACI,IAAI,CAACC,OAAO,cAAAG,oBAAA,eAAnBA,oBAAA,CAAqBF,SAAS,GACnD,CAAAG,qBAAA,GAAAT,MAAM,CAACI,IAAI,CAACC,OAAO,cAAAI,qBAAA,eAAnBA,qBAAA,CAAqBC,cAAc,GAC/B,UAAU,GACV,QAAQ,GACZC,SAAS;IACfC,kCAAkC,EAAEZ,MAAM,CAACI,IAAI,CAACC,OAAO,CAACC,SAAS;IACjEO,MAAM,EAAEX;GACX;EAED,MAAMY,mBAAmB,GAAGd,MAAM,CAACI,IAAI,CAACC,OAAO,CAACU,SAAS,CAACf,MAAM,CAACgB,QAAQ,EAAEhB,MAAM,CAACD,GAAG,CAAC;EAEtF,oBACIkB,6BAACC,KAAK,qBACFD,6BAACC,KAAK,CAACC,OAAO;IAAQC,KAAK,EAAEpB;KACxBA,MAAM,CAACI,IAAI,CAACC,OAAO,CAACgB,SAAS,kBAC1BJ,6BAACK,OAAO;IAACC,aAAa,EAAEvB,MAAM,CAACwB,QAAQ,CAACD,aAAa;IAAEH,KAAK,EAAEpB,MAAM,CAACgB;IAAY,IACjF,IAAI,CACI,EACfF,mBAAmB,kBAChBG,6BAACQ,KAAK;IACFC,SAAS,EAAC,MAAM;IAChBH,aAAa,EAAEvB,MAAM,CAACwB,QAAQ,CAACD,aAAa;IAC5CH,KAAK,EAAEpB,MAAM,CAACgB,QAAQ;IACtBW,QAAQ,EAAE3B,MAAM,CAACD;IACnB,IACF,IAAI,eACRkB,6BAACC,KAAK,CAACU,IAAI,oBAAYrB,cAAc;iBAAY,QAAQ;IAACa,KAAK,EAAEpB;KAAU,CACvE;AAEhB,CAAC;AAIDJ,MAAM,CAACJ,MAAM,GAAGA,MAAM;AACtBI,MAAM,CAACD,KAAK,GAAGA,KAAK;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTableEditing.js","sources":["../../../../../../../../src/components/Table3/features/useTableEditing.ts"],"sourcesContent":["import React from 'react';\nimport { Cell as ReactTableCell, Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { TableEditingSaveHandler, TableEditingValidatorFn } from '../types';\nimport { isElementInsideOrTriggeredFromContainer } from '../../../utils/dom';\nimport { useGlobalKeyDown } from '../../../hooks/useGlobalKeyDown';\nimport { willRowMove } from '../util/editing';\nimport { TableRef } from '../../../primitives/Table/types';\n\nexport function useTableEditing<TType = unknown>(\n isEnabled = false,\n handleSave: TableEditingSaveHandler<TType> | undefined,\n validator: TableEditingValidatorFn<TType> | undefined\n) {\n // used to switch the table into editing mode\n const [isEditing, toggleEditing] = React.useState(false);\n\n // used to switch the editing between \"detailed\" mode\n const [isDetailedMode, toggleDetailedMode] = React.useState(false);\n\n // store the last focused cell, so that up/down arrow key navigation remains in the same column\n const [lastFocusedCellIndex, setLastFocusedCellIndex] = useLastFocusedCellIndex();\n\n // store pending changes for each row\n // changes are saved as soon as the active row changes, so in most cases this will only contain the active row's changes\n // but not always - if validation or server requests fail when saving, those rows remain until the failure is resolved\n const pendingChangesFns = usePendingChanges<TType>(isEnabled, handleSave, validator);\n\n // if focus leaves the table in any way, trigger a save\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLTableElement>) => {\n if (\n event.relatedTarget !== event.currentTarget &&\n !isElementInsideOrTriggeredFromContainer(event.relatedTarget, event.currentTarget)\n ) {\n pendingChangesFns.saveChanges();\n }\n },\n [pendingChangesFns.saveChanges]\n );\n\n // TODO: using useGlobalKeyDown prevents trigger when focused on inputs, but it's more \"proper\"\n useGlobalKeyDown(isEnabled && isEditing ? { key: 's', meta: true, shift: false } : undefined, event => {\n event.preventDefault();\n pendingChangesFns.saveChanges();\n });\n\n return {\n isEnabled,\n isEditing,\n isDetailedMode,\n toggleDetailedMode: isEnabled ? toggleDetailedMode : () => undefined,\n toggleEditing: isEnabled ? toggleEditing : () => undefined,\n lastFocusedCellIndex,\n setLastFocusedCellIndex,\n ...pendingChangesFns,\n handleBlur: isEnabled && isEditing ? handleBlur : () => undefined,\n };\n}\n\ntype SaveState = 'pending' | 'complete';\ntype PendingChange<TType = unknown> = Partial<TType> & {\n _meta: {\n original: TType;\n moveReason: Record<string, 'search' | 'sorting' | 'filter'>;\n errors: {\n row: string;\n cells: Record<string, string>;\n hasShownErrorAlert: boolean;\n };\n status?: SaveState;\n };\n};\n\nfunction usePendingChanges<TType = unknown>(\n isEnabled: boolean,\n handleSave: TableEditingSaveHandler<TType> | undefined,\n validator: TableEditingValidatorFn<TType> | undefined\n) {\n const [pendingChanges, setPendingChanges] = React.useState<Record<string, PendingChange<TType>>>({});\n // we maintain save status as separate state because 'complete' needs to briefly show after pendingChanges are deleted\n const [saveStates, setSaveState] = React.useState<Record<string, SaveState>>({});\n\n function getCellValue<T extends TType>(cell: ReactTableCell<T, unknown>): unknown | undefined {\n return pendingChanges[cell.row.id]?.[cell.column.id];\n }\n\n function getCellError<T extends TType>(cell: ReactTableCell<T, unknown>): string | undefined {\n return pendingChanges[cell.row.id]?._meta.errors?.cells?.[cell.column.id];\n }\n\n const setCellValue = React.useCallback(function <T extends TType>(\n cell: ReactTableCell<T, unknown>,\n change: unknown,\n rowIndex: number\n ) {\n setPendingChanges(currentChanges => {\n const nextChanges = { ...currentChanges };\n const rowChanges = {\n ...currentChanges[cell.row.id],\n _meta: {\n ...currentChanges[cell.row.id]?._meta,\n original: cell.row.original,\n moveReason: {\n ...currentChanges[cell.row.id]?._meta.moveReason,\n },\n errors: {\n ...currentChanges[cell.row.id]?._meta.errors,\n },\n },\n } as PendingChange<T>;\n\n // update if the change is different to the original (saved) value,\n // otherwise remove any change - no point saving the same value\n if (change !== cell.row.original[cell.column.id]) {\n rowChanges[cell.column.id] = change;\n\n // determine if the row will move position based on this change, and save why it will move\n const reason = willRowMove(cell, change, rowIndex);\n\n if (reason) {\n rowChanges._meta.moveReason[cell.column.id] = reason;\n } else {\n delete rowChanges._meta.moveReason[cell.column.id];\n }\n } else {\n delete rowChanges[cell.column.id];\n }\n\n // set the changes for the row...\n // or delete if there are no changes left, so that we don't store changes with unchanged data\n if (Object.keys(rowChanges).filter(k => k !== '_meta').length) {\n nextChanges[cell.row.id] = rowChanges;\n } else {\n delete nextChanges[cell.row.id];\n }\n\n return nextChanges;\n });\n },\n []);\n\n async function validateCell<T extends TType>(cell: ReactTableCell<T, unknown>) {\n if (!validator || !isEnabled) {\n return;\n }\n\n const changeSet = getChangesetFromChanges(pendingChanges[cell.row.id]);\n\n // only validate if the cell being blurred actually has any changes\n if (cell.column.id in changeSet) {\n const errors = ((await validator(changeSet)) ?? {}) as Record<string, string>;\n\n setPendingChanges(currentChanges => {\n const nextChanges = { ...currentChanges };\n nextChanges[cell.row.id]._meta = {\n ...nextChanges[cell.row.id]._meta,\n errors: {\n ...nextChanges[cell.row.id]._meta.errors,\n cells: errors,\n hasShownErrorAlert:\n Object.keys(errors).length && !nextChanges[cell.row.id]._meta.errors.hasShownErrorAlert\n ? false\n : nextChanges[cell.row.id]._meta.errors.hasShownErrorAlert,\n },\n };\n return nextChanges;\n });\n }\n }\n\n function hasRowErrors(rowId: string) {\n if (!isEnabled) {\n return false;\n }\n\n return (\n !!pendingChanges[rowId]?._meta.errors?.row || !!Object.keys(pendingChanges[rowId]?._meta.errors?.cells ?? {}).length\n );\n }\n\n function hasRowErrorsSeen(rowId: string) {\n if (!isEnabled) {\n return false;\n }\n\n return hasRowErrors(rowId) && !!pendingChanges[rowId]._meta.errors?.hasShownErrorAlert;\n }\n\n function setRowErrorsSeen(rowId: string) {\n if (pendingChanges[rowId]._meta.errors?.hasShownErrorAlert === false) {\n setPendingChanges(currentChanges => {\n const nextChanges = { ...currentChanges };\n nextChanges[rowId]._meta.errors = {\n ...nextChanges[rowId]._meta.errors,\n hasShownErrorAlert: true,\n };\n return nextChanges;\n });\n }\n }\n\n function getRowSaveStatus(rowId: string) {\n if (!isEnabled) {\n return false;\n }\n\n return saveStates[rowId];\n }\n\n function setRowSaveStatus(rowId: string, status: 'pending' | 'complete' | undefined) {\n setSaveState(currentStates => {\n const nextStates = { ...currentStates };\n\n if (status) {\n nextStates[rowId] = status;\n } else {\n delete nextStates[rowId];\n }\n\n return nextStates;\n });\n }\n\n function getRowMoveReason(rowId: string) {\n return pendingChanges[rowId]?._meta.moveReason ? Object.values(pendingChanges[rowId]._meta.moveReason)[0] : undefined;\n }\n\n function hasChanges(rowId?: string) {\n if (!isEnabled) {\n return false;\n }\n\n return rowId ? !!pendingChanges[rowId] : !!Object.keys(pendingChanges).length;\n }\n\n function hasErrors<T extends TType>(table: ReactTable<T>, tableRef: React.RefObject<TableRef>) {\n if (!isEnabled) {\n return false;\n }\n\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const focusIsInsideTable = tableRef.current?.contains(document.activeElement);\n\n let activeRow;\n\n if (tableMeta.rowActive.rowActiveIndex !== undefined) {\n activeRow = table.getRowModel().rows[tableMeta.rowActive.rowActiveIndex];\n }\n\n return Object.keys(\n getErrors().filter(error => {\n if (activeRow?.id && focusIsInsideTable) {\n return error.rowId === activeRow?.id ? error.pendingChange._meta.errors.hasShownErrorAlert : true;\n }\n\n return true;\n })\n ).length;\n }\n\n function getErrors<T extends TType>() {\n return Object.keys(pendingChanges)\n .filter(hasRowErrors)\n .map(rowId => ({ rowId, pendingChange: pendingChanges[rowId] as PendingChange<T> }));\n }\n\n function resetChanges(rowId: string) {\n setPendingChanges(currentChanges => {\n const nextChanges = { ...currentChanges };\n delete nextChanges[rowId];\n return nextChanges;\n });\n }\n\n async function saveChanges(rowId: string | undefined = undefined) {\n if (!handleSave) {\n console.warn('Tried to save, but Table has no onSave handler');\n return;\n }\n\n // we save back to pendingChanges, so make a copy of it's state when save was triggered\n const changesToSave = rowId ? { [rowId]: pendingChanges[rowId] } : { ...pendingChanges };\n const changes = Object.keys(changesToSave);\n\n if (changes.length) {\n changes.map(async rowId => {\n const pendingChange = changesToSave[rowId];\n\n const changeSet = getChangesetFromChanges(pendingChange);\n\n try {\n // set saving = true\n setRowSaveStatus(rowId, 'pending');\n\n // re-run validation, maybe a cell is already invalid but has never been blurred\n if (validator) {\n const errors = await validator(changeSet);\n\n if (errors && Object.keys(errors).length) {\n throw errors;\n }\n }\n\n // send new data to the server\n await handleSave(changeSet);\n\n // cleanup changes, we don't need them after saving\n resetChanges(rowId);\n setRowSaveStatus(rowId, 'complete');\n } catch (error) {\n // the onSave handler should throw errors when something fails, e.g. validation, network errors etc\n // this code handles those errors and maps them either to row errors or cell specific errors\n let rowError;\n let cellErrors;\n\n if (typeof error === 'string') {\n rowError = error;\n } else if (error instanceof Error) {\n rowError = error.message;\n\n // most of our apis return error objects within this shape\n if (typeof (error as any).response?.data === 'object') {\n cellErrors = (error as any).response?.data;\n }\n } else if (typeof error === 'object') {\n cellErrors = error;\n }\n\n if (rowError || cellErrors) {\n setPendingChanges(currentChanges => {\n const nextChanges = { ...currentChanges };\n nextChanges[rowId]._meta.errors = {\n row: rowError,\n cells: cellErrors,\n hasShownErrorAlert: nextChanges[rowId]._meta.errors?.hasShownErrorAlert ?? false,\n };\n return nextChanges;\n });\n }\n\n setRowSaveStatus(rowId, undefined);\n }\n });\n }\n }\n\n return {\n getCellValue,\n getCellError,\n setCellValue,\n validateCell,\n hasChanges,\n hasErrors,\n getErrors,\n saveChanges,\n resetChanges,\n hasRowErrors,\n hasRowErrorsSeen,\n setRowErrorsSeen,\n getRowSaveStatus,\n setRowSaveStatus,\n getRowMoveReason,\n };\n}\n\nfunction useLastFocusedCellIndex(): [number | undefined, (index: number | undefined) => void] {\n // store the last focused cell, so that up/down arrow key navigation remains in the same column\n const lastFocusedCellIndexRef = React.useRef<number | undefined>(undefined);\n const setLastFocusedCellIndex = React.useCallback((index: number | undefined) => {\n lastFocusedCellIndexRef.current = index;\n }, []);\n\n return [lastFocusedCellIndexRef.current, setLastFocusedCellIndex];\n}\n\nfunction getChangesetFromChanges<TType = unknown>(changes: PendingChange<TType>): TType {\n // extract the original data from the row changes\n const { _meta, ...changeset } = changes ?? {};\n // and mix them in with the changes, ready to send to the server\n return { ..._meta?.original, ...changeset };\n}\n"],"names":["useTableEditing","isEnabled","handleSave","validator","isEditing","toggleEditing","React","useState","isDetailedMode","toggleDetailedMode","lastFocusedCellIndex","setLastFocusedCellIndex","useLastFocusedCellIndex","pendingChangesFns","usePendingChanges","handleBlur","useCallback","event","relatedTarget","currentTarget","isElementInsideOrTriggeredFromContainer","saveChanges","useGlobalKeyDown","key","meta","shift","undefined","preventDefault","rowId","console","warn","Promise","resolve","changesToSave","pendingChanges","changes","Object","keys","length","map","pendingChange","changeSet","getChangesetFromChanges","_catch","_temp3","_result","_exit","then","resetChanges","setRowSaveStatus","_temp2","errors","error","rowError","cellErrors","Error","_error$response","message","response","data","_error$response2","setPendingChanges","currentChanges","nextChanges","_meta","row","cells","hasShownErrorAlert","_nextChanges$rowId$_m","_nextChanges$rowId$_m2","e","reject","validateCell","cell","id","_temp","column","saveStates","setSaveState","getCellValue","_pendingChanges$cell$","getCellError","_pendingChanges$cell$2","_pendingChanges$cell$3","_pendingChanges$cell$4","setCellValue","change","rowIndex","rowChanges","_currentChanges$cell$","original","moveReason","_currentChanges$cell$2","_currentChanges$cell$3","reason","willRowMove","filter","k","hasRowErrors","_pendingChanges$rowId","_pendingChanges$rowId2","_pendingChanges$rowId3","_pendingChanges$rowId4","_pendingChanges$rowId5","hasRowErrorsSeen","_pendingChanges$rowId6","setRowErrorsSeen","_pendingChanges$rowId7","getRowSaveStatus","status","currentStates","nextStates","getRowMoveReason","_pendingChanges$rowId8","values","hasChanges","hasErrors","table","tableRef","tableMeta","options","focusIsInsideTable","_tableRef$current","current","contains","document","activeElement","activeRow","rowActive","rowActiveIndex","getRowModel","rows","getErrors","_activeRow","_activeRow2","lastFocusedCellIndexRef","useRef","index","changeset"],"mappings":";;;;;;SAQgBA,eAAeA,CAC3BC,SAAS,GAAG,KAAK,EACjBC,UAAsD,EACtDC,SAAqD;;EAGrD,MAAM,CAACC,SAAS,EAAEC,aAAa,CAAC,GAAGC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;;EAGxD,MAAM,CAACC,cAAc,EAAEC,kBAAkB,CAAC,GAAGH,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;;EAGlE,MAAM,CAACG,oBAAoB,EAAEC,uBAAuB,CAAC,GAAGC,uBAAuB,EAAE;;;;EAKjF,MAAMC,iBAAiB,GAAGC,iBAAiB,CAAQb,SAAS,EAAEC,UAAU,EAAEC,SAAS,CAAC;;EAGpF,MAAMY,UAAU,GAAGT,cAAK,CAACU,WAAW,CAC/BC,KAAyC;IACtC,IACIA,KAAK,CAACC,aAAa,KAAKD,KAAK,CAACE,aAAa,IAC3C,CAACC,uCAAuC,CAACH,KAAK,CAACC,aAAa,EAAED,KAAK,CAACE,aAAa,CAAC,EACpF;MACEN,iBAAiB,CAACQ,WAAW,EAAE;;GAEtC,EACD,CAACR,iBAAiB,CAACQ,WAAW,CAAC,CAClC;;EAGDC,gBAAgB,CAACrB,SAAS,I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AAS8F,SAASA;IACd,OAAOhG,MAAM,CAACC,IAAI,CAACH,cAAc,CAAC,CAC7B8D,MAAM,CAACE,YAAY,CAAC,CACpB3D,GAAG,CAACX,KAAK,KAAK;MAAEA,KAAK;MAAEY,aAAa,EAAEN,cAAc,CAACN,KAAK;KAAuB,CAAC,CAAC;;EAG5F,SAASoB,YAAYA,CAACpB,KAAa;IAC/BiC,iBAAiB,CAACC,cAAc;MAC5B,MAAMC,WAAW,GAAG;QAAE,GAAGD;OAAgB;MACzC,OAAOC,WAAW,CAACnC,KAAK,CAAC;MACzB,OAAOmC,WAAW;KACrB,CAAC;;EA2EN,OAAO;IACHgB,YAAY;IACZE,YAAY;IACZI,YAAY;IACZb,YAAY;IACZ2C,UAAU;IACVC,SAAS;IACTgB,SAAS;IACT/G,WAAW;IACX2B,YAAY;IACZkD,YAAY;IACZM,gBAAgB;IAChBE,gBAAgB;IAChBE,gBAAgB;IAChB3D,gBAAgB;IAChB+D;GACH;AACL;AAEA,SAASpG,uBAAuBA;;EAE5B,MAAM2H,uBAAuB,GAAGjI,cAAK,CAACkI,MAAM,CAAqB9G,SAAS,CAAC;EAC3E,MAAMf,uBAAuB,GAAGL,cAAK,CAACU,WAAW,CAAEyH,KAAyB;IACxEF,uBAAuB,CAACZ,OAAO,GAAGc,KAAK;GAC1C,EAAE,EAAE,CAAC;EAEN,OAAO,CAACF,uBAAuB,CAACZ,OAAO,EAAEhH,uBAAuB,CAAC;AACrE;AAEA,SAAS+B,uBAAuBA,CAAkBP,OAA6B;;EAE3E,MAAM;IAAE6B,KAAK;IAAE,GAAG0E;GAAW,GAAGvG,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAI,EAAE;;EAE7C,OAAO;IAAE,IAAG6B,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAE0B,QAAQ;IAAE,GAAGgD;GAAW;AAC/C;;;;"}
1
+ {"version":3,"file":"useTableEditing.js","sources":["../../../../../../../../src/components/Table3/features/useTableEditing.ts"],"sourcesContent":["import React from 'react';\nimport { Cell as ReactTableCell, Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { Table3EditingSaveHandler, Table3EditingValidatorFn } from '../types';\nimport { isElementInsideOrTriggeredFromContainer } from '../../../utils/dom';\nimport { useGlobalKeyDown } from '../../../hooks/useGlobalKeyDown';\nimport { willRowMove } from '../util/editing';\nimport { TableRef } from '../../../primitives/Table/types';\n\nexport function useTableEditing<TType = unknown>(\n isEnabled = false,\n handleSave: Table3EditingSaveHandler<TType> | undefined,\n validator: Table3EditingValidatorFn<TType> | undefined\n) {\n // used to switch the table into editing mode\n const [isEditing, toggleEditing] = React.useState(false);\n\n // used to switch the editing between \"detailed\" mode\n const [isDetailedMode, toggleDetailedMode] = React.useState(false);\n\n // store the last focused cell, so that up/down arrow key navigation remains in the same column\n const [lastFocusedCellIndex, setLastFocusedCellIndex] = useLastFocusedCellIndex();\n\n // store pending changes for each row\n // changes are saved as soon as the active row changes, so in most cases this will only contain the active row's changes\n // but not always - if validation or server requests fail when saving, those rows remain until the failure is resolved\n const pendingChangesFns = usePendingChanges<TType>(isEnabled, handleSave, validator);\n\n // if focus leaves the table in any way, trigger a save\n const handleBlur = React.useCallback(\n (event: React.FocusEvent<HTMLTableElement>) => {\n if (\n event.relatedTarget !== event.currentTarget &&\n !isElementInsideOrTriggeredFromContainer(event.relatedTarget, event.currentTarget)\n ) {\n pendingChangesFns.saveChanges();\n }\n },\n [pendingChangesFns.saveChanges]\n );\n\n // TODO: using useGlobalKeyDown prevents trigger when focused on inputs, but it's more \"proper\"\n useGlobalKeyDown(isEnabled && isEditing ? { key: 's', meta: true, shift: false } : undefined, event => {\n event.preventDefault();\n pendingChangesFns.saveChanges();\n });\n\n return {\n isEnabled,\n isEditing,\n isDetailedMode,\n toggleDetailedMode: isEnabled ? toggleDetailedMode : () => undefined,\n toggleEditing: isEnabled ? toggleEditing : () => undefined,\n lastFocusedCellIndex,\n setLastFocusedCellIndex,\n ...pendingChangesFns,\n handleBlur: isEnabled && isEditing ? handleBlur : () => undefined,\n };\n}\n\ntype SaveState = 'pending' | 'complete';\ntype PendingChange<TType = unknown> = Partial<TType> & {\n _meta: {\n original: TType;\n moveReason: Record<string, 'search' | 'sorting' | 'filter'>;\n errors: {\n row: string;\n cells: Record<string, string>;\n hasShownErrorAlert: boolean;\n };\n status?: SaveState;\n };\n};\n\nfunction usePendingChanges<TType = unknown>(\n isEnabled: boolean,\n handleSave: Table3EditingSaveHandler<TType> | undefined,\n validator: Table3EditingValidatorFn<TType> | undefined\n) {\n const [pendingChanges, setPendingChanges] = React.useState<Record<string, PendingChange<TType>>>({});\n // we maintain save status as separate state because 'complete' needs to briefly show after pendingChanges are deleted\n const [saveStates, setSaveState] = React.useState<Record<string, SaveState>>({});\n\n function getCellValue<T extends TType>(cell: ReactTableCell<T, unknown>): unknown | undefined {\n return pendingChanges[cell.row.id]?.[cell.column.id];\n }\n\n function getCellError<T extends TType>(cell: ReactTableCell<T, unknown>): string | undefined {\n return pendingChanges[cell.row.id]?._meta.errors?.cells?.[cell.column.id];\n }\n\n const setCellValue = React.useCallback(function <T extends TType>(\n cell: ReactTableCell<T, unknown>,\n change: unknown,\n rowIndex: number\n ) {\n setPendingChanges(currentChanges => {\n const nextChanges = { ...currentChanges };\n const rowChanges = {\n ...currentChanges[cell.row.id],\n _meta: {\n ...currentChanges[cell.row.id]?._meta,\n original: cell.row.original,\n moveReason: {\n ...currentChanges[cell.row.id]?._meta.moveReason,\n },\n errors: {\n ...currentChanges[cell.row.id]?._meta.errors,\n },\n },\n } as PendingChange<T>;\n\n // update if the change is different to the original (saved) value,\n // otherwise remove any change - no point saving the same value\n if (change !== cell.row.original[cell.column.id]) {\n rowChanges[cell.column.id] = change;\n\n // determine if the row will move position based on this change, and save why it will move\n const reason = willRowMove(cell, change, rowIndex);\n\n if (reason) {\n rowChanges._meta.moveReason[cell.column.id] = reason;\n } else {\n delete rowChanges._meta.moveReason[cell.column.id];\n }\n } else {\n delete rowChanges[cell.column.id];\n }\n\n // set the changes for the row...\n // or delete if there are no changes left, so that we don't store changes with unchanged data\n if (Object.keys(rowChanges).filter(k => k !== '_meta').length) {\n nextChanges[cell.row.id] = rowChanges;\n } else {\n delete nextChanges[cell.row.id];\n }\n\n return nextChanges;\n });\n },\n []);\n\n async function validateCell<T extends TType>(cell: ReactTableCell<T, unknown>) {\n if (!validator || !isEnabled) {\n return;\n }\n\n const changeSet = getChangesetFromChanges(pendingChanges[cell.row.id]);\n\n // only validate if the cell being blurred actually has any changes\n if (cell.column.id in changeSet) {\n const errors = ((await validator(changeSet)) ?? {}) as Record<string, string>;\n\n setPendingChanges(currentChanges => {\n const nextChanges = { ...currentChanges };\n nextChanges[cell.row.id]._meta = {\n ...nextChanges[cell.row.id]._meta,\n errors: {\n ...nextChanges[cell.row.id]._meta.errors,\n cells: errors,\n hasShownErrorAlert:\n Object.keys(errors).length && !nextChanges[cell.row.id]._meta.errors.hasShownErrorAlert\n ? false\n : nextChanges[cell.row.id]._meta.errors.hasShownErrorAlert,\n },\n };\n return nextChanges;\n });\n }\n }\n\n function hasRowErrors(rowId: string) {\n if (!isEnabled) {\n return false;\n }\n\n return (\n !!pendingChanges[rowId]?._meta.errors?.row || !!Object.keys(pendingChanges[rowId]?._meta.errors?.cells ?? {}).length\n );\n }\n\n function hasRowErrorsSeen(rowId: string) {\n if (!isEnabled) {\n return false;\n }\n\n return hasRowErrors(rowId) && !!pendingChanges[rowId]._meta.errors?.hasShownErrorAlert;\n }\n\n function setRowErrorsSeen(rowId: string) {\n if (pendingChanges[rowId]._meta.errors?.hasShownErrorAlert === false) {\n setPendingChanges(currentChanges => {\n const nextChanges = { ...currentChanges };\n nextChanges[rowId]._meta.errors = {\n ...nextChanges[rowId]._meta.errors,\n hasShownErrorAlert: true,\n };\n return nextChanges;\n });\n }\n }\n\n function getRowSaveStatus(rowId: string) {\n if (!isEnabled) {\n return false;\n }\n\n return saveStates[rowId];\n }\n\n function setRowSaveStatus(rowId: string, status: 'pending' | 'complete' | undefined) {\n setSaveState(currentStates => {\n const nextStates = { ...currentStates };\n\n if (status) {\n nextStates[rowId] = status;\n } else {\n delete nextStates[rowId];\n }\n\n return nextStates;\n });\n }\n\n function getRowMoveReason(rowId: string) {\n return pendingChanges[rowId]?._meta.moveReason ? Object.values(pendingChanges[rowId]._meta.moveReason)[0] : undefined;\n }\n\n function hasChanges(rowId?: string) {\n if (!isEnabled) {\n return false;\n }\n\n return rowId ? !!pendingChanges[rowId] : !!Object.keys(pendingChanges).length;\n }\n\n function hasErrors<T extends TType>(table: ReactTable<T>, tableRef: React.RefObject<TableRef>) {\n if (!isEnabled) {\n return false;\n }\n\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const focusIsInsideTable = tableRef.current?.contains(document.activeElement);\n\n let activeRow;\n\n if (tableMeta.rowActive.rowActiveIndex !== undefined) {\n activeRow = table.getRowModel().rows[tableMeta.rowActive.rowActiveIndex];\n }\n\n return Object.keys(\n getErrors().filter(error => {\n if (activeRow?.id && focusIsInsideTable) {\n return error.rowId === activeRow?.id ? error.pendingChange._meta.errors.hasShownErrorAlert : true;\n }\n\n return true;\n })\n ).length;\n }\n\n function getErrors<T extends TType>() {\n return Object.keys(pendingChanges)\n .filter(hasRowErrors)\n .map(rowId => ({ rowId, pendingChange: pendingChanges[rowId] as PendingChange<T> }));\n }\n\n function resetChanges(rowId: string) {\n setPendingChanges(currentChanges => {\n const nextChanges = { ...currentChanges };\n delete nextChanges[rowId];\n return nextChanges;\n });\n }\n\n async function saveChanges(rowId: string | undefined = undefined) {\n if (!handleSave) {\n console.warn('Tried to save, but Table has no onSave handler');\n return;\n }\n\n // we save back to pendingChanges, so make a copy of it's state when save was triggered\n const changesToSave = rowId ? { [rowId]: pendingChanges[rowId] } : { ...pendingChanges };\n const changes = Object.keys(changesToSave);\n\n if (changes.length) {\n changes.map(async rowId => {\n const pendingChange = changesToSave[rowId];\n\n const changeSet = getChangesetFromChanges(pendingChange);\n\n try {\n // set saving = true\n setRowSaveStatus(rowId, 'pending');\n\n // re-run validation, maybe a cell is already invalid but has never been blurred\n if (validator) {\n const errors = await validator(changeSet);\n\n if (errors && Object.keys(errors).length) {\n throw errors;\n }\n }\n\n // send new data to the server\n await handleSave(changeSet);\n\n // cleanup changes, we don't need them after saving\n resetChanges(rowId);\n setRowSaveStatus(rowId, 'complete');\n } catch (error) {\n // the onSave handler should throw errors when something fails, e.g. validation, network errors etc\n // this code handles those errors and maps them either to row errors or cell specific errors\n let rowError;\n let cellErrors;\n\n if (typeof error === 'string') {\n rowError = error;\n } else if (error instanceof Error) {\n rowError = error.message;\n\n // most of our apis return error objects within this shape\n if (typeof (error as any).response?.data === 'object') {\n cellErrors = (error as any).response?.data;\n }\n } else if (typeof error === 'object') {\n cellErrors = error;\n }\n\n if (rowError || cellErrors) {\n setPendingChanges(currentChanges => {\n const nextChanges = { ...currentChanges };\n nextChanges[rowId]._meta.errors = {\n row: rowError,\n cells: cellErrors,\n hasShownErrorAlert: nextChanges[rowId]._meta.errors?.hasShownErrorAlert ?? false,\n };\n return nextChanges;\n });\n }\n\n setRowSaveStatus(rowId, undefined);\n }\n });\n }\n }\n\n return {\n getCellValue,\n getCellError,\n setCellValue,\n validateCell,\n hasChanges,\n hasErrors,\n getErrors,\n saveChanges,\n resetChanges,\n hasRowErrors,\n hasRowErrorsSeen,\n setRowErrorsSeen,\n getRowSaveStatus,\n setRowSaveStatus,\n getRowMoveReason,\n };\n}\n\nfunction useLastFocusedCellIndex(): [number | undefined, (index: number | undefined) => void] {\n // store the last focused cell, so that up/down arrow key navigation remains in the same column\n const lastFocusedCellIndexRef = React.useRef<number | undefined>(undefined);\n const setLastFocusedCellIndex = React.useCallback((index: number | undefined) => {\n lastFocusedCellIndexRef.current = index;\n }, []);\n\n return [lastFocusedCellIndexRef.current, setLastFocusedCellIndex];\n}\n\nfunction getChangesetFromChanges<TType = unknown>(changes: PendingChange<TType>): TType {\n // extract the original data from the row changes\n const { _meta, ...changeset } = changes ?? {};\n // and mix them in with the changes, ready to send to the server\n return { ..._meta?.original, ...changeset };\n}\n"],"names":["useTableEditing","isEnabled","handleSave","validator","isEditing","toggleEditing","React","useState","isDetailedMode","toggleDetailedMode","lastFocusedCellIndex","setLastFocusedCellIndex","useLastFocusedCellIndex","pendingChangesFns","usePendingChanges","handleBlur","useCallback","event","relatedTarget","currentTarget","isElementInsideOrTriggeredFromContainer","saveChanges","useGlobalKeyDown","key","meta","shift","undefined","preventDefault","rowId","console","warn","Promise","resolve","changesToSave","pendingChanges","changes","Object","keys","length","map","pendingChange","changeSet","getChangesetFromChanges","_catch","_temp3","_result","_exit","then","resetChanges","setRowSaveStatus","_temp2","errors","error","rowError","cellErrors","Error","_error$response","message","response","data","_error$response2","setPendingChanges","currentChanges","nextChanges","_meta","row","cells","hasShownErrorAlert","_nextChanges$rowId$_m","_nextChanges$rowId$_m2","e","reject","validateCell","cell","id","_temp","column","saveStates","setSaveState","getCellValue","_pendingChanges$cell$","getCellError","_pendingChanges$cell$2","_pendingChanges$cell$3","_pendingChanges$cell$4","setCellValue","change","rowIndex","rowChanges","_currentChanges$cell$","original","moveReason","_currentChanges$cell$2","_currentChanges$cell$3","reason","willRowMove","filter","k","hasRowErrors","_pendingChanges$rowId","_pendingChanges$rowId2","_pendingChanges$rowId3","_pendingChanges$rowId4","_pendingChanges$rowId5","hasRowErrorsSeen","_pendingChanges$rowId6","setRowErrorsSeen","_pendingChanges$rowId7","getRowSaveStatus","status","currentStates","nextStates","getRowMoveReason","_pendingChanges$rowId8","values","hasChanges","hasErrors","table","tableRef","tableMeta","options","focusIsInsideTable","_tableRef$current","current","contains","document","activeElement","activeRow","rowActive","rowActiveIndex","getRowModel","rows","getErrors","_activeRow","_activeRow2","lastFocusedCellIndexRef","useRef","index","changeset"],"mappings":";;;;;;SAQgBA,eAAeA,CAC3BC,SAAS,GAAG,KAAK,EACjBC,UAAuD,EACvDC,SAAsD;;EAGtD,MAAM,CAACC,SAAS,EAAEC,aAAa,CAAC,GAAGC,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AuBA;;EAE5B,MAAM2H,uBAAuB,GAAGjI,cAAK,CAACkI,MAAM,CAAqB9G,SAAS,CAAC;EAC3E,MAAMf,uBAAuB,GAAGL,cAAK,CAACU,WAAW,CAAEyH,KAAyB;IACxEF,uBAAuB,CAACZ,OAAO,GAAGc,KAAK;GAC1C,EAAE,EAAE,CAAC;EAEN,OAAO,CAACF,uBAAuB,CAACZ,OAAO,EAAEhH,uBAAuB,CAAC;AACrE;AAEA,SAAS+B,uBAAuBA,CAAkBP,OAA6B;;EAE3E,MAAM;IAAE6B,KAAK;IAAE,GAAG0E;GAAW,GAAGvG,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAI,EAAE;;EAE7C,OAAO;IAAE,IAAG6B,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAE0B,QAAQ;IAAE,GAAGgD;GAAW;AAC/C;;;;"}
@@ -29,6 +29,11 @@ function useTable3(props, ref) {
29
29
  const table = useTable(extendedProps, ref, RENDERERS, meta);
30
30
  // listeners
31
31
  useTableEditingListener(table.instance);
32
+ React__default.useEffect(() => {
33
+ if (table.ref.current) {
34
+ table.ref.current.instance.toggleEditing = enabled => table.meta.editing.toggleEditing(enabled !== null && enabled !== void 0 ? enabled : editing => !editing);
35
+ }
36
+ }, [table.ref.current]);
32
37
  return table;
33
38
  }
34
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"useTable3.js","sources":["../../../../../../../src/components/Table3/useTable3.tsx"],"sourcesContent":["import React from 'react';\nimport { RowData } from '@tanstack/react-table';\nimport { TableRef } from '../../primitives/Table/types';\nimport { useTable } from '../../primitives/Table/Core/useTable';\nimport { useTableEditingListener } from './listeners/useTableEditingListener';\nimport { useTableEditing } from './features/useTableEditing';\nimport { Table3Props } from './types';\nimport { TableRowActionRenderer } from '../../primitives/Table/types';\nimport { Cell } from './components/Columns/Cell/Cell';\nimport { EditingActionMenu } from './components/Columns/Internal/EditingActionsMenu';\nimport { Row } from './components/Row/Row';\n\nconst RENDERERS = {\n row: Row,\n cell: Cell,\n};\n\ndeclare module '@tanstack/table-core' {\n interface TableMeta<TData extends RowData> {\n editing: ReturnType<typeof useTableEditing>;\n }\n}\n\ntype Table3Meta = {\n editing: ReturnType<typeof useTableEditing>;\n};\n\nexport function useTable3<TType>(props: Table3Props<TType>, ref: React.Ref<TableRef>) {\n const editing = useTableEditing(props.enableEditing, props.onSave, props.validator);\n const extendedProps: Table3Props<TType> = {\n ...props,\n enableRowActions: editing.isEditing ? true : props.enableRowActions,\n rowActions: editing.isEditing\n ? ([\n (_, rowId) => (\n <EditingActionMenu\n hasChanges={editing.hasChanges(rowId)}\n hasErrors={editing.hasRowErrors(rowId)}\n onClear={() => editing.resetChanges(rowId)}\n onSave={() => editing.saveChanges(rowId)}\n onExit={() => editing.toggleEditing(false)}\n />\n ),\n ] as TableRowActionRenderer<TType>[])\n : props.rowActions,\n };\n const meta = { editing };\n const table = useTable<TType, Table3Meta>(extendedProps, ref, RENDERERS, meta);\n\n // listeners\n useTableEditingListener<TType>(table.instance);\n\n return table;\n}\n"],"names":["RENDERERS","row","Row","cell","Cell","useTable3","props","ref","editing","useTableEditing","enableEditing","onSave","validator","extendedProps","enableRowActions","isEditing","rowActions","_","rowId","React","EditingActionMenu","hasChanges","hasErrors","hasRowErrors","onClear","resetChanges","saveChanges","onExit","toggleEditing","meta","table","useTable","useTableEditingListener","instance"],"mappings":";;;;;;;;AAYA,MAAMA,SAAS,GAAG;EACdC,GAAG,EAAEC,GAAG;EACRC,IAAI,EAAEC;CACT;SAYeC,SAASA,CAAQC,KAAyB,EAAEC,GAAwB;EAChF,MAAMC,OAAO,GAAGC,eAAe,CAACH,KAAK,CAACI,aAAa,EAAEJ,KAAK,CAACK,MAAM,EAAEL,KAAK,CAACM,SAAS,CAAC;EACnF,MAAMC,aAAa,GAAuB;IACtC,GAAGP,KAAK;IACRQ,gBAAgB,EAAEN,OAAO,CAACO,SAAS,GAAG,IAAI,GAAGT,KAAK,CAACQ,gBAAgB;IACnEE,UAAU,EAAER,OAAO,CAACO,SAAS,GACtB,CACG,CAACE,CAAC,EAAEC,KAAK,oBACLC,6BAACC,iBAAiB;MACdC,UAAU,EAAEb,OAAO,CAACa,UAAU,CAACH,KAAK,CAAC;MACrCI,SAAS,EAAEd,OAAO,CAACe,YAAY,CAACL,KAAK,CAAC;MACtCM,OAAO,EAAEA,MAAMhB,OAAO,CAACiB,YAAY,CAACP,KAAK,CAAC;MAC1CP,MAAM,EAAEA,MAAMH,OAAO,CAACkB,WAAW,CAACR,KAAK,CAAC;MACxCS,MAAM,EAAEA,MAAMnB,OAAO,CAACoB,aAAa,CAAC,KAAK;MAC3C,CACL,CACgC,GACrCtB,KAAK,CAACU;GACf;EACD,MAAMa,IAAI,GAAG;IAAErB;GAAS;EACxB,MAAMsB,KAAK,GAAGC,QAAQ,CAAoBlB,aAAa,EAAEN,GAAG,EAAEP,SAAS,EAAE6B,IAAI,CAAC;;EAG9EG,uBAAuB,CAAQF,KAAK,CAACG,QAAQ,CAAC;EAE9C,OAAOH,KAAK;AAChB;;;;"}
1
+ {"version":3,"file":"useTable3.js","sources":["../../../../../../../src/components/Table3/useTable3.tsx"],"sourcesContent":["import React from 'react';\nimport { RowData } from '@tanstack/react-table';\nimport { useTable } from '../../primitives/Table/Core/useTable';\nimport { useTableEditingListener } from './listeners/useTableEditingListener';\nimport { useTableEditing } from './features/useTableEditing';\nimport { Table3Props, Table3Ref } from './types';\nimport { TableRowActionRenderer } from '../../primitives/Table/types';\nimport { Cell } from './components/Columns/Cell/Cell';\nimport { EditingActionMenu } from './components/Columns/Internal/EditingActionsMenu';\nimport { Row } from './components/Row/Row';\n\nconst RENDERERS = {\n row: Row,\n cell: Cell,\n};\n\ndeclare module '@tanstack/table-core' {\n interface TableMeta<TData extends RowData> {\n editing: ReturnType<typeof useTableEditing>;\n }\n}\n\ntype Table3Meta = {\n editing: ReturnType<typeof useTableEditing>;\n};\n\nexport function useTable3<TType>(props: Table3Props<TType>, ref: React.Ref<Table3Ref>) {\n const editing = useTableEditing(props.enableEditing, props.onSave, props.validator);\n const extendedProps: Table3Props<TType> = {\n ...props,\n enableRowActions: editing.isEditing ? true : props.enableRowActions,\n rowActions: editing.isEditing\n ? ([\n (_, rowId) => (\n <EditingActionMenu\n hasChanges={editing.hasChanges(rowId)}\n hasErrors={editing.hasRowErrors(rowId)}\n onClear={() => editing.resetChanges(rowId)}\n onSave={() => editing.saveChanges(rowId)}\n onExit={() => editing.toggleEditing(false)}\n />\n ),\n ] as TableRowActionRenderer<TType>[])\n : props.rowActions,\n };\n const meta = { editing };\n const table = useTable<TType, Table3Meta>(extendedProps, ref, RENDERERS, meta);\n\n // listeners\n useTableEditingListener<TType>(table.instance);\n\n React.useEffect(() => {\n if (table.ref.current) {\n (table.ref.current as Table3Ref).instance.toggleEditing = (enabled: boolean | undefined) =>\n table.meta.editing.toggleEditing(enabled ?? (editing => !editing));\n }\n }, [table.ref.current]);\n\n return table;\n}\n"],"names":["RENDERERS","row","Row","cell","Cell","useTable3","props","ref","editing","useTableEditing","enableEditing","onSave","validator","extendedProps","enableRowActions","isEditing","rowActions","_","rowId","React","EditingActionMenu","hasChanges","hasErrors","hasRowErrors","onClear","resetChanges","saveChanges","onExit","toggleEditing","meta","table","useTable","useTableEditingListener","instance","useEffect","current","enabled"],"mappings":";;;;;;;;AAWA,MAAMA,SAAS,GAAG;EACdC,GAAG,EAAEC,GAAG;EACRC,IAAI,EAAEC;CACT;SAYeC,SAASA,CAAQC,KAAyB,EAAEC,GAAyB;EACjF,MAAMC,OAAO,GAAGC,eAAe,CAACH,KAAK,CAACI,aAAa,EAAEJ,KAAK,CAACK,MAAM,EAAEL,KAAK,CAACM,SAAS,CAAC;EACnF,MAAMC,aAAa,GAAuB;IACtC,GAAGP,KAAK;IACRQ,gBAAgB,EAAEN,OAAO,CAACO,SAAS,GAAG,IAAI,GAAGT,KAAK,CAACQ,gBAAgB;IACnEE,UAAU,EAAER,OAAO,CAACO,SAAS,GACtB,CACG,CAACE,CAAC,EAAEC,KAAK,oBACLC,6BAACC,iBAAiB;MACdC,UAAU,EAAEb,OAAO,CAACa,UAAU,CAACH,KAAK,CAAC;MACrCI,SAAS,EAAEd,OAAO,CAACe,YAAY,CAACL,KAAK,CAAC;MACtCM,OAAO,EAAEA,MAAMhB,OAAO,CAACiB,YAAY,CAACP,KAAK,CAAC;MAC1CP,MAAM,EAAEA,MAAMH,OAAO,CAACkB,WAAW,CAACR,KAAK,CAAC;MACxCS,MAAM,EAAEA,MAAMnB,OAAO,CAACoB,aAAa,CAAC,KAAK;MAC3C,CACL,CACgC,GACrCtB,KAAK,CAACU;GACf;EACD,MAAMa,IAAI,GAAG;IAAErB;GAAS;EACxB,MAAMsB,KAAK,GAAGC,QAAQ,CAAoBlB,aAAa,EAAEN,GAAG,EAAEP,SAAS,EAAE6B,IAAI,CAAC;;EAG9EG,uBAAuB,CAAQF,KAAK,CAACG,QAAQ,CAAC;EAE9Cd,cAAK,CAACe,SAAS,CAAC;IACZ,IAAIJ,KAAK,CAACvB,GAAG,CAAC4B,OAAO,EAAE;MAClBL,KAAK,CAACvB,GAAG,CAAC4B,OAAqB,CAACF,QAAQ,CAACL,aAAa,GAAIQ,OAA4B,IACnFN,KAAK,CAACD,IAAI,CAACrB,OAAO,CAACoB,aAAa,CAACQ,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAK5B,OAAO,IAAI,CAACA,OAAQ,CAAC;;GAE7E,EAAE,CAACsB,KAAK,CAACvB,GAAG,CAAC4B,OAAO,CAAC,CAAC;EAEvB,OAAOL,KAAK;AAChB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sources":["../../../../../../../../src/primitives/Table/Core/Table.tsx"],"sourcesContent":["import React from 'react';\nimport { FocusScope } from '@react-aria/focus';\nimport { Header } from './components/Header/Header';\nimport { Body } from './components/Body/Body';\nimport { Footer } from './components/Footer/Footer';\nimport { EmptyStateBody } from './components/Body/EmptyStateBody';\nimport { useTable } from './useTable';\nimport { TableToolbar } from './components/Toolbar/Toolbar';\nimport './style.css';\n\ntype TableProps = {\n children: JSX.Element | Array<JSX.Element | null>;\n};\n\nexport function Table(props: TableProps) {\n return <>{props.children}</>;\n}\nTable.Toolbar = TableToolbar;\nTable.Grid = TableGrid;\n\nexport type TableGridProps = React.TableHTMLAttributes<HTMLTableElement> & {\n 'data-taco': string;\n enableHorizontalArrowKeyNavigation?: boolean;\n table: ReturnType<typeof useTable>;\n};\n\nexport function TableGrid(props: TableGridProps) {\n const { enableHorizontalArrowKeyNavigation, table, ...attributes } = props;\n const handleFocus =\n table.meta.rowActive.rowActiveIndex === undefined\n ? (event: React.FocusEvent) => {\n table.meta.rowActive.handleFocus(event, table.meta.length, table.renderer.scrollToIndex);\n }\n : undefined;\n\n return (\n <>\n {table.stylesheet}\n <FocusScope>\n <table\n {...attributes}\n id={table.id}\n data-table-font-size={table.meta.fontSize.size}\n data-table-horizontally-scrolled={table.meta.columnFreezing.isHorizontallyScrolled ? true : undefined}\n data-table-pause-hover={table.meta.rowActive.isHoverStatePaused ? true : undefined}\n data-table-resizing={table.state.columnSizingInfo.isResizingColumn ? true : undefined}\n data-table-row-height={table.meta.rowHeight.height}\n data-table-grouped={!!table.state.grouping?.length}\n onFocus={handleFocus}\n onScroll={table.meta.columnFreezing.handleScroll}\n ref={table.ref}\n tabIndex={-1}>\n <thead>\n {table.instance.getHeaderGroups().map(headerGroup => (\n <tr key={headerGroup.id}>\n {headerGroup.headers.map(props => (\n <Header key={props.id} header={props} scrollToIndex={table.renderer.scrollToIndex} />\n ))}\n </tr>\n ))}\n </thead>\n {table.renderer.rows?.length ? (\n <>\n <Body\n enableHorizontalArrowKeyNavigation={enableHorizontalArrowKeyNavigation}\n table={table.instance}\n style={table.renderer.style}>\n {table.renderer.rows}\n </Body>\n {table.meta.footer.isEnabled ? (\n <tfoot>\n <tr>{table.instance.getFooterGroups()[0].headers.map(Footer)}</tr>\n </tfoot>\n ) : null}\n </>\n ) : (\n <EmptyStateBody emptyState={table.props.emptyState} />\n )}\n </table>\n </FocusScope>\n </>\n );\n}\n"],"names":["Table","props","React","children","Toolbar","TableToolbar","Grid","TableGrid","enableHorizontalArrowKeyNavigation","table","attributes","handleFocus","meta","rowActive","rowActiveIndex","undefined","event","length","renderer","scrollToIndex","stylesheet","FocusScope","id","fontSize","size","columnFreezing","isHorizontallyScrolled","isHoverStatePaused","state","columnSizingInfo","isResizingColumn","rowHeight","height","_table$state$grouping","grouping","onFocus","onScroll","handleScroll","ref","tabIndex","instance","getHeaderGroups","map","headerGroup","key","headers","Header","header","_table$renderer$rows","rows","Body","style","footer","isEnabled","getFooterGroups","Footer","EmptyStateBody","emptyState"],"mappings":";;;;;;;;SAcgBA,KAAKA,CAACC,KAAiB;EACnC,oBAAOC,4DAAGD,KAAK,CAACE,QAAQ,CAAI;AAChC;AACAH,KAAK,CAACI,OAAO,GAAGC,YAAY;AAC5BL,KAAK,CAACM,IAAI,GAAGC,SAAS;SAQNA,SAASA,CAACN,KAAqB;;EAC3C,MAAM;IAAEO,kCAAkC;IAAEC,KAAK;IAAE,GAAGC;GAAY,GAAGT,KAAK;EAC1E,MAAMU,WAAW,GACbF,KAAK,CAACG,IAAI,CAACC,SAAS,CAACC,cAAc,KAAKC,SAAS,GAC1CC,KAAuB;IACpBP,KAAK,CAACG,IAAI,CAACC,SAAS,CAACF,WAAW,CAACK,KAAK,EAAEP,KAAK,CAACG,IAAI,CAACK,MAAM,EAAER,KAAK,CAACS,QAAQ,CAACC,aAAa,CAAC;GAC3F,GACDJ,SAAS;EAEnB,oBACIb,4DACKO,KAAK,CAACW,UAAU,eACjBlB,6BAACmB,UAAU,qBACPnB,wDACQQ,UAAU;IACdY,EAAE,EAAEb,KAAK,CAACa,EAAE;4BACUb,KAAK,CAACG,IAAI,CAACW,QAAQ,CAACC,IAAI;wCACZf,KAAK,CAACG,IAAI,CAACa,cAAc,CAACC,sBAAsB,GAAG,IAAI,GAAGX,SAAS;8BAC7EN,KAAK,CAACG,IAAI,CAACC,SAAS,CA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,CAAC,CAAC,CAACT,OAAO,CAACH,GAAG,CAACa,MAAM,CAAC,CAAM,CAC9D,IACR,IAAI,CACT,mBAEHrD,6BAACsD,cAAc;IAACC,UAAU,EAAEhD,KAAK,CAACR,KAAK,CAACwD;IAAc,CACzD,CACG,CACC,CACd;AAEX;;;;"}
1
+ {"version":3,"file":"Table.js","sources":["../../../../../../../../src/primitives/Table/Core/Table.tsx"],"sourcesContent":["import React from 'react';\nimport { FocusScope } from '@react-aria/focus';\nimport { Header } from './components/Header/Header';\nimport { Body } from './components/Body/Body';\nimport { Footer } from './components/Footer/Footer';\nimport { EmptyStateBody } from './components/Body/EmptyStateBody';\nimport { useTableReturnValue } from './useTable';\nimport { TableToolbar } from './components/Toolbar/Toolbar';\nimport './style.css';\n\ntype TableProps = {\n children: JSX.Element | Array<JSX.Element | null>;\n};\n\nexport function Table(props: TableProps) {\n return <>{props.children}</>;\n}\nTable.Toolbar = TableToolbar;\nTable.Grid = TableGrid;\n\nexport type TableGridProps<TType = unknown> = React.TableHTMLAttributes<HTMLTableElement> & {\n 'data-taco': string;\n enableHorizontalArrowKeyNavigation?: boolean;\n table: useTableReturnValue<TType>;\n};\n\nexport function TableGrid<TType = unknown>(props: TableGridProps<TType>) {\n const { enableHorizontalArrowKeyNavigation, table, ...attributes } = props;\n const handleFocus =\n table.meta.rowActive.rowActiveIndex === undefined\n ? (event: React.FocusEvent) => {\n table.meta.rowActive.handleFocus(event, table.meta.length, table.renderer.scrollToIndex);\n }\n : undefined;\n\n return (\n <>\n {table.stylesheet}\n <FocusScope>\n <table\n {...attributes}\n id={table.id}\n data-table-font-size={table.meta.fontSize.size}\n data-table-horizontally-scrolled={table.meta.columnFreezing.isHorizontallyScrolled ? true : undefined}\n data-table-pause-hover={table.meta.rowActive.isHoverStatePaused ? true : undefined}\n data-table-resizing={table.state.columnSizingInfo.isResizingColumn ? true : undefined}\n data-table-row-height={table.meta.rowHeight.height}\n data-table-grouped={!!table.state.grouping?.length}\n onFocus={handleFocus}\n onScroll={table.meta.columnFreezing.handleScroll}\n ref={table.ref}\n tabIndex={-1}>\n <thead>\n {table.instance.getHeaderGroups().map(headerGroup => (\n <tr key={headerGroup.id}>\n {headerGroup.headers.map(props => (\n <Header key={props.id} header={props} scrollToIndex={table.renderer.scrollToIndex} />\n ))}\n </tr>\n ))}\n </thead>\n {table.renderer.rows?.length ? (\n <>\n <Body\n enableHorizontalArrowKeyNavigation={enableHorizontalArrowKeyNavigation}\n table={table.instance}\n style={table.renderer.style}>\n {table.renderer.rows}\n </Body>\n {table.meta.footer.isEnabled ? (\n <tfoot>\n <tr>{table.instance.getFooterGroups()[0].headers.map(Footer)}</tr>\n </tfoot>\n ) : null}\n </>\n ) : (\n <EmptyStateBody emptyState={table.props.emptyState} />\n )}\n </table>\n </FocusScope>\n </>\n );\n}\n"],"names":["Table","props","React","children","Toolbar","TableToolbar","Grid","TableGrid","enableHorizontalArrowKeyNavigation","table","attributes","handleFocus","meta","rowActive","rowActiveIndex","undefined","event","length","renderer","scrollToIndex","stylesheet","FocusScope","id","fontSize","size","columnFreezing","isHorizontallyScrolled","isHoverStatePaused","state","columnSizingInfo","isResizingColumn","rowHeight","height","_table$state$grouping","grouping","onFocus","onScroll","handleScroll","ref","tabIndex","instance","getHeaderGroups","map","headerGroup","key","headers","Header","header","_table$renderer$rows","rows","Body","style","footer","isEnabled","getFooterGroups","Footer","EmptyStateBody","emptyState"],"mappings":";;;;;;;;SAcgBA,KAAKA,CAACC,KAAiB;EACnC,oBAAOC,4DAAGD,KAAK,CAACE,QAAQ,CAAI;AAChC;AACAH,KAAK,CAACI,OAAO,GAAGC,YAAY;AAC5BL,KAAK,CAACM,IAAI,GAAGC,SAAS;SAQNA,SAASA,CAAkBN,KAA4B;;EACnE,MAAM;IAAEO,kCAAkC;IAAEC,KAAK;IAAE,GAAGC;GAAY,GAAGT,KAAK;EAC1E,MAAMU,WAAW,GACbF,KAAK,CAACG,IAAI,CAACC,SAAS,CAACC,cAAc,KAAKC,S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,CAACC;IAAiB,CACxF,CAAC,CACD,CACR,CAAC,CACE,EACP,CAAA6B,oBAAA,GAAAvC,KAAK,CAACS,QAAQ,CAAC+B,IAAI,cAAAD,oBAAA,eAAnBA,oBAAA,CAAqB/B,MAAM,kBACxBf,yEACIA,6BAACgD,IAAI;IACD1C,kCAAkC,EAAEA,kCAAkC;IACtEC,KAAK,EAAEA,KAAK,CAAC+B,QAAQ;IACrBW,KAAK,EAAE1C,KAAK,CAACS,QAAQ,CAACiC;KACrB1C,KAAK,CAACS,QAAQ,CAAC+B,IAAI,CACjB,EACNxC,KAAK,CAACG,IAAI,CAACwC,MAAM,CAACC,SAAS,kBACxBnD,yDACIA,yCAAKO,KAAK,CAAC+B,QAAQ,CAACc,eAAe,EAAE,CAAC,CAAC,CAAC,CAACT,OAAO,CAACH,GAAG,CAACa,MAAM,CAAC,CAAM,CAC9D,IACR,IAAI,CACT,mBAEHrD,6BAACsD,cAAc;IAACC,UAAU,EAAEhD,KAAK,CAACR,KAAK,CAACwD;IAAc,CACzD,CACG,CACC,CACd;AAEX;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Toolbar/Toolbar.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { Group } from '../../../../../components/Group/Group';\nimport { Search } from './components/Search/Search';\nimport { Settings } from './components/Settings/Settings';\nimport { Print } from './components/Print/Print';\nimport { Filters } from './components/Filters/Filters';\nimport { TableCustomSettingsRenderer } from '../../../types';\nimport { useTable } from '../../useTable';\n\nexport type TableToolbarProps = React.HTMLAttributes<HTMLDivElement> & {\n children?: JSX.Element | null;\n table: ReturnType<typeof useTable>;\n};\n\nexport function TableToolbar(props: TableToolbarProps) {\n const { children: customTools, table, ...attributes } = props;\n\n if (!isToolbarVisible(table, !!customTools)) {\n return null;\n }\n\n const canFilter = table.instance.options.enableColumnFilters;\n const canPrint = table.meta.printing.isEnabled;\n const canSettings = canChangeSettings(table.instance, table.props.customSettings);\n const canSearch = table.meta.search.isEnabled;\n\n return (\n <>\n <div\n {...attributes}\n className=\"mb-4 flex flex-shrink flex-grow-0 flex-wrap gap-2 print:hidden\"\n data-taco=\"table-toolbar\">\n {table.props.toolbarLeft}\n <Group className=\"ml-auto flex-shrink-0 items-center print:hidden\">\n {customTools}\n {canFilter ? <Filters length={table.meta.length} table={table.instance} /> : null}\n {table.props.toolbarRight}\n {canPrint ? <Print table={table.instance} tableId={table.id} tableRef={table.ref} /> : null}\n {canSettings ? <Settings customSettings={table.props.customSettings} table={table.instance} /> : null}\n {canSearch ? (\n <Search scrollToIndex={table.renderer.scrollToIndex} table={table.instance} tableRef={table.ref} />\n ) : null}\n </Group>\n </div>\n {table.props.toolbarPanel ? <div className=\"mb-4\">{table.props.toolbarPanel}</div> : undefined}\n </>\n );\n}\n\nfunction canChangeSettings<TType = unknown>(table: ReactTable<TType>, customSettings?: TableCustomSettingsRenderer) {\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n return (\n table.options.enableHiding ||\n tableMeta.columnOrdering.isEnabled ||\n tableMeta.fontSize.isEnabled ||\n tableMeta.rowHeight.isEnabled ||\n typeof customSettings === 'function'\n );\n}\n\nfunction isToolbarVisible(table: ReturnType<typeof useTable>, customTools: boolean) {\n const hasInternalToolbar =\n customTools ||\n table.instance.options.enableColumnFilters ||\n table.meta.printing.isEnabled ||\n canChangeSettings(table.instance, table.props.customSettings) ||\n table.meta.search.isEnabled;\n\n return hasInternalToolbar || !!table.props.toolbarLeft || !!table.props.toolbarRight;\n}\n"],"names":["TableToolbar","props","children","customTools","table","attributes","isToolbarVisible","canFilter","instance","options","enableColumnFilters","canPrint","meta","printing","isEnabled","canSettings","canChangeSettings","customSettings","canSearch","search","React","className","toolbarLeft","Group","Filters","length","toolbarRight","Print","tableId","id","tableRef","ref","Settings","Search","scrollToIndex","renderer","toolbarPanel","undefined","tableMeta","enableHiding","columnO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SAAS,kBACNE,6BAACa,MAAM;IAACC,aAAa,EAAE9B,KAAK,CAAC+B,QAAQ,CAACD,aAAa;IAAE9B,KAAK,EAAEA,KAAK,CAACI,QAAQ;IAAEsB,QAAQ,EAAE1B,KAAK,CAAC2B;IAAO,IACnG,IAAI,CACJ,CACN,EACL3B,KAAK,CAACH,KAAK,CAACmC,YAAY,gBAAGhB;IAAKC,SAAS,EAAC;KAAQjB,KAAK,CAACH,KAAK,CAACmC,YAAY,CAAO,GAAGC,SAAS,CAC/F;AAEX;AAEA,SAASrB,iBAAiBA,CAAkBZ,KAAwB,EAAEa,cAA4C;EAC9G,MAAMqB,SAAS,GAAGlC,KAAK,CAACK,OAAO,CAACG,IAA6B;EAE7D,OACIR,KAAK,CAACK,OAAO,CAAC8B,YAAY,IAC1BD,SAAS,CAACE,cAAc,CAAC1B,SAAS,IAClCwB,SAAS,CAACG,QAAQ,CAAC3B,SAAS,IAC5BwB,SAAS,CAACI,SAAS,CAAC5B,SAAS,IAC7B,OAAOG,cAAc,KAAK,UAAU;AAE5C;AAEA,SAASX,gBAAgBA,CAACF,KAAkC,EAAED,WAAoB;EAC9E,MAAMwC,kBAAkB,GACpBxC,WAAW,IACXC,KAAK,CAACI,QAAQ,CAACC,OAAO,CAACC,mBAAmB,IAC1CN,KAAK,CAACQ,IAAI,CAACC,QAAQ,CAACC,SAAS,IAC7BE,iBAAiB,CAACZ,KAAK,CAACI,QAAQ,EAAEJ,KAAK,CAACH,KAAK,CAACgB,cAAc,CAAC,IAC7Db,KAAK,CAACQ,IAAI,CAACO,MAAM,CAACL,SAAS;EAE/B,OAAO6B,kBAAkB,IAAI,CAAC,CAACvC,KAAK,CAACH,KAAK,CAACqB,WAAW,IAAI,CAAC,CAAClB,KAAK,CAACH,KAAK,CAACyB,YAAY;AACxF;;;;"}
1
+ {"version":3,"file":"Toolbar.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Toolbar/Toolbar.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { Group } from '../../../../../components/Group/Group';\nimport { Search } from './components/Search/Search';\nimport { Settings } from './components/Settings/Settings';\nimport { Print } from './components/Print/Print';\nimport { Filters } from './components/Filters/Filters';\nimport { TableCustomSettingsRenderer } from '../../../types';\nimport { useTableReturnValue } from '../../useTable';\n\nexport type TableToolbarProps<TType = unknown> = React.HTMLAttributes<HTMLDivElement> & {\n children?: JSX.Element | null;\n table: useTableReturnValue<TType>;\n};\n\nexport function TableToolbar<TType = unknown>(props: TableToolbarProps<TType>) {\n const { children: customTools, table, ...attributes } = props;\n\n if (!isToolbarVisible<TType>(table, !!customTools)) {\n return null;\n }\n\n const canFilter = table.instance.options.enableColumnFilters;\n const canPrint = table.meta.printing.isEnabled;\n const canSettings = canChangeSettings(table.instance, table.props.customSettings);\n const canSearch = table.meta.search.isEnabled;\n\n return (\n <>\n <div\n {...attributes}\n className=\"mb-4 flex flex-shrink flex-grow-0 flex-wrap gap-2 print:hidden\"\n data-taco=\"table-toolbar\">\n {table.props.toolbarLeft}\n <Group className=\"ml-auto flex-shrink-0 items-center print:hidden\">\n {customTools}\n {canFilter ? <Filters length={table.meta.length} table={table.instance} /> : null}\n {table.props.toolbarRight}\n {canPrint ? <Print table={table.instance} tableId={table.id} tableRef={table.ref} /> : null}\n {canSettings ? <Settings customSettings={table.props.customSettings} table={table.instance} /> : null}\n {canSearch ? (\n <Search scrollToIndex={table.renderer.scrollToIndex} table={table.instance} tableRef={table.ref} />\n ) : null}\n </Group>\n </div>\n {table.props.toolbarPanel ? <div className=\"mb-4\">{table.props.toolbarPanel}</div> : undefined}\n </>\n );\n}\n\nfunction canChangeSettings<TType = unknown>(table: ReactTable<TType>, customSettings?: TableCustomSettingsRenderer) {\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n return (\n table.options.enableHiding ||\n tableMeta.columnOrdering.isEnabled ||\n tableMeta.fontSize.isEnabled ||\n tableMeta.rowHeight.isEnabled ||\n typeof customSettings === 'function'\n );\n}\n\nfunction isToolbarVisible<TType = unknown>(table: useTableReturnValue<TType>, customTools: boolean) {\n const hasInternalToolbar =\n customTools ||\n table.instance.options.enableColumnFilters ||\n table.meta.printing.isEnabled ||\n canChangeSettings(table.instance, table.props.customSettings) ||\n table.meta.search.isEnabled;\n\n return hasInternalToolbar || !!table.props.toolbarLeft || !!table.props.toolbarRight;\n}\n"],"names":["TableToolbar","props","children","customTools","table","attributes","isToolbarVisible","canFilter","instance","options","enableColumnFilters","canPrint","meta","printing","isEnabled","canSettings","canChangeSettings","customSettings","canSearch","search","React","className","toolbarLeft","Group","Filters","length","toolbarRight","Print","tableId","id","tableRef","ref","Settings","Search","scrollToIndex","renderer","toolbarPanel","undefined","tableMeta","enableHiding","columnOrdering","fontSize","rowHeight","hasInternalToolbar"],"mappings":";;;;;;;SAegBA,YAAYA,CAAkBC,KAA+B;EACzE,MAAM;IAAEC,QAAQ,EAAEC,WAAW;IAAEC,KAAK;IAAE,GAAGC;GAAY,GAAGJ,KAAK;EAE7D,IAAI,CAACK,gBAAgB,CAAQF,KAAK,EAAE,CAAC,CAACD,WAAW,CAAC,EAAE;IAChD,OAAO,IAAI;;EAGf,MAAMI,SAAS,GAAGH,KAAK,CAACI,QAAQ,CAACC,OAAO,CAACC,mBAAmB;EAC5D,MAAMC,QAAQ,GAAGP,KAAK,CAACQ,IAAI,CAACC,QAAQ,CAACC,SAAS;EAC9C,MAAMC,WAAW,GAAGC,iBAAiB,CAACZ,KAAK,CAACI,QAAQ,EAAEJ,KAAK,CAACH,KAAK,CAACgB,cAAc,CAAC;EACjF,MAAMC,SAAS,GAAGd,KAAK,CAACQ,IAAI,CAACO,MAAM,CAACL,SAAS;EAE7C,oBACIM,yEACIA,sDACQf,UAAU;IACdgB,SAAS,EAAC,gEAAgE;iBAChE;MACTjB,KAAK,CAACH,KAAK,CAACqB,WAAW,eACxBF,6BAACG,KAAK;IAACF,SAAS,EAAC;KACZlB,WAAW,EACXI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IACXC,KAAK,CAACI,QAAQ,CAACC,OAAO,CAACC,mBAAmB,IAC1CN,KAAK,CAACQ,IAAI,CAACC,QAAQ,CAACC,SAAS,IAC7BE,iBAAiB,CAACZ,KAAK,CAACI,QAAQ,EAAEJ,KAAK,CAACH,KAAK,CAACgB,cAAc,CAAC,IAC7Db,KAAK,CAACQ,IAAI,CAACO,MAAM,CAACL,SAAS;EAE/B,OAAO6B,kBAAkB,IAAI,CAAC,CAACvC,KAAK,CAACH,KAAK,CAACqB,WAAW,IAAI,CAAC,CAAClB,KAAK,CAACH,KAAK,CAACyB,YAAY;AACxF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTable.js","sources":["../../../../../../../../src/primitives/Table/Core/useTable.ts"],"sourcesContent":["import { TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport { TableProps } from '../types';\nimport { useTableManager } from '../useTableManager/useTableManager';\nimport { useStylesheet } from './features/useStylesheet';\nimport { useTableGlobalShortcuts } from './features/useTableGlobalShortcuts';\nimport { useTableRef } from './features/useTableRef';\nimport { useTableRenderer } from './features/useTableRenderer';\nimport { useTableRowActiveListener } from './listeners/useTableRowActiveListener';\nimport { TableRef } from '../types';\nimport { useTableRenderers } from './types';\nimport { renderer as rowActions } from './components/Columns/Internal/Actions';\nimport { renderer as rowDrag } from './components/Columns/Internal/Drag';\nimport { renderer as rowExpansion } from './components/Columns/Internal/Expansion';\nimport { renderer as rowSelection } from './components/Columns/Internal/Selection';\nimport { useTableManagerInternalColumns } from '../useTableManager/types';\n\nconst INTERNAL_RENDERERS = {\n rowActions,\n rowDrag,\n rowExpansion,\n rowSelection,\n};\n\nexport function useTable<TType = unknown, TMeta = {}>(\n props: TableProps<TType>,\n externalRef: React.Ref<TableRef>,\n renderers: useTableRenderers<TType>,\n meta?: Partial<ReactTableMeta<TType>> & TMeta\n) {\n // create a ref and merge with the consumer's ref\n const ref = useMergedRef<TableRef>(externalRef);\n // configure the table\n const manager = useTableManager<TType>(props, meta, INTERNAL_RENDERERS as useTableManagerInternalColumns<TType>);\n // configure the virtualised renderer\n const renderer = useTableRenderer<TType>(renderers, manager.instance, ref, props.defaultRowActiveIndex);\n // configure dynamic styling\n const stylesheet = useStylesheet(manager.id, manager.instance);\n // configure global keyboard shortcuts\n useTableGlobalShortcuts(manager.instance, ref, renderer.scrollToIndex);\n // augment the ref with some helper functions\n useTableRef(manager.instance, ref);\n\n // listeners - they are here and not in useTableManager because they rely on the dom and the table ref\n useTableRowActiveListener(manager.instance, ref);\n\n return {\n ...manager,\n props: {\n customSettings: props.customSettings,\n emptyState: props.emptyState,\n toolbarLeft: props.toolbarLeft,\n toolbarPanel: props.toolbarPanel,\n toolbarRight: props.toolbarRight,\n },\n renderer,\n stylesheet,\n ref,\n };\n}\n"],"names":["INTERNAL_RENDERERS","rowActions","rowDrag","rowExpansion","rowSelection","useTable","props","externalRef","renderers","meta","ref","useMergedRef","manager","useTableManager","renderer","useTableRenderer","instance","defaultRowActiveIndex","stylesheet","useStylesheet","id","useTableGlobalShortcuts","scrollToIndex","useTableRef","useTableRowActiveListener","customSettings","emptyState","toolbarLeft","toolbarPanel","toolbarRight"],"mappings":";;;;;;;;;;;;AAiBA,MAAMA,kBAAkB,GAAG;cACvBC,QAAU;WACVC,UAAO;gBACPC,UAAY;gBACZC;CACH;SAEeC,QAAQA,CACpBC,KAAwB,EACxBC,WAAgC,EAChCC,SAAmC,EACnCC,IAA6C;;EAG7C,MAAMC,GAAG,GAAGC,YAAY,CAAWJ,WAAW,CAAC;;EAE/C,MAAMK,OAAO,GAAGC,eAAe,CAAQP,KAAK,EAAEG,IAAI,EAAET,kBAA2D,CAAC;;EAEhH,MAAMc,QAAQ,GAAGC,gBAAgB,CAAQP,SAAS,EAAEI,OAAO,CAACI,QAAQ,EAAEN,GAAG,EAAEJ,KAAK,CAACW,qBAAqB,CAAC;;EAEvG,MAAMC,UAAU,GAAGC,aAAa,CAACP,OAAO,CAACQ,EAAE,EAAER,OAAO,CAACI,QAAQ,CAAC;;EAE9DK,uBAAuB,CAACT,OAAO,CAACI,QAAQ,EAAEN,GAAG,EAAEI,QAAQ,CAACQ,aAAa,CAAC;;EAEtEC,WAAW,CAACX,OAAO,CAACI,QAAQ,EAAEN,GAAG,CAAC;;EAGlCc,yBAAyB,CAACZ,OAAO,CAACI,QAAQ,EAAEN,GAAG,CAAC;EAEhD,OAAO;IACH,GAAGE,OAAO;IACVN,KAAK,EAAE;MACHmB,cAAc,EAAEnB,KAAK,CAACmB,cAAc;MACpCC,UAAU,EAAEpB,KAAK,CAACoB,UAAU;MAC5BC,WAAW,EAAErB,KAAK,CAACqB,WAAW;MAC9BC,YAAY,EAAEtB,KAAK,CAACsB,YAAY;MAChCC,YAAY,EAAEvB,KAAK,CAACuB;KACvB;IACDf,QAAQ;IACRI,UAAU;IACVR;GACH;AACL;;;;"}
1
+ {"version":3,"file":"useTable.js","sources":["../../../../../../../../src/primitives/Table/Core/useTable.ts"],"sourcesContent":["import { Table as ReactTable, TableMeta as ReactTableMeta, TableState as ReactTableState } from '@tanstack/react-table';\nimport { ScrollToOptions as ReactVirtualScrollToOptions } from '@tanstack/react-virtual';\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport { TableCustomSettingsRenderer, TableEmptyStateRenderer, TableProps } from '../types';\nimport { useTableManager } from '../useTableManager/useTableManager';\nimport { useStylesheet } from './features/useStylesheet';\nimport { useTableGlobalShortcuts } from './features/useTableGlobalShortcuts';\nimport { useTableRef } from './features/useTableRef';\nimport { useTableRenderer } from './features/useTableRenderer';\nimport { useTableRowActiveListener } from './listeners/useTableRowActiveListener';\nimport { TableRef } from '../types';\nimport { useTableRenderers } from './types';\nimport { renderer as rowActions } from './components/Columns/Internal/Actions';\nimport { renderer as rowDrag } from './components/Columns/Internal/Drag';\nimport { renderer as rowExpansion } from './components/Columns/Internal/Expansion';\nimport { renderer as rowSelection } from './components/Columns/Internal/Selection';\nimport { useTableManagerInternalColumns } from '../useTableManager/types';\n\nconst INTERNAL_RENDERERS = {\n rowActions,\n rowDrag,\n rowExpansion,\n rowSelection,\n};\n\nexport type useTableReturnValue<TType = unknown> = {\n id: string;\n instance: ReactTable<TType>;\n meta: ReactTableMeta<TType>;\n props: {\n customSettings: TableCustomSettingsRenderer | undefined;\n emptyState: TableEmptyStateRenderer | undefined;\n toolbarLeft: JSX.Element | undefined;\n toolbarPanel: JSX.Element | undefined;\n toolbarRight: JSX.Element | undefined;\n };\n ref: React.RefObject<TableRef>;\n renderer: {\n rows: JSX.Element[] | null;\n style: React.CSSProperties;\n scrollToIndex: (index: number, options?: ReactVirtualScrollToOptions) => void;\n };\n stylesheet: JSX.Element;\n state: ReactTableState;\n};\n\nexport function useTable<TType = unknown, TMeta = {}>(\n props: TableProps<TType>,\n externalRef: React.Ref<TableRef>,\n renderers: useTableRenderers<TType>,\n meta?: Partial<ReactTableMeta<TType>> & TMeta\n): useTableReturnValue<TType> {\n // create a ref and merge with the consumer's ref\n const ref = useMergedRef<TableRef>(externalRef);\n // configure the table\n const manager = useTableManager<TType>(props, meta, INTERNAL_RENDERERS as useTableManagerInternalColumns<TType>);\n // configure the virtualised renderer\n const renderer = useTableRenderer<TType>(renderers, manager.instance, ref, props.defaultRowActiveIndex);\n // configure dynamic styling\n const stylesheet = useStylesheet(manager.id, manager.instance);\n // configure global keyboard shortcuts\n useTableGlobalShortcuts(manager.instance, ref, renderer.scrollToIndex);\n // augment the ref with some helper functions\n useTableRef(manager.instance, ref);\n\n // listeners - they are here and not in useTableManager because they rely on the dom and the table ref\n useTableRowActiveListener(manager.instance, ref);\n\n return {\n ...manager,\n props: {\n customSettings: props.customSettings,\n emptyState: props.emptyState,\n toolbarLeft: props.toolbarLeft,\n toolbarPanel: props.toolbarPanel,\n toolbarRight: props.toolbarRight,\n },\n renderer,\n stylesheet,\n ref,\n };\n}\n"],"names":["INTERNAL_RENDERERS","rowActions","rowDrag","rowExpansion","rowSelection","useTable","props","externalRef","renderers","meta","ref","useMergedRef","manager","useTableManager","renderer","useTableRenderer","instance","defaultRowActiveIndex","stylesheet","useStylesheet","id","useTableGlobalShortcuts","scrollToIndex","useTableRef","useTableRowActiveListener","customSettings","emptyState","toolbarLeft","toolbarPanel","toolbarRight"],"mappings":";;;;;;;;;;;;AAkBA,MAAMA,kBAAkB,GAAG;cACvBC,QAAU;WACVC,UAAO;gBACPC,UAAY;gBACZC;CACH;SAuBeC,QAAQA,CACpBC,KAAwB,EACxBC,WAAgC,EAChCC,SAAmC,EACnCC,IAA6C;;EAG7C,MAAMC,GAAG,GAAGC,YAAY,CAAWJ,WAAW,CAAC;;EAE/C,MAAMK,OAAO,GAAGC,eAAe,CAAQP,KAAK,EAAEG,IAAI,EAAET,kBAA2D,CAAC;;EAEhH,MAAMc,QAAQ,GAAGC,gBAAgB,CAAQP,SAAS,EAAEI,OAAO,CAACI,QAAQ,EAAEN,GAAG,EAAEJ,KAAK,CAACW,qBAAqB,CAAC;;EAEvG,MAAMC,UAAU,GAAGC,aAAa,CAACP,OAAO,CAACQ,EAAE,EAAER,OAAO,CAACI,QAAQ,CAAC;;EAE9DK,uBAAuB,CAACT,OAAO,CAACI,QAAQ,EAAEN,GAAG,EAAEI,QAAQ,CAACQ,aAAa,CAAC;;EAEtEC,WAAW,CAACX,OAAO,CAACI,QAAQ,EAAEN,GAAG,CAAC;;EAGlCc,yBAAyB,CAACZ,OAAO,CAACI,QAAQ,EAAEN,GAAG,CAAC;EAEhD,OAAO;IACH,GAAGE,OAAO;IACVN,KAAK,EAAE;MACHmB,cAAc,EAAEnB,KAAK,CAACmB,cAAc;MACpCC,UAAU,EAAEpB,KAAK,CAACoB,UAAU;MAC5BC,WAAW,EAAErB,KAAK,CAACqB,WAAW;MAC9BC,YAAY,EAAEtB,KAAK,CAACsB,YAAY;MAChCC,YAAY,EAAEvB,KAAK,CAACuB;KACvB;IACDf,QAAQ;IACRI,UAAU;IACVR;GACH;AACL;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["../../../../../../../src/primitives/Table/types.ts"],"sourcesContent":["import {\n ColumnFilter as ReactTableColumnFilter,\n ColumnFiltersState as ReactTableColumnFilterState,\n ColumnOrderState as ReactTableColumnOrderState,\n ColumnPinningState as ReactTableColumnPinningState,\n ColumnSort as ReactTableColumnSort,\n ColumnSizingState as ReactTableColumnSizingState,\n GroupingState as ReactTableGroupingState,\n VisibilityState as ReactTableColumnVisibilityState,\n SortingState as ReactTableSortingState,\n BuiltInAggregationFn as ReactTableBuiltInAggregationFn,\n BuiltInSortingFn as ReactTableBuiltInSortingFn,\n} from '@tanstack/react-table';\nimport { FontSize, FontSizes, ValueOf } from '../../types';\nimport { MenuProps } from '../../components/Menu/Menu';\nimport { MenuItemProps } from '../../components/Menu/components/Item';\n\ntype TODO = any;\n\nexport type TableRef = HTMLTableElement & {\n instance: {\n resetFiltering: () => void;\n resetRowExpansion: () => void;\n resetRowSelection: () => void;\n resetSorting: () => void;\n };\n};\n\n// filtering\nexport enum TableFilterComparator {\n Contains,\n DoesNotContain,\n IsEqualTo,\n IsNotEqualTo,\n IsGreaterThan,\n IsLessThan,\n IsBetween,\n IsEmpty,\n IsNotEmpty,\n IsLessThanOrEqualTo,\n IsGreaterThanOrEqualTo,\n HasAnyOf,\n HasAllOf,\n HasNoneOf,\n}\nexport type TableFilterValue = {\n comparator: TableFilterComparator;\n value: any;\n};\nexport type TableFilter = {\n id: string;\n value: TableFilterValue;\n};\n\n// columns\nexport type TableColumnAlignment = 'left' | 'center' | 'right';\nexport type TableColumnClassNameHandler<TType = unknown> = string | ((row: TType) => string | undefined);\nexport type TableColumnDataType = 'auto' | 'number' | 'alphanumeric' | 'alphanumericCaseSensitive' | 'datetime' | 'boolean';\nexport type TableColumnFilter = ReactTableColumnFilter;\nexport type TableColumnMenu = (props: Partial<MenuProps>) => JSX.Element;\nexport type TableColumnRenderer<TType, TValue> = (value: TValue, row: TType) => JSX.Element | string | number | null;\nexport type TableColumnRendererAggregate<TType, TValue> = (value: TValue, row: TType) => JSX.Element | string | number | null;\nexport type TableColumnRendererControl<TType = unknown> =\n | ((props: TableColumnRendererControlProps, row?: TType) => JSX.Element)\n | 'datepicker'\n | 'input'\n | 'switch'\n | 'textarea';\nexport type TableColumnRendererControlProps = {\n className?: string;\n disabled?: boolean;\n fontSize?: FontSize;\n invalid?: boolean;\n onBlur?: (value: any) => void;\n onFocus?: React.FocusEventHandler;\n readOnly?: boolean;\n ref: React.RefObject<HTMLElement> | ((instance: HTMLElement | null | undefined) => void);\n setValue: (value: any) => void;\n value: any;\n};\nexport type TableColumnRendererHeader = string;\nexport type TableColumnRendererFooter<TValue> = (values: TValue[]) => JSX.Element | string | number | null;\nexport type TableColumnSort = ReactTableColumnSort;\nexport type TableColumnSortDirection = 'asc' | 'desc';\nexport type TableColumnSortFn<TType = unknown> =\n | ((rowA: TType, rowB: TType, columnId: string) => -1 | 0 | 1)\n | ReactTableBuiltInSortingFn\n | 'auto';\nexport type TableColumnWidth = number | 'grow';\n\n// rows\nexport type TableRowActionRenderer<TType = unknown> = (row: TType, internalRowId: string) => JSX.Element | null;\nexport type TableRowActionGroupRenderer<TType = unknown> = (rows: TType[]) => JSX.Element | null;\nexport type TableRowClickHandler<TType = unknown> = (row: TType) => void;\nexport type TableRowDragHandler<TType = unknown> = (\n rows: TType[],\n showPlaceholder: (string) => void,\n setDataTransfer: (data: string) => void\n) => void;\nexport type TableRowDropHandler<TType = unknown> = (event: React.DragEvent, row: TType) => void;\nexport type TableRowGotoHandler = (\n column: string,\n query: string,\n sorting: TableColumnSort[],\n filters: TableColumnFilter[],\n search: string | undefined\n) => Promise<number>;\nexport type TableRowHeight = 'short' | 'medium' | 'tall' | 'extra-tall';\nexport type TableRowSelectHandler<TType = unknown> = (rows: TType[]) => void;\nexport type TableRowWithMetaData<TType = unknown> = TType & {\n _meta?: {\n layout?: 'heading' | 'summary' | 'item';\n };\n};\n\n// shortcuts\nexport type TableShortcutHandlerFn<TType = unknown> = (row: TType) => void;\nexport type TableShortcutHandlerObject<TType = unknown> = {\n handler: TableShortcutHandlerFn<TType>;\n meta?: boolean;\n shift?: boolean;\n};\n\n// table\nexport type TableFilterHandler = (filters: TableColumnFilter[]) => void;\nexport type TableFontSize = keyof typeof FontSizes;\nexport type TablePreset = 'complex' | 'list' | 'simple';\nexport type TableRowExpansionRenderer<TType = unknown> = (row: TType) => (() => JSX.Element) | null;\nexport type TableScrollToIndexHandler = (index: number, options?: { align: 'start' | 'center' | 'end' | 'auto' }) => void;\nexport type TableServerLoadPageHandler = (\n pageIndex: number,\n sorting: TableColumnSort[],\n filters: TableColumnFilter[],\n search: string | undefined\n) => Promise<void>;\nexport type TableServerLoadAllHandler = (\n sorting: TableColumnSort[],\n filters: TableColumnFilter[],\n search: string | undefined\n) => Promise<void>;\nexport enum TableServerLoadAllState {\n Incomplete,\n Loading,\n Completed,\n}\nexport type TableSettingsHandler = (settings: TableSettings) => void | Promise<void>;\nexport type TableShortcuts<TType = unknown> = Record<string, TableShortcutHandlerFn<TType> | TableShortcutHandlerObject<TType>>;\nexport type TableSortHandler = (sorting: TableColumnSort[]) => void;\nexport type TableCustomSettingsRenderer = (props: TableSettings) => React.ReactElement<MenuItemProps>[];\nexport type TableEmptyStateRenderer = () => JSX.Element | null;\n\n// settings\nexport type TableSettings = {\n columnFilters?: ReactTableColumnFilterState;\n columnOrder?: ReactTableColumnOrderState;\n columnPinning?: ReactTableColumnPinningState;\n columnSizing?: ReactTableColumnSizingState;\n columnVisibility?: ReactTableColumnVisibilityState;\n excludeUnmatchedRecordsInSearch?: boolean;\n fontSize?: TableFontSize;\n grouping?: ReactTableGroupingState;\n rowHeight?: TableRowHeight;\n searchQuery?: string;\n sorting?: ReactTableSortingState;\n};\nexport type EnableSettingsOptions = {\n columnOrder: boolean;\n columnPinning: boolean;\n columnSizing: boolean;\n columnVisibility: boolean;\n excludeUnmatchedRecordsInSearch: boolean;\n fontSize: boolean;\n grouping: boolean;\n rowHeight: boolean;\n sorting: boolean;\n};\n\n// props\nexport type TableFeatureProps = {\n // react-table built-in\n enableFiltering?: boolean;\n enableSearch?: boolean;\n enableSorting?: boolean;\n enableColumnFreezing?: boolean;\n enableColumnHiding?: boolean;\n enableColumnResizing?: boolean;\n enableRowExpansion?: boolean;\n enableRowSelection?: boolean;\n enableRowSelectionSingle?: boolean;\n\n // custom -- common between all table types\n enableColumnOrdering?: boolean;\n enableFontSize?: boolean;\n enableFooter?: boolean;\n enablePrinting?: boolean;\n enableRowActions?: boolean;\n enableRowActive?: boolean;\n enableRowClick?: boolean;\n enableRowDrag?: boolean;\n enableRowDrop?: boolean;\n enableRowGoto?: boolean;\n enableRowHeight?: boolean;\n enableSaveSettings?: boolean | Partial<EnableSettingsOptions>;\n};\n\nexport type TableCommonProps<TType = unknown> = TableFeatureProps & {\n children: (JSX.Element | boolean | null | undefined)[];\n data: TType[];\n id: string;\n\n // misc\n customSettings?: TableCustomSettingsRenderer;\n defaultColumnFreezingIndex?: number;\n defaultRowActiveIndex?: number;\n defaultRowGroupColumnId?: keyof TType;\n defaultSettings?: TableSettings;\n emptyState?: TableEmptyStateRenderer;\n preset?: TablePreset;\n rowActions?: TableRowActionRenderer<TType>[];\n rowActionsForGroup?: TableRowActionGroupRenderer<TType>[];\n rowActionsLength?: number;\n rowExpansionRenderer?: TableRowExpansionRenderer<TType>;\n rowIdentityColumnId?: string;\n shortcuts?: TableShortcuts<TType>;\n toolbarLeft?: JSX.Element;\n toolbarRight?: JSX.Element;\n toolbarPanel?: JSX.Element;\n\n // handlers\n onRowClick?: TableRowClickHandler<TType>;\n onRowDrag?: TableRowDragHandler<TType>;\n onRowDrop?: TableRowDropHandler<TType>;\n onRowGoto?: TableRowGotoHandler;\n onRowSelect?: TableRowSelectHandler<TType>;\n\n // state change handlers\n onChangeFilter?: TableFilterHandler;\n onChangeSearch?: TODO; // not currently supported\n onChangeSettings?: TableSettingsHandler;\n onChangeSort?: TableSortHandler;\n};\n\nexport interface TableClientProps<TType = unknown> extends TableCommonProps<TType> {\n length?: never;\n loadAll?: never;\n loadPage?: never;\n pageSize?: never;\n}\n\nexport interface TableServerProps<TType = unknown> extends TableCommonProps<TType> {\n length: number | undefined;\n loadAll: TableServerLoadAllHandler;\n loadPage: TableServerLoadPageHandler;\n pageSize?: number;\n}\n\nexport type TableProps<TType = unknown> = TableClientProps<TType> | TableServerProps<TType>;\n\nexport type TableColumnProps<TType = unknown> = ValueOf<{\n [Key in keyof TType]: {\n accessor?: Key;\n id: string;\n } & {\n // renderers\n renderer?: TableColumnRenderer<TType, TType[Key]>;\n /** Renderer to use if the cell is an aggregate cell and part of a grouped row */\n aggregate?: TableColumnRendererAggregate<TType, TType[Key]>;\n control?: TableColumnRendererControl<TType>;\n footer?: TableColumnRendererFooter<TType[Key]>;\n header: TableColumnRendererHeader;\n // options\n /** Aggregation function to be used when the column is part of a grouped row */\n aggregationFn?: 'auto' | ReactTableBuiltInAggregationFn;\n align?: TableColumnAlignment;\n className?: TableColumnClassNameHandler<TType>;\n dataType?: TableColumnDataType;\n defaultHidden?: boolean;\n defaultWidth?: TableColumnWidth;\n enableFiltering?: boolean;\n enableGrouping?: boolean;\n enableHiding?: boolean;\n enableOrdering?: boolean;\n enablePrinting?: boolean;\n enableResizing?: boolean;\n enableSearch?: boolean;\n enableSorting?: boolean;\n enableTruncate?: boolean;\n filters?: TableFilterComparator[];\n headerClassName?: string;\n menu?: TableColumnMenu;\n minWidth?: number;\n sort?: TableColumnSortDirection;\n sortFn?: TableColumnSortFn<TType>;\n tooltip?: string;\n };\n}>;\n\nexport type TableGroupProps = {\n children: (JSX.Element | boolean | null | undefined)[];\n header: string;\n id: string;\n};\n\nexport type TableTexts = {\n columns: {\n actions: {\n tooltip: string;\n };\n drag: {\n tooltip: string;\n };\n expansion: {\n collapse: string;\n collapseAll: string;\n expand: string;\n expandAll: string;\n };\n menu: {\n editFilter: string;\n filter: string;\n freezeFirstColumn: string;\n freezeUptoColumn: string;\n gotoRow: string;\n hideColumn: string;\n unfreezeColumns: string;\n sorting: string;\n sortingOrder: {\n ascending: string;\n descending: string;\n unsorted: string;\n };\n };\n resize: {\n tooltip: string;\n };\n select: {\n deselect: string;\n deselectAll: string;\n select: string;\n selectAll: string;\n };\n };\n columnSettings: {\n button: string;\n noResults: string;\n search: string;\n tooltip: string;\n };\n filters: {\n button: string;\n buttons: {\n addFilter: string;\n clearFilters: string;\n };\n comparators: {\n contains: string;\n doesNotContain: string;\n isEqualTo: string;\n isNotEqualTo: string;\n isGreaterThan: string;\n isLessThan: string;\n isBetween: string;\n isEmpty: string;\n isNotEmpty: string;\n isBefore: string;\n isAfter: string;\n isLessThanOrEqualTo: string;\n isGreaterThanOrEqualTo: string;\n isOnOrBefore: string;\n isOnOrAfter: string;\n hasAnyOf: string;\n hasAllOf: string;\n hasNoneOf: string;\n };\n conditions: {\n and: string;\n where: string;\n };\n emptyFilter: {\n condition: string;\n value: string;\n };\n hiddenColumn: string;\n hiddenGroupedColumn: string;\n tooltip: string;\n total: string;\n };\n fontSize: {\n tooltip: string;\n sizes: {\n small: string;\n medium: string;\n large: string;\n };\n };\n footer: {\n summary: {\n count: string;\n records: string;\n selected: string;\n };\n };\n print: {\n error: string;\n loading: string;\n tooltip: string;\n warningDialog: {\n title: string;\n description: string;\n checkboxVisibilityLabel: string;\n cancelButtonText: string;\n printButtonText: string;\n };\n settingsDialog: {\n title: string;\n size: string;\n sizeA5: string;\n sizeA4: string;\n sizeA3: string;\n sizeLetter: string;\n sizeLegal: string;\n orientation: string;\n orientationLandscape: string;\n orientationPortrait: string;\n rows: string;\n rowsAll: string;\n rowsSelected: string;\n layout: string;\n layoutSplitGroups: string;\n };\n };\n rowHeight: {\n tooltip: string;\n sizes: {\n short: string;\n medium: string;\n tall: string;\n extraTall: string;\n };\n };\n search: {\n excludeUnmatchedResults: string;\n placeholder: string;\n };\n otherOptions: {\n tooltip: string;\n };\n};\n"],"names":["TableFilterComparator","TableServerLoadAllState"],"mappings":"AA4BA;IACYA;AAAZ,WAAYA,qBAAqB;EAC7BA,yEAAQ;EACRA,qFAAc;EACdA,2EAAS;EACTA,iFAAY;EACZA,mFAAa;EACbA,6EAAU;EACVA,2EAAS;EACTA,uEAAO;EACPA,6EAAU;EACVA,+FAAmB;EACnBA,sGAAsB;EACtBA,0EAAQ;EACRA,0EAAQ;EACRA,4EAAS;AACb,CAAC,EAfWA,qBAAqB,KAArBA,qBAAqB;IA+GrBC;AAAZ,WAAYA,uBAAuB;EAC/BA,iFAAU;EACVA,2EAAO;EACPA,+EAAS;AACb,CAAC,EAJWA,uBAAuB,KAAvBA,uBAAuB;;;;"}
1
+ {"version":3,"file":"types.js","sources":["../../../../../../../src/primitives/Table/types.ts"],"sourcesContent":["import {\n ColumnFilter as ReactTableColumnFilter,\n ColumnFiltersState as ReactTableColumnFilterState,\n ColumnOrderState as ReactTableColumnOrderState,\n ColumnPinningState as ReactTableColumnPinningState,\n ColumnSort as ReactTableColumnSort,\n ColumnSizingState as ReactTableColumnSizingState,\n GroupingState as ReactTableGroupingState,\n VisibilityState as ReactTableColumnVisibilityState,\n SortingState as ReactTableSortingState,\n BuiltInAggregationFn as ReactTableBuiltInAggregationFn,\n BuiltInSortingFn as ReactTableBuiltInSortingFn,\n} from '@tanstack/react-table';\nimport { FontSize, FontSizes, ValueOf } from '../../types';\nimport { MenuProps } from '../../components/Menu/Menu';\nimport { MenuItemProps } from '../../components/Menu/components/Item';\n\ntype TODO = any;\n\nexport type TableRef = HTMLTableElement & {\n instance: {\n resetFiltering: () => void;\n resetRowExpansion: () => void;\n resetRowSelection: () => void;\n resetSorting: () => void;\n };\n};\n\n// filtering\nexport enum TableFilterComparator {\n Contains,\n DoesNotContain,\n IsEqualTo,\n IsNotEqualTo,\n IsGreaterThan,\n IsLessThan,\n IsBetween,\n IsEmpty,\n IsNotEmpty,\n IsLessThanOrEqualTo,\n IsGreaterThanOrEqualTo,\n HasAnyOf,\n HasAllOf,\n HasNoneOf,\n}\nexport type TableFilterValue = {\n comparator: TableFilterComparator;\n value: any;\n};\nexport type TableFilter = {\n id: string;\n value: TableFilterValue;\n};\n\n// columns\nexport type TableColumnAlignment = 'left' | 'center' | 'right';\nexport type TableColumnClassNameHandler<TType = unknown> = string | ((row: TType) => string | undefined);\nexport type TableColumnDataType = 'auto' | 'number' | 'alphanumeric' | 'alphanumericCaseSensitive' | 'datetime' | 'boolean';\nexport type TableColumnFilter = ReactTableColumnFilter;\nexport type TableColumnMenu = (props: Partial<MenuProps>) => JSX.Element;\nexport type TableColumnRenderer<TType, TValue> = (value: TValue, row: TType) => JSX.Element | string | number | null;\nexport type TableColumnRendererAggregate<TType, TValue> = (value: TValue, row: TType) => JSX.Element | string | number | null;\nexport type TableColumnRendererControl<TType = unknown> =\n | ((props: TableColumnRendererControlProps, row?: TType) => JSX.Element)\n | 'datepicker'\n | 'input'\n | 'switch'\n | 'textarea';\nexport type TableColumnRendererControlProps = {\n className?: string;\n disabled?: boolean;\n fontSize?: FontSize;\n invalid?: boolean;\n onBlur?: (value: any) => void;\n onFocus?: React.FocusEventHandler;\n readOnly?: boolean;\n ref: React.RefObject<HTMLElement> | ((instance: HTMLElement | null | undefined) => void);\n setValue: (value: any) => void;\n value: any;\n};\nexport type TableColumnRendererHeader = string;\nexport type TableColumnRendererFooter<TValue> = (values: TValue[]) => JSX.Element | string | number | null;\nexport type TableColumnSort = ReactTableColumnSort;\nexport type TableColumnSortDirection = 'asc' | 'desc';\nexport type TableColumnSortFn<TType = unknown> =\n | ((rowA: TType, rowB: TType, columnId: string) => -1 | 0 | 1)\n | ReactTableBuiltInSortingFn\n | 'auto';\nexport type TableColumnWidth = number | 'grow';\n\n// rows\nexport type TableRowActionRenderer<TType = unknown> = (row: TType, internalRowId: string) => JSX.Element | null;\nexport type TableRowActionGroupRenderer<TType = unknown> = (rows: TType[]) => JSX.Element | null;\nexport type TableRowClickHandler<TType = unknown> = (row: TType) => void;\nexport type TableRowDragHandler<TType = unknown> = (\n rows: TType[],\n showPlaceholder: (string) => void,\n setDataTransfer: (data: string) => void\n) => void;\nexport type TableRowDropHandler<TType = unknown> = (event: React.DragEvent, row: TType) => void;\nexport type TableRowGotoHandler = (\n column: string,\n query: string,\n sorting: TableColumnSort[],\n filters: TableColumnFilter[],\n search: string | undefined\n) => Promise<number>;\nexport type TableRowHeight = 'short' | 'medium' | 'tall' | 'extra-tall';\nexport type TableRowSelectHandler<TType = unknown> = (rows: TType[]) => void;\nexport type TableRowWithMetaData<TType = unknown> = TType & {\n _meta?: {\n layout?: 'heading' | 'summary' | 'item';\n };\n};\n\n// shortcuts\nexport type TableShortcutHandlerFn<TType = unknown> = (row: TType) => void;\nexport type TableShortcutHandlerObject<TType = unknown> = {\n handler: TableShortcutHandlerFn<TType>;\n meta?: boolean;\n shift?: boolean;\n};\n\n// table\nexport type TableFilterHandler = (filters: TableColumnFilter[]) => void;\nexport type TableFontSize = keyof typeof FontSizes;\nexport type TablePreset = 'complex' | 'list' | 'simple';\nexport type TableRowExpansionRenderer<TType = unknown> = (row: TType) => (() => JSX.Element) | null;\nexport type TableScrollToIndexHandler = (index: number, options?: { align: 'start' | 'center' | 'end' | 'auto' }) => void;\nexport type TableServerLoadPageHandler = (\n pageIndex: number,\n sorting: TableColumnSort[],\n filters: TableColumnFilter[],\n search: string | undefined\n) => Promise<void>;\nexport type TableServerLoadAllHandler = (\n sorting: TableColumnSort[],\n filters: TableColumnFilter[],\n search: string | undefined\n) => Promise<void>;\nexport enum TableServerLoadAllState {\n Incomplete,\n Loading,\n Completed,\n}\nexport type TableSettingsHandler = (settings: TableSettings) => void | Promise<void>;\nexport type TableShortcuts<TType = unknown> = Record<string, TableShortcutHandlerFn<TType> | TableShortcutHandlerObject<TType>>;\nexport type TableSortHandler = (sorting: TableColumnSort[]) => void;\nexport type TableCustomSettingsRenderer = (props: TableSettings) => React.ReactElement<MenuItemProps>[];\nexport type TableEmptyStateRenderer = () => JSX.Element | null;\n\n// settings\nexport type TableSettings = {\n columnFilters?: ReactTableColumnFilterState;\n columnOrder?: ReactTableColumnOrderState;\n columnPinning?: ReactTableColumnPinningState;\n columnSizing?: ReactTableColumnSizingState;\n columnVisibility?: ReactTableColumnVisibilityState;\n excludeUnmatchedRecordsInSearch?: boolean;\n fontSize?: TableFontSize;\n grouping?: ReactTableGroupingState;\n rowHeight?: TableRowHeight;\n searchQuery?: string;\n sorting?: ReactTableSortingState;\n};\nexport type TableEnableSettingsOptions = {\n columnOrder: boolean;\n columnPinning: boolean;\n columnSizing: boolean;\n columnVisibility: boolean;\n excludeUnmatchedRecordsInSearch: boolean;\n fontSize: boolean;\n grouping: boolean;\n rowHeight: boolean;\n sorting: boolean;\n};\n\n// props\nexport type TableFeatureProps = {\n // react-table built-in\n enableFiltering?: boolean;\n enableSearch?: boolean;\n enableSorting?: boolean;\n enableColumnFreezing?: boolean;\n enableColumnHiding?: boolean;\n enableColumnResizing?: boolean;\n enableRowExpansion?: boolean;\n enableRowSelection?: boolean;\n enableRowSelectionSingle?: boolean;\n\n // custom -- common between all table types\n enableColumnOrdering?: boolean;\n enableFontSize?: boolean;\n enableFooter?: boolean;\n enablePrinting?: boolean;\n enableRowActions?: boolean;\n enableRowActive?: boolean;\n enableRowClick?: boolean;\n enableRowDrag?: boolean;\n enableRowDrop?: boolean;\n enableRowGoto?: boolean;\n enableRowHeight?: boolean;\n enableSaveSettings?: boolean | Partial<TableEnableSettingsOptions>;\n};\n\nexport type TableCommonProps<TType = unknown> = TableFeatureProps & {\n children: (JSX.Element | boolean | null | undefined)[];\n data: TType[];\n id: string;\n\n // misc\n customSettings?: TableCustomSettingsRenderer;\n defaultColumnFreezingIndex?: number;\n defaultRowActiveIndex?: number;\n defaultRowGroupColumnId?: keyof TType;\n defaultSettings?: TableSettings;\n emptyState?: TableEmptyStateRenderer;\n preset?: TablePreset;\n rowActions?: TableRowActionRenderer<TType>[];\n rowActionsForGroup?: TableRowActionGroupRenderer<TType>[];\n rowActionsLength?: number;\n rowExpansionRenderer?: TableRowExpansionRenderer<TType>;\n rowIdentityColumnId?: string;\n shortcuts?: TableShortcuts<TType>;\n toolbarLeft?: JSX.Element;\n toolbarRight?: JSX.Element;\n toolbarPanel?: JSX.Element;\n\n // handlers\n onRowClick?: TableRowClickHandler<TType>;\n onRowDrag?: TableRowDragHandler<TType>;\n onRowDrop?: TableRowDropHandler<TType>;\n onRowGoto?: TableRowGotoHandler;\n onRowSelect?: TableRowSelectHandler<TType>;\n\n // state change handlers\n onChangeFilter?: TableFilterHandler;\n onChangeSearch?: TODO; // not currently supported\n onChangeSettings?: TableSettingsHandler;\n onChangeSort?: TableSortHandler;\n};\n\nexport interface TableClientProps<TType = unknown> extends TableCommonProps<TType> {\n length?: never;\n loadAll?: never;\n loadPage?: never;\n pageSize?: never;\n}\n\nexport interface TableServerProps<TType = unknown> extends TableCommonProps<TType> {\n length: number | undefined;\n loadAll: TableServerLoadAllHandler;\n loadPage: TableServerLoadPageHandler;\n pageSize?: number;\n}\n\nexport type TableProps<TType = unknown> = TableClientProps<TType> | TableServerProps<TType>;\n\nexport type TableColumnProps<TType = unknown> = ValueOf<{\n [Key in keyof TType]: {\n accessor?: Key;\n id: string;\n // renderers\n renderer?: TableColumnRenderer<TType, TType[Key]>;\n /** Renderer to use if the cell is an aggregate cell and part of a grouped row */\n aggregate?: TableColumnRendererAggregate<TType, TType[Key]>;\n control?: TableColumnRendererControl<TType>;\n footer?: TableColumnRendererFooter<TType[Key]>;\n header: TableColumnRendererHeader;\n // options\n /** Aggregation function to be used when the column is part of a grouped row */\n aggregationFn?: 'auto' | ReactTableBuiltInAggregationFn;\n align?: TableColumnAlignment;\n className?: TableColumnClassNameHandler<TType>;\n dataType?: TableColumnDataType;\n defaultHidden?: boolean;\n defaultWidth?: TableColumnWidth;\n enableFiltering?: boolean;\n enableGrouping?: boolean;\n enableHiding?: boolean;\n enableOrdering?: boolean;\n enablePrinting?: boolean;\n enableResizing?: boolean;\n enableSearch?: boolean;\n enableSorting?: boolean;\n enableTruncate?: boolean;\n filters?: TableFilterComparator[];\n headerClassName?: string;\n menu?: TableColumnMenu;\n minWidth?: number;\n sort?: TableColumnSortDirection;\n sortFn?: TableColumnSortFn<TType>;\n tooltip?: string;\n };\n}>;\n\nexport type TableGroupProps = {\n children: (JSX.Element | boolean | null | undefined)[];\n header: string;\n id: string;\n};\n\nexport type TableTexts = {\n columns: {\n actions: {\n tooltip: string;\n };\n drag: {\n tooltip: string;\n };\n expansion: {\n collapse: string;\n collapseAll: string;\n expand: string;\n expandAll: string;\n };\n menu: {\n editFilter: string;\n filter: string;\n freezeFirstColumn: string;\n freezeUptoColumn: string;\n gotoRow: string;\n hideColumn: string;\n unfreezeColumns: string;\n sorting: string;\n sortingOrder: {\n ascending: string;\n descending: string;\n unsorted: string;\n };\n };\n resize: {\n tooltip: string;\n };\n select: {\n deselect: string;\n deselectAll: string;\n select: string;\n selectAll: string;\n };\n };\n columnSettings: {\n button: string;\n noResults: string;\n search: string;\n tooltip: string;\n };\n filters: {\n button: string;\n buttons: {\n addFilter: string;\n clearFilters: string;\n };\n comparators: {\n contains: string;\n doesNotContain: string;\n isEqualTo: string;\n isNotEqualTo: string;\n isGreaterThan: string;\n isLessThan: string;\n isBetween: string;\n isEmpty: string;\n isNotEmpty: string;\n isBefore: string;\n isAfter: string;\n isLessThanOrEqualTo: string;\n isGreaterThanOrEqualTo: string;\n isOnOrBefore: string;\n isOnOrAfter: string;\n hasAnyOf: string;\n hasAllOf: string;\n hasNoneOf: string;\n };\n conditions: {\n and: string;\n where: string;\n };\n emptyFilter: {\n condition: string;\n value: string;\n };\n hiddenColumn: string;\n hiddenGroupedColumn: string;\n tooltip: string;\n total: string;\n };\n fontSize: {\n tooltip: string;\n sizes: {\n small: string;\n medium: string;\n large: string;\n };\n };\n footer: {\n summary: {\n count: string;\n records: string;\n selected: string;\n };\n };\n print: {\n error: string;\n loading: string;\n tooltip: string;\n warningDialog: {\n title: string;\n description: string;\n checkboxVisibilityLabel: string;\n cancelButtonText: string;\n printButtonText: string;\n };\n settingsDialog: {\n title: string;\n size: string;\n sizeA5: string;\n sizeA4: string;\n sizeA3: string;\n sizeLetter: string;\n sizeLegal: string;\n orientation: string;\n orientationLandscape: string;\n orientationPortrait: string;\n rows: string;\n rowsAll: string;\n rowsSelected: string;\n layout: string;\n layoutSplitGroups: string;\n };\n };\n rowHeight: {\n tooltip: string;\n sizes: {\n short: string;\n medium: string;\n tall: string;\n extraTall: string;\n };\n };\n search: {\n excludeUnmatchedResults: string;\n placeholder: string;\n };\n otherOptions: {\n tooltip: string;\n };\n};\n"],"names":["TableFilterComparator","TableServerLoadAllState"],"mappings":"AA4BA;IACYA;AAAZ,WAAYA,qBAAqB;EAC7BA,yEAAQ;EACRA,qFAAc;EACdA,2EAAS;EACTA,iFAAY;EACZA,mFAAa;EACbA,6EAAU;EACVA,2EAAS;EACTA,uEAAO;EACPA,6EAAU;EACVA,+FAAmB;EACnBA,sGAAsB;EACtBA,0EAAQ;EACRA,0EAAQ;EACRA,4EAAS;AACb,CAAC,EAfWA,qBAAqB,KAArBA,qBAAqB;IA+GrBC;AAAZ,WAAYA,uBAAuB;EAC/BA,iFAAU;EACVA,2EAAO;EACPA,+EAAS;AACb,CAAC,EAJWA,uBAAuB,KAAvBA,uBAAuB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTableSettings.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/features/useTableSettings.ts"],"sourcesContent":["import React from 'react';\nimport { useLocalStorage } from '../../../../hooks/useLocalStorage';\nimport { useTacoSettings } from '../../../../hooks/useTacoSettings';\nimport { EnableSettingsOptions, TableSettings, TableSettingsHandler } from '../../types';\n\nconst DEFAULT_ENABLED_OPTIONS = {\n columnOrder: true,\n columnPinning: true,\n columnSizing: true,\n columnVisibility: true,\n excludeUnmatchedRecordsInSearch: true,\n fontSize: true,\n grouping: true,\n rowHeight: true,\n sorting: true,\n};\n\nexport function useUniqueTableId(tableId: string) {\n const tacoSettings = useTacoSettings();\n return `taco.${tacoSettings.uniqueUserIdentifier}.table.${tableId}.settings`;\n}\n\nfunction useEnabledSettings(isEnabled: boolean | Partial<EnableSettingsOptions>): [EnableSettingsOptions, boolean] {\n return React.useMemo(() => {\n if (isEnabled === false) {\n return [\n Object.keys(DEFAULT_ENABLED_OPTIONS).reduce((o, key) => ({ ...o, [key]: false }), {}) as EnableSettingsOptions,\n false,\n ];\n } else if (isEnabled === true) {\n return [DEFAULT_ENABLED_OPTIONS, true];\n }\n\n const options = { ...DEFAULT_ENABLED_OPTIONS, ...isEnabled };\n return [options, Object.values(options).some(o => o === true)];\n }, [isEnabled]);\n}\n\nexport function useTableSettings(\n isEnabled: boolean | Partial<EnableSettingsOptions> = false,\n id: string,\n defaultSettings: TableSettings | undefined = {},\n onChangeSettings: TableSettingsHandler | undefined\n): [TableSettings, TableSettingsHandler] {\n const uniqueId = useUniqueTableId(id);\n const [enabledSettings, hasSomeEnabledSettings] = useEnabledSettings(isEnabled);\n\n const [persistedSettings, _setPersistedSettings] = useLocalStorage<TableSettings>(\n hasSomeEnabledSettings ? uniqueId : undefined,\n removeDisabledSettings(defaultSettings, enabledSettings)\n );\n\n const setPersistedSettings = React.useCallback(\n (value: TableSettings) => {\n if (!hasSomeEnabledSettings) {\n return;\n }\n\n const sanitizedSettings = removeDisabledSettings(value, enabledSettings);\n _setPersistedSettings(sanitizedSettings);\n\n if (typeof onChangeSettings === 'function') {\n onChangeSettings(sanitizedSettings);\n }\n },\n [hasSomeEnabledSettings, onChangeSettings, JSON.stringify(enabledSettings)]\n );\n\n if (!hasSomeEnabledSettings) {\n return [defaultSettings, () => undefined];\n }\n\n return [persistedSettings, setPersistedSettings];\n}\n\nfunction removeDisabledSettings(settings: TableSettings, enabledSettings: EnableSettingsOptions) {\n const sanitizedSettings: TableSettings = { ...settings };\n\n Object.keys(enabledSettings).forEach(setting => {\n if (!enabledSettings[setting]) {\n delete sanitizedSettings[setting];\n }\n });\n\n return sanitizedSettings;\n}\n"],"names":["DEFAULT_ENABLED_OPTIONS","columnOrder","columnPinning","columnSizing","columnVisibility","excludeUnmatchedRecordsInSearch","fontSize","grouping","rowHeight","sorting","useUniqueTableId","tableId","tacoSettings","useTacoSettings","uniqueUserIdentifier","useEnabledSettings","isEnabled","React","useMemo","Object","keys","reduce","o","key","options","values","some","useTableSettings","id","defaultSettings","onChangeSettings","uniqueId","enabledSettings","hasSomeEnabledSettings","persistedSettings","_setPersistedSettings","useLocalStorage","undefined","removeDisabledSettings","setPersistedSettings","useCallback","value","sanitizedSettings","JSON","stringify","settings","forEach","setting"],"mappings":";;;;AAKA,MAAMA,uBAAuB,GAAG;EAC5BC,WAAW,EAAE,IAAI;EACjBC,aAAa,EAAE,IAAI;EACnBC,YAAY,EAAE,IAAI;EAClBC,gBAAgB,EAAE,IAAI;EACtBC,+BAA+B,EAAE,IAAI;EACrCC,QAAQ,EAAE,IAAI;EACdC,QAAQ,EAAE,IAAI;EACdC,SAAS,EAAE,IAAI;EACfC,OAAO,EAAE;CACZ;SAEeC,gBAAgBA,CAACC,OAAe;EAC5C,MAAMC,YAAY,GAAGC,eAAe,EAAE;EACtC,eAAeD,YAAY,CAACE,8BAA8BH,kBAAkB;AAChF;AAEA,SAASI,kBAAkBA,CAACC,SAAmD;EAC3E,OAAOC,cAAK,CAACC,OAAO,CAAC;IACjB,IAAIF,SAAS,KAAK,KAAK,EAAE;MACrB,OAAO,CACHG,MAAM,CAACC,IAAI,CAACpB,uBAAuB,CAAC,CAACqB,MAAM,CAAC,CAACC,CAAC,EAAEC,GAAG,MAAM;QAAE,GAAGD,CAAC;QAAE,CAACC,GAAG,GAAG;OAAO,CAAC,EAAE,EAAE,CAA0B,EAC9G,KAAK,CACR;KACJ,MAAM,IAAIP,SAAS,KAAK,IAAI,EAAE;MAC3B,OAAO,CAAChB,uBAAuB,EAAE,IAAI,CAAC;;IAG1C,MAAMwB,OAAO,GAAG;MAAE,GAAGxB,uBAAuB;MAAE,GAAGgB;KAAW;IAC5D,OAAO,CAACQ,OAAO,EAAEL,MAAM,CAACM,MAAM,CAACD,OAAO,CAAC,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CAAC,EAAE;MAC3B,OAAOL,iBAAiB,CAACK,OAAO,CAAC;;GAExC,CAAC;EAEF,OAAOL,iBAAiB;AAC5B;;;;"}
1
+ {"version":3,"file":"useTableSettings.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/features/useTableSettings.ts"],"sourcesContent":["import React from 'react';\nimport { useLocalStorage } from '../../../../hooks/useLocalStorage';\nimport { useTacoSettings } from '../../../../hooks/useTacoSettings';\nimport { TableEnableSettingsOptions, TableSettings, TableSettingsHandler } from '../../types';\n\nconst DEFAULT_ENABLED_OPTIONS = {\n columnOrder: true,\n columnPinning: true,\n columnSizing: true,\n columnVisibility: true,\n excludeUnmatchedRecordsInSearch: true,\n fontSize: true,\n grouping: true,\n rowHeight: true,\n sorting: true,\n};\n\nexport function useUniqueTableId(tableId: string) {\n const tacoSettings = useTacoSettings();\n return `taco.${tacoSettings.uniqueUserIdentifier}.table.${tableId}.settings`;\n}\n\nfunction useEnabledSettings(isEnabled: boolean | Partial<TableEnableSettingsOptions>): [TableEnableSettingsOptions, boolean] {\n return React.useMemo(() => {\n if (isEnabled === false) {\n return [\n Object.keys(DEFAULT_ENABLED_OPTIONS).reduce(\n (o, key) => ({ ...o, [key]: false }),\n {}\n ) as TableEnableSettingsOptions,\n false,\n ];\n } else if (isEnabled === true) {\n return [DEFAULT_ENABLED_OPTIONS, true];\n }\n\n const options = { ...DEFAULT_ENABLED_OPTIONS, ...isEnabled };\n return [options, Object.values(options).some(o => o === true)];\n }, [isEnabled]);\n}\n\nexport function useTableSettings(\n isEnabled: boolean | Partial<TableEnableSettingsOptions> = false,\n id: string,\n defaultSettings: TableSettings | undefined = {},\n onChangeSettings: TableSettingsHandler | undefined\n): [TableSettings, TableSettingsHandler] {\n const uniqueId = useUniqueTableId(id);\n const [enabledSettings, hasSomeEnabledSettings] = useEnabledSettings(isEnabled);\n\n const [persistedSettings, _setPersistedSettings] = useLocalStorage<TableSettings>(\n hasSomeEnabledSettings ? uniqueId : undefined,\n removeDisabledSettings(defaultSettings, enabledSettings)\n );\n\n const setPersistedSettings = React.useCallback(\n (value: TableSettings) => {\n if (!hasSomeEnabledSettings) {\n return;\n }\n\n const sanitizedSettings = removeDisabledSettings(value, enabledSettings);\n _setPersistedSettings(sanitizedSettings);\n\n if (typeof onChangeSettings === 'function') {\n onChangeSettings(sanitizedSettings);\n }\n },\n [hasSomeEnabledSettings, onChangeSettings, JSON.stringify(enabledSettings)]\n );\n\n if (!hasSomeEnabledSettings) {\n return [defaultSettings, () => undefined];\n }\n\n return [persistedSettings, setPersistedSettings];\n}\n\nfunction removeDisabledSettings(settings: TableSettings, enabledSettings: TableEnableSettingsOptions) {\n const sanitizedSettings: TableSettings = { ...settings };\n\n Object.keys(enabledSettings).forEach(setting => {\n if (!enabledSettings[setting]) {\n delete sanitizedSettings[setting];\n }\n });\n\n return sanitizedSettings;\n}\n"],"names":["DEFAULT_ENABLED_OPTIONS","columnOrder","columnPinning","columnSizing","columnVisibility","excludeUnmatchedRecordsInSearch","fontSize","grouping","rowHeight","sorting","useUniqueTableId","tableId","tacoSettings","useTacoSettings","uniqueUserIdentifier","useEnabledSettings","isEnabled","React","useMemo","Object","keys","reduce","o","key","options","values","some","useTableSettings","id","defaultSettings","onChangeSettings","uniqueId","enabledSettings","hasSomeEnabledSettings","persistedSettings","_setPersistedSettings","useLocalStorage","undefined","removeDisabledSettings","setPersistedSettings","useCallback","value","sanitizedSettings","JSON","stringify","settings","forEach","setting"],"mappings":";;;;AAKA,MAAMA,uBAAuB,GAAG;EAC5BC,WAAW,EAAE,IAAI;EACjBC,aAAa,EAAE,IAAI;EACnBC,YAAY,EAAE,IAAI;EAClBC,gBAAgB,EAAE,IAAI;EACtBC,+BAA+B,EAAE,IAAI;EACrCC,QAAQ,EAAE,IAAI;EACdC,QAAQ,EAAE,IAAI;EACdC,SAAS,EAAE,IAAI;EACfC,OAAO,EAAE;CACZ;SAEeC,gBAAgBA,CAACC,OAAe;EAC5C,MAAMC,YAAY,GAAGC,eAA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AsB,CAACG,KAAK,EAAET,eAAe,CAAC;IACxEG,qBAAqB,CAACO,iBAAiB,CAAC;IAExC,IAAI,OAAOZ,gBAAgB,KAAK,UAAU,EAAE;MACxCA,gBAAgB,CAACY,iBAAiB,CAAC;;GAE1C,EACD,CAACT,sBAAsB,EAAEH,gBAAgB,EAAEa,IAAI,CAACC,SAAS,CAACZ,eAAe,CAAC,CAAC,CAC9E;EAED,IAAI,CAACC,sBAAsB,EAAE;IACzB,OAAO,CAACJ,eAAe,EAAE,MAAMQ,SAAS,CAAC;;EAG7C,OAAO,CAACH,iBAAiB,EAAEK,oBAAoB,CAAC;AACpD;AAEA,SAASD,sBAAsBA,CAACO,QAAuB,EAAEb,eAA2C;EAChG,MAAMU,iBAAiB,GAAkB;IAAE,GAAGG;GAAU;EAExD1B,MAAM,CAACC,IAAI,CAACY,eAAe,CAAC,CAACc,OAAO,CAACC,OAAO;IACxC,IAAI,CAACf,eAAe,CAACe,OAAO,CAAC,EAAE;MAC3B,OAAOL,iBAAiB,CAACK,OAAO,CAAC;;GAExC,CAAC;EAEF,OAAOL,iBAAiB;AAC5B;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { useTable } from './useTable';
2
+ import { useTableReturnValue } from './useTable';
3
3
  import { TableToolbar } from './components/Toolbar/Toolbar';
4
4
  import './style.css';
5
5
  declare type TableProps = {
@@ -10,10 +10,10 @@ export declare namespace Table {
10
10
  var Toolbar: typeof TableToolbar;
11
11
  var Grid: typeof TableGrid;
12
12
  }
13
- export declare type TableGridProps = React.TableHTMLAttributes<HTMLTableElement> & {
13
+ export declare type TableGridProps<TType = unknown> = React.TableHTMLAttributes<HTMLTableElement> & {
14
14
  'data-taco': string;
15
15
  enableHorizontalArrowKeyNavigation?: boolean;
16
- table: ReturnType<typeof useTable>;
16
+ table: useTableReturnValue<TType>;
17
17
  };
18
- export declare function TableGrid(props: TableGridProps): JSX.Element;
18
+ export declare function TableGrid<TType = unknown>(props: TableGridProps<TType>): JSX.Element;
19
19
  export {};