@oneblink/apps-react 8.14.0 → 9.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. package/dist/OneBlinkAutoSaveForm.d.ts +1 -1
  2. package/dist/OneBlinkAutoSaveForm.js +6 -8
  3. package/dist/OneBlinkAutoSaveForm.js.map +1 -1
  4. package/dist/OneBlinkForm.js +3 -2
  5. package/dist/OneBlinkForm.js.map +1 -1
  6. package/dist/OneBlinkFormBase.d.ts +1 -1
  7. package/dist/OneBlinkFormBase.js +49 -146
  8. package/dist/OneBlinkFormBase.js.map +1 -1
  9. package/dist/OneBlinkReadOnlyForm.d.ts +1 -1
  10. package/dist/OneBlinkReadOnlyForm.js +2 -1
  11. package/dist/OneBlinkReadOnlyForm.js.map +1 -1
  12. package/dist/PaymentReceipt.d.ts +1 -1
  13. package/dist/PaymentReceipt.js +9 -30
  14. package/dist/PaymentReceipt.js.map +1 -1
  15. package/dist/components/ArcGISWebMap.d.ts +3 -3
  16. package/dist/components/ArcGISWebMap.js +25 -38
  17. package/dist/components/ArcGISWebMap.js.map +1 -1
  18. package/dist/components/Clickable.d.ts +1 -1
  19. package/dist/components/Clickable.js +2 -1
  20. package/dist/components/Clickable.js.map +1 -1
  21. package/dist/components/ConfirmDialog.d.ts +2 -2
  22. package/dist/components/ConfirmDialog.js +7 -14
  23. package/dist/components/ConfirmDialog.js.map +1 -1
  24. package/dist/components/CopyToClipboardIconButton.d.ts +1 -1
  25. package/dist/components/CopyToClipboardIconButton.js +10 -14
  26. package/dist/components/CopyToClipboardIconButton.js.map +1 -1
  27. package/dist/components/CustomAccordion.d.ts +3 -20
  28. package/dist/components/ErrorSnackbar.d.ts +1 -1
  29. package/dist/components/ErrorSnackbar.js +6 -7
  30. package/dist/components/ErrorSnackbar.js.map +1 -1
  31. package/dist/components/ImageCropper/CropModal.d.ts +1 -1
  32. package/dist/components/ImageCropper/CropModal.js +2 -8
  33. package/dist/components/ImageCropper/CropModal.js.map +1 -1
  34. package/dist/components/ImageCropper/index.d.ts +1 -1
  35. package/dist/components/ImageCropper/index.js +3 -5
  36. package/dist/components/ImageCropper/index.js.map +1 -1
  37. package/dist/components/InputClear.js +2 -3
  38. package/dist/components/InputClear.js.map +1 -1
  39. package/dist/components/InputField.d.ts +3 -2
  40. package/dist/components/InputField.js +5 -2
  41. package/dist/components/InputField.js.map +1 -1
  42. package/dist/components/Lists.d.ts +1 -6
  43. package/dist/components/Lists.js +2 -2
  44. package/dist/components/Lists.js.map +1 -1
  45. package/dist/components/LoadingWithMessage.js +2 -6
  46. package/dist/components/LoadingWithMessage.js.map +1 -1
  47. package/dist/components/MaterialIcon.d.ts +2 -4
  48. package/dist/components/MaterialIcon.js +4 -4
  49. package/dist/components/MaterialIcon.js.map +1 -1
  50. package/dist/components/NotificationGrid.d.ts +2 -2
  51. package/dist/components/NotificationGrid.js +4 -7
  52. package/dist/components/NotificationGrid.js.map +1 -1
  53. package/dist/components/QuillHTML.d.ts +1 -1
  54. package/dist/components/QuillHTML.js +2 -1
  55. package/dist/components/QuillHTML.js.map +1 -1
  56. package/dist/components/SuccessSnackbar.d.ts +1 -1
  57. package/dist/components/SuccessSnackbar.js +3 -6
  58. package/dist/components/SuccessSnackbar.js.map +1 -1
  59. package/dist/components/ValidationErrorsCard.d.ts +2 -2
  60. package/dist/components/ValidationErrorsCard.js +32 -49
  61. package/dist/components/ValidationErrorsCard.js.map +1 -1
  62. package/dist/components/calendar-bookings/CalendarBookingsCancelForm.d.ts +1 -1
  63. package/dist/components/calendar-bookings/CalendarBookingsCancelForm.js +5 -6
  64. package/dist/components/calendar-bookings/CalendarBookingsCancelForm.js.map +1 -1
  65. package/dist/components/calendar-bookings/CalendarBookingsContainer.d.ts +1 -1
  66. package/dist/components/calendar-bookings/CalendarBookingsContainer.js +9 -11
  67. package/dist/components/calendar-bookings/CalendarBookingsContainer.js.map +1 -1
  68. package/dist/components/calendar-bookings/CalendarBookingsForm.d.ts +1 -1
  69. package/dist/components/calendar-bookings/CalendarBookingsForm.js +33 -45
  70. package/dist/components/calendar-bookings/CalendarBookingsForm.js.map +1 -1
  71. package/dist/components/calendar-bookings/CalendarBookingsProvider.d.ts +1 -1
  72. package/dist/components/calendar-bookings/CalendarBookingsProvider.js +2 -6
  73. package/dist/components/calendar-bookings/CalendarBookingsProvider.js.map +1 -1
  74. package/dist/components/calendar-bookings/CalendarBookingsReschedulingForm.d.ts +1 -1
  75. package/dist/components/calendar-bookings/CalendarBookingsReschedulingForm.js +5 -6
  76. package/dist/components/calendar-bookings/CalendarBookingsReschedulingForm.js.map +1 -1
  77. package/dist/components/calendar-bookings/ErrorModal.js +7 -11
  78. package/dist/components/calendar-bookings/ErrorModal.js.map +1 -1
  79. package/dist/components/downloadable-files/LayoutProvider.d.ts +1 -1
  80. package/dist/components/downloadable-files/LayoutProvider.js +2 -1
  81. package/dist/components/downloadable-files/LayoutProvider.js.map +1 -1
  82. package/dist/components/downloadable-files/index.d.ts +1 -1
  83. package/dist/components/downloadable-files/index.js +3 -5
  84. package/dist/components/downloadable-files/index.js.map +1 -1
  85. package/dist/components/downloadable-files/resource-components.d.ts +3 -3
  86. package/dist/components/downloadable-files/resource-components.js +9 -32
  87. package/dist/components/downloadable-files/resource-components.js.map +1 -1
  88. package/dist/components/formStore/FormStoreTableProvider.d.ts +1 -1
  89. package/dist/components/formStore/FormStoreTableProvider.js +5 -15
  90. package/dist/components/formStore/FormStoreTableProvider.js.map +1 -1
  91. package/dist/components/formStore/OneBlinkFormStoreClearFiltersButton.d.ts +1 -1
  92. package/dist/components/formStore/OneBlinkFormStoreClearFiltersButton.js +3 -2
  93. package/dist/components/formStore/OneBlinkFormStoreClearFiltersButton.js.map +1 -1
  94. package/dist/components/formStore/OneBlinkFormStoreColumnsButton.d.ts +1 -1
  95. package/dist/components/formStore/OneBlinkFormStoreColumnsButton.js +21 -54
  96. package/dist/components/formStore/OneBlinkFormStoreColumnsButton.js.map +1 -1
  97. package/dist/components/formStore/OneBlinkFormStoreDownloadButton.d.ts +2 -2
  98. package/dist/components/formStore/OneBlinkFormStoreDownloadButton.js +7 -26
  99. package/dist/components/formStore/OneBlinkFormStoreDownloadButton.js.map +1 -1
  100. package/dist/components/formStore/OneBlinkFormStoreProvider.d.ts +1 -1
  101. package/dist/components/formStore/OneBlinkFormStoreProvider.js +4 -5
  102. package/dist/components/formStore/OneBlinkFormStoreProvider.js.map +1 -1
  103. package/dist/components/formStore/OneBlinkFormStoreRefreshButton.d.ts +1 -1
  104. package/dist/components/formStore/OneBlinkFormStoreRefreshButton.js +3 -2
  105. package/dist/components/formStore/OneBlinkFormStoreRefreshButton.js.map +1 -1
  106. package/dist/components/formStore/OneBlinkFormStoreTable.d.ts +1 -1
  107. package/dist/components/formStore/OneBlinkFormStoreTable.js +128 -94
  108. package/dist/components/formStore/OneBlinkFormStoreTable.js.map +1 -1
  109. package/dist/components/formStore/display/ElementDisplay.d.ts +3 -4
  110. package/dist/components/formStore/display/ElementDisplay.js +9 -12
  111. package/dist/components/formStore/display/ElementDisplay.js.map +1 -1
  112. package/dist/components/formStore/display/FormStoreIcon.d.ts +1 -1
  113. package/dist/components/formStore/display/FormStoreIcon.js +2 -2
  114. package/dist/components/formStore/display/FormStoreIcon.js.map +1 -1
  115. package/dist/components/formStore/table/ActionedByTableCell.d.ts +1 -1
  116. package/dist/components/formStore/table/ActionedByTableCell.js +6 -7
  117. package/dist/components/formStore/table/ActionedByTableCell.js.map +1 -1
  118. package/dist/components/formStore/table/ColumnFilters.d.ts +3 -3
  119. package/dist/components/formStore/table/ColumnFilters.js +84 -100
  120. package/dist/components/formStore/table/ColumnFilters.js.map +1 -1
  121. package/dist/components/formStore/table/FormElementTableCell.d.ts +1 -1
  122. package/dist/components/formStore/table/FormElementTableCell.js +34 -97
  123. package/dist/components/formStore/table/FormElementTableCell.js.map +1 -1
  124. package/dist/components/formStore/table/HeaderCellMoreButton.d.ts +4 -4
  125. package/dist/components/formStore/table/HeaderCellMoreButton.js +26 -32
  126. package/dist/components/formStore/table/HeaderCellMoreButton.js.map +1 -1
  127. package/dist/components/formStore/table/Pickers.d.ts +4 -4
  128. package/dist/components/formStore/table/Pickers.js +14 -13
  129. package/dist/components/formStore/table/Pickers.js.map +1 -1
  130. package/dist/components/formStore/table/RepeatableSetCell.js +16 -21
  131. package/dist/components/formStore/table/RepeatableSetCell.js.map +1 -1
  132. package/dist/components/formStore/table/RepeatableSetCellAccordion.js +2 -4
  133. package/dist/components/formStore/table/RepeatableSetCellAccordion.js.map +1 -1
  134. package/dist/components/formStore/table/TableCellCopyButton.d.ts +1 -1
  135. package/dist/components/formStore/table/TableCellCopyButton.js +2 -3
  136. package/dist/components/formStore/table/TableCellCopyButton.js.map +1 -1
  137. package/dist/components/formStore/table/generateColumns.d.ts +5 -6
  138. package/dist/components/formStore/table/generateColumns.js +23 -18
  139. package/dist/components/formStore/table/generateColumns.js.map +1 -1
  140. package/dist/components/formStore/table/getVersionedState.d.ts +4 -3
  141. package/dist/components/formStore/table/getVersionedState.js +23 -6
  142. package/dist/components/formStore/table/getVersionedState.js.map +1 -1
  143. package/dist/components/formStore/table/useFormStoreTable.d.ts +146 -37
  144. package/dist/components/formStore/table/useFormStoreTable.js +266 -199
  145. package/dist/components/formStore/table/useFormStoreTable.js.map +1 -1
  146. package/dist/components/formStore/useFormStoreTableContext.d.ts +142 -33
  147. package/dist/components/messages/ErrorMessage.js +3 -3
  148. package/dist/components/messages/ErrorMessage.js.map +1 -1
  149. package/dist/components/messages/LargeIconMessage.js +2 -6
  150. package/dist/components/messages/LargeIconMessage.js.map +1 -1
  151. package/dist/components/messages/NoResourcesYet.d.ts +1 -1
  152. package/dist/components/messages/NoResourcesYet.js +2 -1
  153. package/dist/components/messages/NoResourcesYet.js.map +1 -1
  154. package/dist/components/mfa/MfaDialog.d.ts +1 -1
  155. package/dist/components/mfa/MfaDialog.js +9 -48
  156. package/dist/components/mfa/MfaDialog.js.map +1 -1
  157. package/dist/components/mfa/MultiFactorAuthentication.d.ts +2 -5
  158. package/dist/components/mfa/MultiFactorAuthentication.js +14 -45
  159. package/dist/components/mfa/MultiFactorAuthentication.js.map +1 -1
  160. package/dist/components/payments/PaymentForm.d.ts +1 -1
  161. package/dist/components/payments/PaymentForm.js +4 -9
  162. package/dist/components/payments/PaymentForm.js.map +1 -1
  163. package/dist/components/payments/WestpacQuickStreamPaymentForm.d.ts +1 -1
  164. package/dist/components/payments/WestpacQuickStreamPaymentForm.js +11 -45
  165. package/dist/components/payments/WestpacQuickStreamPaymentForm.js.map +1 -1
  166. package/dist/components/receipts/Receipt.d.ts +1 -1
  167. package/dist/components/receipts/Receipt.js +2 -2
  168. package/dist/components/receipts/Receipt.js.map +1 -1
  169. package/dist/components/receipts/ReceiptButton.d.ts +1 -1
  170. package/dist/components/receipts/ReceiptButton.js +3 -2
  171. package/dist/components/receipts/ReceiptButton.js.map +1 -1
  172. package/dist/components/receipts/ReceiptList.d.ts +1 -1
  173. package/dist/components/receipts/ReceiptList.js +2 -9
  174. package/dist/components/receipts/ReceiptList.js.map +1 -1
  175. package/dist/components/receipts/ReceiptListItem.d.ts +1 -1
  176. package/dist/components/receipts/ReceiptListItem.js +2 -11
  177. package/dist/components/receipts/ReceiptListItem.js.map +1 -1
  178. package/dist/components/renderer/AnnotationModal.d.ts +1 -1
  179. package/dist/components/renderer/AnnotationModal.js +6 -14
  180. package/dist/components/renderer/AnnotationModal.js.map +1 -1
  181. package/dist/components/renderer/AutocompleteDropdown.d.ts +1 -1
  182. package/dist/components/renderer/AutocompleteDropdown.js +15 -34
  183. package/dist/components/renderer/AutocompleteDropdown.js.map +1 -1
  184. package/dist/components/renderer/CopyToClipboardButton.d.ts +1 -1
  185. package/dist/components/renderer/CopyToClipboardButton.js +2 -4
  186. package/dist/components/renderer/CopyToClipboardButton.js.map +1 -1
  187. package/dist/components/renderer/CustomisableButtonInner.js +2 -4
  188. package/dist/components/renderer/CustomisableButtonInner.js.map +1 -1
  189. package/dist/components/renderer/FormElementLabelContainer.d.ts +3 -3
  190. package/dist/components/renderer/FormElementLabelContainer.js +7 -14
  191. package/dist/components/renderer/FormElementLabelContainer.js.map +1 -1
  192. package/dist/components/renderer/FormElementOptions.d.ts +1 -1
  193. package/dist/components/renderer/FormElementOptions.js +4 -5
  194. package/dist/components/renderer/FormElementOptions.js.map +1 -1
  195. package/dist/components/renderer/FormElementValidationMessage.js +3 -5
  196. package/dist/components/renderer/FormElementValidationMessage.js.map +1 -1
  197. package/dist/components/renderer/LookupButton.d.ts +1 -1
  198. package/dist/components/renderer/LookupButton.js +4 -8
  199. package/dist/components/renderer/LookupButton.js.map +1 -1
  200. package/dist/components/renderer/LookupNotification.d.ts +1 -1
  201. package/dist/components/renderer/LookupNotification.js +14 -36
  202. package/dist/components/renderer/LookupNotification.js.map +1 -1
  203. package/dist/components/renderer/Modal.d.ts +3 -3
  204. package/dist/components/renderer/Modal.js +5 -10
  205. package/dist/components/renderer/Modal.js.map +1 -1
  206. package/dist/components/renderer/OnLoading.d.ts +1 -1
  207. package/dist/components/renderer/OnLoading.js +3 -3
  208. package/dist/components/renderer/OnLoading.js.map +1 -1
  209. package/dist/components/renderer/OneBlinkAppsErrorOriginalMessage.d.ts +1 -1
  210. package/dist/components/renderer/OneBlinkAppsErrorOriginalMessage.js +2 -4
  211. package/dist/components/renderer/OneBlinkAppsErrorOriginalMessage.js.map +1 -1
  212. package/dist/components/renderer/OneBlinkFormElements.d.ts +1 -1
  213. package/dist/components/renderer/OneBlinkFormElements.js +61 -90
  214. package/dist/components/renderer/OneBlinkFormElements.js.map +1 -1
  215. package/dist/components/renderer/PageFormElements.d.ts +1 -1
  216. package/dist/components/renderer/PageFormElements.js +3 -5
  217. package/dist/components/renderer/PageFormElements.js.map +1 -1
  218. package/dist/components/renderer/ProgressBar.d.ts +1 -1
  219. package/dist/components/renderer/ProgressBar.js +2 -1
  220. package/dist/components/renderer/ProgressBar.js.map +1 -1
  221. package/dist/components/renderer/ReverseGeocode.d.ts +1 -1
  222. package/dist/components/renderer/ReverseGeocode.js +2 -1
  223. package/dist/components/renderer/ReverseGeocode.js.map +1 -1
  224. package/dist/components/renderer/ToggleAllCheckbox.js +4 -5
  225. package/dist/components/renderer/ToggleAllCheckbox.js.map +1 -1
  226. package/dist/components/renderer/Tooltip.d.ts +1 -1
  227. package/dist/components/renderer/Tooltip.js +3 -1
  228. package/dist/components/renderer/Tooltip.js.map +1 -1
  229. package/dist/components/renderer/attachments/AttachmentStatus.d.ts +1 -1
  230. package/dist/components/renderer/attachments/AttachmentStatus.js +6 -15
  231. package/dist/components/renderer/attachments/AttachmentStatus.js.map +1 -1
  232. package/dist/components/renderer/attachments/DropdownMenu.js +30 -42
  233. package/dist/components/renderer/attachments/DropdownMenu.js.map +1 -1
  234. package/dist/components/renderer/attachments/FileCard.d.ts +1 -1
  235. package/dist/components/renderer/attachments/FileCard.js +2 -10
  236. package/dist/components/renderer/attachments/FileCard.js.map +1 -1
  237. package/dist/components/renderer/attachments/FileCardContent.d.ts +1 -1
  238. package/dist/components/renderer/attachments/FileCardContent.js +3 -4
  239. package/dist/components/renderer/attachments/FileCardContent.js.map +1 -1
  240. package/dist/components/renderer/attachments/ImagePreviewUnavailable.d.ts +1 -1
  241. package/dist/components/renderer/attachments/ImagePreviewUnavailable.js +2 -5
  242. package/dist/components/renderer/attachments/ImagePreviewUnavailable.js.map +1 -1
  243. package/dist/components/renderer/attachments/ProgressBar.js +2 -4
  244. package/dist/components/renderer/attachments/ProgressBar.js.map +1 -1
  245. package/dist/form-elements/ComplianceButton.js +3 -4
  246. package/dist/form-elements/ComplianceButton.js.map +1 -1
  247. package/dist/form-elements/FormElementABN.d.ts +1 -1
  248. package/dist/form-elements/FormElementABN.js +18 -28
  249. package/dist/form-elements/FormElementABN.js.map +1 -1
  250. package/dist/form-elements/FormElementAPINSWLiquorLicence.d.ts +2 -2
  251. package/dist/form-elements/FormElementAPINSWLiquorLicence.js +3 -21
  252. package/dist/form-elements/FormElementAPINSWLiquorLicence.js.map +1 -1
  253. package/dist/form-elements/FormElementArcGISWebMap.d.ts +1 -1
  254. package/dist/form-elements/FormElementArcGISWebMap.js +21 -36
  255. package/dist/form-elements/FormElementArcGISWebMap.js.map +1 -1
  256. package/dist/form-elements/FormElementAutocomplete.d.ts +1 -1
  257. package/dist/form-elements/FormElementAutocomplete.js +5 -9
  258. package/dist/form-elements/FormElementAutocomplete.js.map +1 -1
  259. package/dist/form-elements/FormElementBSB.d.ts +1 -1
  260. package/dist/form-elements/FormElementBSB.js +17 -30
  261. package/dist/form-elements/FormElementBSB.js.map +1 -1
  262. package/dist/form-elements/FormElementBarcodeScanner.d.ts +1 -1
  263. package/dist/form-elements/FormElementBarcodeScanner.js +16 -50
  264. package/dist/form-elements/FormElementBarcodeScanner.js.map +1 -1
  265. package/dist/form-elements/FormElementBoolean.d.ts +1 -1
  266. package/dist/form-elements/FormElementBoolean.js +4 -4
  267. package/dist/form-elements/FormElementBoolean.js.map +1 -1
  268. package/dist/form-elements/FormElementCalculation.d.ts +1 -1
  269. package/dist/form-elements/FormElementCalculation.js +2 -9
  270. package/dist/form-elements/FormElementCalculation.js.map +1 -1
  271. package/dist/form-elements/FormElementCamera.d.ts +1 -1
  272. package/dist/form-elements/FormElementCamera.js +7 -53
  273. package/dist/form-elements/FormElementCamera.js.map +1 -1
  274. package/dist/form-elements/FormElementCaptcha.d.ts +1 -1
  275. package/dist/form-elements/FormElementCaptcha.js +2 -4
  276. package/dist/form-elements/FormElementCaptcha.js.map +1 -1
  277. package/dist/form-elements/FormElementCheckBoxes.d.ts +1 -1
  278. package/dist/form-elements/FormElementCheckBoxes.js +23 -33
  279. package/dist/form-elements/FormElementCheckBoxes.js.map +1 -1
  280. package/dist/form-elements/FormElementCivicaNameRecord.d.ts +1 -1
  281. package/dist/form-elements/FormElementCivicaNameRecord.js +2 -1
  282. package/dist/form-elements/FormElementCivicaNameRecord.js.map +1 -1
  283. package/dist/form-elements/FormElementCivicaStreetName.d.ts +1 -1
  284. package/dist/form-elements/FormElementCivicaStreetName.js +2 -4
  285. package/dist/form-elements/FormElementCivicaStreetName.js.map +1 -1
  286. package/dist/form-elements/FormElementCompliance.d.ts +1 -1
  287. package/dist/form-elements/FormElementCompliance.js +13 -25
  288. package/dist/form-elements/FormElementCompliance.js.map +1 -1
  289. package/dist/form-elements/FormElementDate.d.ts +1 -1
  290. package/dist/form-elements/FormElementDate.js +2 -9
  291. package/dist/form-elements/FormElementDate.js.map +1 -1
  292. package/dist/form-elements/FormElementDateTime.d.ts +1 -1
  293. package/dist/form-elements/FormElementDateTime.js +2 -9
  294. package/dist/form-elements/FormElementDateTime.js.map +1 -1
  295. package/dist/form-elements/FormElementEmail.d.ts +1 -1
  296. package/dist/form-elements/FormElementEmail.js +4 -13
  297. package/dist/form-elements/FormElementEmail.js.map +1 -1
  298. package/dist/form-elements/FormElementFile.js +2 -12
  299. package/dist/form-elements/FormElementFile.js.map +1 -1
  300. package/dist/form-elements/FormElementFiles.d.ts +1 -1
  301. package/dist/form-elements/FormElementFiles.js +9 -17
  302. package/dist/form-elements/FormElementFiles.js.map +1 -1
  303. package/dist/form-elements/FormElementForm.d.ts +1 -1
  304. package/dist/form-elements/FormElementForm.js +2 -1
  305. package/dist/form-elements/FormElementForm.js.map +1 -1
  306. package/dist/form-elements/FormElementFreshdeskDependentField.d.ts +1 -1
  307. package/dist/form-elements/FormElementFreshdeskDependentField.js +2 -1
  308. package/dist/form-elements/FormElementFreshdeskDependentField.js.map +1 -1
  309. package/dist/form-elements/FormElementGeoscapeAddress.d.ts +1 -1
  310. package/dist/form-elements/FormElementGeoscapeAddress.js +2 -4
  311. package/dist/form-elements/FormElementGeoscapeAddress.js.map +1 -1
  312. package/dist/form-elements/FormElementGoogleAddress.d.ts +1 -1
  313. package/dist/form-elements/FormElementGoogleAddress.js +2 -7
  314. package/dist/form-elements/FormElementGoogleAddress.js.map +1 -1
  315. package/dist/form-elements/FormElementHTML.d.ts +1 -1
  316. package/dist/form-elements/FormElementHTML.js +2 -3
  317. package/dist/form-elements/FormElementHTML.js.map +1 -1
  318. package/dist/form-elements/FormElementHeading.d.ts +1 -1
  319. package/dist/form-elements/FormElementHeading.js +7 -8
  320. package/dist/form-elements/FormElementHeading.js.map +1 -1
  321. package/dist/form-elements/FormElementImage.d.ts +1 -1
  322. package/dist/form-elements/FormElementImage.js +3 -3
  323. package/dist/form-elements/FormElementImage.js.map +1 -1
  324. package/dist/form-elements/FormElementLocation.d.ts +1 -1
  325. package/dist/form-elements/FormElementLocation.js +16 -47
  326. package/dist/form-elements/FormElementLocation.js.map +1 -1
  327. package/dist/form-elements/FormElementLookupButton.d.ts +2 -3
  328. package/dist/form-elements/FormElementLookupButton.js +4 -7
  329. package/dist/form-elements/FormElementLookupButton.js.map +1 -1
  330. package/dist/form-elements/FormElementNumber.d.ts +1 -1
  331. package/dist/form-elements/FormElementNumber.js +3 -14
  332. package/dist/form-elements/FormElementNumber.js.map +1 -1
  333. package/dist/form-elements/FormElementPointAddress.d.ts +2 -2
  334. package/dist/form-elements/FormElementPointAddress.js +6 -13
  335. package/dist/form-elements/FormElementPointAddress.js.map +1 -1
  336. package/dist/form-elements/FormElementPointAddressV3.d.ts +1 -1
  337. package/dist/form-elements/FormElementPointAddressV3.js +2 -9
  338. package/dist/form-elements/FormElementPointAddressV3.js.map +1 -1
  339. package/dist/form-elements/FormElementPointCadastralParcel.d.ts +1 -1
  340. package/dist/form-elements/FormElementPointCadastralParcel.js +14 -26
  341. package/dist/form-elements/FormElementPointCadastralParcel.js.map +1 -1
  342. package/dist/form-elements/FormElementRadio.d.ts +1 -1
  343. package/dist/form-elements/FormElementRadio.js +24 -30
  344. package/dist/form-elements/FormElementRadio.js.map +1 -1
  345. package/dist/form-elements/FormElementRepeatableSet.d.ts +1 -1
  346. package/dist/form-elements/FormElementRepeatableSet.js +21 -39
  347. package/dist/form-elements/FormElementRepeatableSet.js.map +1 -1
  348. package/dist/form-elements/FormElementSection.d.ts +1 -1
  349. package/dist/form-elements/FormElementSection.js +16 -34
  350. package/dist/form-elements/FormElementSection.js.map +1 -1
  351. package/dist/form-elements/FormElementSelect.d.ts +1 -1
  352. package/dist/form-elements/FormElementSelect.js +12 -23
  353. package/dist/form-elements/FormElementSelect.js.map +1 -1
  354. package/dist/form-elements/FormElementSignature.d.ts +1 -1
  355. package/dist/form-elements/FormElementSignature.js +21 -46
  356. package/dist/form-elements/FormElementSignature.js.map +1 -1
  357. package/dist/form-elements/FormElementSummary.d.ts +1 -1
  358. package/dist/form-elements/FormElementSummary.js +5 -4
  359. package/dist/form-elements/FormElementSummary.js.map +1 -1
  360. package/dist/form-elements/FormElementTelephone.d.ts +1 -1
  361. package/dist/form-elements/FormElementTelephone.js +4 -13
  362. package/dist/form-elements/FormElementTelephone.js.map +1 -1
  363. package/dist/form-elements/FormElementText.d.ts +1 -1
  364. package/dist/form-elements/FormElementText.js +6 -21
  365. package/dist/form-elements/FormElementText.js.map +1 -1
  366. package/dist/form-elements/FormElementTextarea.d.ts +1 -1
  367. package/dist/form-elements/FormElementTextarea.js +6 -20
  368. package/dist/form-elements/FormElementTextarea.js.map +1 -1
  369. package/dist/form-elements/FormElementTime.d.ts +1 -1
  370. package/dist/form-elements/FormElementTime.js +2 -9
  371. package/dist/form-elements/FormElementTime.js.map +1 -1
  372. package/dist/form-elements/OptionButton.js +3 -5
  373. package/dist/form-elements/OptionButton.js.map +1 -1
  374. package/dist/hooks/attachments/useAttachmentBlobs.d.ts +1 -1
  375. package/dist/hooks/attachments/useAttachmentBlobs.js +2 -1
  376. package/dist/hooks/attachments/useAttachmentBlobs.js.map +1 -1
  377. package/dist/hooks/form-date-picker/useFormDatePickerProps.d.ts +7 -8
  378. package/dist/hooks/form-date-picker/useFormDatePickerProps.js +8 -10
  379. package/dist/hooks/form-date-picker/useFormDatePickerProps.js.map +1 -1
  380. package/dist/hooks/useAuth.d.ts +1 -1
  381. package/dist/hooks/useAuth.js +2 -1
  382. package/dist/hooks/useAuth.js.map +1 -1
  383. package/dist/hooks/useDrafts.d.ts +1 -1
  384. package/dist/hooks/useDrafts.js +2 -1
  385. package/dist/hooks/useDrafts.js.map +1 -1
  386. package/dist/hooks/useDynamicOptionsLoaderState.d.ts +1 -1
  387. package/dist/hooks/useDynamicOptionsLoaderState.js +4 -13
  388. package/dist/hooks/useDynamicOptionsLoaderState.js.map +1 -1
  389. package/dist/hooks/useFormElementLookups.d.ts +1 -1
  390. package/dist/hooks/useFormElementLookups.js +2 -1
  391. package/dist/hooks/useFormElementLookups.js.map +1 -1
  392. package/dist/hooks/useFormSubmissionModelContext.d.ts +1 -1
  393. package/dist/hooks/useFormSubmissionModelContext.js +2 -1
  394. package/dist/hooks/useFormSubmissionModelContext.js.map +1 -1
  395. package/dist/hooks/useFormSubmissionState.d.ts +1 -1
  396. package/dist/hooks/useFormSubmissionState.js +1 -1
  397. package/dist/hooks/useFormSubmissionState.js.map +1 -1
  398. package/dist/hooks/useIsHovering.d.ts +1 -1
  399. package/dist/hooks/useIsHovering.js +4 -4
  400. package/dist/hooks/useIsHovering.js.map +1 -1
  401. package/dist/hooks/useIsOffline.d.ts +1 -1
  402. package/dist/hooks/useIsOffline.js +2 -1
  403. package/dist/hooks/useIsOffline.js.map +1 -1
  404. package/dist/hooks/useIsPageVisible.d.ts +1 -1
  405. package/dist/hooks/useIsPageVisible.js +2 -1
  406. package/dist/hooks/useIsPageVisible.js.map +1 -1
  407. package/dist/hooks/useMfa.d.ts +1 -1
  408. package/dist/hooks/useMfa.js +2 -1
  409. package/dist/hooks/useMfa.js.map +1 -1
  410. package/dist/hooks/usePages.d.ts +1 -1
  411. package/dist/hooks/usePendingSubmissions.d.ts +1 -1
  412. package/dist/hooks/usePendingSubmissions.js +2 -1
  413. package/dist/hooks/usePendingSubmissions.js.map +1 -1
  414. package/dist/hooks/useReCAPTCHAProps.d.ts +1 -1
  415. package/dist/hooks/useReCAPTCHAProps.js.map +1 -1
  416. package/package.json +21 -25
