@economic/taco 2.42.1-alpha.0 → 2.43.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (446) 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/components/Content.d.ts +1 -1
  4. package/dist/components/Calendar/Calendar.d.ts +1 -1
  5. package/dist/components/Datepicker/Datepicker.d.ts +3 -3
  6. package/dist/components/Dialog/components/Content.d.ts +1 -1
  7. package/dist/components/Dialog/components/DialogDrawer.d.ts +1 -1
  8. package/dist/components/Drawer/components/Content.d.ts +2 -2
  9. package/dist/components/Header/components/Agreement/Badge.d.ts +1 -1
  10. package/dist/components/Header/components/Agreement/Display.d.ts +2 -2
  11. package/dist/components/Header/components/Agreement/Item.d.ts +2 -2
  12. package/dist/components/Header/components/AgreementSelector.d.ts +2 -2
  13. package/dist/components/Header/components/Button.d.ts +1 -1
  14. package/dist/components/HoverCard/HoverCard.d.ts +1 -1
  15. package/dist/components/Icon/components/AccountPreview.d.ts +1 -1
  16. package/dist/components/Icon/components/Accounting.d.ts +1 -1
  17. package/dist/components/Icon/components/AccountingYear.d.ts +1 -1
  18. package/dist/components/Icon/components/AccountingYearCancel.d.ts +1 -1
  19. package/dist/components/Icon/components/AiChatSolid.d.ts +1 -1
  20. package/dist/components/Icon/components/AiStars.d.ts +1 -1
  21. package/dist/components/Icon/components/ArrowBottom.d.ts +1 -1
  22. package/dist/components/Icon/components/ArrowDown.d.ts +1 -1
  23. package/dist/components/Icon/components/ArrowEnd.d.ts +1 -1
  24. package/dist/components/Icon/components/ArrowLeft.d.ts +1 -1
  25. package/dist/components/Icon/components/ArrowRight.d.ts +1 -1
  26. package/dist/components/Icon/components/ArrowStart.d.ts +1 -1
  27. package/dist/components/Icon/components/ArrowTop.d.ts +1 -1
  28. package/dist/components/Icon/components/ArrowUp.d.ts +1 -1
  29. package/dist/components/Icon/components/Attach.d.ts +1 -1
  30. package/dist/components/Icon/components/AttachAuto.d.ts +1 -1
  31. package/dist/components/Icon/components/AttachCancel.d.ts +1 -1
  32. package/dist/components/Icon/components/AttachWarning.d.ts +1 -1
  33. package/dist/components/Icon/components/Autotext.d.ts +1 -1
  34. package/dist/components/Icon/components/AutotextInsert.d.ts +1 -1
  35. package/dist/components/Icon/components/Basic.d.ts +1 -1
  36. package/dist/components/Icon/components/BasicTabs.d.ts +1 -1
  37. package/dist/components/Icon/components/BellSolid.d.ts +1 -1
  38. package/dist/components/Icon/components/Book.d.ts +1 -1
  39. package/dist/components/Icon/components/Booking.d.ts +1 -1
  40. package/dist/components/Icon/components/Budget.d.ts +1 -1
  41. package/dist/components/Icon/components/Calendar.d.ts +1 -1
  42. package/dist/components/Icon/components/CashAccount.d.ts +1 -1
  43. package/dist/components/Icon/components/CashReports.d.ts +1 -1
  44. package/dist/components/Icon/components/ChartArea.d.ts +1 -1
  45. package/dist/components/Icon/components/ChartBar.d.ts +1 -1
  46. package/dist/components/Icon/components/ChartLine.d.ts +1 -1
  47. package/dist/components/Icon/components/ChartPie.d.ts +1 -1
  48. package/dist/components/Icon/components/ChartTable.d.ts +1 -1
  49. package/dist/components/Icon/components/Chat.d.ts +1 -1
  50. package/dist/components/Icon/components/ChatSolid.d.ts +1 -1
  51. package/dist/components/Icon/components/ChevronDown.d.ts +1 -1
  52. package/dist/components/Icon/components/ChevronDownDouble.d.ts +1 -1
  53. package/dist/components/Icon/components/ChevronDownSolid.d.ts +1 -1
  54. package/dist/components/Icon/components/ChevronLeft.d.ts +1 -1
  55. package/dist/components/Icon/components/ChevronLeftDouble.d.ts +1 -1
  56. package/dist/components/Icon/components/ChevronLeftSolid.d.ts +1 -1
  57. package/dist/components/Icon/components/ChevronRight.d.ts +1 -1
  58. package/dist/components/Icon/components/ChevronRightDouble.d.ts +1 -1
  59. package/dist/components/Icon/components/ChevronRightSolid.d.ts +1 -1
  60. package/dist/components/Icon/components/ChevronUp.d.ts +1 -1
  61. package/dist/components/Icon/components/ChevronUpDouble.d.ts +1 -1
  62. package/dist/components/Icon/components/ChevronUpSolid.d.ts +1 -1
  63. package/dist/components/Icon/components/CircleClose.d.ts +1 -1
  64. package/dist/components/Icon/components/CircleInformation.d.ts +1 -1
  65. package/dist/components/Icon/components/CircleMinus.d.ts +1 -1
  66. package/dist/components/Icon/components/CirclePlus.d.ts +1 -1
  67. package/dist/components/Icon/components/CircleQuestionmark.d.ts +1 -1
  68. package/dist/components/Icon/components/CircleTick.d.ts +1 -1
  69. package/dist/components/Icon/components/CircleWarning.d.ts +1 -1
  70. package/dist/components/Icon/components/Clamp.d.ts +1 -1
  71. package/dist/components/Icon/components/ClampOpen.d.ts +1 -1
  72. package/dist/components/Icon/components/Close.d.ts +1 -1
  73. package/dist/components/Icon/components/ColumnFreeze.d.ts +1 -1
  74. package/dist/components/Icon/components/ColumnUnfreeze.d.ts +1 -1
  75. package/dist/components/Icon/components/Columns.d.ts +1 -1
  76. package/dist/components/Icon/components/ConnectionEnable.d.ts +1 -1
  77. package/dist/components/Icon/components/ConnectionRevoke.d.ts +1 -1
  78. package/dist/components/Icon/components/Contacts.d.ts +1 -1
  79. package/dist/components/Icon/components/Copy.d.ts +1 -1
  80. package/dist/components/Icon/components/Courses.d.ts +1 -1
  81. package/dist/components/Icon/components/Credit.d.ts +1 -1
  82. package/dist/components/Icon/components/Delete.d.ts +1 -1
  83. package/dist/components/Icon/components/DeletePermanently.d.ts +1 -1
  84. package/dist/components/Icon/components/Depecriate.d.ts +1 -1
  85. package/dist/components/Icon/components/Developer.d.ts +1 -1
  86. package/dist/components/Icon/components/DistributionTemplate.d.ts +1 -1
  87. package/dist/components/Icon/components/Document.d.ts +1 -1
  88. package/dist/components/Icon/components/DocumentApprove.d.ts +1 -1
  89. package/dist/components/Icon/components/DocumentCreateEntry.d.ts +1 -1
  90. package/dist/components/Icon/components/DocumentCut.d.ts +1 -1
  91. package/dist/components/Icon/components/DocumentError.d.ts +1 -1
  92. package/dist/components/Icon/components/DocumentIsolatePage.d.ts +1 -1
  93. package/dist/components/Icon/components/DocumentMerge.d.ts +1 -1
  94. package/dist/components/Icon/components/DocumentMove.d.ts +1 -1
  95. package/dist/components/Icon/components/DocumentPreview.d.ts +1 -1
  96. package/dist/components/Icon/components/DocumentReceived.d.ts +1 -1
  97. package/dist/components/Icon/components/DocumentRejectedRequest.d.ts +1 -1
  98. package/dist/components/Icon/components/DocumentSigned.d.ts +1 -1
  99. package/dist/components/Icon/components/DocumentSignedSolid.d.ts +1 -1
  100. package/dist/components/Icon/components/DocumentSplit.d.ts +1 -1
  101. package/dist/components/Icon/components/DocumentTime.d.ts +1 -1
  102. package/dist/components/Icon/components/Download.d.ts +1 -1
  103. package/dist/components/Icon/components/Drag.d.ts +1 -1
  104. package/dist/components/Icon/components/ECopedia.d.ts +1 -1
  105. package/dist/components/Icon/components/Edit.d.ts +1 -1
  106. package/dist/components/Icon/components/EditSimple.d.ts +1 -1
  107. package/dist/components/Icon/components/EllipsisHorizontal.d.ts +1 -1
  108. package/dist/components/Icon/components/EllipsisVertical.d.ts +1 -1
  109. package/dist/components/Icon/components/EntriesOnAccount.d.ts +1 -1
  110. package/dist/components/Icon/components/EntriesOpen.d.ts +1 -1
  111. package/dist/components/Icon/components/EntriesWarning.d.ts +1 -1
  112. package/dist/components/Icon/components/EntryTypeCustomerInvoice.d.ts +1 -1
  113. package/dist/components/Icon/components/EntryTypeCustomerPayment.d.ts +1 -1
  114. package/dist/components/Icon/components/EntryTypeJournalEntry.d.ts +1 -1
  115. package/dist/components/Icon/components/EntryTypeManualCustomerInvoice.d.ts +1 -1
  116. package/dist/components/Icon/components/EntryTypeSupplierInvoice.d.ts +1 -1
  117. package/dist/components/Icon/components/EntryTypeSupplierPayment.d.ts +1 -1
  118. package/dist/components/Icon/components/Envelope.d.ts +1 -1
  119. package/dist/components/Icon/components/EnvelopeApproved.d.ts +1 -1
  120. package/dist/components/Icon/components/EnvelopeSolid.d.ts +1 -1
  121. package/dist/components/Icon/components/ExpandView.d.ts +1 -1
  122. package/dist/components/Icon/components/Expenses.d.ts +1 -1
  123. package/dist/components/Icon/components/Export.d.ts +1 -1
  124. package/dist/components/Icon/components/ExportToExcel.d.ts +1 -1
  125. package/dist/components/Icon/components/ExportToPdf.d.ts +1 -1
  126. package/dist/components/Icon/components/EyeOff.d.ts +1 -1
  127. package/dist/components/Icon/components/EyeOn.d.ts +1 -1
  128. package/dist/components/Icon/components/Filter.d.ts +1 -1
  129. package/dist/components/Icon/components/FilterSolid.d.ts +1 -1
  130. package/dist/components/Icon/components/FontSize.d.ts +1 -1
  131. package/dist/components/Icon/components/GraphSolid.d.ts +1 -1
  132. package/dist/components/Icon/components/Hash.d.ts +1 -1
  133. package/dist/components/Icon/components/HeightExtraTall.d.ts +1 -1
  134. package/dist/components/Icon/components/HeightMedium.d.ts +1 -1
  135. package/dist/components/Icon/components/HeightShort.d.ts +1 -1
  136. package/dist/components/Icon/components/HeightTall.d.ts +1 -1
  137. package/dist/components/Icon/components/House.d.ts +1 -1
  138. package/dist/components/Icon/components/HouseSolid.d.ts +1 -1
  139. package/dist/components/Icon/components/Id.d.ts +1 -1
  140. package/dist/components/Icon/components/Images.d.ts +1 -1
  141. package/dist/components/Icon/components/Import.d.ts +1 -1
  142. package/dist/components/Icon/components/Inbox.d.ts +1 -1
  143. package/dist/components/Icon/components/InboxEinvoicing.d.ts +1 -1
  144. package/dist/components/Icon/components/InboxScanning.d.ts +1 -1
  145. package/dist/components/Icon/components/InboxSmart.d.ts +1 -1
  146. package/dist/components/Icon/components/Info.d.ts +1 -1
  147. package/dist/components/Icon/components/Inventory.d.ts +1 -1
  148. package/dist/components/Icon/components/InventoryMatrix.d.ts +1 -1
  149. package/dist/components/Icon/components/JournalPro.d.ts +1 -1
  150. package/dist/components/Icon/components/Layout.d.ts +1 -1
  151. package/dist/components/Icon/components/LayoutBoth.d.ts +1 -1
  152. package/dist/components/Icon/components/LayoutFirst.d.ts +1 -1
  153. package/dist/components/Icon/components/LayoutLast.d.ts +1 -1
  154. package/dist/components/Icon/components/LayoutNone.d.ts +1 -1
  155. package/dist/components/Icon/components/LedgerCard.d.ts +1 -1
  156. package/dist/components/Icon/components/LedgerCardCustomerReminder.d.ts +1 -1
  157. package/dist/components/Icon/components/LedgerCardManualCustomerInvoice.d.ts +1 -1
  158. package/dist/components/Icon/components/LedgerCardObsoleteStock.d.ts +1 -1
  159. package/dist/components/Icon/components/LedgerCardOpeningEntry.d.ts +1 -1
  160. package/dist/components/Icon/components/LedgerCardReservedEntry.d.ts +1 -1
  161. package/dist/components/Icon/components/LedgerCardShrinkagePilferage.d.ts +1 -1
  162. package/dist/components/Icon/components/LedgerCardStockAdjustment.d.ts +1 -1
  163. package/dist/components/Icon/components/LedgerCardTransferredOpeningEntry.d.ts +1 -1
  164. package/dist/components/Icon/components/Lightbulb.d.ts +1 -1
  165. package/dist/components/Icon/components/Line.d.ts +1 -1
  166. package/dist/components/Icon/components/LinkExternal.d.ts +1 -1
  167. package/dist/components/Icon/components/List.d.ts +1 -1
  168. package/dist/components/Icon/components/ListBulleted.d.ts +1 -1
  169. package/dist/components/Icon/components/ListSearch.d.ts +1 -1
  170. package/dist/components/Icon/components/Location.d.ts +1 -1
  171. package/dist/components/Icon/components/Lock.d.ts +1 -1
  172. package/dist/components/Icon/components/LockOpen.d.ts +1 -1
  173. package/dist/components/Icon/components/Log.d.ts +1 -1
  174. package/dist/components/Icon/components/LogOut.d.ts +1 -1
  175. package/dist/components/Icon/components/Market.d.ts +1 -1
  176. package/dist/components/Icon/components/MastercardOs.d.ts +1 -1
  177. package/dist/components/Icon/components/MatchAmount.d.ts +1 -1
  178. package/dist/components/Icon/components/MatchEntries.d.ts +1 -1
  179. package/dist/components/Icon/components/Menu.d.ts +1 -1
  180. package/dist/components/Icon/components/Mileage.d.ts +1 -1
  181. package/dist/components/Icon/components/ModalResize.d.ts +1 -1
  182. package/dist/components/Icon/components/ModalShrink.d.ts +1 -1
  183. package/dist/components/Icon/components/More.d.ts +1 -1
  184. package/dist/components/Icon/components/MoreSolid.d.ts +1 -1
  185. package/dist/components/Icon/components/Move.d.ts +1 -1
  186. package/dist/components/Icon/components/NavigationList.d.ts +1 -1
  187. package/dist/components/Icon/components/Note.d.ts +1 -1
  188. package/dist/components/Icon/components/NoteFollowUp.d.ts +1 -1
  189. package/dist/components/Icon/components/NoteRead.d.ts +1 -1
  190. package/dist/components/Icon/components/NovemberFirst.d.ts +1 -1
  191. package/dist/components/Icon/components/Numbers.d.ts +1 -1
  192. package/dist/components/Icon/components/PartnerApi.d.ts +1 -1
  193. package/dist/components/Icon/components/PaymentPaid.d.ts +1 -1
  194. package/dist/components/Icon/components/PaymentUnpaid.d.ts +1 -1
  195. package/dist/components/Icon/components/Period.d.ts +1 -1
  196. package/dist/components/Icon/components/PersonChange.d.ts +1 -1
  197. package/dist/components/Icon/components/PersonMinus.d.ts +1 -1
  198. package/dist/components/Icon/components/PersonPlus.d.ts +1 -1
  199. package/dist/components/Icon/components/PersonTick.d.ts +1 -1
  200. package/dist/components/Icon/components/Phone.d.ts +1 -1
  201. package/dist/components/Icon/components/PhoneSolid.d.ts +1 -1
  202. package/dist/components/Icon/components/Play.d.ts +1 -1
  203. package/dist/components/Icon/components/PlusMinus.d.ts +1 -1
  204. package/dist/components/Icon/components/Print.d.ts +1 -1
  205. package/dist/components/Icon/components/ProcessPayment.d.ts +1 -1
  206. package/dist/components/Icon/components/ProductLedgerCard.d.ts +1 -1
  207. package/dist/components/Icon/components/Profile.d.ts +1 -1
  208. package/dist/components/Icon/components/ProjectCards.d.ts +1 -1
  209. package/dist/components/Icon/components/Projects.d.ts +1 -1
  210. package/dist/components/Icon/components/QuestionMark.d.ts +1 -1
  211. package/dist/components/Icon/components/QuestionMarkBold.d.ts +1 -1
  212. package/dist/components/Icon/components/Quicklinks.d.ts +1 -1
  213. package/dist/components/Icon/components/RatingBankruptcy.d.ts +1 -1
  214. package/dist/components/Icon/components/RatingPaymentProblems.d.ts +1 -1
  215. package/dist/components/Icon/components/Reconciled.d.ts +1 -1
  216. package/dist/components/Icon/components/Refresh.d.ts +1 -1
  217. package/dist/components/Icon/components/Report.d.ts +1 -1
  218. package/dist/components/Icon/components/ReportSolid.d.ts +1 -1
  219. package/dist/components/Icon/components/Restore.d.ts +1 -1
  220. package/dist/components/Icon/components/RotateLeft.d.ts +1 -1
  221. package/dist/components/Icon/components/RotateRight.d.ts +1 -1
  222. package/dist/components/Icon/components/Sales.d.ts +1 -1
  223. package/dist/components/Icon/components/Search.d.ts +1 -1
  224. package/dist/components/Icon/components/SearchBold.d.ts +1 -1
  225. package/dist/components/Icon/components/Secure.d.ts +1 -1
  226. package/dist/components/Icon/components/SecureTick.d.ts +1 -1
  227. package/dist/components/Icon/components/Settings.d.ts +1 -1
  228. package/dist/components/Icon/components/SettingsSolid.d.ts +1 -1
  229. package/dist/components/Icon/components/Shortcuts.d.ts +1 -1
  230. package/dist/components/Icon/components/ShowAll.d.ts +1 -1
  231. package/dist/components/Icon/components/ShowLess.d.ts +1 -1
  232. package/dist/components/Icon/components/ShowMore.d.ts +1 -1
  233. package/dist/components/Icon/components/ShowTemplate.d.ts +1 -1
  234. package/dist/components/Icon/components/Sliders.d.ts +1 -1
  235. package/dist/components/Icon/components/Smartpay.d.ts +1 -1
  236. package/dist/components/Icon/components/SortBy.d.ts +1 -1
  237. package/dist/components/Icon/components/Star.d.ts +1 -1
  238. package/dist/components/Icon/components/StarSolid.d.ts +1 -1
  239. package/dist/components/Icon/components/Subscriptions.d.ts +1 -1
  240. package/dist/components/Icon/components/SystemEntries.d.ts +1 -1
  241. package/dist/components/Icon/components/Tag.d.ts +1 -1
  242. package/dist/components/Icon/components/TemplateOverride.d.ts +1 -1
  243. package/dist/components/Icon/components/Templates.d.ts +1 -1
  244. package/dist/components/Icon/components/ThumbBoth.d.ts +1 -1
  245. package/dist/components/Icon/components/ThumbDown.d.ts +1 -1
  246. package/dist/components/Icon/components/ThumbDownSolid.d.ts +1 -1
  247. package/dist/components/Icon/components/ThumbUp.d.ts +1 -1
  248. package/dist/components/Icon/components/ThumbUpSolid.d.ts +1 -1
  249. package/dist/components/Icon/components/Tick.d.ts +1 -1
  250. package/dist/components/Icon/components/TickBold.d.ts +1 -1
  251. package/dist/components/Icon/components/Time.d.ts +1 -1
  252. package/dist/components/Icon/components/Transfer.d.ts +1 -1
  253. package/dist/components/Icon/components/TransferCancel.d.ts +1 -1
  254. package/dist/components/Icon/components/TransferLocked.d.ts +1 -1
  255. package/dist/components/Icon/components/Undo.d.ts +1 -1
  256. package/dist/components/Icon/components/Undock.d.ts +1 -1
  257. package/dist/components/Icon/components/Unreconciled.d.ts +1 -1
  258. package/dist/components/Icon/components/Warning.d.ts +1 -1
  259. package/dist/components/Icon/components/Webshop.d.ts +1 -1
  260. package/dist/components/Icon/components/Website.d.ts +1 -1
  261. package/dist/components/Icon/components/Workflow.d.ts +1 -1
  262. package/dist/components/Icon/components/WorkflowTemplateBasic.d.ts +1 -1
  263. package/dist/components/Icon/components/Zoom.d.ts +1 -1
  264. package/dist/components/IconButton/IconButton.d.ts +2 -2
  265. package/dist/components/Input/Input.d.ts +2 -2
  266. package/dist/components/Input/util.d.ts +1 -11
  267. package/dist/components/Layout/components/Sidebar.d.ts +2 -14
  268. package/dist/components/Layout/components/Top.d.ts +2 -2
  269. package/dist/components/List/List.d.ts +7 -7
  270. package/dist/components/List/components/Button.d.ts +1 -1
  271. package/dist/components/List/components/Collapsible.d.ts +1 -1
  272. package/dist/components/List/components/Group.d.ts +1 -1
  273. package/dist/components/List/components/Item.d.ts +1 -1
  274. package/dist/components/List/components/Link.d.ts +1 -1
  275. package/dist/components/List/components/Toggle.d.ts +2 -2
  276. package/dist/components/Listbox/Listbox.d.ts +2 -2
  277. package/dist/components/Listbox/ScrollableList.d.ts +1 -1
  278. package/dist/components/Listbox/util.d.ts +2 -2
  279. package/dist/components/Menu/components/Checkbox.d.ts +1 -1
  280. package/dist/components/Menu/components/Content.d.ts +2 -2
  281. package/dist/components/Menu/components/Item.d.ts +8 -8
  282. package/dist/components/Menu/components/Link.d.ts +1 -1
  283. package/dist/components/Menu/components/RadioGroup.d.ts +1 -1
  284. package/dist/components/Menu/components/SubMenu.d.ts +1 -1
  285. package/dist/components/Menu/components/Trigger.d.ts +1 -1
  286. package/dist/components/Navigation2/components/Group.d.ts +1 -1
  287. package/dist/components/Popover/Popover.d.ts +2 -2
  288. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  289. package/dist/components/ScrollArea/ScrollArea.d.ts +2 -2
  290. package/dist/components/SearchInput/SearchInput.d.ts +1 -1
  291. package/dist/components/Select/Select.d.ts +1 -1
  292. package/dist/components/Select2/components/All.d.ts +2 -2
  293. package/dist/components/Select2/components/Collection.d.ts +1 -1
  294. package/dist/components/Select2/components/Create.d.ts +1 -1
  295. package/dist/components/Select2/components/Edit.d.ts +2 -2
  296. package/dist/components/Select2/components/Group.d.ts +1 -1
  297. package/dist/components/Select2/components/Option.d.ts +1 -1
  298. package/dist/components/Select2/components/Search.d.ts +3 -3
  299. package/dist/components/Select2/components/Trigger.d.ts +1 -1
  300. package/dist/components/Select2/hooks/useChildren.d.ts +2 -2
  301. package/dist/components/Shortcut/Shortcut.d.ts +1 -1
  302. package/dist/components/Table3/components/Columns/Cell/Cell.d.ts +2 -2
  303. package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.d.ts +1 -1
  304. package/dist/components/Table3/components/Columns/Cell/EditingControlCell.d.ts +2 -2
  305. package/dist/components/Table3/components/Columns/Internal/EditingActionsMenu.d.ts +2 -2
  306. package/dist/components/Table3/components/Editing/Alert.d.ts +1 -1
  307. package/dist/components/Table3/components/Row/Editing/CreateRowButton.d.ts +2 -2
  308. package/dist/components/Table3/components/Row/Editing/SaveStatus.d.ts +2 -2
  309. package/dist/components/Table3/components/Row/Row.d.ts +2 -2
  310. package/dist/components/Table3/components/Toolbar/Editing/Editing.d.ts +1 -1
  311. package/dist/components/Table3/features/useTableEditing.d.ts +2 -2
  312. package/dist/components/Table3/util/editing.d.ts +1 -1
  313. package/dist/components/Tag/Tag.d.ts +2 -2
  314. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  315. package/dist/components/Tour/Tour.d.ts +3 -3
  316. package/dist/components/Truncate/Truncate.d.ts +1 -1
  317. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +6 -14
  318. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  319. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  320. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +9 -13
  321. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  322. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  323. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +3 -3
  324. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  325. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  326. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +3 -5
  327. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  328. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  329. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  330. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  331. package/dist/esm/packages/taco/src/components/Listbox/util.js +1 -7
  332. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  333. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  334. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  335. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  336. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  337. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +4 -4
  338. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  339. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  340. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  341. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  342. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +10 -11
  343. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  344. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +2 -0
  345. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  346. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  347. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  348. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  349. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  350. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  351. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  352. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  353. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +5 -4
  354. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  355. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  356. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  357. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateRowButton.js.map +1 -1
  358. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  359. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +1 -4
  360. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  361. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  362. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +2 -3
  363. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  364. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  365. package/dist/esm/packages/taco/src/components/Tour/Tour.js +3 -3
  366. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  367. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
  368. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
  369. package/dist/esm/packages/taco/src/index.js +1 -1
  370. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +1 -1
  371. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  372. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  373. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +4 -4
  374. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  375. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  376. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  377. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  378. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +2 -2
  379. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  380. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  381. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  382. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
  383. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  384. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  385. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +1 -3
  386. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  387. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  388. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  389. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  390. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  391. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  392. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +13 -5
  393. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  394. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  395. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  396. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  397. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  398. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js +5 -15
  399. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js.map +1 -1
  400. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  401. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  402. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  403. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  404. package/dist/esm/packages/taco/src/utils/date.js +19 -7
  405. package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
  406. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  407. package/dist/primitives/BubbleSelect.d.ts +1 -1
  408. package/dist/primitives/Sortable/components/Container.d.ts +2 -2
  409. package/dist/primitives/Sortable/components/Item.d.ts +1 -2
  410. package/dist/primitives/Sortable/components/List.d.ts +1 -1
  411. package/dist/primitives/Table/Core/Table.d.ts +2 -2
  412. package/dist/primitives/Table/Core/components/Body/Body.d.ts +1 -1
  413. package/dist/primitives/Table/Core/components/Body/EmptyStateBody.d.ts +1 -1
  414. package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.d.ts +2 -2
  415. package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.d.ts +2 -2
  416. package/dist/primitives/Table/Core/components/Columns/Cell/Cell.d.ts +1 -1
  417. package/dist/primitives/Table/Core/components/Columns/Internal/Actions.d.ts +2 -2
  418. package/dist/primitives/Table/Core/components/Footer/Footer.d.ts +3 -3
  419. package/dist/primitives/Table/Core/components/Footer/Summary.d.ts +2 -2
  420. package/dist/primitives/Table/Core/components/Header/Header.d.ts +1 -1
  421. package/dist/primitives/Table/Core/components/Header/components/Goto.d.ts +2 -2
  422. package/dist/primitives/Table/Core/components/Header/components/Menu.d.ts +1 -1
  423. package/dist/primitives/Table/Core/components/Header/components/Resizer.d.ts +2 -2
  424. package/dist/primitives/Table/Core/components/Header/components/SortIndicator.d.ts +3 -3
  425. package/dist/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.d.ts +2 -2
  426. package/dist/primitives/Table/Core/components/Row/Row.d.ts +1 -1
  427. package/dist/primitives/Table/Core/components/Toolbar/Toolbar.d.ts +1 -1
  428. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/Filters.d.ts +2 -2
  429. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.d.ts +2 -2
  430. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +2 -2
  431. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +1 -1
  432. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.d.ts +2 -2
  433. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.d.ts +2 -2
  434. package/dist/primitives/Table/Core/components/Toolbar/components/Print/Print.d.ts +1 -1
  435. package/dist/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.d.ts +2 -2
  436. package/dist/primitives/Table/Core/components/Toolbar/components/Search/Search.d.ts +1 -1
  437. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.d.ts +2 -2
  438. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/Settings.d.ts +2 -2
  439. package/dist/primitives/Table/useTableManager/util/settings.d.ts +1 -1
  440. package/dist/taco.cjs.development.js +87 -98
  441. package/dist/taco.cjs.development.js.map +1 -1
  442. package/dist/taco.cjs.production.min.js +1 -1
  443. package/dist/taco.cjs.production.min.js.map +1 -1
  444. package/dist/utils/date.d.ts +2 -1
  445. package/dist/utils/dom.d.ts +1 -1
  446. package/package.json +12 -10
