@economic/taco 2.45.0-alpha.1 → 2.45.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (463) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +2 -2
  2. package/dist/components/Alert/Alert.d.ts +1 -1
  3. package/dist/components/AlertDialog/AlertDialog.d.ts +2 -1
  4. package/dist/components/AlertDialog/components/Content.d.ts +3 -1
  5. package/dist/components/Calendar/Calendar.d.ts +1 -1
  6. package/dist/components/Datepicker/Datepicker.d.ts +1 -1
  7. package/dist/components/Dialog/components/Content.d.ts +1 -1
  8. package/dist/components/Dialog/components/DialogDrawer.d.ts +2 -2
  9. package/dist/components/Drawer/components/Content.d.ts +2 -2
  10. package/dist/components/Header/components/Agreement/Badge.d.ts +1 -1
  11. package/dist/components/Header/components/Agreement/Display.d.ts +2 -2
  12. package/dist/components/Header/components/Agreement/Item.d.ts +2 -2
  13. package/dist/components/Header/components/AgreementSelector.d.ts +2 -2
  14. package/dist/components/Header/components/Button.d.ts +1 -1
  15. package/dist/components/HoverCard/HoverCard.d.ts +1 -1
  16. package/dist/components/Icon/components/AccountPreview.d.ts +1 -1
  17. package/dist/components/Icon/components/Accounting.d.ts +1 -1
  18. package/dist/components/Icon/components/AccountingYear.d.ts +1 -1
  19. package/dist/components/Icon/components/AccountingYearCancel.d.ts +1 -1
  20. package/dist/components/Icon/components/AiChatSolid.d.ts +1 -1
  21. package/dist/components/Icon/components/AiStars.d.ts +1 -1
  22. package/dist/components/Icon/components/ArrowBottom.d.ts +1 -1
  23. package/dist/components/Icon/components/ArrowDown.d.ts +1 -1
  24. package/dist/components/Icon/components/ArrowEnd.d.ts +1 -1
  25. package/dist/components/Icon/components/ArrowLeft.d.ts +1 -1
  26. package/dist/components/Icon/components/ArrowRight.d.ts +1 -1
  27. package/dist/components/Icon/components/ArrowStart.d.ts +1 -1
  28. package/dist/components/Icon/components/ArrowTop.d.ts +1 -1
  29. package/dist/components/Icon/components/ArrowUp.d.ts +1 -1
  30. package/dist/components/Icon/components/Attach.d.ts +1 -1
  31. package/dist/components/Icon/components/AttachAuto.d.ts +1 -1
  32. package/dist/components/Icon/components/AttachCancel.d.ts +1 -1
  33. package/dist/components/Icon/components/AttachWarning.d.ts +1 -1
  34. package/dist/components/Icon/components/Autotext.d.ts +1 -1
  35. package/dist/components/Icon/components/AutotextInsert.d.ts +1 -1
  36. package/dist/components/Icon/components/Basic.d.ts +1 -1
  37. package/dist/components/Icon/components/BasicTabs.d.ts +1 -1
  38. package/dist/components/Icon/components/BellSolid.d.ts +1 -1
  39. package/dist/components/Icon/components/Book.d.ts +1 -1
  40. package/dist/components/Icon/components/Booking.d.ts +1 -1
  41. package/dist/components/Icon/components/Budget.d.ts +1 -1
  42. package/dist/components/Icon/components/Calendar.d.ts +1 -1
  43. package/dist/components/Icon/components/CashAccount.d.ts +1 -1
  44. package/dist/components/Icon/components/CashReports.d.ts +1 -1
  45. package/dist/components/Icon/components/ChartArea.d.ts +1 -1
  46. package/dist/components/Icon/components/ChartBar.d.ts +1 -1
  47. package/dist/components/Icon/components/ChartLine.d.ts +1 -1
  48. package/dist/components/Icon/components/ChartPie.d.ts +1 -1
  49. package/dist/components/Icon/components/ChartTable.d.ts +1 -1
  50. package/dist/components/Icon/components/Chat.d.ts +1 -1
  51. package/dist/components/Icon/components/ChatSolid.d.ts +1 -1
  52. package/dist/components/Icon/components/ChevronDown.d.ts +1 -1
  53. package/dist/components/Icon/components/ChevronDownDouble.d.ts +1 -1
  54. package/dist/components/Icon/components/ChevronDownSolid.d.ts +1 -1
  55. package/dist/components/Icon/components/ChevronLeft.d.ts +1 -1
  56. package/dist/components/Icon/components/ChevronLeftDouble.d.ts +1 -1
  57. package/dist/components/Icon/components/ChevronLeftSolid.d.ts +1 -1
  58. package/dist/components/Icon/components/ChevronRight.d.ts +1 -1
  59. package/dist/components/Icon/components/ChevronRightDouble.d.ts +1 -1
  60. package/dist/components/Icon/components/ChevronRightSolid.d.ts +1 -1
  61. package/dist/components/Icon/components/ChevronUp.d.ts +1 -1
  62. package/dist/components/Icon/components/ChevronUpDouble.d.ts +1 -1
  63. package/dist/components/Icon/components/ChevronUpSolid.d.ts +1 -1
  64. package/dist/components/Icon/components/CircleClose.d.ts +1 -1
  65. package/dist/components/Icon/components/CircleInformation.d.ts +1 -1
  66. package/dist/components/Icon/components/CircleMinus.d.ts +1 -1
  67. package/dist/components/Icon/components/CirclePlus.d.ts +1 -1
  68. package/dist/components/Icon/components/CircleQuestionmark.d.ts +1 -1
  69. package/dist/components/Icon/components/CircleTick.d.ts +1 -1
  70. package/dist/components/Icon/components/CircleWarning.d.ts +1 -1
  71. package/dist/components/Icon/components/Clamp.d.ts +1 -1
  72. package/dist/components/Icon/components/ClampOpen.d.ts +1 -1
  73. package/dist/components/Icon/components/Close.d.ts +1 -1
  74. package/dist/components/Icon/components/ColumnFreeze.d.ts +1 -1
  75. package/dist/components/Icon/components/ColumnUnfreeze.d.ts +1 -1
  76. package/dist/components/Icon/components/Columns.d.ts +1 -1
  77. package/dist/components/Icon/components/ConnectionEnable.d.ts +1 -1
  78. package/dist/components/Icon/components/ConnectionRevoke.d.ts +1 -1
  79. package/dist/components/Icon/components/Contacts.d.ts +1 -1
  80. package/dist/components/Icon/components/Copy.d.ts +1 -1
  81. package/dist/components/Icon/components/Courses.d.ts +1 -1
  82. package/dist/components/Icon/components/Credit.d.ts +1 -1
  83. package/dist/components/Icon/components/Delete.d.ts +1 -1
  84. package/dist/components/Icon/components/DeletePermanently.d.ts +1 -1
  85. package/dist/components/Icon/components/Depecriate.d.ts +1 -1
  86. package/dist/components/Icon/components/Developer.d.ts +1 -1
  87. package/dist/components/Icon/components/DistributionTemplate.d.ts +1 -1
  88. package/dist/components/Icon/components/Document.d.ts +1 -1
  89. package/dist/components/Icon/components/DocumentApprove.d.ts +1 -1
  90. package/dist/components/Icon/components/DocumentCreateEntry.d.ts +1 -1
  91. package/dist/components/Icon/components/DocumentCut.d.ts +1 -1
  92. package/dist/components/Icon/components/DocumentError.d.ts +1 -1
  93. package/dist/components/Icon/components/DocumentIsolatePage.d.ts +1 -1
  94. package/dist/components/Icon/components/DocumentMerge.d.ts +1 -1
  95. package/dist/components/Icon/components/DocumentMove.d.ts +1 -1
  96. package/dist/components/Icon/components/DocumentPreview.d.ts +1 -1
  97. package/dist/components/Icon/components/DocumentReceived.d.ts +1 -1
  98. package/dist/components/Icon/components/DocumentRejectedRequest.d.ts +1 -1
  99. package/dist/components/Icon/components/DocumentSigned.d.ts +1 -1
  100. package/dist/components/Icon/components/DocumentSignedSolid.d.ts +1 -1
  101. package/dist/components/Icon/components/DocumentSplit.d.ts +1 -1
  102. package/dist/components/Icon/components/DocumentTime.d.ts +1 -1
  103. package/dist/components/Icon/components/Download.d.ts +1 -1
  104. package/dist/components/Icon/components/Drag.d.ts +1 -1
  105. package/dist/components/Icon/components/ECopedia.d.ts +1 -1
  106. package/dist/components/Icon/components/Edit.d.ts +1 -1
  107. package/dist/components/Icon/components/EditSimple.d.ts +1 -1
  108. package/dist/components/Icon/components/EllipsisHorizontal.d.ts +1 -1
  109. package/dist/components/Icon/components/EllipsisVertical.d.ts +1 -1
  110. package/dist/components/Icon/components/EntriesOnAccount.d.ts +1 -1
  111. package/dist/components/Icon/components/EntriesOpen.d.ts +1 -1
  112. package/dist/components/Icon/components/EntriesWarning.d.ts +1 -1
  113. package/dist/components/Icon/components/EntryTypeCustomerInvoice.d.ts +1 -1
  114. package/dist/components/Icon/components/EntryTypeCustomerPayment.d.ts +1 -1
  115. package/dist/components/Icon/components/EntryTypeJournalEntry.d.ts +1 -1
  116. package/dist/components/Icon/components/EntryTypeManualCustomerInvoice.d.ts +1 -1
  117. package/dist/components/Icon/components/EntryTypeSupplierInvoice.d.ts +1 -1
  118. package/dist/components/Icon/components/EntryTypeSupplierPayment.d.ts +1 -1
  119. package/dist/components/Icon/components/Envelope.d.ts +1 -1
  120. package/dist/components/Icon/components/EnvelopeApproved.d.ts +1 -1
  121. package/dist/components/Icon/components/EnvelopeSolid.d.ts +1 -1
  122. package/dist/components/Icon/components/ExpandView.d.ts +1 -1
  123. package/dist/components/Icon/components/Expenses.d.ts +1 -1
  124. package/dist/components/Icon/components/Export.d.ts +1 -1
  125. package/dist/components/Icon/components/ExportToExcel.d.ts +1 -1
  126. package/dist/components/Icon/components/ExportToPdf.d.ts +1 -1
  127. package/dist/components/Icon/components/EyeOff.d.ts +1 -1
  128. package/dist/components/Icon/components/EyeOn.d.ts +1 -1
  129. package/dist/components/Icon/components/Filter.d.ts +1 -1
  130. package/dist/components/Icon/components/FilterSolid.d.ts +1 -1
  131. package/dist/components/Icon/components/FontSize.d.ts +1 -1
  132. package/dist/components/Icon/components/GraphSolid.d.ts +1 -1
  133. package/dist/components/Icon/components/Hash.d.ts +1 -1
  134. package/dist/components/Icon/components/HeightExtraTall.d.ts +1 -1
  135. package/dist/components/Icon/components/HeightMedium.d.ts +1 -1
  136. package/dist/components/Icon/components/HeightShort.d.ts +1 -1
  137. package/dist/components/Icon/components/HeightTall.d.ts +1 -1
  138. package/dist/components/Icon/components/House.d.ts +1 -1
  139. package/dist/components/Icon/components/HouseSolid.d.ts +1 -1
  140. package/dist/components/Icon/components/Id.d.ts +1 -1
  141. package/dist/components/Icon/components/Images.d.ts +1 -1
  142. package/dist/components/Icon/components/Import.d.ts +1 -1
  143. package/dist/components/Icon/components/Inbox.d.ts +1 -1
  144. package/dist/components/Icon/components/InboxEinvoicing.d.ts +1 -1
  145. package/dist/components/Icon/components/InboxScanning.d.ts +1 -1
  146. package/dist/components/Icon/components/InboxSmart.d.ts +1 -1
  147. package/dist/components/Icon/components/Info.d.ts +1 -1
  148. package/dist/components/Icon/components/Inventory.d.ts +1 -1
  149. package/dist/components/Icon/components/InventoryMatrix.d.ts +1 -1
  150. package/dist/components/Icon/components/JournalPro.d.ts +1 -1
  151. package/dist/components/Icon/components/Layout.d.ts +1 -1
  152. package/dist/components/Icon/components/LayoutBoth.d.ts +1 -1
  153. package/dist/components/Icon/components/LayoutFirst.d.ts +1 -1
  154. package/dist/components/Icon/components/LayoutLast.d.ts +1 -1
  155. package/dist/components/Icon/components/LayoutNone.d.ts +1 -1
  156. package/dist/components/Icon/components/LedgerCard.d.ts +1 -1
  157. package/dist/components/Icon/components/LedgerCardCustomerReminder.d.ts +1 -1
  158. package/dist/components/Icon/components/LedgerCardManualCustomerInvoice.d.ts +1 -1
  159. package/dist/components/Icon/components/LedgerCardObsoleteStock.d.ts +1 -1
  160. package/dist/components/Icon/components/LedgerCardOpeningEntry.d.ts +1 -1
  161. package/dist/components/Icon/components/LedgerCardReservedEntry.d.ts +1 -1
  162. package/dist/components/Icon/components/LedgerCardShrinkagePilferage.d.ts +1 -1
  163. package/dist/components/Icon/components/LedgerCardStockAdjustment.d.ts +1 -1
  164. package/dist/components/Icon/components/LedgerCardTransferredOpeningEntry.d.ts +1 -1
  165. package/dist/components/Icon/components/Lightbulb.d.ts +1 -1
  166. package/dist/components/Icon/components/Line.d.ts +1 -1
  167. package/dist/components/Icon/components/LinkExternal.d.ts +1 -1
  168. package/dist/components/Icon/components/List.d.ts +1 -1
  169. package/dist/components/Icon/components/ListBulleted.d.ts +1 -1
  170. package/dist/components/Icon/components/ListSearch.d.ts +1 -1
  171. package/dist/components/Icon/components/Location.d.ts +1 -1
  172. package/dist/components/Icon/components/Lock.d.ts +1 -1
  173. package/dist/components/Icon/components/LockOpen.d.ts +1 -1
  174. package/dist/components/Icon/components/Log.d.ts +1 -1
  175. package/dist/components/Icon/components/LogOut.d.ts +1 -1
  176. package/dist/components/Icon/components/Market.d.ts +1 -1
  177. package/dist/components/Icon/components/MastercardOs.d.ts +1 -1
  178. package/dist/components/Icon/components/MatchAmount.d.ts +1 -1
  179. package/dist/components/Icon/components/MatchEntries.d.ts +1 -1
  180. package/dist/components/Icon/components/Menu.d.ts +1 -1
  181. package/dist/components/Icon/components/Mileage.d.ts +1 -1
  182. package/dist/components/Icon/components/ModalResize.d.ts +1 -1
  183. package/dist/components/Icon/components/ModalShrink.d.ts +1 -1
  184. package/dist/components/Icon/components/More.d.ts +1 -1
  185. package/dist/components/Icon/components/MoreSolid.d.ts +1 -1
  186. package/dist/components/Icon/components/Move.d.ts +1 -1
  187. package/dist/components/Icon/components/NavigationList.d.ts +1 -1
  188. package/dist/components/Icon/components/Note.d.ts +1 -1
  189. package/dist/components/Icon/components/NoteFollowUp.d.ts +1 -1
  190. package/dist/components/Icon/components/NoteRead.d.ts +1 -1
  191. package/dist/components/Icon/components/NovemberFirst.d.ts +1 -1
  192. package/dist/components/Icon/components/Numbers.d.ts +1 -1
  193. package/dist/components/Icon/components/PartnerApi.d.ts +1 -1
  194. package/dist/components/Icon/components/PaymentPaid.d.ts +1 -1
  195. package/dist/components/Icon/components/PaymentUnpaid.d.ts +1 -1
  196. package/dist/components/Icon/components/Period.d.ts +1 -1
  197. package/dist/components/Icon/components/PersonChange.d.ts +1 -1
  198. package/dist/components/Icon/components/PersonMinus.d.ts +1 -1
  199. package/dist/components/Icon/components/PersonPlus.d.ts +1 -1
  200. package/dist/components/Icon/components/PersonTick.d.ts +1 -1
  201. package/dist/components/Icon/components/Phone.d.ts +1 -1
  202. package/dist/components/Icon/components/PhoneSolid.d.ts +1 -1
  203. package/dist/components/Icon/components/Play.d.ts +1 -1
  204. package/dist/components/Icon/components/PlusMinus.d.ts +1 -1
  205. package/dist/components/Icon/components/Print.d.ts +1 -1
  206. package/dist/components/Icon/components/ProcessPayment.d.ts +1 -1
  207. package/dist/components/Icon/components/ProductLedgerCard.d.ts +1 -1
  208. package/dist/components/Icon/components/Profile.d.ts +1 -1
  209. package/dist/components/Icon/components/ProjectCards.d.ts +1 -1
  210. package/dist/components/Icon/components/Projects.d.ts +1 -1
  211. package/dist/components/Icon/components/QuestionMark.d.ts +1 -1
  212. package/dist/components/Icon/components/QuestionMarkBold.d.ts +1 -1
  213. package/dist/components/Icon/components/Quicklinks.d.ts +1 -1
  214. package/dist/components/Icon/components/RatingBankruptcy.d.ts +1 -1
  215. package/dist/components/Icon/components/RatingPaymentProblems.d.ts +1 -1
  216. package/dist/components/Icon/components/Reconciled.d.ts +1 -1
  217. package/dist/components/Icon/components/Refresh.d.ts +1 -1
  218. package/dist/components/Icon/components/Report.d.ts +1 -1
  219. package/dist/components/Icon/components/ReportSolid.d.ts +1 -1
  220. package/dist/components/Icon/components/Restore.d.ts +1 -1
  221. package/dist/components/Icon/components/RotateLeft.d.ts +1 -1
  222. package/dist/components/Icon/components/RotateRight.d.ts +1 -1
  223. package/dist/components/Icon/components/Sales.d.ts +1 -1
  224. package/dist/components/Icon/components/Search.d.ts +1 -1
  225. package/dist/components/Icon/components/SearchBold.d.ts +1 -1
  226. package/dist/components/Icon/components/Secure.d.ts +1 -1
  227. package/dist/components/Icon/components/SecureTick.d.ts +1 -1
  228. package/dist/components/Icon/components/Settings.d.ts +1 -1
  229. package/dist/components/Icon/components/SettingsSolid.d.ts +1 -1
  230. package/dist/components/Icon/components/Shortcuts.d.ts +1 -1
  231. package/dist/components/Icon/components/ShowAll.d.ts +1 -1
  232. package/dist/components/Icon/components/ShowLess.d.ts +1 -1
  233. package/dist/components/Icon/components/ShowMore.d.ts +1 -1
  234. package/dist/components/Icon/components/ShowTemplate.d.ts +1 -1
  235. package/dist/components/Icon/components/Sliders.d.ts +1 -1
  236. package/dist/components/Icon/components/Smartpay.d.ts +1 -1
  237. package/dist/components/Icon/components/SortBy.d.ts +1 -1
  238. package/dist/components/Icon/components/Star.d.ts +1 -1
  239. package/dist/components/Icon/components/StarSolid.d.ts +1 -1
  240. package/dist/components/Icon/components/Subscriptions.d.ts +1 -1
  241. package/dist/components/Icon/components/SystemEntries.d.ts +1 -1
  242. package/dist/components/Icon/components/Tag.d.ts +1 -1
  243. package/dist/components/Icon/components/TemplateOverride.d.ts +1 -1
  244. package/dist/components/Icon/components/Templates.d.ts +1 -1
  245. package/dist/components/Icon/components/ThumbBoth.d.ts +1 -1
  246. package/dist/components/Icon/components/ThumbDown.d.ts +1 -1
  247. package/dist/components/Icon/components/ThumbDownSolid.d.ts +1 -1
  248. package/dist/components/Icon/components/ThumbUp.d.ts +1 -1
  249. package/dist/components/Icon/components/ThumbUpSolid.d.ts +1 -1
  250. package/dist/components/Icon/components/Tick.d.ts +1 -1
  251. package/dist/components/Icon/components/TickBold.d.ts +1 -1
  252. package/dist/components/Icon/components/Time.d.ts +1 -1
  253. package/dist/components/Icon/components/Transfer.d.ts +1 -1
  254. package/dist/components/Icon/components/TransferCancel.d.ts +1 -1
  255. package/dist/components/Icon/components/TransferLocked.d.ts +1 -1
  256. package/dist/components/Icon/components/Undo.d.ts +1 -1
  257. package/dist/components/Icon/components/Undock.d.ts +1 -1
  258. package/dist/components/Icon/components/Unreconciled.d.ts +1 -1
  259. package/dist/components/Icon/components/Warning.d.ts +1 -1
  260. package/dist/components/Icon/components/Webshop.d.ts +1 -1
  261. package/dist/components/Icon/components/Website.d.ts +1 -1
  262. package/dist/components/Icon/components/Workflow.d.ts +1 -1
  263. package/dist/components/Icon/components/WorkflowTemplateBasic.d.ts +1 -1
  264. package/dist/components/Icon/components/Zoom.d.ts +1 -1
  265. package/dist/components/IconButton/IconButton.d.ts +2 -2
  266. package/dist/components/Input/Input.d.ts +2 -2
  267. package/dist/components/Input/util.d.ts +1 -11
  268. package/dist/components/Layout/components/Sidebar.d.ts +2 -14
  269. package/dist/components/Layout/components/Top.d.ts +4 -4
  270. package/dist/components/List/List.d.ts +7 -7
  271. package/dist/components/List/components/Button.d.ts +1 -1
  272. package/dist/components/List/components/Collapsible.d.ts +1 -1
  273. package/dist/components/List/components/Group.d.ts +1 -1
  274. package/dist/components/List/components/Item.d.ts +1 -1
  275. package/dist/components/List/components/Link.d.ts +1 -1
  276. package/dist/components/List/components/Toggle.d.ts +2 -2
  277. package/dist/components/Listbox/Listbox.d.ts +2 -2
  278. package/dist/components/Listbox/ScrollableList.d.ts +1 -1
  279. package/dist/components/Listbox/util.d.ts +2 -2
  280. package/dist/components/Menu/components/Checkbox.d.ts +1 -1
  281. package/dist/components/Menu/components/Content.d.ts +2 -2
  282. package/dist/components/Menu/components/Item.d.ts +8 -8
  283. package/dist/components/Menu/components/Link.d.ts +1 -1
  284. package/dist/components/Menu/components/RadioGroup.d.ts +1 -1
  285. package/dist/components/Menu/components/SubMenu.d.ts +1 -1
  286. package/dist/components/Menu/components/Trigger.d.ts +1 -1
  287. package/dist/components/Navigation2/components/Group.d.ts +1 -1
  288. package/dist/components/Popover/Popover.d.ts +1 -1
  289. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  290. package/dist/components/ScrollArea/ScrollArea.d.ts +2 -2
  291. package/dist/components/SearchInput/SearchInput.d.ts +1 -1
  292. package/dist/components/Select/Select.d.ts +1 -1
  293. package/dist/components/Select2/components/All.d.ts +2 -2
  294. package/dist/components/Select2/components/Collection.d.ts +1 -1
  295. package/dist/components/Select2/components/Create.d.ts +1 -1
  296. package/dist/components/Select2/components/Edit.d.ts +2 -2
  297. package/dist/components/Select2/components/Group.d.ts +1 -1
  298. package/dist/components/Select2/components/Option.d.ts +1 -1
  299. package/dist/components/Select2/components/Search.d.ts +3 -9
  300. package/dist/components/Select2/components/Trigger.d.ts +1 -1
  301. package/dist/components/Select2/hooks/useChildren.d.ts +2 -2
  302. package/dist/components/Shortcut/Shortcut.d.ts +1 -1
  303. package/dist/components/Table3/components/Columns/Cell/Cell.d.ts +2 -2
  304. package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.d.ts +1 -1
  305. package/dist/components/Table3/components/Columns/Cell/EditingControlCell.d.ts +2 -2
  306. package/dist/components/Table3/components/Columns/Internal/EditingActionsMenu.d.ts +2 -2
  307. package/dist/components/Table3/components/Editing/Alert.d.ts +1 -1
  308. package/dist/components/Table3/components/Row/Editing/CreateRowButton.d.ts +2 -2
  309. package/dist/components/Table3/components/Row/Editing/SaveStatus.d.ts +2 -2
  310. package/dist/components/Table3/components/Row/Row.d.ts +2 -2
  311. package/dist/components/Table3/components/Toolbar/Editing/Editing.d.ts +1 -1
  312. package/dist/components/Table3/features/useTableEditing.d.ts +2 -2
  313. package/dist/components/Table3/util/editing.d.ts +1 -1
  314. package/dist/components/Tag/Tag.d.ts +2 -2
  315. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  316. package/dist/components/Tour/Tour.d.ts +3 -3
  317. package/dist/components/Truncate/Truncate.d.ts +1 -1
  318. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +6 -14
  319. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  320. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js +2 -1
  321. package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js.map +1 -1
  322. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js +7 -2
  323. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
  324. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  325. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  326. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +4 -3
  327. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  328. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  329. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +1 -0
  330. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  331. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  332. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +3 -5
  333. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  334. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  335. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  336. package/dist/esm/packages/taco/src/components/Layout/components/Top.js +2 -2
  337. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  338. package/dist/esm/packages/taco/src/components/Listbox/util.js +1 -7
  339. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  340. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  341. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  342. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  343. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  344. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +4 -4
  345. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  346. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  347. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  348. package/dist/esm/packages/taco/src/components/Select2/Select2.js +20 -39
  349. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  350. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +10 -11
  351. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  352. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +2 -0
  353. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  354. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  355. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +2 -12
  356. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  357. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +19 -1
  358. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  359. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  360. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  361. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  362. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  363. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +12 -0
  364. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  365. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  366. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  367. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateRowButton.js.map +1 -1
  368. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +1 -1
  369. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  370. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +1 -4
  371. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  372. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  373. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +2 -3
  374. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  375. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  376. package/dist/esm/packages/taco/src/components/Tour/Tour.js +3 -3
  377. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  378. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
  379. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
  380. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +18 -0
  381. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
  382. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js +0 -5
  383. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
  384. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +1 -0
  385. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
  386. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +1 -1
  387. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  388. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  389. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +4 -4
  390. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  391. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  392. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  393. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  394. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +2 -2
  395. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  396. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  397. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  398. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
  399. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  400. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  401. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +9 -4
  402. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  403. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  404. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  405. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  406. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  407. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  408. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  409. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +3 -3
  410. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
  411. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  412. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  413. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  414. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  415. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  416. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  417. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  418. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  419. package/dist/esm/packages/taco/src/utils/dom.js +15 -9
  420. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  421. package/dist/primitives/BubbleSelect.d.ts +1 -1
  422. package/dist/primitives/Collection/components/Root.d.ts +2 -0
  423. package/dist/primitives/Sortable/components/Container.d.ts +2 -2
  424. package/dist/primitives/Sortable/components/Item.d.ts +1 -2
  425. package/dist/primitives/Sortable/components/List.d.ts +1 -1
  426. package/dist/primitives/Table/Core/Table.d.ts +2 -2
  427. package/dist/primitives/Table/Core/components/Body/Body.d.ts +1 -1
  428. package/dist/primitives/Table/Core/components/Body/EmptyStateBody.d.ts +1 -1
  429. package/dist/primitives/Table/Core/components/Body/util.d.ts +4 -4
  430. package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.d.ts +2 -2
  431. package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.d.ts +2 -2
  432. package/dist/primitives/Table/Core/components/Columns/Cell/Cell.d.ts +1 -1
  433. package/dist/primitives/Table/Core/components/Columns/Internal/Actions.d.ts +2 -2
  434. package/dist/primitives/Table/Core/components/Footer/Footer.d.ts +3 -3
  435. package/dist/primitives/Table/Core/components/Footer/Summary.d.ts +2 -2
  436. package/dist/primitives/Table/Core/components/Header/Header.d.ts +1 -1
  437. package/dist/primitives/Table/Core/components/Header/components/Goto.d.ts +2 -2
  438. package/dist/primitives/Table/Core/components/Header/components/Menu.d.ts +1 -1
  439. package/dist/primitives/Table/Core/components/Header/components/Resizer.d.ts +2 -2
  440. package/dist/primitives/Table/Core/components/Header/components/SortIndicator.d.ts +3 -3
  441. package/dist/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.d.ts +2 -2
  442. package/dist/primitives/Table/Core/components/Row/Row.d.ts +1 -1
  443. package/dist/primitives/Table/Core/components/Toolbar/Toolbar.d.ts +1 -1
  444. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/Filters.d.ts +2 -2
  445. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.d.ts +2 -2
  446. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +2 -2
  447. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +1 -1
  448. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.d.ts +2 -2
  449. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.d.ts +2 -2
  450. package/dist/primitives/Table/Core/components/Toolbar/components/Print/Print.d.ts +1 -1
  451. package/dist/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.d.ts +2 -2
  452. package/dist/primitives/Table/Core/components/Toolbar/components/Search/Search.d.ts +1 -1
  453. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.d.ts +2 -2
  454. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/Settings.d.ts +2 -2
  455. package/dist/primitives/Table/Core/features/useTableStyle.d.ts +3 -3
  456. package/dist/primitives/Table/types.d.ts +1 -1
  457. package/dist/primitives/Table/useTableManager/util/settings.d.ts +1 -1
  458. package/dist/taco.cjs.development.js +146 -133
  459. package/dist/taco.cjs.development.js.map +1 -1
  460. package/dist/taco.cjs.production.min.js +1 -1
  461. package/dist/taco.cjs.production.min.js.map +1 -1
  462. package/dist/utils/dom.d.ts +1 -1
  463. package/package.json +26 -25
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/search.ts"],"sourcesContent":["import { Table as ReactTable, TableMeta as ReactTableMeta, Row as ReactTableRow } from '@tanstack/react-table';\nimport get from 'lodash/get';\nimport { isWeakContains } from './filtering';\nimport { getDataTypeProperties } from './dataTypes';\nimport { TableColumnDataType } from '../../types';\nimport { Localization } from '../../../../components/Provider/Localization';\n\nconst flattenCellValue = (cellValue: object | string) => {\n return typeof cellValue === 'object' ? Object.values(cellValue).map(flattenCellValue) : cellValue;\n};\n\nexport function isMatched<TType = unknown>(\n searchQuery: string,\n cellValue: any,\n dataType: TableColumnDataType | undefined,\n localization: Localization\n) {\n if (typeof cellValue === 'object') {\n return flattenCellValue(cellValue)\n .flat(Infinity)\n .find(y => isWeakContains(y, searchQuery));\n } else {\n const cellValueAsString = String(cellValue ?? '');\n\n if (cellValueAsString !== undefined && isWeakContains(cellValueAsString, searchQuery)) {\n return true;\n } else {\n const dataTypeProperties = getDataTypeProperties<TType>(dataType);\n\n if (dataTypeProperties.getDisplayValue) {\n const cellDisplayValue = dataTypeProperties.getDisplayValue(cellValue, { localization });\n\n if (cellDisplayValue !== undefined && isWeakContains(cellDisplayValue, searchQuery)) {\n return true;\n }\n }\n }\n }\n\n return false;\n}\n\nexport function globalFilterFn<TType = unknown>(\n row: ReactTableRow<TType>,\n columnId: string,\n searchQuery: string,\n localization: Localization\n) {\n try {\n if (row.original) {\n const cellValue = (row.original as any)[columnId];\n const dataType = row._getAllCellsByColumnId()[columnId]?.column.columnDef.meta?.dataType;\n return isMatched(searchQuery, cellValue, dataType, localization);\n }\n } catch {\n // we don't care, just fail silently and return no results\n }\n\n return false;\n}\n\nexport function resetHighlightedColumnIndexes<TType = unknown>(\n searchQuery: string | undefined,\n table: ReactTable<TType>,\n localization: Localization\n) {\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n let firstRowIndex: undefined | number;\n\n if (searchQuery) {\n const indexes: number[][] = [];\n const columns = table.getVisibleLeafColumns();\n const rowGrouping = table.getState().grouping;\n\n table.getRowModel().rows.forEach((row, rowIndex) => {\n columns.forEach((column, columnIndex) => {\n try {\n let allowSearch = true;\n\n if (rowGrouping?.length) {\n // if it's the grouped row, only allow search of the grouped column - because that's all that's visible\n if (row.getIsGrouped()) {\n allowSearch = column.getIsGrouped();\n }\n // otherwise for other rows, don't search the grouped column - because it isn't visible\n else if (rowGrouping.includes(column.id)) {\n allowSearch = false;\n }\n }\n\n if (column.getIsVisible() && column.columnDef.enableGlobalFilter && allowSearch) {\n const cellValue = get(row.original, column.id);\n const dataType = column.columnDef.meta?.dataType;\n\n if (isMatched(searchQuery, cellValue, dataType, localization)) {\n indexes.push([rowIndex, columnIndex]);\n }\n }\n } catch (e) {\n //\n }\n });\n });\n\n tableMeta.search.setHighlightedColumnIndexes(indexes);\n\n if (indexes.length) {\n firstRowIndex = indexes[0][0];\n tableMeta.search.setCurrentHighlightColumnIndex(0);\n } else {\n tableMeta.search.setCurrentHighlightColumnIndex(undefined);\n }\n } else {\n tableMeta.search.setHighlightedColumnIndexes([]);\n tableMeta.search.setCurrentHighlightColumnIndex(undefined);\n }\n\n if (firstRowIndex !== undefined) {\n tableMeta.rowActive.setRowActiveIndex(firstRowIndex);\n }\n\n return firstRowIndex;\n}\n"],"names":["flattenCellValue","cellValue","Object","values","map","isMatched","searchQuery","dataType","localization","flat","Infinity","find","y","isWeakContains","cellValueAsString","String","undefined","dataTypeProperties","getDataTypeProperties","getDisplayValue","cellDisplayValue","globalFilterFn","row","columnId","original","_row$_getAllCellsByCo","_row$_getAllCellsByCo2","_getAllCellsByColumnId","column","columnDef","meta","resetHighlightedColumnIndexes","table","tableMeta","options","firstRowIndex","indexes","columns","getVisibleLeafColumns","rowGrouping","getState","grouping","getRowModel","rows","forEach","rowIndex","columnIndex","allowSearch","length","getIsGrouped","includes","id","getIsVisible","enableGlobalFilter","_column$columnDef$met","get","push","e","search","setHighlightedColumnIndexes","setCurrentHighlightColumnIndex","rowActive","setRowActiveIndex"],"mappings":";;;;AAOA,MAAMA,gBAAgB,GAAIC,SAA0B;EAChD,OAAO,OAAOA,SAAS,KAAK,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAACF,SAAS,CAAC,CAACG,GAAG,CAACJ,gBAAgB,CAAC,GAAGC,SAAS;AACrG,CAAC;SAEeI,SAASA,CACrBC,WAAmB,EACnBL,SAAc,EACdM,QAAyC,EACzCC,YAA0B;EAE1B,IAAI,OAAOP,SAAS,KAAK,QAAQ,EAAE;IAC/B,OAAOD,gBAAgB,CAACC,SAAS,CAAC,CAC7BQ,IAAI,CAACC,QAAQ,CAAC,CACdC,IAAI,CAACC,CAAC,IAAIC,cAAc,CAACD,CAAC,EAAEN,WAAW,CAAC,CAAC;GACjD,MAAM;IACH,MAAMQ,iBAAiB,GAAGC,MAAM,CAACd,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,EAAE,CAAC;IAEjD,IAAIa,iBAAiB,KAAKE,SAAS,IAAIH,cAAc,CAACC,iBAAiB,EAAER,WAAW,CAAC,EAAE;MACnF,OAAO,IAAI;KACd,MAAM;MACH,MAAMW,kBAAkB,GAAGC,qBAAqB,CAAQX,QAAQ,CAAC;MAEjE,IAAIU,kBAAkB,CAACE,eAAe,EAAE;QACpC,MAAMC,gBAAgB,GAAGH,kBAAkB,CAACE,eAAe,CAAClB,SAAS,EAAE;UAAEO;SAAc,CAAC;QAExF,IAAIY,gBAAgB,KAAKJ,SAAS,IAAIH,cAAc,CAACO,gBAAgB,EAAEd,WAAW,CAAC,EAAE;UACjF,OAAO,IAAI;;;;;EAM3B,OAAO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,aAAa,CAAC;;EAGxD,OAAOA,aAAa;AACxB;;;;"}
1
+ {"version":3,"file":"search.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/search.ts"],"sourcesContent":["import { Table as ReactTable, TableMeta as ReactTableMeta, Row as ReactTableRow } from '@tanstack/react-table';\nimport get from 'lodash/get';\nimport { isWeakContains } from './filtering';\nimport { getDataTypeProperties } from './dataTypes';\nimport { TableColumnDataType } from '../../types';\nimport { Localization } from '../../../../components/Provider/Localization';\n\nconst flattenCellValue = (cellValue: object | string) => {\n return typeof cellValue === 'object' ? Object.values(cellValue).map(flattenCellValue) : cellValue;\n};\n\nexport function isMatched<TType = unknown>(\n searchQuery: string,\n cellValue: any,\n dataType: TableColumnDataType | undefined,\n localization: Localization\n) {\n if (typeof cellValue === 'object') {\n return flattenCellValue(cellValue)\n .flat(Infinity)\n .find(y => isWeakContains(y, searchQuery));\n } else {\n const cellValueAsString = String(cellValue ?? '');\n\n if (cellValueAsString !== undefined && isWeakContains(cellValueAsString, searchQuery)) {\n return true;\n } else {\n const dataTypeProperties = getDataTypeProperties<TType>(dataType);\n\n if (dataTypeProperties.getDisplayValue) {\n const cellDisplayValue = dataTypeProperties.getDisplayValue(cellValue, { localization });\n\n if (cellDisplayValue !== undefined && isWeakContains(cellDisplayValue, searchQuery)) {\n return true;\n }\n }\n }\n }\n\n return false;\n}\n\nexport function globalFilterFn<TType = unknown>(\n row: ReactTableRow<TType>,\n columnId: string,\n searchQuery: string,\n localization: Localization\n) {\n try {\n if (row.original) {\n const cellValue = row.original[columnId];\n const dataType = row._getAllCellsByColumnId()[columnId]?.column.columnDef.meta?.dataType;\n return isMatched(searchQuery, cellValue, dataType, localization);\n }\n } catch {\n // we don't care, just fail silently and return no results\n }\n\n return false;\n}\n\nexport function resetHighlightedColumnIndexes<TType = unknown>(\n searchQuery: string | undefined,\n table: ReactTable<TType>,\n localization: Localization\n) {\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n let firstRowIndex: undefined | number;\n\n if (searchQuery) {\n const indexes: number[][] = [];\n const columns = table.getVisibleLeafColumns();\n const rowGrouping = table.getState().grouping;\n\n table.getRowModel().rows.forEach((row, rowIndex) => {\n columns.forEach((column, columnIndex) => {\n try {\n let allowSearch = true;\n\n if (rowGrouping?.length) {\n // if it's the grouped row, only allow search of the grouped column - because that's all that's visible\n if (row.getIsGrouped()) {\n allowSearch = column.getIsGrouped();\n }\n // otherwise for other rows, don't search the grouped column - because it isn't visible\n else if (rowGrouping.includes(column.id)) {\n allowSearch = false;\n }\n }\n\n if (column.getIsVisible() && column.columnDef.enableGlobalFilter && allowSearch) {\n const cellValue = get(row.original, column.id);\n const dataType = column.columnDef.meta?.dataType;\n\n if (isMatched(searchQuery, cellValue, dataType, localization)) {\n indexes.push([rowIndex, columnIndex]);\n }\n }\n } catch (e) {\n //\n }\n });\n });\n\n tableMeta.search.setHighlightedColumnIndexes(indexes);\n\n if (indexes.length) {\n firstRowIndex = indexes[0][0];\n tableMeta.search.setCurrentHighlightColumnIndex(0);\n } else {\n tableMeta.search.setCurrentHighlightColumnIndex(undefined);\n }\n } else {\n tableMeta.search.setHighlightedColumnIndexes([]);\n tableMeta.search.setCurrentHighlightColumnIndex(undefined);\n }\n\n if (firstRowIndex !== undefined) {\n tableMeta.rowActive.setRowActiveIndex(firstRowIndex);\n }\n\n return firstRowIndex;\n}\n"],"names":["flattenCellValue","cellValue","Object","values","map","isMatched","searchQuery","dataType","localization","flat","Infinity","find","y","isWeakContains","cellValueAsString","String","undefined","dataTypeProperties","getDataTypeProperties","getDisplayValue","cellDisplayValue","globalFilterFn","row","columnId","original","_row$_getAllCellsByCo","_row$_getAllCellsByCo2","_getAllCellsByColumnId","column","columnDef","meta","resetHighlightedColumnIndexes","table","tableMeta","options","firstRowIndex","indexes","columns","getVisibleLeafColumns","rowGrouping","getState","grouping","getRowModel","rows","forEach","rowIndex","columnIndex","allowSearch","length","getIsGrouped","includes","id","getIsVisible","enableGlobalFilter","_column$columnDef$met","get","push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xB,MAAM,CAACC,SAAS,CAACwB,kBAAkB,IAAIN,WAAW,EAAE;YAAA,IAAAO,qBAAA;YAC7E,MAAMrD,SAAS,GAAGsD,GAAG,CAACjC,GAAG,CAACE,QAAQ,EAAEI,MAAM,CAACuB,EAAE,CAAC;YAC9C,MAAM5C,QAAQ,IAAA+C,qBAAA,GAAG1B,MAAM,CAACC,SAAS,CAACC,IAAI,cAAAwB,qBAAA,uBAArBA,qBAAA,CAAuB/C,QAAQ;YAEhD,IAAIF,SAAS,CAACC,WAAW,EAAEL,SAAS,EAAEM,QAAQ,EAAEC,YAAY,CAAC,EAAE;cAC3D4B,OAAO,CAACoB,IAAI,CAAC,CAACX,QAAQ,EAAEC,WAAW,CAAC,CAAC;;;SAGhD,CAAC,OAAOW,CAAC,EAAE;;;OAGf,CAAC;KACL,CAAC;IAEFxB,SAAS,CAACyB,MAAM,CAACC,2BAA2B,CAACvB,OAAO,CAAC;IAErD,IAAIA,OAAO,CAACY,MAAM,EAAE;MAChBb,aAAa,GAAGC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;MAC7BH,SAAS,CAACyB,MAAM,CAACE,8BAA8B,CAAC,CAAC,CAAC;KACrD,MAAM;MACH3B,SAAS,CAACyB,MAAM,CAACE,8BAA8B,CAAC5C,SAAS,CAAC;;GAEjE,MAAM;IACHiB,SAAS,CAACyB,MAAM,CAACC,2BAA2B,CAAC,EAAE,CAAC;IAChD1B,SAAS,CAACyB,MAAM,CAACE,8BAA8B,CAAC5C,SAAS,CAAC;;EAG9D,IAAImB,aAAa,KAAKnB,SAAS,EAAE;IAC7BiB,SAAS,CAAC4B,SAAS,CAACC,iBAAiB,CAAC3B,aAAa,CAAC;;EAGxD,OAAOA,aAAa;AACxB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/settings.ts"],"sourcesContent":["import { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { isInternalColumn } from './columns';\n\nexport function getSettings<TType = unknown>(table: ReactTable<TType>) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n const state = table.getState();\n\n return {\n // commented out properties are here to highlight things we explicitly don't want them saved\n //columnFilters: table.options.enableColumnFilters ? state.columnFilters : undefined,\n columnOrder: meta.columnOrdering.isEnabled ? state.columnOrder : undefined,\n columnPinning: state.columnPinning,\n columnSizing: ignoreInternalColumns(state.columnSizing),\n columnVisibility: table.options.enableHiding ? state.columnVisibility : undefined,\n excludeUnmatchedRecordsInSearch: table.options.enableGlobalFilter,\n fontSize: meta.fontSize.isEnabled ? meta.fontSize.size : undefined,\n //grouping: table.options.enableGrouping ? state.grouping : undefined,\n rowHeight: meta.rowHeight.isEnabled ? meta.rowHeight.height : undefined,\n //searchQuery: table.options.enableGlobalFilter ? state.globalFilter : undefined,\n sorting: state.sorting,\n };\n}\n\nexport function ignoreInternalColumns(data: Record<string, any>) {\n return Object.keys(data).reduce((accum, key) => {\n if (isInternalColumn(key)) {\n return accum;\n }\n\n return {\n ...accum,\n [key]: data[key],\n };\n }, {});\n}\n"],"names":["getSettings","table","meta","options","state","getState","columnOrder","columnOrdering","isEnabled","undefined","columnPinning","columnSizing","ignoreInternalColumns","columnVisibility","enableHiding","excludeUnmatchedRecordsInSearch","enableGlobalFilter","fontSize","size","rowHeight","height","sorting","data","Object","keys","reduce","accum","key","isInternalColumn"],"mappings":";;SAGgBA,WAAWA,CAAkBC,KAAwB;EACjE,MAAMC,IAAI,GAAGD,KAAK,CAACE,OAAO,CAACD,IAA6B;EACxD,MAAME,KAAK,GAAGH,KAAK,CAACI,QAAQ,EAAE;EAE9B,OAAO;;;IAGHC,WAAW,EAAEJ,IAAI,CAACK,cAAc,CAACC,SAAS,GAAGJ,KAAK,CAACE,WAAW,GAAGG,SAAS;IAC1EC,aAAa,EAAEN,KAAK,CAACM,aAAa;IAClCC,YAAY,EAAEC,qBAAqB,CAACR,KAAK,CAACO,YAAY,CAAC;IACvDE,gBAAgB,EAAEZ,KAAK,CAACE,OAAO,CAACW,YAAY,GAAGV,KAAK,CAACS,gBAAgB,GAAGJ,SAAS;IACjFM,+BAA+B,EAAEd,KAAK,CAACE,OAAO,CAACa,kBAAkB;IACjEC,QAAQ,EAAEf,IAAI,CAACe,QAAQ,CAACT,SAAS,GAAGN,IAAI,CAACe,QAAQ,CAACC,IAAI,GAAGT,SAAS;;IAElEU,SAAS,EAAEjB,IAAI,CAACiB,SAAS,CAACX,SAAS,GAAGN,IAAI,CAACiB,SAAS,CAACC,MAAM,GAAGX,SAAS;;IAEvEY,OAAO,EAAEjB,KAAK,CAACiB;GAClB;AACL;SAEgBT,qBAAqBA,CAACU,IAAyB;EAC3D,OAAOC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,CAACG,MAAM,CAAC,CAACC,KAAK,EAAEC,GAAG;IACvC,IAAIC,gBAAgB,CAACD,GAAG,CAAC,EAAE;MACvB,OAAOD,KAAK;;IAGhB,OAAO;MACH,GAAGA,KAAK;MACR,CAACC,GAAG,GAAGL,IAAI,CAACK,GAAG;KAClB;GACJ,EAAE,EAAE,CAAC;AACV;;;;"}
1
+ {"version":3,"file":"settings.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/settings.ts"],"sourcesContent":["import { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { isInternalColumn } from './columns';\n\nexport function getSettings<TType = unknown>(table: ReactTable<TType>) {\n const meta = table.options.meta as ReactTableMeta<TType>;\n const state = table.getState();\n\n return {\n // commented out properties are here to highlight things we explicitly don't want them saved\n //columnFilters: table.options.enableColumnFilters ? state.columnFilters : undefined,\n columnOrder: meta.columnOrdering.isEnabled ? state.columnOrder : undefined,\n columnPinning: state.columnPinning,\n columnSizing: ignoreInternalColumns(state.columnSizing),\n columnVisibility: table.options.enableHiding ? state.columnVisibility : undefined,\n excludeUnmatchedRecordsInSearch: table.options.enableGlobalFilter,\n fontSize: meta.fontSize.isEnabled ? meta.fontSize.size : undefined,\n //grouping: table.options.enableGrouping ? state.grouping : undefined,\n rowHeight: meta.rowHeight.isEnabled ? meta.rowHeight.height : undefined,\n //searchQuery: table.options.enableGlobalFilter ? state.globalFilter : undefined,\n sorting: state.sorting,\n };\n}\n\nexport function ignoreInternalColumns(data: object) {\n return Object.keys(data).reduce((accum, key) => {\n if (isInternalColumn(key)) {\n return accum;\n }\n\n return {\n ...accum,\n [key]: data[key],\n };\n }, {});\n}\n"],"names":["getSettings","table","meta","options","state","getState","columnOrder","columnOrdering","isEnabled","undefined","columnPinning","columnSizing","ignoreInternalColumns","columnVisibility","enableHiding","excludeUnmatchedRecordsInSearch","enableGlobalFilter","fontSize","size","rowHeight","height","sorting","data","Object","keys","reduce","accum","key","isInternalColumn"],"mappings":";;SAGgBA,WAAWA,CAAkBC,KAAwB;EACjE,MAAMC,IAAI,GAAGD,KAAK,CAACE,OAAO,CAACD,IAA6B;EACxD,MAAME,KAAK,GAAGH,KAAK,CAACI,QAAQ,EAAE;EAE9B,OAAO;;;IAGHC,WAAW,EAAEJ,IAAI,CAACK,cAAc,CAACC,SAAS,GAAGJ,KAAK,CAACE,WAAW,GAAGG,SAAS;IAC1EC,aAAa,EAAEN,KAAK,CAACM,aAAa;IAClCC,YAAY,EAAEC,qBAAqB,CAACR,KAAK,CAACO,YAAY,CAAC;IACvDE,gBAAgB,EAAEZ,KAAK,CAACE,OAAO,CAACW,YAAY,GAAGV,KAAK,CAACS,gBAAgB,GAAGJ,SAAS;IACjFM,+BAA+B,EAAEd,KAAK,CAACE,OAAO,CAACa,kBAAkB;IACjEC,QAAQ,EAAEf,IAAI,CAACe,QAAQ,CAACT,SAAS,GAAGN,IAAI,CAACe,QAAQ,CAACC,IAAI,GAAGT,SAAS;;IAElEU,SAAS,EAAEjB,IAAI,CAACiB,SAAS,CAACX,SAAS,GAAGN,IAAI,CAACiB,SAAS,CAACC,MAAM,GAAGX,SAAS;;IAEvEY,OAAO,EAAEjB,KAAK,CAACiB;GAClB;AACL;SAEgBT,qBAAqBA,CAACU,IAAY;EAC9C,OAAOC,MAAM,CAACC,IAAI,CAACF,IAAI,CAAC,CAACG,MAAM,CAAC,CAACC,KAAK,EAAEC,GAAG;IACvC,IAAIC,gBAAgB,CAACD,GAAG,CAAC,EAAE;MACvB,OAAOD,KAAK;;IAGhB,OAAO;MACH,GAAGA,KAAK;MACR,CAACC,GAAG,GAAGL,IAAI,CAACK,GAAG;KAClB;GACJ,EAAE,EAAE,CAAC;AACV;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"setup.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/setup.ts"],"sourcesContent":["import React from 'react';\nimport {\n createColumnHelper,\n getExpandedRowModel,\n getFilteredRowModel,\n getGroupedRowModel,\n getSortedRowModel,\n TableOptions as ReactTableOptions,\n Row as ReactTableRow,\n Column as ReactTableColumn,\n ColumnDef as ReactTableColumnDef,\n ColumnPinningState as ReactTableColumnPinningState,\n ColumnSizingState as ReactTableColumnSizingState,\n ColumnSort as ReactTableColumnSort,\n TableState as ReactTableState,\n VisibilityState as ReactTableVisibilityState,\n} from '@tanstack/react-table';\nimport get from 'lodash/get';\nimport { useTableManagerInternalColumns, useTableManagerInternalColumn } from '../types';\nimport { TableColumnProps, TableFeatureProps, TableGroupProps, TableProps, TableSettings } from '../../types';\nimport { getSortingFn } from './sorting';\nimport { ensureOrdering, freezeUptoExternalColumn, getCellMinWidth, unfreezeAllExternalColumns } from './columns';\nimport { columnFilterFn } from './filtering';\nimport { globalFilterFn } from './search';\nimport { ignoreInternalColumns } from './settings';\nimport { getDataTypeProperties } from './dataTypes';\nimport { Localization } from '../../../../components/Provider/Localization';\n\n// mapping children to react-table columns\nfunction processChildren<TType>(\n child: React.ReactChild | React.ReactFragment | React.ReactPortal,\n columns: ReactTableColumnDef<TType>[],\n defaultSizing: ReactTableColumnSizingState,\n defaultSorting: ReactTableColumnSort[],\n defaultVisibility: ReactTableVisibilityState,\n settings: TableSettings,\n defaultRowGroupColumnId: keyof TType | undefined,\n localization: Localization\n): ReactTableColumnDef<TType>[] {\n const columnHelper = createColumnHelper<TType>();\n\n if (React.isValidElement<TableGroupProps>(child) && child.props.children) {\n const { children, id, header } = child.props;\n\n columns.push(\n columnHelper.group({\n id,\n header,\n columns: React.Children.toArray(children).reduce(\n (columns: ReactTableColumnDef<TType>[], child) =>\n processChildren<TType>(\n child,\n columns,\n defaultSizing,\n defaultSorting,\n defaultVisibility,\n settings,\n defaultRowGroupColumnId,\n localization\n ),\n []\n ),\n // we don't want to let column groups be grouped/aggregrated\n enableGrouping: false,\n })\n );\n } else if (React.isValidElement<TableColumnProps<TType>>(child) && (child.props.accessor || child.props.id)) {\n const {\n id: untypedId,\n accessor: accessorKey = untypedId,\n // renderers\n renderer,\n aggregate,\n footer,\n header,\n // options\n aggregationFn,\n defaultHidden,\n defaultWidth,\n enableEditing = !!child.props.control,\n enableFiltering: enableColumnFilter = true,\n enableGrouping = false,\n enableHiding = true,\n enableOrdering = true,\n enablePrinting = true,\n enableResizing = true,\n enableSearch: enableGlobalFilter = true,\n enableSorting = true,\n enableTruncate = false,\n minWidth: minSize = getCellMinWidth(settings.fontSize),\n sort,\n sortFn,\n ...meta\n } = child.props;\n const id = untypedId as string;\n const dataTypeProperties = getDataTypeProperties<TType>(child.props.dataType);\n\n if (defaultHidden && enableHiding) {\n defaultVisibility[id] = false;\n }\n\n if (defaultWidth) {\n defaultSizing[id] = defaultWidth as any;\n }\n\n const isGrouped = defaultRowGroupColumnId === id;\n\n if (child.props.sort !== undefined || isGrouped) {\n defaultSorting.push({\n id,\n desc: sort === 'desc',\n });\n }\n\n const column: ReactTableColumnDef<TType, any> = {\n id,\n accessorKey,\n // To avoid errors caused by undefined row data values, we pass accessorFn as a preventive measure\n // accessorKey can be dot notated strings, so we use lodash.get to access deeply nested children\n accessorFn: row => get(row, accessorKey),\n header: header,\n // features\n enableColumnFilter,\n enableGlobalFilter,\n enableGrouping,\n enableHiding: isGrouped ? false : enableHiding,\n enableResizing,\n enableSorting,\n // config - sizing\n minSize,\n // meta\n meta: {\n ...(meta as any),\n align: meta.align ?? dataTypeProperties.align,\n defaultWidth,\n enableOrdering: isGrouped ? false : enableOrdering,\n enablePrinting,\n enableTruncate,\n enableEditing,\n header,\n renderer,\n },\n };\n\n // renderers - use defined renderers first, then fall back to data type renderers (if there is one)\n if (typeof renderer === 'function') {\n column.cell = info => renderer(info.getValue(), info.row.original);\n } else if (dataTypeProperties.getDisplayValue) {\n const dataTypeRenderer = (value: any) => dataTypeProperties.getDisplayValue?.(value, { localization }) ?? value;\n column.cell = info => dataTypeRenderer(info.getValue());\n (column.meta as any).renderer = dataTypeRenderer;\n }\n\n if (typeof footer === 'function') {\n column.footer = info =>\n footer(info.table.getRowModel().rows.flatMap(row => (row.original !== undefined ? row.original : [])));\n }\n\n // config - filtering\n if (enableColumnFilter) {\n column.filterFn = 'tacoFilter' as any;\n }\n\n // config - grouping/aggregation\n if (enableGrouping) {\n column.aggregationFn = aggregationFn;\n\n if (typeof aggregate === 'function') {\n column.aggregatedCell = info => aggregate(info.getValue(), info.row.original);\n }\n }\n\n // config - sorting\n if (enableSorting) {\n column.sortingFn = getSortingFn<TType>(child.props.dataType, sortFn);\n column.sortDescFirst = false;\n column.sortUndefined = 1;\n }\n\n columns.push(column);\n }\n\n return columns;\n}\n\nfunction createInternalColumn<TType = unknown>(\n id: string,\n column: useTableManagerInternalColumn<TType>,\n defaultSizing: ReactTableColumnSizingState\n) {\n if (column.size) {\n defaultSizing[id] = column.size;\n }\n\n return {\n id,\n accessorKey: id,\n header: column.header,\n cell: column.renderer,\n // features\n enableColumnFilter: false,\n enableGlobalFilter: false,\n enableGrouping: false,\n enableHiding: false,\n enableResizing: false,\n enableSorting: false,\n // config - sizing\n size: column.size,\n minSize: column.size,\n // meta\n meta: {\n ...(column.meta as any),\n enableOrdering: false,\n enablePrinting: false,\n enableTruncate: false,\n },\n } as ReactTableColumnDef<TType, any>;\n}\n\nexport function mapTableChildrenToColumns<TType = unknown>(\n props: TableProps<TType>,\n settings: TableSettings,\n options: TableFeatureProps<TType>,\n internalColumns: useTableManagerInternalColumns<TType> | undefined,\n localization: Localization\n) {\n const { children, defaultRowGroupColumnId } = props;\n const defaultSizing: ReactTableColumnSizingState = {};\n const defaultSorting: ReactTableColumnSort[] = [];\n const defaultVisibility: ReactTableVisibilityState = {};\n\n const columns = React.Children.toArray(children).reduce(\n (columns: ReactTableColumnDef<TType>[], child) =>\n processChildren<TType>(\n child,\n columns,\n defaultSizing,\n defaultSorting,\n defaultVisibility,\n settings,\n defaultRowGroupColumnId,\n localization\n ),\n\n []\n );\n\n if (internalColumns) {\n if (options.enableRowExpansion && props.rowExpansionRenderer && internalColumns.rowExpansion) {\n const column = createInternalColumn<TType>('__expansion', internalColumns.rowExpansion, defaultSizing);\n columns.unshift(column);\n }\n\n if (options.enableRowSelection && internalColumns.rowSelection) {\n const column = createInternalColumn<TType>('__select', internalColumns.rowSelection, defaultSizing);\n columns.unshift(column);\n }\n\n if (options.enableRowDrag && props.onRowDrag && internalColumns.rowDrag) {\n const column = createInternalColumn<TType>('__drag', internalColumns.rowDrag, defaultSizing);\n columns.unshift(column);\n }\n\n if (options.enableRowActions && props.rowActions?.length && internalColumns.rowActions) {\n const column = createInternalColumn<TType>('__actions', internalColumns.rowActions, defaultSizing);\n columns.push(column);\n }\n }\n\n return { columns, defaultSizing, defaultSorting, defaultVisibility };\n}\n\nexport function configureReactTableOptions<TType = unknown>(\n options: TableFeatureProps<TType>,\n props: TableProps<TType>,\n localization: Localization\n) {\n // We don't want to expose internal Tanstack Table row, so we need to wrap enableRowSelection callback into additional function,\n // which receives the React Table Row object and passes row.original to a callback.\n const reactTableEnableRowSelection =\n typeof options.enableRowSelection === 'function'\n ? (row: ReactTableRow<TType>) => (options.enableRowSelection as (row: TType) => boolean)(row.original)\n : options.enableRowSelection;\n\n const tableOptions: Partial<ReactTableOptions<TType>> = {\n defaultColumn: {\n enableColumnFilter: options.enableFiltering || true,\n enableGrouping: false,\n enableHiding: options.enableColumnHiding || true,\n enableResizing: options.enableColumnResizing || true,\n enableGlobalFilter: options.enableSearch || true,\n enableSorting: options.enableSorting || true,\n minSize: 1,\n // the default is 150, which is a bit random\n size: 1,\n },\n enableColumnFilters: options.enableFiltering ?? false,\n enableColumnResizing: options.enableColumnResizing ?? false,\n enableExpanding: options.enableRowExpansion ?? false,\n enableGrouping: true, // users can't customise row grouping, so it can just be always enabled and left to the defaultRowGroupColumnId prop\n enableHiding: options.enableColumnHiding ?? false,\n enablePinning: options.enableColumnFreezing ?? false,\n enableRowSelection: reactTableEnableRowSelection ?? false,\n enableSorting: options.enableSorting ?? false,\n // models for default features\n getExpandedRowModel: getExpandedRowModel<TType>(),\n getGroupedRowModel: getGroupedRowModel<TType>(),\n groupedColumnMode: false,\n };\n\n if (tableOptions.enableColumnResizing) {\n tableOptions.columnResizeMode = 'onChange';\n }\n\n if (tableOptions.enableColumnFilters) {\n // enter controlled filter mode (controlled could be local state, but usually the server)\n if (props.onChangeFilter) {\n // tableOptions.manualFiltering = true;\n // we don't set it because it breaks global filtering (used for search, which is fully client side)\n //\n // tableOptions.onColumnFiltersChange = ...\n // we don't set this because it expects state to be maintained externally, and we don't want\n // consumers to control state outside the table. instead we have a listener that calls onFilter\n } else {\n tableOptions.getFilteredRowModel = getFilteredRowModel<TType>();\n tableOptions.filterFns = {\n tacoFilter: (row: ReactTableRow<TType>, columnId: string, filter: any) =>\n columnFilterFn(row.getValue(columnId), filter),\n };\n }\n }\n\n if (options.enableSearch) {\n // always set these because enableGlobalFilter can be toggled on and off by the user\n tableOptions.getFilteredRowModel = getFilteredRowModel<TType>();\n tableOptions.globalFilterFn = (row: ReactTableRow<TType>, columnId: string, searchQuery: any) =>\n globalFilterFn(row, columnId, searchQuery, localization);\n tableOptions.getColumnCanGlobalFilter = (column: ReactTableColumn<TType>) =>\n column.columnDef.meta?.enableSearch !== false && column.getIsVisible();\n\n // enter controlled search mode (controlled could be local state, but usually the server)\n if (props.onChangeSearch) {\n // tableOptions.manualFiltering = true;\n // we don't set this because controlled search is not currently supported, search is always client side\n //\n // tableOptions.onGlobalFilterChange = ...\n // we don't set this because it expects state to be maintained externally, and we don't want\n // consumers to control state outside the table. instead we have a listener that calls onSearch.\n //\n // we also don't always filter when searching, we have the highlight functionality as the default\n // and filtering can be toggled by the user\n }\n }\n\n if (tableOptions.enableSorting) {\n // enter controlled sort mode (controlled could be local state, but usually the server)\n if (props.onChangeSort) {\n tableOptions.manualSorting = true;\n\n // tableOptions.onSortingChange = ...\n // we don't set this because it expects state to be maintained externally, and we don't want\n // consumers to control state outside the table. instead we have a listener that calls onSort\n } else {\n tableOptions.getSortedRowModel = getSortedRowModel();\n }\n }\n\n return tableOptions;\n}\n\nexport function useReactTableInitialState<TType = unknown>(\n props: TableProps<TType>,\n columns: ReactTableColumnDef<TType>[],\n persistedSettings: TableSettings,\n defaults: {\n defaultSizing: ReactTableColumnSizingState;\n defaultSorting: ReactTableColumnSort[];\n defaultVisibility: ReactTableVisibilityState;\n }\n): Partial<ReactTableState> {\n return React.useMemo(() => {\n const ignoreNotDefinedColumns = (column: ReactTableColumnDef<TType>) =>\n columns.find(definedColumn => definedColumn.id === column.id);\n\n const columnPinning: ReactTableColumnPinningState =\n persistedSettings.columnPinning ?? props.defaultSettings?.columnPinning ?? {};\n\n const columnOrder = ensureOrdering<TType>(\n columns,\n persistedSettings.columnOrder ?? props.defaultSettings?.columnOrder,\n columnPinning.left\n );\n\n // ensure internal columns are pinned, and are pinned in the correct order\n if (columnPinning?.left?.length) {\n columnPinning.left = freezeUptoExternalColumn(\n columnOrder.indexOf(columnPinning.left[columnPinning.left.length - 1]),\n columnOrder\n );\n } else {\n if (props.defaultColumnFreezingIndex) {\n columnPinning.left = freezeUptoExternalColumn(props.defaultColumnFreezingIndex, columnOrder);\n } else {\n columnPinning.left = unfreezeAllExternalColumns(columnOrder);\n }\n }\n\n const state: Partial<ReactTableState> = {\n columnFilters: persistedSettings.columnFilters ?? props.defaultSettings?.columnFilters ?? [],\n columnOrder,\n columnPinning,\n columnSizing: ignoreInternalColumns(\n persistedSettings.columnSizing ?? props.defaultSettings?.columnSizing ?? defaults.defaultSizing ?? {}\n ),\n columnVisibility:\n persistedSettings.columnVisibility ?? props.defaultSettings?.columnVisibility ?? defaults.defaultVisibility ?? {},\n globalFilter: persistedSettings.searchQuery ?? props.defaultSettings?.searchQuery,\n sorting: persistedSettings.sorting\n ? persistedSettings.sorting.filter(ignoreNotDefinedColumns)\n : props.defaultSettings?.sorting ?? defaults.defaultSorting,\n };\n\n if (props.defaultRowGroupColumnId) {\n state.grouping = [props.defaultRowGroupColumnId as string];\n // row groups should (all) always be expanded by default\n state.expanded = true;\n }\n\n return state;\n }, []);\n}\n"],"names":["processChildren","child","columns","defaultSizing","defaultSorting","defaultVisibility","settings","defaultRowGroupColumnId","localization","columnHelper","createColumnHelper","React","isValidElement","props","children","id","header","push","group","Children","toArray","reduce","enableGrouping","accessor","_meta$align","untypedId","accessorKey","renderer","aggregate","footer","aggregationFn","defaultHidden","defaultWidth","enableEditing","control","enableFiltering","enableColumnFilter","enableHiding","enableOrdering","enablePrinting","enableResizing","enableSearch","enableGlobalFilter","enableSorting","enableTruncate","minWidth","minSize","getCellMinWidth","fontSize","sort","sortFn","meta","dataTypeProperties","getDataTypeProperties","dataType","isGrouped","undefined","desc","column","accessorFn","row","get","align","cell","info","getValue","original","getDisplayValue","dataTypeRenderer","value","_dataTypeProperties$g","_dataTypeProperties$g2","call","table","getRowModel","rows","flatMap","filterFn","aggregatedCell","sortingFn","getSortingFn","sortDescFirst","sortUndefined","createInternalColumn","size","mapTableChildrenToColumns","options","internalColumns","_props$rowActions","enableRowExpansion","rowExpansionRenderer","rowExpansion","unshift","enableRowSelection","rowSelection","enableRowDrag","onRowDrag","rowDrag","enableRowActions","rowActions","length","configureReactTableOptions","reactTableEnableRowSelection","tableOptions","defaultColumn","enableColumnHiding","enableColumnResizing","enableColumnFilters","_options$enableFilter","_options$enableColumn","enableExpanding","_options$enableRowExp","_options$enableColumn2","enablePinning","_options$enableColumn3","enableColumnFreezing","_options$enableSortin","getExpandedRowModel","getGroupedRowModel","groupedColumnMode","columnResizeMode","onChangeFilter","getFilteredRowModel","filterFns","tacoFilter","columnId","filter","columnFilterFn","globalFilterFn","searchQuery","getColumnCanGlobalFilter","_column$columnDef$met","columnDef","getIsVisible","onChangeSort","manualSorting","getSortedRowModel","useReactTableInitialState","persistedSettings","defaults","useMemo","ignoreNotDefinedColumns","find","definedColumn","columnPinning","_ref","_persistedSettings$co","_props$defaultSetting","defaultSettings","columnOrder","ensureOrdering","_persistedSettings$co2","_props$defaultSetting2","left","_columnPinning$left","freezeUptoExternalColumn","indexOf","defaultColumnFreezingIndex","unfreezeAllExternalColumns","state","columnFilters","_ref2","_persistedSettings$co3","_props$defaultSetting3","columnSizing","ignoreInternalColumns","_ref3","_ref4","_persistedSettings$co4","_props$defaultSetting4","columnVisibility","_ref5","_ref6","_persistedSettings$co5","_props$defaultSetting5","globalFilter","_persistedSettings$se","_props$defaultSetting6","sorting","_props$defaultSetting7","_props$defaultSetting8","grouping","expanded"],"mappings":";;;;;;;;;;AA4BA;AACA,SAASA,eAAeA,CACpBC,KAAiE,EACjEC,OAAqC,EACrCC,aAA0C,EAC1CC,cAAsC,EACtCC,iBAA4C,EAC5CC,QAAuB,EACvBC,uBAAgD,EAChDC,YAA0B;EAE1B,MAAMC,YAAY,GAAGC,kBAAkB,EAAS;EAEhD,iBAAIC,cAAK,CAACC,cAAc,CAAkBX,KAAK,CAAC,IAAIA,KAAK,CAACY,KAAK,CAACC,QAAQ,EAAE;IACtE,MAAM;MAAEA,QAAQ;MAAEC,EAAE;MAAEC;KAAQ,GAAGf,KAAK,CAACY,KAAK;IAE5CX,OAAO,CAACe,IAAI,CACRR,YAAY,CAACS,KAAK,CAAC;MACfH,EAAE;MACFC,MAAM;MACNd,OAAO,EAAES,cAAK,CAACQ,QAAQ,CAACC,OAAO,CAACN,QAAQ,CAAC,C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cAAAA,sBAAA,GAAIxC,QAAQ,CAACvI;KACpD;IAED,IAAIS,KAAK,CAACN,uBAAuB,EAAE;MAC/BwJ,KAAK,CAACsB,QAAQ,GAAG,CAACxK,KAAK,CAACN,uBAAiC,CAAC;;MAE1DwJ,KAAK,CAACuB,QAAQ,GAAG,IAAI;;IAGzB,OAAOvB,KAAK;GACf,EAAE,EAAE,CAAC;AACV;;;;"}
1
+ {"version":3,"file":"setup.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/setup.ts"],"sourcesContent":["import React from 'react';\nimport {\n createColumnHelper,\n getExpandedRowModel,\n getFilteredRowModel,\n getGroupedRowModel,\n getSortedRowModel,\n TableOptions as ReactTableOptions,\n Row as ReactTableRow,\n Column as ReactTableColumn,\n ColumnDef as ReactTableColumnDef,\n ColumnPinningState as ReactTableColumnPinningState,\n ColumnSizingState as ReactTableColumnSizingState,\n ColumnSort as ReactTableColumnSort,\n TableState as ReactTableState,\n VisibilityState as ReactTableVisibilityState,\n} from '@tanstack/react-table';\nimport get from 'lodash/get';\nimport { useTableManagerInternalColumns, useTableManagerInternalColumn } from '../types';\nimport { TableColumnProps, TableFeatureProps, TableGroupProps, TableProps, TableSettings } from '../../types';\nimport { getSortingFn } from './sorting';\nimport { ensureOrdering, freezeUptoExternalColumn, getCellMinWidth, unfreezeAllExternalColumns } from './columns';\nimport { columnFilterFn } from './filtering';\nimport { globalFilterFn } from './search';\nimport { ignoreInternalColumns } from './settings';\nimport { getDataTypeProperties } from './dataTypes';\nimport { Localization } from '../../../../components/Provider/Localization';\n\n// mapping children to react-table columns\nfunction processChildren<TType>(\n child: React.ReactChild | React.ReactFragment | React.ReactPortal,\n columns: ReactTableColumnDef<TType>[],\n defaultSizing: ReactTableColumnSizingState,\n defaultSorting: ReactTableColumnSort[],\n defaultVisibility: ReactTableVisibilityState,\n settings: TableSettings,\n defaultRowGroupColumnId: keyof TType | undefined,\n localization: Localization\n): ReactTableColumnDef<TType>[] {\n const columnHelper = createColumnHelper<TType>();\n\n if (React.isValidElement<TableGroupProps>(child) && child.props.children) {\n const { children, id, header } = child.props;\n\n columns.push(\n columnHelper.group({\n id,\n header,\n columns: React.Children.toArray(children).reduce(\n (columns: ReactTableColumnDef<TType>[], child) =>\n processChildren<TType>(\n child,\n columns,\n defaultSizing,\n defaultSorting,\n defaultVisibility,\n settings,\n defaultRowGroupColumnId,\n localization\n ),\n []\n ),\n // we don't want to let column groups be grouped/aggregrated\n enableGrouping: false,\n })\n );\n } else if (React.isValidElement<TableColumnProps<TType>>(child) && (child.props.accessor || child.props.id)) {\n const {\n id: untypedId,\n accessor: accessorKey = untypedId,\n // renderers\n renderer,\n aggregate,\n footer,\n header,\n // options\n aggregationFn,\n defaultHidden,\n defaultWidth,\n enableEditing = !!child.props.control,\n enableFiltering: enableColumnFilter = true,\n enableGrouping = false,\n enableHiding = true,\n enableOrdering = true,\n enablePrinting = true,\n enableResizing = true,\n enableSearch: enableGlobalFilter = true,\n enableSorting = true,\n enableTruncate = false,\n minWidth: minSize = getCellMinWidth(settings.fontSize),\n sort,\n sortFn,\n ...meta\n } = child.props;\n const id = untypedId as string;\n const dataTypeProperties = getDataTypeProperties<TType>(child.props.dataType);\n\n if (defaultHidden && enableHiding) {\n defaultVisibility[id] = false;\n }\n\n if (defaultWidth) {\n defaultSizing[id] = defaultWidth as any;\n }\n\n const isGrouped = defaultRowGroupColumnId === id;\n\n if (child.props.sort !== undefined || isGrouped) {\n defaultSorting.push({\n id,\n desc: sort === 'desc',\n });\n }\n\n const column: ReactTableColumnDef<TType, any> = {\n id,\n accessorKey,\n // To avoid errors caused by undefined row data values, we pass accessorFn as a preventive measure\n // accessorKey can be dot notated strings, so we use lodash.get to access deeply nested children\n accessorFn: row => get(row, accessorKey),\n header: header,\n // features\n enableColumnFilter,\n enableGlobalFilter,\n enableGrouping,\n enableHiding: isGrouped ? false : enableHiding,\n enableResizing,\n enableSorting,\n // config - sizing\n minSize,\n // meta\n meta: {\n ...(meta as any),\n align: meta.align ?? dataTypeProperties.align,\n defaultWidth,\n enableOrdering: isGrouped ? false : enableOrdering,\n enablePrinting,\n enableTruncate,\n enableEditing,\n header,\n renderer,\n },\n };\n\n // renderers - use defined renderers first, then fall back to data type renderers (if there is one)\n if (typeof renderer === 'function') {\n column.cell = info => renderer(info.getValue(), info.row.original);\n } else if (dataTypeProperties.getDisplayValue) {\n const dataTypeRenderer = (value: any) => dataTypeProperties.getDisplayValue?.(value, { localization }) ?? value;\n column.cell = info => dataTypeRenderer(info.getValue());\n (column.meta as any).renderer = dataTypeRenderer;\n }\n\n if (typeof footer === 'function') {\n column.footer = info =>\n footer(info.table.getRowModel().rows.flatMap(row => (row.original !== undefined ? row.original : [])));\n }\n\n // config - filtering\n if (enableColumnFilter) {\n column.filterFn = 'tacoFilter' as any;\n }\n\n // config - grouping/aggregation\n if (enableGrouping) {\n column.aggregationFn = aggregationFn;\n\n if (typeof aggregate === 'function') {\n column.aggregatedCell = info => aggregate(info.getValue(), info.row.original);\n }\n }\n\n // config - sorting\n if (enableSorting) {\n column.sortingFn = getSortingFn<TType>(child.props.dataType, sortFn);\n column.sortDescFirst = false;\n column.sortUndefined = 1;\n }\n\n columns.push(column);\n }\n\n return columns;\n}\n\nfunction createInternalColumn<TType = unknown>(\n id: string,\n column: useTableManagerInternalColumn<TType>,\n defaultSizing: ReactTableColumnSizingState\n) {\n if (column.size) {\n defaultSizing[id] = column.size;\n }\n\n return {\n id,\n accessorKey: id,\n header: column.header,\n cell: column.renderer,\n // features\n enableColumnFilter: false,\n enableGlobalFilter: false,\n enableGrouping: false,\n enableHiding: false,\n enableResizing: false,\n enableSorting: false,\n // config - sizing\n size: column.size,\n minSize: column.size,\n // meta\n meta: {\n ...(column.meta as any),\n enableOrdering: false,\n enablePrinting: false,\n enableTruncate: false,\n },\n } as ReactTableColumnDef<TType, any>;\n}\n\nexport function mapTableChildrenToColumns<TType = unknown>(\n props: TableProps<TType>,\n settings: TableSettings,\n options: TableFeatureProps<TType>,\n internalColumns: useTableManagerInternalColumns<TType> | undefined,\n localization: Localization\n) {\n const { children, defaultRowGroupColumnId } = props;\n const defaultSizing: ReactTableColumnSizingState = {};\n const defaultSorting: ReactTableColumnSort[] = [];\n const defaultVisibility: ReactTableVisibilityState = {};\n\n const columns = React.Children.toArray(children).reduce(\n (columns: ReactTableColumnDef<TType>[], child) =>\n processChildren<TType>(\n child,\n columns,\n defaultSizing,\n defaultSorting,\n defaultVisibility,\n settings,\n defaultRowGroupColumnId,\n localization\n ),\n\n []\n );\n\n if (internalColumns) {\n if (options.enableRowExpansion && props.rowExpansionRenderer && internalColumns.rowExpansion) {\n const column = createInternalColumn<TType>('__expansion', internalColumns.rowExpansion, defaultSizing);\n columns.unshift(column);\n }\n\n if (options.enableRowSelection && internalColumns.rowSelection) {\n const column = createInternalColumn<TType>('__select', internalColumns.rowSelection, defaultSizing);\n columns.unshift(column);\n }\n\n if (options.enableRowDrag && props.onRowDrag && internalColumns.rowDrag) {\n const column = createInternalColumn<TType>('__drag', internalColumns.rowDrag, defaultSizing);\n columns.unshift(column);\n }\n\n if (options.enableRowActions && props.rowActions?.length && internalColumns.rowActions) {\n const column = createInternalColumn<TType>('__actions', internalColumns.rowActions, defaultSizing);\n columns.push(column);\n }\n }\n\n return { columns, defaultSizing, defaultSorting, defaultVisibility };\n}\n\nexport function configureReactTableOptions<TType = unknown>(\n options: TableFeatureProps<TType>,\n props: TableProps<TType>,\n localization: Localization\n) {\n // We don't want to expose internal Tanstack Table row, so we need to wrap enableRowSelection callback into additional function,\n // which receives the React Table Row object and passes row.original to a callback.\n const reactTableEnableRowSelection =\n typeof options.enableRowSelection === 'function'\n ? (row: ReactTableRow<TType>) => (options.enableRowSelection as (row: TType) => boolean)(row.original)\n : options.enableRowSelection;\n\n const tableOptions: Partial<ReactTableOptions<TType>> = {\n defaultColumn: {\n enableColumnFilter: options.enableFiltering || true,\n enableGrouping: false,\n enableHiding: options.enableColumnHiding || true,\n enableResizing: options.enableColumnResizing || true,\n enableGlobalFilter: options.enableSearch || true,\n enableSorting: options.enableSorting || true,\n minSize: 1,\n // the default is 150, which is a bit random\n size: 1,\n },\n enableColumnFilters: options.enableFiltering ?? false,\n enableColumnResizing: options.enableColumnResizing ?? false,\n enableExpanding: options.enableRowExpansion ?? false,\n enableGrouping: true, // users can't customise row grouping, so it can just be always enabled and left to the defaultRowGroupColumnId prop\n enableHiding: options.enableColumnHiding ?? false,\n enablePinning: options.enableColumnFreezing ?? false,\n enableRowSelection: reactTableEnableRowSelection ?? false,\n enableSorting: options.enableSorting ?? false,\n // models for default features\n getExpandedRowModel: getExpandedRowModel<TType>(),\n getGroupedRowModel: getGroupedRowModel<TType>(),\n groupedColumnMode: false,\n };\n\n if (tableOptions.enableColumnResizing) {\n tableOptions.columnResizeMode = 'onChange';\n }\n\n if (tableOptions.enableColumnFilters) {\n // enter controlled filter mode (controlled could be local state, but usually the server)\n if (props.onChangeFilter) {\n // tableOptions.manualFiltering = true;\n // we don't set it because it breaks global filtering (used for search, which is fully client side)\n //\n // tableOptions.onColumnFiltersChange = ...\n // we don't set this because it expects state to be maintained externally, and we don't want\n // consumers to control state outside the table. instead we have a listener that calls onFilter\n } else {\n tableOptions.getFilteredRowModel = getFilteredRowModel<TType>();\n tableOptions.filterFns = {\n tacoFilter: (row: ReactTableRow<TType>, columnId: string, filter: any) =>\n columnFilterFn(row.getValue(columnId), filter),\n };\n }\n }\n\n if (options.enableSearch) {\n // always set these because enableGlobalFilter can be toggled on and off by the user\n tableOptions.getFilteredRowModel = getFilteredRowModel<TType>();\n tableOptions.globalFilterFn = (row: ReactTableRow<TType>, columnId: string, searchQuery: any) =>\n globalFilterFn(row, columnId, searchQuery, localization);\n tableOptions.getColumnCanGlobalFilter = (column: ReactTableColumn<TType>) =>\n column.columnDef.meta?.enableSearch !== false && column.getIsVisible();\n\n // enter controlled search mode (controlled could be local state, but usually the server)\n if (props.onChangeSearch) {\n // tableOptions.manualFiltering = true;\n // we don't set this because controlled search is not currently supported, search is always client side\n //\n // tableOptions.onGlobalFilterChange = ...\n // we don't set this because it expects state to be maintained externally, and we don't want\n // consumers to control state outside the table. instead we have a listener that calls onSearch.\n //\n // we also don't always filter when searching, we have the highlight functionality as the default\n // and filtering can be toggled by the user\n }\n }\n\n if (tableOptions.enableSorting) {\n // enter controlled sort mode (controlled could be local state, but usually the server)\n if (props.onChangeSort) {\n tableOptions.manualSorting = true;\n\n // tableOptions.onSortingChange = ...\n // we don't set this because it expects state to be maintained externally, and we don't want\n // consumers to control state outside the table. instead we have a listener that calls onSort\n } else {\n tableOptions.getSortedRowModel = getSortedRowModel();\n }\n }\n\n return tableOptions;\n}\n\nexport function useReactTableInitialState<TType = unknown>(\n props: TableProps<TType>,\n columns: ReactTableColumnDef<TType>[],\n persistedSettings: TableSettings,\n defaults: {\n defaultSizing: ReactTableColumnSizingState;\n defaultSorting: ReactTableColumnSort[];\n defaultVisibility: ReactTableVisibilityState;\n }\n): Partial<ReactTableState> {\n return React.useMemo(() => {\n const ignoreNotDefinedColumns = column => columns.find(definedColumn => definedColumn.id === column.id);\n\n const columnPinning: ReactTableColumnPinningState =\n persistedSettings.columnPinning ?? props.defaultSettings?.columnPinning ?? {};\n\n const columnOrder = ensureOrdering<TType>(\n columns,\n persistedSettings.columnOrder ?? props.defaultSettings?.columnOrder,\n columnPinning.left\n );\n\n // ensure internal columns are pinned, and are pinned in the correct order\n if (columnPinning?.left?.length) {\n columnPinning.left = freezeUptoExternalColumn(\n columnOrder.indexOf(columnPinning.left[columnPinning.left.length - 1]),\n columnOrder\n );\n } else {\n if (props.defaultColumnFreezingIndex) {\n columnPinning.left = freezeUptoExternalColumn(props.defaultColumnFreezingIndex, columnOrder);\n } else {\n columnPinning.left = unfreezeAllExternalColumns(columnOrder);\n }\n }\n\n const state: Partial<ReactTableState> = {\n columnFilters: persistedSettings.columnFilters ?? props.defaultSettings?.columnFilters ?? [],\n columnOrder,\n columnPinning,\n columnSizing: ignoreInternalColumns(\n persistedSettings.columnSizing ?? props.defaultSettings?.columnSizing ?? defaults.defaultSizing ?? {}\n ),\n columnVisibility:\n persistedSettings.columnVisibility ?? props.defaultSettings?.columnVisibility ?? defaults.defaultVisibility ?? {},\n globalFilter: persistedSettings.searchQuery ?? props.defaultSettings?.searchQuery,\n sorting: persistedSettings.sorting\n ? persistedSettings.sorting.filter(ignoreNotDefinedColumns)\n : props.defaultSettings?.sorting ?? defaults.defaultSorting,\n };\n\n if (props.defaultRowGroupColumnId) {\n state.grouping = [props.defaultRowGroupColumnId as string];\n // row groups should (all) always be expanded by default\n state.expanded = true;\n }\n\n return state;\n }, []);\n}\n"],"names":["processChildren","child","columns","defaultSizing","defaultSorting","defaultVisibility","settings","defaultRowGroupColumnId","localization","columnHelper","createColumnHelper","React","isValidElement","props","children","id","header","push","group","Children","toArray","reduce","enableGrouping","accessor","_meta$align","untypedId","accessorKey","renderer","aggregate","footer","aggregationFn","defaultHidden","defaultWidth","enableEditing","control","enableFiltering","enableColumnFilter","enableHiding","enableOrdering","enablePrinting","enableResizing","enableSearch","enableGlobalFilter","enableSorting","enableTruncate","minWidth","minSize","getCellMinWidth","fontSize","sort","sortFn","meta","dataTypeProperties","getDataTypeProperties","dataType","isGrouped","undefined","desc","column","accessorFn","row","get","align","cell","info","getValue","original","getDisplayValue","dataTypeRenderer","value","_dataTypeProperties$g","_dataTypeProperties$g2","call","table","getRowModel","rows","flatMap","filterFn","aggregatedCell","sortingFn","getSortingFn","sortDescFirst","sortUndefined","createInternalColumn","size","mapTableChildrenToColumns","options","internalColumns","_props$rowActions","enableRowExpansion","rowExpansionRenderer","rowExpansion","unshift","enableRowSelection","rowSelection","enableRowDrag","onRowDrag","rowDrag","enableRowActions","rowActions","length","configureReactTableOptions","reactTableEnableRowSelection","tableOptions","defaultColumn","enableColumnHiding","enableColumnResizing","enableColumnFilters","_options$enableFilter","_options$enableColumn","enableExpanding","_options$enableRowExp","_options$enableColumn2","enablePinning","_options$enableColumn3","enableColumnFreezing","_options$enableSortin","getExpandedRowModel","getGroupedRowModel","groupedColumnMode","columnResizeMode","onChangeFilter","getFilteredRowModel","filterFns","tacoFilter","columnId","filter","columnFilterFn","globalFilterFn","searchQuery","getColumnCanGlobalFilter","_column$columnDef$met","columnDef","getIsVisible","onChangeSort","manualSorting","getSortedRowModel","useReactTableInitialState","persistedSettings","defaults","useMemo","ignoreNotDefinedColumns","find","definedColumn","columnPinning","_ref","_persistedSettings$co","_props$defaultSetting","defaultSettings","columnOrder","ensureOrdering","_persistedSettings$co2","_props$defaultSetting2","left","_columnPinning$left","freezeUptoExternalColumn","indexOf","defaultColumnFreezingIndex","unfreezeAllExternalColumns","state","columnFilters","_ref2","_persistedSettings$co3","_props$defaultSetting3","columnSizing","ignoreInternalColumns","_ref3","_ref4","_persistedSettings$co4","_props$defaultSetting4","columnVisibility","_ref5","_ref6","_persistedSettings$co5","_props$defaultSetting5","globalFilter","_persistedSettings$se","_props$defaultSetting6","sorting","_props$defaultSetting7","_props$defaultSetting8","grouping","expanded"],"mappings":";;;;;;;;;;AA4BA;AACA,SAASA,eAAeA,CACpBC,KAAiE,EACjEC,OAAqC,EACrCC,aAA0C,EAC1CC,cAAsC,EACtCC,iBAA4C,EAC5CC,QAAuB,EACvBC,uBAAgD,EAChDC,YAA0B;EAE1B,MAAMC,YAAY,GAAGC,kBAAkB,EAAS;EAEhD,iBAAIC,cAAK,CAACC,cAAc,CAAkBX,KAAK,CAAC,IAAIA,KAAK,CAACY,KAAK,CAACC,QAAQ,EAAE;IACtE,MAAM;MAAEA,QAAQ;MAAEC,EAAE;MAAEC;KAAQ,GAAGf,KAAK,CAACY,KAAK;IAE5CX,OAAO,CAACe,IAAI,CACRR,YAAY,CAACS,KAAK,CAAC;MACfH,EAAE;MACFC,MAAM;MACNd,OAAO,EAAES,cAAK,CAACQ,QAAQ,CAACC,OAAO,CAACN,QAAQ,CAAC,CAACO,MAAM,CAC5C,CAACnB,OAAqC,EAAED,KAAK,KACzCD,eAAe,CACXC,KAAK,EACLC,OAAO,EACPC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wJ,KAAK,CAACsB,QAAQ,GAAG,CAACxK,KAAK,CAACN,uBAAiC,CAAC;;MAE1DwJ,KAAK,CAACuB,QAAQ,GAAG,IAAI;;IAGzB,OAAOvB,KAAK;GACf,EAAE,EAAE,CAAC;AACV;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"sorting.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/sorting.ts"],"sourcesContent":["import { SortingFnOption } from '@tanstack/react-table';\nimport { TableColumnDataType, TableColumnSortFn } from '../../types';\nimport { getDataTypeProperties } from './dataTypes';\n\nexport function getSortingFn<TType = unknown>(\n dataType?: TableColumnDataType,\n customFnOrBuiltIn?: TableColumnSortFn<TType>\n): SortingFnOption<TType> | undefined {\n // custom functions should override any that come from dataType\n if (typeof customFnOrBuiltIn === 'function') {\n return (rowA: any, rowB: any, columnId: string) => customFnOrBuiltIn(rowA.original, rowB.original, columnId);\n }\n\n // if a built in is being used, just return that\n if (customFnOrBuiltIn) {\n return customFnOrBuiltIn;\n }\n\n return getDataTypeProperties<TType>(dataType).sortingFn;\n}\n"],"names":["getSortingFn","dataType","customFnOrBuiltIn","rowA","rowB","columnId","original","getDataTypeProperties","sortingFn"],"mappings":";;SAIgBA,YAAYA,CACxBC,QAA8B,EAC9BC,iBAA4C;;EAG5C,IAAI,OAAOA,iBAAiB,KAAK,UAAU,EAAE;IACzC,OAAO,CAACC,IAAS,EAAEC,IAAS,EAAEC,QAAgB,KAAKH,iBAAiB,CAACC,IAAI,CAACG,QAAQ,EAAEF,IAAI,CAACE,QAAQ,EAAED,QAAQ,CAAC;;;EAIhH,IAAIH,iBAAiB,EAAE;IACnB,OAAOA,iBAAiB;;EAG5B,OAAOK,qBAAqB,CAAQN,QAAQ,CAAC,CAACO,SAAS;AAC3D;;;;"}
1
+ {"version":3,"file":"sorting.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/sorting.ts"],"sourcesContent":["import { SortingFnOption } from '@tanstack/react-table';\nimport { TableColumnDataType, TableColumnSortFn } from '../../types';\nimport { getDataTypeProperties } from './dataTypes';\n\nexport function getSortingFn<TType = unknown>(\n dataType?: TableColumnDataType,\n customFnOrBuiltIn?: TableColumnSortFn<TType>\n): SortingFnOption<TType> | undefined {\n // custom functions should override any that come from dataType\n if (typeof customFnOrBuiltIn === 'function') {\n return (rowA, rowB, columnId) => customFnOrBuiltIn(rowA.original, rowB.original, columnId);\n }\n\n // if a built in is being used, just return that\n if (customFnOrBuiltIn) {\n return customFnOrBuiltIn;\n }\n\n return getDataTypeProperties<TType>(dataType).sortingFn;\n}\n"],"names":["getSortingFn","dataType","customFnOrBuiltIn","rowA","rowB","columnId","original","getDataTypeProperties","sortingFn"],"mappings":";;SAIgBA,YAAYA,CACxBC,QAA8B,EAC9BC,iBAA4C;;EAG5C,IAAI,OAAOA,iBAAiB,KAAK,UAAU,EAAE;IACzC,OAAO,CAACC,IAAI,EAAEC,IAAI,EAAEC,QAAQ,KAAKH,iBAAiB,CAACC,IAAI,CAACG,QAAQ,EAAEF,IAAI,CAACE,QAAQ,EAAED,QAAQ,CAAC;;;EAI9F,IAAIH,iBAAiB,EAAE;IACnB,OAAOA,iBAAiB;;EAG5B,OAAOK,qBAAqB,CAAQN,QAAQ,CAAC,CAACO,SAAS;AAC3D;;;;"}
@@ -1,5 +1,5 @@
1
1
  // taken from react-aria
2
- const FOCUSABLE_ELEMENTS = ['input:not([disabled]):not([type=hidden])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'a[href]', 'area[href]', 'summary', 'iframe', 'object', 'embed', 'audio[controls]', 'video[controls]', '[contenteditable]', '[tabindex]:not([tabindex="-1"]):not([disabled])', 'details:not([disabled])', 'summary:not(:disabled)'];
2
+ const FOCUSABLE_ELEMENTS = ['[tabindex]:not([disabled]):not([tabindex="-1"])', 'input:not([disabled]):not([type=hidden]):not([tabindex="-1"])', 'select:not([disabled]):not([tabindex="-1"])', 'textarea:not([disabled]):not([tabindex="-1"])', 'button:not([disabled]):not([tabindex="-1"])', 'a[href]', 'area[href]', 'summary', 'iframe', 'object', 'embed', 'audio[controls]', 'video[controls]', '[contenteditable]', 'details:not([disabled]):not([tabindex="-1"])', 'summary:not(:disabled):not([tabindex="-1"])'];
3
3
  const hasFocusableElement = element => {
4
4
  if (!element) {
5
5
  return null;
@@ -25,13 +25,20 @@ const getNextFocussableElement = currentElement => {
25
25
  if (!currentElement) {
26
26
  return null;
27
27
  }
28
- const focussableElements = [...document.querySelectorAll(FOCUSABLE_ELEMENTS.join(','))];
28
+ let focussableElements = [...document.querySelectorAll(FOCUSABLE_ELEMENTS.join(','))];
29
29
  const currentElementIndex = focussableElements.indexOf(currentElement);
30
- // If the currentElement is not in the focussable elements list or it is the last element
31
- if (currentElementIndex !== -1 && currentElementIndex === focussableElements.length - 1) {
32
- return null;
30
+ if (currentElementIndex > -1) {
31
+ focussableElements = focussableElements.slice(currentElementIndex + 1);
32
+ if (focussableElements.length) {
33
+ var _focussableElements$;
34
+ focussableElements = focussableElements.filter(element => {
35
+ var _element$checkVisibil, _element$checkVisibil2;
36
+ return (_element$checkVisibil = (_element$checkVisibil2 = element.checkVisibility) === null || _element$checkVisibil2 === void 0 ? void 0 : _element$checkVisibil2.call(element)) !== null && _element$checkVisibil !== void 0 ? _element$checkVisibil : true;
37
+ });
38
+ return (_focussableElements$ = focussableElements[0]) !== null && _focussableElements$ !== void 0 ? _focussableElements$ : null;
39
+ }
33
40
  }
34
- return focussableElements[currentElementIndex + 1];
41
+ return null;
35
42
  };
36
43
  const getOverlaySelector = element => {
37
44
  switch (element === null || element === void 0 ? void 0 : element.getAttribute('role')) {
@@ -47,11 +54,10 @@ function isElementInsideOrTriggeredFromContainer(element, container) {
47
54
  var _getOverlaySelector, _element$closest;
48
55
  const selector = (_getOverlaySelector = getOverlaySelector(element)) !== null && _getOverlaySelector !== void 0 ? _getOverlaySelector : getOverlaySelector((_element$closest = element === null || element === void 0 ? void 0 : element.closest('[role=dialog],[role=menu]')) !== null && _element$closest !== void 0 ? _element$closest : null);
49
56
  if (selector) {
50
- const escapedSelector = CSS.escape(selector);
51
- if (container !== null && container !== void 0 && container.querySelector(escapedSelector)) {
57
+ if (container !== null && container !== void 0 && container.querySelector(selector)) {
52
58
  return true;
53
59
  }
54
- const elementInDocument = document.querySelector(escapedSelector);
60
+ const elementInDocument = document.querySelector(selector);
55
61
  // if the element does exist, see if it is itself connected to somethng that was triggered from the container
56
62
  if (elementInDocument) {
57
63
  return isElementInsideOrTriggeredFromContainer(elementInDocument, container);
@@ -1 +1 @@
1
- {"version":3,"file":"dom.js","sources":["../../../../../../src/utils/dom.ts"],"sourcesContent":["// taken from react-aria\nconst FOCUSABLE_ELEMENTS = [\n 'input:not([disabled]):not([type=hidden])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]',\n '[tabindex]:not([tabindex=\"-1\"]):not([disabled])',\n 'details:not([disabled])',\n 'summary:not(:disabled)',\n];\n\nexport const hasFocusableElement = (element: HTMLElement | null) => {\n if (!element) {\n return null;\n }\n\n return !!element.querySelector(FOCUSABLE_ELEMENTS.join(','));\n};\n\nexport const isOverflowing = (element: HTMLElement | null) =>\n element !== null ? element.scrollWidth > element.offsetWidth : false;\n\nexport const getIndexOfFirstChildOverflowingParent = (element: HTMLElement, overscan = 0) => {\n let index = 0;\n let boundaryChildIndex: number | null = null;\n const clientRect = element.getBoundingClientRect();\n\n for (const child of Array.from(element.children)) {\n const right = child.getBoundingClientRect().right - clientRect.left;\n const width = clientRect.width - overscan;\n\n if (right > width) {\n boundaryChildIndex = index;\n break;\n }\n index++;\n }\n\n return boundaryChildIndex;\n};\n\nexport const getNextFocussableElement = (currentElement: HTMLElement | null) => {\n if (!currentElement) {\n return null;\n }\n\n const focussableElements = [...document.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS.join(','))];\n const currentElementIndex = focussableElements.indexOf(currentElement);\n\n // If the currentElement is not in the focussable elements list or it is the last element\n if (currentElementIndex !== -1 && currentElementIndex === focussableElements.length - 1) {\n return null;\n }\n\n return focussableElements[currentElementIndex + 1];\n};\n\nconst getOverlaySelector = (element: Element | null) => {\n switch (element?.getAttribute('role')) {\n case 'dialog':\n return `[aria-controls='${element.id}']`;\n\n case 'menu':\n return `#${element.getAttribute('aria-labelledby')}`;\n\n default:\n return undefined;\n }\n};\n\nexport function isElementInsideOrTriggeredFromContainer(element: Element | null, container: Element | null): boolean {\n const selector = getOverlaySelector(element) ?? getOverlaySelector(element?.closest('[role=dialog],[role=menu]') ?? null);\n\n if (selector) {\n const escapedSelector = CSS.escape(selector);\n\n if (container?.querySelector(escapedSelector)) {\n return true;\n }\n\n const elementInDocument = document.querySelector(escapedSelector);\n\n // if the element does exist, see if it is itself connected to somethng that was triggered from the container\n if (elementInDocument) {\n return isElementInsideOrTriggeredFromContainer(elementInDocument, container);\n }\n\n return false;\n }\n\n return !!container?.contains(element);\n}\n\nexport function isElementInsideOverlay(element: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]');\n}\n\nexport function isSiblingElementInsideSameParentOverlay(element: Element | null, sibling: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]')?.contains(sibling);\n}\n\nexport function isElementInteractive(element: Element | null) {\n if (!element) {\n return false;\n }\n\n return (\n ['A', 'BUTTON', 'INPUT', 'TEXTAREA', 'SELECT', 'LABEL', 'OPTION'].includes(element.tagName) &&\n !(element as HTMLElement).hidden &&\n !(element as HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLButtonElement).disabled &&\n !(element as HTMLInputElement | HTMLTextAreaElement).readOnly\n );\n}\n\nexport function isElementInsideTable3OrReport(element: Element | null) {\n return !!element?.closest('[data-taco^=table]');\n}\n\nexport function setDataFocusAttribute(target: Element) {\n target.setAttribute('data-focus', 'programmatic');\n\n const cleanup = () => {\n target.removeAttribute('data-focus');\n target.removeEventListener('blur', cleanup);\n };\n\n target.addEventListener('blur', cleanup);\n}\n"],"names":["FOCUSABLE_ELEMENTS","hasFocusableElement","element","querySelector","join","getIndexOfFirstChildOverflowingParent","overscan","index","boundaryChildIndex","clientRect","getBoundingClientRect","child","Array","from","children","right","left","width","getNextFocussableElement","currentElement","focussableElements","document","querySelectorAll","currentElementIndex","indexOf","length","getOverlaySelector","getAttribute","id","undefined","isElementInsideOrTriggeredFromContainer","container","selector","_getOverlaySelector","_element$closest","closest","escapedSelector","CSS","escape","elementInDocument","contains","isElementInsideOverlay","isSiblingElementInsideSameParentOverlay","sibling","_element$closest2","isElementInteractive","includes","tagName","hidden","disabled","readOnly","isElementInsideTable3OrReport","setDataFocusAttribute","target","setAttribute","cleanup","removeAttribute","removeEventListener","addEventListener"],"mappings":"AAAA;AACA,MAAMA,kBAAkB,GAAG,CACvB,0CAA0C,EAC1C,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,SAAS,EACT,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,iDAAiD,EACjD,yBAAyB,EACzB,wBAAwB,CAC3B;MAEYC,mBAAmB,GAAIC,OAA2B;EAC3D,IAAI,CAACA,OAAO,EAAE;IACV,OAAO,IAAI;;EAGf,OAAO,CAAC,CAACA,OAAO,CAACC,aAAa,CAACH,kBAAkB,CAACI,IAAI,CAAC,GAAG,CAAC,CAAC;AAChE;MAKaC,qCAAqC,GAAGA,CAACH,OAAoB,EAAEI,QAAQ,GAAG,CAAC;EACpF,IAAIC,KAAK,GAAG,CAAC;EACb,IAAIC,kBAAkB,GAAkB,IAAI;EAC5C,MAAMC,UAAU,GAAGP,OAAO,CAACQ,qBAAqB,EAAE;EAElD,KAAK,MAAMC,KAAK,IAAIC,KAAK,CAACC,IAAI,CAACX,OAAO,CAACY,QAAQ,CAAC,EAAE;IAC9C,MAAMC,KAAK,GAAGJ,KAAK,CAAC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AACgD,QAAQ;AAErE;SAEgBC,6BAA6BA,CAACjD,OAAuB;EACjE,OAAO,CAAC,EAACA,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEiC,OAAO,CAAC,oBAAoB,CAAC;AACnD;SAEgBiB,qBAAqBA,CAACC,MAAe;EACjDA,MAAM,CAACC,YAAY,CAAC,YAAY,EAAE,cAAc,CAAC;EAEjD,MAAMC,OAAO,GAAGA;IACZF,MAAM,CAACG,eAAe,CAAC,YAAY,CAAC;IACpCH,MAAM,CAACI,mBAAmB,CAAC,MAAM,EAAEF,OAAO,CAAC;GAC9C;EAEDF,MAAM,CAACK,gBAAgB,CAAC,MAAM,EAAEH,OAAO,CAAC;AAC5C;;;;"}
1
+ {"version":3,"file":"dom.js","sources":["../../../../../../src/utils/dom.ts"],"sourcesContent":["// taken from react-aria\nconst FOCUSABLE_ELEMENTS = [\n '[tabindex]:not([disabled]):not([tabindex=\"-1\"])',\n 'input:not([disabled]):not([type=hidden]):not([tabindex=\"-1\"])',\n 'select:not([disabled]):not([tabindex=\"-1\"])',\n 'textarea:not([disabled]):not([tabindex=\"-1\"])',\n 'button:not([disabled]):not([tabindex=\"-1\"])',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]',\n 'details:not([disabled]):not([tabindex=\"-1\"])',\n 'summary:not(:disabled):not([tabindex=\"-1\"])',\n];\n\nexport const hasFocusableElement = (element: HTMLElement | null) => {\n if (!element) {\n return null;\n }\n\n return !!element.querySelector(FOCUSABLE_ELEMENTS.join(','));\n};\n\nexport const isOverflowing = (element: HTMLElement | null) =>\n element !== null ? element.scrollWidth > element.offsetWidth : false;\n\nexport const getIndexOfFirstChildOverflowingParent = (element: HTMLElement, overscan = 0) => {\n let index = 0;\n let boundaryChildIndex: number | null = null;\n const clientRect = element.getBoundingClientRect();\n\n for (const child of Array.from(element.children)) {\n const right = child.getBoundingClientRect().right - clientRect.left;\n const width = clientRect.width - overscan;\n\n if (right > width) {\n boundaryChildIndex = index;\n break;\n }\n index++;\n }\n\n return boundaryChildIndex;\n};\n\nexport const getNextFocussableElement = (currentElement: HTMLElement | null) => {\n if (!currentElement) {\n return null;\n }\n\n let focussableElements = [...document.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS.join(','))];\n const currentElementIndex = focussableElements.indexOf(currentElement);\n\n if (currentElementIndex > -1) {\n focussableElements = focussableElements.slice(currentElementIndex + 1);\n\n if (focussableElements.length) {\n focussableElements = focussableElements.filter(element => (element as any).checkVisibility?.() ?? true);\n return focussableElements[0] ?? null;\n }\n }\n\n return null;\n};\n\nconst getOverlaySelector = (element: Element | null) => {\n switch (element?.getAttribute('role')) {\n case 'dialog':\n return `[aria-controls='${element.id}']`;\n\n case 'menu':\n return `#${element.getAttribute('aria-labelledby')}`;\n\n default:\n return undefined;\n }\n};\n\nexport function isElementInsideOrTriggeredFromContainer(element: Element | null, container: Element | null) {\n const selector = getOverlaySelector(element) ?? getOverlaySelector(element?.closest('[role=dialog],[role=menu]') ?? null);\n\n if (selector) {\n if (container?.querySelector(selector)) {\n return true;\n }\n\n const elementInDocument = document.querySelector(selector);\n\n // if the element does exist, see if it is itself connected to somethng that was triggered from the container\n if (elementInDocument) {\n return isElementInsideOrTriggeredFromContainer(elementInDocument, container);\n }\n\n return false;\n }\n\n return !!container?.contains(element);\n}\n\nexport function isElementInsideOverlay(element: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]');\n}\n\nexport function isSiblingElementInsideSameParentOverlay(element: Element | null, sibling: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]')?.contains(sibling);\n}\n\nexport function isElementInteractive(element: Element | null) {\n if (!element) {\n return false;\n }\n\n return (\n ['A', 'BUTTON', 'INPUT', 'TEXTAREA', 'SELECT', 'LABEL', 'OPTION'].includes(element.tagName) &&\n !(element as HTMLElement).hidden &&\n !(element as HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLButtonElement).disabled &&\n !(element as HTMLInputElement | HTMLTextAreaElement).readOnly\n );\n}\n\nexport function isElementInsideTable3OrReport(element: Element | null) {\n return !!element?.closest('[data-taco^=table]');\n}\n\nexport function setDataFocusAttribute(target: Element) {\n target.setAttribute('data-focus', 'programmatic');\n\n const cleanup = () => {\n target.removeAttribute('data-focus');\n target.removeEventListener('blur', cleanup);\n };\n\n target.addEventListener('blur', cleanup);\n}\n"],"names":["FOCUSABLE_ELEMENTS","hasFocusableElement","element","querySelector","join","getIndexOfFirstChildOverflowingParent","overscan","index","boundaryChildIndex","clientRect","getBoundingClientRect","child","Array","from","children","right","left","width","getNextFocussableElement","currentElement","focussableElements","document","querySelectorAll","currentElementIndex","indexOf","slice","length","_focussableElements$","filter","_element$checkVisibil","_element$checkVisibil2","checkVisibility","call","getOverlaySelector","getAttribute","id","undefined","isElementInsideOrTriggeredFromContainer","container","selector","_getOverlaySelector","_element$closest","closest","elementInDocument","contains","isElementInsideOverlay","isSiblingElementInsideSameParentOverlay","sibling","_element$closest2","isElementInteractive","includes","tagName","hidden","disabled","readOnly","isElementInsideTable3OrReport","setDataFocusAttribute","target","setAttribute","cleanup","removeAttribute","removeEventListener","addEventListener"],"mappings":"AAAA;AACA,MAAMA,kBAAkB,GAAG,CACvB,iDAAiD,EACjD,+DAA+D,EAC/D,6CAA6C,EAC7C,+CAA+C,EAC/C,6CAA6C,EAC7C,SAAS,EACT,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,8CAA8C,EAC9C,6CAA6C,CAChD;MAEYC,mBAAmB,GAAIC,OAA2B;EAC3D,IAAI,CAACA,OAAO,EAAE;IACV,OAAO,IAAI;;EAGf,OAAO,CAAC,CAACA,OAAO,CAACC,aAAa,CAACH,kBAAkB,CAACI,IAAI,CAAC,GAAG,CAAC,CAAC;AAChE;MAKaC,qCAAqC,GAAGA,CAACH,OAAoB,EAAEI,QAA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C,2BAA2B,CAAC;AAC1D;SAEgBI,uCAAuCA,CAAC5C,OAAuB,EAAE6C,OAAuB;;EACpG,OAAO,CAAC,EAAC7C,OAAO,aAAPA,OAAO,gBAAA8C,iBAAA,GAAP9C,OAAO,CAAEwC,OAAO,CAAC,2BAA2B,CAAC,cAAAM,iBAAA,eAA7CA,iBAAA,CAA+CJ,QAAQ,CAACG,OAAO,CAAC;AAC7E;SAEgBE,oBAAoBA,CAAC/C,OAAuB;EACxD,IAAI,CAACA,OAAO,EAAE;IACV,OAAO,KAAK;;EAGhB,OACI,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,CAACgD,QAAQ,CAAChD,OAAO,CAACiD,OAAO,CAAC,IAC3F,CAAEjD,OAAuB,CAACkD,MAAM,IAChC,CAAElD,OAA0F,CAACmD,QAAQ,IACrG,CAAEnD,OAAkD,CAACoD,QAAQ;AAErE;SAEgBC,6BAA6BA,CAACrD,OAAuB;EACjE,OAAO,CAAC,EAACA,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEwC,OAAO,CAAC,oBAAoB,CAAC;AACnD;SAEgBc,qBAAqBA,CAACC,MAAe;EACjDA,MAAM,CAACC,YAAY,CAAC,YAAY,EAAE,cAAc,CAAC;EAEjD,MAAMC,OAAO,GAAGA;IACZF,MAAM,CAACG,eAAe,CAAC,YAAY,CAAC;IACpCH,MAAM,CAACI,mBAAmB,CAAC,MAAM,EAAEF,OAAO,CAAC;GAC9C;EAEDF,MAAM,CAACK,gBAAgB,CAAC,MAAM,EAAEH,OAAO,CAAC;AAC5C;;;;"}
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const BubbleSelect: (props: React.SelectHTMLAttributes<HTMLSelectElement>) => React.JSX.Element;
2
+ export declare const BubbleSelect: (props: React.SelectHTMLAttributes<HTMLSelectElement>) => JSX.Element;
@@ -1,12 +1,14 @@
1
1
  import React from 'react';
2
2
  export declare type CollectionProps = React.HTMLAttributes<HTMLDivElement> & {
3
3
  querySelector: string;
4
+ resetOnChange?: unknown;
4
5
  };
5
6
  export declare type CollectionRef = HTMLDivElement & {
6
7
  setActiveIndexByElement: (option: HTMLDivElement) => void;
7
8
  };
8
9
  export declare const Root: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
9
10
  querySelector: string;
11
+ resetOnChange?: unknown;
10
12
  } & React.RefAttributes<CollectionRef>>;
11
13
  export declare const getNextIndexFromKeycode: (event: React.KeyboardEvent, length: number, activeIndex: number | undefined) => number | undefined;
12
14
  export declare const getNextEnabledItem: (event: React.KeyboardEvent<HTMLElement>, options: NodeListOf<Element>, activeIndex: number | undefined, recurse?: boolean) => number | undefined;
@@ -1,11 +1,11 @@
1
- import React, { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import { SortableItemId } from './Item';
3
3
  export declare type SortableContainerProps = {
4
4
  children: ReactNode;
5
5
  move?: (activeId: SortableItemId, overId: SortableItemId, listId: string) => void;
6
6
  reorder: (activeId: SortableItemId, oldListId: string, listId: string) => void;
7
7
  };
8
- export declare function Container(externalProps: SortableContainerProps): React.JSX.Element;
8
+ export declare function Container(externalProps: any): JSX.Element;
9
9
  export declare namespace Container {
10
10
  var displayName: string;
11
11
  }
@@ -3,9 +3,8 @@ export declare type SortableItemId = string | number;
3
3
  export declare type SortableListItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'id'> & {
4
4
  disabled?: boolean;
5
5
  id: SortableItemId;
6
- asChild: boolean;
7
6
  };
8
- export declare function Item(props: SortableListItemProps): React.JSX.Element;
7
+ export declare function Item(props: any): JSX.Element;
9
8
  export declare namespace Item {
10
9
  var displayName: string;
11
10
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  export declare type SortableListProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'id'> & {
3
3
  id: string;
4
4
  };
5
- export declare function List(externalProps: SortableListProps): React.JSX.Element;
5
+ export declare function List(externalProps: SortableListProps): JSX.Element;
6
6
  export declare namespace List {
7
7
  var displayName: string;
8
8
  }
@@ -5,7 +5,7 @@ import './style.css';
5
5
  declare type TableProps = {
6
6
  children: JSX.Element | Array<JSX.Element | null>;
7
7
  };
8
- export declare function Table(props: TableProps): React.JSX.Element;
8
+ export declare function Table(props: TableProps): JSX.Element;
9
9
  export declare namespace Table {
10
10
  var Toolbar: typeof TableToolbar;
11
11
  var Grid: typeof TableGrid;
@@ -15,5 +15,5 @@ export declare type TableGridProps<TType = unknown> = React.TableHTMLAttributes<
15
15
  enableHorizontalArrowKeyNavigation?: boolean;
16
16
  table: useTableReturnValue<TType>;
17
17
  };
18
- export declare function TableGrid<TType = unknown>(props: TableGridProps<TType>): React.JSX.Element;
18
+ export declare function TableGrid<TType = unknown>(props: TableGridProps<TType>): JSX.Element;
19
19
  export {};
@@ -7,5 +7,5 @@ declare type BodyProps<TType = unknown> = React.HTMLAttributes<HTMLTableSectionE
7
7
  table: ReactTable<TType>;
8
8
  tableElement: TableRef | null;
9
9
  };
10
- export declare function Body<TType = unknown>(props: BodyProps<TType>): React.JSX.Element;
10
+ export declare function Body<TType = unknown>(props: BodyProps<TType>): JSX.Element;
11
11
  export {};
@@ -4,5 +4,5 @@ declare type EmptyStateProps = React.HTMLAttributes<HTMLTableSectionElement> & {
4
4
  emptyState?: TableEmptyStateRenderer;
5
5
  reason: TableEmptyStateReason;
6
6
  };
7
- export declare function EmptyStateBody(props: EmptyStateProps): React.JSX.Element;
7
+ export declare function EmptyStateBody(props: EmptyStateProps): JSX.Element;
8
8
  export {};
@@ -1,6 +1,6 @@
1
1
  export declare function useAugmentedFocusManager(): {
2
- focusPrevious: (arrowNavigation?: boolean) => import("@react-types/shared").FocusableElement | null | undefined;
3
- focusNext: (arrowNavigation?: boolean) => import("@react-types/shared").FocusableElement | null | undefined;
4
- focusFirst: () => import("@react-types/shared").FocusableElement | null | undefined;
5
- focusLast: () => import("@react-types/shared").FocusableElement | null | undefined;
2
+ focusPrevious: (arrowNavigation?: boolean) => import("@react-types/shared").FocusableElement;
3
+ focusNext: (arrowNavigation?: boolean) => import("@react-types/shared").FocusableElement;
4
+ focusFirst: () => import("@react-types/shared").FocusableElement;
5
+ focusLast: () => import("@react-types/shared").FocusableElement;
6
6
  };
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { TableCellRendererProps } from '../../../../types';
3
- export declare function DisplayCell<TType = unknown>(props: TableCellRendererProps<TType>): React.JSX.Element;
3
+ export declare function DisplayCell<TType = unknown>(props: TableCellRendererProps<TType>): JSX.Element;
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { TableCellRendererProps } from '../../../../types';
3
- export declare function GroupedCell<TType = unknown>(props: TableCellRendererProps<TType>): React.JSX.Element;
3
+ export declare function GroupedCell<TType = unknown>(props: TableCellRendererProps<TType>): JSX.Element;
@@ -6,5 +6,5 @@ declare type CellProps<TType = unknown> = React.HTMLAttributes<HTMLTableCellElem
6
6
  index: number;
7
7
  renderer: TableCellRenderer<TType>;
8
8
  };
9
- export declare function Cell<TType = unknown>(props: CellProps<TType>): React.JSX.Element | null;
9
+ export declare function Cell<TType = unknown>(props: CellProps<TType>): JSX.Element | null;
10
10
  export {};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { TableRowActionRenderer } from '../../../../types';
3
3
  import { useTableManagerInternalColumn } from '../../../../useTableManager/types';
4
4
  export declare type ActionsProps<TType = unknown> = {
@@ -8,5 +8,5 @@ export declare type ActionsProps<TType = unknown> = {
8
8
  isActiveRow: boolean;
9
9
  rowId: string;
10
10
  };
11
- export declare function Actions<TType = unknown>(props: ActionsProps<TType>): React.JSX.Element;
11
+ export declare function Actions<TType = unknown>(props: ActionsProps<TType>): JSX.Element;
12
12
  export declare const renderer: useTableManagerInternalColumn;
@@ -1,14 +1,14 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { Header as ReactTableHeader, Table as ReactTable } from '@tanstack/react-table';
3
3
  export declare type FootProps<TType = unknown> = {
4
4
  table: ReactTable<TType>;
5
5
  };
6
- export declare function Foot<TType = unknown>(props: FootProps<TType>): React.JSX.Element;
6
+ export declare function Foot<TType = unknown>(props: FootProps<TType>): JSX.Element;
7
7
  export declare type FooterProps<TType = unknown> = {
8
8
  header: ReactTableHeader<TType, unknown>;
9
9
  index: number;
10
10
  };
11
- export declare function Footer<TType = unknown>(props: FooterProps<TType>): React.JSX.Element;
11
+ export declare function Footer<TType = unknown>(props: FooterProps<TType>): JSX.Element;
12
12
  export declare type MemoedFooterProps<TType = unknown> = {
13
13
  footer: ReactTableHeader<TType, unknown>;
14
14
  index: number;
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { Table as ReactTable } from '@tanstack/react-table';
3
3
  export declare type FooterSummaryProps<TType = unknown> = {
4
4
  table: ReactTable<TType>;
5
5
  };
6
- export declare function Summary<TType = unknown>(props: FooterSummaryProps<TType>): React.JSX.Element;
6
+ export declare function Summary<TType = unknown>(props: FooterSummaryProps<TType>): JSX.Element;
@@ -5,7 +5,7 @@ export declare type HeaderProps<TType = unknown> = {
5
5
  header: ReactTableHeader<TType, unknown>;
6
6
  scrollToIndex: (index: number) => void;
7
7
  };
8
- export declare function Header<TType = unknown>(props: HeaderProps<TType>): React.JSX.Element | null;
8
+ export declare function Header<TType = unknown>(props: HeaderProps<TType>): JSX.Element | null;
9
9
  export declare type MemoedHeaderProps = {
10
10
  align?: TableColumnAlignment;
11
11
  canFilter: boolean;
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { PopoverProps } from '../../../../../../components/Popover/Popover';
3
3
  export declare type GotoProps = PopoverProps & {
4
4
  onGoto: (query: string) => Promise<void>;
5
5
  };
6
- export declare function GotoPopover(props: GotoProps): React.JSX.Element;
6
+ export declare function GotoPopover(props: GotoProps): JSX.Element;
@@ -19,4 +19,4 @@ export declare type HeaderMenuProps = React.ButtonHTMLAttributes<HTMLButtonEleme
19
19
  setRowActiveIndex: (index: number) => void;
20
20
  sortDirection?: TableColumnSortDirection | false;
21
21
  };
22
- export declare function HeaderMenu(props: HeaderMenuProps): React.JSX.Element;
22
+ export declare function HeaderMenu(props: HeaderMenuProps): JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { TableColumnWidth } from '../../../../types';
3
3
  declare type ResizerProps = {
4
4
  headerRef: HTMLTableCellElement | null;
@@ -9,5 +9,5 @@ declare type ResizerProps = {
9
9
  setColumnSizing: any;
10
10
  width?: TableColumnWidth;
11
11
  };
12
- export declare function Resizer(props: ResizerProps): React.JSX.Element;
12
+ export declare function Resizer(props: ResizerProps): JSX.Element;
13
13
  export {};
@@ -3,13 +3,13 @@ import { TableColumnSortDirection } from '../../../../types';
3
3
  declare type SortIndicatorProps = {
4
4
  direction: false | TableColumnSortDirection;
5
5
  };
6
- export declare function SortIndicator(props: SortIndicatorProps): React.JSX.Element;
7
- export declare const getAriaSort: (direction: TableColumnSortDirection) => string;
6
+ export declare function SortIndicator(props: SortIndicatorProps): any;
7
+ export declare const getAriaSort: (direction: any) => any;
8
8
  export declare function getSortAttributes(canSort: boolean, toggleSorting?: (event: unknown) => void, sortDirection?: false | TableColumnSortDirection): {
9
9
  'aria-sort'?: undefined;
10
10
  onClick?: undefined;
11
11
  } | {
12
- 'aria-sort': string;
12
+ 'aria-sort': any;
13
13
  onClick: (event: React.MouseEvent) => void;
14
14
  };
15
15
  export {};
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { Table as ReactTable, Row as ReactTableRow } from '@tanstack/react-table';
3
3
  export declare type RowProps<TType = unknown> = {
4
4
  index: number;
5
5
  row: ReactTableRow<TType>;
6
6
  table: ReactTable<TType>;
7
7
  };
8
- export declare function SkeletonRow<TType = unknown>(props: RowProps<TType>): React.JSX.Element;
8
+ export declare function SkeletonRow<TType = unknown>(props: RowProps<TType>): JSX.Element;
@@ -3,4 +3,4 @@ import { TableRowRenderer, TableRowRendererProps } from '../../types';
3
3
  export declare type RowProps<TType = unknown> = React.HTMLAttributes<HTMLTableRowElement> & TableRowRendererProps<TType> & {
4
4
  renderer: TableRowRenderer<TType>;
5
5
  };
6
- export declare function Row<TType = unknown>(props: RowProps<TType>): React.JSX.Element;
6
+ export declare function Row<TType = unknown>(props: RowProps<TType>): JSX.Element;