@@ -1,6 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
2
  import * as React from 'react';
2
3
  import clsx from 'clsx';
3
4
  import { styled, Tooltip } from '@mui/material';
5
+ import { flexRender } from '@tanstack/react-table';
4
6
  import { IsHoveringProvider } from '../../hooks/useIsHovering';
5
7
  import HeaderCellMoreButton from './table/HeaderCellMoreButton';
6
8
  import useFormStoreTableContext from './useFormStoreTableContext';
@@ -90,106 +92,138 @@ const Table = styled('div')(({ theme }) => ({
90
92
  },
91
93
  },
92
94
  }));
95
+ const HeaderRow = styled('div')(() => ({
96
+ display: 'flex',
97
+ }));
98
+ const CellRow = styled('div')(() => ({
99
+ display: 'flex',
100
+ }));
93
101
  function OneBlinkFormStoreTable() {
94
- const { getTableProps, getTableBodyProps, headerGroups: [parentHeaderGroup], rows, prepareRow, onChangeParameters, } = useFormStoreTableContext();
102
+ const { getHeaderGroups, getCoreRowModel, getFlatHeaders, getState, onChangeParameters, } = useFormStoreTableContext();
103
+ const [parentHeaderGroup] = getHeaderGroups();
104
+ const rows = getCoreRowModel().rows;
105
+ const columnSizingInfo = getState().columnSizingInfo;
106
+ const columnSizing = getState().columnSizing;
107
+ /**
108
+ * Pinched from
109
+ * https://tanstack.com/table/latest/docs/framework/react/examples/column-resizing-performant
110
+ * Instead of calling `column.getSize()` on every render for every header and
111
+ * especially every data cell (very expensive), we will calculate all column
112
+ * sizes at once at the root table level in a useMemo and pass the column
113
+ * sizes down as CSS variables to the <table> element.
114
+ */
115
+ const columnSizeVars = React.useMemo(() => {
116
+ // we want the memo to recalculate if these change, dropping them here so the linter doesn't complain about unused dependencies
117
+ /* eslint-disable @typescript-eslint/no-unused-expressions */
118
+ columnSizingInfo;
119
+ columnSizing;
120
+ /* eslint-enable @typescript-eslint/no-unused-expressions */
121
+ const headers = getFlatHeaders();
122
+ const colSizes = {};
123
+ for (let i = 0; i < headers.length; i++) {
124
+ const header = headers[i];
125
+ colSizes[`--header-${header.id}-size`] = header.getSize();
126
+ colSizes[`--col-${header.column.id}-size`] = header.column.getSize();
127
+ }
128
+ return colSizes;
129
+ }, [getFlatHeaders, columnSizingInfo, columnSizing]);
95
130
  if (!parentHeaderGroup) {
96
131
  return null;
97
132
  }
98
133
  let alternateBackground = false;
99
- return (React.createElement(React.Fragment, null,
100
- React.createElement(Table, { ...getTableProps(), className: "ob-form-store-table" },
101
- React.createElement("div", { className: "thead" },
102
- React.createElement("div", { ...parentHeaderGroup.getHeaderGroupProps(), className: "tr ob-form-store-table-header-row" },
103
- // Loop over the headers in each row
104
- parentHeaderGroup.headers.map((headerGroup) => {
105
- var _a, _b, _c, _d, _e;
106
- const sortingProperty = (_a = headerGroup.sorting) === null || _a === void 0 ? void 0 : _a.property;
107
- const sortingDirection = (_b = headerGroup.sorting) === null || _b === void 0 ? void 0 : _b.direction;
108
- return (React.createElement(Tooltip, { title: headerGroup.tooltip || '', arrow: true, key: headerGroup.id, PopperProps: {
109
- sx: {
110
- zIndex: 'drawer',
111
- },
112
- } },
113
- React.createElement("div", { className: clsx('th tc ob-form-store-table-header-cell', {
114
- 'is-clickable': !!sortingProperty,
115
- }), onClick: sortingProperty
116
- ? () => {
117
- onChangeParameters((currentParameters) => {
118
- switch (sortingDirection) {
119
- case 'ascending': {
120
- return {
121
- ...currentParameters,
122
- sorting: [
123
- {
124
- property: sortingProperty,
125
- direction: 'descending',
126
- },
127
- ],
128
- };
129
- }
130
- case 'descending': {
131
- return {
132
- ...currentParameters,
133
- sorting: undefined,
134
- };
135
- }
136
- default: {
137
- return {
138
- ...currentParameters,
139
- sorting: [
140
- {
141
- property: sortingProperty,
142
- direction: 'ascending',
143
- },
144
- ],
145
- };
146
- }
134
+ return (_jsx(_Fragment, { children: _jsxs(Table, { className: "ob-form-store-table", style: { ...columnSizeVars }, children: [_jsx("div", { className: "thead", children: _jsx(HeaderRow, { className: "tr ob-form-store-table-header-row", children:
135
+ // Loop over the headers in each row
136
+ parentHeaderGroup.headers.map((header) => {
137
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
138
+ const sortingProperty = (_b = (_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.sorting) === null || _b === void 0 ? void 0 : _b.property;
139
+ const sortingDirection = header.column.getIsSorted();
140
+ if (!header.column.getIsVisible()) {
141
+ return null;
142
+ }
143
+ return (_jsx(Tooltip, { title: ((_d = (_c = header.column.columnDef) === null || _c === void 0 ? void 0 : _c.meta) === null || _d === void 0 ? void 0 : _d.tooltip) || '', arrow: true, slotProps: {
144
+ popper: {
145
+ sx: {
146
+ zIndex: 'drawer',
147
+ },
148
+ },
149
+ }, children: _jsx("div", { className: clsx('th tc ob-form-store-table-header-cell', {
150
+ 'is-clickable': !!sortingProperty,
151
+ }), onClick: sortingProperty
152
+ ? () => {
153
+ onChangeParameters((currentParameters) => {
154
+ var _a, _b;
155
+ const sortingMeta = (_b = (_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.sorting) === null || _b === void 0 ? void 0 : _b.property;
156
+ if (!sortingMeta) {
157
+ return currentParameters;
158
+ }
159
+ switch (sortingDirection) {
160
+ case 'asc': {
161
+ return {
162
+ ...currentParameters,
163
+ sorting: [
164
+ {
165
+ property: sortingMeta,
166
+ direction: 'descending',
167
+ },
168
+ ],
169
+ };
170
+ }
171
+ case 'desc': {
172
+ return {
173
+ ...currentParameters,
174
+ sorting: undefined,
175
+ };
176
+ }
177
+ default: {
178
+ return {
179
+ ...currentParameters,
180
+ sorting: [
181
+ {
182
+ property: sortingMeta,
183
+ direction: 'ascending',
184
+ },
185
+ ],
186
+ };
187
+ }
188
+ }
189
+ }, false);
147
190
  }
148
- }, false);
149
- }
150
- : undefined, ...headerGroup.getHeaderProps() },
151
- React.createElement(IsHoveringProvider, { className: "th-content" },
152
- React.createElement("div", { className: "th-label" },
153
- React.createElement("span", null, headerGroup.headerText),
154
- sortingDirection && (React.createElement(SortingIcon, { fontSize: "small", color: "primary", sx: sortingDirection === 'ascending'
155
- ? {
156
- transform: 'rotate(180deg)',
157
- }
158
- : undefined, className: "th-icon" }, "arrow_downward")),
159
- ((_c = headerGroup.filter) === null || _c === void 0 ? void 0 : _c.isInvalid) ? (React.createElement(Tooltip, { title: ((_d = headerGroup.filter) === null || _d === void 0 ? void 0 : _d.validationMessage) || '' },
160
- React.createElement(MaterialIcon, { fontSize: "small", color: "error", className: "th-icon" }, "warning"))) : ((_e = headerGroup.filter) === null || _e === void 0 ? void 0 : _e.value) ? (React.createElement(MaterialIcon, { fontSize: "small", color: "primary", className: "th-icon" }, "filter_list")) : null),
161
- React.createElement(HeaderCellMoreButton, { headerGroup: headerGroup, onHide: headerGroup.toggleHidden }),
162
- React.createElement("div", { ...headerGroup.getResizerProps(), className: clsx('resizer', {
163
- 'is-resizing': headerGroup.isResizing,
164
- }), onClick: (event) => {
165
- event.stopPropagation();
166
- } })))));
167
- }))),
168
- React.createElement("div", { ...getTableBodyProps(), className: "tbody" },
169
- // Loop over the table rows
170
- rows.map((row, index) => {
171
- var _a;
172
- if (((_a = rows[index - 1]) === null || _a === void 0 ? void 0 : _a.original.submissionId) !==
173
- row.original.submissionId) {
174
- alternateBackground = !alternateBackground;
175
- }
176
- // Prepare the row for display
177
- prepareRow(row);
178
- return (
179
- // Apply the row props
180
- React.createElement("div", { ...row.getRowProps(), key: row.id, className: clsx('tr ob-form-store-table-row', {
181
- 'ob-form-store-table-row__alternate': alternateBackground,
182
- }) },
183
- // Loop over the rows cells
184
- row.cells.map((cell) => {
185
- // Apply the cell props
186
- return (React.createElement(IsHoveringProvider, { ...cell.getCellProps(), key: cell.column.id, className: clsx('td tc ob-form-store-table-row-cell', {
187
- 'is-resizing': cell.column.isResizing,
188
- }) },
189
- // Render the cell contents
190
- cell.render('Cell')));
191
- })));
192
- })))));
191
+ : undefined, style: {
192
+ width: `calc(var(--header-${header === null || header === void 0 ? void 0 : header.id}-size) * 1px)`,
193
+ }, children: _jsxs(IsHoveringProvider, { className: "th-content", children: [_jsxs("div", { className: "th-label", children: [_jsx("span", { children: typeof ((_e = header.column.columnDef) === null || _e === void 0 ? void 0 : _e.header) === 'string'
194
+ ? (_f = header.column.columnDef) === null || _f === void 0 ? void 0 : _f.header
195
+ : '' }), sortingDirection && (_jsx(SortingIcon, { fontSize: "small", color: "primary", sx: sortingDirection === 'asc'
196
+ ? {
197
+ transform: 'rotate(180deg)',
198
+ }
199
+ : undefined, className: "th-icon", children: "arrow_downward" })), ((_h = (_g = header.column.columnDef.meta) === null || _g === void 0 ? void 0 : _g.filter) === null || _h === void 0 ? void 0 : _h.isInvalid) ? (_jsx(Tooltip, { title: ((_k = (_j = header.column.columnDef.meta) === null || _j === void 0 ? void 0 : _j.filter) === null || _k === void 0 ? void 0 : _k.validationMessage) || '', children: _jsx(MaterialIcon, { fontSize: "small", color: "error", className: "th-icon", children: "warning" }) })) : ((_m = (_l = header.column.columnDef.meta) === null || _l === void 0 ? void 0 : _l.filter) === null || _m === void 0 ? void 0 : _m.value) ? (_jsx(MaterialIcon, { fontSize: "small", color: "primary", className: "th-icon", children: "filter_list" })) : null] }), _jsx(HeaderCellMoreButton, { header: header, onHide: () => header.column.toggleVisibility() }), _jsx("div", { className: clsx('resizer', {
200
+ 'is-resizing': header.column.getIsResizing(),
201
+ }), onClick: (event) => {
202
+ event.stopPropagation();
203
+ }, onDoubleClick: () => header.column.resetSize(), onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler() })] }) }) }, header.id));
204
+ }) }) }), _jsx("div", { className: "tbody", children:
205
+ // Loop over the table rows
206
+ rows.map((row, index) => {
207
+ var _a;
208
+ if (((_a = rows[index - 1]) === null || _a === void 0 ? void 0 : _a.original.submissionId) !==
209
+ row.original.submissionId) {
210
+ alternateBackground = !alternateBackground;
211
+ }
212
+ return (
213
+ // Apply the row props
214
+ _jsx(CellRow, { className: clsx('tr ob-form-store-table-row', {
215
+ 'ob-form-store-table-row__alternate': alternateBackground,
216
+ }), children:
217
+ // Loop over the rows cells
218
+ row.getAllCells().map((cell) => {
219
+ // Apply the cell props
220
+ return (_jsx(IsHoveringProvider, { className: clsx('td tc ob-form-store-table-row-cell', {
221
+ 'is-resizing': cell.column.getIsResizing(),
222
+ }), style: { width: cell.column.getSize() }, children:
223
+ // Render the cell contents
224
+ flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.column.id));
225
+ }) }, row.id));
226
+ }) })] }) }));
193
227
  }
194
228
  /**
195
229
  * @returns
@@ -1 +1 @@
1
- {"version":3,"file":"OneBlinkFormStoreTable.js","sourceRoot":"","sources":["../../../src/components/formStore/OneBlinkFormStoreTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,oBAAoB,MAAM,8BAA8B,CAAA;AAC/D,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AACjE,OAAO,YAAY,MAAM,iBAAiB,CAAA;AAE1C,MAAM,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACvD,UAAU,EAAE,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC;CAClD,CAAC,CAAC,CAAA;AAEH,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAC1C,OAAO,EAAE,cAAc;IACvB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK;IAC/C,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ;IACzC,uCAAuC,EAAE;QACvC,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;KAC5C;IACD,OAAO,EAAE;QACP,OAA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ltip } from '@mui/material'\nimport { IsHoveringProvider } from '../../hooks/useIsHovering'\nimport HeaderCellMoreButton from './table/HeaderCellMoreButton'\nimport useFormStoreTableContext from './useFormStoreTableContext'\nimport MaterialIcon from '../MaterialIcon'\n\nconst SortingIcon = styled(MaterialIcon)(({ theme }) => ({\n transition: theme.transitions.create('transform'),\n}))\n\nconst Table = styled('div')(({ theme }) => ({\n display: 'inline-block',\n backgroundColor: theme.palette.background.paper,\n fontSize: theme.typography.body2.fontSize,\n '& .ob-form-store-table-row__alternate': {\n backgroundColor: theme.palette.action.hover,\n },\n '& .tc': {\n padding: theme.spacing(1),\n borderBottom: '1px solid',\n borderBottomColor: theme.palette.divider,\n display: 'flex',\n alignItems: 'center',\n '&.is-clickable': {\n cursor: 'pointer',\n transition: theme.transitions.create('transform'),\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n },\n },\n '& .td': {\n position: 'relative',\n borderRight: '1px solid',\n borderRightColor: theme.palette.divider,\n overflowX: 'hidden',\n // minus 1 to cater for the border\n minHeight: `${parseInt(theme.spacing(5.5)) - 1}px`,\n '&.is-resizing': {\n borderRightStyle: 'dashed',\n },\n },\n '& .th': {\n position: 'relative',\n fontWeight: theme.typography.fontWeightBold,\n paddingRight: 0,\n borderBottomWidth: '2px',\n '& .th-content': {\n flex: 1,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n borderRight: '1px solid',\n borderRightColor: theme.palette.divider,\n paddingRight: theme.spacing(),\n '& .th-label': {\n display: 'inline-flex',\n alignItems: 'center',\n '& .th-icon': {\n marginLeft: theme.spacing(),\n },\n },\n },\n '& .resizer': {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 0,\n borderLeftStyle: 'solid',\n borderRightStyle: 'solid',\n borderColor: theme.palette.divider,\n paddingTop: theme.spacing(),\n paddingBottom: theme.spacing(),\n paddingRight: `calc(${theme.spacing(1)} + 1px)`,\n position: 'absolute',\n right: 0,\n top: theme.spacing(0.5),\n bottom: theme.spacing(0.5),\n transform: `translateX(calc(${theme.spacing(0.5)} + 1px))`,\n zIndex: 1,\n // prevents from scrolling while dragging on touch devices\n touchAction: 'none',\n '&:hover': {\n borderWidth: '1px',\n },\n '&.is-resizing': {\n borderWidth: '1px',\n borderColor: theme.palette.grey[700],\n },\n },\n },\n}))\n\nfunction OneBlinkFormStoreTable() {\n const {\n getTableProps,\n getTableBodyProps,\n headerGroups: [parentHeaderGroup],\n rows,\n prepareRow,\n onChangeParameters,\n } = useFormStoreTableContext()\n\n if (!parentHeaderGroup) {\n return null\n }\n\n let alternateBackground = false\n\n return (\n <>\n <Table {...getTableProps()} className=\"ob-form-store-table\">\n <div className=\"thead\">\n <div\n {...parentHeaderGroup.getHeaderGroupProps()}\n className=\"tr ob-form-store-table-header-row\"\n >\n {\n // Loop over the headers in each row\n parentHeaderGroup.headers.map((headerGroup) => {\n const sortingProperty = headerGroup.sorting?.property\n const sortingDirection = headerGroup.sorting?.direction\n\n return (\n <Tooltip\n title={headerGroup.tooltip || ''}\n arrow\n key={headerGroup.id}\n PopperProps={{\n sx: {\n zIndex: 'drawer',\n },\n }}\n >\n <div\n className={clsx('th tc ob-form-store-table-header-cell', {\n 'is-clickable': !!sortingProperty,\n })}\n onClick={\n sortingProperty\n ? () => {\n onChangeParameters((currentParameters) => {\n switch (sortingDirection) {\n case 'ascending': {\n return {\n ...currentParameters,\n sorting: [\n {\n property: sortingProperty,\n direction: 'descending',\n },\n ],\n }\n }\n case 'descending': {\n return {\n ...currentParameters,\n sorting: undefined,\n }\n }\n default: {\n return {\n ...currentParameters,\n sorting: [\n {\n property: sortingProperty,\n direction: 'ascending',\n },\n ],\n }\n }\n }\n }, false)\n }\n : undefined\n }\n // Apply the header cell props\n {...headerGroup.getHeaderProps()}\n >\n <IsHoveringProvider className=\"th-content\">\n <div className=\"th-label\">\n <span>{headerGroup.headerText}</span>\n {sortingDirection && (\n <SortingIcon\n fontSize=\"small\"\n color=\"primary\"\n sx={\n sortingDirection === 'ascending'\n ? {\n transform: 'rotate(180deg)',\n }\n : undefined\n }\n className=\"th-icon\"\n >\n arrow_downward\n </SortingIcon>\n )}\n {headerGroup.filter?.isInvalid ? (\n <Tooltip\n title={\n headerGroup.filter?.validationMessage || ''\n }\n >\n <MaterialIcon\n fontSize=\"small\"\n color=\"error\"\n className=\"th-icon\"\n >\n warning\n </MaterialIcon>\n </Tooltip>\n ) : headerGroup.filter?.value ? (\n <MaterialIcon\n fontSize=\"small\"\n color=\"primary\"\n className=\"th-icon\"\n >\n filter_list\n </MaterialIcon>\n ) : null}\n </div>\n <HeaderCellMoreButton\n headerGroup={headerGroup}\n onHide={headerGroup.toggleHidden}\n />\n <div\n {...headerGroup.getResizerProps()}\n className={clsx('resizer', {\n 'is-resizing': headerGroup.isResizing,\n })}\n onClick={(event) => {\n event.stopPropagation()\n }}\n />\n </IsHoveringProvider>\n </div>\n </Tooltip>\n )\n })\n }\n </div>\n </div>\n <div {...getTableBodyProps()} className=\"tbody\">\n {\n // Loop over the table rows\n rows.map((row, index) => {\n if (\n rows[index - 1]?.original.submissionId !==\n row.original.submissionId\n ) {\n alternateBackground = !alternateBackground\n }\n // Prepare the row for display\n prepareRow(row)\n return (\n // Apply the row props\n <div\n {...row.getRowProps()}\n key={row.id}\n className={clsx('tr ob-form-store-table-row', {\n 'ob-form-store-table-row__alternate': alternateBackground,\n })}\n >\n {\n // Loop over the rows cells\n row.cells.map((cell) => {\n // Apply the cell props\n return (\n <IsHoveringProvider\n {...cell.getCellProps()}\n key={cell.column.id}\n className={clsx(\n 'td tc ob-form-store-table-row-cell',\n {\n 'is-resizing': cell.column.isResizing,\n },\n )}\n >\n {\n // Render the cell contents\n cell.render('Cell')\n }\n </IsHoveringProvider>\n )\n })\n }\n </div>\n )\n })\n }\n </div>\n </Table>\n </>\n )\n}\n\n/**\n * @returns\n * @group Components\n */\nexport default React.memo(OneBlinkFormStoreTable)\n"]}
1
+ {"version":3,"file":"OneBlinkFormStoreTable.js","sour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AAC,kBAAkB,IAEjB,SAAS,EAAE,IAAI,CACb,oCAAoC,EACpC;wCACE,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;qCAC3C,CACF,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE;oCAGrC,2BAA2B;oCAC3B,UAAU,CACR,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAC1B,IAAI,CAAC,UAAU,EAAE,CAClB,IAdE,IAAI,CAAC,MAAM,CAAC,EAAE,CAgBA,CACtB,CAAA;4BACH,CAAC,CAAC,IA7BC,GAAG,CAAC,EAAE,CA+BH,CACX,CAAA;oBACH,CAAC,CAAC,GAEA,IACA,GACP,CACJ,CAAA;AACH,CAAC;AAED;;;GAGG;AACH,eAAe,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport clsx from 'clsx'\nimport { styled, Tooltip } from '@mui/material'\nimport { flexRender } from '@tanstack/react-table'\nimport { formStoreService } from '@oneblink/apps'\nimport { IsHoveringProvider } from '../../hooks/useIsHovering'\nimport HeaderCellMoreButton from './table/HeaderCellMoreButton'\nimport useFormStoreTableContext from './useFormStoreTableContext'\nimport MaterialIcon from '../MaterialIcon'\n\nconst SortingIcon = styled(MaterialIcon)(({ theme }) => ({\n transition: theme.transitions.create('transform'),\n}))\n\nconst Table = styled('div')(({ theme }) => ({\n display: 'inline-block',\n backgroundColor: theme.palette.background.paper,\n fontSize: theme.typography.body2.fontSize,\n '& .ob-form-store-table-row__alternate': {\n backgroundColor: theme.palette.action.hover,\n },\n '& .tc': {\n padding: theme.spacing(1),\n borderBottom: '1px solid',\n borderBottomColor: theme.palette.divider,\n display: 'flex',\n alignItems: 'center',\n '&.is-clickable': {\n cursor: 'pointer',\n transition: theme.transitions.create('transform'),\n '&:hover': {\n backgroundColor: theme.palette.action.hover,\n },\n },\n },\n '& .td': {\n position: 'relative',\n borderRight: '1px solid',\n borderRightColor: theme.palette.divider,\n overflowX: 'hidden',\n // minus 1 to cater for the border\n minHeight: `${parseInt(theme.spacing(5.5)) - 1}px`,\n '&.is-resizing': {\n borderRightStyle: 'dashed',\n },\n },\n '& .th': {\n position: 'relative',\n fontWeight: theme.typography.fontWeightBold,\n paddingRight: 0,\n borderBottomWidth: '2px',\n '& .th-content': {\n flex: 1,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n borderRight: '1px solid',\n borderRightColor: theme.palette.divider,\n paddingRight: theme.spacing(),\n '& .th-label': {\n display: 'inline-flex',\n alignItems: 'center',\n '& .th-icon': {\n marginLeft: theme.spacing(),\n },\n },\n },\n '& .resizer': {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 0,\n borderLeftStyle: 'solid',\n borderRightStyle: 'solid',\n borderColor: theme.palette.divider,\n paddingTop: theme.spacing(),\n paddingBottom: theme.spacing(),\n paddingRight: `calc(${theme.spacing(1)} + 1px)`,\n position: 'absolute',\n right: 0,\n top: theme.spacing(0.5),\n bottom: theme.spacing(0.5),\n transform: `translateX(calc(${theme.spacing(0.5)} + 1px))`,\n zIndex: 1,\n // prevents from scrolling while dragging on touch devices\n touchAction: 'none',\n '&:hover': {\n borderWidth: '1px',\n },\n '&.is-resizing': {\n borderWidth: '1px',\n borderColor: theme.palette.grey[700],\n },\n },\n },\n}))\n\nconst HeaderRow = styled('div')(() => ({\n display: 'flex',\n}))\n\nconst CellRow = styled('div')(() => ({\n display: 'flex',\n}))\n\nfunction OneBlinkFormStoreTable() {\n const {\n getHeaderGroups,\n getCoreRowModel,\n getFlatHeaders,\n getState,\n onChangeParameters,\n } = useFormStoreTableContext()\n\n const [parentHeaderGroup] = getHeaderGroups()\n const rows = getCoreRowModel().rows\n\n const columnSizingInfo = getState().columnSizingInfo\n const columnSizing = getState().columnSizing\n\n /**\n * Pinched from\n * https://tanstack.com/table/latest/docs/framework/react/examples/column-resizing-performant\n * Instead of calling `column.getSize()` on every render for every header and\n * especially every data cell (very expensive), we will calculate all column\n * sizes at once at the root table level in a useMemo and pass the column\n * sizes down as CSS variables to the <table> element.\n */\n\n const columnSizeVars = React.useMemo(() => {\n // we want the memo to recalculate if these change, dropping them here so the linter doesn't complain about unused dependencies\n /* eslint-disable @typescript-eslint/no-unused-expressions */\n columnSizingInfo\n columnSizing\n /* eslint-enable @typescript-eslint/no-unused-expressions */\n const headers = getFlatHeaders()\n const colSizes: { [key: string]: number } = {}\n for (let i = 0; i < headers.length; i++) {\n const header = headers[i]!\n colSizes[`--header-${header.id}-size`] = header.getSize()\n colSizes[`--col-${header.column.id}-size`] = header.column.getSize()\n }\n return colSizes\n }, [getFlatHeaders, columnSizingInfo, columnSizing])\n\n if (!parentHeaderGroup) {\n return null\n }\n\n let alternateBackground = false\n\n return (\n <>\n <Table className=\"ob-form-store-table\" style={{ ...columnSizeVars }}>\n <div className=\"thead\">\n <HeaderRow className=\"tr ob-form-store-table-header-row\">\n {\n // Loop over the headers in each row\n parentHeaderGroup.headers.map((header) => {\n const sortingProperty =\n header.column.columnDef.meta?.sorting?.property\n const sortingDirection = header.column.getIsSorted()\n\n if (!header.column.getIsVisible()) {\n return null\n }\n\n return (\n <Tooltip\n title={header.column.columnDef?.meta?.tooltip || ''}\n arrow\n key={header.id}\n slotProps={{\n popper: {\n sx: {\n zIndex: 'drawer',\n },\n },\n }}\n >\n <div\n className={clsx('th tc ob-form-store-table-header-cell', {\n 'is-clickable': !!sortingProperty,\n })}\n onClick={\n sortingProperty\n ? () => {\n onChangeParameters(\n (\n currentParameters: formStoreService.FormStoreParameters,\n ) => {\n const sortingMeta =\n header.column.columnDef.meta?.sorting\n ?.property\n if (!sortingMeta) {\n return currentParameters\n }\n switch (sortingDirection) {\n case 'asc': {\n return {\n ...currentParameters,\n sorting: [\n {\n property: sortingMeta,\n direction: 'descending',\n },\n ],\n }\n }\n case 'desc': {\n return {\n ...currentParameters,\n sorting: undefined,\n }\n }\n default: {\n return {\n ...currentParameters,\n sorting: [\n {\n property: sortingMeta,\n direction: 'ascending',\n },\n ],\n }\n }\n }\n },\n false,\n )\n }\n : undefined\n }\n style={{\n width: `calc(var(--header-${header?.id}-size) * 1px)`,\n }}\n >\n <IsHoveringProvider className=\"th-content\">\n <div className=\"th-label\">\n <span>\n {typeof header.column.columnDef?.header === 'string'\n ? header.column.columnDef?.header\n : ''}\n </span>\n {sortingDirection && (\n <SortingIcon\n fontSize=\"small\"\n color=\"primary\"\n sx={\n sortingDirection === 'asc'\n ? {\n transform: 'rotate(180deg)',\n }\n : undefined\n }\n className=\"th-icon\"\n >\n arrow_downward\n </SortingIcon>\n )}\n\n {header.column.columnDef.meta?.filter?.isInvalid ? (\n <Tooltip\n title={\n header.column.columnDef.meta?.filter\n ?.validationMessage || ''\n }\n >\n <MaterialIcon\n fontSize=\"small\"\n color=\"error\"\n className=\"th-icon\"\n >\n warning\n </MaterialIcon>\n </Tooltip>\n ) : header.column.columnDef.meta?.filter?.value ? (\n <MaterialIcon\n fontSize=\"small\"\n color=\"primary\"\n className=\"th-icon\"\n >\n filter_list\n </MaterialIcon>\n ) : null}\n </div>\n <HeaderCellMoreButton\n header={header}\n onHide={() => header.column.toggleVisibility()}\n />\n <div\n className={clsx('resizer', {\n 'is-resizing': header.column.getIsResizing(),\n })}\n onClick={(event) => {\n event.stopPropagation()\n }}\n onDoubleClick={() => header.column.resetSize()}\n onMouseDown={header.getResizeHandler()}\n onTouchStart={header.getResizeHandler()}\n />\n </IsHoveringProvider>\n </div>\n </Tooltip>\n )\n })\n }\n </HeaderRow>\n </div>\n <div className=\"tbody\">\n {\n // Loop over the table rows\n rows.map((row, index) => {\n if (\n rows[index - 1]?.original.submissionId !==\n row.original.submissionId\n ) {\n alternateBackground = !alternateBackground\n }\n return (\n // Apply the row props\n <CellRow\n key={row.id}\n className={clsx('tr ob-form-store-table-row', {\n 'ob-form-store-table-row__alternate': alternateBackground,\n })}\n >\n {\n // Loop over the rows cells\n row.getAllCells().map((cell) => {\n // Apply the cell props\n return (\n <IsHoveringProvider\n key={cell.column.id}\n className={clsx(\n 'td tc ob-form-store-table-row-cell',\n {\n 'is-resizing': cell.column.getIsResizing(),\n },\n )}\n style={{ width: cell.column.getSize() }}\n >\n {\n // Render the cell contents\n flexRender(\n cell.column.columnDef.cell,\n cell.getContext(),\n )\n }\n </IsHoveringProvider>\n )\n })\n }\n </CellRow>\n )\n })\n }\n </div>\n </Table>\n </>\n )\n}\n\n/**\n * @returns\n * @group Components\n */\nexport default React.memo(OneBlinkFormStoreTable)\n"]}
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { FormElementWithOptions } from '@oneblink/types/typescript/forms';
3
2
  export declare function FileChip({ file: { fileName, url, data }, }: {
4
3
  file: {
@@ -7,7 +6,7 @@ export declare function FileChip({ file: { fileName, url, data }, }: {
7
6
  isPrivate?: boolean;
8
7
  data?: string;
9
8
  };
10
- }): React.JSX.Element;
9
+ }): import("react/jsx-runtime").JSX.Element;
11
10
  export declare function FilesElementDataTableCellContent({ value, }: {
12
11
  value: Array<{
13
12
  fileName: string;
@@ -15,9 +14,9 @@ export declare function FilesElementDataTableCellContent({ value, }: {
15
14
  isPrivate?: boolean | undefined;
16
15
  data?: string | undefined;
17
16
  }>;
18
- }): React.JSX.Element;
17
+ }): import("react/jsx-runtime").JSX.Element;
19
18
  export declare function MultiSelectFormElementTableCellContent({ value, formElement, }: {
20
19
  value: string[];
21
20
  formElement: FormElementWithOptions;
22
- }): React.JSX.Element;
21
+ }): import("react/jsx-runtime").JSX.Element;
23
22
  export declare function getSelectedOptionLabel(formElement: FormElementWithOptions, value: string): string;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import * as React from 'react';
2
3
  import { saveAs } from 'file-saver';
3
4
  import { Chip, CircularProgress, Grid } from '@mui/material';
@@ -54,22 +55,18 @@ export function FileChip({ file: { fileName, url, data }, }) {
54
55
  });
