@economic/taco 2.45.0-alpha.0 → 2.45.0-create.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (507) 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 +1 -1
  6. package/dist/components/Dialog/components/Content.d.ts +1 -1
  7. package/dist/components/Dialog/components/DialogDrawer.d.ts +2 -2
  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/Provider/Localization.d.ts +2 -0
  289. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  290. package/dist/components/Report/Report.d.ts +1 -1
  291. package/dist/components/ScrollArea/ScrollArea.d.ts +2 -2
  292. package/dist/components/SearchInput/SearchInput.d.ts +1 -1
  293. package/dist/components/Select/Select.d.ts +1 -1
  294. package/dist/components/Select2/components/All.d.ts +2 -2
  295. package/dist/components/Select2/components/Collection.d.ts +1 -1
  296. package/dist/components/Select2/components/Create.d.ts +1 -1
  297. package/dist/components/Select2/components/Edit.d.ts +2 -2
  298. package/dist/components/Select2/components/Group.d.ts +1 -1
  299. package/dist/components/Select2/components/Option.d.ts +1 -1
  300. package/dist/components/Select2/components/Search.d.ts +3 -3
  301. package/dist/components/Select2/components/Trigger.d.ts +1 -1
  302. package/dist/components/Select2/hooks/useChildren.d.ts +2 -2
  303. package/dist/components/Select2/utilities.d.ts +2 -0
  304. package/dist/components/Shortcut/Shortcut.d.ts +1 -1
  305. package/dist/components/Table3/Table3.d.ts +2 -14
  306. package/dist/components/Table3/components/Columns/Cell/Cell.d.ts +2 -2
  307. package/dist/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.d.ts +1 -1
  308. package/dist/components/Table3/components/Columns/Cell/EditingControlCell.d.ts +2 -2
  309. package/dist/components/Table3/components/Columns/Internal/EditingActionsMenu.d.ts +3 -4
  310. package/dist/components/Table3/components/Editing/Alert.d.ts +1 -1
  311. package/dist/components/Table3/components/Editing/DiscardChangesConfirmationDialog.d.ts +7 -0
  312. package/dist/components/Table3/components/Row/Editing/CreateNewRow.d.ts +13 -0
  313. package/dist/components/Table3/components/Row/Editing/SaveStatus.d.ts +2 -2
  314. package/dist/components/Table3/components/Row/Editing/TemporaryRow.d.ts +12 -0
  315. package/dist/components/Table3/components/Row/Row.d.ts +2 -2
  316. package/dist/components/Table3/components/Toolbar/Editing/Editing.d.ts +1 -1
  317. package/dist/components/Table3/features/useEditingState.d.ts +29 -0
  318. package/dist/components/Table3/features/useTableEditing.d.ts +24 -36
  319. package/dist/components/Table3/types.d.ts +23 -8
  320. package/dist/components/Table3/useTable3.d.ts +6 -0
  321. package/dist/components/Table3/util/editing.d.ts +0 -1
  322. package/dist/components/Tag/Tag.d.ts +2 -2
  323. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  324. package/dist/components/Tour/Tour.d.ts +3 -3
  325. package/dist/components/Truncate/Truncate.d.ts +1 -1
  326. package/dist/esm/index.css +6 -2
  327. package/dist/esm/node_modules/babel-plugin-transform-async-to-promises/helpers.mjs.js +17 -17
  328. package/dist/esm/node_modules/babel-plugin-transform-async-to-promises/helpers.mjs.js.map +1 -1
  329. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +6 -14
  330. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  331. package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
  332. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  333. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +3 -3
  334. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  335. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  336. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  337. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +3 -5
  338. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  339. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  340. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  341. package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
  342. package/dist/esm/packages/taco/src/components/Listbox/util.js +1 -7
  343. package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
  344. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  345. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +2 -2
  346. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
  347. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  348. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  349. package/dist/esm/packages/taco/src/components/Provider/Localization.js +5 -3
  350. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  351. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  352. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +4 -4
  353. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  354. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  355. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  356. package/dist/esm/packages/taco/src/components/Select2/Select2.js +29 -5
  357. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  358. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +10 -11
  359. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  360. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +2 -0
  361. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  362. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +1 -1
  363. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  364. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +1 -1
  365. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  366. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  367. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +1 -10
  368. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  369. package/dist/esm/packages/taco/src/components/Select2/utilities.js +11 -1
  370. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  371. package/dist/esm/packages/taco/src/components/Switch/Switch.js +1 -1
  372. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  373. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  374. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
  375. package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  376. package/dist/esm/packages/taco/src/components/Table3/Table3.js +21 -7
  377. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  378. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
  379. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +24 -6
  380. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
  381. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +5 -36
  382. package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
  383. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +17 -12
  384. package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
  385. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +34 -0
  386. package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -0
  387. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +88 -0
  388. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -0
  389. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +2 -14
  390. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
  391. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +93 -0
  392. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -0
  393. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +5 -7
  394. package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
  395. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +7 -2
  396. package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
  397. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +514 -0
  398. package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -0
  399. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +16 -406
  400. package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
  401. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +37 -32
  402. package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
  403. package/dist/esm/packages/taco/src/components/Table3/useTable3.js +21 -7
  404. package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
  405. package/dist/esm/packages/taco/src/components/Table3/util/editing.js +3 -28
  406. package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
  407. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  408. package/dist/esm/packages/taco/src/components/Tour/Tour.js +3 -3
  409. package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
  410. package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
  411. package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
  412. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +20 -4
  413. package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
  414. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +1 -0
  415. package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
  416. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +1 -1
  417. package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
  418. package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
  419. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +3 -4
  420. package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
  421. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +4 -4
  422. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
  423. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +9 -3
  424. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
  425. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +6 -3
  426. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
  427. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
  428. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +1 -1
  429. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
  430. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
  431. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
  432. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +2 -2
  433. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
  434. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
  435. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
  436. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
  437. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +1 -1
  438. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
  439. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
  440. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
  441. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +1 -3
  442. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
  443. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
  444. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
  445. package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
  446. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +1 -1
  447. package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
  448. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  449. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
  450. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
  451. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
  452. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
  453. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +1 -1
  454. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
  455. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
  456. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
  457. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +11 -0
  458. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
  459. package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
  460. package/dist/esm/packages/taco/src/utils/dom.js +7 -4
  461. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  462. package/dist/index.css +6 -2
  463. package/dist/primitives/BubbleSelect.d.ts +1 -1
  464. package/dist/primitives/Collection/components/Root.d.ts +3 -1
  465. package/dist/primitives/Sortable/components/Container.d.ts +2 -2
  466. package/dist/primitives/Sortable/components/Item.d.ts +1 -2
  467. package/dist/primitives/Sortable/components/List.d.ts +1 -1
  468. package/dist/primitives/Table/Core/Table.d.ts +3 -2
  469. package/dist/primitives/Table/Core/components/Body/Body.d.ts +1 -1
  470. package/dist/primitives/Table/Core/components/Body/EmptyStateBody.d.ts +1 -1
  471. package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.d.ts +2 -2
  472. package/dist/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.d.ts +2 -2
  473. package/dist/primitives/Table/Core/components/Columns/Cell/Cell.d.ts +1 -1
  474. package/dist/primitives/Table/Core/components/Columns/Internal/Actions.d.ts +5 -3
  475. package/dist/primitives/Table/Core/components/Footer/Footer.d.ts +3 -3
  476. package/dist/primitives/Table/Core/components/Footer/Summary.d.ts +2 -2
  477. package/dist/primitives/Table/Core/components/Header/Header.d.ts +1 -1
  478. package/dist/primitives/Table/Core/components/Header/components/Goto.d.ts +2 -2
  479. package/dist/primitives/Table/Core/components/Header/components/Menu.d.ts +1 -1
  480. package/dist/primitives/Table/Core/components/Header/components/Resizer.d.ts +2 -2
  481. package/dist/primitives/Table/Core/components/Header/components/SortIndicator.d.ts +3 -3
  482. package/dist/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.d.ts +2 -2
  483. package/dist/primitives/Table/Core/components/Row/Row.d.ts +1 -1
  484. package/dist/primitives/Table/Core/components/Toolbar/Toolbar.d.ts +1 -1
  485. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/Filters.d.ts +2 -2
  486. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.d.ts +2 -2
  487. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +2 -2
  488. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +1 -1
  489. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.d.ts +2 -2
  490. package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.d.ts +2 -2
  491. package/dist/primitives/Table/Core/components/Toolbar/components/Print/Print.d.ts +1 -1
  492. package/dist/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.d.ts +2 -2
  493. package/dist/primitives/Table/Core/components/Toolbar/components/Search/Search.d.ts +1 -1
  494. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.d.ts +2 -2
  495. package/dist/primitives/Table/Core/components/Toolbar/components/Settings/Settings.d.ts +2 -2
  496. package/dist/primitives/Table/types.d.ts +1 -1
  497. package/dist/primitives/Table/useTableManager/useTableManager.d.ts +1 -1
  498. package/dist/primitives/Table/useTableManager/util/settings.d.ts +1 -1
  499. package/dist/taco.cjs.development.js +960 -694
  500. package/dist/taco.cjs.development.js.map +1 -1
  501. package/dist/taco.cjs.production.min.js +1 -1
  502. package/dist/taco.cjs.production.min.js.map +1 -1
  503. package/dist/utils/dom.d.ts +2 -1
  504. package/package.json +11 -11
  505. package/dist/components/Table3/components/Row/Editing/CreateRowButton.d.ts +0 -11
  506. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateRowButton.js +0 -90
  507. package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateRowButton.js.map +0 -1