@@ -1,5 +1,4 @@
1
- import { isDate } from 'date-fns';
2
- import { format, parseFromISOString } from '../../../../utils/date.js';
1
+ import { format } from '../../../../utils/date.js';
3
2
  import { TableFilterComparator } from '../../types.js';
4
3
 
5
4
  const dataTypes = {
@@ -20,17 +19,8 @@ const dataTypes = {
20
19
  sortingFn: 'datetime',
21
20
  filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo, TableFilterComparator.IsGreaterThan, TableFilterComparator.IsLessThan, TableFilterComparator.IsGreaterThanOrEqualTo, TableFilterComparator.IsLessThanOrEqualTo, TableFilterComparator.IsBetween, TableFilterComparator.IsEmpty, TableFilterComparator.IsNotEmpty],
22
21
  getDisplayValue: (value, options) => {
23
- if (value === undefined) {
24
- return '';
25
- }
26
- if (isDate(value)) {
27
- var _format, _options$localization;
28
- return (_format = format(value, options === null || options === void 0 ? void 0 : (_options$localization = options.localization) === null || _options$localization === void 0 ? void 0 : _options$localization.formatting.date)) !== null && _format !== void 0 ? _format : '';
29
- } else if (typeof value === 'string') {
30
- var _format2, _options$localization2;
31
- return (_format2 = format(parseFromISOString(value), options === null || options === void 0 ? void 0 : (_options$localization2 = options.localization) === null || _options$localization2 === void 0 ? void 0 : _options$localization2.formatting.date)) !== null && _format2 !== void 0 ? _format2 : '';
32
- }
33
- return String(value);
22
+ var _date$format, _options$localization;
23
+ return (_date$format = format(value, options === null || options === void 0 ? void 0 : (_options$localization = options.localization) === null || _options$localization === void 0 ? void 0 : _options$localization.formatting.date)) !== null && _date$format !== void 0 ? _date$format : '';
34
24
  }
35
25
  },