55
56
  }
56
57
  }, [data, fileName, url]);
57
- return (React.createElement(React.Fragment, null,
58
- React.createElement(Chip, { label: fileName, deleteIcon: React.createElement(MaterialIcon, null, "save_alt"), onDelete: handleDownload, variant: "outlined", icon: isDownloading ? (React.createElement(CircularProgress, { size: 16 })) : (React.createElement(MaterialIcon, null, "attach_file")) }),
59
- React.createElement(ErrorSnackbar, { open: !!error, onClose: clearError },
60
- React.createElement("span", { "data-cypress": "download-legacy-file-error-message" }, error && error.message))));
58
+ return (_jsxs(_Fragment, { children: [_jsx(Chip, { label: fileName, deleteIcon: _jsx(MaterialIcon, { children: "save_alt" }), onDelete: handleDownload, variant: "outlined", icon: isDownloading ? (_jsx(CircularProgress, { size: 16 })) : (_jsx(MaterialIcon, { children: "attach_file" })) }), _jsx(ErrorSnackbar, { open: !!error, onClose: clearError, children: _jsx("span", { "data-cypress": "download-legacy-file-error-message", children: error && error.message }) })] }));
61
59
  }
62
60
  export function FilesElementDataTableCellContent({ value, }) {
63
- return (React.createElement(Grid, { container: true, spacing: 1 }, value.map((file, index) => {
64
- return (React.createElement(Grid, { item: true, key: index, xs: 12 },
65
- React.createElement(FileChip, { file: file })));
66
- })));
61
+ return (_jsx(Grid, { container: true, spacing: 1, children: value.map((file, index) => {
62
+ return (_jsx(Grid, { size: { xs: 12 }, children: _jsx(FileChip, { file: file }) }, index));
63
+ }) }));
67
64
  }