@@ -0,0 +1,514 @@
1
+ import React__default from 'react';
2
+ import { useLocalization } from '../../Provider/Localization.js';
3
+ import { v4 } from 'uuid';
4
+ import { _forOf, _catch } from '../../../../../../node_modules/babel-plugin-transform-async-to-promises/helpers.mjs.js';
5
+ import { willRowMove } from '../util/editing.js';
6
+ import omit from 'lodash-es/omit';
7
+ import setWith from 'lodash-es/setWith';
8
+
9
+ const TEMPORARY_ROW_ID_PREFIX = 'temp-';
10
+ const DELAY_BEFORE_REMOVING_SAVE_STATUS = 3000;
11
+ function reducer(state, action) {
12
+ const {
13
+ type,
14
+ rowId,
15
+ payload
16
+ } = action;
17
+ switch (type) {
18
+ case 'setCellValue':
19
+ {
20
+ const {
21
+ columnId,
22
+ row,
23
+ value
24
+ } = payload;
25
+ return {
26
+ ...state,
27
+ changes: {
28
+ ...state.changes,
29
+ rows: setWith(state.changes.rows, `${rowId}.${columnId}`, value, Object),
30
+ originals: setWith(state.changes.originals, rowId, row, Object)
31
+ }
32
+ };
33
+ }
34
+ case 'removeCellValue':
35
+ {
36
+ const {
37
+ columnId,
38
+ rowIdentityAccessor
39
+ } = payload;
40
+ const changes = omit(state.changes.rows, `${rowId}.${columnId}`);
41
+ // if there are no changes left, remove the row
42
+ if (!Object.keys(changes[rowId]).length) {
43
+ return reducer(state, {
44
+ type: 'removeRow',
45
+ rowId,
46
+ payload: {
47
+ rowIdentityAccessor
48
+ }
49
+ });
50
+ }
51
+ return {
52
+ ...state,
53
+ changes: {
54
+ ...state.changes,
55
+ rows: omit(state.changes.rows, `${rowId}.${columnId}`),
56
+ errors: omit(state.changes.errors, `${rowId}.cells.${columnId}`),
57
+ moveReasons: omit(state.changes.moveReasons, `${rowId}.${columnId}`)
58
+ }
59
+ };
60
+ }
61
+ case 'updateRow':
62
+ {
63
+ const {
64
+ cellErrors,
65
+ moveReasons,
66
+ original,
67
+ value
68
+ } = payload;
69
+ return {
70
+ ...state,
71
+ changes: {
72
+ ...state.changes,
73
+ rows: setWith(state.changes.rows, rowId, value, Object),
74
+ errors: setWith(state.changes.errors, `${rowId}.cells`, cellErrors !== null && cellErrors !== void 0 ? cellErrors : state.changes.errors.cells[rowId], Object),
75
+ originals: setWith(state.changes.originals, rowId, original !== null && original !== void 0 ? original : state.changes.originals[rowId], Object),
76
+ moveReasons: setWith(state.changes.moveReasons, rowId, moveReasons !== null && moveReasons !== void 0 ? moveReasons : state.changes.moveReasons[rowId], Object),
77
+ // status can be undefined, so don't use ??
78
+ status: setWith(state.changes.status, rowId, undefined, Object)
79
+ }
80
+ };
81
+ }
82
+ case 'removeRow':
83
+ {
84
+ const {
85
+ rowIdentityAccessor
86
+ } = payload;
87
+ return {
88
+ ...state,
89
+ changes: {
90
+ ...state.changes,
91
+ rows: omit(state.changes.rows, rowId),
92
+ errors: omit(state.changes.errors, rowId),
93
+ moveReasons: omit(state.changes.moveReasons, rowId),
94
+ originals: omit(state.changes.originals, rowId),
95
+ status: omit(state.changes.status, rowId)
96
+ },
97
+ temporaryRows: state.temporaryRows.filter(row => row[rowIdentityAccessor] !== rowId)
98
+ };
99
+ }
100
+ case 'setRowStatus':
101
+ {
102
+ const {
103
+ status
104
+ } = payload;
105
+ return {
106
+ ...state,
107
+ changes: {
108
+ ...state.changes,
109
+ status: status ? setWith(state.changes.status, rowId, status, Object) : omit(state.changes.status, rowId)
110
+ }
111
+ };
112
+ }
113
+ case 'setRowErrors':
114
+ {
115
+ const {
116
+ ...errors
117
+ } = payload;
118
+ return {
119
+ ...state,
120
+ changes: {
121
+ ...state.changes,
122
+ errors: setWith(state.changes.errors, rowId, errors, Object)
123
+ }
124
+ };
125
+ }
126
+ case 'createRow':
127
+ {
128
+ const {
129
+ value
130
+ } = payload;
131
+ return {
132
+ ...state,
133
+ temporaryRows: state.temporaryRows.concat(value),
134
+ changes: {
135
+ ...state.changes,
136
+ rows: setWith(state.changes.rows, rowId, value, Object),
137
+ originals: setWith(state.changes.originals, rowId, value, Object)
138
+ }
139
+ };
140
+ }
141
+ default:
142
+ return state;
143
+ }
144
+ }
145
+ function usePendingChangesState(handleSave, handleChange, rowIdentityAccessor, validator) {
146
+ const saveChanges = function (table, rowId = undefined) {
147
+ try {
148
+ let _exit = false;
149
+ if (!handleSave) {
150
+ console.warn('Tried to save, but Table has no onEditingSave handler');
151
+ return Promise.resolve(false);
152
+ }
153
+ // sometimes we only want to save one row
154
+ const changes = rowId ? {
155
+ [rowId]: state.changes.rows[rowId]
156
+ } : state.changes.rows;
157
+ let completed = true;
158
+ const _temp9 = _forOf(Object.keys(changes), function (rowId) {
159
+ const status = getRowStatus(rowId);
160
+ return _catch(function () {
161
+ var _changeSet$rowIdentit;
162
+ function _temp8(_result) {
163
+ return _exit ? _result : Promise.resolve(handleSave(changeSet)).then(function () {
164
+ // cleanup changes, we don't need them after saving
165
+ discardChanges(rowId, table);
166
+ // show the saved status, then remove it after a delay
167
+ setRowStatus(rowId, 'saved');
168
+ setTimeout(() => {
169
+ setRowStatus(rowId, undefined);
170
+ }, DELAY_BEFORE_REMOVING_SAVE_STATUS);
171
+ });
172
+ }
173
+ // don't try to save if - already saving, or there are known errors
174
+ if (status === 'saving' || status === 'errored') {
175
+ return;
176
+ }
177
+ setRowStatus(rowId, 'saving');
178
+ const changeSet = {
179
+ ...state.changes.originals[rowId],
180
+ ...changes[rowId]
181
+ };
182
+ // if we had to create a temporary id, delete it first - it's our data, not theirs
183
+ if ((_changeSet$rowIdentit = changeSet[rowIdentityAccessor]) !== null && _changeSet$rowIdentit !== void 0 && _changeSet$rowIdentit.startsWith(TEMPORARY_ROW_ID_PREFIX)) {
184
+ delete changeSet[rowIdentityAccessor];
185
+ }
186
+ // re-run validation, maybe a cell is already invalid but has never been blurred
187
+ const _temp7 = function () {
188
+ if (validator) {
189
+ return Promise.resolve(validator(changeSet)).then(function (errors) {
190
+ if (errors && Object.keys(errors).length) {
191
+ throw errors;
192
+ }
193
+ });
194
+ }
195
+ }();
196
+ return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7); // send new data to the server
197
+ }, function (error) {
198
+ var _error$response;
199
+ if (error instanceof ReferenceError || error instanceof TypeError || (error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) >= 500) {
200
+ console.error(error);
201
+ }
202
+ // the onEditingSave handler should throw errors when something fails, e.g. validation, network errors etc
203
+ // this code handles those errors and maps them either to row errors or cell specific errors
204
+ let rowError;
205
+ let cellErrors;
206
+ if (typeof error === 'string') {
207
+ rowError = error;
208
+ } else if (error instanceof Error) {
209
+ var _error$response2;
210
+ rowError = error.message;
211
+ // most of our apis return error objects within this shape
212
+ if (typeof ((_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : _error$response2.data) === 'object') {
213
+ var _error$response3;
214
+ cellErrors = (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : _error$response3.data;
215
+ }
216
+ } else if (typeof error === 'object') {
217
+ cellErrors = error;
218
+ }
219
+ if (rowError || cellErrors) {
220
+ dispatch({
221
+ type: 'setRowErrors',
222
+ rowId,
223
+ payload: {
224
+ row: rowError,
225
+ cells: cellErrors,
226
+ shouldShowErrorAlert: true
227
+ }
228
+ });
229
+ }
230
+ setRowStatus(rowId, 'errored');
231
+ completed = false;
232
+ });
233
+ }, function () {
234
+ return _exit;
235
+ });
236
+ return Promise.resolve(_temp9 && _temp9.then ? _temp9.then(function (_result3) {
237
+ return _exit ? _result3 : completed;
238
+ }) : _exit ? _temp9 : completed);
239
+ } catch (e) {
240
+ return Promise.reject(e);
241
+ }
242
+ };
243
+ const onCellChanged = function (cell, rowIndex) {
244
+ try {
245
+ function _temp6() {
246
+ var _state$changes$errors8;
247
+ function _temp4() {
248
+ // only set errors and move reasons for the cells we're currently acting on
249
+ // why? because the UX is not good if we set them for cells the user hasn't touched yet
250
+ const cellsToActOn = [cell.column.id, ...Object.keys(updatesForOtherCells)];
251
+ const allCells = cell.row._getAllCellsByColumnId();
252
+ cellsToActOn.forEach(accessor => {
253
+ if (validationErrors[accessor]) {
254
+ nextCellErrors[accessor] = validationErrors[accessor];
255
+ // don't show move indicator for cells with errors, they aren't valid and can't be saved
256
+ delete nextMoveReasons[accessor];
257
+ } else {
258
+ var _allCells$accessor;
259
+ // there isn't any error in this run, remove any error set in state
260
+ delete nextCellErrors[accessor];
261
+ if ((_allCells$accessor = allCells[accessor]) !== null && _allCells$accessor !== void 0 && _allCells$accessor.column.getIsSorted()) {
262
+ // run row move determination
263
+ const reason = willRowMove(cell, nextChanges[accessor], rowIndex, localization);
264
+ // if the row will move based on this change save why, otherwise delete any existing state
265
+ if (reason) {
266
+ nextMoveReasons[accessor] = reason;
267
+ } else {
268
+ delete nextMoveReasons[accessor];
269
+ }
270
+ }
271
+ }
272
+ });
273
+ dispatch({
274
+ type: 'updateRow',
275
+ rowId: cell.row.id,
276
+ payload: {
277
+ cellErrors: nextCellErrors,
278
+ moveReasons: nextMoveReasons,
279
+ value: nextChanges
280
+ }
281
+ });
282
+ }
283
+ // create a projection of the next state, so we can act against it
284
+ const nextChanges = {
285
+ ...state.changes.rows[cell.row.id],
286
+ ...updatesForOtherCells
287
+ };
288
+ const nextMoveReasons = {
289
+ ...state.changes.moveReasons[cell.row.id]
290
+ };
291
+ const nextCellErrors = {
292
+ ...((_state$changes$errors8 = state.changes.errors[cell.row.id]) === null || _state$changes$errors8 === void 0 ? void 0 : _state$changes$errors8.cells)
293
+ };
294
+ // run validation
295
+ let validationErrors = {};
296
+ const _temp3 = function () {
297
+ if (validator) {
298
+ const nextRowValue = {
299
+ ...state.changes.originals[cell.row.id],
300
+ ...changes,
301
+ ...updatesForOtherCells
302
+ };
303
+ return Promise.resolve(validator(nextRowValue)).then(function (_validator2) {
304
+ validationErrors = _validator2 !== null && _validator2 !== void 0 ? _validator2 : {};
305
+ });
306
+ }
307
+ }();
308
+ return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
309
+ }
310
+ const changes = state.changes.rows[cell.row.id];
311
+ if (!changes) {
312
+ return Promise.resolve();
313
+ }
314
+ let updatesForOtherCells = {};
315
+ // run the updater handler if there is one, to see if there are any other cells to update
316
+ const _temp5 = function () {
317
+ if (typeof handleChange === 'function') {
318
+ const previousRowValue = {
319
+ ...state.changes.originals[cell.row.id]
320
+ };
321
+ const nextRowValue = {
322
+ ...state.changes.originals[cell.row.id],
323
+ ...changes
324
+ };
325
+ return Promise.resolve(handleChange(cell.column.id, changes[cell.column.id], nextRowValue, previousRowValue)).then(function (_handleChange) {
326
+ updatesForOtherCells = _handleChange !== null && _handleChange !== void 0 ? _handleChange : {};
327
+ });
328
+ }
329
+ }();
330
+ return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5));
331
+ } catch (e) {
332
+ return Promise.reject(e);
333
+ }
334
+ }; // general
335
+ const createRow = function (data) {
336
+ try {
337
+ const newRowId = `${TEMPORARY_ROW_ID_PREFIX}${v4()}`;
338
+ const value = {
339
+ ...data,
340
+ [rowIdentityAccessor]: newRowId
341
+ };
342
+ dispatch({
343
+ type: 'createRow',
344
+ rowId: newRowId,
345
+ payload: {
346
+ value
347
+ }
348
+ });
349
+ return Promise.resolve(newRowId);
350
+ } catch (e) {
351
+ return Promise.reject(e);
352
+ }
353
+ }; // cells
354
+ // rows
355
+ const setRowValue = function (rowId, original, value) {
356
+ try {
357
+ function _temp2() {
358
+ dispatch({
359
+ type: 'updateRow',
360
+ rowId,
361
+ payload: {
362
+ cellErrors,
363
+ original,
364
+ value
365
+ }
366
+ });
367
+ }
368
+ let cellErrors;
369
+ const _temp = function () {
370
+ if (validator) {
371
+ const row = {
372
+ ...original,
373
+ ...value
374
+ };
375
+ return Promise.resolve(validator(row)).then(function (_validator) {
376
+ cellErrors = _validator !== null && _validator !== void 0 ? _validator : {};
377
+ });
378
+ }
379
+ }();
380
+ return Promise.resolve(_temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp));
381
+ } catch (e) {
382
+ return Promise.reject(e);
383
+ }
384
+ };
385
+ const localization = useLocalization();
386
+ const [state, dispatch] = React__default.useReducer(reducer, {
387
+ changes: {
388
+ rows: {},
389
+ errors: {},
390
+ moveReasons: {},
391
+ originals: {},
392
+ status: {}
393
+ },
394
+ temporaryRows: []
395
+ });
396
+ function getRowValue(rowId) {
397
+ var _state$changes$rows$r, _state$changes$rows;
398
+ return (_state$changes$rows$r = (_state$changes$rows = state.changes.rows) === null || _state$changes$rows === void 0 ? void 0 : _state$changes$rows[rowId]) !== null && _state$changes$rows$r !== void 0 ? _state$changes$rows$r : undefined;
399
+ }
400
+ function getRowMoveReason(rowId) {
401
+ var _Object$values$, _state$changes$moveRe, _state$changes$moveRe2;
402
+ return (_Object$values$ = Object.values((_state$changes$moveRe = (_state$changes$moveRe2 = state.changes.moveReasons) === null || _state$changes$moveRe2 === void 0 ? void 0 : _state$changes$moveRe2[rowId]) !== null && _state$changes$moveRe !== void 0 ? _state$changes$moveRe : {})[0]) !== null && _Object$values$ !== void 0 ? _Object$values$ : undefined;
403
+ }
404
+ function hasRowErrors(rowId) {
405
+ var _state$changes$errors, _state$changes$errors2, _state$changes$errors3;
406
+ return !!((_state$changes$errors = state.changes.errors[rowId]) !== null && _state$changes$errors !== void 0 && _state$changes$errors.row) || !!Object.keys((_state$changes$errors2 = (_state$changes$errors3 = state.changes.errors[rowId]) === null || _state$changes$errors3 === void 0 ? void 0 : _state$changes$errors3.cells) !== null && _state$changes$errors2 !== void 0 ? _state$changes$errors2 : {}).length;
407
+ }
408
+ function hasRowErrorsShownInAlert(rowId) {
409
+ var _state$changes$errors4;
410
+ return hasRowErrors(rowId) && !!((_state$changes$errors4 = state.changes.errors[rowId]) !== null && _state$changes$errors4 !== void 0 && _state$changes$errors4.shouldShowErrorAlert);
411
+ }
412
+ function getRowStatus(rowId) {
413
+ return state.changes.status[rowId];
414
+ }
415
+ function setRowStatus(rowId, status) {
416
+ dispatch({
417
+ type: 'setRowStatus',
418
+ rowId,
419
+ payload: {
420
+ status
421
+ }
422
+ });
423
+ }
424
+ function setCellValue(cell, value) {
425
+ const rowId = cell.row.id;
426
+ const columnId = cell.column.id;
427
+ // update if the change is different to the original value
428
+ if (value !== cell.row.original[columnId]) {
429
+ dispatch({
430
+ type: 'setCellValue',
431
+ rowId,
432
+ payload: {
433
+ columnId,
434
+ row: cell.row.original,
435
+ value
436
+ }
437
+ });
438
+ }
439
+ // otherwise remove any previous change - no point saving the same value
440
+ else if (cell.row.id in state.changes.rows) {
441
+ dispatch({
442
+ type: 'removeCellValue',
443
+ rowId,
444
+ payload: {
445
+ columnId,
446
+ rowIdentityAccessor
447
+ }
448
+ });
449
+ }
450
+ }
451
+ function getCellValue(cell) {
452
+ var _state$changes$rows2, _state$changes$rows2$;
453
+ return (_state$changes$rows2 = state.changes.rows) === null || _state$changes$rows2 === void 0 ? void 0 : (_state$changes$rows2$ = _state$changes$rows2[cell.row.id]) === null || _state$changes$rows2$ === void 0 ? void 0 : _state$changes$rows2$[cell.column.id];
454
+ }
455
+ function getCellError(cell) {
456
+ var _state$changes$errors5, _state$changes$errors6, _state$changes$errors7;
457
+ return (_state$changes$errors5 = state.changes.errors) === null || _state$changes$errors5 === void 0 ? void 0 : (_state$changes$errors6 = _state$changes$errors5[cell.row.id]) === null || _state$changes$errors6 === void 0 ? void 0 : (_state$changes$errors7 = _state$changes$errors6.cells) === null || _state$changes$errors7 === void 0 ? void 0 : _state$changes$errors7[cell.column.id];
458
+ }
459
+ function getErrorsShownInAlert() {
460
+ const rowsWithErrors = Object.keys(state.changes.errors);
461
+ if (!rowsWithErrors.length) {
462
+ return [];
463
+ }
464
+ return rowsWithErrors.filter(hasRowErrorsShownInAlert).map(rowId => ({
465
+ rowId,
466
+ changes: state.changes.rows[rowId],
467
+ errors: state.changes.errors[rowId]
468
+ }));
469
+ }
470
+ function hasSaved() {
471
+ return !!Object.values(state.changes.status).filter(value => value === 'saved').length;
472
+ }
473
+ function hasChanges(rowId) {
474
+ return rowId ? !!state.changes.rows[rowId] : !!Object.keys(state.changes.rows).length;
475
+ }
476
+ function discardChanges(rowId, table) {
477
+ // remove any new rows from pinned state before discarding them
478
+ table.resetRowPinning(true);
479
+ dispatch({
480
+ type: 'removeRow',
481
+ rowId,
482
+ payload: {
483
+ rowIdentityAccessor
484
+ }
485
+ });
486
+ }
487
+ return {
488
+ // row
489
+ setRowValue,
490
+ getRowValue,
491
+ getRowMoveReason,
492
+ hasRowErrors,
493
+ hasRowErrorsShownInAlert,
494
+ getRowStatus,
495
+ setRowStatus,
496
+ // cells
497
+ setCellValue,
498
+ getCellValue,
499
+ getCellError,
500
+ onCellChanged,
501
+ // general
502
+ getErrorsShownInAlert,
503
+ hasChanges,
504
+ saveChanges,
505
+ discardChanges,
506
+ hasSaved,
507
+ // new rows
508
+ createRow,
509
+ temporaryRows: state.temporaryRows
510
+ };
511
+ }
512
+
513
+ export { TEMPORARY_ROW_ID_PREFIX, usePendingChangesState };
514
+ //# sourceMappingURL=useEditingState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEditingState.js","sources":["../../../../../../../../src/components/Table3/features/useEditingState.ts"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, Cell as ReactTableCell } from '@tanstack/react-table';\nimport { v4 as uuid } from 'uuid';\nimport { Table3EditingChangeHandler, Table3EditingSaveHandler, Table3EditingValidatorFn } from '../types';\nimport { willRowMove } from '../util/editing';\nimport omit from 'lodash/omit';\nimport setWith from 'lodash/setWith';\nimport { useLocalization } from '../../Provider/Localization';\n\nexport const TEMPORARY_ROW_ID_PREFIX = 'temp-';\n\nconst DELAY_BEFORE_REMOVING_SAVE_STATUS = 3000;\n\ntype EditingError = {\n row: string;\n cells: Record<string, string>;\n shouldShowErrorAlert: boolean;\n};\ntype EditingRowMoveReason = Record<string, 'search' | 'sorting' | 'filter'>;\ntype EditingSaveState = 'saving' | 'saved' | 'errored';\ntype EditingChangeset<TType = unknown> = Partial<TType>;\ntype EditingState<TType = unknown> = {\n changes: {\n rows: Record<string, EditingChangeset<TType>>;\n errors: Record<string, EditingError>;\n moveReasons: Record<string, EditingRowMoveReason>;\n originals: Record<string, TType>;\n status: Record<string, EditingSaveState>;\n };\n temporaryRows: TType[];\n};\ntype EditingStateAction = {\n type:\n | 'setCellValue'\n | 'removeCellValue'\n | 'updateRow'\n | 'mergeRowValue'\n | 'removeRow'\n | 'setRowStatus'\n | 'setRowErrors'\n | 'createRow';\n rowId: string;\n payload?: any;\n};\n\nfunction reducer<TType = unknown>(state: EditingState<TType>, action: EditingStateAction) {\n const { type, rowId, payload } = action;\n\n switch (type) {\n case 'setCellValue': {\n const { columnId, row, value } = payload;\n return {\n ...state,\n changes: {\n ...state.changes,\n rows: setWith(state.changes.rows, `${rowId}.${columnId}`, value, Object),\n originals: setWith(state.changes.originals, rowId, row, Object),\n },\n };\n }\n\n case 'removeCellValue': {\n const { columnId, rowIdentityAccessor } = payload;\n const changes = omit(state.changes.rows, `${rowId}.${columnId}`);\n\n // if there are no changes left, remove the row\n if (!Object.keys(changes[rowId]).length) {\n return reducer(state, { type: 'removeRow', rowId, payload: { rowIdentityAccessor } });\n }\n\n return {\n ...state,\n changes: {\n ...state.changes,\n rows: omit(state.changes.rows, `${rowId}.${columnId}`),\n errors: omit(state.changes.errors, `${rowId}.cells.${columnId}`),\n moveReasons: omit(state.changes.moveReasons, `${rowId}.${columnId}`),\n },\n };\n }\n\n case 'updateRow': {\n const { cellErrors, moveReasons, original, value } = payload;\n return {\n ...state,\n changes: {\n ...state.changes,\n rows: setWith(state.changes.rows, rowId, value, Object),\n errors: setWith(\n state.changes.errors,\n `${rowId}.cells`,\n cellErrors ?? state.changes.errors.cells[rowId],\n Object\n ),\n originals: setWith(state.changes.originals, rowId, original ?? state.changes.originals[rowId], Object),\n moveReasons: setWith(\n state.changes.moveReasons,\n rowId,\n moveReasons ?? state.changes.moveReasons[rowId],\n Object\n ),\n // status can be undefined, so don't use ??\n status: setWith(state.changes.status, rowId, undefined, Object),\n },\n };\n }\n\n case 'removeRow': {\n const { rowIdentityAccessor } = payload;\n return {\n ...state,\n changes: {\n ...state.changes,\n rows: omit(state.changes.rows, rowId),\n errors: omit(state.changes.errors, rowId),\n moveReasons: omit(state.changes.moveReasons, rowId),\n originals: omit(state.changes.originals, rowId),\n status: omit(state.changes.status, rowId),\n },\n temporaryRows: state.temporaryRows.filter(row => row[rowIdentityAccessor] !== rowId),\n };\n }\n\n case 'setRowStatus': {\n const { status } = payload;\n return {\n ...state,\n changes: {\n ...state.changes,\n status: status ? setWith(state.changes.status, rowId, status, Object) : omit(state.changes.status, rowId),\n },\n };\n }\n\n case 'setRowErrors': {\n const { ...errors } = payload;\n return {\n ...state,\n changes: {\n ...state.changes,\n errors: setWith(state.changes.errors, rowId, errors, Object),\n },\n };\n }\n\n case 'createRow': {\n const { value } = payload;\n return {\n ...state,\n temporaryRows: state.temporaryRows.concat(value),\n changes: {\n ...state.changes,\n rows: setWith(state.changes.rows, rowId, value, Object),\n originals: setWith(state.changes.originals, rowId, value, Object),\n },\n };\n }\n\n default:\n return state;\n }\n}\n\nexport function usePendingChangesState<TType = unknown>(\n handleSave: Table3EditingSaveHandler<TType> | undefined,\n handleChange: Table3EditingChangeHandler<TType> | undefined,\n rowIdentityAccessor: keyof TType,\n validator: Table3EditingValidatorFn<TType> | undefined\n) {\n const localization = useLocalization();\n const [state, dispatch] = React.useReducer(reducer, {\n changes: { rows: {}, errors: {}, moveReasons: {}, originals: {}, status: {} },\n temporaryRows: [],\n });\n\n // rows\n async function setRowValue<T extends TType>(rowId: string, original: T, value: Partial<T>) {\n let cellErrors;\n\n if (validator) {\n const row = { ...original, ...value } as T;\n cellErrors = ((await validator(row)) ?? {}) as Record<string, string>;\n }\n\n dispatch({\n type: 'updateRow',\n rowId,\n payload: { cellErrors, original, value },\n });\n }\n\n function getRowValue(rowId: string) {\n return state.changes.rows?.[rowId] ?? undefined;\n }\n\n function getRowMoveReason(rowId: string) {\n return Object.values(state.changes.moveReasons?.[rowId] ?? {})[0] ?? undefined;\n }\n\n function hasRowErrors(rowId: string) {\n return !!state.changes.errors[rowId]?.row || !!Object.keys(state.changes.errors[rowId]?.cells ?? {}).length;\n }\n\n function hasRowErrorsShownInAlert(rowId: string) {\n return hasRowErrors(rowId) && !!state.changes.errors[rowId]?.shouldShowErrorAlert;\n }\n\n function getRowStatus(rowId: string) {\n return state.changes.status[rowId];\n }\n\n function setRowStatus(rowId: string, status: EditingSaveState | undefined) {\n dispatch({\n type: 'setRowStatus',\n rowId,\n payload: {\n status,\n },\n });\n }\n\n async function createRow<T extends TType>(data: Partial<T>) {\n const newRowId = `${TEMPORARY_ROW_ID_PREFIX}${uuid()}`;\n const value: Partial<TType> = {\n ...data,\n [rowIdentityAccessor]: newRowId,\n };\n\n dispatch({\n type: 'createRow',\n rowId: newRowId,\n payload: { value },\n });\n\n return newRowId;\n }\n\n // cells\n function setCellValue<T extends TType>(cell: ReactTableCell<T, unknown>, value: unknown) {\n const rowId = cell.row.id;\n const columnId = cell.column.id;\n\n // update if the change is different to the original value\n if (value !== cell.row.original[columnId]) {\n dispatch({\n type: 'setCellValue',\n rowId,\n payload: {\n columnId,\n row: cell.row.original,\n value,\n },\n });\n }\n // otherwise remove any previous change - no point saving the same value\n else if (cell.row.id in state.changes.rows) {\n dispatch({\n type: 'removeCellValue',\n rowId,\n payload: {\n columnId,\n rowIdentityAccessor,\n },\n });\n }\n }\n\n function getCellValue<T extends TType>(cell: ReactTableCell<T, unknown>): unknown | undefined {\n return state.changes.rows?.[cell.row.id]?.[cell.column.id];\n }\n\n function getCellError<T extends TType>(cell: ReactTableCell<T, unknown>): string | undefined {\n return state.changes.errors?.[cell.row.id]?.cells?.[cell.column.id];\n }\n\n async function onCellChanged<T extends TType>(cell: ReactTableCell<T, unknown>, rowIndex: number) {\n const changes = state.changes.rows[cell.row.id];\n\n if (!changes) {\n return;\n }\n\n let updatesForOtherCells: Partial<T> = {};\n\n // run the updater handler if there is one, to see if there are any other cells to update\n if (typeof handleChange === 'function') {\n const previousRowValue = {\n ...state.changes.originals[cell.row.id],\n //...getRowChangeset(updatersRef.current[cell.row.id], rowIdentityAccessor),\n };\n const nextRowValue = {\n ...state.changes.originals[cell.row.id],\n ...changes,\n };\n updatesForOtherCells = ((await handleChange(\n cell.column.id,\n changes[cell.column.id],\n nextRowValue,\n previousRowValue\n )) ?? {}) as Partial<T>;\n }\n\n // create a projection of the next state, so we can act against it\n const nextChanges = { ...state.changes.rows[cell.row.id], ...updatesForOtherCells };\n const nextMoveReasons: EditingRowMoveReason = { ...state.changes.moveReasons[cell.row.id] };\n const nextCellErrors: Record<string, string> = { ...state.changes.errors[cell.row.id]?.cells };\n\n // run validation\n let validationErrors: Record<string, string> = {};\n\n if (validator) {\n const nextRowValue = { ...state.changes.originals[cell.row.id], ...changes, ...updatesForOtherCells };\n validationErrors = ((await validator(nextRowValue)) ?? {}) as Record<string, string>;\n }\n\n // only set errors and move reasons for the cells we're currently acting on\n // why? because the UX is not good if we set them for cells the user hasn't touched yet\n const cellsToActOn = [cell.column.id, ...Object.keys(updatesForOtherCells)];\n const allCells = cell.row._getAllCellsByColumnId();\n\n cellsToActOn.forEach(accessor => {\n if (validationErrors[accessor]) {\n nextCellErrors[accessor] = validationErrors[accessor];\n // don't show move indicator for cells with errors, they aren't valid and can't be saved\n delete nextMoveReasons[accessor];\n } else {\n // there isn't any error in this run, remove any error set in state\n delete nextCellErrors[accessor];\n\n if (allCells[accessor]?.column.getIsSorted()) {\n // run row move determination\n const reason = willRowMove(cell, nextChanges[accessor], rowIndex, localization);\n\n // if the row will move based on this change save why, otherwise delete any existing state\n if (reason) {\n nextMoveReasons[accessor] = reason;\n } else {\n delete nextMoveReasons[accessor];\n }\n }\n }\n });\n\n dispatch({\n type: 'updateRow',\n rowId: cell.row.id,\n payload: {\n cellErrors: nextCellErrors,\n moveReasons: nextMoveReasons,\n value: nextChanges,\n },\n });\n }\n\n // general\n function getErrorsShownInAlert<T extends TType>() {\n const rowsWithErrors = Object.keys(state.changes.errors);\n\n if (!rowsWithErrors.length) {\n return [];\n }\n\n return rowsWithErrors.filter(hasRowErrorsShownInAlert).map(rowId => ({\n rowId,\n changes: state.changes.rows[rowId] as EditingChangeset<T>,\n errors: state.changes.errors[rowId],\n }));\n }\n\n function hasSaved() {\n return !!Object.values(state.changes.status).filter(value => value === 'saved').length;\n }\n\n function hasChanges(rowId?: string) {\n return rowId ? !!state.changes.rows[rowId] : !!Object.keys(state.changes.rows).length;\n }\n\n async function saveChanges<T extends TType>(table: ReactTable<T>, rowId: string | undefined = undefined): Promise<boolean> {\n if (!handleSave) {\n console.warn('Tried to save, but Table has no onEditingSave handler');\n return false;\n }\n\n // sometimes we only want to save one row\n const changes = rowId ? { [rowId]: state.changes.rows[rowId] } : state.changes.rows;\n\n let completed = true;\n\n for (const rowId of Object.keys(changes)) {\n const status = getRowStatus(rowId);\n\n try {\n // don't try to save if - already saving, or there are known errors\n if (status === 'saving' || status === 'errored') {\n continue;\n }\n\n setRowStatus(rowId, 'saving');\n\n const changeSet = { ...state.changes.originals[rowId], ...changes[rowId] };\n\n // if we had to create a temporary id, delete it first - it's our data, not theirs\n if (changeSet[rowIdentityAccessor as string]?.startsWith(TEMPORARY_ROW_ID_PREFIX)) {\n delete changeSet[rowIdentityAccessor];\n }\n\n // re-run validation, maybe a cell is already invalid but has never been blurred\n if (validator) {\n const errors = await validator(changeSet);\n\n if (errors && Object.keys(errors).length) {\n throw errors;\n }\n }\n\n // send new data to the server\n await handleSave(changeSet);\n\n // cleanup changes, we don't need them after saving\n discardChanges(rowId, table);\n\n // show the saved status, then remove it after a delay\n setRowStatus(rowId, 'saved');\n setTimeout(() => {\n setRowStatus(rowId, undefined);\n }, DELAY_BEFORE_REMOVING_SAVE_STATUS);\n } catch (error) {\n if (error instanceof ReferenceError || error instanceof TypeError || (error as any)?.response?.status >= 500) {\n console.error(error);\n }\n\n // the onEditingSave handler should throw errors when something fails, e.g. validation, network errors etc\n // this code handles those errors and maps them either to row errors or cell specific errors\n let rowError: string | undefined;\n let cellErrors;\n\n if (typeof error === 'string') {\n rowError = error;\n } else if (error instanceof Error) {\n rowError = error.message;\n\n // most of our apis return error objects within this shape\n if (typeof (error as any).response?.data === 'object') {\n cellErrors = (error as any).response?.data;\n }\n } else if (typeof error === 'object') {\n cellErrors = error;\n }\n\n if (rowError || cellErrors) {\n dispatch({\n type: 'setRowErrors',\n rowId,\n payload: {\n row: rowError,\n cells: cellErrors,\n shouldShowErrorAlert: true,\n },\n });\n }\n\n setRowStatus(rowId, 'errored');\n completed = false;\n }\n }\n\n return completed;\n }\n\n function discardChanges<T extends TType>(rowId: string, table: ReactTable<T>) {\n // remove any new rows from pinned state before discarding them\n table.resetRowPinning(true);\n\n dispatch({\n type: 'removeRow',\n rowId,\n payload: { rowIdentityAccessor },\n });\n }\n\n return {\n // row\n setRowValue,\n getRowValue,\n getRowMoveReason,\n hasRowErrors,\n hasRowErrorsShownInAlert,\n getRowStatus,\n setRowStatus,\n // cells\n setCellValue,\n getCellValue,\n getCellError,\n onCellChanged,\n // general\n getErrorsShownInAlert,\n hasChanges,\n saveChanges,\n discardChanges,\n hasSaved,\n // new rows\n createRow,\n temporaryRows: state.temporaryRows,\n };\n}\n"],"names":["TEMPORARY_ROW_ID_PREFIX","DELAY_BEFORE_REMOVING_SAVE_STATUS","reducer","state","action","type","rowId","payload","columnId","row","value","changes","rows","setWith","Object","originals","rowIdentityAccessor","omit","keys","length","errors","moveReasons","cellErrors","original","cells","status","undefined","temporaryRows","filter","concat","usePendingChangesState","handleSave","handleChange","validator","saveChanges","table","console","warn","Promise","resolve","completed","_temp9","_forOf","getRowStatus","_catch","_changeSet$rowIdentit","_temp8","_result","_exit","changeSet","then","discardChanges","setRowStatus","setTimeout","startsWith","_temp7","error","_error$response","ReferenceError","TypeError","response","rowError","Error","_error$response2","message","data","_error$response3","dispatch","shouldShowErrorAlert","_result3","e","reject","onCellChanged","cell","rowIndex","cellsToActOn","column","id","updatesForOtherCells","allCells","_getAllCellsByColumnId","forEach","accessor","validationErrors","nextCellErrors","nextMoveReasons","_allCells$accessor","getIsSorted","reason","willRowMove","nextChanges","localization","_state$changes$errors8","_temp3","nextRowValue","_validator2","_temp4","_temp5","previousRowValue","_handleChange","_temp6","createRow","newRowId","uuid","setRowValue","_temp","_validator","_temp2","useLocalization","React","useReducer","getRowValue","_state$changes$rows$r","_state$changes$rows","getRowMoveReason","_Object$values$","values","_state$changes$moveRe","_state$changes$moveRe2","hasRowErrors","_state$changes$errors","_state$changes$errors2","_state$changes$errors3","hasRowErrorsShownInAlert","_state$changes$errors4","setCellValue","getCellValue","_state$changes$rows2","_state$changes$rows2$","getCellError","_state$changes$errors5","_state$changes$errors6","_state$changes$errors7","getErrorsShownInAlert","rowsWithErrors","map","hasSaved","hasChanges","resetRowPinning"],"mappings":";;;;;;;;MASaA,uBAAuB,GAAG;AAEvC,MAAMC,iCAAiC,GAAG,IAAI;AAkC9C,SAASC,OAAOA,CAAkBC,KAA0B,EAAEC,MAA0B;EACpF,MAAM;IAAEC,IAAI;IAAEC,KAAK;IAAEC;GAAS,GAAGH,MAAM;EAEvC,QAAQC,IAAI;IACR,KAAK,cAAc;MAAE;QACjB,MAAM;UAAEG,QAAQ;UAAEC,GAAG;UAAEC;SAAO,GAAGH,OAAO;QACxC,OAAO;UACH,GAAGJ,KAAK;UACRQ,OAAO,EAAE;YACL,GAAGR,KAAK,CAACQ,OAAO;YAChBC,IAAI,EAAEC,OAAO,CAACV,KAAK,CAACQ,OAAO,CAACC,IAAI,EAAE,GAAGN,KAAK,IAAIE,QAAQ,EAAE,EAAEE,KAAK,EAAEI,MAAM,CAAC;YACxEC,SAAS,EAAEF,OAAO,CAACV,KAAK,CAACQ,OAAO,CAACI,SAAS,EAAET,KAAK,EAAEG,GAAG,EAAEK,MAAM;;SAErE;;IAGL,KAAK,iBAAiB;MAAE;QACpB,MAAM;UAAEN,QAAQ;UAAEQ;SAAqB,GAAGT,OAAO;QACjD,MAAMI,OAAO,GAAGM,IAAI,CAACd,KAAK,CAACQ,OAAO,CAACC,IAAI,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