36
26
  boolean: {
@@ -43,11 +33,11 @@ const dataTypes = {
43
33
  sortingFn: 'basic',
44
34
  filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo, TableFilterComparator.IsGreaterThan, TableFilterComparator.IsLessThan, TableFilterComparator.IsGreaterThanOrEqualTo, TableFilterComparator.IsLessThanOrEqualTo, TableFilterComparator.IsBetween, TableFilterComparator.IsEmpty, TableFilterComparator.IsNotEmpty],
45
35
  getDisplayValue: (value, options) => {
46
- var _options$localization3;
36
+ var _options$localization2;
47
37
  if (value === undefined) {
48
38
  return '';
49
39
  }
50
- return new Intl.NumberFormat(options === null || options === void 0 ? void 0 : (_options$localization3 = options.localization) === null || _options$localization3 === void 0 ? void 0 : _options$localization3.locale, {
40
+ return new Intl.NumberFormat(options === null || options === void 0 ? void 0 : (_options$localization2 = options.localization) === null || _options$localization2 === void 0 ? void 0 : _options$localization2.locale, {
51
41
  minimumFractionDigits: 2
52
42
  }).format(Number(value));
53
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dataTypes.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/dataTypes.ts"],"sourcesContent":["import { SortingFnOption as ReactTableSortingFnOption } from '@tanstack/react-table';\nimport { isDate } from 'date-fns';\nimport { format, parseFromISOString } from '../../../../utils/date';\nimport { TableColumnAlignment, TableColumnDataType, TableFilterComparator } from '../../types';\nimport { Localization } from '../../../../components/Provider/Localization';\n\nexport type TableDataType<TType = unknown> = {\n align?: TableColumnAlignment;\n sortingFn: ReactTableSortingFnOption<TType>;\n filterComparators: TableFilterComparator[];\n getDisplayValue?: (value: any, options?: { localization: Localization }) => string;\n};\n\nconst dataTypes: Record<TableColumnDataType | 'auto', TableDataType> = {\n auto: {\n sortingFn: 'auto',\n filterComparators: [\n TableFilterComparator.Contains,\n TableFilterComparator.DoesNotContain,\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n },\n // base\n text: {\n sortingFn: 'alphanumeric',\n filterComparators: [\n TableFilterComparator.Contains,\n TableFilterComparator.DoesNotContain,\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n },\n number: {\n sortingFn: 'basic',\n filterComparators: [\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsGreaterThan,\n TableFilterComparator.IsLessThan,\n TableFilterComparator.IsGreaterThanOrEqualTo,\n TableFilterComparator.IsLessThanOrEqualTo,\n TableFilterComparator.IsBetween,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n },\n datetime: {\n sortingFn: 'datetime',\n filterComparators: [\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsGreaterThan,\n TableFilterComparator.IsLessThan,\n TableFilterComparator.IsGreaterThanOrEqualTo,\n TableFilterComparator.IsLessThanOrEqualTo,\n TableFilterComparator.IsBetween,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n getDisplayValue: (value: string | Date, options) => {\n if (value === undefined) {\n return '';\n }\n\n if (isDate(value)) {\n return format(value as Date, options?.localization?.formatting.date) ?? '';\n } else if (typeof value === 'string') {\n return format(parseFromISOString(value as string), options?.localization?.formatting.date) ?? '';\n }\n\n return String(value);\n },\n },\n boolean: {\n sortingFn: 'basic',\n filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo],\n },\n // advanced\n amount: {\n align: 'right',\n sortingFn: 'basic',\n filterComparators: [\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsGreaterThan,\n TableFilterComparator.IsLessThan,\n TableFilterComparator.IsGreaterThanOrEqualTo,\n TableFilterComparator.IsLessThanOrEqualTo,\n TableFilterComparator.IsBetween,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n getDisplayValue: (value: number | bigint | string, options) => {\n if (value === undefined) {\n return '';\n }\n\n return new Intl.NumberFormat(options?.localization?.locale, { minimumFractionDigits: 2 }).format(Number(value));\n },\n },\n};\n\nexport function getDataTypeProperties<TType = unknown>(dataType: TableColumnDataType | undefined): TableDataType<TType> {\n return (dataTypes[dataType ?? 'text'] ?? dataTypes.text) as TableDataType<TType>;\n}\n"],"names":["dataTypes","auto","sortingFn","filterComparators","TableFilterComparator","Contains","DoesNotContain","IsEqualTo","IsNotEqualTo","IsEmpty","IsNotEmpty","text","number","IsGreaterThan","IsLessThan","IsGreaterThanOrEqualTo","IsLessThanOrEqualTo","IsBetween","datetime","getDisplayValue","value","options","undefined","isDate","_format","_options$localization","format","localization","formatting","date","_format2","_options$localization2","parseFromISOString","String","boolean","amount","align","Intl","NumberFormat","_options$localization3","locale","minimumFractionDigits","Number","getDataTypeProperties","dataType","_dataTypes"],"mappings":";;;;AAaA,MAAMA,SAAS,GAAwD;EACnEC,IAAI,EAAE;IACFC,SAAS,EAAE,MAAM;IACjBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACC,QAAQ,EAC9BD,qBAAqB,CAACE,cAAc,EACpCF,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBAAqB,CAACK,OAAO,EAC7BL,qBAAqB,CA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AAG,CAAC,CAACf,MAAM,CAACgB,MAAM,CAACtB,KAAK,CAAC,CAAC;;;CAG1H;SAEeuB,qBAAqBA,CAAkBC,QAAyC;;EAC5F,QAAAC,UAAA,GAAQ7C,SAAS,CAAC4C,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAI,MAAM,CAAC,cAAAC,UAAA,cAAAA,UAAA,GAAI7C,SAAS,CAACW,IAAI;AAC3D;;;;"}
1
+ {"version":3,"file":"dataTypes.js","sources":["../../../../../../../../../src/primitives/Table/useTableManager/util/dataTypes.ts"],"sourcesContent":["import { SortingFnOption as ReactTableSortingFnOption } from '@tanstack/react-table';\nimport * as date from '../../../../utils/date';\nimport { TableColumnAlignment, TableColumnDataType, TableFilterComparator } from '../../types';\nimport { Localization } from '../../../../components/Provider/Localization';\n\nexport type TableDataType<TType = unknown> = {\n align?: TableColumnAlignment;\n sortingFn: ReactTableSortingFnOption<TType>;\n filterComparators: TableFilterComparator[];\n getDisplayValue?: (value: any, options?: { localization: Localization }) => string;\n};\n\nconst dataTypes: Record<TableColumnDataType | 'auto', TableDataType> = {\n auto: {\n sortingFn: 'auto',\n filterComparators: [\n TableFilterComparator.Contains,\n TableFilterComparator.DoesNotContain,\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n },\n // base\n text: {\n sortingFn: 'alphanumeric',\n filterComparators: [\n TableFilterComparator.Contains,\n TableFilterComparator.DoesNotContain,\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n },\n number: {\n sortingFn: 'basic',\n filterComparators: [\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsGreaterThan,\n TableFilterComparator.IsLessThan,\n TableFilterComparator.IsGreaterThanOrEqualTo,\n TableFilterComparator.IsLessThanOrEqualTo,\n TableFilterComparator.IsBetween,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n },\n datetime: {\n sortingFn: 'datetime',\n filterComparators: [\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsGreaterThan,\n TableFilterComparator.IsLessThan,\n TableFilterComparator.IsGreaterThanOrEqualTo,\n TableFilterComparator.IsLessThanOrEqualTo,\n TableFilterComparator.IsBetween,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n getDisplayValue: (value: string | Date, options) => {\n return date.format(value, options?.localization?.formatting.date) ?? '';\n },\n },\n boolean: {\n sortingFn: 'basic',\n filterComparators: [TableFilterComparator.IsEqualTo, TableFilterComparator.IsNotEqualTo],\n },\n // advanced\n amount: {\n align: 'right',\n sortingFn: 'basic',\n filterComparators: [\n TableFilterComparator.IsEqualTo,\n TableFilterComparator.IsNotEqualTo,\n TableFilterComparator.IsGreaterThan,\n TableFilterComparator.IsLessThan,\n TableFilterComparator.IsGreaterThanOrEqualTo,\n TableFilterComparator.IsLessThanOrEqualTo,\n TableFilterComparator.IsBetween,\n TableFilterComparator.IsEmpty,\n TableFilterComparator.IsNotEmpty,\n ],\n getDisplayValue: (value: number | bigint | string, options) => {\n if (value === undefined) {\n return '';\n }\n\n return new Intl.NumberFormat(options?.localization?.locale, { minimumFractionDigits: 2 }).format(Number(value));\n },\n },\n};\n\nexport function getDataTypeProperties<TType = unknown>(dataType: TableColumnDataType | undefined): TableDataType<TType> {\n return (dataTypes[dataType ?? 'text'] ?? dataTypes.text) as TableDataType<TType>;\n}\n"],"names":["dataTypes","auto","sortingFn","filterComparators","TableFilterComparator","Contains","DoesNotContain","IsEqualTo","IsNotEqualTo","IsEmpty","IsNotEmpty","text","number","IsGreaterThan","IsLessThan","IsGreaterThanOrEqualTo","IsLessThanOrEqualTo","IsBetween","datetime","getDisplayValue","value","options","_date$format","date","_options$localization","localization","formatting","boolean","amount","align","undefined","Intl","NumberFormat","_options$localization2","locale","minimumFractionDigits","format","Number","getDataTypeProperties","dataType","_dataTypes"],"mappings":";;;AAYA,MAAMA,SAAS,GAAwD;EACnEC,IAAI,EAAE;IACFC,SAAS,EAAE,MAAM;IACjBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACC,QAAQ,EAC9BD,qBAAqB,CAACE,cAAc,EACpCF,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBAAqB,CAACK,OAAO,EAC7BL,qBAAqB,CAACM,UAAU;GAEvC;;EAEDC,IAAI,EAAE;IACFT,SAAS,EAAE,cAAc;IACzBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACC,QAAQ,EAC9BD,qBAAqB,CAACE,cAAc,EACpCF,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBAAqB,CAACK,OAAO,EAC7BL,qBAAqB,CAACM,UAAU;GAEvC;EACDE,MAAM,EAAE;IACJV,SAAS,EAAE,OAAO;IAClBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBAAqB,CAACS,aAAa,EACnCT,qBAAqB,CAACU,UAAU,EAChCV,qBAAqB,CAACW,sBAAsB,EAC5CX,qBAAqB,CAACY,mBAAmB,EACzCZ,qBAAqB,CAACa,SAAS,EAC/Bb,qBAAqB,CAACK,OAAO,EAC7BL,qBAAqB,CAACM,UAAU;GAEvC;EACDQ,QAAQ,EAAE;IACNhB,SAAS,EAAE,UAAU;IACrBC,iBAAiB,EAAE,CACfC,qBAAqB,CAACG,SAAS,EAC/BH,qBAAqB,CAACI,YAAY,EAClCJ,qBAAqB,CAACS,aAAa,EACnCT,qBAAqB,CAACU,UAAU,EAChCV,qBAAqB,CAACW,sBAAsB,EAC5CX,qBAAqB,CAACY,mBAAmB,EACzCZ,qBAAqB,CAACa,SAAS,EAC/Bb,qBAAqB,CAACK,OAAO,EAC7BL,q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cAARA,QAAQ,GAAI,MAAM,CAAC,cAAAC,UAAA,cAAAA,UAAA,GAAIxC,SAAS,CAACW,IAAI;AAC3D;;;;"}
@@ -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\nexport function isMatched<TType = unknown>(\n searchQuery: string,\n cellValue: any,\n dataType: TableColumnDataType | undefined,\n localization: Localization\n) {\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 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":["isMatched","searchQuery","cellValue","dataType","localization","cellValueAsString","String","undefined","isWeakContains","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":";;;;SAOgBA,SAASA,CACrBC,WAAmB,EACnBC,SAAc,EACdC,QAAyC,EACzCC,YAA0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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,CAAC7C,SAAS,CAAC;;GAEjE,MAAM;IACHkB,SAAS,CAACyB,MAAM,CAACC,2BAA2B,CAAC,EAAE,CAAC;IAChD1B,SAAS,CAACyB,MAAM,CAACE,8BAA8B,CAAC7C,SAAS,CAAC;;EAG9D,IAAIoB,aAAa,KAAKpB,SAAS,EAAE;IAC7BkB,SAAS,CAAC4B,SAAS,CAACC,iBAAiB,CAAC3B,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\nexport function isMatched<TType = unknown>(\n searchQuery: string,\n cellValue: any,\n dataType: TableColumnDataType | undefined,\n localization: Localization\n) {\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 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":["isMatched","searchQuery","cellValue","dataType","localization","cellValueAsString","String","undefined","isWeakContains","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":";;;;SAOgBA,SAASA,CACrBC,WAAmB,EACnBC,SAAc,EACdC,QAAyC,EACzCC,YAA0B;EAE1B,MAAMC,iBAAiB,GAAGC,MAAM,CAACJ,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,EAAE,CAAC;EAEjD,IAAIG,iBAAiB,KAAKE,SAAS,IAAIC,cAAc,CAACH,iBAAiB,EAAEJ,WAAW,CAAC,EAAE;IACnF,OAAO,IAAI;GACd,MAAM;IACH,MAAMQ,kBAAkB,GAAGC,qBAAqB,CAAQP,QAAQ,CAAC;IAEjE,IAAIM,kBAAkB,CAACE,eAAe,EAAE;MACpC,MAAMC,gBAAgB,GAAGH,kBAAkB,CAACE,eAAe,CAACT,SAAS,EAAE;QAAEE;OAAc,CAAC;MAExF,IAAIQ,gBAAgB,KAAKL,SAAS,IAAIC,cAAc,CAACI,gBAAgB,EAAEX,WAAW,CAAC,EAAE;QACjF,OAAO,IAAI;;;;EAKvB,OAAO,KAAK;AAChB;SAEgBY,cAAcA,CAC1BC,GAAyB,EACzBC,QAAgB,EAChBd,WAAmB,EACnBG,YAA0B;EAE1B,IAAI;IACA,IAAIU,GAAG,CAACE,QAAQ,EAAE;MAAA,IAAAC,qBAAA,EAAAC,sBAAA;MACd,MAAMhB,SAAS,GAAGY,GAAG,CAACE,QAAQ,CAACD,QAAQ,CAAC;MACxC,MAAMZ,QAAQ,IA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;YAC7E,MAAM5C,SAAS,GAAG6C,GAAG,CAACjC,GAAG,CAACE,QAAQ,EAAEI,MAAM,CAACuB,EAAE,CAAC;YAC9C,MAAMxC,QAAQ,IAAA2C,qBAAA,GAAG1B,MAAM,CAACC,SAAS,CAACC,IAAI,cAAAwB,qBAAA,uBAArBA,qBAAA,CAAuB3C,QAAQ;YAEhD,IAAIH,SAAS,CAACC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,YAAY,CAAC,EAAE;cAC3DwB,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,CAAC7C,SAAS,CAAC;;GAEjE,MAAM;IACHkB,SAAS,CAACyB,MAAM,CAACC,2BAA2B,CAAC,EAAE,CAAC;IAChD1B,SAAS,CAACyB,MAAM,CAACE,8BAA8B,CAAC7C,SAAS,CAAC;;EAG9D,IAAIoB,aAAa,KAAKpB,SAAS,EAAE;IAC7BkB,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 || options.enableRowSelectionSingle) && 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 const enableRowSelection = options.enableRowSelection || options.enableRowSelectionSingle;\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 enableRowSelection === 'function'\n ? (row: ReactTableRow<TType>) => (enableRowSelection as (row: TType) => boolean)(row.original)\n : 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 enableMultiRowSelection: !options.enableRowSelectionSingle && reactTableEnableRowSelection,\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>) => column.columnDef.meta?.enableSearch ?? true;\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","enableRowSelectionSingle","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","enableMultiRowSelection","_options$enableSortin","getExpandedRowModel","getGroupedRowModel","groupedColumnMode","columnResizeMode","onChangeFilter","getFilteredRowModel","filterFns","tacoFilter","columnId","filter","columnFilterFn","globalFilterFn","searchQuery","getColumnCanGlobalFilter","_column$columnDef$met","_column$columnDef$met2","columnDef","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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OAAO,EAAExC,iBAAiB,CAACwC,OAAO,GAC5BxC,iBAAiB,CAACwC,OAAO,CAACpD,MAAM,CAACe,uBAAuB,CAAC,IAAAsC,sBAAA,IAAAC,sBAAA,GACzDzK,KAAK,CAACyI,eAAe,cAAAgC,sBAAA,uBAArBA,sBAAA,CAAuBF,OAAO,cAAAC,sBAAA,cAAAA,sBAAA,GAAIxC,QAAQ,CAACzI;KACpD;IAED,IAAIS,KAAK,CAACN,uBAAuB,EAAE;MAC/B0J,KAAK,CAACsB,QAAQ,GAAG,CAAC1K,KAAK,CAACN,uBAAiC,CAAC;;MAE1D0J,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 || options.enableRowSelectionSingle) && 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 const enableRowSelection = options.enableRowSelection || options.enableRowSelectionSingle;\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 enableRowSelection === 'function'\n ? (row: ReactTableRow<TType>) => (enableRowSelection as (row: TType) => boolean)(row.original)\n : 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 enableMultiRowSelection: !options.enableRowSelectionSingle && reactTableEnableRowSelection,\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>) => column.columnDef.meta?.enableSearch ?? true;\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","enableRowSelectionSingle","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","enableMultiRowSelection","_options$enableSortin","getExpandedRowModel","getGroupedRowModel","groupedColumnMode","columnResizeMode","onChangeFilter","getFilteredRowModel","filterFns","tacoFilter","columnId","filter","columnFilterFn","globalFilterFn","searchQuery","getColumnCanGlobalFilter","_column$columnDef$met","_column$columnDef$met2","columnDef","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,KAA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,KAAA,GAAI,EAAE;MACrHI,YAAY,GAAAC,qBAAA,GAAEtC,iBAAiB,CAACT,WAAW,cAAA+C,qBAAA,cAAAA,qBAAA,IAAAC,sBAAA,GAAItK,KAAK,CAACyI,eAAe,cAAA6B,sBAAA,uBAArBA,sBAAA,CAAuBhD,WAAW;MACjFiD,OAAO,EAAExC,iBAAiB,CAACwC,OAAO,GAC5BxC,iBAAiB,CAACwC,OAAO,CAACpD,MAAM,CAACe,uBAAuB,CAAC,IAAAsC,sBAAA,IAAAC,sBAAA,GACzDzK,KAAK,CAACyI,eAAe,cAAAgC,sBAAA,uBAArBA,sBAAA,CAAuBF,OAAO,cAAAC,sBAAA,cAAAA,sBAAA,GAAIxC,QAAQ,CAACzI;KACpD;IAED,IAAIS,KAAK,CAACN,uBAAuB,EAAE;MAC/B0J,KAAK,CAACsB,QAAQ,GAAG,CAAC1K,KAAK,CAACN,uBAAiC,CAAC;;MAE1D0J,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,19 +1,31 @@
1
- import { isDate, toDate, isValid } from 'date-fns';
1
+ import { isDate, isValid } from 'date-fns';
2
2
 
3
3
  const isWeakEqual = (leftDate, rightDate) => {
4
4
  return leftDate.getFullYear() === rightDate.getFullYear() && leftDate.getMonth() === rightDate.getMonth() && leftDate.getDate() === rightDate.getDate();
5
5
  };
6
- const format = (date, mask = 'dd.mm.yy') => {
7
- if (!date) {
8
- return undefined;
6
+ function parse(date) {
7
+ let value;
8
+ if (isDate(date)) {
9
+ value = date;
10
+ } else if (typeof date === 'string') {
11
+ value = parseFromISOString(date);
9
12
  }
10
- const value = isDate(date) ? date : toDate(date);
11
13
  if (!isValid(value)) {
12
14
  return undefined;
13
15
  }
16
+ return value;
17
+ }
18
+ function format(date, mask = 'dd.mm.yy') {
19
+ if (date === undefined) {
20
+ return undefined;
21
+ }
22
+ const value = parse(date);
23
+ if (!isValid(value) || value === undefined) {
24
+ return undefined;
25
+ }
14
26
  const pad = v => String(v).length === 1 ? `0${v}` : v.toString();
15
27
  return mask.replace('dd', pad(value.getDate())).replace('mm', pad(value.getMonth() + 1)).replace('yy', String(value.getFullYear()).slice(2));
16
- };
28
+ }
17
29
  const parseFromCustomString = (date = '', mask = 'dd.mm.yy', defaultMonth = undefined, defaultYear = undefined) => {
18
30
  if (!date || !date.length) {
19
31
  return undefined;
@@ -59,5 +71,5 @@ const parseFromISOString = date => {
59
71
  return isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;
60
72
  };
61
73
 
62
- export { format, isWeakEqual, parseFromCustomString, parseFromISOString };
74
+ export { format, isWeakEqual, parse, parseFromCustomString, parseFromISOString };
63
75
  //# sourceMappingURL=date.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date.js","sources":["../../../../../../src/utils/date.ts"],"sourcesContent":["import { isDate, toDate, isValid } from 'date-fns';\n\nexport const isWeakEqual = (leftDate: Date, rightDate: Date) => {\n return (\n leftDate.getFullYear() === rightDate.getFullYear() &&\n leftDate.getMonth() === rightDate.getMonth() &&\n leftDate.getDate() === rightDate.getDate()\n );\n};\n\nexport const format = (date: Date | undefined, mask = 'dd.mm.yy'): string | undefined => {\n if (!date) {\n return undefined;\n }\n\n const value = isDate(date) ? date : toDate(date);\n\n if (!isValid(value)) {\n return undefined;\n }\n\n const pad = (v: number): string => (String(v).length === 1 ? `0${v}` : v.toString());\n\n return mask\n .replace('dd', pad(value.getDate()))\n .replace('mm', pad(value.getMonth() + 1))\n .replace('yy', String(value.getFullYear()).slice(2));\n};\n\nexport const parseFromCustomString = (\n date = '',\n mask = 'dd.mm.yy',\n defaultMonth: number | undefined = undefined,\n defaultYear: number | undefined = undefined\n): Date | undefined => {\n if (!date || !date.length) {\n return undefined;\n }\n\n const sanitizedMask = mask.split(/[^dmy]/);\n const dd = sanitizedMask.findIndex(x => x === 'dd');\n const mm = sanitizedMask.findIndex(x => x === 'mm');\n const yy = sanitizedMask.findIndex(x => x === 'yy' || x === 'yyyy');\n\n let day;\n let month;\n let year;\n\n const getFullYear = (y: string): string => {\n if (y && y.length === 2) {\n const z = Number.parseInt(y, 10);\n\n return z > 50 ? `19${y}` : `20${y}`;\n }\n\n return y;\n };\n\n const inputParts = date.split(/\\D/);\n\n if (inputParts.length === 1) {\n const fullDate = inputParts[0];\n const unseparatedMask = mask.replace(/[^dmy]/g, '');\n\n day = fullDate.slice(unseparatedMask.indexOf('d'), unseparatedMask.lastIndexOf('d') + 1);\n month = fullDate.slice(unseparatedMask.indexOf('m'), unseparatedMask.lastIndexOf('m') + 1);\n year = getFullYear(fullDate.slice(unseparatedMask.indexOf('y'), unseparatedMask.lastIndexOf('y') + 3)); // account for full years\n } else {\n day = inputParts[dd];\n month = inputParts[mm];\n year = getFullYear(inputParts[yy]);\n }\n\n day = Number.parseInt(day, 10);\n month = Number.parseInt(month, 10);\n year = Number.parseInt(year, 10);\n\n const currentDate = new Date();\n\n return new Date(\n /* year */ Object.is(year, NaN) ? defaultYear ?? currentDate.getFullYear() : year,\n /* month */ Object.is(month, NaN) ? defaultMonth ?? currentDate.getMonth() : month - 1, // months are zero based in javascript, so subtract a day\n /* day */ Object.is(day, NaN) ? currentDate.getDate() : day,\n /* hours */ 12,\n /* minutes */ 0 // set to midday to avoid UTC offset causing dates to be mismatched server side\n );\n};\n\nexport const parseFromISOString = (date: string): Date | undefined => {\n const tempDate = new Date(date);\n return isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;\n};\n"],"names":["isWeakEqual","leftDate","rightDate","getFullYear","getMonth","getDate","format","date","mask","undefined","value","isDate","toDate","isValid","pad","v","String","length","toString","replace","slice","parseFromCustomString","defaultMonth","defaultYear","sanitizedMask","split","dd","findIndex","x","mm","yy","day","month","year","y","z","Number","parseInt","inputParts","fullDate","unseparatedMask","indexOf","lastIndexOf","currentDate","Date","Object","is","NaN","parseFromISOString","tempDate"],"mappings":";;MAEaA,WAAW,GAAGA,CAACC,QAAc,EAAEC,SAAe;EACvD,OACID,QAAQ,CAACE,WAAW,EAAE,KAAKD,SAAS,CAACC,WAAW,EAAE,IAClDF,QAAQ,CAACG,QAAQ,EAAE,KAAKF,SAAS,CAACE,QAAQ,EAAE,IAC5CH,QAAQ,CAACI,OAAO,EAAE,KAAKH,SAAS,CAACG,OAAO,EAAE;AAElD;MAEaC,MAAM,GAAGA,CAACC,IAAsB,EAAEC,IAAI,GAAG,UAAU;EAC5D,IAAI,CAACD,IAAI,EAAE;IACP,OAAOE,SAAS;;EAGpB,MAAMC,KAAK,GAAGC,MAAM,CAACJ,IAAI,CAAC,GAAGA,IAAI,GAAGK,MAAM,CAACL,IAAI,CAAC;EAEhD,IAAI,CAACM,OAAO,CAACH,KAAK,CAAC,EAAE;IACjB,OAAOD,SAAS;;EAGpB,MAAMK,GAAG,GAAIC,CAAS,IAAcC,MAAM,CAACD,CAAC,CAAC,CAACE,MAAM,KAAK,CAAC,GAAG,IAAIF,CAAC,E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C,GAAGxB,WAAW,aAAXA,WAAW,cAAXA,WAAW,GAAIoB,WAAW,CAACxC,WAAW,EAAE,GAAG8B,IAAI,aACrEY,MAAM,CAACC,EAAE,CAACd,KAAK,EAAEe,GAAG,CAAC,GAAGzB,YAAY,aAAZA,YAAY,cAAZA,YAAY,GAAIqB,WAAW,CAACvC,QAAQ,EAAE,GAAG4B,KAAK,GAAG,CAAC;;;EAC5Ea,MAAM,CAACC,EAAE,CAACf,GAAG,EAAEgB,GAAG,CAAC,GAAGJ,WAAW,CAACtC,OAAO,EAAE,GAAG0B,GAAG,aAC/C,EAAE,eACA,CAAC;GAClB;AACL;MAEaiB,kBAAkB,GAAIzC,IAAY;EAC3C,MAAM0C,QAAQ,GAAG,IAAIL,IAAI,CAACrC,IAAI,CAAC;EAC/B,OAAOM,OAAO,CAACoC,QAAQ,CAAC,GAAG5B,qBAAqB,CAACf,MAAM,CAAC,IAAIsC,IAAI,CAACrC,IAAI,CAAC,CAAC,CAAC,GAAGE,SAAS;AACxF;;;;"}
1
+ {"version":3,"file":"date.js","sources":["../../../../../../src/utils/date.ts"],"sourcesContent":["import { isDate, isValid } from 'date-fns';\n\nexport const isWeakEqual = (leftDate: Date, rightDate: Date) => {\n return (\n leftDate.getFullYear() === rightDate.getFullYear() &&\n leftDate.getMonth() === rightDate.getMonth() &&\n leftDate.getDate() === rightDate.getDate()\n );\n};\n\nexport function parse(date: string | Date | undefined) {\n let value: Date | undefined;\n\n if (isDate(date)) {\n value = date as Date;\n } else if (typeof date === 'string') {\n value = parseFromISOString(date as string);\n }\n\n if (!isValid(value)) {\n return undefined;\n }\n\n return value;\n}\n\nexport function format(date: string | Date | undefined, mask = 'dd.mm.yy'): string | undefined {\n if (date === undefined) {\n return undefined;\n }\n\n const value = parse(date);\n\n if (!isValid(value) || value === undefined) {\n return undefined;\n }\n\n const pad = (v: number): string => (String(v).length === 1 ? `0${v}` : v.toString());\n\n return mask\n .replace('dd', pad(value.getDate()))\n .replace('mm', pad(value.getMonth() + 1))\n .replace('yy', String(value.getFullYear()).slice(2));\n}\n\nexport const parseFromCustomString = (\n date = '',\n mask = 'dd.mm.yy',\n defaultMonth: number | undefined = undefined,\n defaultYear: number | undefined = undefined\n): Date | undefined => {\n if (!date || !date.length) {\n return undefined;\n }\n\n const sanitizedMask = mask.split(/[^dmy]/);\n const dd = sanitizedMask.findIndex(x => x === 'dd');\n const mm = sanitizedMask.findIndex(x => x === 'mm');\n const yy = sanitizedMask.findIndex(x => x === 'yy' || x === 'yyyy');\n\n let day;\n let month;\n let year;\n\n const getFullYear = (y: string): string => {\n if (y && y.length === 2) {\n const z = Number.parseInt(y, 10);\n\n return z > 50 ? `19${y}` : `20${y}`;\n }\n\n return y;\n };\n\n const inputParts = date.split(/\\D/);\n\n if (inputParts.length === 1) {\n const fullDate = inputParts[0];\n const unseparatedMask = mask.replace(/[^dmy]/g, '');\n\n day = fullDate.slice(unseparatedMask.indexOf('d'), unseparatedMask.lastIndexOf('d') + 1);\n month = fullDate.slice(unseparatedMask.indexOf('m'), unseparatedMask.lastIndexOf('m') + 1);\n year = getFullYear(fullDate.slice(unseparatedMask.indexOf('y'), unseparatedMask.lastIndexOf('y') + 3)); // account for full years\n } else {\n day = inputParts[dd];\n month = inputParts[mm];\n year = getFullYear(inputParts[yy]);\n }\n\n day = Number.parseInt(day, 10);\n month = Number.parseInt(month, 10);\n year = Number.parseInt(year, 10);\n\n const currentDate = new Date();\n\n return new Date(\n /* year */ Object.is(year, NaN) ? defaultYear ?? currentDate.getFullYear() : year,\n /* month */ Object.is(month, NaN) ? defaultMonth ?? currentDate.getMonth() : month - 1, // months are zero based in javascript, so subtract a day\n /* day */ Object.is(day, NaN) ? currentDate.getDate() : day,\n /* hours */ 12,\n /* minutes */ 0 // set to midday to avoid UTC offset causing dates to be mismatched server side\n );\n};\n\nexport const parseFromISOString = (date: string): Date | undefined => {\n const tempDate = new Date(date);\n return isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;\n};\n"],"names":["isWeakEqual","leftDate","rightDate","getFullYear","getMonth","getDate","parse","date","value","isDate","parseFromISOString","isValid","undefined","format","mask","pad","v","String","length","toString","replace","slice","parseFromCustomString","defaultMonth","defaultYear","sanitizedMask","split","dd","findIndex","x","mm","yy","day","month","year","y","z","Number","parseInt","inputParts","fullDate","unseparatedMask","indexOf","lastIndexOf","currentDate","Date","Object","is","NaN","tempDate"],"mappings":";;MAEaA,WAAW,GAAGA,CAACC,QAAc,EAAEC,SAAe;EACvD,OACID,QAAQ,CAACE,WAAW,EAAE,KAAKD,SAAS,CAACC,WAAW,EAAE,IAClDF,QAAQ,CAACG,QAAQ,EAAE,KAAKF,SAAS,CAACE,QAAQ,EAAE,IAC5CH,QAAQ,CAACI,OAAO,EAAE,KAAKH,SAAS,CAACG,OAAO,EAAE;AAElD;SAEgBC,KAAKA,CAACC,IAA+B;EACjD,IAAIC,KAAuB;EAE3B,IAAIC,MAAM,CAACF,IAAI,CAAC,EAAE;IACdC,KAAK,GAAGD,IAAY;GACvB,MAAM,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IACjCC,KAAK,GAAGE,kBAAkB,CAACH,IAAc,CAAC;;EAG9C,IAAI,CAACI,OAAO,CAACH,KAAK,CAAC,EAAE;IACjB,OAAOI,SAAS;;EAGpB,OAAOJ,KAAK;AAChB;SAEgBK,MAAMA,CAACN,IAA+B,EAAEO,IAAI,GAAG,UAAU;EACrE,IAAIP,IAAI,KAAKK,SAAS,EAAE;IACpB,OAAOA,SAAS;;EAGpB,MAAMJ,KAAK,GAAGF,KAAK,CAACC,IAAI,CAAC;EAEzB,IAAI,CAACI,OAAO,CAACH,KAAK,CAAC,IAAIA,KAAK,KAAKI,SAAS,EAAE;IACxC,OAAOA,SAAS;;EAGpB,MAAMG,GAAG,GAAIC,CAAS,IAAcC,MAAM,CAACD,CAAC,CAAC,CAACE,MAAM,KAAK,CAAC,GAAG,IAAIF,CAAC,EAAE,GAAGA,CAAC,CAACG,QAAQ,EAAG;EA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GAAIoB,WAAW,CAACzC,WAAW,EAAE,GAAG+B,IAAI,aACrEY,MAAM,CAACC,EAAE,CAACd,KAAK,EAAEe,GAAG,CAAC,GAAGzB,YAAY,aAAZA,YAAY,cAAZA,YAAY,GAAIqB,WAAW,CAACxC,QAAQ,EAAE,GAAG6B,KAAK,GAAG,CAAC;;;EAC5Ea,MAAM,CAACC,EAAE,CAACf,GAAG,EAAEgB,GAAG,CAAC,GAAGJ,WAAW,CAACvC,OAAO,EAAE,GAAG2B,GAAG,aAC/C,EAAE,eACA,CAAC;GAClB;AACL;MAEatB,kBAAkB,GAAIH,IAAY;EAC3C,MAAM0C,QAAQ,GAAG,IAAIJ,IAAI,CAACtC,IAAI,CAAC;EAC/B,OAAOI,OAAO,CAACsC,QAAQ,CAAC,GAAG3B,qBAAqB,CAACT,MAAM,CAAC,IAAIgC,IAAI,CAACtC,IAAI,CAAC,CAAC,CAAC,GAAGK,SAAS;AACxF;;;;"}
@@ -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 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","length","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,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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AQ,CAAC,CAACyC,QAAQ,CAACzC,OAAO,CAAC0C,OAAO,CAAC,IAC3F,CAAE1C,OAAuB,CAAC2C,MAAM,IAChC,CAAE3C,OAA0F,CAAC4C,QAAQ,IACrG,CAAE5C,OAAkD,CAAC6C,QAAQ;AAErE;SAEgBC,6BAA6BA,CAAC9C,OAAuB;EACjE,OAAO,CAAC,EAACA,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEiC,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
+ {"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) {\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","length","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,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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AAC,CAACyC,QAAQ,CAACzC,OAAO,CAAC0C,OAAO,CAAC,IAC3F,CAAE1C,OAAuB,CAAC2C,MAAM,IAChC,CAAE3C,OAA0F,CAAC4C,QAAQ,IACrG,CAAE5C,OAAkD,CAAC6C,QAAQ;AAErE;SAEgBC,6BAA6BA,CAAC9C,OAAuB;EACjE,OAAO,CAAC,EAACA,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEiC,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,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,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 { TableFontSize, TableRowActionRenderer } from '../../../../types';
3
3
  import { useTableManagerInternalColumn } from '../../../../useTableManager/types';
4
4
  export declare type ActionsProps<TType = unknown> = {
@@ -9,5 +9,5 @@ export declare type ActionsProps<TType = unknown> = {
9
9
  isActiveRow: boolean;
10
10
  rowId: string;
11
11
  };
12
- export declare function Actions<TType = unknown>(props: ActionsProps<TType>): React.JSX.Element;
12
+ export declare function Actions<TType = unknown>(props: ActionsProps<TType>): JSX.Element;
13
13
  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;