68
65
  export function MultiSelectFormElementTableCellContent({ value, formElement, }) {
69
- return (React.createElement(UnorderedList, { disablePadding: true }, value.map((selection, index) => {
70
- const label = getSelectedOptionLabel(formElement, selection);
71
- return React.createElement(ListItem, { key: index }, label === null || label === void 0 ? void 0 : label.toString());
72
- })));
66
+ return (_jsx(UnorderedList, { disablePadding: true, children: value.map((selection, index) => {
67
+ const label = getSelectedOptionLabel(formElement, selection);
68
+ return _jsx(ListItem, { children: label === null || label === void 0 ? void 0 : label.toString() }, index);
69
+ }) }));
73
70
  }
74
71
  export function getSelectedOptionLabel(formElement, value) {
75
72
  const selectedOption = (formElement.options || []).find((opt) => opt.value === value);
@@ -1 +1 @@
1
- {"version":3,"file":"ElementDisplay.js","sourceRoot":"","sources":["../../../../src/components/formStore/display/ElementDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,aAAa,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AACxE,OAAO,OAAO,MAAM,6BAA6B,CAAA;AACjD,OAAO,YAAY,MAAM,oBAAoB,CAAA;AAE7C,KAAK,UAAU,SAAS,CAAC,GAAW;IAClC,MAAM,OAAO,GAAG,MAAM,iBAAiB,EAAE,CAAA;IACzC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAClD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;IAC9B,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAA;IACrC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAA;IACjC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE;QACzC,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,OAAO,EAAE;SACnC;KACF,CAAC,CAAA;IAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CACb,8CAA8C,QAAQ,CAAC,MAAM,EAAE,CAChE,CAAA;IACH,CAAC;IAED,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;AAC9B,CAAC;AAED,M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G,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,KAAK,KAAK,CAC7B,CAAA;IACD,OAAO,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;AACtD,CAAC","sourcesContent":["import * as React from 'react'\nimport { saveAs } from 'file-saver'\nimport { Chip, CircularProgress, Grid } from '@mui/material'\nimport ErrorSnackbar from '../../ErrorSnackbar'\nimport { UnorderedList, ListItem } from '../../Lists'\nimport { FormElementWithOptions } from '@oneblink/types/typescript/forms'\nimport { getCognitoIdToken } from '@oneblink/apps/dist/services/cognito'\nimport tenants from '@oneblink/apps/dist/tenants'\nimport MaterialIcon from '../../MaterialIcon'\n\nasync function fetchFile(url: string) {\n const idToken = await getCognitoIdToken()\n const safeUrl = new URL(tenants.current.apiOrigin)\n const unsafeUrl = new URL(url)\n safeUrl.pathname = unsafeUrl.pathname\n safeUrl.search = unsafeUrl.search\n const response = await fetch(safeUrl.href, {\n headers: {\n Authorization: `Bearer ${idToken}`,\n },\n })\n\n if (!response.ok) {\n throw new Error(\n `Unable to download file. HTTP Status Code: ${response.status}`,\n )\n }\n\n return await response.blob()\n}\n\nexport function FileChip({\n file: { fileName, url, data },\n}: {\n file: {\n fileName: string\n url?: string\n isPrivate?: boolean\n data?: string\n }\n}) {\n const [{ isDownloading, error }, setState] = React.useState<{\n error?: Error\n isDownloading: boolean\n }>({\n isDownloading: false,\n })\n const clearError = React.useCallback(() => {\n setState({\n isDownloading: false,\n })\n }, [])\n const handleDownload = React.useCallback(async () => {\n try {\n setState({\n isDownloading: true,\n })\n\n if (url) {\n const blob = await fetchFile(url)\n saveAs(blob, fileName)\n } else if (data) {\n saveAs(data, fileName)\n }\n\n setState({\n isDownloading: false,\n })\n } catch (error) {\n setState({\n isDownloading: false,\n error: error as Error,\n })\n }\n }, [data, fileName, url])\n return (\n <>\n <Chip\n label={fileName}\n deleteIcon={<MaterialIcon>save_alt</MaterialIcon>}\n onDelete={handleDownload}\n variant=\"outlined\"\n icon={\n isDownloading ? (\n <CircularProgress size={16} />\n ) : (\n <MaterialIcon>attach_file</MaterialIcon>\n )\n }\n />\n <ErrorSnackbar open={!!error} onClose={clearError}>\n <span data-cypress=\"download-legacy-file-error-message\">\n {error && error.message}\n </span>\n </ErrorSnackbar>\n </>\n )\n}\n\nexport function FilesElementDataTableCellContent({\n value,\n}: {\n value: Array<{\n fileName: string\n url?: string | undefined\n isPrivate?: boolean | undefined\n data?: string | undefined\n }>\n}) {\n return (\n <Grid container spacing={1}>\n {value.map((file, index) => {\n return (\n <Grid item key={index} xs={12}>\n <FileChip file={file} />\n </Grid>\n )\n })}\n </Grid>\n )\n}\n\nexport function MultiSelectFormElementTableCellContent({\n value,\n formElement,\n}: {\n value: string[]\n formElement: FormElementWithOptions\n}) {\n return (\n <UnorderedList disablePadding>\n {value.map((selection, index) => {\n const label = getSelectedOptionLabel(formElement, selection)\n return <ListItem key={index}>{label?.toString()}</ListItem>\n })}\n </UnorderedList>\n )\n}\n\nexport function getSelectedOptionLabel(\n formElement: FormElementWithOptions,\n value: string,\n) {\n const selectedOption = (formElement.options || []).find(\n (opt) => opt.value === value,\n )\n return selectedOption ? selectedOption.label : value\n}\n"]}
1
+ {"version":3,"file":"ElementDisplay.js","sourceRoot":"","sources":["../../../../src/components/formStore/display/ElementDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,aAAa,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AACxE,OAAO,OAAO,MAAM,6BAA6B,CAAA;AACjD,OAAO,YAAY,MAAM,oB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,EAAE,EAAE,EAAE,YACpB,KAAC,QAAQ,IAAC,IAAI,EAAE,IAAI,GAAI,IADG,KAAK,CAE3B,CACR,CAAA;QACH,CAAC,CAAC,GACG,CACR,CAAA;AACH,CAAC;AAED,MAAM,UAAU,sCAAsC,CAAC,EACrD,KAAK,EACL,WAAW,GAIZ;IACC,OAAO,CACL,KAAC,aAAa,IAAC,cAAc,kBAC1B,KAAK,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE;YAC9B,MAAM,KAAK,GAAG,sBAAsB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;YAC5D,OAAO,KAAC,QAAQ,cAAc,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,EAAE,IAAzB,KAAK,CAAgC,CAAA;QAC7D,CAAC,CAAC,GACY,CACjB,CAAA;AACH,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,WAAmC,EACnC,KAAa;IAEb,MAAM,cAAc,GAAG,CAAC,WAAW,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,CACrD,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,KAAK,KAAK,CAC7B,CAAA;IACD,OAAO,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;AACtD,CAAC","sourcesContent":["import * as React from 'react'\nimport { saveAs } from 'file-saver'\nimport { Chip, CircularProgress, Grid } from '@mui/material'\nimport ErrorSnackbar from '../../ErrorSnackbar'\nimport { UnorderedList, ListItem } from '../../Lists'\nimport { FormElementWithOptions } from '@oneblink/types/typescript/forms'\nimport { getCognitoIdToken } from '@oneblink/apps/dist/services/cognito'\nimport tenants from '@oneblink/apps/dist/tenants'\nimport MaterialIcon from '../../MaterialIcon'\n\nasync function fetchFile(url: string) {\n const idToken = await getCognitoIdToken()\n const safeUrl = new URL(tenants.current.apiOrigin)\n const unsafeUrl = new URL(url)\n safeUrl.pathname = unsafeUrl.pathname\n safeUrl.search = unsafeUrl.search\n const response = await fetch(safeUrl.href, {\n headers: {\n Authorization: `Bearer ${idToken}`,\n },\n })\n\n if (!response.ok) {\n throw new Error(\n `Unable to download file. HTTP Status Code: ${response.status}`,\n )\n }\n\n return await response.blob()\n}\n\nexport function FileChip({\n file: { fileName, url, data },\n}: {\n file: {\n fileName: string\n url?: string\n isPrivate?: boolean\n data?: string\n }\n}) {\n const [{ isDownloading, error }, setState] = React.useState<{\n error?: Error\n isDownloading: boolean\n }>({\n isDownloading: false,\n })\n const clearError = React.useCallback(() => {\n setState({\n isDownloading: false,\n })\n }, [])\n const handleDownload = React.useCallback(async () => {\n try {\n setState({\n isDownloading: true,\n })\n\n if (url) {\n const blob = await fetchFile(url)\n saveAs(blob, fileName)\n } else if (data) {\n saveAs(data, fileName)\n }\n\n setState({\n isDownloading: false,\n })\n } catch (error) {\n setState({\n isDownloading: false,\n error: error as Error,\n })\n }\n }, [data, fileName, url])\n return (\n <>\n <Chip\n label={fileName}\n deleteIcon={<MaterialIcon>save_alt</MaterialIcon>}\n onDelete={handleDownload}\n variant=\"outlined\"\n icon={\n isDownloading ? (\n <CircularProgress size={16} />\n ) : (\n <MaterialIcon>attach_file</MaterialIcon>\n )\n }\n />\n <ErrorSnackbar open={!!error} onClose={clearError}>\n <span data-cypress=\"download-legacy-file-error-message\">\n {error && error.message}\n </span>\n </ErrorSnackbar>\n </>\n )\n}\n\nexport function FilesElementDataTableCellContent({\n value,\n}: {\n value: Array<{\n fileName: string\n url?: string | undefined\n isPrivate?: boolean | undefined\n data?: string | undefined\n }>\n}) {\n return (\n <Grid container spacing={1}>\n {value.map((file, index) => {\n return (\n <Grid size={{ xs: 12 }} key={index}>\n <FileChip file={file} />\n </Grid>\n )\n })}\n </Grid>\n )\n}\n\nexport function MultiSelectFormElementTableCellContent({\n value,\n formElement,\n}: {\n value: string[]\n formElement: FormElementWithOptions\n}) {\n return (\n <UnorderedList disablePadding>\n {value.map((selection, index) => {\n const label = getSelectedOptionLabel(formElement, selection)\n return <ListItem key={index}>{label?.toString()}</ListItem>\n })}\n </UnorderedList>\n )\n}\n\nexport function getSelectedOptionLabel(\n formElement: FormElementWithOptions,\n value: string,\n) {\n const selectedOption = (formElement.options || []).find(\n (opt) => opt.value === value,\n )\n return selectedOption ? selectedOption.label : value\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
2
  import MaterialIcon from '../../MaterialIcon';
3
- export default function Work(props: Omit<React.ComponentProps<typeof MaterialIcon>, 'children'>): React.JSX.Element;
3
+ export default function Work(props: Omit<React.ComponentProps<typeof MaterialIcon>, 'children'>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import MaterialIcon from '../../MaterialIcon';
3
3
  export default function Work(props) {
4
- return React.createElement(MaterialIcon, { ...props }, "work");
4
+ return _jsx(MaterialIcon, { ...props, children: "work" });
5
5
  }
6
6
  //# sourceMappingURL=FormStoreIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormStoreIcon.js","sourceRoot":"","sources":["../../../../src/components/formStore/display/FormStoreIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,YAAY,MAAM,oBAAoB,CAAA;AAC7C,MAAM,CAAC,OAAO,UAAU,IAAI,CAC1B,KAAkE;IAElE,OAAO,oBAAC,YAAY,OAAK,KAAK,WAAqB,CAAA;AACrD,CAAC","sourcesContent":["import * as React from 'react'\nimport MaterialIcon from '../../MaterialIcon'\nexport default function Work(\n props: Omit<React.ComponentProps<typeof MaterialIcon>, 'children'>,\n) {\n return <MaterialIcon {...props}>work</MaterialIcon>\n}\n"]}
1
+ {"version":3,"file":"FormStoreIcon.js","sourceRoot":"","sources":["../../../../src/components/formStore/display/FormStoreIcon.tsx"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,oBAAoB,CAAA;AAC7C,MAAM,CAAC,OAAO,UAAU,IAAI,CAC1B,KAAkE;IAElE,OAAO,KAAC,YAAY,OAAK,KAAK,qBAAqB,CAAA;AACrD,CAAC","sourcesContent":["import * as React from 'react'\nimport MaterialIcon from '../../MaterialIcon'\nexport default function Work(\n props: Omit<React.ComponentProps<typeof MaterialIcon>, 'children'>,\n) {\n return <MaterialIcon {...props}>work</MaterialIcon>\n}\n"]}
@@ -6,6 +6,6 @@ declare function ActionedByTableCell({ userProfile, developerKey, ...rest }: Rea
6
6
  developerKey?: {
7
7
  name: string;
8
8
  };
9
- }): React.JSX.Element;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
10
  declare const _default: React.MemoExoticComponent<typeof ActionedByTableCell>;
11
11
  export default _default;
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import * as React from 'react';
2
3
  import { userService } from '@oneblink/sdk-core';
3
4
  import { Chip, Avatar } from '@mui/material';
@@ -9,9 +10,7 @@ function ActionedByTableCell({ userProfile, developerKey, ...rest }) {
9
10
  developerKey,
10
11
  ...rest,
11
12
  });
12
- return (React.createElement(React.Fragment, null,
13
- React.createElement(Chip, { ...chipProps, ...rest }),
14
- React.createElement(TableCellCopyButton, { text: chipProps.label })));
13
+ return (_jsxs(_Fragment, { children: [_jsx(Chip, { ...chipProps, ...rest }), _jsx(TableCellCopyButton, { text: chipProps.label })] }));
15
14
  }
16
15
  export default React.memo(ActionedByTableCell);
17
16
  function useActionedByChipProps({ userProfile, developerKey, }) {
@@ -21,22 +20,22 @@ function useActionedByChipProps({ userProfile, developerKey, }) {
21
20
  label: '',
22
21
  };
23
22
  if (userProfile.picture) {
24
- emptyChipProps.avatar = (React.createElement(Avatar, { alt: userProfile.fullName, src: userProfile.picture }));
23
+ emptyChipProps.avatar = (_jsx(Avatar, { alt: userProfile.fullName, src: userProfile.picture }));
25
24
  }
26
25
  else {
27
- emptyChipProps.icon = React.createElement(MaterialIcon, null, "account_circle");
26
+ emptyChipProps.icon = _jsx(MaterialIcon, { children: "account_circle" });
28
27
  }
29
28
  emptyChipProps.label = userService.getUserFriendlyName(userProfile);
30
29
  return emptyChipProps;
31
30
  }
32
31
  if (developerKey) {
33
32
  return {
34
- icon: React.createElement(MaterialIcon, null, "vpn_key"),
33
+ icon: _jsx(MaterialIcon, { children: "vpn_key" }),
35
34
  label: developerKey.name,
36
35
  };
37
36
  }
38
37
  return {
39
- icon: React.createElement(MaterialIcon, null, "help"),
38
+ icon: _jsx(MaterialIcon, { children: "help" }),
40
39
  label: 'Anonymous',
41
40
  };
42
41
  }, [developerKey, userProfile]);
@@ -1 +1 @@
1
- {"version":3,"file":"ActionedByTableCell.js","sourceRoot":"","sources":["../../../../src/components/formStore/table/ActionedByTableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,mBAAmB,MAAM,uBAAuB,CAAA;AACvD,OAAO,YAAY,MAAM,oBAAoB,CAAA;AAE7C,SAAS,mBAAmB,CAAC,EAC3B,WAAW,EACX,YAAY,EACZ,GAAG,IAAI,EAIR;IACC,MAAM,SAAS,GAAG,sBAAsB,CAAC;QACvC,WAAW;QACX,YAAY;QACZ,GAAG,IAAI;KACR,CAAC,CAAA;IAEF,OAAO,CACL;QACE,oBAAC,IAAI,OAAK,SAAS,KAAM,IAAI,GAAI;QACjC,oBAAC,mBAAmB,IAAC,IAAI,EAAE,SAAS,CAAC,KAAK,GAAI,CAC7C,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;AAE9C,SAAS,sBAAsB,CAAC,EAC9B,WAAW,EACX,YAAY,GAIb;IAKC,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxB,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,cAAc,GAIhB;gBACF,KAAK,EAAE,EAAE;aACV,CAAA;YAED,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;gBACxB,cAAc,CAAC,MAAM,GAAG,CACtB,oBAAC,MAAM,IAAC,GAAG,EAAE,WAAW,CAAC,QAAQ,EAAE,GAAG,EAAE,WAAW,CAAC,OAAO,GAAI,CAChE,CAAA;YACH,CAAC;iBAAM,CAAC;gBACN,cAAc,CAAC,IAAI,GAAG,oBAAC,YAAY,yBAA8B,CAAA;YACnE,CAAC;YAED,cAAc,CAAC,KAAK,GAAG,WAAW,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAA;YACnE,OAAO,cAAc,CAAA;QACvB,CAAC;QAED,IAAI,YAAY,EAAE,CAAC;YACjB,OAAO;gBACL,IAAI,EAAE,oBAAC,YAAY,kBAAuB;gBAC1C,KAAK,EAAE,YAAY,CAAC,IAAI;aACzB,CAAA;QACH,CAAC;QAED,OAAO;YACL,IAAI,EAAE,oBAAC,YAAY,eAAoB;YACvC,KAAK,EAAE,WAAW;SACnB,CAAA;IACH,CAAC,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,CAAA;AACjC,CAAC","sourcesContent":["import * as React from 'react'\nimport { userService } from '@oneblink/sdk-core'\nimport { UserProfile } from '@oneblink/types/typescript/misc'\nimport { Chip, Avatar } from '@mui/material'\nimport TableCellCopyButton from './TableCellCopyButton'\nimport MaterialIcon from '../../MaterialIcon'\n\nfunction ActionedByTableCell({\n userProfile,\n developerKey,\n ...rest\n}: React.ComponentProps<typeof Chip> & {\n userProfile?: UserProfile\n developerKey?: { name: string }\n}) {\n const chipProps = useActionedByChipProps({\n userProfile,\n developerKey,\n ...rest,\n })\n\n return (\n <>\n <Chip {...chipProps} {...rest} />\n <TableCellCopyButton text={chipProps.label} />\n </>\n )\n}\n\nexport default React.memo(ActionedByTableCell)\n\nfunction useActionedByChipProps({\n userProfile,\n developerKey,\n}: React.ComponentProps<typeof Chip> & {\n userProfile?: UserProfile\n developerKey?: { name: string }\n}): {\n label: string\n icon?: React.ComponentProps<typeof Chip>['icon']\n avatar?: React.ComponentProps<typeof Chip>['avatar']\n} {\n return React.useMemo(() => {\n if (userProfile) {\n const emptyChipProps: {\n label: string\n icon?: React.ComponentProps<typeof Chip>['icon']\n avatar?: React.ComponentProps<typeof Chip>['avatar']\n } = {\n label: '',\n }\n\n if (userProfile.picture) {\n emptyChipProps.avatar = (\n <Avatar alt={userProfile.fullName} src={userProfile.picture} />\n )\n } else {\n emptyChipProps.icon = <MaterialIcon>account_circle</MaterialIcon>\n }\n\n emptyChipProps.label = userService.getUserFriendlyName(userProfile)\n return emptyChipProps\n }\n\n if (developerKey) {\n return {\n icon: <MaterialIcon>vpn_key</MaterialIcon>,\n label: developerKey.name,\n }\n }\n\n return {\n icon: <MaterialIcon>help</MaterialIcon>,\n label: 'Anonymous',\n }\n }, [developerKey, userProfile])\n}\n"]}
1
+ {"version":3,"file":"ActionedByTableCell.js","sourceRoot":"","sources":["../../../../src/components/formStore/table/ActionedByTableCell.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,mBAAmB,MAAM,uBAAuB,CAAA;AACvD,OAAO,YAAY,MAAM,oBAAoB,CAAA;AAE7C,SAAS,mBAAmB,CAAC,EAC3B,WAAW,EACX,YAAY,EACZ,GAAG,IAAI,EAIR;IACC,MAAM,SAAS,GAAG,sBAAsB,CAAC;QACvC,WAAW;QACX,YAAY;QACZ,GAAG,IAAI;KACR,CAAC,CAAA;IAEF,OAAO,CACL,8BACE,KAAC,IAAI,OAAK,SAAS,KAAM,IAAI,GAAI,EACjC,KAAC,mBAAmB,IAAC,IAAI,EAAE,SAAS,CAAC,KAAK,GAAI,IAC7C,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;AAE9C,SAAS,sBAAsB,CAAC,EAC9B,WAAW,EACX,YAAY,GAIb;IAKC,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxB,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,cAAc,GAIhB;gBACF,KAAK,EAAE,EAAE;aACV,CAAA;YAED,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;gBACxB,cAAc,CAAC,MAAM,GAAG,CACtB,KAAC,MAAM,IAAC,GAAG,EAAE,WAAW,CAAC,QAAQ,EAAE,GAAG,EAAE,WAAW,CAAC,OAAO,GAAI,CAChE,CAAA;YACH,CAAC;iBAAM,CAAC;gBACN,cAAc,CAAC,IAAI,GAAG,KAAC,YAAY,iCAA8B,CAAA;YACnE,CAAC;YAED,cAAc,CAAC,KAAK,GAAG,WAAW,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAA;YACnE,OAAO,cAAc,CAAA;QACvB,CAAC;QAED,IAAI,YAAY,EAAE,CAAC;YACjB,OAAO;gBACL,IAAI,EAAE,KAAC,YAAY,0BAAuB;gBAC1C,KAAK,EAAE,YAAY,CAAC,IAAI;aACzB,CAAA;QACH,CAAC;QAED,OAAO;YACL,IAAI,EAAE,KAAC,YAAY,uBAAoB;YACvC,KAAK,EAAE,WAAW;SACnB,CAAA;IACH,CAAC,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,CAAA;AACjC,CAAC","sourcesContent":["import * as React from 'react'\nimport { userService } from '@oneblink/sdk-core'\nimport { UserProfile } from '@oneblink/types/typescript/misc'\nimport { Chip, Avatar } from '@mui/material'\nimport TableCellCopyButton from './TableCellCopyButton'\nimport MaterialIcon from '../../MaterialIcon'\n\nfunction ActionedByTableCell({\n userProfile,\n developerKey,\n ...rest\n}: React.ComponentProps<typeof Chip> & {\n userProfile?: UserProfile\n developerKey?: { name: string }\n}) {\n const chipProps = useActionedByChipProps({\n userProfile,\n developerKey,\n ...rest,\n })\n\n return (\n <>\n <Chip {...chipProps} {...rest} />\n <TableCellCopyButton text={chipProps.label} />\n </>\n )\n}\n\nexport default React.memo(ActionedByTableCell)\n\nfunction useActionedByChipProps({\n userProfile,\n developerKey,\n}: React.ComponentProps<typeof Chip> & {\n userProfile?: UserProfile\n developerKey?: { name: string }\n}): {\n label: string\n icon?: React.ComponentProps<typeof Chip>['icon']\n avatar?: React.ComponentProps<typeof Chip>['avatar']\n} {\n return React.useMemo(() => {\n if (userProfile) {\n const emptyChipProps: {\n label: string\n icon?: React.ComponentProps<typeof Chip>['icon']\n avatar?: React.ComponentProps<typeof Chip>['avatar']\n } = {\n label: '',\n }\n\n if (userProfile.picture) {\n emptyChipProps.avatar = (\n <Avatar alt={userProfile.fullName} src={userProfile.picture} />\n )\n } else {\n emptyChipProps.icon = <MaterialIcon>account_circle</MaterialIcon>\n }\n\n emptyChipProps.label = userService.getUserFriendlyName(userProfile)\n return emptyChipProps\n }\n\n if (developerKey) {\n return {\n icon: <MaterialIcon>vpn_key</MaterialIcon>,\n label: developerKey.name,\n }\n }\n\n return {\n icon: <MaterialIcon>help</MaterialIcon>,\n label: 'Anonymous',\n }\n }, [developerKey, userProfile])\n}\n"]}
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { FormStoreRecord } from '@oneblink/types/typescript/submissions';
3
- import { HeaderGroup } from 'react-table';
3
+ import { ColumnMeta } from '@tanstack/react-table';
4
4
  type Props = {
5
- filter: NonNullable<HeaderGroup<FormStoreRecord>['filter']>;
5
+ filter: NonNullable<ColumnMeta<FormStoreRecord, unknown>['filter']>;
6
6
  };
7
- declare function ColumnFilters({ filter }: Props): React.JSX.Element | null;
7
+ declare function ColumnFilters({ filter }: Props): import("react/jsx-runtime").JSX.Element | null;
8
8
  declare const _default: React.MemoExoticComponent<typeof ColumnFilters>;
9
9
  export default _default;